@venturewild/workspace 0.2.3 → 0.3.0

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.
@@ -1,4 +1,4 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();var Ca=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function _x(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var xh={exports:{}},ls={},vh={exports:{}},Ne={};/**
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var Cl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Px(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var wh={exports:{}},as={},bh={exports:{}},Ne={};/**
2
2
  * @license React
3
3
  * react.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var El=Symbol.for("react.element"),zx=Symbol.for("react.portal"),Px=Symbol.for("react.fragment"),Rx=Symbol.for("react.strict_mode"),Ix=Symbol.for("react.profiler"),Ax=Symbol.for("react.provider"),Dx=Symbol.for("react.context"),Lx=Symbol.for("react.forward_ref"),Ox=Symbol.for("react.suspense"),Fx=Symbol.for("react.memo"),Mx=Symbol.for("react.lazy"),Td=Symbol.iterator;function $x(e){return e===null||typeof e!="object"?null:(e=Td&&e[Td]||e["@@iterator"],typeof e=="function"?e:null)}var wh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},bh=Object.assign,kh={};function Si(e,t,n){this.props=e,this.context=t,this.refs=kh,this.updater=n||wh}Si.prototype.isReactComponent={};Si.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Si.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Sh(){}Sh.prototype=Si.prototype;function Qu(e,t,n){this.props=e,this.context=t,this.refs=kh,this.updater=n||wh}var Zu=Qu.prototype=new Sh;Zu.constructor=Qu;bh(Zu,Si.prototype);Zu.isPureReactComponent=!0;var _d=Array.isArray,Eh=Object.prototype.hasOwnProperty,Ju={current:null},jh={key:!0,ref:!0,__self:!0,__source:!0};function Ch(e,t,n){var r,i={},l=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(l=""+t.key),t)Eh.call(t,r)&&!jh.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1<s){for(var o=Array(s),c=0;c<s;c++)o[c]=arguments[c+2];i.children=o}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)i[r]===void 0&&(i[r]=s[r]);return{$$typeof:El,type:e,key:l,ref:a,props:i,_owner:Ju.current}}function Bx(e,t){return{$$typeof:El,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ec(e){return typeof e=="object"&&e!==null&&e.$$typeof===El}function Hx(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var zd=/\/+/g;function Ms(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Hx(""+e.key):t.toString(36)}function ua(e,t,n,r,i){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(l){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case El:case zx:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+Ms(a,0):r,_d(i)?(n="",e!=null&&(n=e.replace(zd,"$&/")+"/"),ua(i,t,n,"",function(c){return c})):i!=null&&(ec(i)&&(i=Bx(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(zd,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",_d(e))for(var s=0;s<e.length;s++){l=e[s];var o=r+Ms(l,s);a+=ua(l,t,n,o,i)}else if(o=$x(e),typeof o=="function")for(e=o.call(e),s=0;!(l=e.next()).done;)l=l.value,o=r+Ms(l,s++),a+=ua(l,t,n,o,i);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Fl(e,t,n){if(e==null)return e;var r=[],i=0;return ua(e,r,"","",function(l){return t.call(n,l,i++)}),r}function Ux(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Lt={current:null},ca={transition:null},Wx={ReactCurrentDispatcher:Lt,ReactCurrentBatchConfig:ca,ReactCurrentOwner:Ju};function Nh(){throw Error("act(...) is not supported in production builds of React.")}Ne.Children={map:Fl,forEach:function(e,t,n){Fl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Fl(e,function(){t++}),t},toArray:function(e){return Fl(e,function(t){return t})||[]},only:function(e){if(!ec(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ne.Component=Si;Ne.Fragment=Px;Ne.Profiler=Ix;Ne.PureComponent=Qu;Ne.StrictMode=Rx;Ne.Suspense=Ox;Ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Wx;Ne.act=Nh;Ne.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=bh({},e.props),i=e.key,l=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,a=Ju.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(o in t)Eh.call(t,o)&&!jh.hasOwnProperty(o)&&(r[o]=t[o]===void 0&&s!==void 0?s[o]:t[o])}var o=arguments.length-2;if(o===1)r.children=n;else if(1<o){s=Array(o);for(var c=0;c<o;c++)s[c]=arguments[c+2];r.children=s}return{$$typeof:El,type:e.type,key:i,ref:l,props:r,_owner:a}};Ne.createContext=function(e){return e={$$typeof:Dx,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Ax,_context:e},e.Consumer=e};Ne.createElement=Ch;Ne.createFactory=function(e){var t=Ch.bind(null,e);return t.type=e,t};Ne.createRef=function(){return{current:null}};Ne.forwardRef=function(e){return{$$typeof:Lx,render:e}};Ne.isValidElement=ec;Ne.lazy=function(e){return{$$typeof:Mx,_payload:{_status:-1,_result:e},_init:Ux}};Ne.memo=function(e,t){return{$$typeof:Fx,type:e,compare:t===void 0?null:t}};Ne.startTransition=function(e){var t=ca.transition;ca.transition={};try{e()}finally{ca.transition=t}};Ne.unstable_act=Nh;Ne.useCallback=function(e,t){return Lt.current.useCallback(e,t)};Ne.useContext=function(e){return Lt.current.useContext(e)};Ne.useDebugValue=function(){};Ne.useDeferredValue=function(e){return Lt.current.useDeferredValue(e)};Ne.useEffect=function(e,t){return Lt.current.useEffect(e,t)};Ne.useId=function(){return Lt.current.useId()};Ne.useImperativeHandle=function(e,t,n){return Lt.current.useImperativeHandle(e,t,n)};Ne.useInsertionEffect=function(e,t){return Lt.current.useInsertionEffect(e,t)};Ne.useLayoutEffect=function(e,t){return Lt.current.useLayoutEffect(e,t)};Ne.useMemo=function(e,t){return Lt.current.useMemo(e,t)};Ne.useReducer=function(e,t,n){return Lt.current.useReducer(e,t,n)};Ne.useRef=function(e){return Lt.current.useRef(e)};Ne.useState=function(e){return Lt.current.useState(e)};Ne.useSyncExternalStore=function(e,t,n){return Lt.current.useSyncExternalStore(e,t,n)};Ne.useTransition=function(){return Lt.current.useTransition()};Ne.version="18.3.1";vh.exports=Ne;var S=vh.exports;const xn=Sl(S);/**
9
+ */var Ea=Symbol.for("react.element"),Rx=Symbol.for("react.portal"),Ix=Symbol.for("react.fragment"),Ax=Symbol.for("react.strict_mode"),Dx=Symbol.for("react.profiler"),Lx=Symbol.for("react.provider"),Ox=Symbol.for("react.context"),Fx=Symbol.for("react.forward_ref"),Mx=Symbol.for("react.suspense"),$x=Symbol.for("react.memo"),Bx=Symbol.for("react.lazy"),_d=Symbol.iterator;function Hx(e){return e===null||typeof e!="object"?null:(e=_d&&e[_d]||e["@@iterator"],typeof e=="function"?e:null)}var kh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Sh=Object.assign,Eh={};function Si(e,t,n){this.props=e,this.context=t,this.refs=Eh,this.updater=n||kh}Si.prototype.isReactComponent={};Si.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Si.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function jh(){}jh.prototype=Si.prototype;function Zu(e,t,n){this.props=e,this.context=t,this.refs=Eh,this.updater=n||kh}var Ju=Zu.prototype=new jh;Ju.constructor=Zu;Sh(Ju,Si.prototype);Ju.isPureReactComponent=!0;var zd=Array.isArray,Ch=Object.prototype.hasOwnProperty,ec={current:null},Nh={key:!0,ref:!0,__self:!0,__source:!0};function Th(e,t,n){var r,i={},a=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(a=""+t.key),t)Ch.call(t,r)&&!Nh.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1<s){for(var o=Array(s),c=0;c<s;c++)o[c]=arguments[c+2];i.children=o}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)i[r]===void 0&&(i[r]=s[r]);return{$$typeof:Ea,type:e,key:a,ref:l,props:i,_owner:ec.current}}function Ux(e,t){return{$$typeof:Ea,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function tc(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ea}function Wx(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Pd=/\/+/g;function Ms(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Wx(""+e.key):t.toString(36)}function ul(e,t,n,r,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Ea:case Rx:l=!0}}if(l)return l=e,i=i(l),e=r===""?"."+Ms(l,0):r,zd(i)?(n="",e!=null&&(n=e.replace(Pd,"$&/")+"/"),ul(i,t,n,"",function(c){return c})):i!=null&&(tc(i)&&(i=Ux(i,n+(!i.key||l&&l.key===i.key?"":(""+i.key).replace(Pd,"$&/")+"/")+e)),t.push(i)),1;if(l=0,r=r===""?".":r+":",zd(e))for(var s=0;s<e.length;s++){a=e[s];var o=r+Ms(a,s);l+=ul(a,t,n,o,i)}else if(o=Hx(e),typeof o=="function")for(e=o.call(e),s=0;!(a=e.next()).done;)a=a.value,o=r+Ms(a,s++),l+=ul(a,t,n,o,i);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function Fa(e,t,n){if(e==null)return e;var r=[],i=0;return ul(e,r,"","",function(a){return t.call(n,a,i++)}),r}function Vx(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Lt={current:null},cl={transition:null},Gx={ReactCurrentDispatcher:Lt,ReactCurrentBatchConfig:cl,ReactCurrentOwner:ec};function _h(){throw Error("act(...) is not supported in production builds of React.")}Ne.Children={map:Fa,forEach:function(e,t,n){Fa(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Fa(e,function(){t++}),t},toArray:function(e){return Fa(e,function(t){return t})||[]},only:function(e){if(!tc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ne.Component=Si;Ne.Fragment=Ix;Ne.Profiler=Dx;Ne.PureComponent=Zu;Ne.StrictMode=Ax;Ne.Suspense=Mx;Ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Gx;Ne.act=_h;Ne.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Sh({},e.props),i=e.key,a=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,l=ec.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(o in t)Ch.call(t,o)&&!Nh.hasOwnProperty(o)&&(r[o]=t[o]===void 0&&s!==void 0?s[o]:t[o])}var o=arguments.length-2;if(o===1)r.children=n;else if(1<o){s=Array(o);for(var c=0;c<o;c++)s[c]=arguments[c+2];r.children=s}return{$$typeof:Ea,type:e.type,key:i,ref:a,props:r,_owner:l}};Ne.createContext=function(e){return e={$$typeof:Ox,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Lx,_context:e},e.Consumer=e};Ne.createElement=Th;Ne.createFactory=function(e){var t=Th.bind(null,e);return t.type=e,t};Ne.createRef=function(){return{current:null}};Ne.forwardRef=function(e){return{$$typeof:Fx,render:e}};Ne.isValidElement=tc;Ne.lazy=function(e){return{$$typeof:Bx,_payload:{_status:-1,_result:e},_init:Vx}};Ne.memo=function(e,t){return{$$typeof:$x,type:e,compare:t===void 0?null:t}};Ne.startTransition=function(e){var t=cl.transition;cl.transition={};try{e()}finally{cl.transition=t}};Ne.unstable_act=_h;Ne.useCallback=function(e,t){return Lt.current.useCallback(e,t)};Ne.useContext=function(e){return Lt.current.useContext(e)};Ne.useDebugValue=function(){};Ne.useDeferredValue=function(e){return Lt.current.useDeferredValue(e)};Ne.useEffect=function(e,t){return Lt.current.useEffect(e,t)};Ne.useId=function(){return Lt.current.useId()};Ne.useImperativeHandle=function(e,t,n){return Lt.current.useImperativeHandle(e,t,n)};Ne.useInsertionEffect=function(e,t){return Lt.current.useInsertionEffect(e,t)};Ne.useLayoutEffect=function(e,t){return Lt.current.useLayoutEffect(e,t)};Ne.useMemo=function(e,t){return Lt.current.useMemo(e,t)};Ne.useReducer=function(e,t,n){return Lt.current.useReducer(e,t,n)};Ne.useRef=function(e){return Lt.current.useRef(e)};Ne.useState=function(e){return Lt.current.useState(e)};Ne.useSyncExternalStore=function(e,t,n){return Lt.current.useSyncExternalStore(e,t,n)};Ne.useTransition=function(){return Lt.current.useTransition()};Ne.version="18.3.1";bh.exports=Ne;var k=bh.exports;const xn=Sa(k);/**
10
10
  * @license React
11
11
  * react-jsx-runtime.production.min.js
12
12
  *
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Vx=S,Gx=Symbol.for("react.element"),qx=Symbol.for("react.fragment"),Yx=Object.prototype.hasOwnProperty,Xx=Vx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Kx={key:!0,ref:!0,__self:!0,__source:!0};function Th(e,t,n){var r,i={},l=null,a=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)Yx.call(t,r)&&!Kx.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Gx,type:e,key:l,ref:a,props:i,_owner:Xx.current}}ls.Fragment=qx;ls.jsx=Th;ls.jsxs=Th;xh.exports=ls;var u=xh.exports,$o={},_h={exports:{}},Jt={},zh={exports:{}},Ph={};/**
17
+ */var qx=k,Yx=Symbol.for("react.element"),Xx=Symbol.for("react.fragment"),Kx=Object.prototype.hasOwnProperty,Qx=qx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Zx={key:!0,ref:!0,__self:!0,__source:!0};function zh(e,t,n){var r,i={},a=null,l=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)Kx.call(t,r)&&!Zx.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Yx,type:e,key:a,ref:l,props:i,_owner:Qx.current}}as.Fragment=Xx;as.jsx=zh;as.jsxs=zh;wh.exports=as;var u=wh.exports,Bo={},Ph={exports:{}},Jt={},Rh={exports:{}},Ih={};/**
18
18
  * @license React
19
19
  * scheduler.production.min.js
20
20
  *
@@ -22,7 +22,7 @@
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */(function(e){function t(A,q){var k=A.length;A.push(q);e:for(;0<k;){var Q=k-1>>>1,ae=A[Q];if(0<i(ae,q))A[Q]=q,A[k]=ae,k=Q;else break e}}function n(A){return A.length===0?null:A[0]}function r(A){if(A.length===0)return null;var q=A[0],k=A.pop();if(k!==q){A[0]=k;e:for(var Q=0,ae=A.length,j=ae>>>1;Q<j;){var oe=2*(Q+1)-1,ve=A[oe],ne=oe+1,re=A[ne];if(0>i(ve,k))ne<ae&&0>i(re,ve)?(A[Q]=re,A[ne]=k,Q=ne):(A[Q]=ve,A[oe]=k,Q=oe);else if(ne<ae&&0>i(re,k))A[Q]=re,A[ne]=k,Q=ne;else break e}}return q}function i(A,q){var k=A.sortIndex-q.sortIndex;return k!==0?k:A.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var o=[],c=[],f=1,d=null,p=3,h=!1,m=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(A){for(var q=n(c);q!==null;){if(q.callback===null)r(c);else if(q.startTime<=A)r(c),q.sortIndex=q.expirationTime,t(o,q);else break;q=n(c)}}function C(A){if(v=!1,y(A),!m)if(n(o)!==null)m=!0,J(E);else{var q=n(c);q!==null&&le(C,q.startTime-A)}}function E(A,q){m=!1,v&&(v=!1,g(_),_=-1),h=!0;var k=p;try{for(y(q),d=n(o);d!==null&&(!(d.expirationTime>q)||A&&!M());){var Q=d.callback;if(typeof Q=="function"){d.callback=null,p=d.priorityLevel;var ae=Q(d.expirationTime<=q);q=e.unstable_now(),typeof ae=="function"?d.callback=ae:d===n(o)&&r(o),y(q)}else r(o);d=n(o)}if(d!==null)var j=!0;else{var oe=n(c);oe!==null&&le(C,oe.startTime-q),j=!1}return j}finally{d=null,p=k,h=!1}}var b=!1,T=null,_=-1,R=5,N=-1;function M(){return!(e.unstable_now()-N<R)}function $(){if(T!==null){var A=e.unstable_now();N=A;var q=!0;try{q=T(!0,A)}finally{q?L():(b=!1,T=null)}}else b=!1}var L;if(typeof x=="function")L=function(){x($)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,I=B.port2;B.port1.onmessage=$,L=function(){I.postMessage(null)}}else L=function(){w($,0)};function J(A){T=A,b||(b=!0,L())}function le(A,q){_=w(function(){A(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(A){A.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,J(E))},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(o)},e.unstable_next=function(A){switch(p){case 1:case 2:case 3:var q=3;break;default:q=p}var k=p;p=q;try{return A()}finally{p=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(A,q){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var k=p;p=A;try{return q()}finally{p=k}},e.unstable_scheduleCallback=function(A,q,k){var Q=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?Q+k:Q):k=Q,A){case 1:var ae=-1;break;case 2:ae=250;break;case 5:ae=1073741823;break;case 4:ae=1e4;break;default:ae=5e3}return ae=k+ae,A={id:f++,callback:q,priorityLevel:A,startTime:k,expirationTime:ae,sortIndex:-1},k>Q?(A.sortIndex=k,t(c,A),n(o)===null&&A===n(c)&&(v?(g(_),_=-1):v=!0,le(C,k-Q))):(A.sortIndex=ae,t(o,A),m||h||(m=!0,J(E))),A},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(A){var q=p;return function(){var k=p;p=q;try{return A.apply(this,arguments)}finally{p=k}}}})(Ph);zh.exports=Ph;var Qx=zh.exports;/**
25
+ */(function(e){function t(A,q){var S=A.length;A.push(q);e:for(;0<S;){var Q=S-1>>>1,le=A[Q];if(0<i(le,q))A[Q]=q,A[S]=le,S=Q;else break e}}function n(A){return A.length===0?null:A[0]}function r(A){if(A.length===0)return null;var q=A[0],S=A.pop();if(S!==q){A[0]=S;e:for(var Q=0,le=A.length,j=le>>>1;Q<j;){var oe=2*(Q+1)-1,ve=A[oe],ne=oe+1,re=A[ne];if(0>i(ve,S))ne<le&&0>i(re,ve)?(A[Q]=re,A[ne]=S,Q=ne):(A[Q]=ve,A[oe]=S,Q=oe);else if(ne<le&&0>i(re,S))A[Q]=re,A[ne]=S,Q=ne;else break e}}return q}function i(A,q){var S=A.sortIndex-q.sortIndex;return S!==0?S:A.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var o=[],c=[],f=1,d=null,p=3,h=!1,m=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(A){for(var q=n(c);q!==null;){if(q.callback===null)r(c);else if(q.startTime<=A)r(c),q.sortIndex=q.expirationTime,t(o,q);else break;q=n(c)}}function C(A){if(v=!1,y(A),!m)if(n(o)!==null)m=!0,J(E);else{var q=n(c);q!==null&&ae(C,q.startTime-A)}}function E(A,q){m=!1,v&&(v=!1,g(_),_=-1),h=!0;var S=p;try{for(y(q),d=n(o);d!==null&&(!(d.expirationTime>q)||A&&!M());){var Q=d.callback;if(typeof Q=="function"){d.callback=null,p=d.priorityLevel;var le=Q(d.expirationTime<=q);q=e.unstable_now(),typeof le=="function"?d.callback=le:d===n(o)&&r(o),y(q)}else r(o);d=n(o)}if(d!==null)var j=!0;else{var oe=n(c);oe!==null&&ae(C,oe.startTime-q),j=!1}return j}finally{d=null,p=S,h=!1}}var b=!1,T=null,_=-1,R=5,N=-1;function M(){return!(e.unstable_now()-N<R)}function $(){if(T!==null){var A=e.unstable_now();N=A;var q=!0;try{q=T(!0,A)}finally{q?L():(b=!1,T=null)}}else b=!1}var L;if(typeof x=="function")L=function(){x($)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,I=B.port2;B.port1.onmessage=$,L=function(){I.postMessage(null)}}else L=function(){w($,0)};function J(A){T=A,b||(b=!0,L())}function ae(A,q){_=w(function(){A(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(A){A.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,J(E))},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(o)},e.unstable_next=function(A){switch(p){case 1:case 2:case 3:var q=3;break;default:q=p}var S=p;p=q;try{return A()}finally{p=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(A,q){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var S=p;p=A;try{return q()}finally{p=S}},e.unstable_scheduleCallback=function(A,q,S){var Q=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?Q+S:Q):S=Q,A){case 1:var le=-1;break;case 2:le=250;break;case 5:le=1073741823;break;case 4:le=1e4;break;default:le=5e3}return le=S+le,A={id:f++,callback:q,priorityLevel:A,startTime:S,expirationTime:le,sortIndex:-1},S>Q?(A.sortIndex=S,t(c,A),n(o)===null&&A===n(c)&&(v?(g(_),_=-1):v=!0,ae(C,S-Q))):(A.sortIndex=le,t(o,A),m||h||(m=!0,J(E))),A},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(A){var q=p;return function(){var S=p;p=q;try{return A.apply(this,arguments)}finally{p=S}}}})(Ih);Rh.exports=Ih;var Jx=Rh.exports;/**
26
26
  * @license React
27
27
  * react-dom.production.min.js
28
28
  *
@@ -30,44 +30,44 @@
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var Zx=S,Zt=Qx;function H(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Rh=new Set,il={};function Fr(e,t){mi(e,t),mi(e+"Capture",t)}function mi(e,t){for(il[e]=t,e=0;e<t.length;e++)Rh.add(t[e])}var Mn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bo=Object.prototype.hasOwnProperty,Jx=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Pd={},Rd={};function ev(e){return Bo.call(Rd,e)?!0:Bo.call(Pd,e)?!1:Jx.test(e)?Rd[e]=!0:(Pd[e]=!0,!1)}function tv(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function nv(e,t,n,r){if(t===null||typeof t>"u"||tv(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ot(e,t,n,r,i,l,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=a}var Et={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Et[e]=new Ot(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Et[t]=new Ot(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Et[e]=new Ot(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Et[e]=new Ot(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Et[e]=new Ot(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Et[e]=new Ot(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Et[e]=new Ot(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Et[e]=new Ot(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Et[e]=new Ot(e,5,!1,e.toLowerCase(),null,!1,!1)});var tc=/[\-:]([a-z])/g;function nc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(tc,nc);Et[t]=new Ot(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(tc,nc);Et[t]=new Ot(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(tc,nc);Et[t]=new Ot(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Et[e]=new Ot(e,1,!1,e.toLowerCase(),null,!1,!1)});Et.xlinkHref=new Ot("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Et[e]=new Ot(e,1,!1,e.toLowerCase(),null,!0,!0)});function rc(e,t,n,r){var i=Et.hasOwnProperty(t)?Et[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(nv(t,n,i,r)&&(n=null),r||i===null?ev(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Un=Zx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ml=Symbol.for("react.element"),qr=Symbol.for("react.portal"),Yr=Symbol.for("react.fragment"),ic=Symbol.for("react.strict_mode"),Ho=Symbol.for("react.profiler"),Ih=Symbol.for("react.provider"),Ah=Symbol.for("react.context"),lc=Symbol.for("react.forward_ref"),Uo=Symbol.for("react.suspense"),Wo=Symbol.for("react.suspense_list"),ac=Symbol.for("react.memo"),Xn=Symbol.for("react.lazy"),Dh=Symbol.for("react.offscreen"),Id=Symbol.iterator;function zi(e){return e===null||typeof e!="object"?null:(e=Id&&e[Id]||e["@@iterator"],typeof e=="function"?e:null)}var nt=Object.assign,$s;function Bi(e){if($s===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);$s=t&&t[1]||""}return`
33
+ */var ev=k,Zt=Jx;function H(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Ah=new Set,ia={};function Fr(e,t){mi(e,t),mi(e+"Capture",t)}function mi(e,t){for(ia[e]=t,e=0;e<t.length;e++)Ah.add(t[e])}var Mn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ho=Object.prototype.hasOwnProperty,tv=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Rd={},Id={};function nv(e){return Ho.call(Id,e)?!0:Ho.call(Rd,e)?!1:tv.test(e)?Id[e]=!0:(Rd[e]=!0,!1)}function rv(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function iv(e,t,n,r){if(t===null||typeof t>"u"||rv(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ot(e,t,n,r,i,a,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=l}var Et={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Et[e]=new Ot(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Et[t]=new Ot(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Et[e]=new Ot(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Et[e]=new Ot(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Et[e]=new Ot(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Et[e]=new Ot(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Et[e]=new Ot(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Et[e]=new Ot(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Et[e]=new Ot(e,5,!1,e.toLowerCase(),null,!1,!1)});var nc=/[\-:]([a-z])/g;function rc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(nc,rc);Et[t]=new Ot(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(nc,rc);Et[t]=new Ot(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(nc,rc);Et[t]=new Ot(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Et[e]=new Ot(e,1,!1,e.toLowerCase(),null,!1,!1)});Et.xlinkHref=new Ot("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Et[e]=new Ot(e,1,!1,e.toLowerCase(),null,!0,!0)});function ic(e,t,n,r){var i=Et.hasOwnProperty(t)?Et[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(iv(t,n,i,r)&&(n=null),r||i===null?nv(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Un=ev.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ma=Symbol.for("react.element"),qr=Symbol.for("react.portal"),Yr=Symbol.for("react.fragment"),ac=Symbol.for("react.strict_mode"),Uo=Symbol.for("react.profiler"),Dh=Symbol.for("react.provider"),Lh=Symbol.for("react.context"),lc=Symbol.for("react.forward_ref"),Wo=Symbol.for("react.suspense"),Vo=Symbol.for("react.suspense_list"),sc=Symbol.for("react.memo"),Xn=Symbol.for("react.lazy"),Oh=Symbol.for("react.offscreen"),Ad=Symbol.iterator;function zi(e){return e===null||typeof e!="object"?null:(e=Ad&&e[Ad]||e["@@iterator"],typeof e=="function"?e:null)}var nt=Object.assign,$s;function Bi(e){if($s===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);$s=t&&t[1]||""}return`
34
34
  `+$s+e}var Bs=!1;function Hs(e,t){if(!e||Bs)return"";Bs=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
35
- `),l=r.stack.split(`
36
- `),a=i.length-1,s=l.length-1;1<=a&&0<=s&&i[a]!==l[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==l[s]){if(a!==1||s!==1)do if(a--,s--,0>s||i[a]!==l[s]){var o=`
37
- `+i[a].replace(" at new "," at ");return e.displayName&&o.includes("<anonymous>")&&(o=o.replace("<anonymous>",e.displayName)),o}while(1<=a&&0<=s);break}}}finally{Bs=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bi(e):""}function rv(e){switch(e.tag){case 5:return Bi(e.type);case 16:return Bi("Lazy");case 13:return Bi("Suspense");case 19:return Bi("SuspenseList");case 0:case 2:case 15:return e=Hs(e.type,!1),e;case 11:return e=Hs(e.type.render,!1),e;case 1:return e=Hs(e.type,!0),e;default:return""}}function Vo(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Yr:return"Fragment";case qr:return"Portal";case Ho:return"Profiler";case ic:return"StrictMode";case Uo:return"Suspense";case Wo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ah:return(e.displayName||"Context")+".Consumer";case Ih:return(e._context.displayName||"Context")+".Provider";case lc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ac:return t=e.displayName||null,t!==null?t:Vo(e.type)||"Memo";case Xn:t=e._payload,e=e._init;try{return Vo(e(t))}catch{}}return null}function iv(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Vo(t);case 8:return t===ic?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ur(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Lh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lv(e){var t=Lh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,l.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $l(e){e._valueTracker||(e._valueTracker=lv(e))}function Oh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Lh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Na(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Go(e,t){var n=t.checked;return nt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ad(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ur(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Fh(e,t){t=t.checked,t!=null&&rc(e,"checked",t,!1)}function qo(e,t){Fh(e,t);var n=ur(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Yo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Yo(e,t.type,ur(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Dd(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Yo(e,t,n){(t!=="number"||Na(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Hi=Array.isArray;function si(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ur(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Xo(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(H(91));return nt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ld(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(H(92));if(Hi(n)){if(1<n.length)throw Error(H(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ur(n)}}function Mh(e,t){var n=ur(t.value),r=ur(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Od(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function $h(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ko(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?$h(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Bl,Bh=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Bl=Bl||document.createElement("div"),Bl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Bl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ll(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},av=["Webkit","ms","Moz","O"];Object.keys(Gi).forEach(function(e){av.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gi[t]=Gi[e]})});function Hh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Gi.hasOwnProperty(e)&&Gi[e]?(""+t).trim():t+"px"}function Uh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Hh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var sv=nt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Qo(e,t){if(t){if(sv[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function Zo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Jo=null;function sc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var eu=null,oi=null,ui=null;function Fd(e){if(e=Nl(e)){if(typeof eu!="function")throw Error(H(280));var t=e.stateNode;t&&(t=cs(t),eu(e.stateNode,e.type,t))}}function Wh(e){oi?ui?ui.push(e):ui=[e]:oi=e}function Vh(){if(oi){var e=oi,t=ui;if(ui=oi=null,Fd(e),t)for(e=0;e<t.length;e++)Fd(t[e])}}function Gh(e,t){return e(t)}function qh(){}var Us=!1;function Yh(e,t,n){if(Us)return e(t,n);Us=!0;try{return Gh(e,t,n)}finally{Us=!1,(oi!==null||ui!==null)&&(qh(),Vh())}}function al(e,t){var n=e.stateNode;if(n===null)return null;var r=cs(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(H(231,t,typeof n));return n}var tu=!1;if(Mn)try{var Pi={};Object.defineProperty(Pi,"passive",{get:function(){tu=!0}}),window.addEventListener("test",Pi,Pi),window.removeEventListener("test",Pi,Pi)}catch{tu=!1}function ov(e,t,n,r,i,l,a,s,o){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(f){this.onError(f)}}var qi=!1,Ta=null,_a=!1,nu=null,uv={onError:function(e){qi=!0,Ta=e}};function cv(e,t,n,r,i,l,a,s,o){qi=!1,Ta=null,ov.apply(uv,arguments)}function dv(e,t,n,r,i,l,a,s,o){if(cv.apply(this,arguments),qi){if(qi){var c=Ta;qi=!1,Ta=null}else throw Error(H(198));_a||(_a=!0,nu=c)}}function Mr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Xh(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Md(e){if(Mr(e)!==e)throw Error(H(188))}function fv(e){var t=e.alternate;if(!t){if(t=Mr(e),t===null)throw Error(H(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var l=i.alternate;if(l===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===l.child){for(l=i.child;l;){if(l===n)return Md(i),e;if(l===r)return Md(i),t;l=l.sibling}throw Error(H(188))}if(n.return!==r.return)n=i,r=l;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=l;break}if(s===r){a=!0,r=i,n=l;break}s=s.sibling}if(!a){for(s=l.child;s;){if(s===n){a=!0,n=l,r=i;break}if(s===r){a=!0,r=l,n=i;break}s=s.sibling}if(!a)throw Error(H(189))}}if(n.alternate!==r)throw Error(H(190))}if(n.tag!==3)throw Error(H(188));return n.stateNode.current===n?e:t}function Kh(e){return e=fv(e),e!==null?Qh(e):null}function Qh(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Qh(e);if(t!==null)return t;e=e.sibling}return null}var Zh=Zt.unstable_scheduleCallback,$d=Zt.unstable_cancelCallback,pv=Zt.unstable_shouldYield,hv=Zt.unstable_requestPaint,st=Zt.unstable_now,mv=Zt.unstable_getCurrentPriorityLevel,oc=Zt.unstable_ImmediatePriority,Jh=Zt.unstable_UserBlockingPriority,za=Zt.unstable_NormalPriority,gv=Zt.unstable_LowPriority,em=Zt.unstable_IdlePriority,as=null,Cn=null;function yv(e){if(Cn&&typeof Cn.onCommitFiberRoot=="function")try{Cn.onCommitFiberRoot(as,e,void 0,(e.current.flags&128)===128)}catch{}}var mn=Math.clz32?Math.clz32:wv,xv=Math.log,vv=Math.LN2;function wv(e){return e>>>=0,e===0?32:31-(xv(e)/vv|0)|0}var Hl=64,Ul=4194304;function Ui(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Pa(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,l=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Ui(s):(l&=a,l!==0&&(r=Ui(l)))}else a=n&~i,a!==0?r=Ui(a):l!==0&&(r=Ui(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,l=t&-t,i>=l||i===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-mn(t),i=1<<n,r|=e[n],t&=~i;return r}function bv(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function kv(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,l=e.pendingLanes;0<l;){var a=31-mn(l),s=1<<a,o=i[a];o===-1?(!(s&n)||s&r)&&(i[a]=bv(s,t)):o<=t&&(e.expiredLanes|=s),l&=~s}}function ru(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function tm(){var e=Hl;return Hl<<=1,!(Hl&4194240)&&(Hl=64),e}function Ws(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function jl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-mn(t),e[t]=n}function Sv(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-mn(n),l=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~l}}function uc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-mn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Oe=0;function nm(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var rm,cc,im,lm,am,iu=!1,Wl=[],tr=null,nr=null,rr=null,sl=new Map,ol=new Map,Qn=[],Ev="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Bd(e,t){switch(e){case"focusin":case"focusout":tr=null;break;case"dragenter":case"dragleave":nr=null;break;case"mouseover":case"mouseout":rr=null;break;case"pointerover":case"pointerout":sl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ol.delete(t.pointerId)}}function Ri(e,t,n,r,i,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[i]},t!==null&&(t=Nl(t),t!==null&&cc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function jv(e,t,n,r,i){switch(t){case"focusin":return tr=Ri(tr,e,t,n,r,i),!0;case"dragenter":return nr=Ri(nr,e,t,n,r,i),!0;case"mouseover":return rr=Ri(rr,e,t,n,r,i),!0;case"pointerover":var l=i.pointerId;return sl.set(l,Ri(sl.get(l)||null,e,t,n,r,i)),!0;case"gotpointercapture":return l=i.pointerId,ol.set(l,Ri(ol.get(l)||null,e,t,n,r,i)),!0}return!1}function sm(e){var t=Sr(e.target);if(t!==null){var n=Mr(t);if(n!==null){if(t=n.tag,t===13){if(t=Xh(n),t!==null){e.blockedOn=t,am(e.priority,function(){im(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function da(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=lu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Jo=r,n.target.dispatchEvent(r),Jo=null}else return t=Nl(n),t!==null&&cc(t),e.blockedOn=n,!1;t.shift()}return!0}function Hd(e,t,n){da(e)&&n.delete(t)}function Cv(){iu=!1,tr!==null&&da(tr)&&(tr=null),nr!==null&&da(nr)&&(nr=null),rr!==null&&da(rr)&&(rr=null),sl.forEach(Hd),ol.forEach(Hd)}function Ii(e,t){e.blockedOn===t&&(e.blockedOn=null,iu||(iu=!0,Zt.unstable_scheduleCallback(Zt.unstable_NormalPriority,Cv)))}function ul(e){function t(i){return Ii(i,e)}if(0<Wl.length){Ii(Wl[0],e);for(var n=1;n<Wl.length;n++){var r=Wl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(tr!==null&&Ii(tr,e),nr!==null&&Ii(nr,e),rr!==null&&Ii(rr,e),sl.forEach(t),ol.forEach(t),n=0;n<Qn.length;n++)r=Qn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Qn.length&&(n=Qn[0],n.blockedOn===null);)sm(n),n.blockedOn===null&&Qn.shift()}var ci=Un.ReactCurrentBatchConfig,Ra=!0;function Nv(e,t,n,r){var i=Oe,l=ci.transition;ci.transition=null;try{Oe=1,dc(e,t,n,r)}finally{Oe=i,ci.transition=l}}function Tv(e,t,n,r){var i=Oe,l=ci.transition;ci.transition=null;try{Oe=4,dc(e,t,n,r)}finally{Oe=i,ci.transition=l}}function dc(e,t,n,r){if(Ra){var i=lu(e,t,n,r);if(i===null)eo(e,t,r,Ia,n),Bd(e,r);else if(jv(i,e,t,n,r))r.stopPropagation();else if(Bd(e,r),t&4&&-1<Ev.indexOf(e)){for(;i!==null;){var l=Nl(i);if(l!==null&&rm(l),l=lu(e,t,n,r),l===null&&eo(e,t,r,Ia,n),l===i)break;i=l}i!==null&&r.stopPropagation()}else eo(e,t,r,null,n)}}var Ia=null;function lu(e,t,n,r){if(Ia=null,e=sc(r),e=Sr(e),e!==null)if(t=Mr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Xh(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ia=e,null}function om(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(mv()){case oc:return 1;case Jh:return 4;case za:case gv:return 16;case em:return 536870912;default:return 16}default:return 16}}var Jn=null,fc=null,fa=null;function um(){if(fa)return fa;var e,t=fc,n=t.length,r,i="value"in Jn?Jn.value:Jn.textContent,l=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[l-r];r++);return fa=i.slice(e,1<r?1-r:void 0)}function pa(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Vl(){return!0}function Ud(){return!1}function en(e){function t(n,r,i,l,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=l,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(l):l[s]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?Vl:Ud,this.isPropagationStopped=Ud,this}return nt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Vl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Vl)},persist:function(){},isPersistent:Vl}),t}var Ei={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pc=en(Ei),Cl=nt({},Ei,{view:0,detail:0}),_v=en(Cl),Vs,Gs,Ai,ss=nt({},Cl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ai&&(Ai&&e.type==="mousemove"?(Vs=e.screenX-Ai.screenX,Gs=e.screenY-Ai.screenY):Gs=Vs=0,Ai=e),Vs)},movementY:function(e){return"movementY"in e?e.movementY:Gs}}),Wd=en(ss),zv=nt({},ss,{dataTransfer:0}),Pv=en(zv),Rv=nt({},Cl,{relatedTarget:0}),qs=en(Rv),Iv=nt({},Ei,{animationName:0,elapsedTime:0,pseudoElement:0}),Av=en(Iv),Dv=nt({},Ei,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lv=en(Dv),Ov=nt({},Ei,{data:0}),Vd=en(Ov),Fv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mv={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},$v={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$v[e])?!!t[e]:!1}function hc(){return Bv}var Hv=nt({},Cl,{key:function(e){if(e.key){var t=Fv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=pa(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Mv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hc,charCode:function(e){return e.type==="keypress"?pa(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?pa(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Uv=en(Hv),Wv=nt({},ss,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gd=en(Wv),Vv=nt({},Cl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hc}),Gv=en(Vv),qv=nt({},Ei,{propertyName:0,elapsedTime:0,pseudoElement:0}),Yv=en(qv),Xv=nt({},ss,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Kv=en(Xv),Qv=[9,13,27,32],mc=Mn&&"CompositionEvent"in window,Yi=null;Mn&&"documentMode"in document&&(Yi=document.documentMode);var Zv=Mn&&"TextEvent"in window&&!Yi,cm=Mn&&(!mc||Yi&&8<Yi&&11>=Yi),qd=" ",Yd=!1;function dm(e,t){switch(e){case"keyup":return Qv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xr=!1;function Jv(e,t){switch(e){case"compositionend":return fm(t);case"keypress":return t.which!==32?null:(Yd=!0,qd);case"textInput":return e=t.data,e===qd&&Yd?null:e;default:return null}}function ew(e,t){if(Xr)return e==="compositionend"||!mc&&dm(e,t)?(e=um(),fa=fc=Jn=null,Xr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return cm&&t.locale!=="ko"?null:t.data;default:return null}}var tw={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Xd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!tw[e.type]:t==="textarea"}function pm(e,t,n,r){Wh(r),t=Aa(t,"onChange"),0<t.length&&(n=new pc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xi=null,cl=null;function nw(e){Em(e,0)}function os(e){var t=Zr(e);if(Oh(t))return e}function rw(e,t){if(e==="change")return t}var hm=!1;if(Mn){var Ys;if(Mn){var Xs="oninput"in document;if(!Xs){var Kd=document.createElement("div");Kd.setAttribute("oninput","return;"),Xs=typeof Kd.oninput=="function"}Ys=Xs}else Ys=!1;hm=Ys&&(!document.documentMode||9<document.documentMode)}function Qd(){Xi&&(Xi.detachEvent("onpropertychange",mm),cl=Xi=null)}function mm(e){if(e.propertyName==="value"&&os(cl)){var t=[];pm(t,cl,e,sc(e)),Yh(nw,t)}}function iw(e,t,n){e==="focusin"?(Qd(),Xi=t,cl=n,Xi.attachEvent("onpropertychange",mm)):e==="focusout"&&Qd()}function lw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return os(cl)}function aw(e,t){if(e==="click")return os(t)}function sw(e,t){if(e==="input"||e==="change")return os(t)}function ow(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vn=typeof Object.is=="function"?Object.is:ow;function dl(e,t){if(vn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Bo.call(t,i)||!vn(e[i],t[i]))return!1}return!0}function Zd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jd(e,t){var n=Zd(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Zd(n)}}function gm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ym(){for(var e=window,t=Na();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Na(e.document)}return t}function gc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function uw(e){var t=ym(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&gm(n.ownerDocument.documentElement,n)){if(r!==null&&gc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!e.extend&&l>r&&(i=r,r=l,l=i),i=Jd(n,l);var a=Jd(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var cw=Mn&&"documentMode"in document&&11>=document.documentMode,Kr=null,au=null,Ki=null,su=!1;function ef(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;su||Kr==null||Kr!==Na(r)||(r=Kr,"selectionStart"in r&&gc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ki&&dl(Ki,r)||(Ki=r,r=Aa(au,"onSelect"),0<r.length&&(t=new pc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Kr)))}function Gl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Qr={animationend:Gl("Animation","AnimationEnd"),animationiteration:Gl("Animation","AnimationIteration"),animationstart:Gl("Animation","AnimationStart"),transitionend:Gl("Transition","TransitionEnd")},Ks={},xm={};Mn&&(xm=document.createElement("div").style,"AnimationEvent"in window||(delete Qr.animationend.animation,delete Qr.animationiteration.animation,delete Qr.animationstart.animation),"TransitionEvent"in window||delete Qr.transitionend.transition);function us(e){if(Ks[e])return Ks[e];if(!Qr[e])return e;var t=Qr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in xm)return Ks[e]=t[n];return e}var vm=us("animationend"),wm=us("animationiteration"),bm=us("animationstart"),km=us("transitionend"),Sm=new Map,tf="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function fr(e,t){Sm.set(e,t),Fr(t,[e])}for(var Qs=0;Qs<tf.length;Qs++){var Zs=tf[Qs],dw=Zs.toLowerCase(),fw=Zs[0].toUpperCase()+Zs.slice(1);fr(dw,"on"+fw)}fr(vm,"onAnimationEnd");fr(wm,"onAnimationIteration");fr(bm,"onAnimationStart");fr("dblclick","onDoubleClick");fr("focusin","onFocus");fr("focusout","onBlur");fr(km,"onTransitionEnd");mi("onMouseEnter",["mouseout","mouseover"]);mi("onMouseLeave",["mouseout","mouseover"]);mi("onPointerEnter",["pointerout","pointerover"]);mi("onPointerLeave",["pointerout","pointerover"]);Fr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),pw=new Set("cancel close invalid load scroll toggle".split(" ").concat(Wi));function nf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,dv(r,t,void 0,e),e.currentTarget=null}function Em(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],o=s.instance,c=s.currentTarget;if(s=s.listener,o!==l&&i.isPropagationStopped())break e;nf(i,s,c),l=o}else for(a=0;a<r.length;a++){if(s=r[a],o=s.instance,c=s.currentTarget,s=s.listener,o!==l&&i.isPropagationStopped())break e;nf(i,s,c),l=o}}}if(_a)throw e=nu,_a=!1,nu=null,e}function Ve(e,t){var n=t[fu];n===void 0&&(n=t[fu]=new Set);var r=e+"__bubble";n.has(r)||(jm(t,e,2,!1),n.add(r))}function Js(e,t,n){var r=0;t&&(r|=4),jm(n,e,r,t)}var ql="_reactListening"+Math.random().toString(36).slice(2);function fl(e){if(!e[ql]){e[ql]=!0,Rh.forEach(function(n){n!=="selectionchange"&&(pw.has(n)||Js(n,!1,e),Js(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ql]||(t[ql]=!0,Js("selectionchange",!1,t))}}function jm(e,t,n,r){switch(om(t)){case 1:var i=Nv;break;case 4:i=Tv;break;default:i=dc}n=i.bind(null,t,n,e),i=void 0,!tu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function eo(e,t,n,r,i){var l=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var o=a.tag;if((o===3||o===4)&&(o=a.stateNode.containerInfo,o===i||o.nodeType===8&&o.parentNode===i))return;a=a.return}for(;s!==null;){if(a=Sr(s),a===null)return;if(o=a.tag,o===5||o===6){r=l=a;continue e}s=s.parentNode}}r=r.return}Yh(function(){var c=l,f=sc(n),d=[];e:{var p=Sm.get(e);if(p!==void 0){var h=pc,m=e;switch(e){case"keypress":if(pa(n)===0)break e;case"keydown":case"keyup":h=Uv;break;case"focusin":m="focus",h=qs;break;case"focusout":m="blur",h=qs;break;case"beforeblur":case"afterblur":h=qs;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Wd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Pv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=Gv;break;case vm:case wm:case bm:h=Av;break;case km:h=Yv;break;case"scroll":h=_v;break;case"wheel":h=Kv;break;case"copy":case"cut":case"paste":h=Lv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Gd}var v=(t&4)!==0,w=!v&&e==="scroll",g=v?p!==null?p+"Capture":null:p;v=[];for(var x=c,y;x!==null;){y=x;var C=y.stateNode;if(y.tag===5&&C!==null&&(y=C,g!==null&&(C=al(x,g),C!=null&&v.push(pl(x,C,y)))),w)break;x=x.return}0<v.length&&(p=new h(p,m,null,n,f),d.push({event:p,listeners:v}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&n!==Jo&&(m=n.relatedTarget||n.fromElement)&&(Sr(m)||m[$n]))break e;if((h||p)&&(p=f.window===f?f:(p=f.ownerDocument)?p.defaultView||p.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=c,m=m?Sr(m):null,m!==null&&(w=Mr(m),m!==w||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=c),h!==m)){if(v=Wd,C="onMouseLeave",g="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(v=Gd,C="onPointerLeave",g="onPointerEnter",x="pointer"),w=h==null?p:Zr(h),y=m==null?p:Zr(m),p=new v(C,x+"leave",h,n,f),p.target=w,p.relatedTarget=y,C=null,Sr(f)===c&&(v=new v(g,x+"enter",m,n,f),v.target=y,v.relatedTarget=w,C=v),w=C,h&&m)t:{for(v=h,g=m,x=0,y=v;y;y=Br(y))x++;for(y=0,C=g;C;C=Br(C))y++;for(;0<x-y;)v=Br(v),x--;for(;0<y-x;)g=Br(g),y--;for(;x--;){if(v===g||g!==null&&v===g.alternate)break t;v=Br(v),g=Br(g)}v=null}else v=null;h!==null&&rf(d,p,h,v,!1),m!==null&&w!==null&&rf(d,w,m,v,!0)}}e:{if(p=c?Zr(c):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var E=rw;else if(Xd(p))if(hm)E=sw;else{E=lw;var b=iw}else(h=p.nodeName)&&h.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(E=aw);if(E&&(E=E(e,c))){pm(d,E,n,f);break e}b&&b(e,p,c),e==="focusout"&&(b=p._wrapperState)&&b.controlled&&p.type==="number"&&Yo(p,"number",p.value)}switch(b=c?Zr(c):window,e){case"focusin":(Xd(b)||b.contentEditable==="true")&&(Kr=b,au=c,Ki=null);break;case"focusout":Ki=au=Kr=null;break;case"mousedown":su=!0;break;case"contextmenu":case"mouseup":case"dragend":su=!1,ef(d,n,f);break;case"selectionchange":if(cw)break;case"keydown":case"keyup":ef(d,n,f)}var T;if(mc)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else Xr?dm(e,n)&&(_="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(_="onCompositionStart");_&&(cm&&n.locale!=="ko"&&(Xr||_!=="onCompositionStart"?_==="onCompositionEnd"&&Xr&&(T=um()):(Jn=f,fc="value"in Jn?Jn.value:Jn.textContent,Xr=!0)),b=Aa(c,_),0<b.length&&(_=new Vd(_,e,null,n,f),d.push({event:_,listeners:b}),T?_.data=T:(T=fm(n),T!==null&&(_.data=T)))),(T=Zv?Jv(e,n):ew(e,n))&&(c=Aa(c,"onBeforeInput"),0<c.length&&(f=new Vd("onBeforeInput","beforeinput",null,n,f),d.push({event:f,listeners:c}),f.data=T))}Em(d,t)})}function pl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Aa(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,l=i.stateNode;i.tag===5&&l!==null&&(i=l,l=al(e,n),l!=null&&r.unshift(pl(e,l,i)),l=al(e,t),l!=null&&r.push(pl(e,l,i))),e=e.return}return r}function Br(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function rf(e,t,n,r,i){for(var l=t._reactName,a=[];n!==null&&n!==r;){var s=n,o=s.alternate,c=s.stateNode;if(o!==null&&o===r)break;s.tag===5&&c!==null&&(s=c,i?(o=al(n,l),o!=null&&a.unshift(pl(n,o,s))):i||(o=al(n,l),o!=null&&a.push(pl(n,o,s)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var hw=/\r\n?/g,mw=/\u0000|\uFFFD/g;function lf(e){return(typeof e=="string"?e:""+e).replace(hw,`
38
- `).replace(mw,"")}function Yl(e,t,n){if(t=lf(t),lf(e)!==t&&n)throw Error(H(425))}function Da(){}var ou=null,uu=null;function cu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var du=typeof setTimeout=="function"?setTimeout:void 0,gw=typeof clearTimeout=="function"?clearTimeout:void 0,af=typeof Promise=="function"?Promise:void 0,yw=typeof queueMicrotask=="function"?queueMicrotask:typeof af<"u"?function(e){return af.resolve(null).then(e).catch(xw)}:du;function xw(e){setTimeout(function(){throw e})}function to(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),ul(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ul(t)}function ir(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function sf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ji=Math.random().toString(36).slice(2),jn="__reactFiber$"+ji,hl="__reactProps$"+ji,$n="__reactContainer$"+ji,fu="__reactEvents$"+ji,vw="__reactListeners$"+ji,ww="__reactHandles$"+ji;function Sr(e){var t=e[jn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[$n]||n[jn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=sf(e);e!==null;){if(n=e[jn])return n;e=sf(e)}return t}e=n,n=e.parentNode}return null}function Nl(e){return e=e[jn]||e[$n],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Zr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(H(33))}function cs(e){return e[hl]||null}var pu=[],Jr=-1;function pr(e){return{current:e}}function Ge(e){0>Jr||(e.current=pu[Jr],pu[Jr]=null,Jr--)}function Ue(e,t){Jr++,pu[Jr]=e.current,e.current=t}var cr={},Pt=pr(cr),Ht=pr(!1),zr=cr;function gi(e,t){var n=e.type.contextTypes;if(!n)return cr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in n)i[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ut(e){return e=e.childContextTypes,e!=null}function La(){Ge(Ht),Ge(Pt)}function of(e,t,n){if(Pt.current!==cr)throw Error(H(168));Ue(Pt,t),Ue(Ht,n)}function Cm(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(H(108,iv(e)||"Unknown",i));return nt({},n,r)}function Oa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cr,zr=Pt.current,Ue(Pt,e),Ue(Ht,Ht.current),!0}function uf(e,t,n){var r=e.stateNode;if(!r)throw Error(H(169));n?(e=Cm(e,t,zr),r.__reactInternalMemoizedMergedChildContext=e,Ge(Ht),Ge(Pt),Ue(Pt,e)):Ge(Ht),Ue(Ht,n)}var In=null,ds=!1,no=!1;function Nm(e){In===null?In=[e]:In.push(e)}function bw(e){ds=!0,Nm(e)}function hr(){if(!no&&In!==null){no=!0;var e=0,t=Oe;try{var n=In;for(Oe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}In=null,ds=!1}catch(i){throw In!==null&&(In=In.slice(e+1)),Zh(oc,hr),i}finally{Oe=t,no=!1}}return null}var ei=[],ti=0,Fa=null,Ma=0,tn=[],nn=0,Pr=null,Dn=1,Ln="";function vr(e,t){ei[ti++]=Ma,ei[ti++]=Fa,Fa=e,Ma=t}function Tm(e,t,n){tn[nn++]=Dn,tn[nn++]=Ln,tn[nn++]=Pr,Pr=e;var r=Dn;e=Ln;var i=32-mn(r)-1;r&=~(1<<i),n+=1;var l=32-mn(t)+i;if(30<l){var a=i-i%5;l=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Dn=1<<32-mn(t)+i|n<<i|r,Ln=l+e}else Dn=1<<l|n<<i|r,Ln=e}function yc(e){e.return!==null&&(vr(e,1),Tm(e,1,0))}function xc(e){for(;e===Fa;)Fa=ei[--ti],ei[ti]=null,Ma=ei[--ti],ei[ti]=null;for(;e===Pr;)Pr=tn[--nn],tn[nn]=null,Ln=tn[--nn],tn[nn]=null,Dn=tn[--nn],tn[nn]=null}var Kt=null,Xt=null,Xe=!1,hn=null;function _m(e,t){var n=ln(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function cf(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Kt=e,Xt=ir(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Kt=e,Xt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Pr!==null?{id:Dn,overflow:Ln}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ln(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Kt=e,Xt=null,!0):!1;default:return!1}}function hu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function mu(e){if(Xe){var t=Xt;if(t){var n=t;if(!cf(e,t)){if(hu(e))throw Error(H(418));t=ir(n.nextSibling);var r=Kt;t&&cf(e,t)?_m(r,n):(e.flags=e.flags&-4097|2,Xe=!1,Kt=e)}}else{if(hu(e))throw Error(H(418));e.flags=e.flags&-4097|2,Xe=!1,Kt=e}}}function df(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Kt=e}function Xl(e){if(e!==Kt)return!1;if(!Xe)return df(e),Xe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!cu(e.type,e.memoizedProps)),t&&(t=Xt)){if(hu(e))throw zm(),Error(H(418));for(;t;)_m(e,t),t=ir(t.nextSibling)}if(df(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Xt=ir(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Xt=null}}else Xt=Kt?ir(e.stateNode.nextSibling):null;return!0}function zm(){for(var e=Xt;e;)e=ir(e.nextSibling)}function yi(){Xt=Kt=null,Xe=!1}function vc(e){hn===null?hn=[e]:hn.push(e)}var kw=Un.ReactCurrentBatchConfig;function Di(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(H(309));var r=n.stateNode}if(!r)throw Error(H(147,e));var i=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(a){var s=i.refs;a===null?delete s[l]:s[l]=a},t._stringRef=l,t)}if(typeof e!="string")throw Error(H(284));if(!n._owner)throw Error(H(290,e))}return e}function Kl(e,t){throw e=Object.prototype.toString.call(t),Error(H(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ff(e){var t=e._init;return t(e._payload)}function Pm(e){function t(g,x){if(e){var y=g.deletions;y===null?(g.deletions=[x],g.flags|=16):y.push(x)}}function n(g,x){if(!e)return null;for(;x!==null;)t(g,x),x=x.sibling;return null}function r(g,x){for(g=new Map;x!==null;)x.key!==null?g.set(x.key,x):g.set(x.index,x),x=x.sibling;return g}function i(g,x){return g=or(g,x),g.index=0,g.sibling=null,g}function l(g,x,y){return g.index=y,e?(y=g.alternate,y!==null?(y=y.index,y<x?(g.flags|=2,x):y):(g.flags|=2,x)):(g.flags|=1048576,x)}function a(g){return e&&g.alternate===null&&(g.flags|=2),g}function s(g,x,y,C){return x===null||x.tag!==6?(x=uo(y,g.mode,C),x.return=g,x):(x=i(x,y),x.return=g,x)}function o(g,x,y,C){var E=y.type;return E===Yr?f(g,x,y.props.children,C,y.key):x!==null&&(x.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Xn&&ff(E)===x.type)?(C=i(x,y.props),C.ref=Di(g,x,y),C.return=g,C):(C=wa(y.type,y.key,y.props,null,g.mode,C),C.ref=Di(g,x,y),C.return=g,C)}function c(g,x,y,C){return x===null||x.tag!==4||x.stateNode.containerInfo!==y.containerInfo||x.stateNode.implementation!==y.implementation?(x=co(y,g.mode,C),x.return=g,x):(x=i(x,y.children||[]),x.return=g,x)}function f(g,x,y,C,E){return x===null||x.tag!==7?(x=Tr(y,g.mode,C,E),x.return=g,x):(x=i(x,y),x.return=g,x)}function d(g,x,y){if(typeof x=="string"&&x!==""||typeof x=="number")return x=uo(""+x,g.mode,y),x.return=g,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Ml:return y=wa(x.type,x.key,x.props,null,g.mode,y),y.ref=Di(g,null,x),y.return=g,y;case qr:return x=co(x,g.mode,y),x.return=g,x;case Xn:var C=x._init;return d(g,C(x._payload),y)}if(Hi(x)||zi(x))return x=Tr(x,g.mode,y,null),x.return=g,x;Kl(g,x)}return null}function p(g,x,y,C){var E=x!==null?x.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return E!==null?null:s(g,x,""+y,C);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Ml:return y.key===E?o(g,x,y,C):null;case qr:return y.key===E?c(g,x,y,C):null;case Xn:return E=y._init,p(g,x,E(y._payload),C)}if(Hi(y)||zi(y))return E!==null?null:f(g,x,y,C,null);Kl(g,y)}return null}function h(g,x,y,C,E){if(typeof C=="string"&&C!==""||typeof C=="number")return g=g.get(y)||null,s(x,g,""+C,E);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Ml:return g=g.get(C.key===null?y:C.key)||null,o(x,g,C,E);case qr:return g=g.get(C.key===null?y:C.key)||null,c(x,g,C,E);case Xn:var b=C._init;return h(g,x,y,b(C._payload),E)}if(Hi(C)||zi(C))return g=g.get(y)||null,f(x,g,C,E,null);Kl(x,C)}return null}function m(g,x,y,C){for(var E=null,b=null,T=x,_=x=0,R=null;T!==null&&_<y.length;_++){T.index>_?(R=T,T=null):R=T.sibling;var N=p(g,T,y[_],C);if(N===null){T===null&&(T=R);break}e&&T&&N.alternate===null&&t(g,T),x=l(N,x,_),b===null?E=N:b.sibling=N,b=N,T=R}if(_===y.length)return n(g,T),Xe&&vr(g,_),E;if(T===null){for(;_<y.length;_++)T=d(g,y[_],C),T!==null&&(x=l(T,x,_),b===null?E=T:b.sibling=T,b=T);return Xe&&vr(g,_),E}for(T=r(g,T);_<y.length;_++)R=h(T,g,_,y[_],C),R!==null&&(e&&R.alternate!==null&&T.delete(R.key===null?_:R.key),x=l(R,x,_),b===null?E=R:b.sibling=R,b=R);return e&&T.forEach(function(M){return t(g,M)}),Xe&&vr(g,_),E}function v(g,x,y,C){var E=zi(y);if(typeof E!="function")throw Error(H(150));if(y=E.call(y),y==null)throw Error(H(151));for(var b=E=null,T=x,_=x=0,R=null,N=y.next();T!==null&&!N.done;_++,N=y.next()){T.index>_?(R=T,T=null):R=T.sibling;var M=p(g,T,N.value,C);if(M===null){T===null&&(T=R);break}e&&T&&M.alternate===null&&t(g,T),x=l(M,x,_),b===null?E=M:b.sibling=M,b=M,T=R}if(N.done)return n(g,T),Xe&&vr(g,_),E;if(T===null){for(;!N.done;_++,N=y.next())N=d(g,N.value,C),N!==null&&(x=l(N,x,_),b===null?E=N:b.sibling=N,b=N);return Xe&&vr(g,_),E}for(T=r(g,T);!N.done;_++,N=y.next())N=h(T,g,_,N.value,C),N!==null&&(e&&N.alternate!==null&&T.delete(N.key===null?_:N.key),x=l(N,x,_),b===null?E=N:b.sibling=N,b=N);return e&&T.forEach(function($){return t(g,$)}),Xe&&vr(g,_),E}function w(g,x,y,C){if(typeof y=="object"&&y!==null&&y.type===Yr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Ml:e:{for(var E=y.key,b=x;b!==null;){if(b.key===E){if(E=y.type,E===Yr){if(b.tag===7){n(g,b.sibling),x=i(b,y.props.children),x.return=g,g=x;break e}}else if(b.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Xn&&ff(E)===b.type){n(g,b.sibling),x=i(b,y.props),x.ref=Di(g,b,y),x.return=g,g=x;break e}n(g,b);break}else t(g,b);b=b.sibling}y.type===Yr?(x=Tr(y.props.children,g.mode,C,y.key),x.return=g,g=x):(C=wa(y.type,y.key,y.props,null,g.mode,C),C.ref=Di(g,x,y),C.return=g,g=C)}return a(g);case qr:e:{for(b=y.key;x!==null;){if(x.key===b)if(x.tag===4&&x.stateNode.containerInfo===y.containerInfo&&x.stateNode.implementation===y.implementation){n(g,x.sibling),x=i(x,y.children||[]),x.return=g,g=x;break e}else{n(g,x);break}else t(g,x);x=x.sibling}x=co(y,g.mode,C),x.return=g,g=x}return a(g);case Xn:return b=y._init,w(g,x,b(y._payload),C)}if(Hi(y))return m(g,x,y,C);if(zi(y))return v(g,x,y,C);Kl(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,x!==null&&x.tag===6?(n(g,x.sibling),x=i(x,y),x.return=g,g=x):(n(g,x),x=uo(y,g.mode,C),x.return=g,g=x),a(g)):n(g,x)}return w}var xi=Pm(!0),Rm=Pm(!1),$a=pr(null),Ba=null,ni=null,wc=null;function bc(){wc=ni=Ba=null}function kc(e){var t=$a.current;Ge($a),e._currentValue=t}function gu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function di(e,t){Ba=e,wc=ni=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Bt=!0),e.firstContext=null)}function sn(e){var t=e._currentValue;if(wc!==e)if(e={context:e,memoizedValue:t,next:null},ni===null){if(Ba===null)throw Error(H(308));ni=e,Ba.dependencies={lanes:0,firstContext:e}}else ni=ni.next=e;return t}var Er=null;function Sc(e){Er===null?Er=[e]:Er.push(e)}function Im(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Sc(t)):(n.next=i.next,i.next=n),t.interleaved=n,Bn(e,r)}function Bn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Kn=!1;function Ec(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Am(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function On(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function lr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ie&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Bn(e,n)}return i=r.interleaved,i===null?(t.next=t,Sc(r)):(t.next=i.next,i.next=t),r.interleaved=t,Bn(e,n)}function ha(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,uc(e,n)}}function pf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?i=l=a:l=l.next=a,n=n.next}while(n!==null);l===null?i=l=t:l=l.next=t}else i=l=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ha(e,t,n,r){var i=e.updateQueue;Kn=!1;var l=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var o=s,c=o.next;o.next=null,a===null?l=c:a.next=c,a=o;var f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==a&&(s===null?f.firstBaseUpdate=c:s.next=c,f.lastBaseUpdate=o))}if(l!==null){var d=i.baseState;a=0,f=c=o=null,s=l;do{var p=s.lane,h=s.eventTime;if((r&p)===p){f!==null&&(f=f.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,v=s;switch(p=t,h=n,v.tag){case 1:if(m=v.payload,typeof m=="function"){d=m.call(h,d,p);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=v.payload,p=typeof m=="function"?m.call(h,d,p):m,p==null)break e;d=nt({},d,p);break e;case 2:Kn=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[s]:p.push(s))}else h={eventTime:h,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(c=f=h,o=d):f=f.next=h,a|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(f===null&&(o=d),i.baseState=o,i.firstBaseUpdate=c,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else l===null&&(i.shared.lanes=0);Ir|=a,e.lanes=a,e.memoizedState=d}}function hf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(H(191,i));i.call(r)}}}var Tl={},Nn=pr(Tl),ml=pr(Tl),gl=pr(Tl);function jr(e){if(e===Tl)throw Error(H(174));return e}function jc(e,t){switch(Ue(gl,t),Ue(ml,e),Ue(Nn,Tl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ko(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ko(t,e)}Ge(Nn),Ue(Nn,t)}function vi(){Ge(Nn),Ge(ml),Ge(gl)}function Dm(e){jr(gl.current);var t=jr(Nn.current),n=Ko(t,e.type);t!==n&&(Ue(ml,e),Ue(Nn,n))}function Cc(e){ml.current===e&&(Ge(Nn),Ge(ml))}var et=pr(0);function Ua(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ro=[];function Nc(){for(var e=0;e<ro.length;e++)ro[e]._workInProgressVersionPrimary=null;ro.length=0}var ma=Un.ReactCurrentDispatcher,io=Un.ReactCurrentBatchConfig,Rr=0,tt=null,gt=null,vt=null,Wa=!1,Qi=!1,yl=0,Sw=0;function Ct(){throw Error(H(321))}function Tc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vn(e[n],t[n]))return!1;return!0}function _c(e,t,n,r,i,l){if(Rr=l,tt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ma.current=e===null||e.memoizedState===null?Nw:Tw,e=n(r,i),Qi){l=0;do{if(Qi=!1,yl=0,25<=l)throw Error(H(301));l+=1,vt=gt=null,t.updateQueue=null,ma.current=_w,e=n(r,i)}while(Qi)}if(ma.current=Va,t=gt!==null&&gt.next!==null,Rr=0,vt=gt=tt=null,Wa=!1,t)throw Error(H(300));return e}function zc(){var e=yl!==0;return yl=0,e}function bn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vt===null?tt.memoizedState=vt=e:vt=vt.next=e,vt}function on(){if(gt===null){var e=tt.alternate;e=e!==null?e.memoizedState:null}else e=gt.next;var t=vt===null?tt.memoizedState:vt.next;if(t!==null)vt=t,gt=e;else{if(e===null)throw Error(H(310));gt=e,e={memoizedState:gt.memoizedState,baseState:gt.baseState,baseQueue:gt.baseQueue,queue:gt.queue,next:null},vt===null?tt.memoizedState=vt=e:vt=vt.next=e}return vt}function xl(e,t){return typeof t=="function"?t(e):t}function lo(e){var t=on(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=gt,i=r.baseQueue,l=n.pending;if(l!==null){if(i!==null){var a=i.next;i.next=l.next,l.next=a}r.baseQueue=i=l,n.pending=null}if(i!==null){l=i.next,r=r.baseState;var s=a=null,o=null,c=l;do{var f=c.lane;if((Rr&f)===f)o!==null&&(o=o.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};o===null?(s=o=d,a=r):o=o.next=d,tt.lanes|=f,Ir|=f}c=c.next}while(c!==null&&c!==l);o===null?a=r:o.next=s,vn(r,t.memoizedState)||(Bt=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=o,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do l=i.lane,tt.lanes|=l,Ir|=l,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ao(e){var t=on(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,l=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do l=e(l,a.action),a=a.next;while(a!==i);vn(l,t.memoizedState)||(Bt=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function Lm(){}function Om(e,t){var n=tt,r=on(),i=t(),l=!vn(r.memoizedState,i);if(l&&(r.memoizedState=i,Bt=!0),r=r.queue,Pc($m.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||vt!==null&&vt.memoizedState.tag&1){if(n.flags|=2048,vl(9,Mm.bind(null,n,r,i,t),void 0,null),wt===null)throw Error(H(349));Rr&30||Fm(n,t,i)}return i}function Fm(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=tt.updateQueue,t===null?(t={lastEffect:null,stores:null},tt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Mm(e,t,n,r){t.value=n,t.getSnapshot=r,Bm(t)&&Hm(e)}function $m(e,t,n){return n(function(){Bm(t)&&Hm(e)})}function Bm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!vn(e,n)}catch{return!0}}function Hm(e){var t=Bn(e,1);t!==null&&gn(t,e,1,-1)}function mf(e){var t=bn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:xl,lastRenderedState:e},t.queue=e,e=e.dispatch=Cw.bind(null,tt,e),[t.memoizedState,e]}function vl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=tt.updateQueue,t===null?(t={lastEffect:null,stores:null},tt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Um(){return on().memoizedState}function ga(e,t,n,r){var i=bn();tt.flags|=e,i.memoizedState=vl(1|t,n,void 0,r===void 0?null:r)}function fs(e,t,n,r){var i=on();r=r===void 0?null:r;var l=void 0;if(gt!==null){var a=gt.memoizedState;if(l=a.destroy,r!==null&&Tc(r,a.deps)){i.memoizedState=vl(t,n,l,r);return}}tt.flags|=e,i.memoizedState=vl(1|t,n,l,r)}function gf(e,t){return ga(8390656,8,e,t)}function Pc(e,t){return fs(2048,8,e,t)}function Wm(e,t){return fs(4,2,e,t)}function Vm(e,t){return fs(4,4,e,t)}function Gm(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function qm(e,t,n){return n=n!=null?n.concat([e]):null,fs(4,4,Gm.bind(null,t,e),n)}function Rc(){}function Ym(e,t){var n=on();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tc(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Xm(e,t){var n=on();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tc(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Km(e,t,n){return Rr&21?(vn(n,t)||(n=tm(),tt.lanes|=n,Ir|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Bt=!0),e.memoizedState=n)}function Ew(e,t){var n=Oe;Oe=n!==0&&4>n?n:4,e(!0);var r=io.transition;io.transition={};try{e(!1),t()}finally{Oe=n,io.transition=r}}function Qm(){return on().memoizedState}function jw(e,t,n){var r=sr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Zm(e))Jm(t,n);else if(n=Im(e,t,n,r),n!==null){var i=Dt();gn(n,e,r,i),eg(n,t,r)}}function Cw(e,t,n){var r=sr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Zm(e))Jm(t,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var a=t.lastRenderedState,s=l(a,n);if(i.hasEagerState=!0,i.eagerState=s,vn(s,a)){var o=t.interleaved;o===null?(i.next=i,Sc(t)):(i.next=o.next,o.next=i),t.interleaved=i;return}}catch{}finally{}n=Im(e,t,i,r),n!==null&&(i=Dt(),gn(n,e,r,i),eg(n,t,r))}}function Zm(e){var t=e.alternate;return e===tt||t!==null&&t===tt}function Jm(e,t){Qi=Wa=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function eg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,uc(e,n)}}var Va={readContext:sn,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useInsertionEffect:Ct,useLayoutEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useMutableSource:Ct,useSyncExternalStore:Ct,useId:Ct,unstable_isNewReconciler:!1},Nw={readContext:sn,useCallback:function(e,t){return bn().memoizedState=[e,t===void 0?null:t],e},useContext:sn,useEffect:gf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ga(4194308,4,Gm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ga(4194308,4,e,t)},useInsertionEffect:function(e,t){return ga(4,2,e,t)},useMemo:function(e,t){var n=bn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=bn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=jw.bind(null,tt,e),[r.memoizedState,e]},useRef:function(e){var t=bn();return e={current:e},t.memoizedState=e},useState:mf,useDebugValue:Rc,useDeferredValue:function(e){return bn().memoizedState=e},useTransition:function(){var e=mf(!1),t=e[0];return e=Ew.bind(null,e[1]),bn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=tt,i=bn();if(Xe){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),wt===null)throw Error(H(349));Rr&30||Fm(r,t,n)}i.memoizedState=n;var l={value:n,getSnapshot:t};return i.queue=l,gf($m.bind(null,r,l,e),[e]),r.flags|=2048,vl(9,Mm.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=bn(),t=wt.identifierPrefix;if(Xe){var n=Ln,r=Dn;n=(r&~(1<<32-mn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=yl++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Sw++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Tw={readContext:sn,useCallback:Ym,useContext:sn,useEffect:Pc,useImperativeHandle:qm,useInsertionEffect:Wm,useLayoutEffect:Vm,useMemo:Xm,useReducer:lo,useRef:Um,useState:function(){return lo(xl)},useDebugValue:Rc,useDeferredValue:function(e){var t=on();return Km(t,gt.memoizedState,e)},useTransition:function(){var e=lo(xl)[0],t=on().memoizedState;return[e,t]},useMutableSource:Lm,useSyncExternalStore:Om,useId:Qm,unstable_isNewReconciler:!1},_w={readContext:sn,useCallback:Ym,useContext:sn,useEffect:Pc,useImperativeHandle:qm,useInsertionEffect:Wm,useLayoutEffect:Vm,useMemo:Xm,useReducer:ao,useRef:Um,useState:function(){return ao(xl)},useDebugValue:Rc,useDeferredValue:function(e){var t=on();return gt===null?t.memoizedState=e:Km(t,gt.memoizedState,e)},useTransition:function(){var e=ao(xl)[0],t=on().memoizedState;return[e,t]},useMutableSource:Lm,useSyncExternalStore:Om,useId:Qm,unstable_isNewReconciler:!1};function fn(e,t){if(e&&e.defaultProps){t=nt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function yu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:nt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ps={isMounted:function(e){return(e=e._reactInternals)?Mr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Dt(),i=sr(e),l=On(r,i);l.payload=t,n!=null&&(l.callback=n),t=lr(e,l,i),t!==null&&(gn(t,e,i,r),ha(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Dt(),i=sr(e),l=On(r,i);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=lr(e,l,i),t!==null&&(gn(t,e,i,r),ha(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Dt(),r=sr(e),i=On(n,r);i.tag=2,t!=null&&(i.callback=t),t=lr(e,i,r),t!==null&&(gn(t,e,r,n),ha(t,e,r))}};function yf(e,t,n,r,i,l,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,a):t.prototype&&t.prototype.isPureReactComponent?!dl(n,r)||!dl(i,l):!0}function tg(e,t,n){var r=!1,i=cr,l=t.contextType;return typeof l=="object"&&l!==null?l=sn(l):(i=Ut(t)?zr:Pt.current,r=t.contextTypes,l=(r=r!=null)?gi(e,i):cr),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ps,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=l),t}function xf(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ps.enqueueReplaceState(t,t.state,null)}function xu(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Ec(e);var l=t.contextType;typeof l=="object"&&l!==null?i.context=sn(l):(l=Ut(t)?zr:Pt.current,i.context=gi(e,l)),i.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(yu(e,t,l,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&ps.enqueueReplaceState(i,i.state,null),Ha(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function wi(e,t){try{var n="",r=t;do n+=rv(r),r=r.return;while(r);var i=n}catch(l){i=`
39
- Error generating stack: `+l.message+`
40
- `+l.stack}return{value:e,source:t,stack:i,digest:null}}function so(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function vu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var zw=typeof WeakMap=="function"?WeakMap:Map;function ng(e,t,n){n=On(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){qa||(qa=!0,_u=r),vu(e,t)},n}function rg(e,t,n){n=On(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){vu(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){vu(e,t),typeof r!="function"&&(ar===null?ar=new Set([this]):ar.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function vf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zw;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Ww.bind(null,e,t,n),t.then(e,e))}function wf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function bf(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=On(-1,1),t.tag=2,lr(n,t,1))),n.lanes|=1),e)}var Pw=Un.ReactCurrentOwner,Bt=!1;function It(e,t,n,r){t.child=e===null?Rm(t,null,n,r):xi(t,e.child,n,r)}function kf(e,t,n,r,i){n=n.render;var l=t.ref;return di(t,i),r=_c(e,t,n,r,l,i),n=zc(),e!==null&&!Bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Hn(e,t,i)):(Xe&&n&&yc(t),t.flags|=1,It(e,t,r,i),t.child)}function Sf(e,t,n,r,i){if(e===null){var l=n.type;return typeof l=="function"&&!$c(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,ig(e,t,l,r,i)):(e=wa(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&i)){var a=l.memoizedProps;if(n=n.compare,n=n!==null?n:dl,n(a,r)&&e.ref===t.ref)return Hn(e,t,i)}return t.flags|=1,e=or(l,r),e.ref=t.ref,e.return=t,t.child=e}function ig(e,t,n,r,i){if(e!==null){var l=e.memoizedProps;if(dl(l,r)&&e.ref===t.ref)if(Bt=!1,t.pendingProps=r=l,(e.lanes&i)!==0)e.flags&131072&&(Bt=!0);else return t.lanes=e.lanes,Hn(e,t,i)}return wu(e,t,n,r,i)}function lg(e,t,n){var r=t.pendingProps,i=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ue(ii,Yt),Yt|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ue(ii,Yt),Yt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,Ue(ii,Yt),Yt|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,Ue(ii,Yt),Yt|=r;return It(e,t,i,n),t.child}function ag(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function wu(e,t,n,r,i){var l=Ut(n)?zr:Pt.current;return l=gi(t,l),di(t,i),n=_c(e,t,n,r,l,i),r=zc(),e!==null&&!Bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Hn(e,t,i)):(Xe&&r&&yc(t),t.flags|=1,It(e,t,n,i),t.child)}function Ef(e,t,n,r,i){if(Ut(n)){var l=!0;Oa(t)}else l=!1;if(di(t,i),t.stateNode===null)ya(e,t),tg(t,n,r),xu(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var o=a.context,c=n.contextType;typeof c=="object"&&c!==null?c=sn(c):(c=Ut(n)?zr:Pt.current,c=gi(t,c));var f=n.getDerivedStateFromProps,d=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||o!==c)&&xf(t,a,r,c),Kn=!1;var p=t.memoizedState;a.state=p,Ha(t,r,a,i),o=t.memoizedState,s!==r||p!==o||Ht.current||Kn?(typeof f=="function"&&(yu(t,n,f,r),o=t.memoizedState),(s=Kn||yf(t,n,s,r,p,o,c))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=o),a.props=r,a.state=o,a.context=c,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Am(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:fn(t.type,s),a.props=c,d=t.pendingProps,p=a.context,o=n.contextType,typeof o=="object"&&o!==null?o=sn(o):(o=Ut(n)?zr:Pt.current,o=gi(t,o));var h=n.getDerivedStateFromProps;(f=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==d||p!==o)&&xf(t,a,r,o),Kn=!1,p=t.memoizedState,a.state=p,Ha(t,r,a,i);var m=t.memoizedState;s!==d||p!==m||Ht.current||Kn?(typeof h=="function"&&(yu(t,n,h,r),m=t.memoizedState),(c=Kn||yf(t,n,c,r,p,m,o)||!1)?(f||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,m,o),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,m,o)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),a.props=r,a.state=m,a.context=o,r=c):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return bu(e,t,n,r,l,i)}function bu(e,t,n,r,i,l){ag(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&uf(t,n,!1),Hn(e,t,l);r=t.stateNode,Pw.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=xi(t,e.child,null,l),t.child=xi(t,null,s,l)):It(e,t,s,l),t.memoizedState=r.state,i&&uf(t,n,!0),t.child}function sg(e){var t=e.stateNode;t.pendingContext?of(e,t.pendingContext,t.pendingContext!==t.context):t.context&&of(e,t.context,!1),jc(e,t.containerInfo)}function jf(e,t,n,r,i){return yi(),vc(i),t.flags|=256,It(e,t,n,r),t.child}var ku={dehydrated:null,treeContext:null,retryLane:0};function Su(e){return{baseLanes:e,cachePool:null,transitions:null}}function og(e,t,n){var r=t.pendingProps,i=et.current,l=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Ue(et,i&1),e===null)return mu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,l?(r=t.mode,l=t.child,a={mode:"hidden",children:a},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=a):l=gs(a,r,0,null),e=Tr(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Su(n),t.memoizedState=ku,e):Ic(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return Rw(e,t,a,r,s,i,n);if(l){l=r.fallback,a=t.mode,i=e.child,s=i.sibling;var o={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=o,t.deletions=null):(r=or(i,o),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?l=or(s,l):(l=Tr(l,a,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,a=e.child.memoizedState,a=a===null?Su(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},l.memoizedState=a,l.childLanes=e.childLanes&~n,t.memoizedState=ku,r}return l=e.child,e=l.sibling,r=or(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Ic(e,t){return t=gs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ql(e,t,n,r){return r!==null&&vc(r),xi(t,e.child,null,n),e=Ic(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Rw(e,t,n,r,i,l,a){if(n)return t.flags&256?(t.flags&=-257,r=so(Error(H(422))),Ql(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,i=t.mode,r=gs({mode:"visible",children:r.children},i,0,null),l=Tr(l,i,a,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&xi(t,e.child,null,a),t.child.memoizedState=Su(a),t.memoizedState=ku,l);if(!(t.mode&1))return Ql(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,l=Error(H(419)),r=so(l,r,void 0),Ql(e,t,a,r)}if(s=(a&e.childLanes)!==0,Bt||s){if(r=wt,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==l.retryLane&&(l.retryLane=i,Bn(e,i),gn(r,e,i,-1))}return Mc(),r=so(Error(H(421))),Ql(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Vw.bind(null,e),i._reactRetry=t,null):(e=l.treeContext,Xt=ir(i.nextSibling),Kt=t,Xe=!0,hn=null,e!==null&&(tn[nn++]=Dn,tn[nn++]=Ln,tn[nn++]=Pr,Dn=e.id,Ln=e.overflow,Pr=t),t=Ic(t,r.children),t.flags|=4096,t)}function Cf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),gu(e.return,t,n)}function oo(e,t,n,r,i){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=i)}function ug(e,t,n){var r=t.pendingProps,i=r.revealOrder,l=r.tail;if(It(e,t,r.children,n),r=et.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Cf(e,n,t);else if(e.tag===19)Cf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ue(et,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ua(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),oo(t,!1,i,n,l);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ua(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}oo(t,!0,n,null,l);break;case"together":oo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ya(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Hn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ir|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(H(153));if(t.child!==null){for(e=t.child,n=or(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=or(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Iw(e,t,n){switch(t.tag){case 3:sg(t),yi();break;case 5:Dm(t);break;case 1:Ut(t.type)&&Oa(t);break;case 4:jc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ue($a,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ue(et,et.current&1),t.flags|=128,null):n&t.child.childLanes?og(e,t,n):(Ue(et,et.current&1),e=Hn(e,t,n),e!==null?e.sibling:null);Ue(et,et.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return ug(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ue(et,et.current),r)break;return null;case 22:case 23:return t.lanes=0,lg(e,t,n)}return Hn(e,t,n)}var cg,Eu,dg,fg;cg=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Eu=function(){};dg=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,jr(Nn.current);var l=null;switch(n){case"input":i=Go(e,i),r=Go(e,r),l=[];break;case"select":i=nt({},i,{value:void 0}),r=nt({},r,{value:void 0}),l=[];break;case"textarea":i=Xo(e,i),r=Xo(e,r),l=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Da)}Qo(n,r);var a;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var s=i[c];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(il.hasOwnProperty(c)?l||(l=[]):(l=l||[]).push(c,null));for(c in r){var o=r[c];if(s=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&o!==s&&(o!=null||s!=null))if(c==="style")if(s){for(a in s)!s.hasOwnProperty(a)||o&&o.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in o)o.hasOwnProperty(a)&&s[a]!==o[a]&&(n||(n={}),n[a]=o[a])}else n||(l||(l=[]),l.push(c,n)),n=o;else c==="dangerouslySetInnerHTML"?(o=o?o.__html:void 0,s=s?s.__html:void 0,o!=null&&s!==o&&(l=l||[]).push(c,o)):c==="children"?typeof o!="string"&&typeof o!="number"||(l=l||[]).push(c,""+o):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(il.hasOwnProperty(c)?(o!=null&&c==="onScroll"&&Ve("scroll",e),l||s===o||(l=[])):(l=l||[]).push(c,o))}n&&(l=l||[]).push("style",n);var c=l;(t.updateQueue=c)&&(t.flags|=4)}};fg=function(e,t,n,r){n!==r&&(t.flags|=4)};function Li(e,t){if(!Xe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Nt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Aw(e,t,n){var r=t.pendingProps;switch(xc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nt(t),null;case 1:return Ut(t.type)&&La(),Nt(t),null;case 3:return r=t.stateNode,vi(),Ge(Ht),Ge(Pt),Nc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Xl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,hn!==null&&(Ru(hn),hn=null))),Eu(e,t),Nt(t),null;case 5:Cc(t);var i=jr(gl.current);if(n=t.type,e!==null&&t.stateNode!=null)dg(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(H(166));return Nt(t),null}if(e=jr(Nn.current),Xl(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[jn]=t,r[hl]=l,e=(t.mode&1)!==0,n){case"dialog":Ve("cancel",r),Ve("close",r);break;case"iframe":case"object":case"embed":Ve("load",r);break;case"video":case"audio":for(i=0;i<Wi.length;i++)Ve(Wi[i],r);break;case"source":Ve("error",r);break;case"img":case"image":case"link":Ve("error",r),Ve("load",r);break;case"details":Ve("toggle",r);break;case"input":Ad(r,l),Ve("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},Ve("invalid",r);break;case"textarea":Ld(r,l),Ve("invalid",r)}Qo(n,l),i=null;for(var a in l)if(l.hasOwnProperty(a)){var s=l[a];a==="children"?typeof s=="string"?r.textContent!==s&&(l.suppressHydrationWarning!==!0&&Yl(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(l.suppressHydrationWarning!==!0&&Yl(r.textContent,s,e),i=["children",""+s]):il.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&Ve("scroll",r)}switch(n){case"input":$l(r),Dd(r,l,!0);break;case"textarea":$l(r),Od(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=Da)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=$h(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[jn]=t,e[hl]=r,cg(e,t,!1,!1),t.stateNode=e;e:{switch(a=Zo(n,r),n){case"dialog":Ve("cancel",e),Ve("close",e),i=r;break;case"iframe":case"object":case"embed":Ve("load",e),i=r;break;case"video":case"audio":for(i=0;i<Wi.length;i++)Ve(Wi[i],e);i=r;break;case"source":Ve("error",e),i=r;break;case"img":case"image":case"link":Ve("error",e),Ve("load",e),i=r;break;case"details":Ve("toggle",e),i=r;break;case"input":Ad(e,r),i=Go(e,r),Ve("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=nt({},r,{value:void 0}),Ve("invalid",e);break;case"textarea":Ld(e,r),i=Xo(e,r),Ve("invalid",e);break;default:i=r}Qo(n,i),s=i;for(l in s)if(s.hasOwnProperty(l)){var o=s[l];l==="style"?Uh(e,o):l==="dangerouslySetInnerHTML"?(o=o?o.__html:void 0,o!=null&&Bh(e,o)):l==="children"?typeof o=="string"?(n!=="textarea"||o!=="")&&ll(e,o):typeof o=="number"&&ll(e,""+o):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(il.hasOwnProperty(l)?o!=null&&l==="onScroll"&&Ve("scroll",e):o!=null&&rc(e,l,o,a))}switch(n){case"input":$l(e),Dd(e,r,!1);break;case"textarea":$l(e),Od(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ur(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?si(e,!!r.multiple,l,!1):r.defaultValue!=null&&si(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Da)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Nt(t),null;case 6:if(e&&t.stateNode!=null)fg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(H(166));if(n=jr(gl.current),jr(Nn.current),Xl(t)){if(r=t.stateNode,n=t.memoizedProps,r[jn]=t,(l=r.nodeValue!==n)&&(e=Kt,e!==null))switch(e.tag){case 3:Yl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Yl(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[jn]=t,t.stateNode=r}return Nt(t),null;case 13:if(Ge(et),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Xe&&Xt!==null&&t.mode&1&&!(t.flags&128))zm(),yi(),t.flags|=98560,l=!1;else if(l=Xl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(H(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(H(317));l[jn]=t}else yi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nt(t),l=!1}else hn!==null&&(Ru(hn),hn=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||et.current&1?yt===0&&(yt=3):Mc())),t.updateQueue!==null&&(t.flags|=4),Nt(t),null);case 4:return vi(),Eu(e,t),e===null&&fl(t.stateNode.containerInfo),Nt(t),null;case 10:return kc(t.type._context),Nt(t),null;case 17:return Ut(t.type)&&La(),Nt(t),null;case 19:if(Ge(et),l=t.memoizedState,l===null)return Nt(t),null;if(r=(t.flags&128)!==0,a=l.rendering,a===null)if(r)Li(l,!1);else{if(yt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Ua(e),a!==null){for(t.flags|=128,Li(l,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,a=l.alternate,a===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=a.childLanes,l.lanes=a.lanes,l.child=a.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=a.memoizedProps,l.memoizedState=a.memoizedState,l.updateQueue=a.updateQueue,l.type=a.type,e=a.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ue(et,et.current&1|2),t.child}e=e.sibling}l.tail!==null&&st()>bi&&(t.flags|=128,r=!0,Li(l,!1),t.lanes=4194304)}else{if(!r)if(e=Ua(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Li(l,!0),l.tail===null&&l.tailMode==="hidden"&&!a.alternate&&!Xe)return Nt(t),null}else 2*st()-l.renderingStartTime>bi&&n!==1073741824&&(t.flags|=128,r=!0,Li(l,!1),t.lanes=4194304);l.isBackwards?(a.sibling=t.child,t.child=a):(n=l.last,n!==null?n.sibling=a:t.child=a,l.last=a)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=st(),t.sibling=null,n=et.current,Ue(et,r?n&1|2:n&1),t):(Nt(t),null);case 22:case 23:return Fc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Yt&1073741824&&(Nt(t),t.subtreeFlags&6&&(t.flags|=8192)):Nt(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function Dw(e,t){switch(xc(t),t.tag){case 1:return Ut(t.type)&&La(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vi(),Ge(Ht),Ge(Pt),Nc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Cc(t),null;case 13:if(Ge(et),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));yi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ge(et),null;case 4:return vi(),null;case 10:return kc(t.type._context),null;case 22:case 23:return Fc(),null;case 24:return null;default:return null}}var Zl=!1,_t=!1,Lw=typeof WeakSet=="function"?WeakSet:Set,ee=null;function ri(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){lt(e,t,r)}else n.current=null}function ju(e,t,n){try{n()}catch(r){lt(e,t,r)}}var Nf=!1;function Ow(e,t){if(ou=Ra,e=ym(),gc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var a=0,s=-1,o=-1,c=0,f=0,d=e,p=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(s=a+i),d!==l||r!==0&&d.nodeType!==3||(o=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(h=d.firstChild)!==null;)p=d,d=h;for(;;){if(d===e)break t;if(p===n&&++c===i&&(s=a),p===l&&++f===r&&(o=a),(h=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=h}n=s===-1||o===-1?null:{start:s,end:o}}else n=null}n=n||{start:0,end:0}}else n=null;for(uu={focusedElem:e,selectionRange:n},Ra=!1,ee=t;ee!==null;)if(t=ee,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ee=e;else for(;ee!==null;){t=ee;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var v=m.memoizedProps,w=m.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?v:fn(t.type,v),w);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(H(163))}}catch(C){lt(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,ee=e;break}ee=t.return}return m=Nf,Nf=!1,m}function Zi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.destroy;i.destroy=void 0,l!==void 0&&ju(t,n,l)}i=i.next}while(i!==r)}}function hs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Cu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function pg(e){var t=e.alternate;t!==null&&(e.alternate=null,pg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[jn],delete t[hl],delete t[fu],delete t[vw],delete t[ww])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function hg(e){return e.tag===5||e.tag===3||e.tag===4}function Tf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Nu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Da));else if(r!==4&&(e=e.child,e!==null))for(Nu(e,t,n),e=e.sibling;e!==null;)Nu(e,t,n),e=e.sibling}function Tu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Tu(e,t,n),e=e.sibling;e!==null;)Tu(e,t,n),e=e.sibling}var kt=null,pn=!1;function Vn(e,t,n){for(n=n.child;n!==null;)mg(e,t,n),n=n.sibling}function mg(e,t,n){if(Cn&&typeof Cn.onCommitFiberUnmount=="function")try{Cn.onCommitFiberUnmount(as,n)}catch{}switch(n.tag){case 5:_t||ri(n,t);case 6:var r=kt,i=pn;kt=null,Vn(e,t,n),kt=r,pn=i,kt!==null&&(pn?(e=kt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):kt.removeChild(n.stateNode));break;case 18:kt!==null&&(pn?(e=kt,n=n.stateNode,e.nodeType===8?to(e.parentNode,n):e.nodeType===1&&to(e,n),ul(e)):to(kt,n.stateNode));break;case 4:r=kt,i=pn,kt=n.stateNode.containerInfo,pn=!0,Vn(e,t,n),kt=r,pn=i;break;case 0:case 11:case 14:case 15:if(!_t&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,a=l.destroy;l=l.tag,a!==void 0&&(l&2||l&4)&&ju(n,t,a),i=i.next}while(i!==r)}Vn(e,t,n);break;case 1:if(!_t&&(ri(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){lt(n,t,s)}Vn(e,t,n);break;case 21:Vn(e,t,n);break;case 22:n.mode&1?(_t=(r=_t)||n.memoizedState!==null,Vn(e,t,n),_t=r):Vn(e,t,n);break;default:Vn(e,t,n)}}function _f(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Lw),t.forEach(function(r){var i=Gw.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function cn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var l=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:kt=s.stateNode,pn=!1;break e;case 3:kt=s.stateNode.containerInfo,pn=!0;break e;case 4:kt=s.stateNode.containerInfo,pn=!0;break e}s=s.return}if(kt===null)throw Error(H(160));mg(l,a,i),kt=null,pn=!1;var o=i.alternate;o!==null&&(o.return=null),i.return=null}catch(c){lt(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)gg(t,e),t=t.sibling}function gg(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(cn(t,e),wn(e),r&4){try{Zi(3,e,e.return),hs(3,e)}catch(v){lt(e,e.return,v)}try{Zi(5,e,e.return)}catch(v){lt(e,e.return,v)}}break;case 1:cn(t,e),wn(e),r&512&&n!==null&&ri(n,n.return);break;case 5:if(cn(t,e),wn(e),r&512&&n!==null&&ri(n,n.return),e.flags&32){var i=e.stateNode;try{ll(i,"")}catch(v){lt(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var l=e.memoizedProps,a=n!==null?n.memoizedProps:l,s=e.type,o=e.updateQueue;if(e.updateQueue=null,o!==null)try{s==="input"&&l.type==="radio"&&l.name!=null&&Fh(i,l),Zo(s,a);var c=Zo(s,l);for(a=0;a<o.length;a+=2){var f=o[a],d=o[a+1];f==="style"?Uh(i,d):f==="dangerouslySetInnerHTML"?Bh(i,d):f==="children"?ll(i,d):rc(i,f,d,c)}switch(s){case"input":qo(i,l);break;case"textarea":Mh(i,l);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!l.multiple;var h=l.value;h!=null?si(i,!!l.multiple,h,!1):p!==!!l.multiple&&(l.defaultValue!=null?si(i,!!l.multiple,l.defaultValue,!0):si(i,!!l.multiple,l.multiple?[]:"",!1))}i[hl]=l}catch(v){lt(e,e.return,v)}}break;case 6:if(cn(t,e),wn(e),r&4){if(e.stateNode===null)throw Error(H(162));i=e.stateNode,l=e.memoizedProps;try{i.nodeValue=l}catch(v){lt(e,e.return,v)}}break;case 3:if(cn(t,e),wn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ul(t.containerInfo)}catch(v){lt(e,e.return,v)}break;case 4:cn(t,e),wn(e);break;case 13:cn(t,e),wn(e),i=e.child,i.flags&8192&&(l=i.memoizedState!==null,i.stateNode.isHidden=l,!l||i.alternate!==null&&i.alternate.memoizedState!==null||(Lc=st())),r&4&&_f(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(_t=(c=_t)||f,cn(t,e),_t=c):cn(t,e),wn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!f&&e.mode&1)for(ee=e,f=e.child;f!==null;){for(d=ee=f;ee!==null;){switch(p=ee,h=p.child,p.tag){case 0:case 11:case 14:case 15:Zi(4,p,p.return);break;case 1:ri(p,p.return);var m=p.stateNode;if(typeof m.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(v){lt(r,n,v)}}break;case 5:ri(p,p.return);break;case 22:if(p.memoizedState!==null){Pf(d);continue}}h!==null?(h.return=p,ee=h):Pf(d)}f=f.sibling}e:for(f=null,d=e;;){if(d.tag===5){if(f===null){f=d;try{i=d.stateNode,c?(l=i.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(s=d.stateNode,o=d.memoizedProps.style,a=o!=null&&o.hasOwnProperty("display")?o.display:null,s.style.display=Hh("display",a))}catch(v){lt(e,e.return,v)}}}else if(d.tag===6){if(f===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(v){lt(e,e.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:cn(t,e),wn(e),r&4&&_f(e);break;case 21:break;default:cn(t,e),wn(e)}}function wn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(hg(n)){var r=n;break e}n=n.return}throw Error(H(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ll(i,""),r.flags&=-33);var l=Tf(e);Tu(e,l,i);break;case 3:case 4:var a=r.stateNode.containerInfo,s=Tf(e);Nu(e,s,a);break;default:throw Error(H(161))}}catch(o){lt(e,e.return,o)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Fw(e,t,n){ee=e,yg(e)}function yg(e,t,n){for(var r=(e.mode&1)!==0;ee!==null;){var i=ee,l=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||Zl;if(!a){var s=i.alternate,o=s!==null&&s.memoizedState!==null||_t;s=Zl;var c=_t;if(Zl=a,(_t=o)&&!c)for(ee=i;ee!==null;)a=ee,o=a.child,a.tag===22&&a.memoizedState!==null?Rf(i):o!==null?(o.return=a,ee=o):Rf(i);for(;l!==null;)ee=l,yg(l),l=l.sibling;ee=i,Zl=s,_t=c}zf(e)}else i.subtreeFlags&8772&&l!==null?(l.return=i,ee=l):zf(e)}}function zf(e){for(;ee!==null;){var t=ee;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:_t||hs(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!_t)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:fn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&hf(t,l,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}hf(t,a,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var o=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":o.autoFocus&&n.focus();break;case"img":o.src&&(n.src=o.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var d=f.dehydrated;d!==null&&ul(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(H(163))}_t||t.flags&512&&Cu(t)}catch(p){lt(t,t.return,p)}}if(t===e){ee=null;break}if(n=t.sibling,n!==null){n.return=t.return,ee=n;break}ee=t.return}}function Pf(e){for(;ee!==null;){var t=ee;if(t===e){ee=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ee=n;break}ee=t.return}}function Rf(e){for(;ee!==null;){var t=ee;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{hs(4,t)}catch(o){lt(t,n,o)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(o){lt(t,i,o)}}var l=t.return;try{Cu(t)}catch(o){lt(t,l,o)}break;case 5:var a=t.return;try{Cu(t)}catch(o){lt(t,a,o)}}}catch(o){lt(t,t.return,o)}if(t===e){ee=null;break}var s=t.sibling;if(s!==null){s.return=t.return,ee=s;break}ee=t.return}}var Mw=Math.ceil,Ga=Un.ReactCurrentDispatcher,Ac=Un.ReactCurrentOwner,an=Un.ReactCurrentBatchConfig,Ie=0,wt=null,ft=null,St=0,Yt=0,ii=pr(0),yt=0,wl=null,Ir=0,ms=0,Dc=0,Ji=null,$t=null,Lc=0,bi=1/0,Rn=null,qa=!1,_u=null,ar=null,Jl=!1,er=null,Ya=0,el=0,zu=null,xa=-1,va=0;function Dt(){return Ie&6?st():xa!==-1?xa:xa=st()}function sr(e){return e.mode&1?Ie&2&&St!==0?St&-St:kw.transition!==null?(va===0&&(va=tm()),va):(e=Oe,e!==0||(e=window.event,e=e===void 0?16:om(e.type)),e):1}function gn(e,t,n,r){if(50<el)throw el=0,zu=null,Error(H(185));jl(e,n,r),(!(Ie&2)||e!==wt)&&(e===wt&&(!(Ie&2)&&(ms|=n),yt===4&&Zn(e,St)),Wt(e,r),n===1&&Ie===0&&!(t.mode&1)&&(bi=st()+500,ds&&hr()))}function Wt(e,t){var n=e.callbackNode;kv(e,t);var r=Pa(e,e===wt?St:0);if(r===0)n!==null&&$d(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&$d(n),t===1)e.tag===0?bw(If.bind(null,e)):Nm(If.bind(null,e)),yw(function(){!(Ie&6)&&hr()}),n=null;else{switch(nm(r)){case 1:n=oc;break;case 4:n=Jh;break;case 16:n=za;break;case 536870912:n=em;break;default:n=za}n=jg(n,xg.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function xg(e,t){if(xa=-1,va=0,Ie&6)throw Error(H(327));var n=e.callbackNode;if(fi()&&e.callbackNode!==n)return null;var r=Pa(e,e===wt?St:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Xa(e,r);else{t=r;var i=Ie;Ie|=2;var l=wg();(wt!==e||St!==t)&&(Rn=null,bi=st()+500,Nr(e,t));do try{Hw();break}catch(s){vg(e,s)}while(!0);bc(),Ga.current=l,Ie=i,ft!==null?t=0:(wt=null,St=0,t=yt)}if(t!==0){if(t===2&&(i=ru(e),i!==0&&(r=i,t=Pu(e,i))),t===1)throw n=wl,Nr(e,0),Zn(e,r),Wt(e,st()),n;if(t===6)Zn(e,r);else{if(i=e.current.alternate,!(r&30)&&!$w(i)&&(t=Xa(e,r),t===2&&(l=ru(e),l!==0&&(r=l,t=Pu(e,l))),t===1))throw n=wl,Nr(e,0),Zn(e,r),Wt(e,st()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(H(345));case 2:wr(e,$t,Rn);break;case 3:if(Zn(e,r),(r&130023424)===r&&(t=Lc+500-st(),10<t)){if(Pa(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Dt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=du(wr.bind(null,e,$t,Rn),t);break}wr(e,$t,Rn);break;case 4:if(Zn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-mn(r);l=1<<a,a=t[a],a>i&&(i=a),r&=~l}if(r=i,r=st()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Mw(r/1960))-r,10<r){e.timeoutHandle=du(wr.bind(null,e,$t,Rn),r);break}wr(e,$t,Rn);break;case 5:wr(e,$t,Rn);break;default:throw Error(H(329))}}}return Wt(e,st()),e.callbackNode===n?xg.bind(null,e):null}function Pu(e,t){var n=Ji;return e.current.memoizedState.isDehydrated&&(Nr(e,t).flags|=256),e=Xa(e,t),e!==2&&(t=$t,$t=n,t!==null&&Ru(t)),e}function Ru(e){$t===null?$t=e:$t.push.apply($t,e)}function $w(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],l=i.getSnapshot;i=i.value;try{if(!vn(l(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Zn(e,t){for(t&=~Dc,t&=~ms,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-mn(t),r=1<<n;e[n]=-1,t&=~r}}function If(e){if(Ie&6)throw Error(H(327));fi();var t=Pa(e,0);if(!(t&1))return Wt(e,st()),null;var n=Xa(e,t);if(e.tag!==0&&n===2){var r=ru(e);r!==0&&(t=r,n=Pu(e,r))}if(n===1)throw n=wl,Nr(e,0),Zn(e,t),Wt(e,st()),n;if(n===6)throw Error(H(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wr(e,$t,Rn),Wt(e,st()),null}function Oc(e,t){var n=Ie;Ie|=1;try{return e(t)}finally{Ie=n,Ie===0&&(bi=st()+500,ds&&hr())}}function Ar(e){er!==null&&er.tag===0&&!(Ie&6)&&fi();var t=Ie;Ie|=1;var n=an.transition,r=Oe;try{if(an.transition=null,Oe=1,e)return e()}finally{Oe=r,an.transition=n,Ie=t,!(Ie&6)&&hr()}}function Fc(){Yt=ii.current,Ge(ii)}function Nr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,gw(n)),ft!==null)for(n=ft.return;n!==null;){var r=n;switch(xc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&La();break;case 3:vi(),Ge(Ht),Ge(Pt),Nc();break;case 5:Cc(r);break;case 4:vi();break;case 13:Ge(et);break;case 19:Ge(et);break;case 10:kc(r.type._context);break;case 22:case 23:Fc()}n=n.return}if(wt=e,ft=e=or(e.current,null),St=Yt=t,yt=0,wl=null,Dc=ms=Ir=0,$t=Ji=null,Er!==null){for(t=0;t<Er.length;t++)if(n=Er[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,l=n.pending;if(l!==null){var a=l.next;l.next=i,r.next=a}n.pending=r}Er=null}return e}function vg(e,t){do{var n=ft;try{if(bc(),ma.current=Va,Wa){for(var r=tt.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Wa=!1}if(Rr=0,vt=gt=tt=null,Qi=!1,yl=0,Ac.current=null,n===null||n.return===null){yt=1,wl=t,ft=null;break}e:{var l=e,a=n.return,s=n,o=t;if(t=St,s.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){var c=o,f=s,d=f.tag;if(!(f.mode&1)&&(d===0||d===11||d===15)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=wf(a);if(h!==null){h.flags&=-257,bf(h,a,s,l,t),h.mode&1&&vf(l,c,t),t=h,o=c;var m=t.updateQueue;if(m===null){var v=new Set;v.add(o),t.updateQueue=v}else m.add(o);break e}else{if(!(t&1)){vf(l,c,t),Mc();break e}o=Error(H(426))}}else if(Xe&&s.mode&1){var w=wf(a);if(w!==null){!(w.flags&65536)&&(w.flags|=256),bf(w,a,s,l,t),vc(wi(o,s));break e}}l=o=wi(o,s),yt!==4&&(yt=2),Ji===null?Ji=[l]:Ji.push(l),l=a;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var g=ng(l,o,t);pf(l,g);break e;case 1:s=o;var x=l.type,y=l.stateNode;if(!(l.flags&128)&&(typeof x.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(ar===null||!ar.has(y)))){l.flags|=65536,t&=-t,l.lanes|=t;var C=rg(l,s,t);pf(l,C);break e}}l=l.return}while(l!==null)}kg(n)}catch(E){t=E,ft===n&&n!==null&&(ft=n=n.return);continue}break}while(!0)}function wg(){var e=Ga.current;return Ga.current=Va,e===null?Va:e}function Mc(){(yt===0||yt===3||yt===2)&&(yt=4),wt===null||!(Ir&268435455)&&!(ms&268435455)||Zn(wt,St)}function Xa(e,t){var n=Ie;Ie|=2;var r=wg();(wt!==e||St!==t)&&(Rn=null,Nr(e,t));do try{Bw();break}catch(i){vg(e,i)}while(!0);if(bc(),Ie=n,Ga.current=r,ft!==null)throw Error(H(261));return wt=null,St=0,yt}function Bw(){for(;ft!==null;)bg(ft)}function Hw(){for(;ft!==null&&!pv();)bg(ft)}function bg(e){var t=Eg(e.alternate,e,Yt);e.memoizedProps=e.pendingProps,t===null?kg(e):ft=t,Ac.current=null}function kg(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Dw(n,t),n!==null){n.flags&=32767,ft=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{yt=6,ft=null;return}}else if(n=Aw(n,t,Yt),n!==null){ft=n;return}if(t=t.sibling,t!==null){ft=t;return}ft=t=e}while(t!==null);yt===0&&(yt=5)}function wr(e,t,n){var r=Oe,i=an.transition;try{an.transition=null,Oe=1,Uw(e,t,n,r)}finally{an.transition=i,Oe=r}return null}function Uw(e,t,n,r){do fi();while(er!==null);if(Ie&6)throw Error(H(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(H(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(Sv(e,l),e===wt&&(ft=wt=null,St=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Jl||(Jl=!0,jg(za,function(){return fi(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=an.transition,an.transition=null;var a=Oe;Oe=1;var s=Ie;Ie|=4,Ac.current=null,Ow(e,n),gg(n,e),uw(uu),Ra=!!ou,uu=ou=null,e.current=n,Fw(n),hv(),Ie=s,Oe=a,an.transition=l}else e.current=n;if(Jl&&(Jl=!1,er=e,Ya=i),l=e.pendingLanes,l===0&&(ar=null),yv(n.stateNode),Wt(e,st()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(qa)throw qa=!1,e=_u,_u=null,e;return Ya&1&&e.tag!==0&&fi(),l=e.pendingLanes,l&1?e===zu?el++:(el=0,zu=e):el=0,hr(),null}function fi(){if(er!==null){var e=nm(Ya),t=an.transition,n=Oe;try{if(an.transition=null,Oe=16>e?16:e,er===null)var r=!1;else{if(e=er,er=null,Ya=0,Ie&6)throw Error(H(331));var i=Ie;for(Ie|=4,ee=e.current;ee!==null;){var l=ee,a=l.child;if(ee.flags&16){var s=l.deletions;if(s!==null){for(var o=0;o<s.length;o++){var c=s[o];for(ee=c;ee!==null;){var f=ee;switch(f.tag){case 0:case 11:case 15:Zi(8,f,l)}var d=f.child;if(d!==null)d.return=f,ee=d;else for(;ee!==null;){f=ee;var p=f.sibling,h=f.return;if(pg(f),f===c){ee=null;break}if(p!==null){p.return=h,ee=p;break}ee=h}}}var m=l.alternate;if(m!==null){var v=m.child;if(v!==null){m.child=null;do{var w=v.sibling;v.sibling=null,v=w}while(v!==null)}}ee=l}}if(l.subtreeFlags&2064&&a!==null)a.return=l,ee=a;else e:for(;ee!==null;){if(l=ee,l.flags&2048)switch(l.tag){case 0:case 11:case 15:Zi(9,l,l.return)}var g=l.sibling;if(g!==null){g.return=l.return,ee=g;break e}ee=l.return}}var x=e.current;for(ee=x;ee!==null;){a=ee;var y=a.child;if(a.subtreeFlags&2064&&y!==null)y.return=a,ee=y;else e:for(a=x;ee!==null;){if(s=ee,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:hs(9,s)}}catch(E){lt(s,s.return,E)}if(s===a){ee=null;break e}var C=s.sibling;if(C!==null){C.return=s.return,ee=C;break e}ee=s.return}}if(Ie=i,hr(),Cn&&typeof Cn.onPostCommitFiberRoot=="function")try{Cn.onPostCommitFiberRoot(as,e)}catch{}r=!0}return r}finally{Oe=n,an.transition=t}}return!1}function Af(e,t,n){t=wi(n,t),t=ng(e,t,1),e=lr(e,t,1),t=Dt(),e!==null&&(jl(e,1,t),Wt(e,t))}function lt(e,t,n){if(e.tag===3)Af(e,e,n);else for(;t!==null;){if(t.tag===3){Af(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ar===null||!ar.has(r))){e=wi(n,e),e=rg(t,e,1),t=lr(t,e,1),e=Dt(),t!==null&&(jl(t,1,e),Wt(t,e));break}}t=t.return}}function Ww(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Dt(),e.pingedLanes|=e.suspendedLanes&n,wt===e&&(St&n)===n&&(yt===4||yt===3&&(St&130023424)===St&&500>st()-Lc?Nr(e,0):Dc|=n),Wt(e,t)}function Sg(e,t){t===0&&(e.mode&1?(t=Ul,Ul<<=1,!(Ul&130023424)&&(Ul=4194304)):t=1);var n=Dt();e=Bn(e,t),e!==null&&(jl(e,t,n),Wt(e,n))}function Vw(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Sg(e,n)}function Gw(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(H(314))}r!==null&&r.delete(t),Sg(e,n)}var Eg;Eg=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ht.current)Bt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Bt=!1,Iw(e,t,n);Bt=!!(e.flags&131072)}else Bt=!1,Xe&&t.flags&1048576&&Tm(t,Ma,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ya(e,t),e=t.pendingProps;var i=gi(t,Pt.current);di(t,n),i=_c(null,t,r,e,i,n);var l=zc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ut(r)?(l=!0,Oa(t)):l=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ec(t),i.updater=ps,t.stateNode=i,i._reactInternals=t,xu(t,r,e,n),t=bu(null,t,r,!0,l,n)):(t.tag=0,Xe&&l&&yc(t),It(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ya(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Yw(r),e=fn(r,e),i){case 0:t=wu(null,t,r,e,n);break e;case 1:t=Ef(null,t,r,e,n);break e;case 11:t=kf(null,t,r,e,n);break e;case 14:t=Sf(null,t,r,fn(r.type,e),n);break e}throw Error(H(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fn(r,i),wu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fn(r,i),Ef(e,t,r,i,n);case 3:e:{if(sg(t),e===null)throw Error(H(387));r=t.pendingProps,l=t.memoizedState,i=l.element,Am(e,t),Ha(t,r,null,n);var a=t.memoizedState;if(r=a.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){i=wi(Error(H(423)),t),t=jf(e,t,r,n,i);break e}else if(r!==i){i=wi(Error(H(424)),t),t=jf(e,t,r,n,i);break e}else for(Xt=ir(t.stateNode.containerInfo.firstChild),Kt=t,Xe=!0,hn=null,n=Rm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yi(),r===i){t=Hn(e,t,n);break e}It(e,t,r,n)}t=t.child}return t;case 5:return Dm(t),e===null&&mu(t),r=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,a=i.children,cu(r,i)?a=null:l!==null&&cu(r,l)&&(t.flags|=32),ag(e,t),It(e,t,a,n),t.child;case 6:return e===null&&mu(t),null;case 13:return og(e,t,n);case 4:return jc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=xi(t,null,r,n):It(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fn(r,i),kf(e,t,r,i,n);case 7:return It(e,t,t.pendingProps,n),t.child;case 8:return It(e,t,t.pendingProps.children,n),t.child;case 12:return It(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,l=t.memoizedProps,a=i.value,Ue($a,r._currentValue),r._currentValue=a,l!==null)if(vn(l.value,a)){if(l.children===i.children&&!Ht.current){t=Hn(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var s=l.dependencies;if(s!==null){a=l.child;for(var o=s.firstContext;o!==null;){if(o.context===r){if(l.tag===1){o=On(-1,n&-n),o.tag=2;var c=l.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?o.next=o:(o.next=f.next,f.next=o),c.pending=o}}l.lanes|=n,o=l.alternate,o!==null&&(o.lanes|=n),gu(l.return,n,t),s.lanes|=n;break}o=o.next}}else if(l.tag===10)a=l.type===t.type?null:l.child;else if(l.tag===18){if(a=l.return,a===null)throw Error(H(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),gu(a,n,t),a=l.sibling}else a=l.child;if(a!==null)a.return=l;else for(a=l;a!==null;){if(a===t){a=null;break}if(l=a.sibling,l!==null){l.return=a.return,a=l;break}a=a.return}l=a}It(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,di(t,n),i=sn(i),r=r(i),t.flags|=1,It(e,t,r,n),t.child;case 14:return r=t.type,i=fn(r,t.pendingProps),i=fn(r.type,i),Sf(e,t,r,i,n);case 15:return ig(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fn(r,i),ya(e,t),t.tag=1,Ut(r)?(e=!0,Oa(t)):e=!1,di(t,n),tg(t,r,i),xu(t,r,i,n),bu(null,t,r,!0,e,n);case 19:return ug(e,t,n);case 22:return lg(e,t,n)}throw Error(H(156,t.tag))};function jg(e,t){return Zh(e,t)}function qw(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(e,t,n,r){return new qw(e,t,n,r)}function $c(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yw(e){if(typeof e=="function")return $c(e)?1:0;if(e!=null){if(e=e.$$typeof,e===lc)return 11;if(e===ac)return 14}return 2}function or(e,t){var n=e.alternate;return n===null?(n=ln(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function wa(e,t,n,r,i,l){var a=2;if(r=e,typeof e=="function")$c(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Yr:return Tr(n.children,i,l,t);case ic:a=8,i|=8;break;case Ho:return e=ln(12,n,t,i|2),e.elementType=Ho,e.lanes=l,e;case Uo:return e=ln(13,n,t,i),e.elementType=Uo,e.lanes=l,e;case Wo:return e=ln(19,n,t,i),e.elementType=Wo,e.lanes=l,e;case Dh:return gs(n,i,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ih:a=10;break e;case Ah:a=9;break e;case lc:a=11;break e;case ac:a=14;break e;case Xn:a=16,r=null;break e}throw Error(H(130,e==null?e:typeof e,""))}return t=ln(a,n,t,i),t.elementType=e,t.type=r,t.lanes=l,t}function Tr(e,t,n,r){return e=ln(7,e,r,t),e.lanes=n,e}function gs(e,t,n,r){return e=ln(22,e,r,t),e.elementType=Dh,e.lanes=n,e.stateNode={isHidden:!1},e}function uo(e,t,n){return e=ln(6,e,null,t),e.lanes=n,e}function co(e,t,n){return t=ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xw(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ws(0),this.expirationTimes=Ws(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ws(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Bc(e,t,n,r,i,l,a,s,o){return e=new Xw(e,t,n,s,o),t===1?(t=1,l===!0&&(t|=8)):t=0,l=ln(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ec(l),e}function Kw(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:qr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Cg(e){if(!e)return cr;e=e._reactInternals;e:{if(Mr(e)!==e||e.tag!==1)throw Error(H(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ut(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(H(171))}if(e.tag===1){var n=e.type;if(Ut(n))return Cm(e,n,t)}return t}function Ng(e,t,n,r,i,l,a,s,o){return e=Bc(n,r,!0,e,i,l,a,s,o),e.context=Cg(null),n=e.current,r=Dt(),i=sr(n),l=On(r,i),l.callback=t??null,lr(n,l,i),e.current.lanes=i,jl(e,i,r),Wt(e,r),e}function ys(e,t,n,r){var i=t.current,l=Dt(),a=sr(i);return n=Cg(n),t.context===null?t.context=n:t.pendingContext=n,t=On(l,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=lr(i,t,a),e!==null&&(gn(e,i,a,l),ha(e,i,a)),a}function Ka(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Df(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Hc(e,t){Df(e,t),(e=e.alternate)&&Df(e,t)}function Qw(){return null}var Tg=typeof reportError=="function"?reportError:function(e){console.error(e)};function Uc(e){this._internalRoot=e}xs.prototype.render=Uc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(H(409));ys(e,t,null,null)};xs.prototype.unmount=Uc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ar(function(){ys(null,e,null,null)}),t[$n]=null}};function xs(e){this._internalRoot=e}xs.prototype.unstable_scheduleHydration=function(e){if(e){var t=lm();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Qn.length&&t!==0&&t<Qn[n].priority;n++);Qn.splice(n,0,e),n===0&&sm(e)}};function Wc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Lf(){}function Zw(e,t,n,r,i){if(i){if(typeof r=="function"){var l=r;r=function(){var c=Ka(a);l.call(c)}}var a=Ng(t,r,e,0,null,!1,!1,"",Lf);return e._reactRootContainer=a,e[$n]=a.current,fl(e.nodeType===8?e.parentNode:e),Ar(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var c=Ka(o);s.call(c)}}var o=Bc(e,0,!1,null,null,!1,!1,"",Lf);return e._reactRootContainer=o,e[$n]=o.current,fl(e.nodeType===8?e.parentNode:e),Ar(function(){ys(t,o,n,r)}),o}function ws(e,t,n,r,i){var l=n._reactRootContainer;if(l){var a=l;if(typeof i=="function"){var s=i;i=function(){var o=Ka(a);s.call(o)}}ys(t,a,e,i)}else a=Zw(n,t,e,i,r);return Ka(a)}rm=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ui(t.pendingLanes);n!==0&&(uc(t,n|1),Wt(t,st()),!(Ie&6)&&(bi=st()+500,hr()))}break;case 13:Ar(function(){var r=Bn(e,1);if(r!==null){var i=Dt();gn(r,e,1,i)}}),Hc(e,1)}};cc=function(e){if(e.tag===13){var t=Bn(e,134217728);if(t!==null){var n=Dt();gn(t,e,134217728,n)}Hc(e,134217728)}};im=function(e){if(e.tag===13){var t=sr(e),n=Bn(e,t);if(n!==null){var r=Dt();gn(n,e,t,r)}Hc(e,t)}};lm=function(){return Oe};am=function(e,t){var n=Oe;try{return Oe=e,t()}finally{Oe=n}};eu=function(e,t,n){switch(t){case"input":if(qo(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=cs(r);if(!i)throw Error(H(90));Oh(r),qo(r,i)}}}break;case"textarea":Mh(e,n);break;case"select":t=n.value,t!=null&&si(e,!!n.multiple,t,!1)}};Gh=Oc;qh=Ar;var Jw={usingClientEntryPoint:!1,Events:[Nl,Zr,cs,Wh,Vh,Oc]},Oi={findFiberByHostInstance:Sr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},eb={bundleType:Oi.bundleType,version:Oi.version,rendererPackageName:Oi.rendererPackageName,rendererConfig:Oi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Un.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Kh(e),e===null?null:e.stateNode},findFiberByHostInstance:Oi.findFiberByHostInstance||Qw,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 ea=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ea.isDisabled&&ea.supportsFiber)try{as=ea.inject(eb),Cn=ea}catch{}}Jt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Jw;Jt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Wc(t))throw Error(H(200));return Kw(e,t,null,n)};Jt.createRoot=function(e,t){if(!Wc(e))throw Error(H(299));var n=!1,r="",i=Tg;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Bc(e,1,!1,null,null,n,!1,r,i),e[$n]=t.current,fl(e.nodeType===8?e.parentNode:e),new Uc(t)};Jt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(H(188)):(e=Object.keys(e).join(","),Error(H(268,e)));return e=Kh(t),e=e===null?null:e.stateNode,e};Jt.flushSync=function(e){return Ar(e)};Jt.hydrate=function(e,t,n){if(!vs(t))throw Error(H(200));return ws(null,e,t,!0,n)};Jt.hydrateRoot=function(e,t,n){if(!Wc(e))throw Error(H(405));var r=n!=null&&n.hydratedSources||null,i=!1,l="",a=Tg;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Ng(t,null,e,1,n??null,i,!1,l,a),e[$n]=t.current,fl(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new xs(t)};Jt.render=function(e,t,n){if(!vs(t))throw Error(H(200));return ws(null,e,t,!1,n)};Jt.unmountComponentAtNode=function(e){if(!vs(e))throw Error(H(40));return e._reactRootContainer?(Ar(function(){ws(null,null,e,!1,function(){e._reactRootContainer=null,e[$n]=null})}),!0):!1};Jt.unstable_batchedUpdates=Oc;Jt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!vs(n))throw Error(H(200));if(e==null||e._reactInternals===void 0)throw Error(H(38));return ws(e,t,n,!1,r)};Jt.version="18.3.1-next-f1338f8080-20240426";function _g(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_g)}catch(e){console.error(e)}}_g(),_h.exports=Jt;var zg=_h.exports;const Pg=Sl(zg);var Of=zg;$o.createRoot=Of.createRoot,$o.hydrateRoot=Of.hydrateRoot;function tb(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const nb=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ib={};function Ff(e,t){return(ib.jsx?rb:nb).test(e)}const lb=/[ \t\n\f\r]/g;function ab(e){return typeof e=="object"?e.type==="text"?Mf(e.value):!1:Mf(e)}function Mf(e){return e.replace(lb,"")===""}class _l{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}_l.prototype.normal={};_l.prototype.property={};_l.prototype.space=void 0;function Rg(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new _l(n,r,t)}function Iu(e){return e.toLowerCase()}class Vt{constructor(t,n){this.attribute=n,this.property=t}}Vt.prototype.attribute="";Vt.prototype.booleanish=!1;Vt.prototype.boolean=!1;Vt.prototype.commaOrSpaceSeparated=!1;Vt.prototype.commaSeparated=!1;Vt.prototype.defined=!1;Vt.prototype.mustUseProperty=!1;Vt.prototype.number=!1;Vt.prototype.overloadedBoolean=!1;Vt.prototype.property="";Vt.prototype.spaceSeparated=!1;Vt.prototype.space=void 0;let sb=0;const ke=$r(),dt=$r(),Au=$r(),V=$r(),He=$r(),pi=$r(),qt=$r();function $r(){return 2**++sb}const Du=Object.freeze(Object.defineProperty({__proto__:null,boolean:ke,booleanish:dt,commaOrSpaceSeparated:qt,commaSeparated:pi,number:V,overloadedBoolean:Au,spaceSeparated:He},Symbol.toStringTag,{value:"Module"})),fo=Object.keys(Du);class Vc extends Vt{constructor(t,n,r,i){let l=-1;if(super(t,n),$f(this,"space",i),typeof r=="number")for(;++l<fo.length;){const a=fo[l];$f(this,fo[l],(r&Du[a])===Du[a])}}}Vc.prototype.defined=!0;function $f(e,t,n){n&&(e[t]=n)}function Ci(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const l=new Vc(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[Iu(r)]=r,n[Iu(l.attribute)]=r}return new _l(t,n,e.space)}const Ig=Ci({properties:{ariaActiveDescendant:null,ariaAtomic:dt,ariaAutoComplete:null,ariaBusy:dt,ariaChecked:dt,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:He,ariaCurrent:null,ariaDescribedBy:He,ariaDetails:null,ariaDisabled:dt,ariaDropEffect:He,ariaErrorMessage:null,ariaExpanded:dt,ariaFlowTo:He,ariaGrabbed:dt,ariaHasPopup:null,ariaHidden:dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:He,ariaLevel:V,ariaLive:null,ariaModal:dt,ariaMultiLine:dt,ariaMultiSelectable:dt,ariaOrientation:null,ariaOwns:He,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:dt,ariaReadOnly:dt,ariaRelevant:null,ariaRequired:dt,ariaRoleDescription:He,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:dt,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Ag(e,t){return t in e?e[t]:t}function Dg(e,t){return Ag(e,t.toLowerCase())}const ob=Ci({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:pi,acceptCharset:He,accessKey:He,action:null,allow:null,allowFullScreen:ke,allowPaymentRequest:ke,allowUserMedia:ke,alt:null,as:null,async:ke,autoCapitalize:null,autoComplete:He,autoFocus:ke,autoPlay:ke,blocking:He,capture:null,charSet:null,checked:ke,cite:null,className:He,cols:V,colSpan:null,content:null,contentEditable:dt,controls:ke,controlsList:He,coords:V|pi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ke,defer:ke,dir:null,dirName:null,disabled:ke,download:Au,draggable:dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ke,formTarget:null,headers:He,height:V,hidden:Au,high:V,href:null,hrefLang:null,htmlFor:He,httpEquiv:He,id:null,imageSizes:null,imageSrcSet:null,inert:ke,inputMode:null,integrity:null,is:null,isMap:ke,itemId:null,itemProp:He,itemRef:He,itemScope:ke,itemType:He,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ke,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:ke,muted:ke,name:null,nonce:null,noModule:ke,noValidate:ke,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ke,optimum:V,pattern:null,ping:He,placeholder:null,playsInline:ke,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ke,referrerPolicy:null,rel:He,required:ke,reversed:ke,rows:V,rowSpan:V,sandbox:He,scope:null,scoped:ke,seamless:ke,selected:ke,shadowRootClonable:ke,shadowRootDelegatesFocus:ke,shadowRootMode:null,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:dt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:ke,useMap:null,value:dt,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:He,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ke,declare:ke,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:ke,noHref:ke,noShade:ke,noWrap:ke,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:dt,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ke,disableRemotePlayback:ke,prefix:null,property:null,results:V,security:null,unselectable:null},space:"html",transform:Dg}),ub=Ci({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:qt,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:He,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:ke,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:pi,g2:pi,glyphName:pi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:qt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:V,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:He,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qt,rev:qt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qt,requiredFeatures:qt,requiredFonts:qt,requiredFormats:qt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:qt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qt,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ag}),Lg=Ci({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Og=Ci({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Dg}),Fg=Ci({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),cb={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},db=/[A-Z]/g,Bf=/-[a-z]/g,fb=/^data[-\w.:]+$/i;function pb(e,t){const n=Iu(t);let r=t,i=Vt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&fb.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Bf,mb);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Bf.test(l)){let a=l.replace(db,hb);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Vc}return new i(r,t)}function hb(e){return"-"+e.toLowerCase()}function mb(e){return e.charAt(1).toUpperCase()}const gb=Rg([Ig,ob,Lg,Og,Fg],"html"),Gc=Rg([Ig,ub,Lg,Og,Fg],"svg");function yb(e){return e.join(" ").trim()}var qc={},Hf=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,xb=/\n/g,vb=/^\s*/,wb=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,bb=/^:\s*/,kb=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Sb=/^[;\s]*/,Eb=/^\s+|\s+$/g,jb=`
41
- `,Uf="/",Wf="*",kr="",Cb="comment",Nb="declaration";function Tb(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var v=m.match(xb);v&&(n+=v.length);var w=m.lastIndexOf(jb);r=~w?m.length-w:r+m.length}function l(){var m={line:n,column:r};return function(v){return v.position=new a(m),c(),v}}function a(m){this.start=m,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(m){var v=new Error(t.source+":"+n+":"+r+": "+m);if(v.reason=m,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function o(m){var v=m.exec(e);if(v){var w=v[0];return i(w),e=e.slice(w.length),v}}function c(){o(vb)}function f(m){var v;for(m=m||[];v=d();)v!==!1&&m.push(v);return m}function d(){var m=l();if(!(Uf!=e.charAt(0)||Wf!=e.charAt(1))){for(var v=2;kr!=e.charAt(v)&&(Wf!=e.charAt(v)||Uf!=e.charAt(v+1));)++v;if(v+=2,kr===e.charAt(v-1))return s("End of comment missing");var w=e.slice(2,v-2);return r+=2,i(w),e=e.slice(v),r+=2,m({type:Cb,comment:w})}}function p(){var m=l(),v=o(wb);if(v){if(d(),!o(bb))return s("property missing ':'");var w=o(kb),g=m({type:Nb,property:Vf(v[0].replace(Hf,kr)),value:w?Vf(w[0].replace(Hf,kr)):kr});return o(Sb),g}}function h(){var m=[];f(m);for(var v;v=p();)v!==!1&&(m.push(v),f(m));return m}return c(),h()}function Vf(e){return e?e.replace(Eb,kr):kr}var _b=Tb,zb=Ca&&Ca.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qc,"__esModule",{value:!0});qc.default=Rb;const Pb=zb(_b);function Rb(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Pb.default)(e),i=typeof t=="function";return r.forEach(l=>{if(l.type!=="declaration")return;const{property:a,value:s}=l;i?t(a,s,l):s&&(n=n||{},n[a]=s)}),n}var bs={};Object.defineProperty(bs,"__esModule",{value:!0});bs.camelCase=void 0;var Ib=/^--[a-zA-Z0-9_-]+$/,Ab=/-([a-z])/g,Db=/^[^-]+$/,Lb=/^-(webkit|moz|ms|o|khtml)-/,Ob=/^-(ms)-/,Fb=function(e){return!e||Db.test(e)||Ib.test(e)},Mb=function(e,t){return t.toUpperCase()},Gf=function(e,t){return"".concat(t,"-")},$b=function(e,t){return t===void 0&&(t={}),Fb(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Ob,Gf):e=e.replace(Lb,Gf),e.replace(Ab,Mb))};bs.camelCase=$b;var Bb=Ca&&Ca.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Hb=Bb(qc),Ub=bs;function Lu(e,t){var n={};return!e||typeof e!="string"||(0,Hb.default)(e,function(r,i){r&&i&&(n[(0,Ub.camelCase)(r,t)]=i)}),n}Lu.default=Lu;var Wb=Lu;const Vb=Sl(Wb),Mg=$g("end"),Yc=$g("start");function $g(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Gb(e){const t=Yc(e),n=Mg(e);if(t&&n)return{start:t,end:n}}function tl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?qf(e.position):"start"in e||"end"in e?qf(e):"line"in e||"column"in e?Ou(e):""}function Ou(e){return Yf(e&&e.line)+":"+Yf(e&&e.column)}function qf(e){return Ou(e&&e.start)+"-"+Ou(e&&e.end)}function Yf(e){return e&&typeof e=="number"?e:1}class Rt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",l={},a=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(a=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?l.ruleId=r:(l.source=r.slice(0,o),l.ruleId=r.slice(o+1))}if(!l.place&&l.ancestors&&l.ancestors){const o=l.ancestors[l.ancestors.length-1];o&&(l.place=o.position)}const s=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=tl(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=a&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Rt.prototype.file="";Rt.prototype.name="";Rt.prototype.reason="";Rt.prototype.message="";Rt.prototype.stack="";Rt.prototype.column=void 0;Rt.prototype.line=void 0;Rt.prototype.ancestors=void 0;Rt.prototype.cause=void 0;Rt.prototype.fatal=void 0;Rt.prototype.place=void 0;Rt.prototype.ruleId=void 0;Rt.prototype.source=void 0;const Xc={}.hasOwnProperty,qb=new Map,Yb=/[A-Z]/g,Xb=new Set(["table","tbody","thead","tfoot","tr"]),Kb=new Set(["td","th"]),Bg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Qb(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=lk(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=ik(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Gc:gb,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=Hg(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function Hg(e,t,n){if(t.type==="element")return Zb(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Jb(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return tk(e,t,n);if(t.type==="mdxjsEsm")return ek(e,t);if(t.type==="root")return nk(e,t,n);if(t.type==="text")return rk(e,t)}function Zb(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Gc,e.schema=i),e.ancestors.push(t);const l=Wg(e,t.tagName,!1),a=ak(e,t);let s=Qc(e,t);return Xb.has(t.tagName)&&(s=s.filter(function(o){return typeof o=="string"?!ab(o):!0})),Ug(e,a,l,t),Kc(a,s),e.ancestors.pop(),e.schema=r,e.create(t,l,a,n)}function Jb(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}bl(e,t.position)}function ek(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);bl(e,t.position)}function tk(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Gc,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:Wg(e,t.name,!0),a=sk(e,t),s=Qc(e,t);return Ug(e,a,l,t),Kc(a,s),e.ancestors.pop(),e.schema=r,e.create(t,l,a,n)}function nk(e,t,n){const r={};return Kc(r,Qc(e,t)),e.create(t,e.Fragment,r,n)}function rk(e,t){return t.value}function Ug(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Kc(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ik(e,t,n){return r;function r(i,l,a,s){const c=Array.isArray(a.children)?n:t;return s?c(l,a,s):c(l,a)}}function lk(e,t){return n;function n(r,i,l,a){const s=Array.isArray(l.children),o=Yc(r);return t(i,l,a,s,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function ak(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Xc.call(t.properties,i)){const l=ok(e,i,t.properties[i]);if(l){const[a,s]=l;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&Kb.has(t.tagName)?r=s:n[a]=s}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function sk(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const a=l.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else bl(e,t.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,l=e.evaluater.evaluateExpression(s.expression)}else bl(e,t.position);else l=r.value===null?!0:r.value;n[i]=l}return n}function Qc(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:qb;for(;++r<t.children.length;){const l=t.children[r];let a;if(e.passKeys){const o=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(o){const c=i.get(o)||0;a=o+"-"+c,i.set(o,c+1)}}const s=Hg(e,l,a);s!==void 0&&n.push(s)}return n}function ok(e,t,n){const r=pb(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?tb(n):yb(n)),r.property==="style"){let i=typeof n=="object"?n:uk(e,String(n));return e.stylePropertyNameCase==="css"&&(i=ck(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?cb[r.property]||r.property:r.attribute,n]}}function uk(e,t){try{return Vb(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Rt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Bg+"#cannot-parse-style-attribute",i}}function Wg(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,a;for(;++l<i.length;){const s=Ff(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(l&&s.type==="Literal"),optional:!1}:s}r=a}else r=Ff(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Xc.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);bl(e)}function bl(e,t){const n=new Rt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Bg+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ck(e){const t={};let n;for(n in e)Xc.call(e,n)&&(t[dk(n)]=e[n]);return t}function dk(e){let t=e.replace(Yb,fk);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function fk(e){return"-"+e.toLowerCase()}const po={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},pk={};function Zc(e,t){const n=pk,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Vg(e,r,i)}function Vg(e,t,n){if(hk(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Xf(e.children,t,n)}return Array.isArray(e)?Xf(e,t,n):""}function Xf(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Vg(e[i],t,n);return r.join("")}function hk(e){return!!(e&&typeof e=="object")}const Kf=document.createElement("i");function Jc(e){const t="&"+e+";";Kf.innerHTML=t;const n=Kf.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Qt(e,t,n,r){const i=e.length;let l=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);l<r.length;)a=r.slice(l,l+1e4),a.unshift(t,0),e.splice(...a),l+=1e4,t+=1e4}function rn(e,t){return e.length>0?(Qt(e,e.length,0,t),e):t}const Qf={}.hasOwnProperty;function Gg(e){const t={};let n=-1;for(;++n<e.length;)mk(t,e[n]);return t}function mk(e,t){let n;for(n in t){const i=(Qf.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let a;if(l)for(a in l){Qf.call(i,a)||(i[a]=[]);const s=l[a];gk(i[a],Array.isArray(s)?s:s?[s]:[])}}}function gk(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Qt(e,0,0,r)}function qg(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function yn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const At=mr(/[A-Za-z]/),zt=mr(/[\dA-Za-z]/),yk=mr(/[#-'*+\--9=?A-Z^-~]/);function Qa(e){return e!==null&&(e<32||e===127)}const Fu=mr(/\d/),xk=mr(/[\dA-Fa-f]/),vk=mr(/[!-/:-@[-`{-~]/);function ue(e){return e!==null&&e<-2}function $e(e){return e!==null&&(e<0||e===32)}function Ce(e){return e===-2||e===-1||e===32}const ks=mr(new RegExp("\\p{P}|\\p{S}","u")),Dr=mr(/\s/);function mr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ni(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let a="";if(l===37&&zt(e.charCodeAt(n+1))&&zt(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(a=String.fromCharCode(l));else if(l>55295&&l<57344){const s=e.charCodeAt(n+1);l<56320&&s>56319&&s<57344?(a=String.fromCharCode(l,s),i=1):a="�"}else a=String.fromCharCode(l);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Pe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return a;function a(o){return Ce(o)?(e.enter(n),s(o)):t(o)}function s(o){return Ce(o)&&l++<i?(e.consume(o),s):(e.exit(n),t(o))}}const wk={tokenize:bk};function bk(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Pe(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),l(s)}function l(s){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return ue(s)?(e.consume(s),e.exit("chunkText"),l):(e.consume(s),a)}}const kk={tokenize:Sk},Zf={tokenize:Ek};function Sk(e){const t=this,n=[];let r=0,i,l,a;return s;function s(y){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,o,c)(y)}return c(y)}function o(y){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&x();const C=t.events.length;let E=C,b;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){b=t.events[E][1].end;break}g(r);let T=C;for(;T<t.events.length;)t.events[T][1].end={...b},T++;return Qt(t.events,E+1,0,t.events.slice(C)),t.events.length=T,c(y)}return s(y)}function c(y){if(r===n.length){if(!i)return p(y);if(i.currentConstruct&&i.currentConstruct.concrete)return m(y);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Zf,f,d)(y)}function f(y){return i&&x(),g(r),p(y)}function d(y){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,m(y)}function p(y){return t.containerState={},e.attempt(Zf,h,m)(y)}function h(y){return r++,n.push([t.currentConstruct,t.containerState]),p(y)}function m(y){if(y===null){i&&x(),g(0),e.consume(y);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),v(y)}function v(y){if(y===null){w(e.exit("chunkFlow"),!0),g(0),e.consume(y);return}return ue(y)?(e.consume(y),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(y),v)}function w(y,C){const E=t.sliceStream(y);if(C&&E.push(null),y.previous=l,l&&(l.next=y),l=y,i.defineSkip(y.start),i.write(E),t.parser.lazy[y.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<a&&(!i.events[b][1].end||i.events[b][1].end.offset>a))return;const T=t.events.length;let _=T,R,N;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){if(R){N=t.events[_][1].end;break}R=!0}for(g(r),b=T;b<t.events.length;)t.events[b][1].end={...N},b++;Qt(t.events,_+1,0,t.events.slice(T)),t.events.length=b}}function g(y){let C=n.length;for(;C-- >y;){const E=n[C];t.containerState=E[1],E[0].exit.call(t,e)}n.length=y}function x(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ek(e,t,n){return Pe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ki(e){if(e===null||$e(e)||Dr(e))return 1;if(ks(e))return 2}function Ss(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}const Mu={name:"attention",resolveAll:jk,tokenize:Ck};function jk(e,t){let n=-1,r,i,l,a,s,o,c,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},p={...e[n][1].start};Jf(d,-o),Jf(p,o),a={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},s={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},l={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[r][1].end={...a.start},e[n][1].start={...s.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=rn(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=rn(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",l,t]]),c=rn(c,Ss(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=rn(c,[["exit",l,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,c=rn(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Qt(e,r-1,n-r+3,c),n=r+c.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Ck(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ki(r);let l;return a;function a(o){return l=o,e.enter("attentionSequence"),s(o)}function s(o){if(o===l)return e.consume(o),s;const c=e.exit("attentionSequence"),f=ki(o),d=!f||f===2&&i||n.includes(o),p=!i||i===2&&f||n.includes(r);return c._open=!!(l===42?d:d&&(i||!p)),c._close=!!(l===42?p:p&&(f||!d)),t(o)}}function Jf(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Nk={name:"autolink",tokenize:Tk};function Tk(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(h){return At(h)?(e.consume(h),a):h===64?n(h):c(h)}function a(h){return h===43||h===45||h===46||zt(h)?(r=1,s(h)):c(h)}function s(h){return h===58?(e.consume(h),r=0,o):(h===43||h===45||h===46||zt(h))&&r++<32?(e.consume(h),s):(r=0,c(h))}function o(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Qa(h)?n(h):(e.consume(h),o)}function c(h){return h===64?(e.consume(h),f):yk(h)?(e.consume(h),c):n(h)}function f(h){return zt(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||zt(h))&&r++<63){const m=h===45?p:d;return e.consume(h),m}return n(h)}}const zl={partial:!0,tokenize:_k};function _k(e,t,n){return r;function r(l){return Ce(l)?Pe(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||ue(l)?t(l):n(l)}}const Yg={continuation:{tokenize:Pk},exit:Rk,name:"blockQuote",tokenize:zk};function zk(e,t,n){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),l}return n(a)}function l(a){return Ce(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Pk(e,t,n){const r=this;return i;function i(a){return Ce(a)?Pe(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):l(a)}function l(a){return e.attempt(Yg,t,n)(a)}}function Rk(e){e.exit("blockQuote")}const Xg={name:"characterEscape",tokenize:Ik};function Ik(e,t,n){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return vk(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const Kg={name:"characterReference",tokenize:Ak};function Ak(e,t,n){const r=this;let i=0,l,a;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),o}function o(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),l=31,a=zt,f(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,a=xk,f):(e.enter("characterReferenceValue"),l=7,a=Fu,f(d))}function f(d){if(d===59&&i){const p=e.exit("characterReferenceValue");return a===zt&&!Jc(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&i++<l?(e.consume(d),f):n(d)}}const ep={partial:!0,tokenize:Lk},tp={concrete:!0,name:"codeFenced",tokenize:Dk};function Dk(e,t,n){const r=this,i={partial:!0,tokenize:E};let l=0,a=0,s;return o;function o(b){return c(b)}function c(b){const T=r.events[r.events.length-1];return l=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,s=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(b)}function f(b){return b===s?(a++,e.consume(b),f):a<3?n(b):(e.exit("codeFencedFenceSequence"),Ce(b)?Pe(e,d,"whitespace")(b):d(b))}function d(b){return b===null||ue(b)?(e.exit("codeFencedFence"),r.interrupt?t(b):e.check(ep,v,C)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===null||ue(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(b)):Ce(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Pe(e,h,"whitespace")(b)):b===96&&b===s?n(b):(e.consume(b),p)}function h(b){return b===null||ue(b)?d(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||ue(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(b)):b===96&&b===s?n(b):(e.consume(b),m)}function v(b){return e.attempt(i,C,w)(b)}function w(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),g}function g(b){return l>0&&Ce(b)?Pe(e,x,"linePrefix",l+1)(b):x(b)}function x(b){return b===null||ue(b)?e.check(ep,v,C)(b):(e.enter("codeFlowValue"),y(b))}function y(b){return b===null||ue(b)?(e.exit("codeFlowValue"),x(b)):(e.consume(b),y)}function C(b){return e.exit("codeFenced"),t(b)}function E(b,T,_){let R=0;return N;function N(I){return b.enter("lineEnding"),b.consume(I),b.exit("lineEnding"),M}function M(I){return b.enter("codeFencedFence"),Ce(I)?Pe(b,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):$(I)}function $(I){return I===s?(b.enter("codeFencedFenceSequence"),L(I)):_(I)}function L(I){return I===s?(R++,b.consume(I),L):R>=a?(b.exit("codeFencedFenceSequence"),Ce(I)?Pe(b,B,"whitespace")(I):B(I)):_(I)}function B(I){return I===null||ue(I)?(b.exit("codeFencedFence"),T(I)):_(I)}}}function Lk(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l)}function l(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const ho={name:"codeIndented",tokenize:Fk},Ok={partial:!0,tokenize:Mk};function Fk(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Pe(e,l,"linePrefix",5)(c)}function l(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?o(c):ue(c)?e.attempt(Ok,a,o)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||ue(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),s)}function o(c){return e.exit("codeIndented"),t(c)}}function Mk(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):ue(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Pe(e,l,"linePrefix",5)(a)}function l(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):ue(a)?i(a):n(a)}}const $k={name:"codeText",previous:Hk,resolve:Bk,tokenize:Uk};function Bk(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Hk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Uk(e,t,n){let r=0,i,l;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),r++,s):(e.exit("codeTextSequence"),o(d))}function o(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),o):d===96?(l=e.enter("codeTextSequence"),i=0,f(d)):ue(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),o):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||ue(d)?(e.exit("codeTextData"),o(d)):(e.consume(d),c)}function f(d){return d===96?(e.consume(d),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(l.type="codeTextData",c(d))}}class Wk{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Fi(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Fi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Fi(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Fi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Fi(this.left,n.reverse())}}}function Fi(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Qg(e){const t={};let n=-1,r,i,l,a,s,o,c;const f=new Wk(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,l=0,l<o.length&&o[l][1].type==="lineEndingBlank"&&(l+=2),l<o.length&&o[l][1].type==="content"))for(;++l<o.length&&o[l][1].type!=="content";)o[l][1].type==="chunkText"&&(o[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Vk(f,n)),n=t[n],c=!0);else if(r[1]._container){for(l=n,i=void 0;l--;)if(a=f.get(l),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=l);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},s=f.slice(i,n),s.unshift(r),f.splice(i,n-i+1,s))}}return Qt(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!c}function Vk(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const l=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,o=[],c={};let f,d,p=-1,h=n,m=0,v=0;const w=[v];for(;h;){for(;e.get(++i)[1]!==h;);l.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),d&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(f),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(v=p+1,w.push(v),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):w.pop(),p=w.length;p--;){const g=s.slice(w[p],w[p+1]),x=l.pop();o.push([x,x+g.length-1]),e.splice(x,2,g)}for(o.reverse(),p=-1;++p<o.length;)c[m+o[p][0]]=m+o[p][1],m+=o[p][1]-o[p][0]-1;return c}const Gk={resolve:Yk,tokenize:Xk},qk={partial:!0,tokenize:Kk};function Yk(e){return Qg(e),e}function Xk(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?l(s):ue(s)?e.check(qk,a,l)(s):(e.consume(s),i)}function l(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Kk(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Pe(e,l,"linePrefix")}function l(a){if(a===null||ue(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Zg(e,t,n,r,i,l,a,s,o){const c=o||Number.POSITIVE_INFINITY;let f=0;return d;function d(g){return g===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(g),e.exit(l),p):g===null||g===32||g===41||Qa(g)?n(g):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),v(g))}function p(g){return g===62?(e.enter(l),e.consume(g),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===62?(e.exit("chunkString"),e.exit(s),p(g)):g===null||g===60||ue(g)?n(g):(e.consume(g),g===92?m:h)}function m(g){return g===60||g===62||g===92?(e.consume(g),h):h(g)}function v(g){return!f&&(g===null||g===41||$e(g))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(g)):f<c&&g===40?(e.consume(g),f++,v):g===41?(e.consume(g),f--,v):g===null||g===32||g===40||Qa(g)?n(g):(e.consume(g),g===92?w:v)}function w(g){return g===40||g===41||g===92?(e.consume(g),v):v(g)}}function Jg(e,t,n,r,i,l){const a=this;let s=0,o;return c;function c(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(l),f}function f(h){return s>999||h===null||h===91||h===93&&!o||h===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(h):h===93?(e.exit(l),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):ue(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||ue(h)||s++>999?(e.exit("chunkString"),f(h)):(e.consume(h),o||(o=!Ce(h)),h===92?p:d)}function p(h){return h===91||h===92||h===93?(e.consume(h),s++,d):d(h)}}function ey(e,t,n,r,i,l){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),a=p===40?41:p,o):n(p)}function o(p){return p===a?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(l),c(p))}function c(p){return p===a?(e.exit(l),o(a)):p===null?n(p):ue(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Pe(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===a||p===null||ue(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?d:f)}function d(p){return p===a||p===92?(e.consume(p),f):f(p)}}function nl(e,t){let n;return r;function r(i){return ue(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ce(i)?Pe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Qk={name:"definition",tokenize:Jk},Zk={partial:!0,tokenize:e0};function Jk(e,t,n){const r=this;let i;return l;function l(h){return e.enter("definition"),a(h)}function a(h){return Jg.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function s(h){return i=yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o):n(h)}function o(h){return $e(h)?nl(e,c)(h):c(h)}function c(h){return Zg(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(Zk,d,d)(h)}function d(h){return Ce(h)?Pe(e,p,"whitespace")(h):p(h)}function p(h){return h===null||ue(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function e0(e,t,n){return r;function r(s){return $e(s)?nl(e,i)(s):n(s)}function i(s){return ey(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function l(s){return Ce(s)?Pe(e,a,"whitespace")(s):a(s)}function a(s){return s===null||ue(s)?t(s):n(s)}}const t0={name:"hardBreakEscape",tokenize:n0};function n0(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return ue(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const r0={name:"headingAtx",resolve:i0,tokenize:l0};function i0(e,t){let n=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Qt(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function l0(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),l(f)}function l(f){return e.enter("atxHeadingSequence"),a(f)}function a(f){return f===35&&r++<6?(e.consume(f),a):f===null||$e(f)?(e.exit("atxHeadingSequence"),s(f)):n(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),o(f)):f===null||ue(f)?(e.exit("atxHeading"),t(f)):Ce(f)?Pe(e,s,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function o(f){return f===35?(e.consume(f),o):(e.exit("atxHeadingSequence"),s(f))}function c(f){return f===null||f===35||$e(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),c)}}const a0=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],np=["pre","script","style","textarea"],s0={concrete:!0,name:"htmlFlow",resolveTo:c0,tokenize:d0},o0={partial:!0,tokenize:p0},u0={partial:!0,tokenize:f0};function c0(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function d0(e,t,n){const r=this;let i,l,a,s,o;return c;function c(j){return f(j)}function f(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),d}function d(j){return j===33?(e.consume(j),p):j===47?(e.consume(j),l=!0,v):j===63?(e.consume(j),i=3,r.interrupt?t:k):At(j)?(e.consume(j),a=String.fromCharCode(j),w):n(j)}function p(j){return j===45?(e.consume(j),i=2,h):j===91?(e.consume(j),i=5,s=0,m):At(j)?(e.consume(j),i=4,r.interrupt?t:k):n(j)}function h(j){return j===45?(e.consume(j),r.interrupt?t:k):n(j)}function m(j){const oe="CDATA[";return j===oe.charCodeAt(s++)?(e.consume(j),s===oe.length?r.interrupt?t:$:m):n(j)}function v(j){return At(j)?(e.consume(j),a=String.fromCharCode(j),w):n(j)}function w(j){if(j===null||j===47||j===62||$e(j)){const oe=j===47,ve=a.toLowerCase();return!oe&&!l&&np.includes(ve)?(i=1,r.interrupt?t(j):$(j)):a0.includes(a.toLowerCase())?(i=6,oe?(e.consume(j),g):r.interrupt?t(j):$(j)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(j):l?x(j):y(j))}return j===45||zt(j)?(e.consume(j),a+=String.fromCharCode(j),w):n(j)}function g(j){return j===62?(e.consume(j),r.interrupt?t:$):n(j)}function x(j){return Ce(j)?(e.consume(j),x):N(j)}function y(j){return j===47?(e.consume(j),N):j===58||j===95||At(j)?(e.consume(j),C):Ce(j)?(e.consume(j),y):N(j)}function C(j){return j===45||j===46||j===58||j===95||zt(j)?(e.consume(j),C):E(j)}function E(j){return j===61?(e.consume(j),b):Ce(j)?(e.consume(j),E):y(j)}function b(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),o=j,T):Ce(j)?(e.consume(j),b):_(j)}function T(j){return j===o?(e.consume(j),o=null,R):j===null||ue(j)?n(j):(e.consume(j),T)}function _(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||$e(j)?E(j):(e.consume(j),_)}function R(j){return j===47||j===62||Ce(j)?y(j):n(j)}function N(j){return j===62?(e.consume(j),M):n(j)}function M(j){return j===null||ue(j)?$(j):Ce(j)?(e.consume(j),M):n(j)}function $(j){return j===45&&i===2?(e.consume(j),J):j===60&&i===1?(e.consume(j),le):j===62&&i===4?(e.consume(j),Q):j===63&&i===3?(e.consume(j),k):j===93&&i===5?(e.consume(j),q):ue(j)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(o0,ae,L)(j)):j===null||ue(j)?(e.exit("htmlFlowData"),L(j)):(e.consume(j),$)}function L(j){return e.check(u0,B,ae)(j)}function B(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),I}function I(j){return j===null||ue(j)?L(j):(e.enter("htmlFlowData"),$(j))}function J(j){return j===45?(e.consume(j),k):$(j)}function le(j){return j===47?(e.consume(j),a="",A):$(j)}function A(j){if(j===62){const oe=a.toLowerCase();return np.includes(oe)?(e.consume(j),Q):$(j)}return At(j)&&a.length<8?(e.consume(j),a+=String.fromCharCode(j),A):$(j)}function q(j){return j===93?(e.consume(j),k):$(j)}function k(j){return j===62?(e.consume(j),Q):j===45&&i===2?(e.consume(j),k):$(j)}function Q(j){return j===null||ue(j)?(e.exit("htmlFlowData"),ae(j)):(e.consume(j),Q)}function ae(j){return e.exit("htmlFlow"),t(j)}}function f0(e,t,n){const r=this;return i;function i(a){return ue(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l):n(a)}function l(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function p0(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(zl,t,n)}}const h0={name:"htmlText",tokenize:m0};function m0(e,t,n){const r=this;let i,l,a;return s;function s(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),o}function o(k){return k===33?(e.consume(k),c):k===47?(e.consume(k),E):k===63?(e.consume(k),y):At(k)?(e.consume(k),_):n(k)}function c(k){return k===45?(e.consume(k),f):k===91?(e.consume(k),l=0,m):At(k)?(e.consume(k),x):n(k)}function f(k){return k===45?(e.consume(k),h):n(k)}function d(k){return k===null?n(k):k===45?(e.consume(k),p):ue(k)?(a=d,le(k)):(e.consume(k),d)}function p(k){return k===45?(e.consume(k),h):d(k)}function h(k){return k===62?J(k):k===45?p(k):d(k)}function m(k){const Q="CDATA[";return k===Q.charCodeAt(l++)?(e.consume(k),l===Q.length?v:m):n(k)}function v(k){return k===null?n(k):k===93?(e.consume(k),w):ue(k)?(a=v,le(k)):(e.consume(k),v)}function w(k){return k===93?(e.consume(k),g):v(k)}function g(k){return k===62?J(k):k===93?(e.consume(k),g):v(k)}function x(k){return k===null||k===62?J(k):ue(k)?(a=x,le(k)):(e.consume(k),x)}function y(k){return k===null?n(k):k===63?(e.consume(k),C):ue(k)?(a=y,le(k)):(e.consume(k),y)}function C(k){return k===62?J(k):y(k)}function E(k){return At(k)?(e.consume(k),b):n(k)}function b(k){return k===45||zt(k)?(e.consume(k),b):T(k)}function T(k){return ue(k)?(a=T,le(k)):Ce(k)?(e.consume(k),T):J(k)}function _(k){return k===45||zt(k)?(e.consume(k),_):k===47||k===62||$e(k)?R(k):n(k)}function R(k){return k===47?(e.consume(k),J):k===58||k===95||At(k)?(e.consume(k),N):ue(k)?(a=R,le(k)):Ce(k)?(e.consume(k),R):J(k)}function N(k){return k===45||k===46||k===58||k===95||zt(k)?(e.consume(k),N):M(k)}function M(k){return k===61?(e.consume(k),$):ue(k)?(a=M,le(k)):Ce(k)?(e.consume(k),M):R(k)}function $(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),i=k,L):ue(k)?(a=$,le(k)):Ce(k)?(e.consume(k),$):(e.consume(k),B)}function L(k){return k===i?(e.consume(k),i=void 0,I):k===null?n(k):ue(k)?(a=L,le(k)):(e.consume(k),L)}function B(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||$e(k)?R(k):(e.consume(k),B)}function I(k){return k===47||k===62||$e(k)?R(k):n(k)}function J(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function le(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),A}function A(k){return Ce(k)?Pe(e,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):q(k)}function q(k){return e.enter("htmlTextData"),a(k)}}const ed={name:"labelEnd",resolveAll:v0,resolveTo:w0,tokenize:b0},g0={tokenize:k0},y0={tokenize:S0},x0={tokenize:E0};function v0(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Qt(e,0,e.length,n),e}function w0(e,t){let n=e.length,r=0,i,l,a,s;for(;n--;)if(i=e[n][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const o={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[l][1].start},end:{...e[a][1].end}},f={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",o,t],["enter",c,t]],s=rn(s,e.slice(l+1,l+r+3)),s=rn(s,[["enter",f,t]]),s=rn(s,Ss(t.parser.constructs.insideSpan.null,e.slice(l+r+4,a-3),t)),s=rn(s,[["exit",f,t],e[a-2],e[a-1],["exit",c,t]]),s=rn(s,e.slice(a+1)),s=rn(s,[["exit",o,t]]),Qt(e,l,e.length,s),e}function b0(e,t,n){const r=this;let i=r.events.length,l,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return s;function s(p){return l?l._inactive?d(p):(a=r.parser.defined.includes(yn(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),o):n(p)}function o(p){return p===40?e.attempt(g0,f,a?f:d)(p):p===91?e.attempt(y0,f,a?c:d)(p):a?f(p):d(p)}function c(p){return e.attempt(x0,f,d)(p)}function f(p){return t(p)}function d(p){return l._balanced=!0,n(p)}}function k0(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return $e(d)?nl(e,l)(d):l(d)}function l(d){return d===41?f(d):Zg(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return $e(d)?nl(e,o)(d):f(d)}function s(d){return n(d)}function o(d){return d===34||d===39||d===40?ey(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):f(d)}function c(d){return $e(d)?nl(e,f)(d):f(d)}function f(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function S0(e,t,n){const r=this;return i;function i(s){return Jg.call(r,e,l,a,"reference","referenceMarker","referenceString")(s)}function l(s){return r.parser.defined.includes(yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function E0(e,t,n){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const j0={name:"labelStartImage",resolveAll:ed.resolveAll,tokenize:C0};function C0(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),l}function l(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const N0={name:"labelStartLink",resolveAll:ed.resolveAll,tokenize:T0};function T0(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),l}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const mo={name:"lineEnding",tokenize:_0};function _0(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Pe(e,t,"linePrefix")}}const ba={name:"thematicBreak",tokenize:z0};function z0(e,t,n){let r=0,i;return l;function l(c){return e.enter("thematicBreak"),a(c)}function a(c){return i=c,s(c)}function s(c){return c===i?(e.enter("thematicBreakSequence"),o(c)):r>=3&&(c===null||ue(c))?(e.exit("thematicBreak"),t(c)):n(c)}function o(c){return c===i?(e.consume(c),r++,o):(e.exit("thematicBreakSequence"),Ce(c)?Pe(e,s,"whitespace")(c):s(c))}}const Mt={continuation:{tokenize:A0},exit:L0,name:"list",tokenize:I0},P0={partial:!0,tokenize:O0},R0={partial:!0,tokenize:D0};function I0(e,t,n){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(h){const m=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Fu(h)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(ba,n,c)(h):c(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(h)}return n(h)}function o(h){return Fu(h)&&++a<10?(e.consume(h),o):(!r.interrupt||a<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),c(h)):n(h)}function c(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(zl,r.interrupt?n:f,e.attempt(P0,p,d))}function f(h){return r.containerState.initialBlankLine=!0,l++,p(h)}function d(h){return Ce(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function A0(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(zl,i,l);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Pe(e,t,"listItemIndent",r.containerState.size+1)(s)}function l(s){return r.containerState.furtherBlankLines||!Ce(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(R0,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Pe(e,e.attempt(Mt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function D0(e,t,n){const r=this;return Pe(e,i,"listItemIndent",r.containerState.size+1);function i(l){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(l):n(l)}}function L0(e){e.exit(this.containerState.type)}function O0(e,t,n){const r=this;return Pe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const a=r.events[r.events.length-1];return!Ce(l)&&a&&a[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const rp={name:"setextUnderline",resolveTo:F0,tokenize:M0};function F0(e,t){let n=e.length,r,i,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",a,t]),e.splice(l+1,0,["exit",e[r][1],t]),e[r][1].end={...e[l][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function M0(e,t,n){const r=this;let i;return l;function l(c){let f=r.events.length,d;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){d=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===i?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),Ce(c)?Pe(e,o,"lineSuffix")(c):o(c))}function o(c){return c===null||ue(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const $0={tokenize:B0};function B0(e){const t=this,n=e.attempt(zl,r,e.attempt(this.parser.constructs.flowInitial,i,Pe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Gk,i)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const H0={resolveAll:ny()},U0=ty("string"),W0=ty("text");function ty(e){return{resolveAll:ny(e==="text"?V0:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],l=n.attempt(i,a,s);return a;function a(f){return c(f)?l(f):s(f)}function s(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),o}function o(f){return c(f)?(n.exit("data"),l(f)):(n.consume(f),o)}function c(f){if(f===null)return!0;const d=i[f];let p=-1;if(d)for(;++p<d.length;){const h=d[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function ny(e){return t;function t(n,r){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,r):n}}function V0(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let l=i.length,a=-1,s=0,o;for(;l--;){const c=i[l];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(c===-2)o=!0,s++;else if(c!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const c={type:n===e.length||o||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:r.start._bufferIndex+a,_index:r.start._index+l,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const G0={42:Mt,43:Mt,45:Mt,48:Mt,49:Mt,50:Mt,51:Mt,52:Mt,53:Mt,54:Mt,55:Mt,56:Mt,57:Mt,62:Yg},q0={91:Qk},Y0={[-2]:ho,[-1]:ho,32:ho},X0={35:r0,42:ba,45:[rp,ba],60:s0,61:rp,95:ba,96:tp,126:tp},K0={38:Kg,92:Xg},Q0={[-5]:mo,[-4]:mo,[-3]:mo,33:j0,38:Kg,42:Mu,60:[Nk,h0],91:N0,92:[t0,Xg],93:ed,95:Mu,96:$k},Z0={null:[Mu,H0]},J0={null:[42,95]},e1={null:[]},t1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:J0,contentInitial:q0,disable:e1,document:G0,flow:X0,flowInitial:Y0,insideSpan:Z0,string:K0,text:Q0},Symbol.toStringTag,{value:"Module"}));function n1(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},l=[];let a=[],s=[];const o={attempt:T(E),check:T(b),consume:x,enter:y,exit:C,interrupt:T(b,{interrupt:!0})},c={code:null,containerState:{},defineSkip:v,events:[],now:m,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:d};let f=t.tokenize.call(c,o);return t.resolveAll&&l.push(t),c;function d(M){return a=rn(a,M),w(),a[a.length-1]!==null?[]:(_(t,0),c.events=Ss(l,c.events,c),c.events)}function p(M,$){return i1(h(M),$)}function h(M){return r1(a,M)}function m(){const{_bufferIndex:M,_index:$,line:L,column:B,offset:I}=r;return{_bufferIndex:M,_index:$,line:L,column:B,offset:I}}function v(M){i[M.line]=M.column,N()}function w(){let M;for(;r._index<a.length;){const $=a[r._index];if(typeof $=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<$.length;)g($.charCodeAt(r._bufferIndex));else g($)}}function g(M){f=f(M)}function x(M){ue(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,N()):M!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=M}function y(M,$){const L=$||{};return L.type=M,L.start=m(),c.events.push(["enter",L,c]),s.push(L),L}function C(M){const $=s.pop();return $.end=m(),c.events.push(["exit",$,c]),$}function E(M,$){_(M,$.from)}function b(M,$){$.restore()}function T(M,$){return L;function L(B,I,J){let le,A,q,k;return Array.isArray(B)?ae(B):"tokenize"in B?ae([B]):Q(B);function Q(ne){return re;function re(we){const ce=we!==null&&ne[we],ze=we!==null&&ne.null,Y=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(ze)?ze:ze?[ze]:[]];return ae(Y)(we)}}function ae(ne){return le=ne,A=0,ne.length===0?J:j(ne[A])}function j(ne){return re;function re(we){return k=R(),q=ne,ne.partial||(c.currentConstruct=ne),ne.name&&c.parser.constructs.disable.null.includes(ne.name)?ve():ne.tokenize.call($?Object.assign(Object.create(c),$):c,o,oe,ve)(we)}}function oe(ne){return M(q,k),I}function ve(ne){return k.restore(),++A<le.length?j(le[A]):J}}}function _(M,$){M.resolveAll&&!l.includes(M)&&l.push(M),M.resolve&&Qt(c.events,$,c.events.length-$,M.resolve(c.events.slice($),c)),M.resolveTo&&(c.events=M.resolveTo(c.events,c))}function R(){const M=m(),$=c.previous,L=c.currentConstruct,B=c.events.length,I=Array.from(s);return{from:B,restore:J};function J(){r=M,c.previous=$,c.currentConstruct=L,c.events.length=B,s=I,N()}}function N(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function r1(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,l)];else{if(a=e.slice(n,i),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}l>0&&a.push(e[i].slice(0,l))}return a}function i1(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const l=e[n];let a;if(typeof l=="string")a=l;else switch(l){case-5:{a="\r";break}case-4:{a=`
42
- `;break}case-3:{a=`\r
43
- `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(l)}i=l===-2,r.push(a)}return r.join("")}function l1(e){const r={constructs:Gg([t1,...(e||{}).extensions||[]]),content:i(wk),defined:[],document:i(kk),flow:i($0),lazy:{},string:i(U0),text:i(W0)};return r;function i(l){return a;function a(s){return n1(r,l,s)}}}function a1(e){for(;!Qg(e););return e}const ip=/[\0\t\n\r]/g;function s1(){let e=1,t="",n=!0,r;return i;function i(l,a,s){const o=[];let c,f,d,p,h;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(a||void 0).decode(l)),d=0,t="",n&&(l.charCodeAt(0)===65279&&d++,n=void 0);d<l.length;){if(ip.lastIndex=d,c=ip.exec(l),p=c&&c.index!==void 0?c.index:l.length,h=l.charCodeAt(p),!c){t=l.slice(d);break}if(h===10&&d===p&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),d<p&&(o.push(l.slice(d,p)),e+=p-d),h){case 0:{o.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,o.push(-2);e++<f;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}d=p+1}return s&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const o1=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function u1(e){return e.replace(o1,c1)}function c1(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return qg(n.slice(l?2:1),l?16:10)}return Jc(n)||e}const ry={}.hasOwnProperty;function d1(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),f1(n)(a1(l1(n).document().write(s1()(e,t,!0))))}function f1(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(De),autolinkProtocol:R,autolinkEmail:R,atxHeading:l(rt),blockQuote:l(ze),characterEscape:R,characterReference:R,codeFenced:l(Y),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:l(Y,a),codeText:l(_e,a),codeTextData:R,data:R,codeFlowValue:R,definition:l(fe),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:l(pt),hardBreakEscape:l(Fe),hardBreakTrailing:l(Fe),htmlFlow:l(Le,a),htmlFlowData:R,htmlText:l(Le,a),htmlTextData:R,image:l(Ft),label:a,link:l(De),listItem:l(qe),listItemValue:p,listOrdered:l(je,d),listUnordered:l(je),paragraph:l(Ke),reference:j,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:l(rt),strong:l(it),thematicBreak:l(ht)},exit:{atxHeading:o(),atxHeadingSequence:E,autolink:o(),autolinkEmail:ce,autolinkProtocol:we,blockQuote:o(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:ne,characterReference:re,codeFenced:o(w),codeFencedFence:v,codeFencedFenceInfo:h,codeFencedFenceMeta:m,codeFlowValue:N,codeIndented:o(g),codeText:o(I),codeTextData:N,data:N,definition:o(),definitionDestinationString:C,definitionLabelString:x,definitionTitleString:y,emphasis:o(),hardBreakEscape:o($),hardBreakTrailing:o($),htmlFlow:o(L),htmlFlowData:N,htmlText:o(B),htmlTextData:N,image:o(le),label:q,labelText:A,lineEnding:M,link:o(J),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:oe,resourceDestinationString:k,resourceTitleString:Q,resource:ae,setextHeading:o(_),setextHeadingLineSequence:T,setextHeadingText:b,strong:o(),thematicBreak:o()}};iy(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(z){let F={type:"root",children:[]};const te={stack:[F],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:f,data:n},pe=[];let me=-1;for(;++me<z.length;)if(z[me][1].type==="listOrdered"||z[me][1].type==="listUnordered")if(z[me][0]==="enter")pe.push(me);else{const Ae=pe.pop();me=i(z,Ae,me)}for(me=-1;++me<z.length;){const Ae=t[z[me][0]];ry.call(Ae,z[me][1].type)&&Ae[z[me][1].type].call(Object.assign({sliceSerialize:z[me][2].sliceSerialize},te),z[me][1])}if(te.tokenStack.length>0){const Ae=te.tokenStack[te.tokenStack.length-1];(Ae[1]||lp).call(te,void 0,Ae[0])}for(F.position={start:Gn(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:Gn(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},me=-1;++me<t.transforms.length;)F=t.transforms[me](F)||F;return F}function i(z,F,te){let pe=F-1,me=-1,Ae=!1,Qe,ot,bt,mt;for(;++pe<=te;){const Ze=z[pe];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?me++:me--,mt=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(Qe&&!mt&&!me&&!bt&&(bt=pe),mt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:mt=void 0}if(!me&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||me===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(Qe){let We=pe;for(ot=void 0;We--;){const xt=z[We];if(xt[1].type==="lineEnding"||xt[1].type==="lineEndingBlank"){if(xt[0]==="exit")continue;ot&&(z[ot][1].type="lineEndingBlank",Ae=!0),xt[1].type="lineEnding",ot=We}else if(!(xt[1].type==="linePrefix"||xt[1].type==="blockQuotePrefix"||xt[1].type==="blockQuotePrefixWhitespace"||xt[1].type==="blockQuoteMarker"||xt[1].type==="listItemIndent"))break}bt&&(!ot||bt<ot)&&(Qe._spread=!0),Qe.end=Object.assign({},ot?z[ot][1].start:Ze[1].end),z.splice(ot||pe,0,["exit",Qe,Ze[2]]),pe++,te++}if(Ze[1].type==="listItemPrefix"){const We={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};Qe=We,z.splice(pe,0,["enter",We,Ze[2]]),pe++,te++,bt=void 0,mt=!0}}}return z[F][1]._spread=Ae,te}function l(z,F){return te;function te(pe){s.call(this,z(pe),pe),F&&F.call(this,pe)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(z,F,te){this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([F,te||void 0]),z.position={start:Gn(F.start),end:void 0}}function o(z){return F;function F(te){z&&z.call(this,te),c.call(this,te)}}function c(z,F){const te=this.stack.pop(),pe=this.tokenStack.pop();if(pe)pe[0].type!==z.type&&(F?F.call(this,z,pe[0]):(pe[1]||lp).call(this,z,pe[0]));else throw new Error("Cannot close `"+z.type+"` ("+tl({start:z.start,end:z.end})+"): it’s not open");te.position.end=Gn(z.end)}function f(){return Zc(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(z){if(this.data.expectingFirstListItemValue){const F=this.stack[this.stack.length-2];F.start=Number.parseInt(this.sliceSerialize(z),10),this.data.expectingFirstListItemValue=void 0}}function h(){const z=this.resume(),F=this.stack[this.stack.length-1];F.lang=z}function m(){const z=this.resume(),F=this.stack[this.stack.length-1];F.meta=z}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const z=this.resume(),F=this.stack[this.stack.length-1];F.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const z=this.resume(),F=this.stack[this.stack.length-1];F.value=z.replace(/(\r?\n|\r)$/g,"")}function x(z){const F=this.resume(),te=this.stack[this.stack.length-1];te.label=F,te.identifier=yn(this.sliceSerialize(z)).toLowerCase()}function y(){const z=this.resume(),F=this.stack[this.stack.length-1];F.title=z}function C(){const z=this.resume(),F=this.stack[this.stack.length-1];F.url=z}function E(z){const F=this.stack[this.stack.length-1];if(!F.depth){const te=this.sliceSerialize(z).length;F.depth=te}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function T(z){const F=this.stack[this.stack.length-1];F.depth=this.sliceSerialize(z).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function R(z){const te=this.stack[this.stack.length-1].children;let pe=te[te.length-1];(!pe||pe.type!=="text")&&(pe=un(),pe.position={start:Gn(z.start),end:void 0},te.push(pe)),this.stack.push(pe)}function N(z){const F=this.stack.pop();F.value+=this.sliceSerialize(z),F.position.end=Gn(z.end)}function M(z){const F=this.stack[this.stack.length-1];if(this.data.atHardBreak){const te=F.children[F.children.length-1];te.position.end=Gn(z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(F.type)&&(R.call(this,z),N.call(this,z))}function $(){this.data.atHardBreak=!0}function L(){const z=this.resume(),F=this.stack[this.stack.length-1];F.value=z}function B(){const z=this.resume(),F=this.stack[this.stack.length-1];F.value=z}function I(){const z=this.resume(),F=this.stack[this.stack.length-1];F.value=z}function J(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const F=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=F,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function le(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const F=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=F,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function A(z){const F=this.sliceSerialize(z),te=this.stack[this.stack.length-2];te.label=u1(F),te.identifier=yn(F).toLowerCase()}function q(){const z=this.stack[this.stack.length-1],F=this.resume(),te=this.stack[this.stack.length-1];if(this.data.inReference=!0,te.type==="link"){const pe=z.children;te.children=pe}else te.alt=F}function k(){const z=this.resume(),F=this.stack[this.stack.length-1];F.url=z}function Q(){const z=this.resume(),F=this.stack[this.stack.length-1];F.title=z}function ae(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function oe(z){const F=this.resume(),te=this.stack[this.stack.length-1];te.label=F,te.identifier=yn(this.sliceSerialize(z)).toLowerCase(),this.data.referenceType="full"}function ve(z){this.data.characterReferenceType=z.type}function ne(z){const F=this.sliceSerialize(z),te=this.data.characterReferenceType;let pe;te?(pe=qg(F,te==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):pe=Jc(F);const me=this.stack[this.stack.length-1];me.value+=pe}function re(z){const F=this.stack.pop();F.position.end=Gn(z.end)}function we(z){N.call(this,z);const F=this.stack[this.stack.length-1];F.url=this.sliceSerialize(z)}function ce(z){N.call(this,z);const F=this.stack[this.stack.length-1];F.url="mailto:"+this.sliceSerialize(z)}function ze(){return{type:"blockquote",children:[]}}function Y(){return{type:"code",lang:null,meta:null,value:""}}function _e(){return{type:"inlineCode",value:""}}function fe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function pt(){return{type:"emphasis",children:[]}}function rt(){return{type:"heading",depth:0,children:[]}}function Fe(){return{type:"break"}}function Le(){return{type:"html",value:""}}function Ft(){return{type:"image",title:null,url:"",alt:null}}function De(){return{type:"link",title:null,url:"",children:[]}}function je(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function qe(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function Ke(){return{type:"paragraph",children:[]}}function it(){return{type:"strong",children:[]}}function un(){return{type:"text",value:""}}function ht(){return{type:"thematicBreak"}}}function Gn(e){return{line:e.line,column:e.column,offset:e.offset}}function iy(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?iy(e,r):p1(e,r)}}function p1(e,t){let n;for(n in t)if(ry.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function lp(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+tl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+tl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+tl({start:t.start,end:t.end})+") is still open")}function h1(e){const t=this;t.parser=n;function n(r){return d1(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function m1(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function g1(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
44
- `}]}function y1(e,t){const n=t.value?t.value+`
45
- `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function x1(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function v1(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function w1(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ni(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=l+1,s+=1,e.footnoteCounts.set(r,s);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,o);const c={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,c),e.applyData(t,c)}function b1(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function k1(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ly(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function S1(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ly(e,t);const i={src:Ni(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function E1(e,t){const n={src:Ni(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function j1(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function C1(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ly(e,t);const i={href:Ni(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function N1(e,t){const n={href:Ni(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function T1(e,t,n){const r=e.all(t),i=n?_1(n):ay(t),l={},a=[];if(typeof t.checked=="boolean"){const f=r[0];let d;f&&f.type==="element"&&f.tagName==="p"?d=f:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const f=r[s];(i||s!==0||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
46
- `}),f.type==="element"&&f.tagName==="p"&&!i?a.push(...f.children):a.push(f)}const o=r[r.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&a.push({type:"text",value:`
47
- `});const c={type:"element",tagName:"li",properties:l,children:a};return e.patch(t,c),e.applyData(t,c)}function _1(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=ay(n[r])}return t}function ay(e){const t=e.spread;return t??e.children.length>1}function z1(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,l),e.applyData(t,l)}function P1(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function R1(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function I1(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function A1(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Yc(t.children[1]),o=Mg(t.children[t.children.length-1]);s&&o&&(a.position={start:s,end:o}),i.push(a)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function D1(e,t,n){const r=n?n.children:void 0,l=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:t.children.length;let o=-1;const c=[];for(;++o<s;){const d=t.children[o],p={},h=a?a[o]:void 0;h&&(p.align=h);let m={type:"element",tagName:l,properties:p,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(d,m)),c.push(m)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,f),e.applyData(t,f)}function L1(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ap=9,sp=32;function O1(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const l=[];for(;r;)l.push(op(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(op(t.slice(i),i>0,!1)),l.join("")}function op(e,t,n){let r=0,i=e.length;if(t){let l=e.codePointAt(r);for(;l===ap||l===sp;)r++,l=e.codePointAt(r)}if(n){let l=e.codePointAt(i-1);for(;l===ap||l===sp;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function F1(e,t){const n={type:"text",value:O1(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function M1(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const $1={blockquote:m1,break:g1,code:y1,delete:x1,emphasis:v1,footnoteReference:w1,heading:b1,html:k1,imageReference:S1,image:E1,inlineCode:j1,linkReference:C1,link:N1,listItem:T1,list:z1,paragraph:P1,root:R1,strong:I1,table:A1,tableCell:L1,tableRow:D1,text:F1,thematicBreak:M1,toml:ta,yaml:ta,definition:ta,footnoteDefinition:ta};function ta(){}const sy=-1,Es=0,rl=1,Za=2,td=3,nd=4,rd=5,id=6,oy=7,uy=8,B1=typeof self=="object"?self:globalThis,up=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new B1[e](t)},H1=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,a]=t[i];switch(l){case Es:case sy:return n(a,i);case rl:{const s=n([],i);for(const o of a)s.push(r(o));return s}case Za:{const s=n({},i);for(const[o,c]of a)s[r(o)]=r(c);return s}case td:return n(new Date(a),i);case nd:{const{source:s,flags:o}=a;return n(new RegExp(s,o),i)}case rd:{const s=n(new Map,i);for(const[o,c]of a)s.set(r(o),r(c));return s}case id:{const s=n(new Set,i);for(const o of a)s.add(r(o));return s}case oy:{const{name:s,message:o}=a;return n(up(s,o),i)}case uy:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:s}=new Uint8Array(a);return n(new DataView(s),a)}}return n(up(l,a),i)};return r},cp=e=>H1(new Map,e)(0),Hr="",{toString:U1}={},{keys:W1}=Object,Mi=e=>{const t=typeof e;if(t!=="object"||!e)return[Es,t];const n=U1.call(e).slice(8,-1);switch(n){case"Array":return[rl,Hr];case"Object":return[Za,Hr];case"Date":return[td,Hr];case"RegExp":return[nd,Hr];case"Map":return[rd,Hr];case"Set":return[id,Hr];case"DataView":return[rl,n]}return n.includes("Array")?[rl,n]:n.includes("Error")?[oy,n]:[Za,n]},na=([e,t])=>e===Es&&(t==="function"||t==="symbol"),V1=(e,t,n,r)=>{const i=(a,s)=>{const o=r.push(a)-1;return n.set(s,o),o},l=a=>{if(n.has(a))return n.get(a);let[s,o]=Mi(a);switch(s){case Es:{let f=a;switch(o){case"bigint":s=uy,f=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);f=null;break;case"undefined":return i([sy],a)}return i([s,f],a)}case rl:{if(o){let p=a;return o==="DataView"?p=new Uint8Array(a.buffer):o==="ArrayBuffer"&&(p=new Uint8Array(a)),i([o,[...p]],a)}const f=[],d=i([s,f],a);for(const p of a)f.push(l(p));return d}case Za:{if(o)switch(o){case"BigInt":return i([o,a.toString()],a);case"Boolean":case"Number":case"String":return i([o,a.valueOf()],a)}if(t&&"toJSON"in a)return l(a.toJSON());const f=[],d=i([s,f],a);for(const p of W1(a))(e||!na(Mi(a[p])))&&f.push([l(p),l(a[p])]);return d}case td:return i([s,a.toISOString()],a);case nd:{const{source:f,flags:d}=a;return i([s,{source:f,flags:d}],a)}case rd:{const f=[],d=i([s,f],a);for(const[p,h]of a)(e||!(na(Mi(p))||na(Mi(h))))&&f.push([l(p),l(h)]);return d}case id:{const f=[],d=i([s,f],a);for(const p of a)(e||!na(Mi(p)))&&f.push(l(p));return d}}const{message:c}=a;return i([s,{name:o,message:c}],a)};return l},dp=(e,{json:t,lossy:n}={})=>{const r=[];return V1(!(t||n),!!t,new Map,r)(e),r},Ja=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?cp(dp(e,t)):structuredClone(e):(e,t)=>cp(dp(e,t));function G1(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function q1(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Y1(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||G1,r=e.options.footnoteBackLabel||q1,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let o=-1;for(;++o<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[o]);if(!c)continue;const f=e.all(c),d=String(c.identifier).toUpperCase(),p=Ni(d.toLowerCase());let h=0;const m=[],v=e.footnoteCounts.get(d);for(;v!==void 0&&++h<=v;){m.length>0&&m.push({type:"text",value:" "});let x=typeof n=="string"?n:n(o,h);typeof x=="string"&&(x={type:"text",value:x}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,h),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const w=f[f.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const x=w.children[w.children.length-1];x&&x.type==="text"?x.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...m)}else f.push(...m);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(c,g),s.push(g)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Ja(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
35
+ `),a=r.stack.split(`
36
+ `),l=i.length-1,s=a.length-1;1<=l&&0<=s&&i[l]!==a[s];)s--;for(;1<=l&&0<=s;l--,s--)if(i[l]!==a[s]){if(l!==1||s!==1)do if(l--,s--,0>s||i[l]!==a[s]){var o=`
37
+ `+i[l].replace(" at new "," at ");return e.displayName&&o.includes("<anonymous>")&&(o=o.replace("<anonymous>",e.displayName)),o}while(1<=l&&0<=s);break}}}finally{Bs=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bi(e):""}function av(e){switch(e.tag){case 5:return Bi(e.type);case 16:return Bi("Lazy");case 13:return Bi("Suspense");case 19:return Bi("SuspenseList");case 0:case 2:case 15:return e=Hs(e.type,!1),e;case 11:return e=Hs(e.type.render,!1),e;case 1:return e=Hs(e.type,!0),e;default:return""}}function Go(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Yr:return"Fragment";case qr:return"Portal";case Uo:return"Profiler";case ac:return"StrictMode";case Wo:return"Suspense";case Vo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Lh:return(e.displayName||"Context")+".Consumer";case Dh:return(e._context.displayName||"Context")+".Provider";case lc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case sc:return t=e.displayName||null,t!==null?t:Go(e.type)||"Memo";case Xn:t=e._payload,e=e._init;try{return Go(e(t))}catch{}}return null}function lv(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Go(t);case 8:return t===ac?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ur(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Fh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sv(e){var t=Fh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,a.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $a(e){e._valueTracker||(e._valueTracker=sv(e))}function Mh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Fh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Nl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function qo(e,t){var n=t.checked;return nt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Dd(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ur(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function $h(e,t){t=t.checked,t!=null&&ic(e,"checked",t,!1)}function Yo(e,t){$h(e,t);var n=ur(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Xo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Xo(e,t.type,ur(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ld(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Xo(e,t,n){(t!=="number"||Nl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Hi=Array.isArray;function si(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ur(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ko(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(H(91));return nt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Od(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(H(92));if(Hi(n)){if(1<n.length)throw Error(H(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ur(n)}}function Bh(e,t){var n=ur(t.value),r=ur(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Fd(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Hh(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Qo(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Hh(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ba,Uh=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ba=Ba||document.createElement("div"),Ba.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ba.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function aa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ov=["Webkit","ms","Moz","O"];Object.keys(Gi).forEach(function(e){ov.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gi[t]=Gi[e]})});function Wh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Gi.hasOwnProperty(e)&&Gi[e]?(""+t).trim():t+"px"}function Vh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Wh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var uv=nt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Zo(e,t){if(t){if(uv[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function Jo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var eu=null;function oc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var tu=null,oi=null,ui=null;function Md(e){if(e=Na(e)){if(typeof tu!="function")throw Error(H(280));var t=e.stateNode;t&&(t=cs(t),tu(e.stateNode,e.type,t))}}function Gh(e){oi?ui?ui.push(e):ui=[e]:oi=e}function qh(){if(oi){var e=oi,t=ui;if(ui=oi=null,Md(e),t)for(e=0;e<t.length;e++)Md(t[e])}}function Yh(e,t){return e(t)}function Xh(){}var Us=!1;function Kh(e,t,n){if(Us)return e(t,n);Us=!0;try{return Yh(e,t,n)}finally{Us=!1,(oi!==null||ui!==null)&&(Xh(),qh())}}function la(e,t){var n=e.stateNode;if(n===null)return null;var r=cs(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(H(231,t,typeof n));return n}var nu=!1;if(Mn)try{var Pi={};Object.defineProperty(Pi,"passive",{get:function(){nu=!0}}),window.addEventListener("test",Pi,Pi),window.removeEventListener("test",Pi,Pi)}catch{nu=!1}function cv(e,t,n,r,i,a,l,s,o){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(f){this.onError(f)}}var qi=!1,Tl=null,_l=!1,ru=null,dv={onError:function(e){qi=!0,Tl=e}};function fv(e,t,n,r,i,a,l,s,o){qi=!1,Tl=null,cv.apply(dv,arguments)}function pv(e,t,n,r,i,a,l,s,o){if(fv.apply(this,arguments),qi){if(qi){var c=Tl;qi=!1,Tl=null}else throw Error(H(198));_l||(_l=!0,ru=c)}}function Mr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Qh(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function $d(e){if(Mr(e)!==e)throw Error(H(188))}function hv(e){var t=e.alternate;if(!t){if(t=Mr(e),t===null)throw Error(H(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return $d(i),e;if(a===r)return $d(i),t;a=a.sibling}throw Error(H(188))}if(n.return!==r.return)n=i,r=a;else{for(var l=!1,s=i.child;s;){if(s===n){l=!0,n=i,r=a;break}if(s===r){l=!0,r=i,n=a;break}s=s.sibling}if(!l){for(s=a.child;s;){if(s===n){l=!0,n=a,r=i;break}if(s===r){l=!0,r=a,n=i;break}s=s.sibling}if(!l)throw Error(H(189))}}if(n.alternate!==r)throw Error(H(190))}if(n.tag!==3)throw Error(H(188));return n.stateNode.current===n?e:t}function Zh(e){return e=hv(e),e!==null?Jh(e):null}function Jh(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Jh(e);if(t!==null)return t;e=e.sibling}return null}var em=Zt.unstable_scheduleCallback,Bd=Zt.unstable_cancelCallback,mv=Zt.unstable_shouldYield,gv=Zt.unstable_requestPaint,st=Zt.unstable_now,yv=Zt.unstable_getCurrentPriorityLevel,uc=Zt.unstable_ImmediatePriority,tm=Zt.unstable_UserBlockingPriority,zl=Zt.unstable_NormalPriority,xv=Zt.unstable_LowPriority,nm=Zt.unstable_IdlePriority,ls=null,Cn=null;function vv(e){if(Cn&&typeof Cn.onCommitFiberRoot=="function")try{Cn.onCommitFiberRoot(ls,e,void 0,(e.current.flags&128)===128)}catch{}}var mn=Math.clz32?Math.clz32:kv,wv=Math.log,bv=Math.LN2;function kv(e){return e>>>=0,e===0?32:31-(wv(e)/bv|0)|0}var Ha=64,Ua=4194304;function Ui(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Pl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~i;s!==0?r=Ui(s):(a&=l,a!==0&&(r=Ui(a)))}else l=n&~i,l!==0?r=Ui(l):a!==0&&(r=Ui(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-mn(t),i=1<<n,r|=e[n],t&=~i;return r}function Sv(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ev(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var l=31-mn(a),s=1<<l,o=i[l];o===-1?(!(s&n)||s&r)&&(i[l]=Sv(s,t)):o<=t&&(e.expiredLanes|=s),a&=~s}}function iu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function rm(){var e=Ha;return Ha<<=1,!(Ha&4194240)&&(Ha=64),e}function Ws(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ja(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-mn(t),e[t]=n}function jv(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-mn(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function cc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-mn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Oe=0;function im(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var am,dc,lm,sm,om,au=!1,Wa=[],tr=null,nr=null,rr=null,sa=new Map,oa=new Map,Qn=[],Cv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Hd(e,t){switch(e){case"focusin":case"focusout":tr=null;break;case"dragenter":case"dragleave":nr=null;break;case"mouseover":case"mouseout":rr=null;break;case"pointerover":case"pointerout":sa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":oa.delete(t.pointerId)}}function Ri(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Na(t),t!==null&&dc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Nv(e,t,n,r,i){switch(t){case"focusin":return tr=Ri(tr,e,t,n,r,i),!0;case"dragenter":return nr=Ri(nr,e,t,n,r,i),!0;case"mouseover":return rr=Ri(rr,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return sa.set(a,Ri(sa.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,oa.set(a,Ri(oa.get(a)||null,e,t,n,r,i)),!0}return!1}function um(e){var t=Sr(e.target);if(t!==null){var n=Mr(t);if(n!==null){if(t=n.tag,t===13){if(t=Qh(n),t!==null){e.blockedOn=t,om(e.priority,function(){lm(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function dl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=lu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);eu=r,n.target.dispatchEvent(r),eu=null}else return t=Na(n),t!==null&&dc(t),e.blockedOn=n,!1;t.shift()}return!0}function Ud(e,t,n){dl(e)&&n.delete(t)}function Tv(){au=!1,tr!==null&&dl(tr)&&(tr=null),nr!==null&&dl(nr)&&(nr=null),rr!==null&&dl(rr)&&(rr=null),sa.forEach(Ud),oa.forEach(Ud)}function Ii(e,t){e.blockedOn===t&&(e.blockedOn=null,au||(au=!0,Zt.unstable_scheduleCallback(Zt.unstable_NormalPriority,Tv)))}function ua(e){function t(i){return Ii(i,e)}if(0<Wa.length){Ii(Wa[0],e);for(var n=1;n<Wa.length;n++){var r=Wa[n];r.blockedOn===e&&(r.blockedOn=null)}}for(tr!==null&&Ii(tr,e),nr!==null&&Ii(nr,e),rr!==null&&Ii(rr,e),sa.forEach(t),oa.forEach(t),n=0;n<Qn.length;n++)r=Qn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Qn.length&&(n=Qn[0],n.blockedOn===null);)um(n),n.blockedOn===null&&Qn.shift()}var ci=Un.ReactCurrentBatchConfig,Rl=!0;function _v(e,t,n,r){var i=Oe,a=ci.transition;ci.transition=null;try{Oe=1,fc(e,t,n,r)}finally{Oe=i,ci.transition=a}}function zv(e,t,n,r){var i=Oe,a=ci.transition;ci.transition=null;try{Oe=4,fc(e,t,n,r)}finally{Oe=i,ci.transition=a}}function fc(e,t,n,r){if(Rl){var i=lu(e,t,n,r);if(i===null)eo(e,t,r,Il,n),Hd(e,r);else if(Nv(i,e,t,n,r))r.stopPropagation();else if(Hd(e,r),t&4&&-1<Cv.indexOf(e)){for(;i!==null;){var a=Na(i);if(a!==null&&am(a),a=lu(e,t,n,r),a===null&&eo(e,t,r,Il,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else eo(e,t,r,null,n)}}var Il=null;function lu(e,t,n,r){if(Il=null,e=oc(r),e=Sr(e),e!==null)if(t=Mr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Qh(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Il=e,null}function cm(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(yv()){case uc:return 1;case tm:return 4;case zl:case xv:return 16;case nm:return 536870912;default:return 16}default:return 16}}var Jn=null,pc=null,fl=null;function dm(){if(fl)return fl;var e,t=pc,n=t.length,r,i="value"in Jn?Jn.value:Jn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===i[a-r];r++);return fl=i.slice(e,1<r?1-r:void 0)}function pl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Va(){return!0}function Wd(){return!1}function en(e){function t(n,r,i,a,l){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=a,this.target=l,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Va:Wd,this.isPropagationStopped=Wd,this}return nt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Va)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Va)},persist:function(){},isPersistent:Va}),t}var Ei={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hc=en(Ei),Ca=nt({},Ei,{view:0,detail:0}),Pv=en(Ca),Vs,Gs,Ai,ss=nt({},Ca,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ai&&(Ai&&e.type==="mousemove"?(Vs=e.screenX-Ai.screenX,Gs=e.screenY-Ai.screenY):Gs=Vs=0,Ai=e),Vs)},movementY:function(e){return"movementY"in e?e.movementY:Gs}}),Vd=en(ss),Rv=nt({},ss,{dataTransfer:0}),Iv=en(Rv),Av=nt({},Ca,{relatedTarget:0}),qs=en(Av),Dv=nt({},Ei,{animationName:0,elapsedTime:0,pseudoElement:0}),Lv=en(Dv),Ov=nt({},Ei,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Fv=en(Ov),Mv=nt({},Ei,{data:0}),Gd=en(Mv),$v={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Bv={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Hv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Uv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Hv[e])?!!t[e]:!1}function mc(){return Uv}var Wv=nt({},Ca,{key:function(e){if(e.key){var t=$v[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=pl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Bv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mc,charCode:function(e){return e.type==="keypress"?pl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?pl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Vv=en(Wv),Gv=nt({},ss,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qd=en(Gv),qv=nt({},Ca,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mc}),Yv=en(qv),Xv=nt({},Ei,{propertyName:0,elapsedTime:0,pseudoElement:0}),Kv=en(Xv),Qv=nt({},ss,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Zv=en(Qv),Jv=[9,13,27,32],gc=Mn&&"CompositionEvent"in window,Yi=null;Mn&&"documentMode"in document&&(Yi=document.documentMode);var ew=Mn&&"TextEvent"in window&&!Yi,fm=Mn&&(!gc||Yi&&8<Yi&&11>=Yi),Yd=" ",Xd=!1;function pm(e,t){switch(e){case"keyup":return Jv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xr=!1;function tw(e,t){switch(e){case"compositionend":return hm(t);case"keypress":return t.which!==32?null:(Xd=!0,Yd);case"textInput":return e=t.data,e===Yd&&Xd?null:e;default:return null}}function nw(e,t){if(Xr)return e==="compositionend"||!gc&&pm(e,t)?(e=dm(),fl=pc=Jn=null,Xr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return fm&&t.locale!=="ko"?null:t.data;default:return null}}var rw={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Kd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!rw[e.type]:t==="textarea"}function mm(e,t,n,r){Gh(r),t=Al(t,"onChange"),0<t.length&&(n=new hc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xi=null,ca=null;function iw(e){Cm(e,0)}function os(e){var t=Zr(e);if(Mh(t))return e}function aw(e,t){if(e==="change")return t}var gm=!1;if(Mn){var Ys;if(Mn){var Xs="oninput"in document;if(!Xs){var Qd=document.createElement("div");Qd.setAttribute("oninput","return;"),Xs=typeof Qd.oninput=="function"}Ys=Xs}else Ys=!1;gm=Ys&&(!document.documentMode||9<document.documentMode)}function Zd(){Xi&&(Xi.detachEvent("onpropertychange",ym),ca=Xi=null)}function ym(e){if(e.propertyName==="value"&&os(ca)){var t=[];mm(t,ca,e,oc(e)),Kh(iw,t)}}function lw(e,t,n){e==="focusin"?(Zd(),Xi=t,ca=n,Xi.attachEvent("onpropertychange",ym)):e==="focusout"&&Zd()}function sw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return os(ca)}function ow(e,t){if(e==="click")return os(t)}function uw(e,t){if(e==="input"||e==="change")return os(t)}function cw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vn=typeof Object.is=="function"?Object.is:cw;function da(e,t){if(vn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ho.call(t,i)||!vn(e[i],t[i]))return!1}return!0}function Jd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ef(e,t){var n=Jd(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Jd(n)}}function xm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vm(){for(var e=window,t=Nl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nl(e.document)}return t}function yc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function dw(e){var t=vm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&xm(n.ownerDocument.documentElement,n)){if(r!==null&&yc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=ef(n,a);var l=ef(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var fw=Mn&&"documentMode"in document&&11>=document.documentMode,Kr=null,su=null,Ki=null,ou=!1;function tf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ou||Kr==null||Kr!==Nl(r)||(r=Kr,"selectionStart"in r&&yc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ki&&da(Ki,r)||(Ki=r,r=Al(su,"onSelect"),0<r.length&&(t=new hc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Kr)))}function Ga(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Qr={animationend:Ga("Animation","AnimationEnd"),animationiteration:Ga("Animation","AnimationIteration"),animationstart:Ga("Animation","AnimationStart"),transitionend:Ga("Transition","TransitionEnd")},Ks={},wm={};Mn&&(wm=document.createElement("div").style,"AnimationEvent"in window||(delete Qr.animationend.animation,delete Qr.animationiteration.animation,delete Qr.animationstart.animation),"TransitionEvent"in window||delete Qr.transitionend.transition);function us(e){if(Ks[e])return Ks[e];if(!Qr[e])return e;var t=Qr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in wm)return Ks[e]=t[n];return e}var bm=us("animationend"),km=us("animationiteration"),Sm=us("animationstart"),Em=us("transitionend"),jm=new Map,nf="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function fr(e,t){jm.set(e,t),Fr(t,[e])}for(var Qs=0;Qs<nf.length;Qs++){var Zs=nf[Qs],pw=Zs.toLowerCase(),hw=Zs[0].toUpperCase()+Zs.slice(1);fr(pw,"on"+hw)}fr(bm,"onAnimationEnd");fr(km,"onAnimationIteration");fr(Sm,"onAnimationStart");fr("dblclick","onDoubleClick");fr("focusin","onFocus");fr("focusout","onBlur");fr(Em,"onTransitionEnd");mi("onMouseEnter",["mouseout","mouseover"]);mi("onMouseLeave",["mouseout","mouseover"]);mi("onPointerEnter",["pointerout","pointerover"]);mi("onPointerLeave",["pointerout","pointerover"]);Fr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),mw=new Set("cancel close invalid load scroll toggle".split(" ").concat(Wi));function rf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,pv(r,t,void 0,e),e.currentTarget=null}function Cm(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var l=r.length-1;0<=l;l--){var s=r[l],o=s.instance,c=s.currentTarget;if(s=s.listener,o!==a&&i.isPropagationStopped())break e;rf(i,s,c),a=o}else for(l=0;l<r.length;l++){if(s=r[l],o=s.instance,c=s.currentTarget,s=s.listener,o!==a&&i.isPropagationStopped())break e;rf(i,s,c),a=o}}}if(_l)throw e=ru,_l=!1,ru=null,e}function Ve(e,t){var n=t[pu];n===void 0&&(n=t[pu]=new Set);var r=e+"__bubble";n.has(r)||(Nm(t,e,2,!1),n.add(r))}function Js(e,t,n){var r=0;t&&(r|=4),Nm(n,e,r,t)}var qa="_reactListening"+Math.random().toString(36).slice(2);function fa(e){if(!e[qa]){e[qa]=!0,Ah.forEach(function(n){n!=="selectionchange"&&(mw.has(n)||Js(n,!1,e),Js(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qa]||(t[qa]=!0,Js("selectionchange",!1,t))}}function Nm(e,t,n,r){switch(cm(t)){case 1:var i=_v;break;case 4:i=zv;break;default:i=fc}n=i.bind(null,t,n,e),i=void 0,!nu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function eo(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(l===4)for(l=r.return;l!==null;){var o=l.tag;if((o===3||o===4)&&(o=l.stateNode.containerInfo,o===i||o.nodeType===8&&o.parentNode===i))return;l=l.return}for(;s!==null;){if(l=Sr(s),l===null)return;if(o=l.tag,o===5||o===6){r=a=l;continue e}s=s.parentNode}}r=r.return}Kh(function(){var c=a,f=oc(n),d=[];e:{var p=jm.get(e);if(p!==void 0){var h=hc,m=e;switch(e){case"keypress":if(pl(n)===0)break e;case"keydown":case"keyup":h=Vv;break;case"focusin":m="focus",h=qs;break;case"focusout":m="blur",h=qs;break;case"beforeblur":case"afterblur":h=qs;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Vd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Iv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=Yv;break;case bm:case km:case Sm:h=Lv;break;case Em:h=Kv;break;case"scroll":h=Pv;break;case"wheel":h=Zv;break;case"copy":case"cut":case"paste":h=Fv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=qd}var v=(t&4)!==0,w=!v&&e==="scroll",g=v?p!==null?p+"Capture":null:p;v=[];for(var x=c,y;x!==null;){y=x;var C=y.stateNode;if(y.tag===5&&C!==null&&(y=C,g!==null&&(C=la(x,g),C!=null&&v.push(pa(x,C,y)))),w)break;x=x.return}0<v.length&&(p=new h(p,m,null,n,f),d.push({event:p,listeners:v}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&n!==eu&&(m=n.relatedTarget||n.fromElement)&&(Sr(m)||m[$n]))break e;if((h||p)&&(p=f.window===f?f:(p=f.ownerDocument)?p.defaultView||p.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=c,m=m?Sr(m):null,m!==null&&(w=Mr(m),m!==w||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=c),h!==m)){if(v=Vd,C="onMouseLeave",g="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(v=qd,C="onPointerLeave",g="onPointerEnter",x="pointer"),w=h==null?p:Zr(h),y=m==null?p:Zr(m),p=new v(C,x+"leave",h,n,f),p.target=w,p.relatedTarget=y,C=null,Sr(f)===c&&(v=new v(g,x+"enter",m,n,f),v.target=y,v.relatedTarget=w,C=v),w=C,h&&m)t:{for(v=h,g=m,x=0,y=v;y;y=Br(y))x++;for(y=0,C=g;C;C=Br(C))y++;for(;0<x-y;)v=Br(v),x--;for(;0<y-x;)g=Br(g),y--;for(;x--;){if(v===g||g!==null&&v===g.alternate)break t;v=Br(v),g=Br(g)}v=null}else v=null;h!==null&&af(d,p,h,v,!1),m!==null&&w!==null&&af(d,w,m,v,!0)}}e:{if(p=c?Zr(c):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var E=aw;else if(Kd(p))if(gm)E=uw;else{E=sw;var b=lw}else(h=p.nodeName)&&h.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(E=ow);if(E&&(E=E(e,c))){mm(d,E,n,f);break e}b&&b(e,p,c),e==="focusout"&&(b=p._wrapperState)&&b.controlled&&p.type==="number"&&Xo(p,"number",p.value)}switch(b=c?Zr(c):window,e){case"focusin":(Kd(b)||b.contentEditable==="true")&&(Kr=b,su=c,Ki=null);break;case"focusout":Ki=su=Kr=null;break;case"mousedown":ou=!0;break;case"contextmenu":case"mouseup":case"dragend":ou=!1,tf(d,n,f);break;case"selectionchange":if(fw)break;case"keydown":case"keyup":tf(d,n,f)}var T;if(gc)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else Xr?pm(e,n)&&(_="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(_="onCompositionStart");_&&(fm&&n.locale!=="ko"&&(Xr||_!=="onCompositionStart"?_==="onCompositionEnd"&&Xr&&(T=dm()):(Jn=f,pc="value"in Jn?Jn.value:Jn.textContent,Xr=!0)),b=Al(c,_),0<b.length&&(_=new Gd(_,e,null,n,f),d.push({event:_,listeners:b}),T?_.data=T:(T=hm(n),T!==null&&(_.data=T)))),(T=ew?tw(e,n):nw(e,n))&&(c=Al(c,"onBeforeInput"),0<c.length&&(f=new Gd("onBeforeInput","beforeinput",null,n,f),d.push({event:f,listeners:c}),f.data=T))}Cm(d,t)})}function pa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Al(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=la(e,n),a!=null&&r.unshift(pa(e,a,i)),a=la(e,t),a!=null&&r.push(pa(e,a,i))),e=e.return}return r}function Br(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function af(e,t,n,r,i){for(var a=t._reactName,l=[];n!==null&&n!==r;){var s=n,o=s.alternate,c=s.stateNode;if(o!==null&&o===r)break;s.tag===5&&c!==null&&(s=c,i?(o=la(n,a),o!=null&&l.unshift(pa(n,o,s))):i||(o=la(n,a),o!=null&&l.push(pa(n,o,s)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var gw=/\r\n?/g,yw=/\u0000|\uFFFD/g;function lf(e){return(typeof e=="string"?e:""+e).replace(gw,`
38
+ `).replace(yw,"")}function Ya(e,t,n){if(t=lf(t),lf(e)!==t&&n)throw Error(H(425))}function Dl(){}var uu=null,cu=null;function du(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var fu=typeof setTimeout=="function"?setTimeout:void 0,xw=typeof clearTimeout=="function"?clearTimeout:void 0,sf=typeof Promise=="function"?Promise:void 0,vw=typeof queueMicrotask=="function"?queueMicrotask:typeof sf<"u"?function(e){return sf.resolve(null).then(e).catch(ww)}:fu;function ww(e){setTimeout(function(){throw e})}function to(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),ua(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ua(t)}function ir(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function of(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ji=Math.random().toString(36).slice(2),jn="__reactFiber$"+ji,ha="__reactProps$"+ji,$n="__reactContainer$"+ji,pu="__reactEvents$"+ji,bw="__reactListeners$"+ji,kw="__reactHandles$"+ji;function Sr(e){var t=e[jn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[$n]||n[jn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=of(e);e!==null;){if(n=e[jn])return n;e=of(e)}return t}e=n,n=e.parentNode}return null}function Na(e){return e=e[jn]||e[$n],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Zr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(H(33))}function cs(e){return e[ha]||null}var hu=[],Jr=-1;function pr(e){return{current:e}}function Ge(e){0>Jr||(e.current=hu[Jr],hu[Jr]=null,Jr--)}function Ue(e,t){Jr++,hu[Jr]=e.current,e.current=t}var cr={},Pt=pr(cr),Ht=pr(!1),zr=cr;function gi(e,t){var n=e.type.contextTypes;if(!n)return cr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ut(e){return e=e.childContextTypes,e!=null}function Ll(){Ge(Ht),Ge(Pt)}function uf(e,t,n){if(Pt.current!==cr)throw Error(H(168));Ue(Pt,t),Ue(Ht,n)}function Tm(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(H(108,lv(e)||"Unknown",i));return nt({},n,r)}function Ol(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cr,zr=Pt.current,Ue(Pt,e),Ue(Ht,Ht.current),!0}function cf(e,t,n){var r=e.stateNode;if(!r)throw Error(H(169));n?(e=Tm(e,t,zr),r.__reactInternalMemoizedMergedChildContext=e,Ge(Ht),Ge(Pt),Ue(Pt,e)):Ge(Ht),Ue(Ht,n)}var In=null,ds=!1,no=!1;function _m(e){In===null?In=[e]:In.push(e)}function Sw(e){ds=!0,_m(e)}function hr(){if(!no&&In!==null){no=!0;var e=0,t=Oe;try{var n=In;for(Oe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}In=null,ds=!1}catch(i){throw In!==null&&(In=In.slice(e+1)),em(uc,hr),i}finally{Oe=t,no=!1}}return null}var ei=[],ti=0,Fl=null,Ml=0,tn=[],nn=0,Pr=null,Dn=1,Ln="";function vr(e,t){ei[ti++]=Ml,ei[ti++]=Fl,Fl=e,Ml=t}function zm(e,t,n){tn[nn++]=Dn,tn[nn++]=Ln,tn[nn++]=Pr,Pr=e;var r=Dn;e=Ln;var i=32-mn(r)-1;r&=~(1<<i),n+=1;var a=32-mn(t)+i;if(30<a){var l=i-i%5;a=(r&(1<<l)-1).toString(32),r>>=l,i-=l,Dn=1<<32-mn(t)+i|n<<i|r,Ln=a+e}else Dn=1<<a|n<<i|r,Ln=e}function xc(e){e.return!==null&&(vr(e,1),zm(e,1,0))}function vc(e){for(;e===Fl;)Fl=ei[--ti],ei[ti]=null,Ml=ei[--ti],ei[ti]=null;for(;e===Pr;)Pr=tn[--nn],tn[nn]=null,Ln=tn[--nn],tn[nn]=null,Dn=tn[--nn],tn[nn]=null}var Kt=null,Xt=null,Xe=!1,hn=null;function Pm(e,t){var n=an(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function df(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Kt=e,Xt=ir(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Kt=e,Xt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Pr!==null?{id:Dn,overflow:Ln}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=an(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Kt=e,Xt=null,!0):!1;default:return!1}}function mu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function gu(e){if(Xe){var t=Xt;if(t){var n=t;if(!df(e,t)){if(mu(e))throw Error(H(418));t=ir(n.nextSibling);var r=Kt;t&&df(e,t)?Pm(r,n):(e.flags=e.flags&-4097|2,Xe=!1,Kt=e)}}else{if(mu(e))throw Error(H(418));e.flags=e.flags&-4097|2,Xe=!1,Kt=e}}}function ff(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Kt=e}function Xa(e){if(e!==Kt)return!1;if(!Xe)return ff(e),Xe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!du(e.type,e.memoizedProps)),t&&(t=Xt)){if(mu(e))throw Rm(),Error(H(418));for(;t;)Pm(e,t),t=ir(t.nextSibling)}if(ff(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Xt=ir(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Xt=null}}else Xt=Kt?ir(e.stateNode.nextSibling):null;return!0}function Rm(){for(var e=Xt;e;)e=ir(e.nextSibling)}function yi(){Xt=Kt=null,Xe=!1}function wc(e){hn===null?hn=[e]:hn.push(e)}var Ew=Un.ReactCurrentBatchConfig;function Di(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(H(309));var r=n.stateNode}if(!r)throw Error(H(147,e));var i=r,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(l){var s=i.refs;l===null?delete s[a]:s[a]=l},t._stringRef=a,t)}if(typeof e!="string")throw Error(H(284));if(!n._owner)throw Error(H(290,e))}return e}function Ka(e,t){throw e=Object.prototype.toString.call(t),Error(H(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function pf(e){var t=e._init;return t(e._payload)}function Im(e){function t(g,x){if(e){var y=g.deletions;y===null?(g.deletions=[x],g.flags|=16):y.push(x)}}function n(g,x){if(!e)return null;for(;x!==null;)t(g,x),x=x.sibling;return null}function r(g,x){for(g=new Map;x!==null;)x.key!==null?g.set(x.key,x):g.set(x.index,x),x=x.sibling;return g}function i(g,x){return g=or(g,x),g.index=0,g.sibling=null,g}function a(g,x,y){return g.index=y,e?(y=g.alternate,y!==null?(y=y.index,y<x?(g.flags|=2,x):y):(g.flags|=2,x)):(g.flags|=1048576,x)}function l(g){return e&&g.alternate===null&&(g.flags|=2),g}function s(g,x,y,C){return x===null||x.tag!==6?(x=uo(y,g.mode,C),x.return=g,x):(x=i(x,y),x.return=g,x)}function o(g,x,y,C){var E=y.type;return E===Yr?f(g,x,y.props.children,C,y.key):x!==null&&(x.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Xn&&pf(E)===x.type)?(C=i(x,y.props),C.ref=Di(g,x,y),C.return=g,C):(C=wl(y.type,y.key,y.props,null,g.mode,C),C.ref=Di(g,x,y),C.return=g,C)}function c(g,x,y,C){return x===null||x.tag!==4||x.stateNode.containerInfo!==y.containerInfo||x.stateNode.implementation!==y.implementation?(x=co(y,g.mode,C),x.return=g,x):(x=i(x,y.children||[]),x.return=g,x)}function f(g,x,y,C,E){return x===null||x.tag!==7?(x=Tr(y,g.mode,C,E),x.return=g,x):(x=i(x,y),x.return=g,x)}function d(g,x,y){if(typeof x=="string"&&x!==""||typeof x=="number")return x=uo(""+x,g.mode,y),x.return=g,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Ma:return y=wl(x.type,x.key,x.props,null,g.mode,y),y.ref=Di(g,null,x),y.return=g,y;case qr:return x=co(x,g.mode,y),x.return=g,x;case Xn:var C=x._init;return d(g,C(x._payload),y)}if(Hi(x)||zi(x))return x=Tr(x,g.mode,y,null),x.return=g,x;Ka(g,x)}return null}function p(g,x,y,C){var E=x!==null?x.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return E!==null?null:s(g,x,""+y,C);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Ma:return y.key===E?o(g,x,y,C):null;case qr:return y.key===E?c(g,x,y,C):null;case Xn:return E=y._init,p(g,x,E(y._payload),C)}if(Hi(y)||zi(y))return E!==null?null:f(g,x,y,C,null);Ka(g,y)}return null}function h(g,x,y,C,E){if(typeof C=="string"&&C!==""||typeof C=="number")return g=g.get(y)||null,s(x,g,""+C,E);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Ma:return g=g.get(C.key===null?y:C.key)||null,o(x,g,C,E);case qr:return g=g.get(C.key===null?y:C.key)||null,c(x,g,C,E);case Xn:var b=C._init;return h(g,x,y,b(C._payload),E)}if(Hi(C)||zi(C))return g=g.get(y)||null,f(x,g,C,E,null);Ka(x,C)}return null}function m(g,x,y,C){for(var E=null,b=null,T=x,_=x=0,R=null;T!==null&&_<y.length;_++){T.index>_?(R=T,T=null):R=T.sibling;var N=p(g,T,y[_],C);if(N===null){T===null&&(T=R);break}e&&T&&N.alternate===null&&t(g,T),x=a(N,x,_),b===null?E=N:b.sibling=N,b=N,T=R}if(_===y.length)return n(g,T),Xe&&vr(g,_),E;if(T===null){for(;_<y.length;_++)T=d(g,y[_],C),T!==null&&(x=a(T,x,_),b===null?E=T:b.sibling=T,b=T);return Xe&&vr(g,_),E}for(T=r(g,T);_<y.length;_++)R=h(T,g,_,y[_],C),R!==null&&(e&&R.alternate!==null&&T.delete(R.key===null?_:R.key),x=a(R,x,_),b===null?E=R:b.sibling=R,b=R);return e&&T.forEach(function(M){return t(g,M)}),Xe&&vr(g,_),E}function v(g,x,y,C){var E=zi(y);if(typeof E!="function")throw Error(H(150));if(y=E.call(y),y==null)throw Error(H(151));for(var b=E=null,T=x,_=x=0,R=null,N=y.next();T!==null&&!N.done;_++,N=y.next()){T.index>_?(R=T,T=null):R=T.sibling;var M=p(g,T,N.value,C);if(M===null){T===null&&(T=R);break}e&&T&&M.alternate===null&&t(g,T),x=a(M,x,_),b===null?E=M:b.sibling=M,b=M,T=R}if(N.done)return n(g,T),Xe&&vr(g,_),E;if(T===null){for(;!N.done;_++,N=y.next())N=d(g,N.value,C),N!==null&&(x=a(N,x,_),b===null?E=N:b.sibling=N,b=N);return Xe&&vr(g,_),E}for(T=r(g,T);!N.done;_++,N=y.next())N=h(T,g,_,N.value,C),N!==null&&(e&&N.alternate!==null&&T.delete(N.key===null?_:N.key),x=a(N,x,_),b===null?E=N:b.sibling=N,b=N);return e&&T.forEach(function($){return t(g,$)}),Xe&&vr(g,_),E}function w(g,x,y,C){if(typeof y=="object"&&y!==null&&y.type===Yr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Ma:e:{for(var E=y.key,b=x;b!==null;){if(b.key===E){if(E=y.type,E===Yr){if(b.tag===7){n(g,b.sibling),x=i(b,y.props.children),x.return=g,g=x;break e}}else if(b.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Xn&&pf(E)===b.type){n(g,b.sibling),x=i(b,y.props),x.ref=Di(g,b,y),x.return=g,g=x;break e}n(g,b);break}else t(g,b);b=b.sibling}y.type===Yr?(x=Tr(y.props.children,g.mode,C,y.key),x.return=g,g=x):(C=wl(y.type,y.key,y.props,null,g.mode,C),C.ref=Di(g,x,y),C.return=g,g=C)}return l(g);case qr:e:{for(b=y.key;x!==null;){if(x.key===b)if(x.tag===4&&x.stateNode.containerInfo===y.containerInfo&&x.stateNode.implementation===y.implementation){n(g,x.sibling),x=i(x,y.children||[]),x.return=g,g=x;break e}else{n(g,x);break}else t(g,x);x=x.sibling}x=co(y,g.mode,C),x.return=g,g=x}return l(g);case Xn:return b=y._init,w(g,x,b(y._payload),C)}if(Hi(y))return m(g,x,y,C);if(zi(y))return v(g,x,y,C);Ka(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,x!==null&&x.tag===6?(n(g,x.sibling),x=i(x,y),x.return=g,g=x):(n(g,x),x=uo(y,g.mode,C),x.return=g,g=x),l(g)):n(g,x)}return w}var xi=Im(!0),Am=Im(!1),$l=pr(null),Bl=null,ni=null,bc=null;function kc(){bc=ni=Bl=null}function Sc(e){var t=$l.current;Ge($l),e._currentValue=t}function yu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function di(e,t){Bl=e,bc=ni=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Bt=!0),e.firstContext=null)}function sn(e){var t=e._currentValue;if(bc!==e)if(e={context:e,memoizedValue:t,next:null},ni===null){if(Bl===null)throw Error(H(308));ni=e,Bl.dependencies={lanes:0,firstContext:e}}else ni=ni.next=e;return t}var Er=null;function Ec(e){Er===null?Er=[e]:Er.push(e)}function Dm(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Ec(t)):(n.next=i.next,i.next=n),t.interleaved=n,Bn(e,r)}function Bn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Kn=!1;function jc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Lm(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function On(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ar(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ie&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Bn(e,n)}return i=r.interleaved,i===null?(t.next=t,Ec(r)):(t.next=i.next,i.next=t),r.interleaved=t,Bn(e,n)}function hl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,cc(e,n)}}function hf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=l:a=a.next=l,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Hl(e,t,n,r){var i=e.updateQueue;Kn=!1;var a=i.firstBaseUpdate,l=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var o=s,c=o.next;o.next=null,l===null?a=c:l.next=c,l=o;var f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==l&&(s===null?f.firstBaseUpdate=c:s.next=c,f.lastBaseUpdate=o))}if(a!==null){var d=i.baseState;l=0,f=c=o=null,s=a;do{var p=s.lane,h=s.eventTime;if((r&p)===p){f!==null&&(f=f.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,v=s;switch(p=t,h=n,v.tag){case 1:if(m=v.payload,typeof m=="function"){d=m.call(h,d,p);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=v.payload,p=typeof m=="function"?m.call(h,d,p):m,p==null)break e;d=nt({},d,p);break e;case 2:Kn=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[s]:p.push(s))}else h={eventTime:h,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(c=f=h,o=d):f=f.next=h,l|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(f===null&&(o=d),i.baseState=o,i.firstBaseUpdate=c,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do l|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Ir|=l,e.lanes=l,e.memoizedState=d}}function mf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(H(191,i));i.call(r)}}}var Ta={},Nn=pr(Ta),ma=pr(Ta),ga=pr(Ta);function jr(e){if(e===Ta)throw Error(H(174));return e}function Cc(e,t){switch(Ue(ga,t),Ue(ma,e),Ue(Nn,Ta),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Qo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Qo(t,e)}Ge(Nn),Ue(Nn,t)}function vi(){Ge(Nn),Ge(ma),Ge(ga)}function Om(e){jr(ga.current);var t=jr(Nn.current),n=Qo(t,e.type);t!==n&&(Ue(ma,e),Ue(Nn,n))}function Nc(e){ma.current===e&&(Ge(Nn),Ge(ma))}var et=pr(0);function Ul(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ro=[];function Tc(){for(var e=0;e<ro.length;e++)ro[e]._workInProgressVersionPrimary=null;ro.length=0}var ml=Un.ReactCurrentDispatcher,io=Un.ReactCurrentBatchConfig,Rr=0,tt=null,gt=null,vt=null,Wl=!1,Qi=!1,ya=0,jw=0;function Ct(){throw Error(H(321))}function _c(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vn(e[n],t[n]))return!1;return!0}function zc(e,t,n,r,i,a){if(Rr=a,tt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ml.current=e===null||e.memoizedState===null?_w:zw,e=n(r,i),Qi){a=0;do{if(Qi=!1,ya=0,25<=a)throw Error(H(301));a+=1,vt=gt=null,t.updateQueue=null,ml.current=Pw,e=n(r,i)}while(Qi)}if(ml.current=Vl,t=gt!==null&&gt.next!==null,Rr=0,vt=gt=tt=null,Wl=!1,t)throw Error(H(300));return e}function Pc(){var e=ya!==0;return ya=0,e}function bn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vt===null?tt.memoizedState=vt=e:vt=vt.next=e,vt}function on(){if(gt===null){var e=tt.alternate;e=e!==null?e.memoizedState:null}else e=gt.next;var t=vt===null?tt.memoizedState:vt.next;if(t!==null)vt=t,gt=e;else{if(e===null)throw Error(H(310));gt=e,e={memoizedState:gt.memoizedState,baseState:gt.baseState,baseQueue:gt.baseQueue,queue:gt.queue,next:null},vt===null?tt.memoizedState=vt=e:vt=vt.next=e}return vt}function xa(e,t){return typeof t=="function"?t(e):t}function ao(e){var t=on(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=gt,i=r.baseQueue,a=n.pending;if(a!==null){if(i!==null){var l=i.next;i.next=a.next,a.next=l}r.baseQueue=i=a,n.pending=null}if(i!==null){a=i.next,r=r.baseState;var s=l=null,o=null,c=a;do{var f=c.lane;if((Rr&f)===f)o!==null&&(o=o.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};o===null?(s=o=d,l=r):o=o.next=d,tt.lanes|=f,Ir|=f}c=c.next}while(c!==null&&c!==a);o===null?l=r:o.next=s,vn(r,t.memoizedState)||(Bt=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=o,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do a=i.lane,tt.lanes|=a,Ir|=a,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function lo(e){var t=on(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do a=e(a,l.action),l=l.next;while(l!==i);vn(a,t.memoizedState)||(Bt=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Fm(){}function Mm(e,t){var n=tt,r=on(),i=t(),a=!vn(r.memoizedState,i);if(a&&(r.memoizedState=i,Bt=!0),r=r.queue,Rc(Hm.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||vt!==null&&vt.memoizedState.tag&1){if(n.flags|=2048,va(9,Bm.bind(null,n,r,i,t),void 0,null),wt===null)throw Error(H(349));Rr&30||$m(n,t,i)}return i}function $m(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=tt.updateQueue,t===null?(t={lastEffect:null,stores:null},tt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Bm(e,t,n,r){t.value=n,t.getSnapshot=r,Um(t)&&Wm(e)}function Hm(e,t,n){return n(function(){Um(t)&&Wm(e)})}function Um(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!vn(e,n)}catch{return!0}}function Wm(e){var t=Bn(e,1);t!==null&&gn(t,e,1,-1)}function gf(e){var t=bn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:e},t.queue=e,e=e.dispatch=Tw.bind(null,tt,e),[t.memoizedState,e]}function va(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=tt.updateQueue,t===null?(t={lastEffect:null,stores:null},tt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Vm(){return on().memoizedState}function gl(e,t,n,r){var i=bn();tt.flags|=e,i.memoizedState=va(1|t,n,void 0,r===void 0?null:r)}function fs(e,t,n,r){var i=on();r=r===void 0?null:r;var a=void 0;if(gt!==null){var l=gt.memoizedState;if(a=l.destroy,r!==null&&_c(r,l.deps)){i.memoizedState=va(t,n,a,r);return}}tt.flags|=e,i.memoizedState=va(1|t,n,a,r)}function yf(e,t){return gl(8390656,8,e,t)}function Rc(e,t){return fs(2048,8,e,t)}function Gm(e,t){return fs(4,2,e,t)}function qm(e,t){return fs(4,4,e,t)}function Ym(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Xm(e,t,n){return n=n!=null?n.concat([e]):null,fs(4,4,Ym.bind(null,t,e),n)}function Ic(){}function Km(e,t){var n=on();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&_c(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Qm(e,t){var n=on();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&_c(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Zm(e,t,n){return Rr&21?(vn(n,t)||(n=rm(),tt.lanes|=n,Ir|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Bt=!0),e.memoizedState=n)}function Cw(e,t){var n=Oe;Oe=n!==0&&4>n?n:4,e(!0);var r=io.transition;io.transition={};try{e(!1),t()}finally{Oe=n,io.transition=r}}function Jm(){return on().memoizedState}function Nw(e,t,n){var r=sr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},eg(e))tg(t,n);else if(n=Dm(e,t,n,r),n!==null){var i=Dt();gn(n,e,r,i),ng(n,t,r)}}function Tw(e,t,n){var r=sr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(eg(e))tg(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var l=t.lastRenderedState,s=a(l,n);if(i.hasEagerState=!0,i.eagerState=s,vn(s,l)){var o=t.interleaved;o===null?(i.next=i,Ec(t)):(i.next=o.next,o.next=i),t.interleaved=i;return}}catch{}finally{}n=Dm(e,t,i,r),n!==null&&(i=Dt(),gn(n,e,r,i),ng(n,t,r))}}function eg(e){var t=e.alternate;return e===tt||t!==null&&t===tt}function tg(e,t){Qi=Wl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ng(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,cc(e,n)}}var Vl={readContext:sn,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useInsertionEffect:Ct,useLayoutEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useMutableSource:Ct,useSyncExternalStore:Ct,useId:Ct,unstable_isNewReconciler:!1},_w={readContext:sn,useCallback:function(e,t){return bn().memoizedState=[e,t===void 0?null:t],e},useContext:sn,useEffect:yf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,gl(4194308,4,Ym.bind(null,t,e),n)},useLayoutEffect:function(e,t){return gl(4194308,4,e,t)},useInsertionEffect:function(e,t){return gl(4,2,e,t)},useMemo:function(e,t){var n=bn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=bn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Nw.bind(null,tt,e),[r.memoizedState,e]},useRef:function(e){var t=bn();return e={current:e},t.memoizedState=e},useState:gf,useDebugValue:Ic,useDeferredValue:function(e){return bn().memoizedState=e},useTransition:function(){var e=gf(!1),t=e[0];return e=Cw.bind(null,e[1]),bn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=tt,i=bn();if(Xe){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),wt===null)throw Error(H(349));Rr&30||$m(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,yf(Hm.bind(null,r,a,e),[e]),r.flags|=2048,va(9,Bm.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=bn(),t=wt.identifierPrefix;if(Xe){var n=Ln,r=Dn;n=(r&~(1<<32-mn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ya++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=jw++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},zw={readContext:sn,useCallback:Km,useContext:sn,useEffect:Rc,useImperativeHandle:Xm,useInsertionEffect:Gm,useLayoutEffect:qm,useMemo:Qm,useReducer:ao,useRef:Vm,useState:function(){return ao(xa)},useDebugValue:Ic,useDeferredValue:function(e){var t=on();return Zm(t,gt.memoizedState,e)},useTransition:function(){var e=ao(xa)[0],t=on().memoizedState;return[e,t]},useMutableSource:Fm,useSyncExternalStore:Mm,useId:Jm,unstable_isNewReconciler:!1},Pw={readContext:sn,useCallback:Km,useContext:sn,useEffect:Rc,useImperativeHandle:Xm,useInsertionEffect:Gm,useLayoutEffect:qm,useMemo:Qm,useReducer:lo,useRef:Vm,useState:function(){return lo(xa)},useDebugValue:Ic,useDeferredValue:function(e){var t=on();return gt===null?t.memoizedState=e:Zm(t,gt.memoizedState,e)},useTransition:function(){var e=lo(xa)[0],t=on().memoizedState;return[e,t]},useMutableSource:Fm,useSyncExternalStore:Mm,useId:Jm,unstable_isNewReconciler:!1};function fn(e,t){if(e&&e.defaultProps){t=nt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function xu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:nt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ps={isMounted:function(e){return(e=e._reactInternals)?Mr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Dt(),i=sr(e),a=On(r,i);a.payload=t,n!=null&&(a.callback=n),t=ar(e,a,i),t!==null&&(gn(t,e,i,r),hl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Dt(),i=sr(e),a=On(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=ar(e,a,i),t!==null&&(gn(t,e,i,r),hl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Dt(),r=sr(e),i=On(n,r);i.tag=2,t!=null&&(i.callback=t),t=ar(e,i,r),t!==null&&(gn(t,e,r,n),hl(t,e,r))}};function xf(e,t,n,r,i,a,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,l):t.prototype&&t.prototype.isPureReactComponent?!da(n,r)||!da(i,a):!0}function rg(e,t,n){var r=!1,i=cr,a=t.contextType;return typeof a=="object"&&a!==null?a=sn(a):(i=Ut(t)?zr:Pt.current,r=t.contextTypes,a=(r=r!=null)?gi(e,i):cr),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ps,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function vf(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ps.enqueueReplaceState(t,t.state,null)}function vu(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},jc(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=sn(a):(a=Ut(t)?zr:Pt.current,i.context=gi(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(xu(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&ps.enqueueReplaceState(i,i.state,null),Hl(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function wi(e,t){try{var n="",r=t;do n+=av(r),r=r.return;while(r);var i=n}catch(a){i=`
39
+ Error generating stack: `+a.message+`
40
+ `+a.stack}return{value:e,source:t,stack:i,digest:null}}function so(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function wu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Rw=typeof WeakMap=="function"?WeakMap:Map;function ig(e,t,n){n=On(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ql||(ql=!0,zu=r),wu(e,t)},n}function ag(e,t,n){n=On(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){wu(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){wu(e,t),typeof r!="function"&&(lr===null?lr=new Set([this]):lr.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function wf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rw;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Gw.bind(null,e,t,n),t.then(e,e))}function bf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function kf(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=On(-1,1),t.tag=2,ar(n,t,1))),n.lanes|=1),e)}var Iw=Un.ReactCurrentOwner,Bt=!1;function It(e,t,n,r){t.child=e===null?Am(t,null,n,r):xi(t,e.child,n,r)}function Sf(e,t,n,r,i){n=n.render;var a=t.ref;return di(t,i),r=zc(e,t,n,r,a,i),n=Pc(),e!==null&&!Bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Hn(e,t,i)):(Xe&&n&&xc(t),t.flags|=1,It(e,t,r,i),t.child)}function Ef(e,t,n,r,i){if(e===null){var a=n.type;return typeof a=="function"&&!Bc(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,lg(e,t,a,r,i)):(e=wl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var l=a.memoizedProps;if(n=n.compare,n=n!==null?n:da,n(l,r)&&e.ref===t.ref)return Hn(e,t,i)}return t.flags|=1,e=or(a,r),e.ref=t.ref,e.return=t,t.child=e}function lg(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(da(a,r)&&e.ref===t.ref)if(Bt=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Bt=!0);else return t.lanes=e.lanes,Hn(e,t,i)}return bu(e,t,n,r,i)}function sg(e,t,n){var r=t.pendingProps,i=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ue(ii,Yt),Yt|=n;else{if(!(n&1073741824))return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ue(ii,Yt),Yt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,Ue(ii,Yt),Yt|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,Ue(ii,Yt),Yt|=r;return It(e,t,i,n),t.child}function og(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function bu(e,t,n,r,i){var a=Ut(n)?zr:Pt.current;return a=gi(t,a),di(t,i),n=zc(e,t,n,r,a,i),r=Pc(),e!==null&&!Bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Hn(e,t,i)):(Xe&&r&&xc(t),t.flags|=1,It(e,t,n,i),t.child)}function jf(e,t,n,r,i){if(Ut(n)){var a=!0;Ol(t)}else a=!1;if(di(t,i),t.stateNode===null)yl(e,t),rg(t,n,r),vu(t,n,r,i),r=!0;else if(e===null){var l=t.stateNode,s=t.memoizedProps;l.props=s;var o=l.context,c=n.contextType;typeof c=="object"&&c!==null?c=sn(c):(c=Ut(n)?zr:Pt.current,c=gi(t,c));var f=n.getDerivedStateFromProps,d=typeof f=="function"||typeof l.getSnapshotBeforeUpdate=="function";d||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==r||o!==c)&&vf(t,l,r,c),Kn=!1;var p=t.memoizedState;l.state=p,Hl(t,r,l,i),o=t.memoizedState,s!==r||p!==o||Ht.current||Kn?(typeof f=="function"&&(xu(t,n,f,r),o=t.memoizedState),(s=Kn||xf(t,n,s,r,p,o,c))?(d||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=o),l.props=r,l.state=o,l.context=c,r=s):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,Lm(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:fn(t.type,s),l.props=c,d=t.pendingProps,p=l.context,o=n.contextType,typeof o=="object"&&o!==null?o=sn(o):(o=Ut(n)?zr:Pt.current,o=gi(t,o));var h=n.getDerivedStateFromProps;(f=typeof h=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==d||p!==o)&&vf(t,l,r,o),Kn=!1,p=t.memoizedState,l.state=p,Hl(t,r,l,i);var m=t.memoizedState;s!==d||p!==m||Ht.current||Kn?(typeof h=="function"&&(xu(t,n,h,r),m=t.memoizedState),(c=Kn||xf(t,n,c,r,p,m,o)||!1)?(f||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,m,o),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,m,o)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),l.props=r,l.state=m,l.context=o,r=c):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return ku(e,t,n,r,a,i)}function ku(e,t,n,r,i,a){og(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return i&&cf(t,n,!1),Hn(e,t,a);r=t.stateNode,Iw.current=t;var s=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=xi(t,e.child,null,a),t.child=xi(t,null,s,a)):It(e,t,s,a),t.memoizedState=r.state,i&&cf(t,n,!0),t.child}function ug(e){var t=e.stateNode;t.pendingContext?uf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&uf(e,t.context,!1),Cc(e,t.containerInfo)}function Cf(e,t,n,r,i){return yi(),wc(i),t.flags|=256,It(e,t,n,r),t.child}var Su={dehydrated:null,treeContext:null,retryLane:0};function Eu(e){return{baseLanes:e,cachePool:null,transitions:null}}function cg(e,t,n){var r=t.pendingProps,i=et.current,a=!1,l=(t.flags&128)!==0,s;if((s=l)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Ue(et,i&1),e===null)return gu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=r.children,e=r.fallback,a?(r=t.mode,a=t.child,l={mode:"hidden",children:l},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=l):a=gs(l,r,0,null),e=Tr(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Eu(n),t.memoizedState=Su,e):Ac(t,l));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return Aw(e,t,l,r,s,i,n);if(a){a=r.fallback,l=t.mode,i=e.child,s=i.sibling;var o={mode:"hidden",children:r.children};return!(l&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=o,t.deletions=null):(r=or(i,o),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=or(s,a):(a=Tr(a,l,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,l=e.child.memoizedState,l=l===null?Eu(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},a.memoizedState=l,a.childLanes=e.childLanes&~n,t.memoizedState=Su,r}return a=e.child,e=a.sibling,r=or(a,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Ac(e,t){return t=gs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Qa(e,t,n,r){return r!==null&&wc(r),xi(t,e.child,null,n),e=Ac(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Aw(e,t,n,r,i,a,l){if(n)return t.flags&256?(t.flags&=-257,r=so(Error(H(422))),Qa(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=gs({mode:"visible",children:r.children},i,0,null),a=Tr(a,i,l,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,t.mode&1&&xi(t,e.child,null,l),t.child.memoizedState=Eu(l),t.memoizedState=Su,a);if(!(t.mode&1))return Qa(e,t,l,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,a=Error(H(419)),r=so(a,r,void 0),Qa(e,t,l,r)}if(s=(l&e.childLanes)!==0,Bt||s){if(r=wt,r!==null){switch(l&-l){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|l)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,Bn(e,i),gn(r,e,i,-1))}return $c(),r=so(Error(H(421))),Qa(e,t,l,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=qw.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,Xt=ir(i.nextSibling),Kt=t,Xe=!0,hn=null,e!==null&&(tn[nn++]=Dn,tn[nn++]=Ln,tn[nn++]=Pr,Dn=e.id,Ln=e.overflow,Pr=t),t=Ac(t,r.children),t.flags|=4096,t)}function Nf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),yu(e.return,t,n)}function oo(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function dg(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(It(e,t,r.children,n),r=et.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Nf(e,n,t);else if(e.tag===19)Nf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ue(et,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ul(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),oo(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ul(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}oo(t,!0,n,null,a);break;case"together":oo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function yl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Hn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ir|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(H(153));if(t.child!==null){for(e=t.child,n=or(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=or(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Dw(e,t,n){switch(t.tag){case 3:ug(t),yi();break;case 5:Om(t);break;case 1:Ut(t.type)&&Ol(t);break;case 4:Cc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ue($l,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ue(et,et.current&1),t.flags|=128,null):n&t.child.childLanes?cg(e,t,n):(Ue(et,et.current&1),e=Hn(e,t,n),e!==null?e.sibling:null);Ue(et,et.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return dg(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ue(et,et.current),r)break;return null;case 22:case 23:return t.lanes=0,sg(e,t,n)}return Hn(e,t,n)}var fg,ju,pg,hg;fg=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ju=function(){};pg=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,jr(Nn.current);var a=null;switch(n){case"input":i=qo(e,i),r=qo(e,r),a=[];break;case"select":i=nt({},i,{value:void 0}),r=nt({},r,{value:void 0}),a=[];break;case"textarea":i=Ko(e,i),r=Ko(e,r),a=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Dl)}Zo(n,r);var l;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var s=i[c];for(l in s)s.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ia.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var o=r[c];if(s=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&o!==s&&(o!=null||s!=null))if(c==="style")if(s){for(l in s)!s.hasOwnProperty(l)||o&&o.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in o)o.hasOwnProperty(l)&&s[l]!==o[l]&&(n||(n={}),n[l]=o[l])}else n||(a||(a=[]),a.push(c,n)),n=o;else c==="dangerouslySetInnerHTML"?(o=o?o.__html:void 0,s=s?s.__html:void 0,o!=null&&s!==o&&(a=a||[]).push(c,o)):c==="children"?typeof o!="string"&&typeof o!="number"||(a=a||[]).push(c,""+o):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ia.hasOwnProperty(c)?(o!=null&&c==="onScroll"&&Ve("scroll",e),a||s===o||(a=[])):(a=a||[]).push(c,o))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}};hg=function(e,t,n,r){n!==r&&(t.flags|=4)};function Li(e,t){if(!Xe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Nt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Lw(e,t,n){var r=t.pendingProps;switch(vc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nt(t),null;case 1:return Ut(t.type)&&Ll(),Nt(t),null;case 3:return r=t.stateNode,vi(),Ge(Ht),Ge(Pt),Tc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Xa(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,hn!==null&&(Iu(hn),hn=null))),ju(e,t),Nt(t),null;case 5:Nc(t);var i=jr(ga.current);if(n=t.type,e!==null&&t.stateNode!=null)pg(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(H(166));return Nt(t),null}if(e=jr(Nn.current),Xa(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[jn]=t,r[ha]=a,e=(t.mode&1)!==0,n){case"dialog":Ve("cancel",r),Ve("close",r);break;case"iframe":case"object":case"embed":Ve("load",r);break;case"video":case"audio":for(i=0;i<Wi.length;i++)Ve(Wi[i],r);break;case"source":Ve("error",r);break;case"img":case"image":case"link":Ve("error",r),Ve("load",r);break;case"details":Ve("toggle",r);break;case"input":Dd(r,a),Ve("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Ve("invalid",r);break;case"textarea":Od(r,a),Ve("invalid",r)}Zo(n,a),i=null;for(var l in a)if(a.hasOwnProperty(l)){var s=a[l];l==="children"?typeof s=="string"?r.textContent!==s&&(a.suppressHydrationWarning!==!0&&Ya(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&Ya(r.textContent,s,e),i=["children",""+s]):ia.hasOwnProperty(l)&&s!=null&&l==="onScroll"&&Ve("scroll",r)}switch(n){case"input":$a(r),Ld(r,a,!0);break;case"textarea":$a(r),Fd(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=Dl)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Hh(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[jn]=t,e[ha]=r,fg(e,t,!1,!1),t.stateNode=e;e:{switch(l=Jo(n,r),n){case"dialog":Ve("cancel",e),Ve("close",e),i=r;break;case"iframe":case"object":case"embed":Ve("load",e),i=r;break;case"video":case"audio":for(i=0;i<Wi.length;i++)Ve(Wi[i],e);i=r;break;case"source":Ve("error",e),i=r;break;case"img":case"image":case"link":Ve("error",e),Ve("load",e),i=r;break;case"details":Ve("toggle",e),i=r;break;case"input":Dd(e,r),i=qo(e,r),Ve("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=nt({},r,{value:void 0}),Ve("invalid",e);break;case"textarea":Od(e,r),i=Ko(e,r),Ve("invalid",e);break;default:i=r}Zo(n,i),s=i;for(a in s)if(s.hasOwnProperty(a)){var o=s[a];a==="style"?Vh(e,o):a==="dangerouslySetInnerHTML"?(o=o?o.__html:void 0,o!=null&&Uh(e,o)):a==="children"?typeof o=="string"?(n!=="textarea"||o!=="")&&aa(e,o):typeof o=="number"&&aa(e,""+o):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(ia.hasOwnProperty(a)?o!=null&&a==="onScroll"&&Ve("scroll",e):o!=null&&ic(e,a,o,l))}switch(n){case"input":$a(e),Ld(e,r,!1);break;case"textarea":$a(e),Fd(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ur(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?si(e,!!r.multiple,a,!1):r.defaultValue!=null&&si(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Dl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Nt(t),null;case 6:if(e&&t.stateNode!=null)hg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(H(166));if(n=jr(ga.current),jr(Nn.current),Xa(t)){if(r=t.stateNode,n=t.memoizedProps,r[jn]=t,(a=r.nodeValue!==n)&&(e=Kt,e!==null))switch(e.tag){case 3:Ya(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ya(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[jn]=t,t.stateNode=r}return Nt(t),null;case 13:if(Ge(et),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Xe&&Xt!==null&&t.mode&1&&!(t.flags&128))Rm(),yi(),t.flags|=98560,a=!1;else if(a=Xa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(H(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(H(317));a[jn]=t}else yi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nt(t),a=!1}else hn!==null&&(Iu(hn),hn=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||et.current&1?yt===0&&(yt=3):$c())),t.updateQueue!==null&&(t.flags|=4),Nt(t),null);case 4:return vi(),ju(e,t),e===null&&fa(t.stateNode.containerInfo),Nt(t),null;case 10:return Sc(t.type._context),Nt(t),null;case 17:return Ut(t.type)&&Ll(),Nt(t),null;case 19:if(Ge(et),a=t.memoizedState,a===null)return Nt(t),null;if(r=(t.flags&128)!==0,l=a.rendering,l===null)if(r)Li(a,!1);else{if(yt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=Ul(e),l!==null){for(t.flags|=128,Li(a,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,l=a.alternate,l===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ue(et,et.current&1|2),t.child}e=e.sibling}a.tail!==null&&st()>bi&&(t.flags|=128,r=!0,Li(a,!1),t.lanes=4194304)}else{if(!r)if(e=Ul(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Li(a,!0),a.tail===null&&a.tailMode==="hidden"&&!l.alternate&&!Xe)return Nt(t),null}else 2*st()-a.renderingStartTime>bi&&n!==1073741824&&(t.flags|=128,r=!0,Li(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(n=a.last,n!==null?n.sibling=l:t.child=l,a.last=l)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=st(),t.sibling=null,n=et.current,Ue(et,r?n&1|2:n&1),t):(Nt(t),null);case 22:case 23:return Mc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Yt&1073741824&&(Nt(t),t.subtreeFlags&6&&(t.flags|=8192)):Nt(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function Ow(e,t){switch(vc(t),t.tag){case 1:return Ut(t.type)&&Ll(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vi(),Ge(Ht),Ge(Pt),Tc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Nc(t),null;case 13:if(Ge(et),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));yi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ge(et),null;case 4:return vi(),null;case 10:return Sc(t.type._context),null;case 22:case 23:return Mc(),null;case 24:return null;default:return null}}var Za=!1,_t=!1,Fw=typeof WeakSet=="function"?WeakSet:Set,ee=null;function ri(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){at(e,t,r)}else n.current=null}function Cu(e,t,n){try{n()}catch(r){at(e,t,r)}}var Tf=!1;function Mw(e,t){if(uu=Rl,e=vm(),yc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var l=0,s=-1,o=-1,c=0,f=0,d=e,p=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(s=l+i),d!==a||r!==0&&d.nodeType!==3||(o=l+r),d.nodeType===3&&(l+=d.nodeValue.length),(h=d.firstChild)!==null;)p=d,d=h;for(;;){if(d===e)break t;if(p===n&&++c===i&&(s=l),p===a&&++f===r&&(o=l),(h=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=h}n=s===-1||o===-1?null:{start:s,end:o}}else n=null}n=n||{start:0,end:0}}else n=null;for(cu={focusedElem:e,selectionRange:n},Rl=!1,ee=t;ee!==null;)if(t=ee,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ee=e;else for(;ee!==null;){t=ee;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var v=m.memoizedProps,w=m.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?v:fn(t.type,v),w);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(H(163))}}catch(C){at(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,ee=e;break}ee=t.return}return m=Tf,Tf=!1,m}function Zi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Cu(t,n,a)}i=i.next}while(i!==r)}}function hs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Nu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function mg(e){var t=e.alternate;t!==null&&(e.alternate=null,mg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[jn],delete t[ha],delete t[pu],delete t[bw],delete t[kw])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function gg(e){return e.tag===5||e.tag===3||e.tag===4}function _f(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Tu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Dl));else if(r!==4&&(e=e.child,e!==null))for(Tu(e,t,n),e=e.sibling;e!==null;)Tu(e,t,n),e=e.sibling}function _u(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(_u(e,t,n),e=e.sibling;e!==null;)_u(e,t,n),e=e.sibling}var kt=null,pn=!1;function Vn(e,t,n){for(n=n.child;n!==null;)yg(e,t,n),n=n.sibling}function yg(e,t,n){if(Cn&&typeof Cn.onCommitFiberUnmount=="function")try{Cn.onCommitFiberUnmount(ls,n)}catch{}switch(n.tag){case 5:_t||ri(n,t);case 6:var r=kt,i=pn;kt=null,Vn(e,t,n),kt=r,pn=i,kt!==null&&(pn?(e=kt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):kt.removeChild(n.stateNode));break;case 18:kt!==null&&(pn?(e=kt,n=n.stateNode,e.nodeType===8?to(e.parentNode,n):e.nodeType===1&&to(e,n),ua(e)):to(kt,n.stateNode));break;case 4:r=kt,i=pn,kt=n.stateNode.containerInfo,pn=!0,Vn(e,t,n),kt=r,pn=i;break;case 0:case 11:case 14:case 15:if(!_t&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,l=a.destroy;a=a.tag,l!==void 0&&(a&2||a&4)&&Cu(n,t,l),i=i.next}while(i!==r)}Vn(e,t,n);break;case 1:if(!_t&&(ri(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){at(n,t,s)}Vn(e,t,n);break;case 21:Vn(e,t,n);break;case 22:n.mode&1?(_t=(r=_t)||n.memoizedState!==null,Vn(e,t,n),_t=r):Vn(e,t,n);break;default:Vn(e,t,n)}}function zf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Fw),t.forEach(function(r){var i=Yw.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function cn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,l=t,s=l;e:for(;s!==null;){switch(s.tag){case 5:kt=s.stateNode,pn=!1;break e;case 3:kt=s.stateNode.containerInfo,pn=!0;break e;case 4:kt=s.stateNode.containerInfo,pn=!0;break e}s=s.return}if(kt===null)throw Error(H(160));yg(a,l,i),kt=null,pn=!1;var o=i.alternate;o!==null&&(o.return=null),i.return=null}catch(c){at(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)xg(t,e),t=t.sibling}function xg(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(cn(t,e),wn(e),r&4){try{Zi(3,e,e.return),hs(3,e)}catch(v){at(e,e.return,v)}try{Zi(5,e,e.return)}catch(v){at(e,e.return,v)}}break;case 1:cn(t,e),wn(e),r&512&&n!==null&&ri(n,n.return);break;case 5:if(cn(t,e),wn(e),r&512&&n!==null&&ri(n,n.return),e.flags&32){var i=e.stateNode;try{aa(i,"")}catch(v){at(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,l=n!==null?n.memoizedProps:a,s=e.type,o=e.updateQueue;if(e.updateQueue=null,o!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&$h(i,a),Jo(s,l);var c=Jo(s,a);for(l=0;l<o.length;l+=2){var f=o[l],d=o[l+1];f==="style"?Vh(i,d):f==="dangerouslySetInnerHTML"?Uh(i,d):f==="children"?aa(i,d):ic(i,f,d,c)}switch(s){case"input":Yo(i,a);break;case"textarea":Bh(i,a);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var h=a.value;h!=null?si(i,!!a.multiple,h,!1):p!==!!a.multiple&&(a.defaultValue!=null?si(i,!!a.multiple,a.defaultValue,!0):si(i,!!a.multiple,a.multiple?[]:"",!1))}i[ha]=a}catch(v){at(e,e.return,v)}}break;case 6:if(cn(t,e),wn(e),r&4){if(e.stateNode===null)throw Error(H(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(v){at(e,e.return,v)}}break;case 3:if(cn(t,e),wn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ua(t.containerInfo)}catch(v){at(e,e.return,v)}break;case 4:cn(t,e),wn(e);break;case 13:cn(t,e),wn(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(Oc=st())),r&4&&zf(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(_t=(c=_t)||f,cn(t,e),_t=c):cn(t,e),wn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!f&&e.mode&1)for(ee=e,f=e.child;f!==null;){for(d=ee=f;ee!==null;){switch(p=ee,h=p.child,p.tag){case 0:case 11:case 14:case 15:Zi(4,p,p.return);break;case 1:ri(p,p.return);var m=p.stateNode;if(typeof m.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(v){at(r,n,v)}}break;case 5:ri(p,p.return);break;case 22:if(p.memoizedState!==null){Rf(d);continue}}h!==null?(h.return=p,ee=h):Rf(d)}f=f.sibling}e:for(f=null,d=e;;){if(d.tag===5){if(f===null){f=d;try{i=d.stateNode,c?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=d.stateNode,o=d.memoizedProps.style,l=o!=null&&o.hasOwnProperty("display")?o.display:null,s.style.display=Wh("display",l))}catch(v){at(e,e.return,v)}}}else if(d.tag===6){if(f===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(v){at(e,e.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:cn(t,e),wn(e),r&4&&zf(e);break;case 21:break;default:cn(t,e),wn(e)}}function wn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(gg(n)){var r=n;break e}n=n.return}throw Error(H(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(aa(i,""),r.flags&=-33);var a=_f(e);_u(e,a,i);break;case 3:case 4:var l=r.stateNode.containerInfo,s=_f(e);Tu(e,s,l);break;default:throw Error(H(161))}}catch(o){at(e,e.return,o)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function $w(e,t,n){ee=e,vg(e)}function vg(e,t,n){for(var r=(e.mode&1)!==0;ee!==null;){var i=ee,a=i.child;if(i.tag===22&&r){var l=i.memoizedState!==null||Za;if(!l){var s=i.alternate,o=s!==null&&s.memoizedState!==null||_t;s=Za;var c=_t;if(Za=l,(_t=o)&&!c)for(ee=i;ee!==null;)l=ee,o=l.child,l.tag===22&&l.memoizedState!==null?If(i):o!==null?(o.return=l,ee=o):If(i);for(;a!==null;)ee=a,vg(a),a=a.sibling;ee=i,Za=s,_t=c}Pf(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,ee=a):Pf(e)}}function Pf(e){for(;ee!==null;){var t=ee;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:_t||hs(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!_t)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:fn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&mf(t,a,r);break;case 3:var l=t.updateQueue;if(l!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}mf(t,l,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var o=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":o.autoFocus&&n.focus();break;case"img":o.src&&(n.src=o.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var d=f.dehydrated;d!==null&&ua(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(H(163))}_t||t.flags&512&&Nu(t)}catch(p){at(t,t.return,p)}}if(t===e){ee=null;break}if(n=t.sibling,n!==null){n.return=t.return,ee=n;break}ee=t.return}}function Rf(e){for(;ee!==null;){var t=ee;if(t===e){ee=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ee=n;break}ee=t.return}}function If(e){for(;ee!==null;){var t=ee;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{hs(4,t)}catch(o){at(t,n,o)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(o){at(t,i,o)}}var a=t.return;try{Nu(t)}catch(o){at(t,a,o)}break;case 5:var l=t.return;try{Nu(t)}catch(o){at(t,l,o)}}}catch(o){at(t,t.return,o)}if(t===e){ee=null;break}var s=t.sibling;if(s!==null){s.return=t.return,ee=s;break}ee=t.return}}var Bw=Math.ceil,Gl=Un.ReactCurrentDispatcher,Dc=Un.ReactCurrentOwner,ln=Un.ReactCurrentBatchConfig,Ie=0,wt=null,ft=null,St=0,Yt=0,ii=pr(0),yt=0,wa=null,Ir=0,ms=0,Lc=0,Ji=null,$t=null,Oc=0,bi=1/0,Rn=null,ql=!1,zu=null,lr=null,Ja=!1,er=null,Yl=0,ea=0,Pu=null,xl=-1,vl=0;function Dt(){return Ie&6?st():xl!==-1?xl:xl=st()}function sr(e){return e.mode&1?Ie&2&&St!==0?St&-St:Ew.transition!==null?(vl===0&&(vl=rm()),vl):(e=Oe,e!==0||(e=window.event,e=e===void 0?16:cm(e.type)),e):1}function gn(e,t,n,r){if(50<ea)throw ea=0,Pu=null,Error(H(185));ja(e,n,r),(!(Ie&2)||e!==wt)&&(e===wt&&(!(Ie&2)&&(ms|=n),yt===4&&Zn(e,St)),Wt(e,r),n===1&&Ie===0&&!(t.mode&1)&&(bi=st()+500,ds&&hr()))}function Wt(e,t){var n=e.callbackNode;Ev(e,t);var r=Pl(e,e===wt?St:0);if(r===0)n!==null&&Bd(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Bd(n),t===1)e.tag===0?Sw(Af.bind(null,e)):_m(Af.bind(null,e)),vw(function(){!(Ie&6)&&hr()}),n=null;else{switch(im(r)){case 1:n=uc;break;case 4:n=tm;break;case 16:n=zl;break;case 536870912:n=nm;break;default:n=zl}n=Ng(n,wg.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function wg(e,t){if(xl=-1,vl=0,Ie&6)throw Error(H(327));var n=e.callbackNode;if(fi()&&e.callbackNode!==n)return null;var r=Pl(e,e===wt?St:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Xl(e,r);else{t=r;var i=Ie;Ie|=2;var a=kg();(wt!==e||St!==t)&&(Rn=null,bi=st()+500,Nr(e,t));do try{Ww();break}catch(s){bg(e,s)}while(!0);kc(),Gl.current=a,Ie=i,ft!==null?t=0:(wt=null,St=0,t=yt)}if(t!==0){if(t===2&&(i=iu(e),i!==0&&(r=i,t=Ru(e,i))),t===1)throw n=wa,Nr(e,0),Zn(e,r),Wt(e,st()),n;if(t===6)Zn(e,r);else{if(i=e.current.alternate,!(r&30)&&!Hw(i)&&(t=Xl(e,r),t===2&&(a=iu(e),a!==0&&(r=a,t=Ru(e,a))),t===1))throw n=wa,Nr(e,0),Zn(e,r),Wt(e,st()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(H(345));case 2:wr(e,$t,Rn);break;case 3:if(Zn(e,r),(r&130023424)===r&&(t=Oc+500-st(),10<t)){if(Pl(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Dt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=fu(wr.bind(null,e,$t,Rn),t);break}wr(e,$t,Rn);break;case 4:if(Zn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var l=31-mn(r);a=1<<l,l=t[l],l>i&&(i=l),r&=~a}if(r=i,r=st()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Bw(r/1960))-r,10<r){e.timeoutHandle=fu(wr.bind(null,e,$t,Rn),r);break}wr(e,$t,Rn);break;case 5:wr(e,$t,Rn);break;default:throw Error(H(329))}}}return Wt(e,st()),e.callbackNode===n?wg.bind(null,e):null}function Ru(e,t){var n=Ji;return e.current.memoizedState.isDehydrated&&(Nr(e,t).flags|=256),e=Xl(e,t),e!==2&&(t=$t,$t=n,t!==null&&Iu(t)),e}function Iu(e){$t===null?$t=e:$t.push.apply($t,e)}function Hw(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!vn(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Zn(e,t){for(t&=~Lc,t&=~ms,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-mn(t),r=1<<n;e[n]=-1,t&=~r}}function Af(e){if(Ie&6)throw Error(H(327));fi();var t=Pl(e,0);if(!(t&1))return Wt(e,st()),null;var n=Xl(e,t);if(e.tag!==0&&n===2){var r=iu(e);r!==0&&(t=r,n=Ru(e,r))}if(n===1)throw n=wa,Nr(e,0),Zn(e,t),Wt(e,st()),n;if(n===6)throw Error(H(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wr(e,$t,Rn),Wt(e,st()),null}function Fc(e,t){var n=Ie;Ie|=1;try{return e(t)}finally{Ie=n,Ie===0&&(bi=st()+500,ds&&hr())}}function Ar(e){er!==null&&er.tag===0&&!(Ie&6)&&fi();var t=Ie;Ie|=1;var n=ln.transition,r=Oe;try{if(ln.transition=null,Oe=1,e)return e()}finally{Oe=r,ln.transition=n,Ie=t,!(Ie&6)&&hr()}}function Mc(){Yt=ii.current,Ge(ii)}function Nr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,xw(n)),ft!==null)for(n=ft.return;n!==null;){var r=n;switch(vc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ll();break;case 3:vi(),Ge(Ht),Ge(Pt),Tc();break;case 5:Nc(r);break;case 4:vi();break;case 13:Ge(et);break;case 19:Ge(et);break;case 10:Sc(r.type._context);break;case 22:case 23:Mc()}n=n.return}if(wt=e,ft=e=or(e.current,null),St=Yt=t,yt=0,wa=null,Lc=ms=Ir=0,$t=Ji=null,Er!==null){for(t=0;t<Er.length;t++)if(n=Er[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var l=a.next;a.next=i,r.next=l}n.pending=r}Er=null}return e}function bg(e,t){do{var n=ft;try{if(kc(),ml.current=Vl,Wl){for(var r=tt.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Wl=!1}if(Rr=0,vt=gt=tt=null,Qi=!1,ya=0,Dc.current=null,n===null||n.return===null){yt=1,wa=t,ft=null;break}e:{var a=e,l=n.return,s=n,o=t;if(t=St,s.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){var c=o,f=s,d=f.tag;if(!(f.mode&1)&&(d===0||d===11||d===15)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=bf(l);if(h!==null){h.flags&=-257,kf(h,l,s,a,t),h.mode&1&&wf(a,c,t),t=h,o=c;var m=t.updateQueue;if(m===null){var v=new Set;v.add(o),t.updateQueue=v}else m.add(o);break e}else{if(!(t&1)){wf(a,c,t),$c();break e}o=Error(H(426))}}else if(Xe&&s.mode&1){var w=bf(l);if(w!==null){!(w.flags&65536)&&(w.flags|=256),kf(w,l,s,a,t),wc(wi(o,s));break e}}a=o=wi(o,s),yt!==4&&(yt=2),Ji===null?Ji=[a]:Ji.push(a),a=l;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var g=ig(a,o,t);hf(a,g);break e;case 1:s=o;var x=a.type,y=a.stateNode;if(!(a.flags&128)&&(typeof x.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(lr===null||!lr.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t;var C=ag(a,s,t);hf(a,C);break e}}a=a.return}while(a!==null)}Eg(n)}catch(E){t=E,ft===n&&n!==null&&(ft=n=n.return);continue}break}while(!0)}function kg(){var e=Gl.current;return Gl.current=Vl,e===null?Vl:e}function $c(){(yt===0||yt===3||yt===2)&&(yt=4),wt===null||!(Ir&268435455)&&!(ms&268435455)||Zn(wt,St)}function Xl(e,t){var n=Ie;Ie|=2;var r=kg();(wt!==e||St!==t)&&(Rn=null,Nr(e,t));do try{Uw();break}catch(i){bg(e,i)}while(!0);if(kc(),Ie=n,Gl.current=r,ft!==null)throw Error(H(261));return wt=null,St=0,yt}function Uw(){for(;ft!==null;)Sg(ft)}function Ww(){for(;ft!==null&&!mv();)Sg(ft)}function Sg(e){var t=Cg(e.alternate,e,Yt);e.memoizedProps=e.pendingProps,t===null?Eg(e):ft=t,Dc.current=null}function Eg(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Ow(n,t),n!==null){n.flags&=32767,ft=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{yt=6,ft=null;return}}else if(n=Lw(n,t,Yt),n!==null){ft=n;return}if(t=t.sibling,t!==null){ft=t;return}ft=t=e}while(t!==null);yt===0&&(yt=5)}function wr(e,t,n){var r=Oe,i=ln.transition;try{ln.transition=null,Oe=1,Vw(e,t,n,r)}finally{ln.transition=i,Oe=r}return null}function Vw(e,t,n,r){do fi();while(er!==null);if(Ie&6)throw Error(H(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(H(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(jv(e,a),e===wt&&(ft=wt=null,St=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ja||(Ja=!0,Ng(zl,function(){return fi(),null})),a=(n.flags&15990)!==0,n.subtreeFlags&15990||a){a=ln.transition,ln.transition=null;var l=Oe;Oe=1;var s=Ie;Ie|=4,Dc.current=null,Mw(e,n),xg(n,e),dw(cu),Rl=!!uu,cu=uu=null,e.current=n,$w(n),gv(),Ie=s,Oe=l,ln.transition=a}else e.current=n;if(Ja&&(Ja=!1,er=e,Yl=i),a=e.pendingLanes,a===0&&(lr=null),vv(n.stateNode),Wt(e,st()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(ql)throw ql=!1,e=zu,zu=null,e;return Yl&1&&e.tag!==0&&fi(),a=e.pendingLanes,a&1?e===Pu?ea++:(ea=0,Pu=e):ea=0,hr(),null}function fi(){if(er!==null){var e=im(Yl),t=ln.transition,n=Oe;try{if(ln.transition=null,Oe=16>e?16:e,er===null)var r=!1;else{if(e=er,er=null,Yl=0,Ie&6)throw Error(H(331));var i=Ie;for(Ie|=4,ee=e.current;ee!==null;){var a=ee,l=a.child;if(ee.flags&16){var s=a.deletions;if(s!==null){for(var o=0;o<s.length;o++){var c=s[o];for(ee=c;ee!==null;){var f=ee;switch(f.tag){case 0:case 11:case 15:Zi(8,f,a)}var d=f.child;if(d!==null)d.return=f,ee=d;else for(;ee!==null;){f=ee;var p=f.sibling,h=f.return;if(mg(f),f===c){ee=null;break}if(p!==null){p.return=h,ee=p;break}ee=h}}}var m=a.alternate;if(m!==null){var v=m.child;if(v!==null){m.child=null;do{var w=v.sibling;v.sibling=null,v=w}while(v!==null)}}ee=a}}if(a.subtreeFlags&2064&&l!==null)l.return=a,ee=l;else e:for(;ee!==null;){if(a=ee,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Zi(9,a,a.return)}var g=a.sibling;if(g!==null){g.return=a.return,ee=g;break e}ee=a.return}}var x=e.current;for(ee=x;ee!==null;){l=ee;var y=l.child;if(l.subtreeFlags&2064&&y!==null)y.return=l,ee=y;else e:for(l=x;ee!==null;){if(s=ee,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:hs(9,s)}}catch(E){at(s,s.return,E)}if(s===l){ee=null;break e}var C=s.sibling;if(C!==null){C.return=s.return,ee=C;break e}ee=s.return}}if(Ie=i,hr(),Cn&&typeof Cn.onPostCommitFiberRoot=="function")try{Cn.onPostCommitFiberRoot(ls,e)}catch{}r=!0}return r}finally{Oe=n,ln.transition=t}}return!1}function Df(e,t,n){t=wi(n,t),t=ig(e,t,1),e=ar(e,t,1),t=Dt(),e!==null&&(ja(e,1,t),Wt(e,t))}function at(e,t,n){if(e.tag===3)Df(e,e,n);else for(;t!==null;){if(t.tag===3){Df(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(lr===null||!lr.has(r))){e=wi(n,e),e=ag(t,e,1),t=ar(t,e,1),e=Dt(),t!==null&&(ja(t,1,e),Wt(t,e));break}}t=t.return}}function Gw(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Dt(),e.pingedLanes|=e.suspendedLanes&n,wt===e&&(St&n)===n&&(yt===4||yt===3&&(St&130023424)===St&&500>st()-Oc?Nr(e,0):Lc|=n),Wt(e,t)}function jg(e,t){t===0&&(e.mode&1?(t=Ua,Ua<<=1,!(Ua&130023424)&&(Ua=4194304)):t=1);var n=Dt();e=Bn(e,t),e!==null&&(ja(e,t,n),Wt(e,n))}function qw(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),jg(e,n)}function Yw(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(H(314))}r!==null&&r.delete(t),jg(e,n)}var Cg;Cg=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ht.current)Bt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Bt=!1,Dw(e,t,n);Bt=!!(e.flags&131072)}else Bt=!1,Xe&&t.flags&1048576&&zm(t,Ml,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;yl(e,t),e=t.pendingProps;var i=gi(t,Pt.current);di(t,n),i=zc(null,t,r,e,i,n);var a=Pc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ut(r)?(a=!0,Ol(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,jc(t),i.updater=ps,t.stateNode=i,i._reactInternals=t,vu(t,r,e,n),t=ku(null,t,r,!0,a,n)):(t.tag=0,Xe&&a&&xc(t),It(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(yl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Kw(r),e=fn(r,e),i){case 0:t=bu(null,t,r,e,n);break e;case 1:t=jf(null,t,r,e,n);break e;case 11:t=Sf(null,t,r,e,n);break e;case 14:t=Ef(null,t,r,fn(r.type,e),n);break e}throw Error(H(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fn(r,i),bu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fn(r,i),jf(e,t,r,i,n);case 3:e:{if(ug(t),e===null)throw Error(H(387));r=t.pendingProps,a=t.memoizedState,i=a.element,Lm(e,t),Hl(t,r,null,n);var l=t.memoizedState;if(r=l.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=wi(Error(H(423)),t),t=Cf(e,t,r,n,i);break e}else if(r!==i){i=wi(Error(H(424)),t),t=Cf(e,t,r,n,i);break e}else for(Xt=ir(t.stateNode.containerInfo.firstChild),Kt=t,Xe=!0,hn=null,n=Am(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yi(),r===i){t=Hn(e,t,n);break e}It(e,t,r,n)}t=t.child}return t;case 5:return Om(t),e===null&&gu(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,l=i.children,du(r,i)?l=null:a!==null&&du(r,a)&&(t.flags|=32),og(e,t),It(e,t,l,n),t.child;case 6:return e===null&&gu(t),null;case 13:return cg(e,t,n);case 4:return Cc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=xi(t,null,r,n):It(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fn(r,i),Sf(e,t,r,i,n);case 7:return It(e,t,t.pendingProps,n),t.child;case 8:return It(e,t,t.pendingProps.children,n),t.child;case 12:return It(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,l=i.value,Ue($l,r._currentValue),r._currentValue=l,a!==null)if(vn(a.value,l)){if(a.children===i.children&&!Ht.current){t=Hn(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){l=a.child;for(var o=s.firstContext;o!==null;){if(o.context===r){if(a.tag===1){o=On(-1,n&-n),o.tag=2;var c=a.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?o.next=o:(o.next=f.next,f.next=o),c.pending=o}}a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),yu(a.return,n,t),s.lanes|=n;break}o=o.next}}else if(a.tag===10)l=a.type===t.type?null:a.child;else if(a.tag===18){if(l=a.return,l===null)throw Error(H(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),yu(l,n,t),l=a.sibling}else l=a.child;if(l!==null)l.return=a;else for(l=a;l!==null;){if(l===t){l=null;break}if(a=l.sibling,a!==null){a.return=l.return,l=a;break}l=l.return}a=l}It(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,di(t,n),i=sn(i),r=r(i),t.flags|=1,It(e,t,r,n),t.child;case 14:return r=t.type,i=fn(r,t.pendingProps),i=fn(r.type,i),Ef(e,t,r,i,n);case 15:return lg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fn(r,i),yl(e,t),t.tag=1,Ut(r)?(e=!0,Ol(t)):e=!1,di(t,n),rg(t,r,i),vu(t,r,i,n),ku(null,t,r,!0,e,n);case 19:return dg(e,t,n);case 22:return sg(e,t,n)}throw Error(H(156,t.tag))};function Ng(e,t){return em(e,t)}function Xw(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function an(e,t,n,r){return new Xw(e,t,n,r)}function Bc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kw(e){if(typeof e=="function")return Bc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===lc)return 11;if(e===sc)return 14}return 2}function or(e,t){var n=e.alternate;return n===null?(n=an(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function wl(e,t,n,r,i,a){var l=2;if(r=e,typeof e=="function")Bc(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Yr:return Tr(n.children,i,a,t);case ac:l=8,i|=8;break;case Uo:return e=an(12,n,t,i|2),e.elementType=Uo,e.lanes=a,e;case Wo:return e=an(13,n,t,i),e.elementType=Wo,e.lanes=a,e;case Vo:return e=an(19,n,t,i),e.elementType=Vo,e.lanes=a,e;case Oh:return gs(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Dh:l=10;break e;case Lh:l=9;break e;case lc:l=11;break e;case sc:l=14;break e;case Xn:l=16,r=null;break e}throw Error(H(130,e==null?e:typeof e,""))}return t=an(l,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function Tr(e,t,n,r){return e=an(7,e,r,t),e.lanes=n,e}function gs(e,t,n,r){return e=an(22,e,r,t),e.elementType=Oh,e.lanes=n,e.stateNode={isHidden:!1},e}function uo(e,t,n){return e=an(6,e,null,t),e.lanes=n,e}function co(e,t,n){return t=an(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Qw(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ws(0),this.expirationTimes=Ws(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ws(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Hc(e,t,n,r,i,a,l,s,o){return e=new Qw(e,t,n,s,o),t===1?(t=1,a===!0&&(t|=8)):t=0,a=an(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},jc(a),e}function Zw(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:qr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Tg(e){if(!e)return cr;e=e._reactInternals;e:{if(Mr(e)!==e||e.tag!==1)throw Error(H(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ut(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(H(171))}if(e.tag===1){var n=e.type;if(Ut(n))return Tm(e,n,t)}return t}function _g(e,t,n,r,i,a,l,s,o){return e=Hc(n,r,!0,e,i,a,l,s,o),e.context=Tg(null),n=e.current,r=Dt(),i=sr(n),a=On(r,i),a.callback=t??null,ar(n,a,i),e.current.lanes=i,ja(e,i,r),Wt(e,r),e}function ys(e,t,n,r){var i=t.current,a=Dt(),l=sr(i);return n=Tg(n),t.context===null?t.context=n:t.pendingContext=n,t=On(a,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ar(i,t,l),e!==null&&(gn(e,i,l,a),hl(e,i,l)),l}function Kl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Lf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Uc(e,t){Lf(e,t),(e=e.alternate)&&Lf(e,t)}function Jw(){return null}var zg=typeof reportError=="function"?reportError:function(e){console.error(e)};function Wc(e){this._internalRoot=e}xs.prototype.render=Wc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(H(409));ys(e,t,null,null)};xs.prototype.unmount=Wc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ar(function(){ys(null,e,null,null)}),t[$n]=null}};function xs(e){this._internalRoot=e}xs.prototype.unstable_scheduleHydration=function(e){if(e){var t=sm();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Qn.length&&t!==0&&t<Qn[n].priority;n++);Qn.splice(n,0,e),n===0&&um(e)}};function Vc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Of(){}function eb(e,t,n,r,i){if(i){if(typeof r=="function"){var a=r;r=function(){var c=Kl(l);a.call(c)}}var l=_g(t,r,e,0,null,!1,!1,"",Of);return e._reactRootContainer=l,e[$n]=l.current,fa(e.nodeType===8?e.parentNode:e),Ar(),l}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var c=Kl(o);s.call(c)}}var o=Hc(e,0,!1,null,null,!1,!1,"",Of);return e._reactRootContainer=o,e[$n]=o.current,fa(e.nodeType===8?e.parentNode:e),Ar(function(){ys(t,o,n,r)}),o}function ws(e,t,n,r,i){var a=n._reactRootContainer;if(a){var l=a;if(typeof i=="function"){var s=i;i=function(){var o=Kl(l);s.call(o)}}ys(t,l,e,i)}else l=eb(n,t,e,i,r);return Kl(l)}am=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ui(t.pendingLanes);n!==0&&(cc(t,n|1),Wt(t,st()),!(Ie&6)&&(bi=st()+500,hr()))}break;case 13:Ar(function(){var r=Bn(e,1);if(r!==null){var i=Dt();gn(r,e,1,i)}}),Uc(e,1)}};dc=function(e){if(e.tag===13){var t=Bn(e,134217728);if(t!==null){var n=Dt();gn(t,e,134217728,n)}Uc(e,134217728)}};lm=function(e){if(e.tag===13){var t=sr(e),n=Bn(e,t);if(n!==null){var r=Dt();gn(n,e,t,r)}Uc(e,t)}};sm=function(){return Oe};om=function(e,t){var n=Oe;try{return Oe=e,t()}finally{Oe=n}};tu=function(e,t,n){switch(t){case"input":if(Yo(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=cs(r);if(!i)throw Error(H(90));Mh(r),Yo(r,i)}}}break;case"textarea":Bh(e,n);break;case"select":t=n.value,t!=null&&si(e,!!n.multiple,t,!1)}};Yh=Fc;Xh=Ar;var tb={usingClientEntryPoint:!1,Events:[Na,Zr,cs,Gh,qh,Fc]},Oi={findFiberByHostInstance:Sr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nb={bundleType:Oi.bundleType,version:Oi.version,rendererPackageName:Oi.rendererPackageName,rendererConfig:Oi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Un.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Zh(e),e===null?null:e.stateNode},findFiberByHostInstance:Oi.findFiberByHostInstance||Jw,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 el=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!el.isDisabled&&el.supportsFiber)try{ls=el.inject(nb),Cn=el}catch{}}Jt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tb;Jt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Vc(t))throw Error(H(200));return Zw(e,t,null,n)};Jt.createRoot=function(e,t){if(!Vc(e))throw Error(H(299));var n=!1,r="",i=zg;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Hc(e,1,!1,null,null,n,!1,r,i),e[$n]=t.current,fa(e.nodeType===8?e.parentNode:e),new Wc(t)};Jt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(H(188)):(e=Object.keys(e).join(","),Error(H(268,e)));return e=Zh(t),e=e===null?null:e.stateNode,e};Jt.flushSync=function(e){return Ar(e)};Jt.hydrate=function(e,t,n){if(!vs(t))throw Error(H(200));return ws(null,e,t,!0,n)};Jt.hydrateRoot=function(e,t,n){if(!Vc(e))throw Error(H(405));var r=n!=null&&n.hydratedSources||null,i=!1,a="",l=zg;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),t=_g(t,null,e,1,n??null,i,!1,a,l),e[$n]=t.current,fa(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new xs(t)};Jt.render=function(e,t,n){if(!vs(t))throw Error(H(200));return ws(null,e,t,!1,n)};Jt.unmountComponentAtNode=function(e){if(!vs(e))throw Error(H(40));return e._reactRootContainer?(Ar(function(){ws(null,null,e,!1,function(){e._reactRootContainer=null,e[$n]=null})}),!0):!1};Jt.unstable_batchedUpdates=Fc;Jt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!vs(n))throw Error(H(200));if(e==null||e._reactInternals===void 0)throw Error(H(38));return ws(e,t,n,!1,r)};Jt.version="18.3.1-next-f1338f8080-20240426";function Pg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Pg)}catch(e){console.error(e)}}Pg(),Ph.exports=Jt;var Rg=Ph.exports;const Ig=Sa(Rg);var Ff=Rg;Bo.createRoot=Ff.createRoot,Bo.hydrateRoot=Ff.hydrateRoot;function rb(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ib=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ab=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lb={};function Mf(e,t){return(lb.jsx?ab:ib).test(e)}const sb=/[ \t\n\f\r]/g;function ob(e){return typeof e=="object"?e.type==="text"?$f(e.value):!1:$f(e)}function $f(e){return e.replace(sb,"")===""}class _a{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}_a.prototype.normal={};_a.prototype.property={};_a.prototype.space=void 0;function Ag(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new _a(n,r,t)}function Au(e){return e.toLowerCase()}class Vt{constructor(t,n){this.attribute=n,this.property=t}}Vt.prototype.attribute="";Vt.prototype.booleanish=!1;Vt.prototype.boolean=!1;Vt.prototype.commaOrSpaceSeparated=!1;Vt.prototype.commaSeparated=!1;Vt.prototype.defined=!1;Vt.prototype.mustUseProperty=!1;Vt.prototype.number=!1;Vt.prototype.overloadedBoolean=!1;Vt.prototype.property="";Vt.prototype.spaceSeparated=!1;Vt.prototype.space=void 0;let ub=0;const ke=$r(),dt=$r(),Du=$r(),V=$r(),He=$r(),pi=$r(),qt=$r();function $r(){return 2**++ub}const Lu=Object.freeze(Object.defineProperty({__proto__:null,boolean:ke,booleanish:dt,commaOrSpaceSeparated:qt,commaSeparated:pi,number:V,overloadedBoolean:Du,spaceSeparated:He},Symbol.toStringTag,{value:"Module"})),fo=Object.keys(Lu);class Gc extends Vt{constructor(t,n,r,i){let a=-1;if(super(t,n),Bf(this,"space",i),typeof r=="number")for(;++a<fo.length;){const l=fo[a];Bf(this,fo[a],(r&Lu[l])===Lu[l])}}}Gc.prototype.defined=!0;function Bf(e,t,n){n&&(e[t]=n)}function Ci(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new Gc(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Au(r)]=r,n[Au(a.attribute)]=r}return new _a(t,n,e.space)}const Dg=Ci({properties:{ariaActiveDescendant:null,ariaAtomic:dt,ariaAutoComplete:null,ariaBusy:dt,ariaChecked:dt,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:He,ariaCurrent:null,ariaDescribedBy:He,ariaDetails:null,ariaDisabled:dt,ariaDropEffect:He,ariaErrorMessage:null,ariaExpanded:dt,ariaFlowTo:He,ariaGrabbed:dt,ariaHasPopup:null,ariaHidden:dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:He,ariaLevel:V,ariaLive:null,ariaModal:dt,ariaMultiLine:dt,ariaMultiSelectable:dt,ariaOrientation:null,ariaOwns:He,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:dt,ariaReadOnly:dt,ariaRelevant:null,ariaRequired:dt,ariaRoleDescription:He,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:dt,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Lg(e,t){return t in e?e[t]:t}function Og(e,t){return Lg(e,t.toLowerCase())}const cb=Ci({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:pi,acceptCharset:He,accessKey:He,action:null,allow:null,allowFullScreen:ke,allowPaymentRequest:ke,allowUserMedia:ke,alt:null,as:null,async:ke,autoCapitalize:null,autoComplete:He,autoFocus:ke,autoPlay:ke,blocking:He,capture:null,charSet:null,checked:ke,cite:null,className:He,cols:V,colSpan:null,content:null,contentEditable:dt,controls:ke,controlsList:He,coords:V|pi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ke,defer:ke,dir:null,dirName:null,disabled:ke,download:Du,draggable:dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ke,formTarget:null,headers:He,height:V,hidden:Du,high:V,href:null,hrefLang:null,htmlFor:He,httpEquiv:He,id:null,imageSizes:null,imageSrcSet:null,inert:ke,inputMode:null,integrity:null,is:null,isMap:ke,itemId:null,itemProp:He,itemRef:He,itemScope:ke,itemType:He,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ke,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:ke,muted:ke,name:null,nonce:null,noModule:ke,noValidate:ke,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ke,optimum:V,pattern:null,ping:He,placeholder:null,playsInline:ke,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ke,referrerPolicy:null,rel:He,required:ke,reversed:ke,rows:V,rowSpan:V,sandbox:He,scope:null,scoped:ke,seamless:ke,selected:ke,shadowRootClonable:ke,shadowRootDelegatesFocus:ke,shadowRootMode:null,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:dt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:ke,useMap:null,value:dt,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:He,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ke,declare:ke,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:ke,noHref:ke,noShade:ke,noWrap:ke,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:dt,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ke,disableRemotePlayback:ke,prefix:null,property:null,results:V,security:null,unselectable:null},space:"html",transform:Og}),db=Ci({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:qt,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:He,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:ke,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:pi,g2:pi,glyphName:pi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:qt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:V,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:He,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qt,rev:qt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qt,requiredFeatures:qt,requiredFonts:qt,requiredFormats:qt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:qt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qt,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Lg}),Fg=Ci({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Mg=Ci({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Og}),$g=Ci({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),fb={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},pb=/[A-Z]/g,Hf=/-[a-z]/g,hb=/^data[-\w.:]+$/i;function mb(e,t){const n=Au(t);let r=t,i=Vt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&hb.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Hf,yb);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Hf.test(a)){let l=a.replace(pb,gb);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Gc}return new i(r,t)}function gb(e){return"-"+e.toLowerCase()}function yb(e){return e.charAt(1).toUpperCase()}const xb=Ag([Dg,cb,Fg,Mg,$g],"html"),qc=Ag([Dg,db,Fg,Mg,$g],"svg");function vb(e){return e.join(" ").trim()}var Yc={},Uf=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,wb=/\n/g,bb=/^\s*/,kb=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Sb=/^:\s*/,Eb=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,jb=/^[;\s]*/,Cb=/^\s+|\s+$/g,Nb=`
41
+ `,Wf="/",Vf="*",kr="",Tb="comment",_b="declaration";function zb(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var v=m.match(wb);v&&(n+=v.length);var w=m.lastIndexOf(Nb);r=~w?m.length-w:r+m.length}function a(){var m={line:n,column:r};return function(v){return v.position=new l(m),c(),v}}function l(m){this.start=m,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function s(m){var v=new Error(t.source+":"+n+":"+r+": "+m);if(v.reason=m,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function o(m){var v=m.exec(e);if(v){var w=v[0];return i(w),e=e.slice(w.length),v}}function c(){o(bb)}function f(m){var v;for(m=m||[];v=d();)v!==!1&&m.push(v);return m}function d(){var m=a();if(!(Wf!=e.charAt(0)||Vf!=e.charAt(1))){for(var v=2;kr!=e.charAt(v)&&(Vf!=e.charAt(v)||Wf!=e.charAt(v+1));)++v;if(v+=2,kr===e.charAt(v-1))return s("End of comment missing");var w=e.slice(2,v-2);return r+=2,i(w),e=e.slice(v),r+=2,m({type:Tb,comment:w})}}function p(){var m=a(),v=o(kb);if(v){if(d(),!o(Sb))return s("property missing ':'");var w=o(Eb),g=m({type:_b,property:Gf(v[0].replace(Uf,kr)),value:w?Gf(w[0].replace(Uf,kr)):kr});return o(jb),g}}function h(){var m=[];f(m);for(var v;v=p();)v!==!1&&(m.push(v),f(m));return m}return c(),h()}function Gf(e){return e?e.replace(Cb,kr):kr}var Pb=zb,Rb=Cl&&Cl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yc,"__esModule",{value:!0});Yc.default=Ab;const Ib=Rb(Pb);function Ab(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Ib.default)(e),i=typeof t=="function";return r.forEach(a=>{if(a.type!=="declaration")return;const{property:l,value:s}=a;i?t(l,s,a):s&&(n=n||{},n[l]=s)}),n}var bs={};Object.defineProperty(bs,"__esModule",{value:!0});bs.camelCase=void 0;var Db=/^--[a-zA-Z0-9_-]+$/,Lb=/-([a-z])/g,Ob=/^[^-]+$/,Fb=/^-(webkit|moz|ms|o|khtml)-/,Mb=/^-(ms)-/,$b=function(e){return!e||Ob.test(e)||Db.test(e)},Bb=function(e,t){return t.toUpperCase()},qf=function(e,t){return"".concat(t,"-")},Hb=function(e,t){return t===void 0&&(t={}),$b(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Mb,qf):e=e.replace(Fb,qf),e.replace(Lb,Bb))};bs.camelCase=Hb;var Ub=Cl&&Cl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Wb=Ub(Yc),Vb=bs;function Ou(e,t){var n={};return!e||typeof e!="string"||(0,Wb.default)(e,function(r,i){r&&i&&(n[(0,Vb.camelCase)(r,t)]=i)}),n}Ou.default=Ou;var Gb=Ou;const qb=Sa(Gb),Bg=Hg("end"),Xc=Hg("start");function Hg(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Yb(e){const t=Xc(e),n=Bg(e);if(t&&n)return{start:t,end:n}}function ta(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Yf(e.position):"start"in e||"end"in e?Yf(e):"line"in e||"column"in e?Fu(e):""}function Fu(e){return Xf(e&&e.line)+":"+Xf(e&&e.column)}function Yf(e){return Fu(e&&e.start)+"-"+Fu(e&&e.end)}function Xf(e){return e&&typeof e=="number"?e:1}class Rt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},l=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(l=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?a.ruleId=r:(a.source=r.slice(0,o),a.ruleId=r.slice(o+1))}if(!a.place&&a.ancestors&&a.ancestors){const o=a.ancestors[a.ancestors.length-1];o&&(a.place=o.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=ta(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Rt.prototype.file="";Rt.prototype.name="";Rt.prototype.reason="";Rt.prototype.message="";Rt.prototype.stack="";Rt.prototype.column=void 0;Rt.prototype.line=void 0;Rt.prototype.ancestors=void 0;Rt.prototype.cause=void 0;Rt.prototype.fatal=void 0;Rt.prototype.place=void 0;Rt.prototype.ruleId=void 0;Rt.prototype.source=void 0;const Kc={}.hasOwnProperty,Xb=new Map,Kb=/[A-Z]/g,Qb=new Set(["table","tbody","thead","tfoot","tr"]),Zb=new Set(["td","th"]),Ug="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Jb(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=sk(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=lk(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?qc:xb,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Wg(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Wg(e,t,n){if(t.type==="element")return ek(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return tk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return rk(e,t,n);if(t.type==="mdxjsEsm")return nk(e,t);if(t.type==="root")return ik(e,t,n);if(t.type==="text")return ak(e,t)}function ek(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=qc,e.schema=i),e.ancestors.push(t);const a=Gg(e,t.tagName,!1),l=ok(e,t);let s=Zc(e,t);return Qb.has(t.tagName)&&(s=s.filter(function(o){return typeof o=="string"?!ob(o):!0})),Vg(e,l,a,t),Qc(l,s),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function tk(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ba(e,t.position)}function nk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ba(e,t.position)}function rk(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=qc,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Gg(e,t.name,!0),l=uk(e,t),s=Zc(e,t);return Vg(e,l,a,t),Qc(l,s),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function ik(e,t,n){const r={};return Qc(r,Zc(e,t)),e.create(t,e.Fragment,r,n)}function ak(e,t){return t.value}function Vg(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Qc(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function lk(e,t,n){return r;function r(i,a,l,s){const c=Array.isArray(l.children)?n:t;return s?c(a,l,s):c(a,l)}}function sk(e,t){return n;function n(r,i,a,l){const s=Array.isArray(a.children),o=Xc(r);return t(i,a,l,s,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function ok(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Kc.call(t.properties,i)){const a=ck(e,i,t.properties[i]);if(a){const[l,s]=a;e.tableCellAlignToStyle&&l==="align"&&typeof s=="string"&&Zb.has(t.tagName)?r=s:n[l]=s}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function uk(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const s=l.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else ba(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else ba(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Zc(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Xb;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const o=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(o){const c=i.get(o)||0;l=o+"-"+c,i.set(o,c+1)}}const s=Wg(e,a,l);s!==void 0&&n.push(s)}return n}function ck(e,t,n){const r=mb(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?rb(n):vb(n)),r.property==="style"){let i=typeof n=="object"?n:dk(e,String(n));return e.stylePropertyNameCase==="css"&&(i=fk(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?fb[r.property]||r.property:r.attribute,n]}}function dk(e,t){try{return qb(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Rt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Ug+"#cannot-parse-style-attribute",i}}function Gg(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,l;for(;++a<i.length;){const s=Mf(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};l=l?{type:"MemberExpression",object:l,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}r=l}else r=Mf(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Kc.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ba(e)}function ba(e,t){const n=new Rt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Ug+"#cannot-handle-mdx-estrees-without-createevaluater",n}function fk(e){const t={};let n;for(n in e)Kc.call(e,n)&&(t[pk(n)]=e[n]);return t}function pk(e){let t=e.replace(Kb,hk);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function hk(e){return"-"+e.toLowerCase()}const po={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},mk={};function Jc(e,t){const n=mk,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return qg(e,r,i)}function qg(e,t,n){if(gk(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Kf(e.children,t,n)}return Array.isArray(e)?Kf(e,t,n):""}function Kf(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=qg(e[i],t,n);return r.join("")}function gk(e){return!!(e&&typeof e=="object")}const Qf=document.createElement("i");function ed(e){const t="&"+e+";";Qf.innerHTML=t;const n=Qf.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Qt(e,t,n,r){const i=e.length;let a=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);a<r.length;)l=r.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function rn(e,t){return e.length>0?(Qt(e,e.length,0,t),e):t}const Zf={}.hasOwnProperty;function Yg(e){const t={};let n=-1;for(;++n<e.length;)yk(t,e[n]);return t}function yk(e,t){let n;for(n in t){const i=(Zf.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){Zf.call(i,l)||(i[l]=[]);const s=a[l];xk(i[l],Array.isArray(s)?s:s?[s]:[])}}}function xk(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Qt(e,0,0,r)}function Xg(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function yn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const At=mr(/[A-Za-z]/),zt=mr(/[\dA-Za-z]/),vk=mr(/[#-'*+\--9=?A-Z^-~]/);function Ql(e){return e!==null&&(e<32||e===127)}const Mu=mr(/\d/),wk=mr(/[\dA-Fa-f]/),bk=mr(/[!-/:-@[-`{-~]/);function ue(e){return e!==null&&e<-2}function $e(e){return e!==null&&(e<0||e===32)}function Ce(e){return e===-2||e===-1||e===32}const ks=mr(new RegExp("\\p{P}|\\p{S}","u")),Dr=mr(/\s/);function mr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ni(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&zt(e.charCodeAt(n+1))&&zt(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(l=String.fromCharCode(a,s),i=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Pe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(o){return Ce(o)?(e.enter(n),s(o)):t(o)}function s(o){return Ce(o)&&a++<i?(e.consume(o),s):(e.exit(n),t(o))}}const kk={tokenize:Sk};function Sk(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Pe(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,l(s)}function l(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return ue(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),l)}}const Ek={tokenize:jk},Jf={tokenize:Ck};function jk(e){const t=this,n=[];let r=0,i,a,l;return s;function s(y){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,o,c)(y)}return c(y)}function o(y){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&x();const C=t.events.length;let E=C,b;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){b=t.events[E][1].end;break}g(r);let T=C;for(;T<t.events.length;)t.events[T][1].end={...b},T++;return Qt(t.events,E+1,0,t.events.slice(C)),t.events.length=T,c(y)}return s(y)}function c(y){if(r===n.length){if(!i)return p(y);if(i.currentConstruct&&i.currentConstruct.concrete)return m(y);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Jf,f,d)(y)}function f(y){return i&&x(),g(r),p(y)}function d(y){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,m(y)}function p(y){return t.containerState={},e.attempt(Jf,h,m)(y)}function h(y){return r++,n.push([t.currentConstruct,t.containerState]),p(y)}function m(y){if(y===null){i&&x(),g(0),e.consume(y);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),v(y)}function v(y){if(y===null){w(e.exit("chunkFlow"),!0),g(0),e.consume(y);return}return ue(y)?(e.consume(y),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(y),v)}function w(y,C){const E=t.sliceStream(y);if(C&&E.push(null),y.previous=a,a&&(a.next=y),a=y,i.defineSkip(y.start),i.write(E),t.parser.lazy[y.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<l&&(!i.events[b][1].end||i.events[b][1].end.offset>l))return;const T=t.events.length;let _=T,R,N;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){if(R){N=t.events[_][1].end;break}R=!0}for(g(r),b=T;b<t.events.length;)t.events[b][1].end={...N},b++;Qt(t.events,_+1,0,t.events.slice(T)),t.events.length=b}}function g(y){let C=n.length;for(;C-- >y;){const E=n[C];t.containerState=E[1],E[0].exit.call(t,e)}n.length=y}function x(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ck(e,t,n){return Pe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ki(e){if(e===null||$e(e)||Dr(e))return 1;if(ks(e))return 2}function Ss(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const $u={name:"attention",resolveAll:Nk,tokenize:Tk};function Nk(e,t){let n=-1,r,i,a,l,s,o,c,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},p={...e[n][1].start};ep(d,-o),ep(p,o),l={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},s={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},a={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...l.start},end:{...s.end}},e[r][1].end={...l.start},e[n][1].start={...s.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=rn(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=rn(c,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",a,t]]),c=rn(c,Ss(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=rn(c,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,c=rn(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Qt(e,r-1,n-r+3,c),n=r+c.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Tk(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ki(r);let a;return l;function l(o){return a=o,e.enter("attentionSequence"),s(o)}function s(o){if(o===a)return e.consume(o),s;const c=e.exit("attentionSequence"),f=ki(o),d=!f||f===2&&i||n.includes(o),p=!i||i===2&&f||n.includes(r);return c._open=!!(a===42?d:d&&(i||!p)),c._close=!!(a===42?p:p&&(f||!d)),t(o)}}function ep(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const _k={name:"autolink",tokenize:zk};function zk(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(h){return At(h)?(e.consume(h),l):h===64?n(h):c(h)}function l(h){return h===43||h===45||h===46||zt(h)?(r=1,s(h)):c(h)}function s(h){return h===58?(e.consume(h),r=0,o):(h===43||h===45||h===46||zt(h))&&r++<32?(e.consume(h),s):(r=0,c(h))}function o(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Ql(h)?n(h):(e.consume(h),o)}function c(h){return h===64?(e.consume(h),f):vk(h)?(e.consume(h),c):n(h)}function f(h){return zt(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||zt(h))&&r++<63){const m=h===45?p:d;return e.consume(h),m}return n(h)}}const za={partial:!0,tokenize:Pk};function Pk(e,t,n){return r;function r(a){return Ce(a)?Pe(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||ue(a)?t(a):n(a)}}const Kg={continuation:{tokenize:Ik},exit:Ak,name:"blockQuote",tokenize:Rk};function Rk(e,t,n){const r=this;return i;function i(l){if(l===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return n(l)}function a(l){return Ce(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Ik(e,t,n){const r=this;return i;function i(l){return Ce(l)?Pe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(Kg,t,n)(l)}}function Ak(e){e.exit("blockQuote")}const Qg={name:"characterEscape",tokenize:Dk};function Dk(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return bk(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Zg={name:"characterReference",tokenize:Lk};function Lk(e,t,n){const r=this;let i=0,a,l;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),o}function o(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,l=zt,f(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=wk,f):(e.enter("characterReferenceValue"),a=7,l=Mu,f(d))}function f(d){if(d===59&&i){const p=e.exit("characterReferenceValue");return l===zt&&!ed(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(d)&&i++<a?(e.consume(d),f):n(d)}}const tp={partial:!0,tokenize:Fk},np={concrete:!0,name:"codeFenced",tokenize:Ok};function Ok(e,t,n){const r=this,i={partial:!0,tokenize:E};let a=0,l=0,s;return o;function o(b){return c(b)}function c(b){const T=r.events[r.events.length-1];return a=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,s=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(b)}function f(b){return b===s?(l++,e.consume(b),f):l<3?n(b):(e.exit("codeFencedFenceSequence"),Ce(b)?Pe(e,d,"whitespace")(b):d(b))}function d(b){return b===null||ue(b)?(e.exit("codeFencedFence"),r.interrupt?t(b):e.check(tp,v,C)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===null||ue(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(b)):Ce(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Pe(e,h,"whitespace")(b)):b===96&&b===s?n(b):(e.consume(b),p)}function h(b){return b===null||ue(b)?d(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||ue(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(b)):b===96&&b===s?n(b):(e.consume(b),m)}function v(b){return e.attempt(i,C,w)(b)}function w(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),g}function g(b){return a>0&&Ce(b)?Pe(e,x,"linePrefix",a+1)(b):x(b)}function x(b){return b===null||ue(b)?e.check(tp,v,C)(b):(e.enter("codeFlowValue"),y(b))}function y(b){return b===null||ue(b)?(e.exit("codeFlowValue"),x(b)):(e.consume(b),y)}function C(b){return e.exit("codeFenced"),t(b)}function E(b,T,_){let R=0;return N;function N(I){return b.enter("lineEnding"),b.consume(I),b.exit("lineEnding"),M}function M(I){return b.enter("codeFencedFence"),Ce(I)?Pe(b,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):$(I)}function $(I){return I===s?(b.enter("codeFencedFenceSequence"),L(I)):_(I)}function L(I){return I===s?(R++,b.consume(I),L):R>=l?(b.exit("codeFencedFenceSequence"),Ce(I)?Pe(b,B,"whitespace")(I):B(I)):_(I)}function B(I){return I===null||ue(I)?(b.exit("codeFencedFence"),T(I)):_(I)}}}function Fk(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const ho={name:"codeIndented",tokenize:$k},Mk={partial:!0,tokenize:Bk};function $k(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Pe(e,a,"linePrefix",5)(c)}function a(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(c):n(c)}function l(c){return c===null?o(c):ue(c)?e.attempt(Mk,l,o)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||ue(c)?(e.exit("codeFlowValue"),l(c)):(e.consume(c),s)}function o(c){return e.exit("codeIndented"),t(c)}}function Bk(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):ue(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):Pe(e,a,"linePrefix",5)(l)}function a(l){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(l):ue(l)?i(l):n(l)}}const Hk={name:"codeText",previous:Wk,resolve:Uk,tokenize:Vk};function Uk(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Wk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Vk(e,t,n){let r=0,i,a;return l;function l(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),r++,s):(e.exit("codeTextSequence"),o(d))}function o(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),o):d===96?(a=e.enter("codeTextSequence"),i=0,f(d)):ue(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),o):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||ue(d)?(e.exit("codeTextData"),o(d)):(e.consume(d),c)}function f(d){return d===96?(e.consume(d),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",c(d))}}class Gk{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Fi(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Fi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Fi(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Fi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Fi(this.left,n.reverse())}}}function Fi(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Jg(e){const t={};let n=-1,r,i,a,l,s,o,c;const f=new Gk(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,a=0,a<o.length&&o[a][1].type==="lineEndingBlank"&&(a+=2),a<o.length&&o[a][1].type==="content"))for(;++a<o.length&&o[a][1].type!=="content";)o[a][1].type==="chunkText"&&(o[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,qk(f,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(l=f.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},s=f.slice(i,n),s.unshift(r),f.splice(i,n-i+1,s))}}return Qt(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!c}function qk(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const s=l.events,o=[],c={};let f,d,p=-1,h=n,m=0,v=0;const w=[v];for(;h;){for(;e.get(++i)[1]!==h;);a.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),d&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(v=p+1,w.push(v),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):w.pop(),p=w.length;p--;){const g=s.slice(w[p],w[p+1]),x=a.pop();o.push([x,x+g.length-1]),e.splice(x,2,g)}for(o.reverse(),p=-1;++p<o.length;)c[m+o[p][0]]=m+o[p][1],m+=o[p][1]-o[p][0]-1;return c}const Yk={resolve:Kk,tokenize:Qk},Xk={partial:!0,tokenize:Zk};function Kk(e){return Jg(e),e}function Qk(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?a(s):ue(s)?e.check(Xk,l,a)(s):(e.consume(s),i)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function l(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Zk(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Pe(e,a,"linePrefix")}function a(l){if(l===null||ue(l))return n(l);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function ey(e,t,n,r,i,a,l,s,o){const c=o||Number.POSITIVE_INFINITY;let f=0;return d;function d(g){return g===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(g),e.exit(a),p):g===null||g===32||g===41||Ql(g)?n(g):(e.enter(r),e.enter(l),e.enter(s),e.enter("chunkString",{contentType:"string"}),v(g))}function p(g){return g===62?(e.enter(a),e.consume(g),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===62?(e.exit("chunkString"),e.exit(s),p(g)):g===null||g===60||ue(g)?n(g):(e.consume(g),g===92?m:h)}function m(g){return g===60||g===62||g===92?(e.consume(g),h):h(g)}function v(g){return!f&&(g===null||g===41||$e(g))?(e.exit("chunkString"),e.exit(s),e.exit(l),e.exit(r),t(g)):f<c&&g===40?(e.consume(g),f++,v):g===41?(e.consume(g),f--,v):g===null||g===32||g===40||Ql(g)?n(g):(e.consume(g),g===92?w:v)}function w(g){return g===40||g===41||g===92?(e.consume(g),v):v(g)}}function ty(e,t,n,r,i,a){const l=this;let s=0,o;return c;function c(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(a),f}function f(h){return s>999||h===null||h===91||h===93&&!o||h===94&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?n(h):h===93?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):ue(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||ue(h)||s++>999?(e.exit("chunkString"),f(h)):(e.consume(h),o||(o=!Ce(h)),h===92?p:d)}function p(h){return h===91||h===92||h===93?(e.consume(h),s++,d):d(h)}}function ny(e,t,n,r,i,a){let l;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,o):n(p)}function o(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),c(p))}function c(p){return p===l?(e.exit(a),o(l)):p===null?n(p):ue(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Pe(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||ue(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?d:f)}function d(p){return p===l||p===92?(e.consume(p),f):f(p)}}function na(e,t){let n;return r;function r(i){return ue(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ce(i)?Pe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Jk={name:"definition",tokenize:t0},e0={partial:!0,tokenize:n0};function t0(e,t,n){const r=this;let i;return a;function a(h){return e.enter("definition"),l(h)}function l(h){return ty.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function s(h){return i=yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o):n(h)}function o(h){return $e(h)?na(e,c)(h):c(h)}function c(h){return ey(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(e0,d,d)(h)}function d(h){return Ce(h)?Pe(e,p,"whitespace")(h):p(h)}function p(h){return h===null||ue(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function n0(e,t,n){return r;function r(s){return $e(s)?na(e,i)(s):n(s)}function i(s){return ny(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return Ce(s)?Pe(e,l,"whitespace")(s):l(s)}function l(s){return s===null||ue(s)?t(s):n(s)}}const r0={name:"hardBreakEscape",tokenize:i0};function i0(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return ue(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const a0={name:"headingAtx",resolve:l0,tokenize:s0};function l0(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Qt(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function s0(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),a(f)}function a(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||$e(f)?(e.exit("atxHeadingSequence"),s(f)):n(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),o(f)):f===null||ue(f)?(e.exit("atxHeading"),t(f)):Ce(f)?Pe(e,s,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function o(f){return f===35?(e.consume(f),o):(e.exit("atxHeadingSequence"),s(f))}function c(f){return f===null||f===35||$e(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),c)}}const o0=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],rp=["pre","script","style","textarea"],u0={concrete:!0,name:"htmlFlow",resolveTo:f0,tokenize:p0},c0={partial:!0,tokenize:m0},d0={partial:!0,tokenize:h0};function f0(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function p0(e,t,n){const r=this;let i,a,l,s,o;return c;function c(j){return f(j)}function f(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),d}function d(j){return j===33?(e.consume(j),p):j===47?(e.consume(j),a=!0,v):j===63?(e.consume(j),i=3,r.interrupt?t:S):At(j)?(e.consume(j),l=String.fromCharCode(j),w):n(j)}function p(j){return j===45?(e.consume(j),i=2,h):j===91?(e.consume(j),i=5,s=0,m):At(j)?(e.consume(j),i=4,r.interrupt?t:S):n(j)}function h(j){return j===45?(e.consume(j),r.interrupt?t:S):n(j)}function m(j){const oe="CDATA[";return j===oe.charCodeAt(s++)?(e.consume(j),s===oe.length?r.interrupt?t:$:m):n(j)}function v(j){return At(j)?(e.consume(j),l=String.fromCharCode(j),w):n(j)}function w(j){if(j===null||j===47||j===62||$e(j)){const oe=j===47,ve=l.toLowerCase();return!oe&&!a&&rp.includes(ve)?(i=1,r.interrupt?t(j):$(j)):o0.includes(l.toLowerCase())?(i=6,oe?(e.consume(j),g):r.interrupt?t(j):$(j)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(j):a?x(j):y(j))}return j===45||zt(j)?(e.consume(j),l+=String.fromCharCode(j),w):n(j)}function g(j){return j===62?(e.consume(j),r.interrupt?t:$):n(j)}function x(j){return Ce(j)?(e.consume(j),x):N(j)}function y(j){return j===47?(e.consume(j),N):j===58||j===95||At(j)?(e.consume(j),C):Ce(j)?(e.consume(j),y):N(j)}function C(j){return j===45||j===46||j===58||j===95||zt(j)?(e.consume(j),C):E(j)}function E(j){return j===61?(e.consume(j),b):Ce(j)?(e.consume(j),E):y(j)}function b(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),o=j,T):Ce(j)?(e.consume(j),b):_(j)}function T(j){return j===o?(e.consume(j),o=null,R):j===null||ue(j)?n(j):(e.consume(j),T)}function _(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||$e(j)?E(j):(e.consume(j),_)}function R(j){return j===47||j===62||Ce(j)?y(j):n(j)}function N(j){return j===62?(e.consume(j),M):n(j)}function M(j){return j===null||ue(j)?$(j):Ce(j)?(e.consume(j),M):n(j)}function $(j){return j===45&&i===2?(e.consume(j),J):j===60&&i===1?(e.consume(j),ae):j===62&&i===4?(e.consume(j),Q):j===63&&i===3?(e.consume(j),S):j===93&&i===5?(e.consume(j),q):ue(j)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(c0,le,L)(j)):j===null||ue(j)?(e.exit("htmlFlowData"),L(j)):(e.consume(j),$)}function L(j){return e.check(d0,B,le)(j)}function B(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),I}function I(j){return j===null||ue(j)?L(j):(e.enter("htmlFlowData"),$(j))}function J(j){return j===45?(e.consume(j),S):$(j)}function ae(j){return j===47?(e.consume(j),l="",A):$(j)}function A(j){if(j===62){const oe=l.toLowerCase();return rp.includes(oe)?(e.consume(j),Q):$(j)}return At(j)&&l.length<8?(e.consume(j),l+=String.fromCharCode(j),A):$(j)}function q(j){return j===93?(e.consume(j),S):$(j)}function S(j){return j===62?(e.consume(j),Q):j===45&&i===2?(e.consume(j),S):$(j)}function Q(j){return j===null||ue(j)?(e.exit("htmlFlowData"),le(j)):(e.consume(j),Q)}function le(j){return e.exit("htmlFlow"),t(j)}}function h0(e,t,n){const r=this;return i;function i(l){return ue(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):n(l)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function m0(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(za,t,n)}}const g0={name:"htmlText",tokenize:y0};function y0(e,t,n){const r=this;let i,a,l;return s;function s(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),o}function o(S){return S===33?(e.consume(S),c):S===47?(e.consume(S),E):S===63?(e.consume(S),y):At(S)?(e.consume(S),_):n(S)}function c(S){return S===45?(e.consume(S),f):S===91?(e.consume(S),a=0,m):At(S)?(e.consume(S),x):n(S)}function f(S){return S===45?(e.consume(S),h):n(S)}function d(S){return S===null?n(S):S===45?(e.consume(S),p):ue(S)?(l=d,ae(S)):(e.consume(S),d)}function p(S){return S===45?(e.consume(S),h):d(S)}function h(S){return S===62?J(S):S===45?p(S):d(S)}function m(S){const Q="CDATA[";return S===Q.charCodeAt(a++)?(e.consume(S),a===Q.length?v:m):n(S)}function v(S){return S===null?n(S):S===93?(e.consume(S),w):ue(S)?(l=v,ae(S)):(e.consume(S),v)}function w(S){return S===93?(e.consume(S),g):v(S)}function g(S){return S===62?J(S):S===93?(e.consume(S),g):v(S)}function x(S){return S===null||S===62?J(S):ue(S)?(l=x,ae(S)):(e.consume(S),x)}function y(S){return S===null?n(S):S===63?(e.consume(S),C):ue(S)?(l=y,ae(S)):(e.consume(S),y)}function C(S){return S===62?J(S):y(S)}function E(S){return At(S)?(e.consume(S),b):n(S)}function b(S){return S===45||zt(S)?(e.consume(S),b):T(S)}function T(S){return ue(S)?(l=T,ae(S)):Ce(S)?(e.consume(S),T):J(S)}function _(S){return S===45||zt(S)?(e.consume(S),_):S===47||S===62||$e(S)?R(S):n(S)}function R(S){return S===47?(e.consume(S),J):S===58||S===95||At(S)?(e.consume(S),N):ue(S)?(l=R,ae(S)):Ce(S)?(e.consume(S),R):J(S)}function N(S){return S===45||S===46||S===58||S===95||zt(S)?(e.consume(S),N):M(S)}function M(S){return S===61?(e.consume(S),$):ue(S)?(l=M,ae(S)):Ce(S)?(e.consume(S),M):R(S)}function $(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),i=S,L):ue(S)?(l=$,ae(S)):Ce(S)?(e.consume(S),$):(e.consume(S),B)}function L(S){return S===i?(e.consume(S),i=void 0,I):S===null?n(S):ue(S)?(l=L,ae(S)):(e.consume(S),L)}function B(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||$e(S)?R(S):(e.consume(S),B)}function I(S){return S===47||S===62||$e(S)?R(S):n(S)}function J(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function ae(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),A}function A(S){return Ce(S)?Pe(e,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):q(S)}function q(S){return e.enter("htmlTextData"),l(S)}}const td={name:"labelEnd",resolveAll:b0,resolveTo:k0,tokenize:S0},x0={tokenize:E0},v0={tokenize:j0},w0={tokenize:C0};function b0(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Qt(e,0,e.length,n),e}function k0(e,t){let n=e.length,r=0,i,a,l,s;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const o={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return s=[["enter",o,t],["enter",c,t]],s=rn(s,e.slice(a+1,a+r+3)),s=rn(s,[["enter",f,t]]),s=rn(s,Ss(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),s=rn(s,[["exit",f,t],e[l-2],e[l-1],["exit",c,t]]),s=rn(s,e.slice(l+1)),s=rn(s,[["exit",o,t]]),Qt(e,a,e.length,s),e}function S0(e,t,n){const r=this;let i=r.events.length,a,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(p){return a?a._inactive?d(p):(l=r.parser.defined.includes(yn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),o):n(p)}function o(p){return p===40?e.attempt(x0,f,l?f:d)(p):p===91?e.attempt(v0,f,l?c:d)(p):l?f(p):d(p)}function c(p){return e.attempt(w0,f,d)(p)}function f(p){return t(p)}function d(p){return a._balanced=!0,n(p)}}function E0(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return $e(d)?na(e,a)(d):a(d)}function a(d){return d===41?f(d):ey(e,l,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function l(d){return $e(d)?na(e,o)(d):f(d)}function s(d){return n(d)}function o(d){return d===34||d===39||d===40?ny(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):f(d)}function c(d){return $e(d)?na(e,f)(d):f(d)}function f(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function j0(e,t,n){const r=this;return i;function i(s){return ty.call(r,e,a,l,"reference","referenceMarker","referenceString")(s)}function a(s){return r.parser.defined.includes(yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function l(s){return n(s)}}function C0(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const N0={name:"labelStartImage",resolveAll:td.resolveAll,tokenize:T0};function T0(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),l):n(s)}function l(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const _0={name:"labelStartLink",resolveAll:td.resolveAll,tokenize:z0};function z0(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const mo={name:"lineEnding",tokenize:P0};function P0(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Pe(e,t,"linePrefix")}}const bl={name:"thematicBreak",tokenize:R0};function R0(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),l(c)}function l(c){return i=c,s(c)}function s(c){return c===i?(e.enter("thematicBreakSequence"),o(c)):r>=3&&(c===null||ue(c))?(e.exit("thematicBreak"),t(c)):n(c)}function o(c){return c===i?(e.consume(c),r++,o):(e.exit("thematicBreakSequence"),Ce(c)?Pe(e,s,"whitespace")(c):s(c))}}const Mt={continuation:{tokenize:L0},exit:F0,name:"list",tokenize:D0},I0={partial:!0,tokenize:M0},A0={partial:!0,tokenize:O0};function D0(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return s;function s(h){const m=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Mu(h)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(bl,n,c)(h):c(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(h)}return n(h)}function o(h){return Mu(h)&&++l<10?(e.consume(h),o):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),c(h)):n(h)}function c(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(za,r.interrupt?n:f,e.attempt(I0,p,d))}function f(h){return r.containerState.initialBlankLine=!0,a++,p(h)}function d(h){return Ce(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function L0(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(za,i,a);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Pe(e,t,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!Ce(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(A0,t,l)(s))}function l(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Pe(e,e.attempt(Mt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function O0(e,t,n){const r=this;return Pe(e,i,"listItemIndent",r.containerState.size+1);function i(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(a):n(a)}}function F0(e){e.exit(this.containerState.type)}function M0(e,t,n){const r=this;return Pe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const l=r.events[r.events.length-1];return!Ce(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const ip={name:"setextUnderline",resolveTo:$0,tokenize:B0};function $0(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",l,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function B0(e,t,n){const r=this;let i;return a;function a(c){let f=r.events.length,d;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){d=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,l(c)):n(c)}function l(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===i?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),Ce(c)?Pe(e,o,"lineSuffix")(c):o(c))}function o(c){return c===null||ue(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const H0={tokenize:U0};function U0(e){const t=this,n=e.attempt(za,r,e.attempt(this.parser.constructs.flowInitial,i,Pe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Yk,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const W0={resolveAll:iy()},V0=ry("string"),G0=ry("text");function ry(e){return{resolveAll:iy(e==="text"?q0:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,l,s);return l;function l(f){return c(f)?a(f):s(f)}function s(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),o}function o(f){return c(f)?(n.exit("data"),a(f)):(n.consume(f),o)}function c(f){if(f===null)return!0;const d=i[f];let p=-1;if(d)for(;++p<d.length;){const h=d[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function iy(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function q0(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,l=-1,s=0,o;for(;a--;){const c=i[a];if(typeof c=="string"){for(l=c.length;c.charCodeAt(l-1)===32;)s++,l--;if(l)break;l=-1}else if(c===-2)o=!0,s++;else if(c!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const c={type:n===e.length||o||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const Y0={42:Mt,43:Mt,45:Mt,48:Mt,49:Mt,50:Mt,51:Mt,52:Mt,53:Mt,54:Mt,55:Mt,56:Mt,57:Mt,62:Kg},X0={91:Jk},K0={[-2]:ho,[-1]:ho,32:ho},Q0={35:a0,42:bl,45:[ip,bl],60:u0,61:ip,95:bl,96:np,126:np},Z0={38:Zg,92:Qg},J0={[-5]:mo,[-4]:mo,[-3]:mo,33:N0,38:Zg,42:$u,60:[_k,g0],91:_0,92:[r0,Qg],93:td,95:$u,96:Hk},e1={null:[$u,W0]},t1={null:[42,95]},n1={null:[]},r1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:t1,contentInitial:X0,disable:n1,document:Y0,flow:Q0,flowInitial:K0,insideSpan:e1,string:Z0,text:J0},Symbol.toStringTag,{value:"Module"}));function i1(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let l=[],s=[];const o={attempt:T(E),check:T(b),consume:x,enter:y,exit:C,interrupt:T(b,{interrupt:!0})},c={code:null,containerState:{},defineSkip:v,events:[],now:m,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:d};let f=t.tokenize.call(c,o);return t.resolveAll&&a.push(t),c;function d(M){return l=rn(l,M),w(),l[l.length-1]!==null?[]:(_(t,0),c.events=Ss(a,c.events,c),c.events)}function p(M,$){return l1(h(M),$)}function h(M){return a1(l,M)}function m(){const{_bufferIndex:M,_index:$,line:L,column:B,offset:I}=r;return{_bufferIndex:M,_index:$,line:L,column:B,offset:I}}function v(M){i[M.line]=M.column,N()}function w(){let M;for(;r._index<l.length;){const $=l[r._index];if(typeof $=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<$.length;)g($.charCodeAt(r._bufferIndex));else g($)}}function g(M){f=f(M)}function x(M){ue(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,N()):M!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=M}function y(M,$){const L=$||{};return L.type=M,L.start=m(),c.events.push(["enter",L,c]),s.push(L),L}function C(M){const $=s.pop();return $.end=m(),c.events.push(["exit",$,c]),$}function E(M,$){_(M,$.from)}function b(M,$){$.restore()}function T(M,$){return L;function L(B,I,J){let ae,A,q,S;return Array.isArray(B)?le(B):"tokenize"in B?le([B]):Q(B);function Q(ne){return re;function re(we){const ce=we!==null&&ne[we],ze=we!==null&&ne.null,Y=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(ze)?ze:ze?[ze]:[]];return le(Y)(we)}}function le(ne){return ae=ne,A=0,ne.length===0?J:j(ne[A])}function j(ne){return re;function re(we){return S=R(),q=ne,ne.partial||(c.currentConstruct=ne),ne.name&&c.parser.constructs.disable.null.includes(ne.name)?ve():ne.tokenize.call($?Object.assign(Object.create(c),$):c,o,oe,ve)(we)}}function oe(ne){return M(q,S),I}function ve(ne){return S.restore(),++A<ae.length?j(ae[A]):J}}}function _(M,$){M.resolveAll&&!a.includes(M)&&a.push(M),M.resolve&&Qt(c.events,$,c.events.length-$,M.resolve(c.events.slice($),c)),M.resolveTo&&(c.events=M.resolveTo(c.events,c))}function R(){const M=m(),$=c.previous,L=c.currentConstruct,B=c.events.length,I=Array.from(s);return{from:B,restore:J};function J(){r=M,c.previous=$,c.currentConstruct=L,c.events.length=B,s=I,N()}}function N(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function a1(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,a)];else{if(l=e.slice(n,i),r>-1){const s=l[0];typeof s=="string"?l[0]=s.slice(r):l.shift()}a>0&&l.push(e[i].slice(0,a))}return l}function l1(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
42
+ `;break}case-3:{l=`\r
43
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(a)}i=a===-2,r.push(l)}return r.join("")}function s1(e){const r={constructs:Yg([r1,...(e||{}).extensions||[]]),content:i(kk),defined:[],document:i(Ek),flow:i(H0),lazy:{},string:i(V0),text:i(G0)};return r;function i(a){return l;function l(s){return i1(r,a,s)}}}function o1(e){for(;!Jg(e););return e}const ap=/[\0\t\n\r]/g;function u1(){let e=1,t="",n=!0,r;return i;function i(a,l,s){const o=[];let c,f,d,p,h;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),d=0,t="",n&&(a.charCodeAt(0)===65279&&d++,n=void 0);d<a.length;){if(ap.lastIndex=d,c=ap.exec(a),p=c&&c.index!==void 0?c.index:a.length,h=a.charCodeAt(p),!c){t=a.slice(d);break}if(h===10&&d===p&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),d<p&&(o.push(a.slice(d,p)),e+=p-d),h){case 0:{o.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,o.push(-2);e++<f;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}d=p+1}return s&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const c1=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function d1(e){return e.replace(c1,f1)}function f1(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Xg(n.slice(a?2:1),a?16:10)}return ed(n)||e}const ay={}.hasOwnProperty;function p1(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),h1(n)(o1(s1(n).document().write(u1()(e,t,!0))))}function h1(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(De),autolinkProtocol:R,autolinkEmail:R,atxHeading:a(rt),blockQuote:a(ze),characterEscape:R,characterReference:R,codeFenced:a(Y),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(Y,l),codeText:a(_e,l),codeTextData:R,data:R,codeFlowValue:R,definition:a(de),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(pt),hardBreakEscape:a(Fe),hardBreakTrailing:a(Fe),htmlFlow:a(Le,l),htmlFlowData:R,htmlText:a(Le,l),htmlTextData:R,image:a(Ft),label:l,link:a(De),listItem:a(qe),listItemValue:p,listOrdered:a(je,d),listUnordered:a(je),paragraph:a(Ke),reference:j,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(rt),strong:a(it),thematicBreak:a(ht)},exit:{atxHeading:o(),atxHeadingSequence:E,autolink:o(),autolinkEmail:ce,autolinkProtocol:we,blockQuote:o(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:ne,characterReference:re,codeFenced:o(w),codeFencedFence:v,codeFencedFenceInfo:h,codeFencedFenceMeta:m,codeFlowValue:N,codeIndented:o(g),codeText:o(I),codeTextData:N,data:N,definition:o(),definitionDestinationString:C,definitionLabelString:x,definitionTitleString:y,emphasis:o(),hardBreakEscape:o($),hardBreakTrailing:o($),htmlFlow:o(L),htmlFlowData:N,htmlText:o(B),htmlTextData:N,image:o(ae),label:q,labelText:A,lineEnding:M,link:o(J),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:oe,resourceDestinationString:S,resourceTitleString:Q,resource:le,setextHeading:o(_),setextHeadingLineSequence:T,setextHeadingText:b,strong:o(),thematicBreak:o()}};ly(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(z){let F={type:"root",children:[]};const te={stack:[F],tokenStack:[],config:t,enter:s,exit:c,buffer:l,resume:f,data:n},pe=[];let me=-1;for(;++me<z.length;)if(z[me][1].type==="listOrdered"||z[me][1].type==="listUnordered")if(z[me][0]==="enter")pe.push(me);else{const Ae=pe.pop();me=i(z,Ae,me)}for(me=-1;++me<z.length;){const Ae=t[z[me][0]];ay.call(Ae,z[me][1].type)&&Ae[z[me][1].type].call(Object.assign({sliceSerialize:z[me][2].sliceSerialize},te),z[me][1])}if(te.tokenStack.length>0){const Ae=te.tokenStack[te.tokenStack.length-1];(Ae[1]||lp).call(te,void 0,Ae[0])}for(F.position={start:Gn(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:Gn(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},me=-1;++me<t.transforms.length;)F=t.transforms[me](F)||F;return F}function i(z,F,te){let pe=F-1,me=-1,Ae=!1,Qe,ot,bt,mt;for(;++pe<=te;){const Ze=z[pe];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?me++:me--,mt=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(Qe&&!mt&&!me&&!bt&&(bt=pe),mt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:mt=void 0}if(!me&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||me===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(Qe){let We=pe;for(ot=void 0;We--;){const xt=z[We];if(xt[1].type==="lineEnding"||xt[1].type==="lineEndingBlank"){if(xt[0]==="exit")continue;ot&&(z[ot][1].type="lineEndingBlank",Ae=!0),xt[1].type="lineEnding",ot=We}else if(!(xt[1].type==="linePrefix"||xt[1].type==="blockQuotePrefix"||xt[1].type==="blockQuotePrefixWhitespace"||xt[1].type==="blockQuoteMarker"||xt[1].type==="listItemIndent"))break}bt&&(!ot||bt<ot)&&(Qe._spread=!0),Qe.end=Object.assign({},ot?z[ot][1].start:Ze[1].end),z.splice(ot||pe,0,["exit",Qe,Ze[2]]),pe++,te++}if(Ze[1].type==="listItemPrefix"){const We={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};Qe=We,z.splice(pe,0,["enter",We,Ze[2]]),pe++,te++,bt=void 0,mt=!0}}}return z[F][1]._spread=Ae,te}function a(z,F){return te;function te(pe){s.call(this,z(pe),pe),F&&F.call(this,pe)}}function l(){this.stack.push({type:"fragment",children:[]})}function s(z,F,te){this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([F,te||void 0]),z.position={start:Gn(F.start),end:void 0}}function o(z){return F;function F(te){z&&z.call(this,te),c.call(this,te)}}function c(z,F){const te=this.stack.pop(),pe=this.tokenStack.pop();if(pe)pe[0].type!==z.type&&(F?F.call(this,z,pe[0]):(pe[1]||lp).call(this,z,pe[0]));else throw new Error("Cannot close `"+z.type+"` ("+ta({start:z.start,end:z.end})+"): it’s not open");te.position.end=Gn(z.end)}function f(){return Jc(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(z){if(this.data.expectingFirstListItemValue){const F=this.stack[this.stack.length-2];F.start=Number.parseInt(this.sliceSerialize(z),10),this.data.expectingFirstListItemValue=void 0}}function h(){const z=this.resume(),F=this.stack[this.stack.length-1];F.lang=z}function m(){const z=this.resume(),F=this.stack[this.stack.length-1];F.meta=z}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const z=this.resume(),F=this.stack[this.stack.length-1];F.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const z=this.resume(),F=this.stack[this.stack.length-1];F.value=z.replace(/(\r?\n|\r)$/g,"")}function x(z){const F=this.resume(),te=this.stack[this.stack.length-1];te.label=F,te.identifier=yn(this.sliceSerialize(z)).toLowerCase()}function y(){const z=this.resume(),F=this.stack[this.stack.length-1];F.title=z}function C(){const z=this.resume(),F=this.stack[this.stack.length-1];F.url=z}function E(z){const F=this.stack[this.stack.length-1];if(!F.depth){const te=this.sliceSerialize(z).length;F.depth=te}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function T(z){const F=this.stack[this.stack.length-1];F.depth=this.sliceSerialize(z).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function R(z){const te=this.stack[this.stack.length-1].children;let pe=te[te.length-1];(!pe||pe.type!=="text")&&(pe=un(),pe.position={start:Gn(z.start),end:void 0},te.push(pe)),this.stack.push(pe)}function N(z){const F=this.stack.pop();F.value+=this.sliceSerialize(z),F.position.end=Gn(z.end)}function M(z){const F=this.stack[this.stack.length-1];if(this.data.atHardBreak){const te=F.children[F.children.length-1];te.position.end=Gn(z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(F.type)&&(R.call(this,z),N.call(this,z))}function $(){this.data.atHardBreak=!0}function L(){const z=this.resume(),F=this.stack[this.stack.length-1];F.value=z}function B(){const z=this.resume(),F=this.stack[this.stack.length-1];F.value=z}function I(){const z=this.resume(),F=this.stack[this.stack.length-1];F.value=z}function J(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const F=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=F,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function ae(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const F=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=F,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function A(z){const F=this.sliceSerialize(z),te=this.stack[this.stack.length-2];te.label=d1(F),te.identifier=yn(F).toLowerCase()}function q(){const z=this.stack[this.stack.length-1],F=this.resume(),te=this.stack[this.stack.length-1];if(this.data.inReference=!0,te.type==="link"){const pe=z.children;te.children=pe}else te.alt=F}function S(){const z=this.resume(),F=this.stack[this.stack.length-1];F.url=z}function Q(){const z=this.resume(),F=this.stack[this.stack.length-1];F.title=z}function le(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function oe(z){const F=this.resume(),te=this.stack[this.stack.length-1];te.label=F,te.identifier=yn(this.sliceSerialize(z)).toLowerCase(),this.data.referenceType="full"}function ve(z){this.data.characterReferenceType=z.type}function ne(z){const F=this.sliceSerialize(z),te=this.data.characterReferenceType;let pe;te?(pe=Xg(F,te==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):pe=ed(F);const me=this.stack[this.stack.length-1];me.value+=pe}function re(z){const F=this.stack.pop();F.position.end=Gn(z.end)}function we(z){N.call(this,z);const F=this.stack[this.stack.length-1];F.url=this.sliceSerialize(z)}function ce(z){N.call(this,z);const F=this.stack[this.stack.length-1];F.url="mailto:"+this.sliceSerialize(z)}function ze(){return{type:"blockquote",children:[]}}function Y(){return{type:"code",lang:null,meta:null,value:""}}function _e(){return{type:"inlineCode",value:""}}function de(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function pt(){return{type:"emphasis",children:[]}}function rt(){return{type:"heading",depth:0,children:[]}}function Fe(){return{type:"break"}}function Le(){return{type:"html",value:""}}function Ft(){return{type:"image",title:null,url:"",alt:null}}function De(){return{type:"link",title:null,url:"",children:[]}}function je(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function qe(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function Ke(){return{type:"paragraph",children:[]}}function it(){return{type:"strong",children:[]}}function un(){return{type:"text",value:""}}function ht(){return{type:"thematicBreak"}}}function Gn(e){return{line:e.line,column:e.column,offset:e.offset}}function ly(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ly(e,r):m1(e,r)}}function m1(e,t){let n;for(n in t)if(ay.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function lp(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ta({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ta({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ta({start:t.start,end:t.end})+") is still open")}function g1(e){const t=this;t.parser=n;function n(r){return p1(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function y1(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function x1(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
44
+ `}]}function v1(e,t){const n=t.value?t.value+`
45
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function w1(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function b1(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function k1(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ni(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+1,s+=1,e.footnoteCounts.set(r,s);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,o);const c={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,c),e.applyData(t,c)}function S1(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function E1(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function sy(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function j1(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return sy(e,t);const i={src:Ni(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function C1(e,t){const n={src:Ni(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function N1(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function T1(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return sy(e,t);const i={href:Ni(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function _1(e,t){const n={href:Ni(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function z1(e,t,n){const r=e.all(t),i=n?P1(n):oy(t),a={},l=[];if(typeof t.checked=="boolean"){const f=r[0];let d;f&&f.type==="element"&&f.tagName==="p"?d=f:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const f=r[s];(i||s!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
46
+ `}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const o=r[r.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&l.push({type:"text",value:`
47
+ `});const c={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,c),e.applyData(t,c)}function P1(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=oy(n[r])}return t}function oy(e){const t=e.spread;return t??e.children.length>1}function R1(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function I1(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function A1(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function D1(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function L1(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Xc(t.children[1]),o=Bg(t.children[t.children.length-1]);s&&o&&(l.position={start:s,end:o}),i.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function O1(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,s=l?l.length:t.children.length;let o=-1;const c=[];for(;++o<s;){const d=t.children[o],p={},h=l?l[o]:void 0;h&&(p.align=h);let m={type:"element",tagName:a,properties:p,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(d,m)),c.push(m)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,f),e.applyData(t,f)}function F1(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const sp=9,op=32;function M1(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(up(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(up(t.slice(i),i>0,!1)),a.join("")}function up(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===sp||a===op;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===sp||a===op;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function $1(e,t){const n={type:"text",value:M1(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function B1(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const H1={blockquote:y1,break:x1,code:v1,delete:w1,emphasis:b1,footnoteReference:k1,heading:S1,html:E1,imageReference:j1,image:C1,inlineCode:N1,linkReference:T1,link:_1,listItem:z1,list:R1,paragraph:I1,root:A1,strong:D1,table:L1,tableCell:F1,tableRow:O1,text:$1,thematicBreak:B1,toml:tl,yaml:tl,definition:tl,footnoteDefinition:tl};function tl(){}const uy=-1,Es=0,ra=1,Zl=2,nd=3,rd=4,id=5,ad=6,cy=7,dy=8,U1=typeof self=="object"?self:globalThis,cp=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new U1[e](t)},W1=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,l]=t[i];switch(a){case Es:case uy:return n(l,i);case ra:{const s=n([],i);for(const o of l)s.push(r(o));return s}case Zl:{const s=n({},i);for(const[o,c]of l)s[r(o)]=r(c);return s}case nd:return n(new Date(l),i);case rd:{const{source:s,flags:o}=l;return n(new RegExp(s,o),i)}case id:{const s=n(new Map,i);for(const[o,c]of l)s.set(r(o),r(c));return s}case ad:{const s=n(new Set,i);for(const o of l)s.add(r(o));return s}case cy:{const{name:s,message:o}=l;return n(cp(s,o),i)}case dy:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:s}=new Uint8Array(l);return n(new DataView(s),l)}}return n(cp(a,l),i)};return r},dp=e=>W1(new Map,e)(0),Hr="",{toString:V1}={},{keys:G1}=Object,Mi=e=>{const t=typeof e;if(t!=="object"||!e)return[Es,t];const n=V1.call(e).slice(8,-1);switch(n){case"Array":return[ra,Hr];case"Object":return[Zl,Hr];case"Date":return[nd,Hr];case"RegExp":return[rd,Hr];case"Map":return[id,Hr];case"Set":return[ad,Hr];case"DataView":return[ra,n]}return n.includes("Array")?[ra,n]:n.includes("Error")?[cy,n]:[Zl,n]},nl=([e,t])=>e===Es&&(t==="function"||t==="symbol"),q1=(e,t,n,r)=>{const i=(l,s)=>{const o=r.push(l)-1;return n.set(s,o),o},a=l=>{if(n.has(l))return n.get(l);let[s,o]=Mi(l);switch(s){case Es:{let f=l;switch(o){case"bigint":s=dy,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);f=null;break;case"undefined":return i([uy],l)}return i([s,f],l)}case ra:{if(o){let p=l;return o==="DataView"?p=new Uint8Array(l.buffer):o==="ArrayBuffer"&&(p=new Uint8Array(l)),i([o,[...p]],l)}const f=[],d=i([s,f],l);for(const p of l)f.push(a(p));return d}case Zl:{if(o)switch(o){case"BigInt":return i([o,l.toString()],l);case"Boolean":case"Number":case"String":return i([o,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const f=[],d=i([s,f],l);for(const p of G1(l))(e||!nl(Mi(l[p])))&&f.push([a(p),a(l[p])]);return d}case nd:return i([s,l.toISOString()],l);case rd:{const{source:f,flags:d}=l;return i([s,{source:f,flags:d}],l)}case id:{const f=[],d=i([s,f],l);for(const[p,h]of l)(e||!(nl(Mi(p))||nl(Mi(h))))&&f.push([a(p),a(h)]);return d}case ad:{const f=[],d=i([s,f],l);for(const p of l)(e||!nl(Mi(p)))&&f.push(a(p));return d}}const{message:c}=l;return i([s,{name:o,message:c}],l)};return a},fp=(e,{json:t,lossy:n}={})=>{const r=[];return q1(!(t||n),!!t,new Map,r)(e),r},Jl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?dp(fp(e,t)):structuredClone(e):(e,t)=>dp(fp(e,t));function Y1(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function X1(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function K1(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Y1,r=e.options.footnoteBackLabel||X1,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let o=-1;for(;++o<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[o]);if(!c)continue;const f=e.all(c),d=String(c.identifier).toUpperCase(),p=Ni(d.toLowerCase());let h=0;const m=[],v=e.footnoteCounts.get(d);for(;v!==void 0&&++h<=v;){m.length>0&&m.push({type:"text",value:" "});let x=typeof n=="string"?n:n(o,h);typeof x=="string"&&(x={type:"text",value:x}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,h),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const w=f[f.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const x=w.children[w.children.length-1];x&&x.type==="text"?x.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...m)}else f.push(...m);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(c,g),s.push(g)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Jl(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
48
48
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
49
- `}]}}const js=function(e){if(e==null)return Z1;if(typeof e=="function")return Cs(e);if(typeof e=="object")return Array.isArray(e)?X1(e):K1(e);if(typeof e=="string")return Q1(e);throw new Error("Expected function, string, or object as test")};function X1(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=js(e[n]);return Cs(r);function r(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function K1(e){const t=e;return Cs(n);function n(r){const i=r;let l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function Q1(e){return Cs(t);function t(n){return n&&n.type===e}}function Cs(e){return t;function t(n,r,i){return!!(J1(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Z1(){return!0}function J1(e){return e!==null&&typeof e=="object"&&"type"in e}const cy=[],eS=!0,$u=!1,tS="skip";function dy(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const l=js(i),a=r?-1:1;s(e,void 0,[])();function s(o,c,f){const d=o&&typeof o=="object"?o:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(o.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=cy,m,v,w;if((!t||l(o,c,f[f.length-1]||void 0))&&(h=nS(n(o,f)),h[0]===$u))return h;if("children"in o&&o.children){const g=o;if(g.children&&h[0]!==tS)for(v=(r?g.children.length:-1)+a,w=f.concat(g);v>-1&&v<g.children.length;){const x=g.children[v];if(m=s(x,v,w)(),m[0]===$u)return m;v=typeof m[1]=="number"?m[1]:v+a}}return h}}}function nS(e){return Array.isArray(e)?e:typeof e=="number"?[eS,e]:e==null?cy:[e]}function ld(e,t,n,r){let i,l,a;typeof t=="function"&&typeof n!="function"?(l=void 0,a=t,i=n):(l=t,a=n,i=r),dy(e,l,s,i);function s(o,c){const f=c[c.length-1],d=f?f.children.indexOf(o):void 0;return a(o,d,f)}}const Bu={}.hasOwnProperty,rS={};function iS(e,t){const n=t||rS,r=new Map,i=new Map,l=new Map,a={...$1,...n.handlers},s={all:c,applyData:aS,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:a,one:o,options:n,patch:lS,wrap:oS};return ld(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const d=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();d.has(p)||d.set(p,f)}}),s;function o(f,d){const p=f.type,h=s.handlers[p];if(Bu.call(s.handlers,p)&&h)return h(s,f,d);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in f){const{children:v,...w}=f,g=Ja(w);return g.children=s.all(f),g}return Ja(f)}return(s.options.unknownHandler||sS)(s,f,d)}function c(f){const d=[];if("children"in f){const p=f.children;let h=-1;for(;++h<p.length;){const m=s.one(p[h],f);if(m){if(h&&p[h-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=fp(m.value)),!Array.isArray(m)&&m.type==="element")){const v=m.children[0];v&&v.type==="text"&&(v.value=fp(v.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function lS(e,t){e.position&&(t.position=Gb(e))}function aS(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&l&&Object.assign(n.properties,Ja(l)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function sS(e,t){const n=t.data||{},r="value"in t&&!(Bu.call(n,"hProperties")||Bu.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function oS(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
49
+ `}]}}const js=function(e){if(e==null)return eS;if(typeof e=="function")return Cs(e);if(typeof e=="object")return Array.isArray(e)?Q1(e):Z1(e);if(typeof e=="string")return J1(e);throw new Error("Expected function, string, or object as test")};function Q1(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=js(e[n]);return Cs(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Z1(e){const t=e;return Cs(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function J1(e){return Cs(t);function t(n){return n&&n.type===e}}function Cs(e){return t;function t(n,r,i){return!!(tS(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function eS(){return!0}function tS(e){return e!==null&&typeof e=="object"&&"type"in e}const fy=[],nS=!0,Bu=!1,rS="skip";function py(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=js(i),l=r?-1:1;s(e,void 0,[])();function s(o,c,f){const d=o&&typeof o=="object"?o:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(o.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=fy,m,v,w;if((!t||a(o,c,f[f.length-1]||void 0))&&(h=iS(n(o,f)),h[0]===Bu))return h;if("children"in o&&o.children){const g=o;if(g.children&&h[0]!==rS)for(v=(r?g.children.length:-1)+l,w=f.concat(g);v>-1&&v<g.children.length;){const x=g.children[v];if(m=s(x,v,w)(),m[0]===Bu)return m;v=typeof m[1]=="number"?m[1]:v+l}}return h}}}function iS(e){return Array.isArray(e)?e:typeof e=="number"?[nS,e]:e==null?fy:[e]}function ld(e,t,n,r){let i,a,l;typeof t=="function"&&typeof n!="function"?(a=void 0,l=t,i=n):(a=t,l=n,i=r),py(e,a,s,i);function s(o,c){const f=c[c.length-1],d=f?f.children.indexOf(o):void 0;return l(o,d,f)}}const Hu={}.hasOwnProperty,aS={};function lS(e,t){const n=t||aS,r=new Map,i=new Map,a=new Map,l={...H1,...n.handlers},s={all:c,applyData:oS,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:l,one:o,options:n,patch:sS,wrap:cS};return ld(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const d=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();d.has(p)||d.set(p,f)}}),s;function o(f,d){const p=f.type,h=s.handlers[p];if(Hu.call(s.handlers,p)&&h)return h(s,f,d);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in f){const{children:v,...w}=f,g=Jl(w);return g.children=s.all(f),g}return Jl(f)}return(s.options.unknownHandler||uS)(s,f,d)}function c(f){const d=[];if("children"in f){const p=f.children;let h=-1;for(;++h<p.length;){const m=s.one(p[h],f);if(m){if(h&&p[h-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=pp(m.value)),!Array.isArray(m)&&m.type==="element")){const v=m.children[0];v&&v.type==="text"&&(v.value=pp(v.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function sS(e,t){e.position&&(t.position=Yb(e))}function oS(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&a&&Object.assign(n.properties,Jl(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function uS(e,t){const n=t.data||{},r="value"in t&&!(Hu.call(n,"hProperties")||Hu.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function cS(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
50
50
  `});++r<e.length;)r&&n.push({type:"text",value:`
51
51
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
52
- `}),n}function fp(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function pp(e,t){const n=iS(e,t),r=n.one(e,void 0),i=Y1(n),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
53
- `},i),l}function uS(e,t){return e&&"run"in e?async function(n,r){const i=pp(n,{file:r,...t});await e.run(i,r)}:function(n,r){return pp(n,{file:r,...e||t})}}function hp(e){if(e)throw e}var ka=Object.prototype.hasOwnProperty,fy=Object.prototype.toString,mp=Object.defineProperty,gp=Object.getOwnPropertyDescriptor,yp=function(t){return typeof Array.isArray=="function"?Array.isArray(t):fy.call(t)==="[object Array]"},xp=function(t){if(!t||fy.call(t)!=="[object Object]")return!1;var n=ka.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ka.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||ka.call(t,i)},vp=function(t,n){mp&&n.name==="__proto__"?mp(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},wp=function(t,n){if(n==="__proto__")if(ka.call(t,n)){if(gp)return gp(t,n).value}else return;return t[n]},cS=function e(){var t,n,r,i,l,a,s=arguments[0],o=1,c=arguments.length,f=!1;for(typeof s=="boolean"&&(f=s,s=arguments[1]||{},o=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});o<c;++o)if(t=arguments[o],t!=null)for(n in t)r=wp(s,n),i=wp(t,n),s!==i&&(f&&i&&(xp(i)||(l=yp(i)))?(l?(l=!1,a=r&&yp(r)?r:[]):a=r&&xp(r)?r:{},vp(s,{name:n,newValue:e(f,a,i)})):typeof i<"u"&&vp(s,{name:n,newValue:i}));return s};const go=Sl(cS);function Hu(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function dS(){const e=[],t={run:n,use:r};return t;function n(...i){let l=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(o,...c){const f=e[++l];let d=-1;if(o){a(o);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,f?fS(f,s)(...c):a(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function fS(e,t){let n;return r;function r(...a){const s=e.length>a.length;let o;s&&a.push(i);try{o=e.apply(this,a)}catch(c){const f=c;if(s&&n)throw f;return i(f)}s||(o&&o.then&&typeof o.then=="function"?o.then(l,i):o instanceof Error?i(o):l(o))}function i(a,...s){n||(n=!0,t(a,...s))}function l(a){i(null,a)}}const kn={basename:pS,dirname:hS,extname:mS,join:gS,sep:"/"};function pS(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Pl(e);let n=0,r=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else a<0&&(l=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function hS(e){if(Pl(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function mS(e){Pl(e);let t=e.length,n=-1,r=0,i=-1,l=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function gS(...e){let t=-1,n;for(;++t<e.length;)Pl(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":yS(n)}function yS(e){Pl(e);const t=e.codePointAt(0)===47;let n=xS(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function xS(e,t){let n="",r=0,i=-1,l=0,a=-1,s,o;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||l===1))if(i!==a-1&&l===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),i=a,l=0;continue}}else if(n.length>0){n="",r=0,i=a,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,l=0}else s===46&&l>-1?l++:l=-1}return n}function Pl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const vS={cwd:wS};function wS(){return"/"}function Uu(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function bS(e){if(typeof e=="string")e=new URL(e);else if(!Uu(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return kS(e)}function kS(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const yo=["history","path","basename","stem","extname","dirname"];class py{constructor(t){let n;t?Uu(t)?n={path:t}:typeof t=="string"||SS(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":vS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<yo.length;){const l=yo[r];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)yo.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?kn.basename(this.path):void 0}set basename(t){vo(t,"basename"),xo(t,"basename"),this.path=kn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?kn.dirname(this.path):void 0}set dirname(t){bp(this.basename,"dirname"),this.path=kn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?kn.extname(this.path):void 0}set extname(t){if(xo(t,"extname"),bp(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=kn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Uu(t)&&(t=bS(t)),vo(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?kn.basename(this.path,this.extname):void 0}set stem(t){vo(t,"stem"),xo(t,"stem"),this.path=kn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Rt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function xo(e,t){if(e&&e.includes(kn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+kn.sep+"`")}function vo(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function bp(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function SS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ES=function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l},jS={}.hasOwnProperty;class ad extends ES{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=dS()}copy(){const t=new ad;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(go(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ko("data",this.frozen),this.namespace[t]=n,this):jS.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ko("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ra(t),r=this.parser||this.Parser;return wo("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),wo("process",this.parser||this.Parser),bo("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,a){const s=ra(t),o=r.parse(s);r.run(o,s,function(f,d,p){if(f||!d||!p)return c(f);const h=d,m=r.stringify(h,p);TS(m)?p.value=m:p.result=m,c(f,p)});function c(f,d){f||!d?a(f):l?l(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),wo("processSync",this.parser||this.Parser),bo("processSync",this.compiler||this.Compiler),this.process(t,i),Sp("processSync","process",n),r;function i(l,a){n=!0,hp(l),r=a}}run(t,n,r){kp(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?l(void 0,r):new Promise(l);function l(a,s){const o=ra(n);i.run(t,o,c);function c(f,d,p){const h=d||t;f?s(f):a?a(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,l),Sp("runSync","run",r),i;function l(a,s){hp(a),i=s,r=!0}}stringify(t,n){this.freeze();const r=ra(n),i=this.compiler||this.Compiler;return bo("stringify",i),kp(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(ko("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(c){if(typeof c=="function")o(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...d]=c;o(f,d)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(c.plugins),c.settings&&(i.settings=go(!0,i.settings,c.settings))}function s(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const d=c[f];l(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function o(c,f){let d=-1,p=-1;for(;++d<r.length;)if(r[d][0]===c){p=d;break}if(p===-1)r.push([c,...f]);else if(f.length>0){let[h,...m]=f;const v=r[p][1];Hu(v)&&Hu(h)&&(h=go(!0,v,h)),r[p]=[c,h,...m]}}}}const CS=new ad().freeze();function wo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function bo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ko(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function kp(e){if(!Hu(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Sp(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ra(e){return NS(e)?e:new py(e)}function NS(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function TS(e){return typeof e=="string"||_S(e)}function _S(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const zS="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ep=[],jp={allowDangerousHtml:!0},PS=/^(https?|ircs?|mailto|xmpp)$/i,RS=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function IS(e){const t=AS(e),n=DS(e);return LS(t.runSync(t.parse(n),n),e)}function AS(e){const t=e.rehypePlugins||Ep,n=e.remarkPlugins||Ep,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...jp}:jp;return CS().use(h1).use(n).use(uS,r).use(t)}function DS(e){const t=e.children||"",n=new py;return typeof t=="string"&&(n.value=t),n}function LS(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,a=t.skipHtml,s=t.unwrapDisallowed,o=t.urlTransform||OS;for(const f of RS)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+zS+f.id,void 0);return ld(e,c),Qb(e,{Fragment:u.Fragment,components:i,ignoreInvalidStyle:!0,jsx:u.jsx,jsxs:u.jsxs,passKeys:!0,passNode:!0});function c(f,d,p){if(f.type==="raw"&&p&&typeof d=="number")return a?p.children.splice(d,1):p.children[d]={type:"text",value:f.value},d;if(f.type==="element"){let h;for(h in po)if(Object.hasOwn(po,h)&&Object.hasOwn(f.properties,h)){const m=f.properties[h],v=po[h];(v===null||v.includes(f.tagName))&&(f.properties[h]=o(String(m||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):l?l.includes(f.tagName):!1;if(!h&&r&&typeof d=="number"&&(h=!r(f,d,p)),h&&p&&typeof d=="number")return s&&f.children?p.children.splice(d,1,...f.children):p.children.splice(d,1),d}}}function OS(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||PS.test(e.slice(0,t))?e:""}function Cp(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function FS(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function MS(e,t,n){const i=js((n||{}).ignore||[]),l=$S(t);let a=-1;for(;++a<l.length;)dy(e,"text",s);function s(c,f){let d=-1,p;for(;++d<f.length;){const h=f[d],m=p?p.children:void 0;if(i(h,m?m.indexOf(h):void 0,p))return;p=h}if(p)return o(c,f)}function o(c,f){const d=f[f.length-1],p=l[a][0],h=l[a][1];let m=0;const w=d.children.indexOf(c);let g=!1,x=[];p.lastIndex=0;let y=p.exec(c.value);for(;y;){const C=y.index,E={index:y.index,input:y.input,stack:[...f,c]};let b=h(...y,E);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?p.lastIndex=C+1:(m!==C&&x.push({type:"text",value:c.value.slice(m,C)}),Array.isArray(b)?x.push(...b):b&&x.push(b),m=C+y[0].length,g=!0),!p.global)break;y=p.exec(c.value)}return g?(m<c.value.length&&x.push({type:"text",value:c.value.slice(m)}),d.children.splice(w,1,...x)):x=[c],w+x.length}}function $S(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([BS(i[0]),HS(i[1])])}return t}function BS(e){return typeof e=="string"?new RegExp(FS(e),"g"):e}function HS(e){return typeof e=="function"?e:function(){return e}}const So="phrasing",Eo=["autolink","link","image","label"];function US(){return{transforms:[KS],enter:{literalAutolink:VS,literalAutolinkEmail:jo,literalAutolinkHttp:jo,literalAutolinkWww:jo},exit:{literalAutolink:XS,literalAutolinkEmail:YS,literalAutolinkHttp:GS,literalAutolinkWww:qS}}}function WS(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:So,notInConstruct:Eo},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:So,notInConstruct:Eo},{character:":",before:"[ps]",after:"\\/",inConstruct:So,notInConstruct:Eo}]}}function VS(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function jo(e){this.config.enter.autolinkProtocol.call(this,e)}function GS(e){this.config.exit.autolinkProtocol.call(this,e)}function qS(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function YS(e){this.config.exit.autolinkEmail.call(this,e)}function XS(e){this.exit(e)}function KS(e){MS(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,QS],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),ZS]],{ignore:["link","linkReference"]})}function QS(e,t,n,r,i){let l="";if(!hy(i)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!JS(n)))return!1;const a=eE(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:l+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function ZS(e,t,n,r){return!hy(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function JS(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function eE(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Cp(e,"(");let l=Cp(e,")");for(;r!==-1&&i>l;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),l++;return[e,n]}function hy(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Dr(n)||ks(n))&&(!t||n!==47)}my.peek=uE;function tE(){this.buffer()}function nE(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function rE(){this.buffer()}function iE(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function lE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function aE(e){this.exit(e)}function sE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function oE(e){this.exit(e)}function uE(){return"["}function my(e,t,n,r){const i=n.createTracker(r);let l=i.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return l+=i.move(n.safe(n.associationId(e),{after:"]",before:l})),s(),a(),l+=i.move("]"),l}function cE(){return{enter:{gfmFootnoteCallString:tE,gfmFootnoteCall:nE,gfmFootnoteDefinitionLabelString:rE,gfmFootnoteDefinition:iE},exit:{gfmFootnoteCallString:lE,gfmFootnoteCall:aE,gfmFootnoteDefinitionLabelString:sE,gfmFootnoteDefinition:oE}}}function dE(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:my},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,l,a){const s=l.createTracker(a);let o=s.move("[^");const c=l.enter("footnoteDefinition"),f=l.enter("label");return o+=s.move(l.safe(l.associationId(r),{before:o,after:"]"})),f(),o+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),o+=s.move((t?`
54
- `:" ")+l.indentLines(l.containerFlow(r,s.current()),t?gy:fE))),c(),o}}function fE(e,t,n){return t===0?e:gy(e,t,n)}function gy(e,t,n){return(n?"":" ")+e}const pE=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];yy.peek=xE;function hE(){return{canContainEols:["delete"],enter:{strikethrough:gE},exit:{strikethrough:yE}}}function mE(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:pE}],handlers:{delete:yy}}}function gE(e){this.enter({type:"delete",children:[]},e)}function yE(e){this.exit(e)}function yy(e,t,n,r){const i=n.createTracker(r),l=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),l(),a}function xE(){return"~"}function vE(e){return e.length}function wE(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||vE,l=[],a=[],s=[],o=[];let c=0,f=-1;for(;++f<e.length;){const v=[],w=[];let g=-1;for(e[f].length>c&&(c=e[f].length);++g<e[f].length;){const x=bE(e[f][g]);if(n.alignDelimiters!==!1){const y=i(x);w[g]=y,(o[g]===void 0||y>o[g])&&(o[g]=y)}v.push(x)}a[f]=v,s[f]=w}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)l[d]=Np(r[d]);else{const v=Np(r);for(;++d<c;)l[d]=v}d=-1;const p=[],h=[];for(;++d<c;){const v=l[d];let w="",g="";v===99?(w=":",g=":"):v===108?w=":":v===114&&(g=":");let x=n.alignDelimiters===!1?1:Math.max(1,o[d]-w.length-g.length);const y=w+"-".repeat(x)+g;n.alignDelimiters!==!1&&(x=w.length+x+g.length,x>o[d]&&(o[d]=x),h[d]=x),p[d]=y}a.splice(1,0,p),s.splice(1,0,h),f=-1;const m=[];for(;++f<a.length;){const v=a[f],w=s[f];d=-1;const g=[];for(;++d<c;){const x=v[d]||"";let y="",C="";if(n.alignDelimiters!==!1){const E=o[d]-(w[d]||0),b=l[d];b===114?y=" ".repeat(E):b===99?E%2?(y=" ".repeat(E/2+.5),C=" ".repeat(E/2-.5)):(y=" ".repeat(E/2),C=y):C=" ".repeat(E)}n.delimiterStart!==!1&&!d&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&x==="")&&(n.delimiterStart!==!1||d)&&g.push(" "),n.alignDelimiters!==!1&&g.push(y),g.push(x),n.alignDelimiters!==!1&&g.push(C),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&g.push("|")}m.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return m.join(`
55
- `)}function bE(e){return e==null?"":String(e)}function Np(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function kE(e,t,n,r){const i=n.enter("blockquote"),l=n.createTracker(r);l.move("> "),l.shift(2);const a=n.indentLines(n.containerFlow(e,l.current()),SE);return i(),a}function SE(e,t,n){return">"+(n?"":" ")+e}function EE(e,t){return Tp(e,t.inConstruct,!0)&&!Tp(e,t.notInConstruct,!1)}function Tp(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function _p(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
56
- `&&EE(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
57
- `}function jE(e,t){const n=String(e);let r=n.indexOf(t),i=r,l=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++l>a&&(a=l):l=1,i=r+t.length,r=n.indexOf(t,i);return a}function CE(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function NE(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function TE(e,t,n,r){const i=NE(n),l=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(CE(e,n)){const d=n.enter("codeIndented"),p=n.indentLines(l,_E);return d(),p}const s=n.createTracker(r),o=i.repeat(Math.max(jE(l,i)+1,3)),c=n.enter("codeFenced");let f=s.move(o);if(e.lang){const d=n.enter(`codeFencedLang${a}`);f+=s.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...s.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${a}`);f+=s.move(" "),f+=s.move(n.safe(e.meta,{before:f,after:`
52
+ `}),n}function pp(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function hp(e,t){const n=lS(e,t),r=n.one(e,void 0),i=K1(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
53
+ `},i),a}function dS(e,t){return e&&"run"in e?async function(n,r){const i=hp(n,{file:r,...t});await e.run(i,r)}:function(n,r){return hp(n,{file:r,...e||t})}}function mp(e){if(e)throw e}var kl=Object.prototype.hasOwnProperty,hy=Object.prototype.toString,gp=Object.defineProperty,yp=Object.getOwnPropertyDescriptor,xp=function(t){return typeof Array.isArray=="function"?Array.isArray(t):hy.call(t)==="[object Array]"},vp=function(t){if(!t||hy.call(t)!=="[object Object]")return!1;var n=kl.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&kl.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||kl.call(t,i)},wp=function(t,n){gp&&n.name==="__proto__"?gp(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},bp=function(t,n){if(n==="__proto__")if(kl.call(t,n)){if(yp)return yp(t,n).value}else return;return t[n]},fS=function e(){var t,n,r,i,a,l,s=arguments[0],o=1,c=arguments.length,f=!1;for(typeof s=="boolean"&&(f=s,s=arguments[1]||{},o=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});o<c;++o)if(t=arguments[o],t!=null)for(n in t)r=bp(s,n),i=bp(t,n),s!==i&&(f&&i&&(vp(i)||(a=xp(i)))?(a?(a=!1,l=r&&xp(r)?r:[]):l=r&&vp(r)?r:{},wp(s,{name:n,newValue:e(f,l,i)})):typeof i<"u"&&wp(s,{name:n,newValue:i}));return s};const go=Sa(fS);function Uu(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function pS(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);s(null,...i);function s(o,...c){const f=e[++a];let d=-1;if(o){l(o);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,f?hS(f,s)(...c):l(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function hS(e,t){let n;return r;function r(...l){const s=e.length>l.length;let o;s&&l.push(i);try{o=e.apply(this,l)}catch(c){const f=c;if(s&&n)throw f;return i(f)}s||(o&&o.then&&typeof o.then=="function"?o.then(a,i):o instanceof Error?i(o):a(o))}function i(l,...s){n||(n=!0,t(l,...s))}function a(l){i(null,l)}}const kn={basename:mS,dirname:gS,extname:yS,join:xS,sep:"/"};function mS(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Pa(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else l<0&&(a=!0,l=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function gS(e){if(Pa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function yS(e){Pa(e);let t=e.length,n=-1,r=0,i=-1,a=0,l;for(;t--;){const s=e.codePointAt(t);if(s===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function xS(...e){let t=-1,n;for(;++t<e.length;)Pa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":vS(n)}function vS(e){Pa(e);const t=e.codePointAt(0)===47;let n=wS(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function wS(e,t){let n="",r=0,i=-1,a=0,l=-1,s,o;for(;++l<=e.length;){if(l<e.length)s=e.codePointAt(l);else{if(s===47)break;s=47}if(s===47){if(!(i===l-1||a===1))if(i!==l-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),i=l,a=0;continue}}else if(n.length>0){n="",r=0,i=l,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,a=0}else s===46&&a>-1?a++:a=-1}return n}function Pa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const bS={cwd:kS};function kS(){return"/"}function Wu(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function SS(e){if(typeof e=="string")e=new URL(e);else if(!Wu(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return ES(e)}function ES(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const yo=["history","path","basename","stem","extname","dirname"];class my{constructor(t){let n;t?Wu(t)?n={path:t}:typeof t=="string"||jS(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":bS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<yo.length;){const a=yo[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)yo.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?kn.basename(this.path):void 0}set basename(t){vo(t,"basename"),xo(t,"basename"),this.path=kn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?kn.dirname(this.path):void 0}set dirname(t){kp(this.basename,"dirname"),this.path=kn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?kn.extname(this.path):void 0}set extname(t){if(xo(t,"extname"),kp(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=kn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Wu(t)&&(t=SS(t)),vo(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?kn.basename(this.path,this.extname):void 0}set stem(t){vo(t,"stem"),xo(t,"stem"),this.path=kn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Rt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function xo(e,t){if(e&&e.includes(kn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+kn.sep+"`")}function vo(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function kp(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function jS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const CS=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},NS={}.hasOwnProperty;class sd extends CS{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=pS()}copy(){const t=new sd;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(go(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ko("data",this.frozen),this.namespace[t]=n,this):NS.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ko("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=rl(t),r=this.parser||this.Parser;return wo("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),wo("process",this.parser||this.Parser),bo("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,l){const s=rl(t),o=r.parse(s);r.run(o,s,function(f,d,p){if(f||!d||!p)return c(f);const h=d,m=r.stringify(h,p);zS(m)?p.value=m:p.result=m,c(f,p)});function c(f,d){f||!d?l(f):a?a(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),wo("processSync",this.parser||this.Parser),bo("processSync",this.compiler||this.Compiler),this.process(t,i),Ep("processSync","process",n),r;function i(a,l){n=!0,mp(a),r=l}}run(t,n,r){Sp(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(l,s){const o=rl(n);i.run(t,o,c);function c(f,d,p){const h=d||t;f?s(f):l?l(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Ep("runSync","run",r),i;function a(l,s){mp(l),i=s,r=!0}}stringify(t,n){this.freeze();const r=rl(n),i=this.compiler||this.Compiler;return bo("stringify",i),Sp(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(ko("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")o(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...d]=c;o(f,d)}else l(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function l(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(c.plugins),c.settings&&(i.settings=go(!0,i.settings,c.settings))}function s(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const d=c[f];a(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function o(c,f){let d=-1,p=-1;for(;++d<r.length;)if(r[d][0]===c){p=d;break}if(p===-1)r.push([c,...f]);else if(f.length>0){let[h,...m]=f;const v=r[p][1];Uu(v)&&Uu(h)&&(h=go(!0,v,h)),r[p]=[c,h,...m]}}}}const TS=new sd().freeze();function wo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function bo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ko(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Sp(e){if(!Uu(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ep(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function rl(e){return _S(e)?e:new my(e)}function _S(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function zS(e){return typeof e=="string"||PS(e)}function PS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const RS="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",jp=[],Cp={allowDangerousHtml:!0},IS=/^(https?|ircs?|mailto|xmpp)$/i,AS=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function DS(e){const t=LS(e),n=OS(e);return FS(t.runSync(t.parse(n),n),e)}function LS(e){const t=e.rehypePlugins||jp,n=e.remarkPlugins||jp,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Cp}:Cp;return TS().use(g1).use(n).use(dS,r).use(t)}function OS(e){const t=e.children||"",n=new my;return typeof t=="string"&&(n.value=t),n}function FS(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,l=t.skipHtml,s=t.unwrapDisallowed,o=t.urlTransform||MS;for(const f of AS)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+RS+f.id,void 0);return ld(e,c),Jb(e,{Fragment:u.Fragment,components:i,ignoreInvalidStyle:!0,jsx:u.jsx,jsxs:u.jsxs,passKeys:!0,passNode:!0});function c(f,d,p){if(f.type==="raw"&&p&&typeof d=="number")return l?p.children.splice(d,1):p.children[d]={type:"text",value:f.value},d;if(f.type==="element"){let h;for(h in po)if(Object.hasOwn(po,h)&&Object.hasOwn(f.properties,h)){const m=f.properties[h],v=po[h];(v===null||v.includes(f.tagName))&&(f.properties[h]=o(String(m||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):a?a.includes(f.tagName):!1;if(!h&&r&&typeof d=="number"&&(h=!r(f,d,p)),h&&p&&typeof d=="number")return s&&f.children?p.children.splice(d,1,...f.children):p.children.splice(d,1),d}}}function MS(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||IS.test(e.slice(0,t))?e:""}function Np(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function $S(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function BS(e,t,n){const i=js((n||{}).ignore||[]),a=HS(t);let l=-1;for(;++l<a.length;)py(e,"text",s);function s(c,f){let d=-1,p;for(;++d<f.length;){const h=f[d],m=p?p.children:void 0;if(i(h,m?m.indexOf(h):void 0,p))return;p=h}if(p)return o(c,f)}function o(c,f){const d=f[f.length-1],p=a[l][0],h=a[l][1];let m=0;const w=d.children.indexOf(c);let g=!1,x=[];p.lastIndex=0;let y=p.exec(c.value);for(;y;){const C=y.index,E={index:y.index,input:y.input,stack:[...f,c]};let b=h(...y,E);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?p.lastIndex=C+1:(m!==C&&x.push({type:"text",value:c.value.slice(m,C)}),Array.isArray(b)?x.push(...b):b&&x.push(b),m=C+y[0].length,g=!0),!p.global)break;y=p.exec(c.value)}return g?(m<c.value.length&&x.push({type:"text",value:c.value.slice(m)}),d.children.splice(w,1,...x)):x=[c],w+x.length}}function HS(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([US(i[0]),WS(i[1])])}return t}function US(e){return typeof e=="string"?new RegExp($S(e),"g"):e}function WS(e){return typeof e=="function"?e:function(){return e}}const So="phrasing",Eo=["autolink","link","image","label"];function VS(){return{transforms:[ZS],enter:{literalAutolink:qS,literalAutolinkEmail:jo,literalAutolinkHttp:jo,literalAutolinkWww:jo},exit:{literalAutolink:QS,literalAutolinkEmail:KS,literalAutolinkHttp:YS,literalAutolinkWww:XS}}}function GS(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:So,notInConstruct:Eo},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:So,notInConstruct:Eo},{character:":",before:"[ps]",after:"\\/",inConstruct:So,notInConstruct:Eo}]}}function qS(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function jo(e){this.config.enter.autolinkProtocol.call(this,e)}function YS(e){this.config.exit.autolinkProtocol.call(this,e)}function XS(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function KS(e){this.config.exit.autolinkEmail.call(this,e)}function QS(e){this.exit(e)}function ZS(e){BS(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,JS],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),eE]],{ignore:["link","linkReference"]})}function JS(e,t,n,r,i){let a="";if(!gy(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!tE(n)))return!1;const l=nE(n+r);if(!l[0])return!1;const s={type:"link",title:null,url:a+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[s,{type:"text",value:l[1]}]:s}function eE(e,t,n,r){return!gy(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function tE(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function nE(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Np(e,"(");let a=Np(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function gy(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Dr(n)||ks(n))&&(!t||n!==47)}yy.peek=dE;function rE(){this.buffer()}function iE(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function aE(){this.buffer()}function lE(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function sE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function oE(e){this.exit(e)}function uE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function cE(e){this.exit(e)}function dE(){return"["}function yy(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const l=n.enter("footnoteReference"),s=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),s(),l(),a+=i.move("]"),a}function fE(){return{enter:{gfmFootnoteCallString:rE,gfmFootnoteCall:iE,gfmFootnoteDefinitionLabelString:aE,gfmFootnoteDefinition:lE},exit:{gfmFootnoteCallString:sE,gfmFootnoteCall:oE,gfmFootnoteDefinitionLabelString:uE,gfmFootnoteDefinition:cE}}}function pE(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:yy},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,l){const s=a.createTracker(l);let o=s.move("[^");const c=a.enter("footnoteDefinition"),f=a.enter("label");return o+=s.move(a.safe(a.associationId(r),{before:o,after:"]"})),f(),o+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),o+=s.move((t?`
54
+ `:" ")+a.indentLines(a.containerFlow(r,s.current()),t?xy:hE))),c(),o}}function hE(e,t,n){return t===0?e:xy(e,t,n)}function xy(e,t,n){return(n?"":" ")+e}const mE=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];vy.peek=wE;function gE(){return{canContainEols:["delete"],enter:{strikethrough:xE},exit:{strikethrough:vE}}}function yE(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:mE}],handlers:{delete:vy}}}function xE(e){this.enter({type:"delete",children:[]},e)}function vE(e){this.exit(e)}function vy(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),a(),l}function wE(){return"~"}function bE(e){return e.length}function kE(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||bE,a=[],l=[],s=[],o=[];let c=0,f=-1;for(;++f<e.length;){const v=[],w=[];let g=-1;for(e[f].length>c&&(c=e[f].length);++g<e[f].length;){const x=SE(e[f][g]);if(n.alignDelimiters!==!1){const y=i(x);w[g]=y,(o[g]===void 0||y>o[g])&&(o[g]=y)}v.push(x)}l[f]=v,s[f]=w}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)a[d]=Tp(r[d]);else{const v=Tp(r);for(;++d<c;)a[d]=v}d=-1;const p=[],h=[];for(;++d<c;){const v=a[d];let w="",g="";v===99?(w=":",g=":"):v===108?w=":":v===114&&(g=":");let x=n.alignDelimiters===!1?1:Math.max(1,o[d]-w.length-g.length);const y=w+"-".repeat(x)+g;n.alignDelimiters!==!1&&(x=w.length+x+g.length,x>o[d]&&(o[d]=x),h[d]=x),p[d]=y}l.splice(1,0,p),s.splice(1,0,h),f=-1;const m=[];for(;++f<l.length;){const v=l[f],w=s[f];d=-1;const g=[];for(;++d<c;){const x=v[d]||"";let y="",C="";if(n.alignDelimiters!==!1){const E=o[d]-(w[d]||0),b=a[d];b===114?y=" ".repeat(E):b===99?E%2?(y=" ".repeat(E/2+.5),C=" ".repeat(E/2-.5)):(y=" ".repeat(E/2),C=y):C=" ".repeat(E)}n.delimiterStart!==!1&&!d&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&x==="")&&(n.delimiterStart!==!1||d)&&g.push(" "),n.alignDelimiters!==!1&&g.push(y),g.push(x),n.alignDelimiters!==!1&&g.push(C),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&g.push("|")}m.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return m.join(`
55
+ `)}function SE(e){return e==null?"":String(e)}function Tp(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function EE(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const l=n.indentLines(n.containerFlow(e,a.current()),jE);return i(),l}function jE(e,t,n){return">"+(n?"":" ")+e}function CE(e,t){return _p(e,t.inConstruct,!0)&&!_p(e,t.notInConstruct,!1)}function _p(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function zp(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
56
+ `&&CE(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
57
+ `}function NE(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>l&&(l=a):a=1,i=r+t.length,r=n.indexOf(t,i);return l}function TE(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function _E(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function zE(e,t,n,r){const i=_E(n),a=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(TE(e,n)){const d=n.enter("codeIndented"),p=n.indentLines(a,PE);return d(),p}const s=n.createTracker(r),o=i.repeat(Math.max(NE(a,i)+1,3)),c=n.enter("codeFenced");let f=s.move(o);if(e.lang){const d=n.enter(`codeFencedLang${l}`);f+=s.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...s.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${l}`);f+=s.move(" "),f+=s.move(n.safe(e.meta,{before:f,after:`
58
58
  `,encode:["`"],...s.current()})),d()}return f+=s.move(`
59
- `),l&&(f+=s.move(l+`
60
- `)),f+=s.move(o),c(),f}function _E(e,t,n){return(n?"":" ")+e}function sd(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function zE(e,t,n,r){const i=sd(n),l=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const o=n.createTracker(r);let c=o.move("[");return c+=o.move(n.safe(n.associationId(e),{before:c,after:"]",...o.current()})),c+=o.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(s=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":`
61
- `,...o.current()}))),s(),e.title&&(s=n.enter(`title${l}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),s()),a(),c}function PE(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function kl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function es(e,t,n){const r=ki(e),i=ki(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}xy.peek=RE;function xy(e,t,n,r){const i=PE(n),l=n.enter("emphasis"),a=n.createTracker(r),s=a.move(i);let o=a.move(n.containerPhrasing(e,{after:i,before:s,...a.current()}));const c=o.charCodeAt(0),f=es(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(o=kl(c)+o.slice(1));const d=o.charCodeAt(o.length-1),p=es(r.after.charCodeAt(0),d,i);p.inside&&(o=o.slice(0,-1)+kl(d));const h=a.move(i);return l(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},s+o+h}function RE(e,t,n){return n.options.emphasis||"*"}function IE(e,t){let n=!1;return ld(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,$u}),!!((!e.depth||e.depth<3)&&Zc(e)&&(t.options.setext||n))}function AE(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(r);if(IE(e,n)){const f=n.enter("headingSetext"),d=n.enter("phrasing"),p=n.containerPhrasing(e,{...l.current(),before:`
59
+ `),a&&(f+=s.move(a+`
60
+ `)),f+=s.move(o),c(),f}function PE(e,t,n){return(n?"":" ")+e}function od(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function RE(e,t,n,r){const i=od(n),a=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let s=n.enter("label");const o=n.createTracker(r);let c=o.move("[");return c+=o.move(n.safe(n.associationId(e),{before:c,after:"]",...o.current()})),c+=o.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(s=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":`
61
+ `,...o.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),s()),l(),c}function IE(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function ka(e){return"&#x"+e.toString(16).toUpperCase()+";"}function es(e,t,n){const r=ki(e),i=ki(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}wy.peek=AE;function wy(e,t,n,r){const i=IE(n),a=n.enter("emphasis"),l=n.createTracker(r),s=l.move(i);let o=l.move(n.containerPhrasing(e,{after:i,before:s,...l.current()}));const c=o.charCodeAt(0),f=es(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(o=ka(c)+o.slice(1));const d=o.charCodeAt(o.length-1),p=es(r.after.charCodeAt(0),d,i);p.inside&&(o=o.slice(0,-1)+ka(d));const h=l.move(i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},s+o+h}function AE(e,t,n){return n.options.emphasis||"*"}function DE(e,t){let n=!1;return ld(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Bu}),!!((!e.depth||e.depth<3)&&Jc(e)&&(t.options.setext||n))}function LE(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(DE(e,n)){const f=n.enter("headingSetext"),d=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
62
62
  `,after:`
63
63
  `});return d(),f(),p+`
64
64
  `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
65
- `))+1))}const a="#".repeat(i),s=n.enter("headingAtx"),o=n.enter("phrasing");l.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
66
- `,...l.current()});return/^[\t ]/.test(c)&&(c=kl(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),o(),s(),c}vy.peek=DE;function vy(e){return e.value||""}function DE(){return"<"}wy.peek=LE;function wy(e,t,n,r){const i=sd(n),l=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const o=n.createTracker(r);let c=o.move("![");return c+=o.move(n.safe(e.alt,{before:c,after:"]",...o.current()})),c+=o.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(s=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),s(),e.title&&(s=n.enter(`title${l}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),s()),c+=o.move(")"),a(),c}function LE(){return"!"}by.peek=OE;function by(e,t,n,r){const i=e.referenceType,l=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let o=s.move("![");const c=n.safe(e.alt,{before:o,after:"]",...s.current()});o+=s.move(c+"]["),a();const f=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...s.current()});return a(),n.stack=f,l(),i==="full"||!c||c!==d?o+=s.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=s.move("]"),o}function OE(){return"!"}ky.peek=FE;function ky(e,t,n){let r=e.value||"",i="`",l=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++l<n.unsafe.length;){const a=n.unsafe[l],s=n.compilePattern(a);let o;if(a.atBreak)for(;o=s.exec(r);){let c=o.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(o.index+1)}}return i+r+i}function FE(){return"`"}function Sy(e,t){const n=Zc(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Ey.peek=ME;function Ey(e,t,n,r){const i=sd(n),l=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,o;if(Sy(e,n)){const f=n.stack;n.stack=[],s=n.enter("autolink");let d=a.move("<");return d+=a.move(n.containerPhrasing(e,{before:d,after:">",...a.current()})),d+=a.move(">"),s(),n.stack=f,d}s=n.enter("link"),o=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(o=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),o(),e.title&&(o=n.enter(`title${l}`),c+=a.move(" "+i),c+=a.move(n.safe(e.title,{before:c,after:i,...a.current()})),c+=a.move(i),o()),c+=a.move(")"),s(),c}function ME(e,t,n){return Sy(e,n)?"<":"["}jy.peek=$E;function jy(e,t,n,r){const i=e.referenceType,l=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let o=s.move("[");const c=n.containerPhrasing(e,{before:o,after:"]",...s.current()});o+=s.move(c+"]["),a();const f=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...s.current()});return a(),n.stack=f,l(),i==="full"||!c||c!==d?o+=s.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=s.move("]"),o}function $E(){return"["}function od(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function BE(e){const t=od(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function HE(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Cy(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function UE(e,t,n,r){const i=n.enter("list"),l=n.bulletCurrent;let a=e.ordered?HE(n):od(n);const s=e.ordered?a==="."?")":".":BE(n);let o=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(o=!0),Cy(n)===a&&f){let d=-1;for(;++d<e.children.length;){const p=e.children[d];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=l,i(),c}function WE(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function VE(e,t,n,r){const i=WE(n);let l=n.bulletCurrent||od(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let a=l.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(l+" ".repeat(a-l.length)),s.shift(a);const o=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),f);return o(),c;function f(d,p,h){return p?(h?"":" ".repeat(a))+d:(h?l:l+" ".repeat(a-l.length))+d}}function GE(e,t,n,r){const i=n.enter("paragraph"),l=n.enter("phrasing"),a=n.containerPhrasing(e,r);return l(),i(),a}const qE=js(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function YE(e,t,n,r){return(e.children.some(function(a){return qE(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function XE(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Ny.peek=KE;function Ny(e,t,n,r){const i=XE(n),l=n.enter("strong"),a=n.createTracker(r),s=a.move(i+i);let o=a.move(n.containerPhrasing(e,{after:i,before:s,...a.current()}));const c=o.charCodeAt(0),f=es(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(o=kl(c)+o.slice(1));const d=o.charCodeAt(o.length-1),p=es(r.after.charCodeAt(0),d,i);p.inside&&(o=o.slice(0,-1)+kl(d));const h=a.move(i+i);return l(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},s+o+h}function KE(e,t,n){return n.options.strong||"*"}function QE(e,t,n,r){return n.safe(e.value,r)}function ZE(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function JE(e,t,n){const r=(Cy(n)+(n.options.ruleSpaces?" ":"")).repeat(ZE(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Ty={blockquote:kE,break:_p,code:TE,definition:zE,emphasis:xy,hardBreak:_p,heading:AE,html:vy,image:wy,imageReference:by,inlineCode:ky,link:Ey,linkReference:jy,list:UE,listItem:VE,paragraph:GE,root:YE,strong:Ny,text:QE,thematicBreak:JE};function ej(){return{enter:{table:tj,tableData:zp,tableHeader:zp,tableRow:rj},exit:{codeText:ij,table:nj,tableData:Co,tableHeader:Co,tableRow:Co}}}function tj(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function nj(e){this.exit(e),this.data.inTable=void 0}function rj(e){this.enter({type:"tableRow",children:[]},e)}function Co(e){this.exit(e)}function zp(e){this.enter({type:"tableCell",children:[]},e)}function ij(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,lj));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function lj(e,t){return t==="|"?t:e}function aj(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
67
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:o,tableRow:s}};function a(h,m,v,w){return c(f(h,v,w),h.align)}function s(h,m,v,w){const g=d(h,v,w),x=c([g]);return x.slice(0,x.indexOf(`
68
- `))}function o(h,m,v,w){const g=v.enter("tableCell"),x=v.enter("phrasing"),y=v.containerPhrasing(h,{...w,before:l,after:l});return x(),g(),y}function c(h,m){return wE(h,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function f(h,m,v){const w=h.children;let g=-1;const x=[],y=m.enter("table");for(;++g<w.length;)x[g]=d(w[g],m,v);return y(),x}function d(h,m,v){const w=h.children;let g=-1;const x=[],y=m.enter("tableRow");for(;++g<w.length;)x[g]=o(w[g],h,m,v);return y(),x}function p(h,m,v){let w=Ty.inlineCode(h,m,v);return v.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function sj(){return{exit:{taskListCheckValueChecked:Pp,taskListCheckValueUnchecked:Pp,paragraph:uj}}}function oj(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:cj}}}function Pp(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function uj(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let l=-1,a;for(;++l<i.length;){const s=i[l];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function cj(e,t,n,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);l&&s.move(a);let o=Ty.listItem(e,t,n,{...r,...s.current()});return l&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),o;function c(f){return f+a}}function dj(){return[US(),cE(),hE(),ej(),sj()]}function fj(e){return{extensions:[WS(),dE(e),mE(),aj(e),oj()]}}const pj={tokenize:vj,partial:!0},_y={tokenize:wj,partial:!0},zy={tokenize:bj,partial:!0},Py={tokenize:kj,partial:!0},hj={tokenize:Sj,partial:!0},Ry={name:"wwwAutolink",tokenize:yj,previous:Ay},Iy={name:"protocolAutolink",tokenize:xj,previous:Dy},Wn={name:"emailAutolink",tokenize:gj,previous:Ly},_n={};function mj(){return{text:_n}}let yr=48;for(;yr<123;)_n[yr]=Wn,yr++,yr===58?yr=65:yr===91&&(yr=97);_n[43]=Wn;_n[45]=Wn;_n[46]=Wn;_n[95]=Wn;_n[72]=[Wn,Iy];_n[104]=[Wn,Iy];_n[87]=[Wn,Ry];_n[119]=[Wn,Ry];function gj(e,t,n){const r=this;let i,l;return a;function a(d){return!Wu(d)||!Ly.call(r,r.previous)||ud(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return Wu(d)?(e.consume(d),s):d===64?(e.consume(d),o):n(d)}function o(d){return d===46?e.check(hj,f,c)(d):d===45||d===95||zt(d)?(l=!0,e.consume(d),o):f(d)}function c(d){return e.consume(d),i=!0,o}function f(d){return l&&i&&At(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function yj(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!Ay.call(r,r.previous)||ud(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(pj,e.attempt(_y,e.attempt(zy,l),n),n)(a))}function l(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function xj(e,t,n){const r=this;let i="",l=!1;return a;function a(d){return(d===72||d===104)&&Dy.call(r,r.previous)&&!ud(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),s):n(d)}function s(d){if(At(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(d),o}return n(d)}function o(d){return d===47?(e.consume(d),l?c:(l=!0,o)):n(d)}function c(d){return d===null||Qa(d)||$e(d)||Dr(d)||ks(d)?n(d):e.attempt(_y,e.attempt(zy,f),n)(d)}function f(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function vj(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),l):n(a)}function l(a){return a===null?n(a):t(a)}}function wj(e,t,n){let r,i,l;return a;function a(c){return c===46||c===95?e.check(Py,o,s)(c):c===null||$e(c)||Dr(c)||c!==45&&ks(c)?o(c):(l=!0,e.consume(c),a)}function s(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),a}function o(c){return i||r||!l?n(c):t(c)}}function bj(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?l(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Py,t,l)(a):a===null||$e(a)||Dr(a)?t(a):(e.consume(a),i)}function l(a){return a===41&&r++,e.consume(a),i}}function kj(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),l):s===93?(e.consume(s),i):s===60||s===null||$e(s)||Dr(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||$e(s)||Dr(s)?t(s):r(s)}function l(s){return At(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):At(s)?(e.consume(s),a):n(s)}}function Sj(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return zt(l)?n(l):t(l)}}function Ay(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||$e(e)}function Dy(e){return!At(e)}function Ly(e){return!(e===47||Wu(e))}function Wu(e){return e===43||e===45||e===46||e===95||zt(e)}function ud(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Ej={tokenize:Rj,partial:!0};function jj(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:_j,continuation:{tokenize:zj},exit:Pj}},text:{91:{name:"gfmFootnoteCall",tokenize:Tj},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Cj,resolveTo:Nj}}}}function Cj(e,t,n){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){a=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return s;function s(o){if(!a||!a._balanced)return n(o);const c=yn(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!l.includes(c.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function Nj(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",a,t],["exit",a,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function Tj(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,a;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),o}function o(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(l>999||d===93&&!a||d===null||d===91||$e(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(yn(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return $e(d)||(a=!0),l++,e.consume(d),d===92?f:c}function f(d){return d===91||d===92||d===93?(e.consume(d),l++,c):c(d)}}function _j(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,a=0,s;return o;function o(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(m)}function f(m){if(a>999||m===93&&!s||m===null||m===91||$e(m))return n(m);if(m===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return l=yn(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return $e(m)||(s=!0),a++,e.consume(m),m===92?d:f}function d(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}function p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(l)||i.push(l),Pe(e,h,"gfmFootnoteDefinitionWhitespace")):n(m)}function h(m){return t(m)}}function zj(e,t,n){return e.check(zl,t,e.attempt(Ej,t,n))}function Pj(e){e.exit("gfmFootnoteDefinition")}function Rj(e,t,n){const r=this;return Pe(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(l):n(l)}}function Ij(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,s){let o=-1;for(;++o<a.length;)if(a[o][0]==="enter"&&a[o][1].type==="strikethroughSequenceTemporary"&&a[o][1]._close){let c=o;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[o][1].end.offset-a[o][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[o][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[o][1].end)},d={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[o][1].start)},p=[["enter",f,s],["enter",a[c][1],s],["exit",a[c][1],s],["enter",d,s]],h=s.parser.constructs.insideSpan.null;h&&Qt(p,p.length,0,Ss(h,a.slice(c+1,o),s)),Qt(p,p.length,0,[["exit",d,s],["enter",a[o][1],s],["exit",a[o][1],s],["exit",f,s]]),Qt(a,c-1,o-c+3,p),o=c+p.length-2;break}}for(o=-1;++o<a.length;)a[o][1].type==="strikethroughSequenceTemporary"&&(a[o][1].type="data");return a}function l(a,s,o){const c=this.previous,f=this.events;let d=0;return p;function p(m){return c===126&&f[f.length-1][1].type!=="characterEscape"?o(m):(a.enter("strikethroughSequenceTemporary"),h(m))}function h(m){const v=ki(c);if(m===126)return d>1?o(m):(a.consume(m),d++,h);if(d<2&&!n)return o(m);const w=a.exit("strikethroughSequenceTemporary"),g=ki(m);return w._open=!g||g===2&&!!v,w._close=!v||v===2&&!!g,s(m)}}}class Aj{constructor(){this.map=[]}add(t,n,r){Dj(this,t,n,r)}consume(t){if(this.map.sort(function(l,a){return l[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const l of i)t.push(l);i=r.pop()}this.map.length=0}}function Dj(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Lj(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=r.length-1;r[l]=r[l]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Oj(){return{flow:{null:{name:"table",tokenize:Fj,resolveAll:Mj}}}}function Fj(e,t,n){const r=this;let i=0,l=0,a;return s;function s(N){let M=r.events.length-1;for(;M>-1;){const B=r.events[M][1].type;if(B==="lineEnding"||B==="linePrefix")M--;else break}const $=M>-1?r.events[M][1].type:null,L=$==="tableHead"||$==="tableRow"?b:o;return L===b&&r.parser.lazy[r.now().line]?n(N):L(N)}function o(N){return e.enter("tableHead"),e.enter("tableRow"),c(N)}function c(N){return N===124||(a=!0,l+=1),f(N)}function f(N){return N===null?n(N):ue(N)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),h):n(N):Ce(N)?Pe(e,f,"whitespace")(N):(l+=1,a&&(a=!1,i+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),a=!0,f):(e.enter("data"),d(N)))}function d(N){return N===null||N===124||$e(N)?(e.exit("data"),f(N)):(e.consume(N),N===92?p:d)}function p(N){return N===92||N===124?(e.consume(N),d):d(N)}function h(N){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(N):(e.enter("tableDelimiterRow"),a=!1,Ce(N)?Pe(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):m(N))}function m(N){return N===45||N===58?w(N):N===124?(a=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),v):E(N)}function v(N){return Ce(N)?Pe(e,w,"whitespace")(N):w(N)}function w(N){return N===58?(l+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),g):N===45?(l+=1,g(N)):N===null||ue(N)?C(N):E(N)}function g(N){return N===45?(e.enter("tableDelimiterFiller"),x(N)):E(N)}function x(N){return N===45?(e.consume(N),x):N===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(N))}function y(N){return Ce(N)?Pe(e,C,"whitespace")(N):C(N)}function C(N){return N===124?m(N):N===null||ue(N)?!a||i!==l?E(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):E(N)}function E(N){return n(N)}function b(N){return e.enter("tableRow"),T(N)}function T(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),T):N===null||ue(N)?(e.exit("tableRow"),t(N)):Ce(N)?Pe(e,T,"whitespace")(N):(e.enter("data"),_(N))}function _(N){return N===null||N===124||$e(N)?(e.exit("data"),T(N)):(e.consume(N),N===92?R:_)}function R(N){return N===92||N===124?(e.consume(N),_):_(N)}}function Mj(e,t){let n=-1,r=!0,i=0,l=[0,0,0,0],a=[0,0,0,0],s=!1,o=0,c,f,d;const p=new Aj;for(;++n<e.length;){const h=e[n],m=h[1];h[0]==="enter"?m.type==="tableHead"?(s=!1,o!==0&&(Rp(p,t,o,c,f),f=void 0,o=0),c={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",c,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,d=void 0,l=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",f,t]])),i=m.type==="tableDelimiterRow"?2:f?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(l[1]!==0&&(a[0]=a[1],d=ia(p,t,l,i,void 0,d),l=[0,0,0,0]),a[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(a[0]=a[1],d=ia(p,t,l,i,void 0,d)),l=a,a=[l[1],n,0,0])):m.type==="tableHead"?(s=!0,o=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(o=n,l[1]!==0?(a[0]=a[1],d=ia(p,t,l,i,n,d)):a[1]!==0&&(d=ia(p,t,a,i,n,d)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(o!==0&&Rp(p,t,o,c,f),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=Lj(t.events,n))}return e}function ia(e,t,n,r,i,l){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(l.end=Object.assign({},Vr(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const o=Vr(t.events,n[1]);if(l={type:a,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const c=Vr(t.events,n[2]),f=Vr(t.events,n[3]),d={type:s,start:Object.assign({},c),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,v=n[3]-n[2]-1;e.add(m,v,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(l.end=Object.assign({},Vr(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function Rp(e,t,n,r,i){const l=[],a=Vr(t.events,n);i&&(i.end=Object.assign({},a),l.push(["exit",i,t])),r.end=Object.assign({},a),l.push(["exit",r,t]),e.add(n+1,0,l)}function Vr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const $j={name:"tasklistCheck",tokenize:Hj};function Bj(){return{text:{91:$j}}}function Hj(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),l)}function l(o){return $e(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),a):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),a):n(o)}function a(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(o)}function s(o){return ue(o)?t(o):Ce(o)?e.check({tokenize:Uj},t,n)(o):n(o)}}function Uj(e,t,n){return Pe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Wj(e){return Gg([mj(),jj(),Ij(e),Oj(),Bj()])}const Vj={};function Gj(e){const t=this,n=e||Vj,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Wj(n)),l.push(dj()),a.push(fj(n))}function Oy(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Oy(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ti(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Oy(e))&&(r&&(r+=" "),r+=t);return r}var qj=Object.create,Ns=Object.defineProperty,Yj=Object.defineProperties,Xj=Object.getOwnPropertyDescriptor,Kj=Object.getOwnPropertyDescriptors,Fy=Object.getOwnPropertyNames,ts=Object.getOwnPropertySymbols,Qj=Object.getPrototypeOf,cd=Object.prototype.hasOwnProperty,My=Object.prototype.propertyIsEnumerable,Ip=(e,t,n)=>t in e?Ns(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tn=(e,t)=>{for(var n in t||(t={}))cd.call(t,n)&&Ip(e,n,t[n]);if(ts)for(var n of ts(t))My.call(t,n)&&Ip(e,n,t[n]);return e},Ts=(e,t)=>Yj(e,Kj(t)),$y=(e,t)=>{var n={};for(var r in e)cd.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ts)for(var r of ts(e))t.indexOf(r)<0&&My.call(e,r)&&(n[r]=e[r]);return n},Zj=(e,t)=>function(){return t||(0,e[Fy(e)[0]])((t={exports:{}}).exports,t),t.exports},Jj=(e,t)=>{for(var n in t)Ns(e,n,{get:t[n],enumerable:!0})},eC=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Fy(t))!cd.call(e,i)&&i!==n&&Ns(e,i,{get:()=>t[i],enumerable:!(r=Xj(t,i))||r.enumerable});return e},tC=(e,t,n)=>(n=e!=null?qj(Qj(e)):{},eC(!e||!e.__esModule?Ns(n,"default",{value:e,enumerable:!0}):n,e)),nC=Zj({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var r=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,l={},a={util:{encode:function m(v){return v instanceof s?new s(v.type,m(v.content),v.alias):Array.isArray(v)?v.map(m):v.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(m){return Object.prototype.toString.call(m).slice(8,-1)},objId:function(m){return m.__id||Object.defineProperty(m,"__id",{value:++i}),m.__id},clone:function m(v,w){w=w||{};var g,x;switch(a.util.type(v)){case"Object":if(x=a.util.objId(v),w[x])return w[x];g={},w[x]=g;for(var y in v)v.hasOwnProperty(y)&&(g[y]=m(v[y],w));return g;case"Array":return x=a.util.objId(v),w[x]?w[x]:(g=[],w[x]=g,v.forEach(function(C,E){g[E]=m(C,w)}),g);default:return v}},getLanguage:function(m){for(;m;){var v=r.exec(m.className);if(v)return v[1].toLowerCase();m=m.parentElement}return"none"},setLanguage:function(m,v){m.className=m.className.replace(RegExp(r,"gi"),""),m.classList.add("language-"+v)},isActive:function(m,v,w){for(var g="no-"+v;m;){var x=m.classList;if(x.contains(v))return!0;if(x.contains(g))return!1;m=m.parentElement}return!!w}},languages:{plain:l,plaintext:l,text:l,txt:l,extend:function(m,v){var w=a.util.clone(a.languages[m]);for(var g in v)w[g]=v[g];return w},insertBefore:function(m,v,w,g){g=g||a.languages;var x=g[m],y={};for(var C in x)if(x.hasOwnProperty(C)){if(C==v)for(var E in w)w.hasOwnProperty(E)&&(y[E]=w[E]);w.hasOwnProperty(C)||(y[C]=x[C])}var b=g[m];return g[m]=y,a.languages.DFS(a.languages,function(T,_){_===b&&T!=m&&(this[T]=y)}),y},DFS:function m(v,w,g,x){x=x||{};var y=a.util.objId;for(var C in v)if(v.hasOwnProperty(C)){w.call(v,C,v[C],g||C);var E=v[C],b=a.util.type(E);b==="Object"&&!x[y(E)]?(x[y(E)]=!0,m(E,w,null,x)):b==="Array"&&!x[y(E)]&&(x[y(E)]=!0,m(E,w,C,x))}}},plugins:{},highlight:function(m,v,w){var g={code:m,grammar:v,language:w};if(a.hooks.run("before-tokenize",g),!g.grammar)throw new Error('The language "'+g.language+'" has no grammar.');return g.tokens=a.tokenize(g.code,g.grammar),a.hooks.run("after-tokenize",g),s.stringify(a.util.encode(g.tokens),g.language)},tokenize:function(m,v){var w=v.rest;if(w){for(var g in w)v[g]=w[g];delete v.rest}var x=new f;return d(x,x.head,m),c(m,x,v,x.head,0),h(x)},hooks:{all:{},add:function(m,v){var w=a.hooks.all;w[m]=w[m]||[],w[m].push(v)},run:function(m,v){var w=a.hooks.all[m];if(!(!w||!w.length))for(var g=0,x;x=w[g++];)x(v)}},Token:s};function s(m,v,w,g){this.type=m,this.content=v,this.alias=w,this.length=(g||"").length|0}s.stringify=function m(v,w){if(typeof v=="string")return v;if(Array.isArray(v)){var g="";return v.forEach(function(b){g+=m(b,w)}),g}var x={type:v.type,content:m(v.content,w),tag:"span",classes:["token",v.type],attributes:{},language:w},y=v.alias;y&&(Array.isArray(y)?Array.prototype.push.apply(x.classes,y):x.classes.push(y)),a.hooks.run("wrap",x);var C="";for(var E in x.attributes)C+=" "+E+'="'+(x.attributes[E]||"").replace(/"/g,"&quot;")+'"';return"<"+x.tag+' class="'+x.classes.join(" ")+'"'+C+">"+x.content+"</"+x.tag+">"};function o(m,v,w,g){m.lastIndex=v;var x=m.exec(w);if(x&&g&&x[1]){var y=x[1].length;x.index+=y,x[0]=x[0].slice(y)}return x}function c(m,v,w,g,x,y){for(var C in w)if(!(!w.hasOwnProperty(C)||!w[C])){var E=w[C];E=Array.isArray(E)?E:[E];for(var b=0;b<E.length;++b){if(y&&y.cause==C+","+b)return;var T=E[b],_=T.inside,R=!!T.lookbehind,N=!!T.greedy,M=T.alias;if(N&&!T.pattern.global){var $=T.pattern.toString().match(/[imsuy]*$/)[0];T.pattern=RegExp(T.pattern.source,$+"g")}for(var L=T.pattern||T,B=g.next,I=x;B!==v.tail&&!(y&&I>=y.reach);I+=B.value.length,B=B.next){var J=B.value;if(v.length>m.length)return;if(!(J instanceof s)){var le=1,A;if(N){if(A=o(L,I,m,R),!A||A.index>=m.length)break;var ae=A.index,q=A.index+A[0].length,k=I;for(k+=B.value.length;ae>=k;)B=B.next,k+=B.value.length;if(k-=B.value.length,I=k,B.value instanceof s)continue;for(var Q=B;Q!==v.tail&&(k<q||typeof Q.value=="string");Q=Q.next)le++,k+=Q.value.length;le--,J=m.slice(I,k),A.index-=I}else if(A=o(L,0,J,R),!A)continue;var ae=A.index,j=A[0],oe=J.slice(0,ae),ve=J.slice(ae+j.length),ne=I+J.length;y&&ne>y.reach&&(y.reach=ne);var re=B.prev;oe&&(re=d(v,re,oe),I+=oe.length),p(v,re,le);var we=new s(C,_?a.tokenize(j,_):j,M,j);if(B=d(v,re,we),ve&&d(v,B,ve),le>1){var ce={cause:C+","+b,reach:ne};c(m,v,w,B.prev,I,ce),y&&ce.reach>y.reach&&(y.reach=ce.reach)}}}}}}function f(){var m={value:null,prev:null,next:null},v={value:null,prev:m,next:null};m.next=v,this.head=m,this.tail=v,this.length=0}function d(m,v,w){var g=v.next,x={value:w,prev:v,next:g};return v.next=x,g.prev=x,m.length++,x}function p(m,v,w){for(var g=v.next,x=0;x<w&&g!==m.tail;x++)g=g.next;v.next=g,g.prev=v,m.length-=x}function h(m){for(var v=[],w=m.head.next;w!==m.tail;)v.push(w.value),w=w.next;return v}return a}();t.exports=n,n.default=n}}),D=tC(nC());D.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},D.languages.markup.tag.inside["attr-value"].inside.entity=D.languages.markup.entity,D.languages.markup.doctype.inside["internal-subset"].inside=D.languages.markup,D.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(D.languages.markup.tag,"addInlined",{value:function(e,r){var n={},n=(n["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:D.languages[r]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}),r=(n["language-"+r]={pattern:/[\s\S]+/,inside:D.languages[r]},{});r[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:n},D.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(D.languages.markup.tag,"addAttribute",{value:function(e,t){D.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:D.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),D.languages.html=D.languages.markup,D.languages.mathml=D.languages.markup,D.languages.svg=D.languages.markup,D.languages.xml=D.languages.extend("markup",{}),D.languages.ssml=D.languages.xml,D.languages.atom=D.languages.xml,D.languages.rss=D.languages.xml,function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,r="(?:[^\\\\-]|"+n.source+")",r=RegExp(r+"-"+r),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:r,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":i}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}}(D),D.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},D.languages.javascript=D.languages.extend("clike",{"class-name":[D.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),D.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,D.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:D.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:D.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:D.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:D.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:D.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),D.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:D.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),D.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),D.languages.markup&&(D.languages.markup.tag.addInlined("script","javascript"),D.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),D.languages.js=D.languages.javascript,D.languages.actionscript=D.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),D.languages.actionscript["class-name"].alias="function",delete D.languages.actionscript.parameter,delete D.languages.actionscript["literal-property"],D.languages.markup&&D.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:D.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(D),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(n,r){(n=typeof n=="string"?[n]:n).forEach(function(i){var l=function(d){d.inside||(d.inside={}),d.inside.rest=r},a="doc-comment";if(s=e.languages[i]){var s,o=s[a];if((o=o||(s=e.languages.insertBefore(i,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[a])instanceof RegExp&&(o=s[a]={pattern:o}),Array.isArray(o))for(var c=0,f=o.length;c<f;c++)o[c]instanceof RegExp&&(o[c]={pattern:o[c]}),l(o[c]);else l(o)}})}}),t.addSupport(["java","javascript","php"],t)}(D),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup);t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(D),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+t.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(D),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),l=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function a(s,o){o=(o||"").replace(/m/g,"")+"m";var c=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return s});return RegExp(c,o)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return"(?:"+i+"|"+l+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:a(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:a(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:a(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:a(l),lookbehind:!0,greedy:!0},number:{pattern:a(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(D),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(c){return c=c.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),l=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,a=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+l+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+l+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+l+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(f){c!==f&&(e.languages.markdown[c].inside.content.inside[f]=e.languages.markdown[f])})}),e.hooks.add("after-tokenize",function(c){c.language!=="markdown"&&c.language!=="md"||function f(d){if(d&&typeof d!="string")for(var p=0,h=d.length;p<h;p++){var m,v=d[p];v.type!=="code"?f(v.content):(m=v.content[1],v=v.content[3],m&&v&&m.type==="code-language"&&v.type==="code-block"&&typeof m.content=="string"&&(m=m.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),m="language-"+(m=(/[a-z][\w-]*/i.exec(m)||[""])[0].toLowerCase()),v.alias?typeof v.alias=="string"?v.alias=[v.alias,m]:v.alias.push(m):v.alias=[m]))}}(c.tokens)}),e.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var f="",d=0,p=c.classes.length;d<p;d++){var h=c.classes[d],h=/language-(.+)/.exec(h);if(h){f=h[1];break}}var m,v=e.languages[f];v?c.content=e.highlight(function(w){return w=w.replace(a,""),w=w.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(g,x){var y;return(x=x.toLowerCase())[0]==="#"?(y=x[1]==="x"?parseInt(x.slice(2),16):Number(x.slice(1)),o(y)):s[x]||g})}(c.content),v,f):f&&f!=="none"&&e.plugins.autoloader&&(m="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),c.attributes.id=m,e.plugins.autoloader.loadLanguages(f,function(){var w=document.getElementById(m);w&&(w.innerHTML=e.highlight(w.textContent,e.languages[f],f))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),s={amp:"&",lt:"<",gt:">",quot:'"'},o=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(D),D.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:D.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},D.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var t=e.tokens.filter(function(m){return typeof m!="string"&&m.type!=="comment"&&m.type!=="scalar"}),n=0;n<t.length;){var r=t[n++];if(r.type==="keyword"&&r.content==="mutation"){var i=[];if(d(["definition-mutation","punctuation"])&&f(1).content==="("){n+=2;var l=p(/^\($/,/^\)$/);if(l===-1)continue;for(;n<l;n++){var a=f(0);a.type==="variable"&&(h(a,"variable-input"),i.push(a.content))}n=l+1}if(d(["punctuation","property-query"])&&f(0).content==="{"&&(n++,h(f(0),"property-mutation"),0<i.length)){var s=p(/^\{$/,/^\}$/);if(s!==-1)for(var o=n;o<s;o++){var c=t[o];c.type==="variable"&&0<=i.indexOf(c.content)&&h(c,"variable-input")}}}}function f(m){return t[n+m]}function d(m,v){v=v||0;for(var w=0;w<m.length;w++){var g=f(w+v);if(!g||g.type!==m[w])return}return 1}function p(m,v){for(var w=1,g=n;g<t.length;g++){var x=t[g],y=x.content;if(x.type==="punctuation"&&typeof y=="string"){if(m.test(y))w++;else if(v.test(y)&&--w===0)return g}}return-1}function h(m,v){var w=m.alias;w?Array.isArray(w)||(m.alias=w=[w]):m.alias=w=[],w.push(v)}}),D.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,i=r.inside["interpolation-punctuation"],l=r.pattern.source;function a(d,p){if(e.languages[d])return{pattern:RegExp("((?:"+p+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:d}}}}function s(d,p,h){return d={code:d,grammar:p,language:h},e.hooks.run("before-tokenize",d),d.tokens=e.tokenize(d.code,d.grammar),e.hooks.run("after-tokenize",d),d.tokens}function o(d,p,h){var w=e.tokenize(d,{interpolation:{pattern:RegExp(l),lookbehind:!0}}),m=0,v={},w=s(w.map(function(x){if(typeof x=="string")return x;for(var y,C,x=x.content;d.indexOf((C=m++,y="___"+h.toUpperCase()+"_"+C+"___"))!==-1;);return v[y]=x,y}).join(""),p,h),g=Object.keys(v);return m=0,function x(y){for(var C=0;C<y.length;C++){if(m>=g.length)return;var E,b,T,_,R,N,M,$=y[C];typeof $=="string"||typeof $.content=="string"?(E=g[m],(M=(N=typeof $=="string"?$:$.content).indexOf(E))!==-1&&(++m,b=N.substring(0,M),R=v[E],T=void 0,(_={})["interpolation-punctuation"]=i,(_=e.tokenize(R,_)).length===3&&((T=[1,1]).push.apply(T,s(_[1],e.languages.javascript,"javascript")),_.splice.apply(_,T)),T=new e.Token("interpolation",_,r.alias,R),_=N.substring(M+E.length),R=[],b&&R.push(b),R.push(T),_&&(x(N=[_]),R.push.apply(R,N)),typeof $=="string"?(y.splice.apply(y,[C,1].concat(R)),C+=R.length-1):$.content=R)):(M=$.content,Array.isArray(M)?x(M):x([M]))}}(w),new e.Token(h,w,"language-"+h,d)}e.languages.javascript["template-string"]=[a("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),a("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),a("svg",/\bsvg/.source),a("markdown",/\b(?:markdown|md)/.source),a("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),a("sql",/\bsql/.source),t].filter(Boolean);var c={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function f(d){return typeof d=="string"?d:Array.isArray(d)?d.map(f).join(""):f(d.content)}e.hooks.add("after-tokenize",function(d){d.language in c&&function p(h){for(var m=0,v=h.length;m<v;m++){var w,g,x,y=h[m];typeof y!="string"&&(w=y.content,Array.isArray(w)?y.type==="template-string"?(y=w[1],w.length===3&&typeof y!="string"&&y.type==="embedded-code"&&(g=f(y),y=y.alias,y=Array.isArray(y)?y[0]:y,x=e.languages[y])&&(w[1]=o(g,x,y))):p(w):typeof w!="string"&&p([w]))}}(d.tokens)})}(D),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(D),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(D),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(D),D.languages.n4js=D.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),D.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),D.languages.n4jsd=D.languages.n4js,function(e){function t(a,s){return RegExp(a.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),s)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r<n.length;r++){var l=n[r],i=e.languages.javascript[l],l=(i=e.util.type(i)==="RegExp"?e.languages.javascript[l]={pattern:i}:i).inside||{};(i.inside=l)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(D),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function l(o,c){return o=o.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(o,c)}i=l(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=l(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:l(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:l(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);function a(o){for(var c=[],f=0;f<o.length;f++){var d=o[f],p=!1;typeof d!="string"&&(d.type==="tag"&&d.content[0]&&d.content[0].type==="tag"?d.content[0].content[0].content==="</"?0<c.length&&c[c.length-1].tagName===s(d.content[0].content[1])&&c.pop():d.content[d.content.length-1].content!=="/>"&&c.push({tagName:s(d.content[0].content[1]),openedBraces:0}):0<c.length&&d.type==="punctuation"&&d.content==="{"?c[c.length-1].openedBraces++:0<c.length&&0<c[c.length-1].openedBraces&&d.type==="punctuation"&&d.content==="}"?c[c.length-1].openedBraces--:p=!0),(p||typeof d=="string")&&0<c.length&&c[c.length-1].openedBraces===0&&(p=s(d),f<o.length-1&&(typeof o[f+1]=="string"||o[f+1].type==="plain-text")&&(p+=s(o[f+1]),o.splice(f+1,1)),0<f&&(typeof o[f-1]=="string"||o[f-1].type==="plain-text")&&(p=s(o[f-1])+p,o.splice(f-1,1),f--),o[f]=new e.Token("plain-text",p,null,p)),d.content&&typeof d.content!="string"&&a(d.content)}}var s=function(o){return o?typeof o=="string"?o:typeof o.content=="string"?o.content:o.content.map(s).join(""):""};e.hooks.add("after-tokenize",function(o){o.language!=="jsx"&&o.language!=="tsx"||a(o.tokens)})}(D),function(e){var t=e.util.clone(e.languages.typescript),t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag);t.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(D),D.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},D.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=D.languages.swift}),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(D),D.languages.c=D.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),D.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),D.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},D.languages.c.string],char:D.languages.c.char,comment:D.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:D.languages.c}}}}),D.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete D.languages.c.boolean,D.languages.objectivec=D.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete D.languages.objectivec["class-name"],D.languages.objc=D.languages.objectivec,D.languages.reason=D.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),D.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete D.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(D),D.languages.go=D.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),D.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete D.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(D),D.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},D.languages.python["string-interpolation"].inside.interpolation.inside.rest=D.languages.python,D.languages.py=D.languages.python,D.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},D.languages.webmanifest=D.languages.json;var dd={};Jj(dd,{dracula:()=>iC,duotoneDark:()=>aC,duotoneLight:()=>oC,github:()=>cC,gruvboxMaterialDark:()=>MC,gruvboxMaterialLight:()=>BC,jettwaveDark:()=>PC,jettwaveLight:()=>IC,nightOwl:()=>fC,nightOwlLight:()=>hC,oceanicNext:()=>gC,okaidia:()=>xC,oneDark:()=>DC,oneLight:()=>OC,palenight:()=>wC,shadesOfPurple:()=>kC,synthwave84:()=>EC,ultramin:()=>CC,vsDark:()=>By,vsLight:()=>_C});var rC={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},iC=rC,lC={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},aC=lC,sC={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},oC=sC,uC={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},cC=uC,dC={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},fC=dC,pC={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},hC=pC,Gt={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},mC={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:Gt.keyword}},{types:["attr-value"],style:{color:Gt.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:Gt.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:Gt.primitive}},{types:["boolean"],style:{color:Gt.boolean}},{types:["tag"],style:{color:Gt.tag}},{types:["string"],style:{color:Gt.string}},{types:["punctuation"],style:{color:Gt.string}},{types:["selector","char","builtin","inserted"],style:{color:Gt.char}},{types:["function"],style:{color:Gt.function}},{types:["operator","entity","url","variable"],style:{color:Gt.variable}},{types:["keyword"],style:{color:Gt.keyword}},{types:["atrule","class-name"],style:{color:Gt.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},gC=mC,yC={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},xC=yC,vC={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},wC=vC,bC={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},kC=bC,SC={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},EC=SC,jC={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},CC=jC,NC={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},By=NC,TC={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},_C=TC,zC={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},PC=zC,RC={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},IC=RC,AC={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},DC=AC,LC={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},OC=LC,FC={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},MC=FC,$C={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},BC=$C,HC=e=>S.useCallback(t=>{var n=t,{className:r,style:i,line:l}=n,a=$y(n,["className","style","line"]);const s=Ts(Tn({},a),{className:Ti("token-line",r)});return typeof e=="object"&&"plain"in e&&(s.style=e.plain),typeof i=="object"&&(s.style=Tn(Tn({},s.style||{}),i)),s},[e]),UC=e=>{const t=S.useCallback(({types:n,empty:r})=>{if(e!=null){{if(n.length===1&&n[0]==="plain")return r!=null?{display:"inline-block"}:void 0;if(n.length===1&&r!=null)return e[n[0]]}return Object.assign(r!=null?{display:"inline-block"}:{},...n.map(i=>e[i]))}},[e]);return S.useCallback(n=>{var r=n,{token:i,className:l,style:a}=r,s=$y(r,["token","className","style"]);const o=Ts(Tn({},s),{className:Ti("token",...i.types,l),children:i.content,style:t(i)});return a!=null&&(o.style=Tn(Tn({},o.style||{}),a)),o},[t])},WC=/\r\n|\r|\n/,Ap=e=>{e.length===0?e.push({types:["plain"],content:`
65
+ `))+1))}const l="#".repeat(i),s=n.enter("headingAtx"),o=n.enter("phrasing");a.move(l+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
66
+ `,...a.current()});return/^[\t ]/.test(c)&&(c=ka(c.charCodeAt(0))+c.slice(1)),c=c?l+" "+c:l,n.options.closeAtx&&(c+=" "+l),o(),s(),c}by.peek=OE;function by(e){return e.value||""}function OE(){return"<"}ky.peek=FE;function ky(e,t,n,r){const i=od(n),a=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let s=n.enter("label");const o=n.createTracker(r);let c=o.move("![");return c+=o.move(n.safe(e.alt,{before:c,after:"]",...o.current()})),c+=o.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(s=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),s()),c+=o.move(")"),l(),c}function FE(){return"!"}Sy.peek=ME;function Sy(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let l=n.enter("label");const s=n.createTracker(r);let o=s.move("![");const c=n.safe(e.alt,{before:o,after:"]",...s.current()});o+=s.move(c+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...s.current()});return l(),n.stack=f,a(),i==="full"||!c||c!==d?o+=s.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=s.move("]"),o}function ME(){return"!"}Ey.peek=$E;function Ey(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const l=n.unsafe[a],s=n.compilePattern(l);let o;if(l.atBreak)for(;o=s.exec(r);){let c=o.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(o.index+1)}}return i+r+i}function $E(){return"`"}function jy(e,t){const n=Jc(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Cy.peek=BE;function Cy(e,t,n,r){const i=od(n),a=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let s,o;if(jy(e,n)){const f=n.stack;n.stack=[],s=n.enter("autolink");let d=l.move("<");return d+=l.move(n.containerPhrasing(e,{before:d,after:">",...l.current()})),d+=l.move(">"),s(),n.stack=f,d}s=n.enter("link"),o=n.enter("label");let c=l.move("[");return c+=l.move(n.containerPhrasing(e,{before:c,after:"](",...l.current()})),c+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),o()),c+=l.move(")"),s(),c}function BE(e,t,n){return jy(e,n)?"<":"["}Ny.peek=HE;function Ny(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let l=n.enter("label");const s=n.createTracker(r);let o=s.move("[");const c=n.containerPhrasing(e,{before:o,after:"]",...s.current()});o+=s.move(c+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...s.current()});return l(),n.stack=f,a(),i==="full"||!c||c!==d?o+=s.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=s.move("]"),o}function HE(){return"["}function ud(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function UE(e){const t=ud(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function WE(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Ty(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function VE(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let l=e.ordered?WE(n):ud(n);const s=e.ordered?l==="."?")":".":UE(n);let o=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(o=!0),Ty(n)===l&&f){let d=-1;for(;++d<e.children.length;){const p=e.children[d];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(l=s),n.bulletCurrent=l;const c=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=a,i(),c}function GE(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function qE(e,t,n,r){const i=GE(n);let a=n.bulletCurrent||ud(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let l=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const s=n.createTracker(r);s.move(a+" ".repeat(l-a.length)),s.shift(l);const o=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),f);return o(),c;function f(d,p,h){return p?(h?"":" ".repeat(l))+d:(h?a:a+" ".repeat(l-a.length))+d}}function YE(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),l=n.containerPhrasing(e,r);return a(),i(),l}const XE=js(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function KE(e,t,n,r){return(e.children.some(function(l){return XE(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function QE(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}_y.peek=ZE;function _y(e,t,n,r){const i=QE(n),a=n.enter("strong"),l=n.createTracker(r),s=l.move(i+i);let o=l.move(n.containerPhrasing(e,{after:i,before:s,...l.current()}));const c=o.charCodeAt(0),f=es(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(o=ka(c)+o.slice(1));const d=o.charCodeAt(o.length-1),p=es(r.after.charCodeAt(0),d,i);p.inside&&(o=o.slice(0,-1)+ka(d));const h=l.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},s+o+h}function ZE(e,t,n){return n.options.strong||"*"}function JE(e,t,n,r){return n.safe(e.value,r)}function ej(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function tj(e,t,n){const r=(Ty(n)+(n.options.ruleSpaces?" ":"")).repeat(ej(n));return n.options.ruleSpaces?r.slice(0,-1):r}const zy={blockquote:EE,break:zp,code:zE,definition:RE,emphasis:wy,hardBreak:zp,heading:LE,html:by,image:ky,imageReference:Sy,inlineCode:Ey,link:Cy,linkReference:Ny,list:VE,listItem:qE,paragraph:YE,root:KE,strong:_y,text:JE,thematicBreak:tj};function nj(){return{enter:{table:rj,tableData:Pp,tableHeader:Pp,tableRow:aj},exit:{codeText:lj,table:ij,tableData:Co,tableHeader:Co,tableRow:Co}}}function rj(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function ij(e){this.exit(e),this.data.inTable=void 0}function aj(e){this.enter({type:"tableRow",children:[]},e)}function Co(e){this.exit(e)}function Pp(e){this.enter({type:"tableCell",children:[]},e)}function lj(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,sj));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function sj(e,t){return t==="|"?t:e}function oj(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
67
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:l,tableCell:o,tableRow:s}};function l(h,m,v,w){return c(f(h,v,w),h.align)}function s(h,m,v,w){const g=d(h,v,w),x=c([g]);return x.slice(0,x.indexOf(`
68
+ `))}function o(h,m,v,w){const g=v.enter("tableCell"),x=v.enter("phrasing"),y=v.containerPhrasing(h,{...w,before:a,after:a});return x(),g(),y}function c(h,m){return kE(h,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function f(h,m,v){const w=h.children;let g=-1;const x=[],y=m.enter("table");for(;++g<w.length;)x[g]=d(w[g],m,v);return y(),x}function d(h,m,v){const w=h.children;let g=-1;const x=[],y=m.enter("tableRow");for(;++g<w.length;)x[g]=o(w[g],h,m,v);return y(),x}function p(h,m,v){let w=zy.inlineCode(h,m,v);return v.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function uj(){return{exit:{taskListCheckValueChecked:Rp,taskListCheckValueUnchecked:Rp,paragraph:dj}}}function cj(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:fj}}}function Rp(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function dj(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,l;for(;++a<i.length;){const s=i[a];if(s.type==="paragraph"){l=s;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function fj(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(l);let o=zy.listItem(e,t,n,{...r,...s.current()});return a&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),o;function c(f){return f+l}}function pj(){return[VS(),fE(),gE(),nj(),uj()]}function hj(e){return{extensions:[GS(),pE(e),yE(),oj(e),cj()]}}const mj={tokenize:bj,partial:!0},Py={tokenize:kj,partial:!0},Ry={tokenize:Sj,partial:!0},Iy={tokenize:Ej,partial:!0},gj={tokenize:jj,partial:!0},Ay={name:"wwwAutolink",tokenize:vj,previous:Ly},Dy={name:"protocolAutolink",tokenize:wj,previous:Oy},Wn={name:"emailAutolink",tokenize:xj,previous:Fy},_n={};function yj(){return{text:_n}}let yr=48;for(;yr<123;)_n[yr]=Wn,yr++,yr===58?yr=65:yr===91&&(yr=97);_n[43]=Wn;_n[45]=Wn;_n[46]=Wn;_n[95]=Wn;_n[72]=[Wn,Dy];_n[104]=[Wn,Dy];_n[87]=[Wn,Ay];_n[119]=[Wn,Ay];function xj(e,t,n){const r=this;let i,a;return l;function l(d){return!Vu(d)||!Fy.call(r,r.previous)||cd(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return Vu(d)?(e.consume(d),s):d===64?(e.consume(d),o):n(d)}function o(d){return d===46?e.check(gj,f,c)(d):d===45||d===95||zt(d)?(a=!0,e.consume(d),o):f(d)}function c(d){return e.consume(d),i=!0,o}function f(d){return a&&i&&At(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function vj(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!Ly.call(r,r.previous)||cd(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(mj,e.attempt(Py,e.attempt(Ry,a),n),n)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function wj(e,t,n){const r=this;let i="",a=!1;return l;function l(d){return(d===72||d===104)&&Oy.call(r,r.previous)&&!cd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),s):n(d)}function s(d){if(At(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(d),o}return n(d)}function o(d){return d===47?(e.consume(d),a?c:(a=!0,o)):n(d)}function c(d){return d===null||Ql(d)||$e(d)||Dr(d)||ks(d)?n(d):e.attempt(Py,e.attempt(Ry,f),n)(d)}function f(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function bj(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),a):n(l)}function a(l){return l===null?n(l):t(l)}}function kj(e,t,n){let r,i,a;return l;function l(c){return c===46||c===95?e.check(Iy,o,s)(c):c===null||$e(c)||Dr(c)||c!==45&&ks(c)?o(c):(a=!0,e.consume(c),l)}function s(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),l}function o(c){return i||r||!a?n(c):t(c)}}function Sj(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?a(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(Iy,t,a)(l):l===null||$e(l)||Dr(l)?t(l):(e.consume(l),i)}function a(l){return l===41&&r++,e.consume(l),i}}function Ej(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),a):s===93?(e.consume(s),i):s===60||s===null||$e(s)||Dr(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||$e(s)||Dr(s)?t(s):r(s)}function a(s){return At(s)?l(s):n(s)}function l(s){return s===59?(e.consume(s),r):At(s)?(e.consume(s),l):n(s)}}function jj(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return zt(a)?n(a):t(a)}}function Ly(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||$e(e)}function Oy(e){return!At(e)}function Fy(e){return!(e===47||Vu(e))}function Vu(e){return e===43||e===45||e===46||e===95||zt(e)}function cd(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Cj={tokenize:Aj,partial:!0};function Nj(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Pj,continuation:{tokenize:Rj},exit:Ij}},text:{91:{name:"gfmFootnoteCall",tokenize:zj},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Tj,resolveTo:_j}}}}function Tj(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){l=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return s;function s(o){if(!l||!l._balanced)return n(o);const c=yn(r.sliceSerialize({start:l.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function _j(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",l,t],["exit",l,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function zj(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,l;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),o}function o(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(a>999||d===93&&!l||d===null||d===91||$e(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(yn(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return $e(d)||(l=!0),a++,e.consume(d),d===92?f:c}function f(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function Pj(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,s;return o;function o(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(m)}function f(m){if(l>999||m===93&&!s||m===null||m===91||$e(m))return n(m);if(m===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return a=yn(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return $e(m)||(s=!0),l++,e.consume(m),m===92?d:f}function d(m){return m===91||m===92||m===93?(e.consume(m),l++,f):f(m)}function p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(a)||i.push(a),Pe(e,h,"gfmFootnoteDefinitionWhitespace")):n(m)}function h(m){return t(m)}}function Rj(e,t,n){return e.check(za,t,e.attempt(Cj,t,n))}function Ij(e){e.exit("gfmFootnoteDefinition")}function Aj(e,t,n){const r=this;return Pe(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(a):n(a)}}function Dj(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,s){let o=-1;for(;++o<l.length;)if(l[o][0]==="enter"&&l[o][1].type==="strikethroughSequenceTemporary"&&l[o][1]._close){let c=o;for(;c--;)if(l[c][0]==="exit"&&l[c][1].type==="strikethroughSequenceTemporary"&&l[c][1]._open&&l[o][1].end.offset-l[o][1].start.offset===l[c][1].end.offset-l[c][1].start.offset){l[o][1].type="strikethroughSequence",l[c][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[c][1].start),end:Object.assign({},l[o][1].end)},d={type:"strikethroughText",start:Object.assign({},l[c][1].end),end:Object.assign({},l[o][1].start)},p=[["enter",f,s],["enter",l[c][1],s],["exit",l[c][1],s],["enter",d,s]],h=s.parser.constructs.insideSpan.null;h&&Qt(p,p.length,0,Ss(h,l.slice(c+1,o),s)),Qt(p,p.length,0,[["exit",d,s],["enter",l[o][1],s],["exit",l[o][1],s],["exit",f,s]]),Qt(l,c-1,o-c+3,p),o=c+p.length-2;break}}for(o=-1;++o<l.length;)l[o][1].type==="strikethroughSequenceTemporary"&&(l[o][1].type="data");return l}function a(l,s,o){const c=this.previous,f=this.events;let d=0;return p;function p(m){return c===126&&f[f.length-1][1].type!=="characterEscape"?o(m):(l.enter("strikethroughSequenceTemporary"),h(m))}function h(m){const v=ki(c);if(m===126)return d>1?o(m):(l.consume(m),d++,h);if(d<2&&!n)return o(m);const w=l.exit("strikethroughSequenceTemporary"),g=ki(m);return w._open=!g||g===2&&!!v,w._close=!v||v===2&&!!g,s(m)}}}class Lj{constructor(){this.map=[]}add(t,n,r){Oj(this,t,n,r)}consume(t){if(this.map.sort(function(a,l){return a[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function Oj(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Fj(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Mj(){return{flow:{null:{name:"table",tokenize:$j,resolveAll:Bj}}}}function $j(e,t,n){const r=this;let i=0,a=0,l;return s;function s(N){let M=r.events.length-1;for(;M>-1;){const B=r.events[M][1].type;if(B==="lineEnding"||B==="linePrefix")M--;else break}const $=M>-1?r.events[M][1].type:null,L=$==="tableHead"||$==="tableRow"?b:o;return L===b&&r.parser.lazy[r.now().line]?n(N):L(N)}function o(N){return e.enter("tableHead"),e.enter("tableRow"),c(N)}function c(N){return N===124||(l=!0,a+=1),f(N)}function f(N){return N===null?n(N):ue(N)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),h):n(N):Ce(N)?Pe(e,f,"whitespace")(N):(a+=1,l&&(l=!1,i+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),d(N)))}function d(N){return N===null||N===124||$e(N)?(e.exit("data"),f(N)):(e.consume(N),N===92?p:d)}function p(N){return N===92||N===124?(e.consume(N),d):d(N)}function h(N){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(N):(e.enter("tableDelimiterRow"),l=!1,Ce(N)?Pe(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):m(N))}function m(N){return N===45||N===58?w(N):N===124?(l=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),v):E(N)}function v(N){return Ce(N)?Pe(e,w,"whitespace")(N):w(N)}function w(N){return N===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),g):N===45?(a+=1,g(N)):N===null||ue(N)?C(N):E(N)}function g(N){return N===45?(e.enter("tableDelimiterFiller"),x(N)):E(N)}function x(N){return N===45?(e.consume(N),x):N===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(N))}function y(N){return Ce(N)?Pe(e,C,"whitespace")(N):C(N)}function C(N){return N===124?m(N):N===null||ue(N)?!l||i!==a?E(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):E(N)}function E(N){return n(N)}function b(N){return e.enter("tableRow"),T(N)}function T(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),T):N===null||ue(N)?(e.exit("tableRow"),t(N)):Ce(N)?Pe(e,T,"whitespace")(N):(e.enter("data"),_(N))}function _(N){return N===null||N===124||$e(N)?(e.exit("data"),T(N)):(e.consume(N),N===92?R:_)}function R(N){return N===92||N===124?(e.consume(N),_):_(N)}}function Bj(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],l=[0,0,0,0],s=!1,o=0,c,f,d;const p=new Lj;for(;++n<e.length;){const h=e[n],m=h[1];h[0]==="enter"?m.type==="tableHead"?(s=!1,o!==0&&(Ip(p,t,o,c,f),f=void 0,o=0),c={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",c,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],l=[0,n+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",f,t]])),i=m.type==="tableDelimiterRow"?2:f?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(a[1]!==0&&(l[0]=l[1],d=il(p,t,a,i,void 0,d),a=[0,0,0,0]),l[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(l[0]=l[1],d=il(p,t,a,i,void 0,d)),a=l,l=[a[1],n,0,0])):m.type==="tableHead"?(s=!0,o=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(o=n,a[1]!==0?(l[0]=l[1],d=il(p,t,a,i,n,d)):l[1]!==0&&(d=il(p,t,l,i,n,d)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(l[3]=n)}for(o!==0&&Ip(p,t,o,c,f),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=Fj(t.events,n))}return e}function il(e,t,n,r,i,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},Vr(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const o=Vr(t.events,n[1]);if(a={type:l,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=Vr(t.events,n[2]),f=Vr(t.events,n[3]),d={type:s,start:Object.assign({},c),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,v=n[3]-n[2]-1;e.add(m,v,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},Vr(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Ip(e,t,n,r,i){const a=[],l=Vr(t.events,n);i&&(i.end=Object.assign({},l),a.push(["exit",i,t])),r.end=Object.assign({},l),a.push(["exit",r,t]),e.add(n+1,0,a)}function Vr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Hj={name:"tasklistCheck",tokenize:Wj};function Uj(){return{text:{91:Hj}}}function Wj(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return $e(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),l):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),l):n(o)}function l(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(o)}function s(o){return ue(o)?t(o):Ce(o)?e.check({tokenize:Vj},t,n)(o):n(o)}}function Vj(e,t,n){return Pe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Gj(e){return Yg([yj(),Nj(),Dj(e),Mj(),Uj()])}const qj={};function Yj(e){const t=this,n=e||qj,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Gj(n)),a.push(pj()),l.push(hj(n))}function My(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=My(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ti(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=My(e))&&(r&&(r+=" "),r+=t);return r}var Xj=Object.create,Ns=Object.defineProperty,Kj=Object.defineProperties,Qj=Object.getOwnPropertyDescriptor,Zj=Object.getOwnPropertyDescriptors,$y=Object.getOwnPropertyNames,ts=Object.getOwnPropertySymbols,Jj=Object.getPrototypeOf,dd=Object.prototype.hasOwnProperty,By=Object.prototype.propertyIsEnumerable,Ap=(e,t,n)=>t in e?Ns(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tn=(e,t)=>{for(var n in t||(t={}))dd.call(t,n)&&Ap(e,n,t[n]);if(ts)for(var n of ts(t))By.call(t,n)&&Ap(e,n,t[n]);return e},Ts=(e,t)=>Kj(e,Zj(t)),Hy=(e,t)=>{var n={};for(var r in e)dd.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ts)for(var r of ts(e))t.indexOf(r)<0&&By.call(e,r)&&(n[r]=e[r]);return n},eC=(e,t)=>function(){return t||(0,e[$y(e)[0]])((t={exports:{}}).exports,t),t.exports},tC=(e,t)=>{for(var n in t)Ns(e,n,{get:t[n],enumerable:!0})},nC=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $y(t))!dd.call(e,i)&&i!==n&&Ns(e,i,{get:()=>t[i],enumerable:!(r=Qj(t,i))||r.enumerable});return e},rC=(e,t,n)=>(n=e!=null?Xj(Jj(e)):{},nC(!e||!e.__esModule?Ns(n,"default",{value:e,enumerable:!0}):n,e)),iC=eC({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var r=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,a={},l={util:{encode:function m(v){return v instanceof s?new s(v.type,m(v.content),v.alias):Array.isArray(v)?v.map(m):v.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(m){return Object.prototype.toString.call(m).slice(8,-1)},objId:function(m){return m.__id||Object.defineProperty(m,"__id",{value:++i}),m.__id},clone:function m(v,w){w=w||{};var g,x;switch(l.util.type(v)){case"Object":if(x=l.util.objId(v),w[x])return w[x];g={},w[x]=g;for(var y in v)v.hasOwnProperty(y)&&(g[y]=m(v[y],w));return g;case"Array":return x=l.util.objId(v),w[x]?w[x]:(g=[],w[x]=g,v.forEach(function(C,E){g[E]=m(C,w)}),g);default:return v}},getLanguage:function(m){for(;m;){var v=r.exec(m.className);if(v)return v[1].toLowerCase();m=m.parentElement}return"none"},setLanguage:function(m,v){m.className=m.className.replace(RegExp(r,"gi"),""),m.classList.add("language-"+v)},isActive:function(m,v,w){for(var g="no-"+v;m;){var x=m.classList;if(x.contains(v))return!0;if(x.contains(g))return!1;m=m.parentElement}return!!w}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(m,v){var w=l.util.clone(l.languages[m]);for(var g in v)w[g]=v[g];return w},insertBefore:function(m,v,w,g){g=g||l.languages;var x=g[m],y={};for(var C in x)if(x.hasOwnProperty(C)){if(C==v)for(var E in w)w.hasOwnProperty(E)&&(y[E]=w[E]);w.hasOwnProperty(C)||(y[C]=x[C])}var b=g[m];return g[m]=y,l.languages.DFS(l.languages,function(T,_){_===b&&T!=m&&(this[T]=y)}),y},DFS:function m(v,w,g,x){x=x||{};var y=l.util.objId;for(var C in v)if(v.hasOwnProperty(C)){w.call(v,C,v[C],g||C);var E=v[C],b=l.util.type(E);b==="Object"&&!x[y(E)]?(x[y(E)]=!0,m(E,w,null,x)):b==="Array"&&!x[y(E)]&&(x[y(E)]=!0,m(E,w,C,x))}}},plugins:{},highlight:function(m,v,w){var g={code:m,grammar:v,language:w};if(l.hooks.run("before-tokenize",g),!g.grammar)throw new Error('The language "'+g.language+'" has no grammar.');return g.tokens=l.tokenize(g.code,g.grammar),l.hooks.run("after-tokenize",g),s.stringify(l.util.encode(g.tokens),g.language)},tokenize:function(m,v){var w=v.rest;if(w){for(var g in w)v[g]=w[g];delete v.rest}var x=new f;return d(x,x.head,m),c(m,x,v,x.head,0),h(x)},hooks:{all:{},add:function(m,v){var w=l.hooks.all;w[m]=w[m]||[],w[m].push(v)},run:function(m,v){var w=l.hooks.all[m];if(!(!w||!w.length))for(var g=0,x;x=w[g++];)x(v)}},Token:s};function s(m,v,w,g){this.type=m,this.content=v,this.alias=w,this.length=(g||"").length|0}s.stringify=function m(v,w){if(typeof v=="string")return v;if(Array.isArray(v)){var g="";return v.forEach(function(b){g+=m(b,w)}),g}var x={type:v.type,content:m(v.content,w),tag:"span",classes:["token",v.type],attributes:{},language:w},y=v.alias;y&&(Array.isArray(y)?Array.prototype.push.apply(x.classes,y):x.classes.push(y)),l.hooks.run("wrap",x);var C="";for(var E in x.attributes)C+=" "+E+'="'+(x.attributes[E]||"").replace(/"/g,"&quot;")+'"';return"<"+x.tag+' class="'+x.classes.join(" ")+'"'+C+">"+x.content+"</"+x.tag+">"};function o(m,v,w,g){m.lastIndex=v;var x=m.exec(w);if(x&&g&&x[1]){var y=x[1].length;x.index+=y,x[0]=x[0].slice(y)}return x}function c(m,v,w,g,x,y){for(var C in w)if(!(!w.hasOwnProperty(C)||!w[C])){var E=w[C];E=Array.isArray(E)?E:[E];for(var b=0;b<E.length;++b){if(y&&y.cause==C+","+b)return;var T=E[b],_=T.inside,R=!!T.lookbehind,N=!!T.greedy,M=T.alias;if(N&&!T.pattern.global){var $=T.pattern.toString().match(/[imsuy]*$/)[0];T.pattern=RegExp(T.pattern.source,$+"g")}for(var L=T.pattern||T,B=g.next,I=x;B!==v.tail&&!(y&&I>=y.reach);I+=B.value.length,B=B.next){var J=B.value;if(v.length>m.length)return;if(!(J instanceof s)){var ae=1,A;if(N){if(A=o(L,I,m,R),!A||A.index>=m.length)break;var le=A.index,q=A.index+A[0].length,S=I;for(S+=B.value.length;le>=S;)B=B.next,S+=B.value.length;if(S-=B.value.length,I=S,B.value instanceof s)continue;for(var Q=B;Q!==v.tail&&(S<q||typeof Q.value=="string");Q=Q.next)ae++,S+=Q.value.length;ae--,J=m.slice(I,S),A.index-=I}else if(A=o(L,0,J,R),!A)continue;var le=A.index,j=A[0],oe=J.slice(0,le),ve=J.slice(le+j.length),ne=I+J.length;y&&ne>y.reach&&(y.reach=ne);var re=B.prev;oe&&(re=d(v,re,oe),I+=oe.length),p(v,re,ae);var we=new s(C,_?l.tokenize(j,_):j,M,j);if(B=d(v,re,we),ve&&d(v,B,ve),ae>1){var ce={cause:C+","+b,reach:ne};c(m,v,w,B.prev,I,ce),y&&ce.reach>y.reach&&(y.reach=ce.reach)}}}}}}function f(){var m={value:null,prev:null,next:null},v={value:null,prev:m,next:null};m.next=v,this.head=m,this.tail=v,this.length=0}function d(m,v,w){var g=v.next,x={value:w,prev:v,next:g};return v.next=x,g.prev=x,m.length++,x}function p(m,v,w){for(var g=v.next,x=0;x<w&&g!==m.tail;x++)g=g.next;v.next=g,g.prev=v,m.length-=x}function h(m){for(var v=[],w=m.head.next;w!==m.tail;)v.push(w.value),w=w.next;return v}return l}();t.exports=n,n.default=n}}),D=rC(iC());D.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},D.languages.markup.tag.inside["attr-value"].inside.entity=D.languages.markup.entity,D.languages.markup.doctype.inside["internal-subset"].inside=D.languages.markup,D.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(D.languages.markup.tag,"addInlined",{value:function(e,r){var n={},n=(n["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:D.languages[r]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}),r=(n["language-"+r]={pattern:/[\s\S]+/,inside:D.languages[r]},{});r[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:n},D.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(D.languages.markup.tag,"addAttribute",{value:function(e,t){D.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:D.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),D.languages.html=D.languages.markup,D.languages.mathml=D.languages.markup,D.languages.svg=D.languages.markup,D.languages.xml=D.languages.extend("markup",{}),D.languages.ssml=D.languages.xml,D.languages.atom=D.languages.xml,D.languages.rss=D.languages.xml,function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,r="(?:[^\\\\-]|"+n.source+")",r=RegExp(r+"-"+r),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:r,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":i}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}}(D),D.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},D.languages.javascript=D.languages.extend("clike",{"class-name":[D.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),D.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,D.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:D.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:D.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:D.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:D.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:D.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),D.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:D.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),D.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),D.languages.markup&&(D.languages.markup.tag.addInlined("script","javascript"),D.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),D.languages.js=D.languages.javascript,D.languages.actionscript=D.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),D.languages.actionscript["class-name"].alias="function",delete D.languages.actionscript.parameter,delete D.languages.actionscript["literal-property"],D.languages.markup&&D.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:D.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(D),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(n,r){(n=typeof n=="string"?[n]:n).forEach(function(i){var a=function(d){d.inside||(d.inside={}),d.inside.rest=r},l="doc-comment";if(s=e.languages[i]){var s,o=s[l];if((o=o||(s=e.languages.insertBefore(i,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[l])instanceof RegExp&&(o=s[l]={pattern:o}),Array.isArray(o))for(var c=0,f=o.length;c<f;c++)o[c]instanceof RegExp&&(o[c]={pattern:o[c]}),a(o[c]);else a(o)}})}}),t.addSupport(["java","javascript","php"],t)}(D),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup);t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(D),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+t.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(D),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function l(s,o){o=(o||"").replace(/m/g,"")+"m";var c=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return s});return RegExp(c,o)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return"(?:"+i+"|"+a+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:l(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:l(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:l(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:l(a),lookbehind:!0,greedy:!0},number:{pattern:l(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(D),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(c){return c=c.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,l=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(f){c!==f&&(e.languages.markdown[c].inside.content.inside[f]=e.languages.markdown[f])})}),e.hooks.add("after-tokenize",function(c){c.language!=="markdown"&&c.language!=="md"||function f(d){if(d&&typeof d!="string")for(var p=0,h=d.length;p<h;p++){var m,v=d[p];v.type!=="code"?f(v.content):(m=v.content[1],v=v.content[3],m&&v&&m.type==="code-language"&&v.type==="code-block"&&typeof m.content=="string"&&(m=m.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),m="language-"+(m=(/[a-z][\w-]*/i.exec(m)||[""])[0].toLowerCase()),v.alias?typeof v.alias=="string"?v.alias=[v.alias,m]:v.alias.push(m):v.alias=[m]))}}(c.tokens)}),e.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var f="",d=0,p=c.classes.length;d<p;d++){var h=c.classes[d],h=/language-(.+)/.exec(h);if(h){f=h[1];break}}var m,v=e.languages[f];v?c.content=e.highlight(function(w){return w=w.replace(l,""),w=w.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(g,x){var y;return(x=x.toLowerCase())[0]==="#"?(y=x[1]==="x"?parseInt(x.slice(2),16):Number(x.slice(1)),o(y)):s[x]||g})}(c.content),v,f):f&&f!=="none"&&e.plugins.autoloader&&(m="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),c.attributes.id=m,e.plugins.autoloader.loadLanguages(f,function(){var w=document.getElementById(m);w&&(w.innerHTML=e.highlight(w.textContent,e.languages[f],f))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),s={amp:"&",lt:"<",gt:">",quot:'"'},o=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(D),D.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:D.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},D.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var t=e.tokens.filter(function(m){return typeof m!="string"&&m.type!=="comment"&&m.type!=="scalar"}),n=0;n<t.length;){var r=t[n++];if(r.type==="keyword"&&r.content==="mutation"){var i=[];if(d(["definition-mutation","punctuation"])&&f(1).content==="("){n+=2;var a=p(/^\($/,/^\)$/);if(a===-1)continue;for(;n<a;n++){var l=f(0);l.type==="variable"&&(h(l,"variable-input"),i.push(l.content))}n=a+1}if(d(["punctuation","property-query"])&&f(0).content==="{"&&(n++,h(f(0),"property-mutation"),0<i.length)){var s=p(/^\{$/,/^\}$/);if(s!==-1)for(var o=n;o<s;o++){var c=t[o];c.type==="variable"&&0<=i.indexOf(c.content)&&h(c,"variable-input")}}}}function f(m){return t[n+m]}function d(m,v){v=v||0;for(var w=0;w<m.length;w++){var g=f(w+v);if(!g||g.type!==m[w])return}return 1}function p(m,v){for(var w=1,g=n;g<t.length;g++){var x=t[g],y=x.content;if(x.type==="punctuation"&&typeof y=="string"){if(m.test(y))w++;else if(v.test(y)&&--w===0)return g}}return-1}function h(m,v){var w=m.alias;w?Array.isArray(w)||(m.alias=w=[w]):m.alias=w=[],w.push(v)}}),D.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,i=r.inside["interpolation-punctuation"],a=r.pattern.source;function l(d,p){if(e.languages[d])return{pattern:RegExp("((?:"+p+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:d}}}}function s(d,p,h){return d={code:d,grammar:p,language:h},e.hooks.run("before-tokenize",d),d.tokens=e.tokenize(d.code,d.grammar),e.hooks.run("after-tokenize",d),d.tokens}function o(d,p,h){var w=e.tokenize(d,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),m=0,v={},w=s(w.map(function(x){if(typeof x=="string")return x;for(var y,C,x=x.content;d.indexOf((C=m++,y="___"+h.toUpperCase()+"_"+C+"___"))!==-1;);return v[y]=x,y}).join(""),p,h),g=Object.keys(v);return m=0,function x(y){for(var C=0;C<y.length;C++){if(m>=g.length)return;var E,b,T,_,R,N,M,$=y[C];typeof $=="string"||typeof $.content=="string"?(E=g[m],(M=(N=typeof $=="string"?$:$.content).indexOf(E))!==-1&&(++m,b=N.substring(0,M),R=v[E],T=void 0,(_={})["interpolation-punctuation"]=i,(_=e.tokenize(R,_)).length===3&&((T=[1,1]).push.apply(T,s(_[1],e.languages.javascript,"javascript")),_.splice.apply(_,T)),T=new e.Token("interpolation",_,r.alias,R),_=N.substring(M+E.length),R=[],b&&R.push(b),R.push(T),_&&(x(N=[_]),R.push.apply(R,N)),typeof $=="string"?(y.splice.apply(y,[C,1].concat(R)),C+=R.length-1):$.content=R)):(M=$.content,Array.isArray(M)?x(M):x([M]))}}(w),new e.Token(h,w,"language-"+h,d)}e.languages.javascript["template-string"]=[l("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),l("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),l("svg",/\bsvg/.source),l("markdown",/\b(?:markdown|md)/.source),l("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),l("sql",/\bsql/.source),t].filter(Boolean);var c={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function f(d){return typeof d=="string"?d:Array.isArray(d)?d.map(f).join(""):f(d.content)}e.hooks.add("after-tokenize",function(d){d.language in c&&function p(h){for(var m=0,v=h.length;m<v;m++){var w,g,x,y=h[m];typeof y!="string"&&(w=y.content,Array.isArray(w)?y.type==="template-string"?(y=w[1],w.length===3&&typeof y!="string"&&y.type==="embedded-code"&&(g=f(y),y=y.alias,y=Array.isArray(y)?y[0]:y,x=e.languages[y])&&(w[1]=o(g,x,y))):p(w):typeof w!="string"&&p([w]))}}(d.tokens)})}(D),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(D),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(D),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(D),D.languages.n4js=D.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),D.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),D.languages.n4jsd=D.languages.n4js,function(e){function t(l,s){return RegExp(l.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),s)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r<n.length;r++){var a=n[r],i=e.languages.javascript[a],a=(i=e.util.type(i)==="RegExp"?e.languages.javascript[a]={pattern:i}:i).inside||{};(i.inside=a)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(D),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function a(o,c){return o=o.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(o,c)}i=a(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);function l(o){for(var c=[],f=0;f<o.length;f++){var d=o[f],p=!1;typeof d!="string"&&(d.type==="tag"&&d.content[0]&&d.content[0].type==="tag"?d.content[0].content[0].content==="</"?0<c.length&&c[c.length-1].tagName===s(d.content[0].content[1])&&c.pop():d.content[d.content.length-1].content!=="/>"&&c.push({tagName:s(d.content[0].content[1]),openedBraces:0}):0<c.length&&d.type==="punctuation"&&d.content==="{"?c[c.length-1].openedBraces++:0<c.length&&0<c[c.length-1].openedBraces&&d.type==="punctuation"&&d.content==="}"?c[c.length-1].openedBraces--:p=!0),(p||typeof d=="string")&&0<c.length&&c[c.length-1].openedBraces===0&&(p=s(d),f<o.length-1&&(typeof o[f+1]=="string"||o[f+1].type==="plain-text")&&(p+=s(o[f+1]),o.splice(f+1,1)),0<f&&(typeof o[f-1]=="string"||o[f-1].type==="plain-text")&&(p=s(o[f-1])+p,o.splice(f-1,1),f--),o[f]=new e.Token("plain-text",p,null,p)),d.content&&typeof d.content!="string"&&l(d.content)}}var s=function(o){return o?typeof o=="string"?o:typeof o.content=="string"?o.content:o.content.map(s).join(""):""};e.hooks.add("after-tokenize",function(o){o.language!=="jsx"&&o.language!=="tsx"||l(o.tokens)})}(D),function(e){var t=e.util.clone(e.languages.typescript),t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag);t.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(D),D.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},D.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=D.languages.swift}),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(D),D.languages.c=D.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),D.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),D.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},D.languages.c.string],char:D.languages.c.char,comment:D.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:D.languages.c}}}}),D.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete D.languages.c.boolean,D.languages.objectivec=D.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete D.languages.objectivec["class-name"],D.languages.objc=D.languages.objectivec,D.languages.reason=D.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),D.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete D.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(D),D.languages.go=D.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),D.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete D.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(D),D.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},D.languages.python["string-interpolation"].inside.interpolation.inside.rest=D.languages.python,D.languages.py=D.languages.python,D.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},D.languages.webmanifest=D.languages.json;var fd={};tC(fd,{dracula:()=>lC,duotoneDark:()=>oC,duotoneLight:()=>cC,github:()=>fC,gruvboxMaterialDark:()=>BC,gruvboxMaterialLight:()=>UC,jettwaveDark:()=>IC,jettwaveLight:()=>DC,nightOwl:()=>hC,nightOwlLight:()=>gC,oceanicNext:()=>xC,okaidia:()=>wC,oneDark:()=>OC,oneLight:()=>MC,palenight:()=>kC,shadesOfPurple:()=>EC,synthwave84:()=>CC,ultramin:()=>TC,vsDark:()=>Uy,vsLight:()=>PC});var aC={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},lC=aC,sC={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},oC=sC,uC={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},cC=uC,dC={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},fC=dC,pC={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},hC=pC,mC={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},gC=mC,Gt={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},yC={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:Gt.keyword}},{types:["attr-value"],style:{color:Gt.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:Gt.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:Gt.primitive}},{types:["boolean"],style:{color:Gt.boolean}},{types:["tag"],style:{color:Gt.tag}},{types:["string"],style:{color:Gt.string}},{types:["punctuation"],style:{color:Gt.string}},{types:["selector","char","builtin","inserted"],style:{color:Gt.char}},{types:["function"],style:{color:Gt.function}},{types:["operator","entity","url","variable"],style:{color:Gt.variable}},{types:["keyword"],style:{color:Gt.keyword}},{types:["atrule","class-name"],style:{color:Gt.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},xC=yC,vC={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},wC=vC,bC={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},kC=bC,SC={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},EC=SC,jC={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},CC=jC,NC={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},TC=NC,_C={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},Uy=_C,zC={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},PC=zC,RC={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},IC=RC,AC={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},DC=AC,LC={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},OC=LC,FC={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},MC=FC,$C={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},BC=$C,HC={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},UC=HC,WC=e=>k.useCallback(t=>{var n=t,{className:r,style:i,line:a}=n,l=Hy(n,["className","style","line"]);const s=Ts(Tn({},l),{className:Ti("token-line",r)});return typeof e=="object"&&"plain"in e&&(s.style=e.plain),typeof i=="object"&&(s.style=Tn(Tn({},s.style||{}),i)),s},[e]),VC=e=>{const t=k.useCallback(({types:n,empty:r})=>{if(e!=null){{if(n.length===1&&n[0]==="plain")return r!=null?{display:"inline-block"}:void 0;if(n.length===1&&r!=null)return e[n[0]]}return Object.assign(r!=null?{display:"inline-block"}:{},...n.map(i=>e[i]))}},[e]);return k.useCallback(n=>{var r=n,{token:i,className:a,style:l}=r,s=Hy(r,["token","className","style"]);const o=Ts(Tn({},s),{className:Ti("token",...i.types,a),children:i.content,style:t(i)});return l!=null&&(o.style=Tn(Tn({},o.style||{}),l)),o},[t])},GC=/\r\n|\r|\n/,Dp=e=>{e.length===0?e.push({types:["plain"],content:`
69
69
  `,empty:!0}):e.length===1&&e[0].content===""&&(e[0].content=`
70
- `,e[0].empty=!0)},Dp=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},VC=e=>{const t=[[]],n=[e],r=[0],i=[e.length];let l=0,a=0,s=[];const o=[s];for(;a>-1;){for(;(l=r[a]++)<i[a];){let c,f=t[a];const p=n[a][l];if(typeof p=="string"?(f=a>0?f:["plain"],c=p):(f=Dp(f,p.type),p.alias&&(f=Dp(f,p.alias)),c=p.content),typeof c!="string"){a++,t.push(f),n.push(c),r.push(0),i.push(c.length);continue}const h=c.split(WC),m=h.length;s.push({types:f,content:h[0]});for(let v=1;v<m;v++)Ap(s),o.push(s=[]),s.push({types:f,content:h[v]})}a--,t.pop(),n.pop(),r.pop(),i.pop()}return Ap(s),o},Lp=VC,GC=({prism:e,code:t,grammar:n,language:r})=>S.useMemo(()=>{if(n==null)return Lp([t]);const i={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run("before-tokenize",i),i.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",i),Lp(i.tokens)},[t,n,r,e]),qC=(e,t)=>{const{plain:n}=e,r=e.styles.reduce((i,l)=>{const{languages:a,style:s}=l;return a&&!a.includes(t)||l.types.forEach(o=>{const c=Tn(Tn({},i[o]),s);i[o]=c}),i},{});return r.root=n,r.plain=Ts(Tn({},n),{backgroundColor:void 0}),r},YC=qC,XC=({children:e,language:t,code:n,theme:r,prism:i})=>{const l=t.toLowerCase(),a=YC(r,l),s=HC(a),o=UC(a),c=i.languages[l],f=GC({prism:i,language:l,code:n,grammar:c});return e({tokens:f,className:`prism-code language-${l}`,style:a!=null?a.root:{},getLineProps:s,getTokenProps:o})},Hy=e=>S.createElement(XC,Ts(Tn({},e),{prism:e.prism||D,theme:e.theme||By,code:e.code,language:e.language}));/*! Bundled license information:
70
+ `,e[0].empty=!0)},Lp=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},qC=e=>{const t=[[]],n=[e],r=[0],i=[e.length];let a=0,l=0,s=[];const o=[s];for(;l>-1;){for(;(a=r[l]++)<i[l];){let c,f=t[l];const p=n[l][a];if(typeof p=="string"?(f=l>0?f:["plain"],c=p):(f=Lp(f,p.type),p.alias&&(f=Lp(f,p.alias)),c=p.content),typeof c!="string"){l++,t.push(f),n.push(c),r.push(0),i.push(c.length);continue}const h=c.split(GC),m=h.length;s.push({types:f,content:h[0]});for(let v=1;v<m;v++)Dp(s),o.push(s=[]),s.push({types:f,content:h[v]})}l--,t.pop(),n.pop(),r.pop(),i.pop()}return Dp(s),o},Op=qC,YC=({prism:e,code:t,grammar:n,language:r})=>k.useMemo(()=>{if(n==null)return Op([t]);const i={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run("before-tokenize",i),i.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",i),Op(i.tokens)},[t,n,r,e]),XC=(e,t)=>{const{plain:n}=e,r=e.styles.reduce((i,a)=>{const{languages:l,style:s}=a;return l&&!l.includes(t)||a.types.forEach(o=>{const c=Tn(Tn({},i[o]),s);i[o]=c}),i},{});return r.root=n,r.plain=Ts(Tn({},n),{backgroundColor:void 0}),r},KC=XC,QC=({children:e,language:t,code:n,theme:r,prism:i})=>{const a=t.toLowerCase(),l=KC(r,a),s=WC(l),o=VC(l),c=i.languages[a],f=YC({prism:i,language:a,code:n,grammar:c});return e({tokens:f,className:`prism-code language-${a}`,style:l!=null?l.root:{},getLineProps:s,getTokenProps:o})},Wy=e=>k.createElement(QC,Ts(Tn({},e),{prism:e.prism||D,theme:e.theme||Uy,code:e.code,language:e.language}));/*! Bundled license information:
71
71
 
72
72
  prismjs/prism.js:
73
73
  (**
@@ -78,14 +78,14 @@ prismjs/prism.js:
78
78
  * @namespace
79
79
  * @public
80
80
  *)
81
- */const KC={sh:"bash",shell:"bash",zsh:"bash",console:"bash",yml:"yaml",md:"markdown",mjs:"javascript",cjs:"javascript",node:"javascript",js:"javascript",ts:"typescript",py:"python",rs:"rust",html:"markup",xml:"markup",txt:"text"};function QC(e){if(!e)return"text";const t=String(e).toLowerCase();return KC[t]||t}function ZC({code:e,language:t}){const[n,r]=S.useState(!1),i=QC(t),l=S.useCallback(()=>{var a;try{(a=navigator.clipboard)==null||a.writeText(e),r(!0),setTimeout(()=>r(!1),1400)}catch{}},[e]);return u.jsxs("div",{className:"code-block","data-testid":"code-block",children:[u.jsxs("div",{className:"code-block-head",children:[u.jsx("span",{className:"code-lang",children:i==="text"?"code":i}),u.jsx("button",{className:"code-copy",onClick:l,title:"Copy to clipboard",children:n?"✓ copied":"Copy"})]}),u.jsx(Hy,{theme:dd.vsDark,code:e,language:i,children:({tokens:a,getLineProps:s,getTokenProps:o})=>u.jsx("pre",{className:"code-block-body",children:a.map((c,f)=>u.jsx("div",{...s({line:c}),children:c.map((d,p)=>u.jsx("span",{...o({token:d})},p))},f))})})]})}const JC={pre({children:e}){const t=Array.isArray(e)?e[0]:e,n=(t==null?void 0:t.props)||{},r=/language-([\w-]+)/.exec(n.className||""),i=n.children,l=(Array.isArray(i)?i.join(""):String(i??"")).replace(/\n+$/,"");return u.jsx(ZC,{code:l,language:r?r[1]:""})},code({children:e}){return u.jsx("code",{className:"md-code-inline",children:e})},a({href:e,children:t}){return u.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:t})},table({children:e}){return u.jsx("div",{className:"md-table-wrap",children:u.jsx("table",{children:e})})}};function eN({text:e}){return u.jsx("div",{className:"markdown",children:u.jsx(IS,{remarkPlugins:[Gj],components:JC,children:e||""})})}const Uy=S.memo(eN);class tN{diff(t,n,r={}){let i;typeof r=="function"?(i=r,r={}):"callback"in r&&(i=r.callback);const l=this.castInput(t,r),a=this.castInput(n,r),s=this.removeEmpty(this.tokenize(l,r)),o=this.removeEmpty(this.tokenize(a,r));return this.diffWithOptionsObj(s,o,r,i)}diffWithOptionsObj(t,n,r,i){var l;const a=x=>{if(x=this.postProcess(x,r),i){setTimeout(function(){i(x)},0);return}else return x},s=n.length,o=t.length;let c=1,f=s+o;r.maxEditLength!=null&&(f=Math.min(f,r.maxEditLength));const d=(l=r.timeout)!==null&&l!==void 0?l:1/0,p=Date.now()+d,h=[{oldPos:-1,lastComponent:void 0}];let m=this.extractCommon(h[0],n,t,0,r);if(h[0].oldPos+1>=o&&m+1>=s)return a(this.buildValues(h[0].lastComponent,n,t));let v=-1/0,w=1/0;const g=()=>{for(let x=Math.max(v,-c);x<=Math.min(w,c);x+=2){let y;const C=h[x-1],E=h[x+1];C&&(h[x-1]=void 0);let b=!1;if(E){const _=E.oldPos-x;b=E&&0<=_&&_<s}const T=C&&C.oldPos+1<o;if(!b&&!T){h[x]=void 0;continue}if(!T||b&&C.oldPos<E.oldPos?y=this.addToPath(E,!0,!1,0,r):y=this.addToPath(C,!1,!0,1,r),m=this.extractCommon(y,n,t,x,r),y.oldPos+1>=o&&m+1>=s)return a(this.buildValues(y.lastComponent,n,t))||!0;h[x]=y,y.oldPos+1>=o&&(w=Math.min(w,x-1)),m+1>=s&&(v=Math.max(v,x+1))}c++};if(i)(function x(){setTimeout(function(){if(c>f||Date.now()>p)return i(void 0);g()||x()},0)})();else for(;c<=f&&Date.now()<=p;){const x=g();if(x)return x}}addToPath(t,n,r,i,l){const a=t.lastComponent;return a&&!l.oneChangePerToken&&a.added===n&&a.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:a.count+1,added:n,removed:r,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:a}}}extractCommon(t,n,r,i,l){const a=n.length,s=r.length;let o=t.oldPos,c=o-i,f=0;for(;c+1<a&&o+1<s&&this.equals(r[o+1],n[c+1],l);)c++,o++,f++,l.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return f&&!l.oneChangePerToken&&(t.lastComponent={count:f,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=o,c}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){const i=[];let l;for(;t;)i.push(t),l=t.previousComponent,delete t.previousComponent,t=l;i.reverse();const a=i.length;let s=0,o=0,c=0;for(;s<a;s++){const f=i[s];if(f.removed)f.value=this.join(r.slice(c,c+f.count)),c+=f.count;else{if(!f.added&&this.useLongestToken){let d=n.slice(o,o+f.count);d=d.map(function(p,h){const m=r[c+h];return m.length>p.length?m:p}),f.value=this.join(d)}else f.value=this.join(n.slice(o,o+f.count));o+=f.count,f.added||(c+=f.count)}}return i}}class nN extends tN{constructor(){super(...arguments),this.tokenize=lN}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
81
+ */const ZC={sh:"bash",shell:"bash",zsh:"bash",console:"bash",yml:"yaml",md:"markdown",mjs:"javascript",cjs:"javascript",node:"javascript",js:"javascript",ts:"typescript",py:"python",rs:"rust",html:"markup",xml:"markup",txt:"text"};function JC(e){if(!e)return"text";const t=String(e).toLowerCase();return ZC[t]||t}function eN({code:e,language:t}){const[n,r]=k.useState(!1),i=JC(t),a=k.useCallback(()=>{var l;try{(l=navigator.clipboard)==null||l.writeText(e),r(!0),setTimeout(()=>r(!1),1400)}catch{}},[e]);return u.jsxs("div",{className:"code-block","data-testid":"code-block",children:[u.jsxs("div",{className:"code-block-head",children:[u.jsx("span",{className:"code-lang",children:i==="text"?"code":i}),u.jsx("button",{className:"code-copy",onClick:a,title:"Copy to clipboard",children:n?"✓ copied":"Copy"})]}),u.jsx(Wy,{theme:fd.vsDark,code:e,language:i,children:({tokens:l,getLineProps:s,getTokenProps:o})=>u.jsx("pre",{className:"code-block-body",children:l.map((c,f)=>u.jsx("div",{...s({line:c}),children:c.map((d,p)=>u.jsx("span",{...o({token:d})},p))},f))})})]})}const tN={pre({children:e}){const t=Array.isArray(e)?e[0]:e,n=(t==null?void 0:t.props)||{},r=/language-([\w-]+)/.exec(n.className||""),i=n.children,a=(Array.isArray(i)?i.join(""):String(i??"")).replace(/\n+$/,"");return u.jsx(eN,{code:a,language:r?r[1]:""})},code({children:e}){return u.jsx("code",{className:"md-code-inline",children:e})},a({href:e,children:t}){return u.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:t})},table({children:e}){return u.jsx("div",{className:"md-table-wrap",children:u.jsx("table",{children:e})})}};function nN({text:e}){return u.jsx("div",{className:"markdown",children:u.jsx(DS,{remarkPlugins:[Yj],components:tN,children:e||""})})}const Vy=k.memo(nN);class rN{diff(t,n,r={}){let i;typeof r=="function"?(i=r,r={}):"callback"in r&&(i=r.callback);const a=this.castInput(t,r),l=this.castInput(n,r),s=this.removeEmpty(this.tokenize(a,r)),o=this.removeEmpty(this.tokenize(l,r));return this.diffWithOptionsObj(s,o,r,i)}diffWithOptionsObj(t,n,r,i){var a;const l=x=>{if(x=this.postProcess(x,r),i){setTimeout(function(){i(x)},0);return}else return x},s=n.length,o=t.length;let c=1,f=s+o;r.maxEditLength!=null&&(f=Math.min(f,r.maxEditLength));const d=(a=r.timeout)!==null&&a!==void 0?a:1/0,p=Date.now()+d,h=[{oldPos:-1,lastComponent:void 0}];let m=this.extractCommon(h[0],n,t,0,r);if(h[0].oldPos+1>=o&&m+1>=s)return l(this.buildValues(h[0].lastComponent,n,t));let v=-1/0,w=1/0;const g=()=>{for(let x=Math.max(v,-c);x<=Math.min(w,c);x+=2){let y;const C=h[x-1],E=h[x+1];C&&(h[x-1]=void 0);let b=!1;if(E){const _=E.oldPos-x;b=E&&0<=_&&_<s}const T=C&&C.oldPos+1<o;if(!b&&!T){h[x]=void 0;continue}if(!T||b&&C.oldPos<E.oldPos?y=this.addToPath(E,!0,!1,0,r):y=this.addToPath(C,!1,!0,1,r),m=this.extractCommon(y,n,t,x,r),y.oldPos+1>=o&&m+1>=s)return l(this.buildValues(y.lastComponent,n,t))||!0;h[x]=y,y.oldPos+1>=o&&(w=Math.min(w,x-1)),m+1>=s&&(v=Math.max(v,x+1))}c++};if(i)(function x(){setTimeout(function(){if(c>f||Date.now()>p)return i(void 0);g()||x()},0)})();else for(;c<=f&&Date.now()<=p;){const x=g();if(x)return x}}addToPath(t,n,r,i,a){const l=t.lastComponent;return l&&!a.oneChangePerToken&&l.added===n&&l.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:l.count+1,added:n,removed:r,previousComponent:l.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:l}}}extractCommon(t,n,r,i,a){const l=n.length,s=r.length;let o=t.oldPos,c=o-i,f=0;for(;c+1<l&&o+1<s&&this.equals(r[o+1],n[c+1],a);)c++,o++,f++,a.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return f&&!a.oneChangePerToken&&(t.lastComponent={count:f,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=o,c}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){const i=[];let a;for(;t;)i.push(t),a=t.previousComponent,delete t.previousComponent,t=a;i.reverse();const l=i.length;let s=0,o=0,c=0;for(;s<l;s++){const f=i[s];if(f.removed)f.value=this.join(r.slice(c,c+f.count)),c+=f.count;else{if(!f.added&&this.useLongestToken){let d=n.slice(o,o+f.count);d=d.map(function(p,h){const m=r[c+h];return m.length>p.length?m:p}),f.value=this.join(d)}else f.value=this.join(n.slice(o,o+f.count));o+=f.count,f.added||(c+=f.count)}}return i}}class iN extends rN{constructor(){super(...arguments),this.tokenize=sN}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
82
82
  `))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(`
83
83
  `))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
84
84
  `)&&(t=t.slice(0,-1)),n.endsWith(`
85
- `)&&(n=n.slice(0,-1))),super.equals(t,n,r)}}const rN=new nN;function iN(e,t,n){return rN.diff(e,t,n)}function lN(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
86
- `));const n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let i=0;i<r.length;i++){const l=r[i];i%2&&!t.newlineIsToken?n[n.length-1]+=l:n.push(l)}return n}function aN(e,t){const n=iN(e??"",t??""),r=[];for(const i of n){const l=i.added?"add":i.removed?"del":"ctx",a=i.value.split(`
87
- `);a.length>1&&a[a.length-1]===""&&a.pop();for(const s of a)r.push({type:l,text:s})}return r}const sN={add:"+",del:"−",ctx:" "};function Sa({oldText:e,newText:t,maxRows:n=80}){const r=aN(e,t),i=r.reduce((s,o)=>s+(o.type==="add"?1:0),0),l=r.reduce((s,o)=>s+(o.type==="del"?1:0),0),a=r.slice(0,n);return u.jsxs("div",{className:"diff-view","data-testid":"diff-view",children:[u.jsxs("div",{className:"diff-stat",children:[u.jsxs("span",{className:"diff-stat-add",children:["+",i]}),u.jsxs("span",{className:"diff-stat-del",children:["−",l]})]}),u.jsx("pre",{className:"diff-body",children:a.map((s,o)=>u.jsxs("div",{className:`diff-line ${s.type}`,children:[u.jsx("span",{className:"diff-gutter",children:sN[s.type]}),u.jsx("span",{className:"diff-text",children:s.text===""?" ":s.text})]},o))}),r.length>n&&u.jsxs("div",{className:"diff-more",children:["+",r.length-n," more lines"]})]})}function Op(e){if(!e)return"";const t=String(e).split(/[\\/]+/).filter(Boolean);return t.length>2?"…/"+t.slice(-2).join("/"):t.join("/")}function oN(e){if(!e||typeof e!="object")return"";for(const t of Object.values(e))if(typeof t=="string"&&t)return t;return""}const uN={Read:{icon:"📄",verb:"Read"},Edit:{icon:"✏️",verb:"Edit"},MultiEdit:{icon:"✏️",verb:"Edit"},Write:{icon:"📝",verb:"Write"},NotebookEdit:{icon:"📓",verb:"Edit notebook"},Bash:{icon:"▶",verb:"Run"},PowerShell:{icon:"▶",verb:"Run"},Glob:{icon:"🔍",verb:"Find"},Grep:{icon:"🔍",verb:"Search"},Task:{icon:"🤖",verb:"Agent"},WebFetch:{icon:"🌐",verb:"Fetch"},WebSearch:{icon:"🌐",verb:"Web search"},Skill:{icon:"✨",verb:"Skill"},TodoWrite:{icon:"☑",verb:"Plan"}};function cN(e,t){if(!t)return"";switch(e){case"Read":case"Edit":case"MultiEdit":case"Write":return Op(t.file_path);case"NotebookEdit":return Op(t.notebook_path);case"Bash":case"PowerShell":return t.command||"";case"Glob":case"Grep":return t.pattern||"";case"Task":return t.description||t.subagent_type||"";case"WebFetch":return t.url||"";case"WebSearch":return t.query||"";case"Skill":return t.command||t.name||"";default:return oN(t)}}function dN({name:e,input:t}){return(t==null?void 0:t._raw)!=null?u.jsx("pre",{className:"tool-raw",children:String(t._raw)}):e==="Edit"?u.jsx(Sa,{oldText:t.old_string||"",newText:t.new_string||""}):e==="MultiEdit"&&Array.isArray(t.edits)?u.jsx(u.Fragment,{children:t.edits.map((n,r)=>u.jsx(Sa,{oldText:n.old_string||"",newText:n.new_string||""},r))}):e==="Write"?u.jsx(Sa,{oldText:"",newText:t.content||""}):(e==="Bash"||e==="PowerShell")&&t.description?u.jsx("div",{className:"tool-desc",children:t.description}):null}function fN({content:e,isError:t}){if(e==null)return null;const n=String(e);if(!n.trim()&&!t)return null;const i=n.length>4e3?n.slice(0,4e3)+`
88
- … (truncated)`:n,l=n.split(`
89
- `).find(a=>a.trim())||(t?"error":"done");return u.jsxs("details",{className:`tool-result ${t?"err":""}`,open:t,children:[u.jsxs("summary",{children:[t?"✗ ":"",l.slice(0,140)]}),u.jsx("pre",{children:i})]})}function pN({block:e}){const{name:t,input:n={},result:r,done:i,isError:l}=e,a=uN[t]||{icon:"⚙",verb:t},s=cN(t,n),o=i?l?"error":"done":"running";return u.jsxs("div",{className:`tool-card ${o}`,"data-testid":"tool-card","data-tool":t,children:[u.jsxs("div",{className:"tool-head",children:[u.jsx("span",{className:"tool-icon",children:a.icon}),u.jsx("span",{className:"tool-verb",children:a.verb}),s&&u.jsx("code",{className:"tool-target",children:s}),t==="Edit"&&n.replace_all&&u.jsx("span",{className:"tool-tag",children:"all"}),u.jsx("span",{className:"tool-status","data-status":o,children:o==="running"?u.jsx("span",{className:"tool-spinner","aria-label":"running"}):o==="error"?"✗":"✓"})]}),u.jsx(dN,{name:t,input:n}),u.jsx(fN,{content:r,isError:l})]})}function Wy(e){return`$${(Number(e)||0).toFixed(2)}`}const Vy=()=>u.jsx("span",{className:"bz-represented",title:"No real money moves yet — this is a preview of how earnings would work.",children:"represented · settles later"});function hN({block:e,bazaarState:t,canReply:n,onQuickReply:r}){const{tool:i,phase:l,data:a}=e;if(l!=="result")return u.jsx(yN,{tool:i,input:e.input});if(!a||a.kind==="error")return null;switch(i){case"search_shelf":return u.jsx(xN,{data:a});case"open_recipe":return u.jsx(vN,{data:a});case"launch_preview":return u.jsx(wN,{data:a});case"record_use":return u.jsx(bN,{data:a,bazaarState:t});case"publish_listing":case"publish_draft":return u.jsx(kN,{data:a});case"draft_recipe":return u.jsx(SN,{data:a,canReply:n,onQuickReply:r});default:return null}}const mN={search_shelf:"Searching the bazaar shelf",open_recipe:"Absorbing the recipe",launch_preview:"Opening your live preview",record_use:"Recording the build",publish_listing:"Packaging for the shelf",draft_recipe:"Drafting a recipe from your work",publish_draft:"Publishing to the shelf"},gN={search_shelf:"🛒",open_recipe:"📖",launch_preview:"▶️",record_use:"🧾",publish_listing:"📦",draft_recipe:"📝",publish_draft:"📦"};function yN({tool:e,input:t}){return u.jsxs("div",{className:"bazaar-card bz-call","data-testid":`bazaar-${e}-call`,children:[u.jsx("span",{className:"bz-icon",children:gN[e]||"🛍️"}),u.jsxs("span",{className:"bz-call-label",children:[mN[e]||"Bazaar","…"]}),e==="search_shelf"&&(t==null?void 0:t.need)&&u.jsxs("span",{className:"bz-call-need",children:["“",t.need,"”"]}),u.jsxs("span",{className:"bz-dots",children:[u.jsx("i",{}),u.jsx("i",{}),u.jsx("i",{})]})]})}function Fp(e){return`${Math.round((Number(e)||0)*100)}%`}function xN({data:e}){var r;const t=e.hits||[];if(!t.length)return u.jsxs("div",{className:"bazaar-card bz-empty","data-testid":"bazaar-search-result",children:[u.jsx("span",{className:"bz-icon",children:"🛒"}),u.jsx("span",{children:"Checked the shelf — nothing proven fit this one, so I'll build it from scratch."})]});const n=t[0];return u.jsxs("div",{className:"bazaar-card bz-search","data-testid":"bazaar-search-result",children:[u.jsxs("div",{className:"bz-head",children:[u.jsx("span",{className:"bz-icon",children:"🛒"}),u.jsx("span",{className:"bz-head-title",children:"Found a proven recipe on the shelf"})]}),u.jsxs("div",{className:"bz-hit bz-hit-top",children:[u.jsxs("div",{className:"bz-hit-main",children:[u.jsx("span",{className:"bz-hit-title",children:n.title}),u.jsxs("span",{className:"bz-hit-by",children:["by ",((r=n.producer)==null?void 0:r.name)||"a producer"]})]}),u.jsxs("div",{className:"bz-outcome",title:"How often this recipe actually gets people a working result",children:[u.jsx("strong",{children:Fp(n.outcomeScore)})," of builds worked"]})]}),n.pitch&&u.jsx("p",{className:"bz-hit-pitch",children:n.pitch}),t.length>1&&u.jsxs("div",{className:"bz-others",children:["also on the shelf:"," ",t.slice(1,3).map((i,l)=>u.jsxs("span",{children:[l>0&&" · ",i.title," (",Fp(i.outcomeScore),")"]},i.id))]})]})}function vN({data:e}){var n;const t=e.card||{};return u.jsxs("div",{className:"bazaar-card bz-recipe","data-testid":"bazaar-recipe",children:[u.jsx("span",{className:"bz-icon",children:"📖"}),u.jsxs("span",{className:"bz-recipe-text",children:["Absorbed ",u.jsx("strong",{children:t.title})," — ",((n=t.producer)==null?void 0:n.name)||"the producer","'s know-how",t.safetyBadge&&u.jsx("span",{className:`bz-badge bz-badge-${t.safetyBadge}`,children:t.safetyBadge})]})]})}function wN({data:e}){return u.jsxs("div",{className:"bazaar-card bz-preview","data-testid":"bazaar-preview",children:[u.jsx("span",{className:"bz-icon",children:"▶️"}),u.jsx("span",{children:"Your live preview is open — try it on the right."})]})}function bN({data:e,bazaarState:t}){var c;const n=e.threeWay||{},r=(c=e.recipe)==null?void 0:c.producer,i=e.credit||{},l=((t==null?void 0:t.earnings)||[]).find(f=>f.handle===(r==null?void 0:r.handle)),a=(l==null?void 0:l.total)??i.oneTime??0,s=(l==null?void 0:l.matches)??0,o=!!e.service;return u.jsxs("div",{className:"bazaar-card bz-threeway","data-testid":"bazaar-threeway",children:[u.jsxs("div",{className:"bz-tw-head",children:[u.jsx("span",{className:"bz-tw-spark",children:"✦"})," Everyone just won"]}),u.jsxs("div",{className:"bz-tw-cols",children:[u.jsxs("div",{className:"bz-tw-col bz-tw-you",children:[u.jsx("div",{className:"bz-tw-who",children:"👤 You"}),u.jsx("div",{className:"bz-tw-what",children:n.you})]}),u.jsxs("div",{className:"bz-tw-col bz-tw-producer",children:[u.jsxs("div",{className:"bz-tw-who",children:["🏷️ ",(r==null?void 0:r.name)||"The producer"]}),u.jsx("div",{className:"bz-tw-what",children:n.producer}),u.jsxs("div",{className:"bz-tw-meter","data-testid":"bazaar-meter",children:[u.jsx("span",{className:"bz-meter-amount",children:Wy(a)}),u.jsx("span",{className:"bz-meter-sub",children:o?`${s} ${s===1?"match":"matches"} so far`:"one-time"})]}),u.jsx(Vy,{})]}),u.jsxs("div",{className:"bz-tw-col bz-tw-vw",children:[u.jsx("div",{className:"bz-tw-who",children:"🟣 VentureWild"}),u.jsx("div",{className:"bz-tw-what",children:n.platform})]})]})]})}function kN({data:e}){const t=e.listing||{},n=e.earning||{};return u.jsxs("div",{className:"bazaar-card bz-publish","data-testid":"bazaar-publish",children:[u.jsxs("div",{className:"bz-head",children:[u.jsx("span",{className:"bz-icon",children:"📦"}),u.jsx("span",{className:"bz-head-title",children:"You're a producer now"})]}),u.jsxs("p",{className:"bz-publish-text",children:[u.jsx("strong",{children:t.title})," is on the shelf. You'll earn when other people build on it."]}),u.jsxs("div",{className:"bz-tw-meter",children:[u.jsx("span",{className:"bz-meter-amount",children:Wy(n.oneTimeValue)}),u.jsxs("span",{className:"bz-meter-sub",children:["per build · ",u.jsx(Vy,{})]})]})]})}function SN({data:e,canReply:t,onQuickReply:n}){var i;const r=e.draft||{};return u.jsxs("div",{className:"bazaar-card bz-draft","data-testid":"bazaar-draft",children:[u.jsxs("div",{className:"bz-head",children:[u.jsx("span",{className:"bz-icon",children:"📝"}),u.jsx("span",{className:"bz-head-title",children:"Draft recipe — review before it goes on the shelf"})]}),u.jsx("div",{className:"bz-hit-main",children:u.jsx("span",{className:"bz-hit-title",children:r.title})}),r.pitch&&u.jsx("p",{className:"bz-hit-pitch",children:r.pitch}),r.sourceNote&&u.jsxs("div",{className:"bz-draft-source",children:["Generalized from: ",r.sourceNote]}),((i=r.tags)==null?void 0:i.length)>0&&u.jsx("div",{className:"bz-others",children:r.tags.slice(0,8).join(" · ")}),r.knowHow&&u.jsxs("details",{className:"bz-draft-knowhow",children:[u.jsx("summary",{children:"Preview the know-how — check it for any client specifics"}),u.jsx("pre",{children:r.knowHow})]}),n?u.jsxs("div",{className:"bz-draft-actions",children:[u.jsx("button",{type:"button",className:"bz-build-btn",disabled:!t,"data-testid":"bazaar-draft-publish",onClick:()=>t&&n(`Publish the “${r.title}” draft to my shelf.`),children:"Publish to my shelf →"}),u.jsx("button",{type:"button",className:"bz-draft-skip",disabled:!t,"data-testid":"bazaar-draft-skip",onClick:()=>t&&n(`Skip the “${r.title}” draft — don't publish that one.`),children:"Skip this one"}),u.jsx("span",{className:"bz-draft-hint",children:"Nothing's published until you choose."})]}):u.jsx("div",{className:"bz-draft-hint",children:"Nothing's published yet — tell me which drafts to put on your shelf."})]})}const li="wild-workspace.chat.v2";function EN({messageId:e,userText:t,agentText:n}={}){return!e||!t||!n?[]:[{id:`u-${e}`,role:"user",text:t},{id:e,role:"agent",blocks:[{type:"text",text:n}]}]}function jN(e,t=globalThis.localStorage){const n=EN(e);if(!n.length||!t)return!1;try{const r=t.getItem(li),i=r?JSON.parse(r):[];return Array.isArray(i)&&i.length>0?!1:(t.setItem(li,JSON.stringify(n)),!0)}catch{return!1}}function CN(e,t){var i;const n=e.blocks?e.blocks.slice():[],r=n[n.length-1];switch(t.type){case"text":return r&&r.type==="text"?n[n.length-1]={...r,text:r.text+t.text}:n.push({type:"text",text:t.text}),{...e,blocks:n};case"thinking":return r&&r.type==="thinking"?n[n.length-1]={...r,text:r.text+t.text}:n.push({type:"thinking",text:t.text}),{...e,blocks:n};case"tool-use":return n.push({type:"tool",id:t.id,name:t.name,input:t.input||{},done:!1}),{...e,blocks:n};case"tool-result":{const l=n.findIndex(a=>a.type==="tool"&&a.id===t.id);return l>=0&&(n[l]={...n[l],result:t.content,isError:t.isError,done:!0}),{...e,blocks:n}}case"usage":return{...e,usage:t.usage,costUsd:(i=t.usage)==null?void 0:i.cost_usd,durationMs:t.durationMs};case"error":return n.push({type:"error",text:t.message||"agent error"}),{...e,blocks:n};case"bazaar":{if(t.phase==="call")return n.push({type:"bazaar",id:t.id,tool:t.tool,phase:"call",input:t.input||{}}),{...e,blocks:n};if(t.phase==="result"){const l=n.findIndex(a=>a.type==="bazaar"&&a.id===t.id);return l>=0?n[l]={...n[l],phase:"result",data:t.data,isError:t.isError}:n.push({type:"bazaar",id:t.id,tool:t.tool,phase:"result",data:t.data}),{...e,blocks:n}}return e}case"canvas":{if(t.phase==="call")return n.push({type:"canvas",id:t.id,tool:t.tool,phase:"call"}),{...e,blocks:n};if(t.phase==="result"){const l=n.findIndex(s=>s.type==="canvas"&&s.id===t.id),a={type:"canvas",id:t.id,tool:t.tool,phase:"result",data:t.data,isError:t.isError};return l>=0?n[l]={...n[l],...a}:n.push(a),{...e,blocks:n}}return e}default:return e}}function Mp(e,t,n){const r=e.findIndex(l=>l.id===t);if(r<0)return e;const i=e.slice();return i[r]=CN(i[r],n),i}function NN(e,t,n){if(!n||!n.trim())return e;const r=e.findIndex(l=>l.id===t);if(r<0)return e;const i=e.slice();return i[r]={...i[r],stderr:(i[r].stderr||"")+n},i}function TN({role:e,capabilities:t,mode:n,token:r,onBazaarEvent:i,inject:l,agentName:a}){const[s,o]=S.useState(()=>{try{const I=localStorage.getItem(li);if(I)return JSON.parse(I)}catch{}return[]}),[c,f]=S.useState(null),[d,p]=S.useState(!1),[h,m]=S.useState(""),[v,w]=S.useState(!1),[g,x]=S.useState(null),y=S.useRef(null),C=S.useRef(null),E=S.useRef(!0),b=S.useRef(i),T=S.useRef(null),_=S.useRef(null);S.useEffect(()=>{b.current=i},[i]),S.useEffect(()=>{try{localStorage.setItem(li,JSON.stringify(s.slice(-120)))}catch{}},[s]),S.useEffect(()=>{const I=C.current;I&&E.current&&(I.scrollTop=I.scrollHeight)},[s]);function R(){const I=C.current;I&&(E.current=I.scrollHeight-I.scrollTop-I.clientHeight<90)}S.useEffect(()=>{let I=!1,J=0,le=null,A=null;const q=()=>{if(I)return;const k=window.location.protocol==="https:"?"wss":"ws",Q=new URL(`${k}://${window.location.host}/ws/chat`);r&&Q.searchParams.set("t",r),A=new WebSocket(Q.toString()),y.current=A,A.onopen=()=>{J=0,w(!0)},A.onmessage=ae=>{var oe,ve,ne,re,we,ce,ze;let j;try{j=JSON.parse(ae.data)}catch{return}if(j.type==="chunk"){const Y=j.chunk;if(o(_e=>Mp(_e,j.messageId,Y)),(Y==null?void 0:Y.type)==="bazaar"&&Y.phase==="result"){const _e=Y.data||{};if(Y.tool==="launch_preview"||Y.tool==="record_use"&&_e.preview){const fe=_e.url||((oe=_e.preview)==null?void 0:oe.url)||"/preview/";(ve=b.current)==null||ve.call(b,{type:"preview",url:fe,ts:Date.now()})}}(Y==null?void 0:Y.type)==="canvas"&&Y.phase==="result"&&!Y.isError&&((ne=Y.data)==null?void 0:ne.kind)==="block"&&Y.data.block&&((re=b.current)==null||re.call(b,{type:"block",op:Y.data.op||"make",block:Y.data.block})),(Y==null?void 0:Y.type)==="canvas"&&Y.phase==="result"&&!Y.isError&&((we=Y.data)==null?void 0:we.kind)==="theme"&&Y.data.op==="set"&&Y.data.theme&&((ce=b.current)==null||ce.call(b,{type:"theme",theme:Y.data.theme}))}else if(j.type==="bazaar")j.phase==="meter"&&(x(j.state),(ze=b.current)==null||ze.call(b,{type:"meter",state:j.state}));else if(j.type==="stderr")o(Y=>NN(Y,j.messageId,j.text));else if(j.type==="end")f(null),p(!1);else if(j.type==="error")f(null),p(!1),j.messageId?o(Y=>Mp(Y,j.messageId,{type:"error",message:j.message||"agent error"})):o(Y=>[...Y,{id:`err-${Date.now()}`,role:"error",text:j.message||"agent error"}]);else if(j.type==="turn-begin")o(Y=>{if(Y.some(fe=>fe.id===j.messageId))return Y;const _e=[];return j.userText&&_e.push({id:`u-${j.messageId}`,role:"user",text:j.userText}),j.note&&_e.push({id:`note-${j.messageId}`,role:"system",text:j.note}),_e.push({id:j.messageId,role:"agent",blocks:[]}),[...Y,..._e]}),f(j.messageId),p(!0);else if(j.type==="reset"){o([]),f(null),p(!1);try{localStorage.removeItem(li)}catch{}}},A.onerror=()=>p(!1),A.onclose=()=>{if(w(!1),p(!1),f(null),I)return;const ae=Math.min(1e3*2**J,1e4);J+=1,le=setTimeout(q,ae)}};return q(),()=>{I=!0,clearTimeout(le);try{A==null||A.close()}catch{}}},[r]);function N(I,J){if(!t.chatWrite)return;const le=(typeof I=="string"?I:h).trim();if(!le||d)return;const A=typeof J=="string"&&J.trim()||le,q=y.current,k=q==null?void 0:q.readyState;if(!q||k!==WebSocket.OPEN&&k!==WebSocket.CONNECTING){o(j=>[...j,{id:`err-${Date.now()}`,role:"error",text:"reconnecting to your agent — try again in a few seconds"}]);return}const Q=`m-${Date.now()}`;E.current=!0,o(j=>[...j,{id:`u-${Q}`,role:"user",text:A},{id:Q,role:"agent",blocks:[]}]),f(Q),p(!0),m("");const ae=JSON.stringify({type:"send",text:le,mode:n,messageId:Q});k===WebSocket.OPEN?q.send(ae):q.addEventListener("open",()=>{try{q.send(ae)}catch{}},{once:!0})}T.current=N,S.useEffect(()=>{var I;!(l!=null&&l.text)||_.current===l.ts||(_.current=l.ts,E.current=!0,(I=T.current)==null||I.call(T,l.text))},[l]);function M(){var I;((I=y.current)==null?void 0:I.readyState)===WebSocket.OPEN&&y.current.send(JSON.stringify({type:"cancel"})),p(!1),f(null)}function $(){var I;((I=y.current)==null?void 0:I.readyState)===WebSocket.OPEN&&y.current.send(JSON.stringify({type:"reset"})),o([]),f(null),p(!1);try{localStorage.removeItem(li)}catch{}}function L(I){I.key==="Enter"&&!I.shiftKey&&(I.preventDefault(),N())}const B=s.length===0;return u.jsxs(u.Fragment,{children:[!B&&t.chatWrite&&u.jsx("div",{className:"chat-toolbar","data-testid":"chat-toolbar",children:u.jsx("button",{className:"chat-newbtn",onClick:$,disabled:d,"data-testid":"new-chat-btn",title:"Start a fresh conversation — the agent forgets the current thread",children:"+ New chat"})}),u.jsxs("div",{className:"chat-messages",ref:C,onScroll:R,"data-testid":"chat-messages",children:[B&&u.jsx(LN,{role:e,connected:v,agentName:a,canSend:t.chatWrite&&!d,onSend:N}),s.map(I=>u.jsx(_N,{message:I,streaming:I.id===c,bazaarState:g,canReply:t.chatWrite&&!d,onQuickReply:N},I.id))]}),t.chatWrite&&u.jsxs("div",{className:"chat-input","data-testid":"chat-input",children:[u.jsx("textarea",{"data-testid":"chat-textarea",placeholder:e==="client"?"Describe the change you’d like…":"Ask the agent to build, fix, or explain something — Enter to send",value:h,onChange:I=>m(I.target.value),onKeyDown:L,disabled:d,rows:2}),d?u.jsx("button",{onClick:M,"data-testid":"cancel-btn",children:"Stop"}):u.jsx("button",{className:"primary send-btn",onClick:N,disabled:!h.trim(),"data-testid":"send-btn",children:"Send"})]}),!t.chatWrite&&e==="viewer"&&u.jsx("div",{className:"chat-readonly-banner",children:"You’re viewing a shared workspace (read-only)."})]})}function _N({message:e,streaming:t,bazaarState:n,canReply:r,onQuickReply:i}){if(e.role==="user")return u.jsx("div",{className:"chat-msg user","data-testid":"chat-msg-user",children:u.jsx("div",{className:"msg-plain",children:e.text})});if(e.role==="system")return u.jsx("div",{className:"chat-msg system","data-testid":"chat-msg-system",children:e.text});if(e.role==="error")return u.jsxs("div",{className:"chat-msg error","data-testid":"chat-msg-error",children:["⚠ ",e.text]});const l=e.blocks||[],a=l[l.length-1],s=t&&(a==null?void 0:a.type)==="text"?l.length-1:-1,o=t&&(l.length===0||(a==null?void 0:a.type)==="tool"&&a.done);return u.jsxs("div",{className:"chat-msg agent","data-testid":"chat-msg-agent",children:[l.map((c,f)=>u.jsx(zN,{block:c,cursor:f===s,bazaarState:n,canReply:r,onQuickReply:i},c.id||`${c.type}-${f}`)),o&&u.jsx(AN,{}),e.usage&&u.jsx(DN,{usage:e.usage,costUsd:e.costUsd,durationMs:e.durationMs}),e.stderr&&u.jsxs("details",{className:"stderr-block",children:[u.jsx("summary",{children:"stderr"}),u.jsx("pre",{children:e.stderr})]})]})}function zN({block:e,cursor:t,bazaarState:n,canReply:r,onQuickReply:i}){var l;return e.type==="bazaar"?u.jsx(hN,{block:e,bazaarState:n,canReply:r,onQuickReply:i}):e.type==="text"?u.jsxs("div",{className:"agent-text",children:[u.jsx(Uy,{text:e.text}),t&&u.jsx("span",{className:"stream-cursor"})]}):e.type==="thinking"?u.jsxs("details",{className:"thinking-block",children:[u.jsx("summary",{children:"💭 Thought process"}),u.jsx("div",{className:"thinking-body",children:e.text})]}):e.type==="tool"?e.name==="AskUserQuestion"&&Array.isArray((l=e.input)==null?void 0:l.questions)&&e.input.questions.length?u.jsx(RN,{block:e,canReply:r,onQuickReply:i}):u.jsx(pN,{block:e}):e.type==="canvas"?u.jsx(PN,{block:e}):e.type==="error"?u.jsxs("div",{className:"agent-error",children:["⚠ ",e.text]}):null}function PN({block:e}){var r,i,l,a;if(e.phase==="result"&&!e.isError&&((r=e.data)==null?void 0:r.kind)==="theme"&&e.data.op==="set"){const s=(i=e.data.theme)==null?void 0:i.name;return u.jsxs("div",{className:"canvas-card","data-testid":"canvas-card",children:[u.jsx("span",{className:"canvas-card-icon",children:"🎨"}),u.jsxs("span",{className:"canvas-card-text",children:["Restyled your workspace",s?u.jsxs(u.Fragment,{children:[" — ",u.jsx("strong",{children:s})]}):null]})]})}const t=(l=e.data)==null?void 0:l.block;if(e.phase==="call"||!t)return u.jsx("div",{className:"canvas-card is-pending","data-testid":"canvas-card",children:"🧩 Building a block…"});if(e.isError)return u.jsx("div",{className:"canvas-card is-error","data-testid":"canvas-card",children:"⚠ Couldn’t build that block."});const n=((a=e.data)==null?void 0:a.op)==="update"?"Updated":"Added";return u.jsxs("div",{className:"canvas-card","data-testid":"canvas-card",children:[u.jsx("span",{className:"canvas-card-icon",children:t.icon||"🧩"}),u.jsxs("span",{className:"canvas-card-text",children:[n," ",u.jsx("strong",{children:t.title})," to your canvas"]})]})}function RN({block:e,canReply:t,onQuickReply:n}){const r=e.input.questions;return u.jsxs("div",{className:"ask-card","data-testid":"ask-card",children:[u.jsxs("div",{className:"ask-head",children:[u.jsx("span",{className:"ask-icon",children:"🤔"}),u.jsx("span",{children:"Your call"})]}),r.map((i,l)=>u.jsx(IN,{q:i,canReply:t,onQuickReply:n},l)),u.jsx("div",{className:"ask-foot",children:"…or just type your answer below."})]})}function IN({q:e,canReply:t,onQuickReply:n}){const[r,i]=S.useState([]),l=!!e.multiSelect,a=Array.isArray(e.options)?e.options:[],s=o=>i(c=>c.includes(o)?c.filter(f=>f!==o):[...c,o]);return u.jsxs("div",{className:"ask-q",children:[e.header&&u.jsx("span",{className:"ask-q-header",children:e.header}),e.question&&u.jsx("p",{className:"ask-q-text",children:e.question}),u.jsx("div",{className:"ask-options",children:a.map((o,c)=>l?u.jsxs("button",{type:"button",className:`ask-opt${r.includes(o.label)?" sel":""}`,disabled:!t,onClick:()=>s(o.label),title:o.description||"",children:[u.jsx("span",{className:"ask-opt-check",children:r.includes(o.label)?"☑":"☐"}),u.jsxs("span",{className:"ask-opt-main",children:[u.jsx("span",{className:"ask-opt-label",children:o.label}),o.description&&u.jsx("span",{className:"ask-opt-desc",children:o.description})]})]},c):u.jsxs("button",{type:"button",className:"ask-opt",disabled:!t,onClick:()=>t&&n(o.label),title:o.description||"",children:[u.jsxs("span",{className:"ask-opt-main",children:[u.jsx("span",{className:"ask-opt-label",children:o.label}),o.description&&u.jsx("span",{className:"ask-opt-desc",children:o.description})]}),u.jsx("span",{className:"ask-opt-go",children:"→"})]},c))}),l&&u.jsxs("button",{type:"button",className:"primary ask-send",disabled:!t||!r.length,onClick:()=>t&&r.length&&n(r.join(", ")),children:["Send",r.length?` (${r.length})`:""]})]})}function AN(){return u.jsxs("div",{className:"agent-working","data-testid":"agent-working",children:[u.jsxs("span",{className:"dots",children:[u.jsx("i",{}),u.jsx("i",{}),u.jsx("i",{})]}),"working"]})}function DN({usage:e,costUsd:t,durationMs:n}){const r=typeof t=="number"?t:e==null?void 0:e.cost_usd;return u.jsxs("div",{className:"usage-footer","data-testid":"usage-footer",children:[(e==null?void 0:e.output_tokens)!=null&&u.jsxs("span",{title:"output tokens",children:["↑ ",e.output_tokens.toLocaleString()]}),typeof r=="number"&&r>0&&u.jsxs("span",{title:"cost (USD)",children:["$",r.toFixed(4)]}),n!=null&&u.jsxs("span",{children:[(n/1e3).toFixed(1),"s"]})]})}function LN({role:e,connected:t,agentName:n,canSend:r,onSend:i}){if(e==="client")return u.jsxs("div",{className:"chat-empty","data-testid":"chat-empty",children:[u.jsx("div",{className:"chat-empty-mark",children:"✦"}),u.jsx("p",{className:"chat-empty-title",children:"Describe what you’d like changed"}),u.jsx("p",{className:"chat-empty-sub",children:"The team’s AI agent will pick it up and you’ll see it here."}),!t&&u.jsx("p",{className:"chat-empty-warn",children:"connecting to the agent bridge…"})]});const l=n&&n!=="Chat"?n:null,a=[{label:"✦ Build my workspace for me",display:"Build my workspace for me.",primary:!0,prompt:"Set up a friendly starter workspace for me. Use your canvas tools to add a couple of useful blocks — for example a short welcome note, a quick getting-started checklist, and maybe a tips block — and pick a warm, welcoming theme if you'd like. Then say a brief, friendly hello telling me what you set up. Keep it light."},{label:"Show me around",display:"Show me around.",prompt:"What's in this workspace? Give me a quick, friendly tour."},{label:"Make something I can show off",display:"Make something I can show off.",prompt:"Build me a simple, good-looking landing page, and put a Live view on my canvas so I can watch it come together."}];return u.jsxs("div",{className:"chat-empty","data-testid":"chat-empty",children:[u.jsx("div",{className:"chat-empty-mark",children:"✦"}),u.jsx("p",{className:"chat-empty-title",children:l?`Hi — I’m ${l}.`:"Hi — I’m your agent."}),u.jsx("p",{className:"chat-empty-sub",children:"Tell me what you’re working on and I’ll set it up for you — I can build, write, and arrange your workspace as we go. Not sure where to start?"}),u.jsx("div",{className:"chat-empty-starters",children:a.map(s=>u.jsx("button",{type:"button",className:`chat-empty-starter${s.primary?" primary":""}`,onClick:()=>i==null?void 0:i(s.prompt,s.display),disabled:!r||!t,"data-testid":"chat-empty-starter",children:s.label},s.label))}),!t&&u.jsx("p",{className:"chat-empty-warn",children:"connecting to the agent bridge…"})]})}function Lr(e){const{margin:t,containerPadding:n,containerWidth:r,cols:i}=e;return(r-t[0]*(i-1)-n[0]*2)/i}function Sn(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function la(e,t,n,r,i,l,a){const{margin:s,containerPadding:o,rowHeight:c}=e,f=Lr(e);let d,p,h,m;if(a?(d=Math.round(a.width),p=Math.round(a.height)):(d=Sn(r,f,s[0]),p=Sn(i,c,s[1])),l?(h=Math.round(l.top),m=Math.round(l.left)):a?(h=Math.round(a.top),m=Math.round(a.left)):(h=Math.round((c+s[1])*n+o[1]),m=Math.round((f+s[0])*t+o[0])),!l&&!a){if(Number.isFinite(r)){const w=Math.round((f+s[0])*(t+r)+o[0])-m-d;w!==s[0]&&(d+=w-s[0])}if(Number.isFinite(i)){const w=Math.round((c+s[1])*(n+i)+o[1])-h-p;w!==s[1]&&(p+=w-s[1])}}return{top:h,left:m,width:d,height:p}}function ON(e,t,n,r,i){const{margin:l,containerPadding:a,cols:s,rowHeight:o,maxRows:c}=e,f=Lr(e);let d=Math.round((n-a[0])/(f+l[0])),p=Math.round((t-a[1])/(o+l[1]));return d=ns(d,0,s-r),p=ns(p,0,c-i),{x:d,y:p}}function aa(e,t,n){const{margin:r,containerPadding:i,rowHeight:l}=e,a=Lr(e),s=Math.round((n-i[0])/(a+r[0])),o=Math.round((t-i[1])/(l+r[1]));return{x:s,y:o}}function FN(e,t,n){const{margin:r,rowHeight:i}=e,l=Lr(e),a=Math.max(1,Math.round((t+r[0])/(l+r[0]))),s=Math.max(1,Math.round((n+r[1])/(i+r[1])));return{w:a,h:s}}function ns(e,t,n){return Math.max(Math.min(e,n),t)}function fd(e,t){return!(e.i===t.i||e.x+e.w<=t.x||e.x>=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function _r(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r!==void 0&&fd(r,t))return r}}function Gy(e,t){return e.filter(n=>fd(n,t))}function MN(e,t){return t==="horizontal"?qy(e):t==="vertical"||t==="wrap"?Vu(e):[...e]}function Vu(e){return[...e].sort((t,n)=>t.y!==n.y?t.y-n.y:t.x-n.x)}function qy(e){return[...e].sort((t,n)=>t.x!==n.x?t.x-n.x:t.y-n.y)}function _s(e){let t=0;for(let n=0;n<e.length;n++){const r=e[n];if(r!==void 0){const i=r.y+r.h;i>t&&(t=i)}}return t}function br(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r!==void 0&&r.i===t)return r}}function zs(e){return e.filter(t=>t.static===!0)}function Or(e){return{i:e.i,x:e.x,y:e.y,w:e.w,h:e.h,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:!!e.moved,static:!!e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,constraints:e.constraints,isBounded:e.isBounded}}function dr(e){const t=new Array(e.length);for(let n=0;n<e.length;n++){const r=e[n];r!==void 0&&(t[n]=Or(r))}return t}function $N(e,t){const n=new Array(e.length);for(let r=0;r<e.length;r++){const i=e[r];i!==void 0&&(t.i===i.i?n[r]=t:n[r]=i)}return n}function BN(e,t,n){let r=br(e,t);return r?(r=n(Or(r)),[$N(e,r),r]):[[...e],null]}function pd(e,t){const n=zs(e);for(let r=0;r<e.length;r++){const i=e[r];if(i!==void 0)if(i.x+i.w>t.cols&&(i.x=t.cols-i.w),i.x<0&&(i.x=0,i.w=t.cols),!i.static)n.push(i);else for(;_r(n,i);)i.y++}return e}function Cr(e,t,n,r,i,l,a,s,o){if(t.static&&t.isDraggable!==!0)return[...e];if(t.y===r&&t.x===n)return[...e];const c=t.x,f=t.y;typeof n=="number"&&(t.x=n),typeof r=="number"&&(t.y=r),t.moved=!0;let d=MN(e,a);(a==="vertical"&&typeof r=="number"?f>=r:a==="horizontal"&&typeof n=="number"?c>=n:!1)&&(d=d.reverse());const h=Gy(d,t),m=h.length>0;if(m&&o)return dr(e);if(m&&l)return t.x=c,t.y=f,t.moved=!1,e;let v=[...e];for(let w=0;w<h.length;w++){const g=h[w];g!==void 0&&(g.moved||(g.static?v=$p(v,g,t,i,a):v=$p(v,t,g,i,a)))}return v}function $p(e,t,n,r,i,l){const a=i==="horizontal",s=i==="vertical",o=t.static;if(r){r=!1;const d={x:a?Math.max(t.x-n.w,0):n.x,y:s?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"},p=_r(e,d),h=p!==void 0&&p.y+p.h>t.y,m=p!==void 0&&t.x+t.w>p.x;if(!p)return Cr(e,n,a?d.x:void 0,s?d.y:void 0,r,o,i);if(h&&s)return Cr(e,n,void 0,n.y+1,r,o,i);if(h&&i===null)return t.y=n.y,n.y=n.y+n.h,[...e];if(m&&a)return Cr(e,t,n.x,void 0,r,o,i)}const c=a?n.x+1:void 0,f=s?n.y+1:void 0;return c===void 0&&f===void 0?[...e]:Cr(e,n,c,f,r,o,i)}function ai(e,t,n){return Math.max(t,Math.min(n,e))}var HN={name:"gridBounds",constrainPosition(e,t,n,{cols:r,maxRows:i}){return{x:ai(t,0,Math.max(0,r-e.w)),y:ai(n,0,Math.max(0,i-e.h))}},constrainSize(e,t,n,r,{cols:i,maxRows:l}){const a=r==="w"||r==="nw"||r==="sw"?e.x+e.w:i-e.x,s=r==="n"||r==="nw"||r==="ne"?e.y+e.h:l-e.y;return{w:ai(t,1,Math.max(1,a)),h:ai(n,1,Math.max(1,s))}}},UN={name:"minMaxSize",constrainSize(e,t,n){return{w:ai(t,e.minW??1,e.maxW??1/0),h:ai(n,e.minH??1,e.maxH??1/0)}}},Yy=[HN,UN];function sa(e,t,n,r,i){let l={x:n,y:r};for(const a of e)a.constrainPosition&&(l=a.constrainPosition(t,l.x,l.y,i));if(t.constraints)for(const a of t.constraints)a.constrainPosition&&(l=a.constrainPosition(t,l.x,l.y,i));return l}function WN(e,t,n,r,i,l){let a={w:n,h:r};for(const s of e)s.constrainSize&&(a=s.constrainSize(t,a.w,a.h,i,l));if(t.constraints)for(const s of t.constraints)s.constrainSize&&(a=s.constrainSize(t,a.w,a.h,i,l));return a}function hd({top:e,left:t,width:n,height:r}){const i=`translate(${t}px,${e}px)`;return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:`${n}px`,height:`${r}px`,position:"absolute"}}function Xy({top:e,left:t,width:n,height:r}){return{top:`${e}px`,left:`${t}px`,width:`${n}px`,height:`${r}px`,position:"absolute"}}function Bp(e){return e*100+"%"}function VN(e,t,n,r){return e+n>r?t:n}function Ky(e,t,n){return e<0?t:n}function GN(e){return Math.max(0,e)}function rs(e){return Math.max(0,e)}var md=(e,t,n)=>{const{left:r,height:i,width:l}=t,a=e.top-(i-e.height);return{left:r,width:l,height:Ky(a,e.height,i),top:rs(a)}},gd=(e,t,n)=>{const{top:r,left:i,height:l,width:a}=t;return{top:r,height:l,width:VN(e.left,e.width,a,n),left:GN(i)}},yd=(e,t,n)=>{const{top:r,height:i,width:l}=t,a=e.left+e.width-l;return a<0?{height:i,width:e.left+e.width,top:rs(r),left:0}:{height:i,width:l,top:rs(r),left:a}},xd=(e,t,n)=>{const{top:r,left:i,height:l,width:a}=t;return{width:a,left:i,height:Ky(r,e.height,l),top:rs(r)}},qN=(e,t,n)=>md(e,gd(e,t,n)),YN=(e,t,n)=>md(e,yd(e,t)),XN=(e,t,n)=>xd(e,gd(e,t,n)),KN=(e,t,n)=>xd(e,yd(e,t)),QN={n:md,ne:qN,e:gd,se:XN,s:xd,sw:KN,w:yd,nw:YN};function ZN(e,t,n,r){const i=QN[e];return i?i(t,{...t,...n},r):n}var Qy={type:"transform",scale:1,calcStyle(e){return hd(e)}},JN={type:"absolute",scale:1,calcStyle(e){return Xy(e)}};function eT(e){return{type:"transform",scale:e,calcStyle(t){return hd(t)},calcDragPosition(t,n,r,i){return{left:(t-r)/e,top:(n-i)/e}}}}var tT=Qy,nT={cols:12,rowHeight:150,margin:[10,10],containerPadding:null,maxRows:1/0},rT={enabled:!0,bounded:!1,threshold:3},iT={enabled:!0,handles:["se"]},lT={enabled:!1,defaultItem:{w:1,h:1}};function vd(e,t,n,r,i){const l=r==="x"?"w":"h";t[r]+=1;const a=e.findIndex(o=>o.i===t.i),s=i??zs(e).length>0;for(let o=a+1;o<e.length;o++){const c=e[o];if(c!==void 0&&!c.static){if(!s&&c.y>t.y+t.h)break;fd(t,c)&&vd(e,c,n+t[l],r,s)}}t[r]=n}function aT(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0),t.y=Math.min(r,t.y);t.y>0&&!_r(e,t);)t.y--;let i;for(;(i=_r(e,t))!==void 0;)vd(n,t,i.y+i.h,"y");return t.y=Math.max(t.y,0),t}function sT(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0);t.x>0&&!_r(e,t);)t.x--;let i;for(;(i=_r(e,t))!==void 0;)if(vd(r,t,i.x+i.w,"x"),t.x+t.w>n)for(t.x=n-t.w,t.y++;t.x>0&&!_r(e,t);)t.x--;return t.x=Math.max(t.x,0),t}var Zy={type:"vertical",allowOverlap:!1,compact(e,t){const n=zs(e);let r=_s(n);const i=Vu(e),l=new Array(e.length);for(let a=0;a<i.length;a++){const s=i[a];if(s===void 0)continue;let o=Or(s);o.static||(o=aT(n,o,i,r),r=Math.max(r,o.y+o.h),n.push(o));const c=e.indexOf(s);l[c]=o,o.moved=!1}return l}},Jy={type:"horizontal",allowOverlap:!1,compact(e,t){const n=zs(e),r=qy(e),i=new Array(e.length);for(let l=0;l<r.length;l++){const a=r[l];if(a===void 0)continue;let s=Or(a);s.static||(s=sT(n,s,t,r),n.push(s));const o=e.indexOf(a);i[o]=s,s.moved=!1}return i}},ex={type:null,allowOverlap:!1,compact(e,t){return dr(e)}},oT={...Zy,allowOverlap:!0,compact(e,t){return dr(e)}},uT={...Jy,allowOverlap:!0,compact(e,t){return dr(e)}},cT={...ex,allowOverlap:!0};function Ps(e,t=!1,n=!1){let r;return t?e==="vertical"?r=oT:e==="horizontal"?r=uT:r=cT:e==="vertical"?r=Zy:e==="horizontal"?r=Jy:r=ex,n?{...r,preventCollision:n}:r}function tx(e){return Object.keys(e).sort((n,r)=>e[n]-e[r])}function Hp(e,t){const n=tx(e);let r=n[0];if(r===void 0)throw new Error("No breakpoints defined");for(let i=1;i<n.length;i++){const l=n[i];if(l===void 0)continue;const a=e[l];t>a&&(r=l)}return r}function Up(e,t){const n=t[e];if(n===void 0)throw new Error(`ResponsiveReactGridLayout: \`cols\` entry for breakpoint ${String(e)} is missing!`);return n}function No(e,t,n,r,i,l){const a=e[n];if(a)return dr(a);let s=e[r];const o=tx(t),c=o.slice(o.indexOf(n));for(let h=0;h<c.length;h++){const m=c[h];if(m===void 0)continue;const v=e[m];if(v){s=v;break}}const f=dr(s||[]),d=pd(f,{cols:i});return(typeof l=="object"&&l!==null?l:Ps(l)).compact(d,i)}function oa(e,t){if(Array.isArray(e))return e;const n=e,r=n[t];if(r!==void 0)return r;const i=Object.keys(n);for(const l of i){const a=n[l];if(a!==void 0)return a}return[10,10]}var nx={exports:{}},dT="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",fT=dT,pT=fT;function rx(){}function ix(){}ix.resetWarningCache=rx;var hT=function(){function e(r,i,l,a,s,o){if(o!==pT){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ix,resetWarningCache:rx};return n.PropTypes=n,n};nx.exports=hT();var wd=nx.exports;const Ee=Sl(wd);var mT={};function Gu(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]}function Wp(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function Vi(e){return typeof e=="number"&&!isNaN(e)}function Tt(e){return parseInt(e,10)}function hi(e,t,n){if(e[t])return new Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)}var To=["Moz","Webkit","O","ms"];function gT(e="transform"){var t,n;if(typeof window>"u")return"";const r=(n=(t=window.document)==null?void 0:t.documentElement)==null?void 0:n.style;if(!r||e in r)return"";for(let i=0;i<To.length;i++)if(lx(e,To[i])in r)return To[i];return""}function lx(e,t){return t?`${t}${yT(e)}`:e}function yT(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):e[r]==="-"?n=!0:t+=e[r];return t}var xT=gT(),_o="";function vT(e,t){var n;_o||(_o=(n=Gu(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(i){return Wp(e[i])}))!=null?n:"");const r=e[_o];return Wp(r)?!!r.call(e,t):!1}function Vp(e,t,n){let r=e;do{if(vT(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1}function zo(e,t,n,r){if(!e)return;const i={capture:!0,...r},l=n;e.addEventListener?e.addEventListener(t,l,i):e.attachEvent?e.attachEvent("on"+t,l):e["on"+t]=l}function xr(e,t,n,r){if(!e)return;const i={capture:!0,...r},l=n;e.removeEventListener?e.removeEventListener(t,l,i):e.detachEvent?e.detachEvent("on"+t,l):e["on"+t]=null}function wT(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=Tt(n.borderTopWidth),t+=Tt(n.borderBottomWidth),t}function bT(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=Tt(n.borderLeftWidth),t+=Tt(n.borderRightWidth),t}function kT(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=Tt(n.paddingTop),t-=Tt(n.paddingBottom),t}function ST(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=Tt(n.paddingLeft),t-=Tt(n.paddingRight),t}function ET(e,t,n){const i=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),l=(e.clientX+t.scrollLeft-i.left)/n,a=(e.clientY+t.scrollTop-i.top)/n;return{x:l,y:a}}function jT(e,t){const n=ax(e,t,"px");return{[lx("transform",xT)]:n}}function CT(e,t){return ax(e,t,"")}function ax({x:e,y:t},n,r){let i=`translate(${e}${r},${t}${r})`;if(n){const l=`${typeof n.x=="string"?n.x:n.x+r}`,a=`${typeof n.y=="string"?n.y:n.y+r}`;i=`translate(${l}, ${a})`+i}return i}function NT(e,t){return e.targetTouches&&Gu(e.targetTouches,n=>t===n.identifier)||e.changedTouches&&Gu(e.changedTouches,n=>t===n.identifier)}function TT(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function _T(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
85
+ `)&&(n=n.slice(0,-1))),super.equals(t,n,r)}}const aN=new iN;function lN(e,t,n){return aN.diff(e,t,n)}function sN(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
86
+ `));const n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let i=0;i<r.length;i++){const a=r[i];i%2&&!t.newlineIsToken?n[n.length-1]+=a:n.push(a)}return n}function oN(e,t){const n=lN(e??"",t??""),r=[];for(const i of n){const a=i.added?"add":i.removed?"del":"ctx",l=i.value.split(`
87
+ `);l.length>1&&l[l.length-1]===""&&l.pop();for(const s of l)r.push({type:a,text:s})}return r}const uN={add:"+",del:"−",ctx:" "};function Sl({oldText:e,newText:t,maxRows:n=80}){const r=oN(e,t),i=r.reduce((s,o)=>s+(o.type==="add"?1:0),0),a=r.reduce((s,o)=>s+(o.type==="del"?1:0),0),l=r.slice(0,n);return u.jsxs("div",{className:"diff-view","data-testid":"diff-view",children:[u.jsxs("div",{className:"diff-stat",children:[u.jsxs("span",{className:"diff-stat-add",children:["+",i]}),u.jsxs("span",{className:"diff-stat-del",children:["−",a]})]}),u.jsx("pre",{className:"diff-body",children:l.map((s,o)=>u.jsxs("div",{className:`diff-line ${s.type}`,children:[u.jsx("span",{className:"diff-gutter",children:uN[s.type]}),u.jsx("span",{className:"diff-text",children:s.text===""?" ":s.text})]},o))}),r.length>n&&u.jsxs("div",{className:"diff-more",children:["+",r.length-n," more lines"]})]})}function Fp(e){if(!e)return"";const t=String(e).split(/[\\/]+/).filter(Boolean);return t.length>2?"…/"+t.slice(-2).join("/"):t.join("/")}function cN(e){if(!e||typeof e!="object")return"";for(const t of Object.values(e))if(typeof t=="string"&&t)return t;return""}const dN={Read:{icon:"📄",verb:"Read"},Edit:{icon:"✏️",verb:"Edit"},MultiEdit:{icon:"✏️",verb:"Edit"},Write:{icon:"📝",verb:"Write"},NotebookEdit:{icon:"📓",verb:"Edit notebook"},Bash:{icon:"▶",verb:"Run"},PowerShell:{icon:"▶",verb:"Run"},Glob:{icon:"🔍",verb:"Find"},Grep:{icon:"🔍",verb:"Search"},Task:{icon:"🤖",verb:"Agent"},WebFetch:{icon:"🌐",verb:"Fetch"},WebSearch:{icon:"🌐",verb:"Web search"},Skill:{icon:"✨",verb:"Skill"},TodoWrite:{icon:"☑",verb:"Plan"}};function fN(e,t){if(!t)return"";switch(e){case"Read":case"Edit":case"MultiEdit":case"Write":return Fp(t.file_path);case"NotebookEdit":return Fp(t.notebook_path);case"Bash":case"PowerShell":return t.command||"";case"Glob":case"Grep":return t.pattern||"";case"Task":return t.description||t.subagent_type||"";case"WebFetch":return t.url||"";case"WebSearch":return t.query||"";case"Skill":return t.command||t.name||"";default:return cN(t)}}function pN({name:e,input:t}){return(t==null?void 0:t._raw)!=null?u.jsx("pre",{className:"tool-raw",children:String(t._raw)}):e==="Edit"?u.jsx(Sl,{oldText:t.old_string||"",newText:t.new_string||""}):e==="MultiEdit"&&Array.isArray(t.edits)?u.jsx(u.Fragment,{children:t.edits.map((n,r)=>u.jsx(Sl,{oldText:n.old_string||"",newText:n.new_string||""},r))}):e==="Write"?u.jsx(Sl,{oldText:"",newText:t.content||""}):(e==="Bash"||e==="PowerShell")&&t.description?u.jsx("div",{className:"tool-desc",children:t.description}):null}function hN({content:e,isError:t}){if(e==null)return null;const n=String(e);if(!n.trim()&&!t)return null;const i=n.length>4e3?n.slice(0,4e3)+`
88
+ … (truncated)`:n,a=n.split(`
89
+ `).find(l=>l.trim())||(t?"error":"done");return u.jsxs("details",{className:`tool-result ${t?"err":""}`,open:t,children:[u.jsxs("summary",{children:[t?"✗ ":"",a.slice(0,140)]}),u.jsx("pre",{children:i})]})}function mN({block:e}){const{name:t,input:n={},result:r,done:i,isError:a}=e,l=dN[t]||{icon:"⚙",verb:t},s=fN(t,n),o=i?a?"error":"done":"running";return u.jsxs("div",{className:`tool-card ${o}`,"data-testid":"tool-card","data-tool":t,children:[u.jsxs("div",{className:"tool-head",children:[u.jsx("span",{className:"tool-icon",children:l.icon}),u.jsx("span",{className:"tool-verb",children:l.verb}),s&&u.jsx("code",{className:"tool-target",children:s}),t==="Edit"&&n.replace_all&&u.jsx("span",{className:"tool-tag",children:"all"}),u.jsx("span",{className:"tool-status","data-status":o,children:o==="running"?u.jsx("span",{className:"tool-spinner","aria-label":"running"}):o==="error"?"✗":"✓"})]}),u.jsx(pN,{name:t,input:n}),u.jsx(hN,{content:r,isError:a})]})}function Gy(e){return`$${(Number(e)||0).toFixed(2)}`}const qy=()=>u.jsx("span",{className:"bz-represented",title:"No real money moves yet — this is a preview of how earnings would work.",children:"represented · settles later"});function gN({block:e,bazaarState:t,canReply:n,onQuickReply:r}){const{tool:i,phase:a,data:l}=e;if(a!=="result")return u.jsx(vN,{tool:i,input:e.input});if(!l||l.kind==="error")return null;switch(i){case"search_shelf":return u.jsx(wN,{data:l});case"open_recipe":return u.jsx(bN,{data:l});case"launch_preview":return u.jsx(kN,{data:l});case"record_use":return u.jsx(SN,{data:l,bazaarState:t});case"publish_listing":case"publish_draft":return u.jsx(EN,{data:l});case"draft_recipe":return u.jsx(jN,{data:l,canReply:n,onQuickReply:r});default:return null}}const yN={search_shelf:"Searching the bazaar shelf",open_recipe:"Absorbing the recipe",launch_preview:"Opening your live preview",record_use:"Recording the build",publish_listing:"Packaging for the shelf",draft_recipe:"Drafting a recipe from your work",publish_draft:"Publishing to the shelf"},xN={search_shelf:"🛒",open_recipe:"📖",launch_preview:"▶️",record_use:"🧾",publish_listing:"📦",draft_recipe:"📝",publish_draft:"📦"};function vN({tool:e,input:t}){return u.jsxs("div",{className:"bazaar-card bz-call","data-testid":`bazaar-${e}-call`,children:[u.jsx("span",{className:"bz-icon",children:xN[e]||"🛍️"}),u.jsxs("span",{className:"bz-call-label",children:[yN[e]||"Bazaar","…"]}),e==="search_shelf"&&(t==null?void 0:t.need)&&u.jsxs("span",{className:"bz-call-need",children:["“",t.need,"”"]}),u.jsxs("span",{className:"bz-dots",children:[u.jsx("i",{}),u.jsx("i",{}),u.jsx("i",{})]})]})}function Mp(e){return`${Math.round((Number(e)||0)*100)}%`}function wN({data:e}){var r;const t=e.hits||[];if(!t.length)return u.jsxs("div",{className:"bazaar-card bz-empty","data-testid":"bazaar-search-result",children:[u.jsx("span",{className:"bz-icon",children:"🛒"}),u.jsx("span",{children:"Checked the shelf — nothing proven fit this one, so I'll build it from scratch."})]});const n=t[0];return u.jsxs("div",{className:"bazaar-card bz-search","data-testid":"bazaar-search-result",children:[u.jsxs("div",{className:"bz-head",children:[u.jsx("span",{className:"bz-icon",children:"🛒"}),u.jsx("span",{className:"bz-head-title",children:"Found a proven recipe on the shelf"})]}),u.jsxs("div",{className:"bz-hit bz-hit-top",children:[u.jsxs("div",{className:"bz-hit-main",children:[u.jsx("span",{className:"bz-hit-title",children:n.title}),u.jsxs("span",{className:"bz-hit-by",children:["by ",((r=n.producer)==null?void 0:r.name)||"a producer"]})]}),u.jsxs("div",{className:"bz-outcome",title:"How often this recipe actually gets people a working result",children:[u.jsx("strong",{children:Mp(n.outcomeScore)})," of builds worked"]})]}),n.pitch&&u.jsx("p",{className:"bz-hit-pitch",children:n.pitch}),t.length>1&&u.jsxs("div",{className:"bz-others",children:["also on the shelf:"," ",t.slice(1,3).map((i,a)=>u.jsxs("span",{children:[a>0&&" · ",i.title," (",Mp(i.outcomeScore),")"]},i.id))]})]})}function bN({data:e}){var n;const t=e.card||{};return u.jsxs("div",{className:"bazaar-card bz-recipe","data-testid":"bazaar-recipe",children:[u.jsx("span",{className:"bz-icon",children:"📖"}),u.jsxs("span",{className:"bz-recipe-text",children:["Absorbed ",u.jsx("strong",{children:t.title})," — ",((n=t.producer)==null?void 0:n.name)||"the producer","'s know-how",t.safetyBadge&&u.jsx("span",{className:`bz-badge bz-badge-${t.safetyBadge}`,children:t.safetyBadge})]})]})}function kN({data:e}){return u.jsxs("div",{className:"bazaar-card bz-preview","data-testid":"bazaar-preview",children:[u.jsx("span",{className:"bz-icon",children:"▶️"}),u.jsx("span",{children:"Your live preview is open — try it on the right."})]})}function SN({data:e,bazaarState:t}){var c;const n=e.threeWay||{},r=(c=e.recipe)==null?void 0:c.producer,i=e.credit||{},a=((t==null?void 0:t.earnings)||[]).find(f=>f.handle===(r==null?void 0:r.handle)),l=(a==null?void 0:a.total)??i.oneTime??0,s=(a==null?void 0:a.matches)??0,o=!!e.service;return u.jsxs("div",{className:"bazaar-card bz-threeway","data-testid":"bazaar-threeway",children:[u.jsxs("div",{className:"bz-tw-head",children:[u.jsx("span",{className:"bz-tw-spark",children:"✦"})," Everyone just won"]}),u.jsxs("div",{className:"bz-tw-cols",children:[u.jsxs("div",{className:"bz-tw-col bz-tw-you",children:[u.jsx("div",{className:"bz-tw-who",children:"👤 You"}),u.jsx("div",{className:"bz-tw-what",children:n.you})]}),u.jsxs("div",{className:"bz-tw-col bz-tw-producer",children:[u.jsxs("div",{className:"bz-tw-who",children:["🏷️ ",(r==null?void 0:r.name)||"The producer"]}),u.jsx("div",{className:"bz-tw-what",children:n.producer}),u.jsxs("div",{className:"bz-tw-meter","data-testid":"bazaar-meter",children:[u.jsx("span",{className:"bz-meter-amount",children:Gy(l)}),u.jsx("span",{className:"bz-meter-sub",children:o?`${s} ${s===1?"match":"matches"} so far`:"one-time"})]}),u.jsx(qy,{})]}),u.jsxs("div",{className:"bz-tw-col bz-tw-vw",children:[u.jsx("div",{className:"bz-tw-who",children:"🟣 VentureWild"}),u.jsx("div",{className:"bz-tw-what",children:n.platform})]})]})]})}function EN({data:e}){const t=e.listing||{},n=e.earning||{};return u.jsxs("div",{className:"bazaar-card bz-publish","data-testid":"bazaar-publish",children:[u.jsxs("div",{className:"bz-head",children:[u.jsx("span",{className:"bz-icon",children:"📦"}),u.jsx("span",{className:"bz-head-title",children:"You're a producer now"})]}),u.jsxs("p",{className:"bz-publish-text",children:[u.jsx("strong",{children:t.title})," is on the shelf. You'll earn when other people build on it."]}),u.jsxs("div",{className:"bz-tw-meter",children:[u.jsx("span",{className:"bz-meter-amount",children:Gy(n.oneTimeValue)}),u.jsxs("span",{className:"bz-meter-sub",children:["per build · ",u.jsx(qy,{})]})]})]})}function jN({data:e,canReply:t,onQuickReply:n}){var i;const r=e.draft||{};return u.jsxs("div",{className:"bazaar-card bz-draft","data-testid":"bazaar-draft",children:[u.jsxs("div",{className:"bz-head",children:[u.jsx("span",{className:"bz-icon",children:"📝"}),u.jsx("span",{className:"bz-head-title",children:"Draft recipe — review before it goes on the shelf"})]}),u.jsx("div",{className:"bz-hit-main",children:u.jsx("span",{className:"bz-hit-title",children:r.title})}),r.pitch&&u.jsx("p",{className:"bz-hit-pitch",children:r.pitch}),r.sourceNote&&u.jsxs("div",{className:"bz-draft-source",children:["Generalized from: ",r.sourceNote]}),((i=r.tags)==null?void 0:i.length)>0&&u.jsx("div",{className:"bz-others",children:r.tags.slice(0,8).join(" · ")}),r.knowHow&&u.jsxs("details",{className:"bz-draft-knowhow",children:[u.jsx("summary",{children:"Preview the know-how — check it for any client specifics"}),u.jsx("pre",{children:r.knowHow})]}),n?u.jsxs("div",{className:"bz-draft-actions",children:[u.jsx("button",{type:"button",className:"bz-build-btn",disabled:!t,"data-testid":"bazaar-draft-publish",onClick:()=>t&&n(`Publish the “${r.title}” draft to my shelf.`),children:"Publish to my shelf →"}),u.jsx("button",{type:"button",className:"bz-draft-skip",disabled:!t,"data-testid":"bazaar-draft-skip",onClick:()=>t&&n(`Skip the “${r.title}” draft — don't publish that one.`),children:"Skip this one"}),u.jsx("span",{className:"bz-draft-hint",children:"Nothing's published until you choose."})]}):u.jsx("div",{className:"bz-draft-hint",children:"Nothing's published yet — tell me which drafts to put on your shelf."})]})}const ai="wild-workspace.chat.v2";function CN({messageId:e,userText:t,agentText:n}={}){return!e||!t||!n?[]:[{id:`u-${e}`,role:"user",text:t},{id:e,role:"agent",blocks:[{type:"text",text:n}]}]}function NN(e,t=globalThis.localStorage){const n=CN(e);if(!n.length||!t)return!1;try{const r=t.getItem(ai),i=r?JSON.parse(r):[];return Array.isArray(i)&&i.length>0?!1:(t.setItem(ai,JSON.stringify(n)),!0)}catch{return!1}}function TN(e,t){var i;const n=e.blocks?e.blocks.slice():[],r=n[n.length-1];switch(t.type){case"text":return r&&r.type==="text"?n[n.length-1]={...r,text:r.text+t.text}:n.push({type:"text",text:t.text}),{...e,blocks:n};case"thinking":return r&&r.type==="thinking"?n[n.length-1]={...r,text:r.text+t.text}:n.push({type:"thinking",text:t.text}),{...e,blocks:n};case"tool-use":return n.push({type:"tool",id:t.id,name:t.name,input:t.input||{},done:!1}),{...e,blocks:n};case"tool-result":{const a=n.findIndex(l=>l.type==="tool"&&l.id===t.id);return a>=0&&(n[a]={...n[a],result:t.content,isError:t.isError,done:!0}),{...e,blocks:n}}case"usage":return{...e,usage:t.usage,costUsd:(i=t.usage)==null?void 0:i.cost_usd,durationMs:t.durationMs};case"error":return n.push({type:"error",text:t.message||"agent error"}),{...e,blocks:n};case"bazaar":{if(t.phase==="call")return n.push({type:"bazaar",id:t.id,tool:t.tool,phase:"call",input:t.input||{}}),{...e,blocks:n};if(t.phase==="result"){const a=n.findIndex(l=>l.type==="bazaar"&&l.id===t.id);return a>=0?n[a]={...n[a],phase:"result",data:t.data,isError:t.isError}:n.push({type:"bazaar",id:t.id,tool:t.tool,phase:"result",data:t.data}),{...e,blocks:n}}return e}case"canvas":{if(t.phase==="call")return n.push({type:"canvas",id:t.id,tool:t.tool,phase:"call"}),{...e,blocks:n};if(t.phase==="result"){const a=n.findIndex(s=>s.type==="canvas"&&s.id===t.id),l={type:"canvas",id:t.id,tool:t.tool,phase:"result",data:t.data,isError:t.isError};return a>=0?n[a]={...n[a],...l}:n.push(l),{...e,blocks:n}}return e}default:return e}}function $p(e,t,n){const r=e.findIndex(a=>a.id===t);if(r<0)return e;const i=e.slice();return i[r]=TN(i[r],n),i}function _N(e,t,n){if(!n||!n.trim())return e;const r=e.findIndex(a=>a.id===t);if(r<0)return e;const i=e.slice();return i[r]={...i[r],stderr:(i[r].stderr||"")+n},i}function zN({role:e,capabilities:t,mode:n,token:r,onBazaarEvent:i,inject:a,agentName:l}){const[s,o]=k.useState(()=>{try{const I=localStorage.getItem(ai);if(I)return JSON.parse(I)}catch{}return[]}),[c,f]=k.useState(null),[d,p]=k.useState(!1),[h,m]=k.useState(""),[v,w]=k.useState(!1),[g,x]=k.useState(null),y=k.useRef(null),C=k.useRef(null),E=k.useRef(!0),b=k.useRef(i),T=k.useRef(null),_=k.useRef(null);k.useEffect(()=>{b.current=i},[i]),k.useEffect(()=>{try{localStorage.setItem(ai,JSON.stringify(s.slice(-120)))}catch{}},[s]),k.useEffect(()=>{const I=C.current;I&&E.current&&(I.scrollTop=I.scrollHeight)},[s]);function R(){const I=C.current;I&&(E.current=I.scrollHeight-I.scrollTop-I.clientHeight<90)}k.useEffect(()=>{let I=!1,J=0,ae=null,A=null;const q=()=>{if(I)return;const S=window.location.protocol==="https:"?"wss":"ws",Q=new URL(`${S}://${window.location.host}/ws/chat`);r&&Q.searchParams.set("t",r),A=new WebSocket(Q.toString()),y.current=A,A.onopen=()=>{J=0,w(!0)},A.onmessage=le=>{var oe,ve,ne,re,we,ce,ze;let j;try{j=JSON.parse(le.data)}catch{return}if(j.type==="chunk"){const Y=j.chunk;if(o(_e=>$p(_e,j.messageId,Y)),(Y==null?void 0:Y.type)==="bazaar"&&Y.phase==="result"){const _e=Y.data||{};if(Y.tool==="launch_preview"||Y.tool==="record_use"&&_e.preview){const de=_e.url||((oe=_e.preview)==null?void 0:oe.url)||"/preview/";(ve=b.current)==null||ve.call(b,{type:"preview",url:de,ts:Date.now()})}}(Y==null?void 0:Y.type)==="canvas"&&Y.phase==="result"&&!Y.isError&&((ne=Y.data)==null?void 0:ne.kind)==="block"&&Y.data.block&&((re=b.current)==null||re.call(b,{type:"block",op:Y.data.op||"make",block:Y.data.block})),(Y==null?void 0:Y.type)==="canvas"&&Y.phase==="result"&&!Y.isError&&((we=Y.data)==null?void 0:we.kind)==="theme"&&Y.data.op==="set"&&Y.data.theme&&((ce=b.current)==null||ce.call(b,{type:"theme",theme:Y.data.theme}))}else if(j.type==="bazaar")j.phase==="meter"&&(x(j.state),(ze=b.current)==null||ze.call(b,{type:"meter",state:j.state}));else if(j.type==="stderr")o(Y=>_N(Y,j.messageId,j.text));else if(j.type==="end")f(null),p(!1);else if(j.type==="error")f(null),p(!1),j.messageId?o(Y=>$p(Y,j.messageId,{type:"error",message:j.message||"agent error"})):o(Y=>[...Y,{id:`err-${Date.now()}`,role:"error",text:j.message||"agent error"}]);else if(j.type==="turn-begin")o(Y=>{if(Y.some(de=>de.id===j.messageId))return Y;const _e=[];return j.userText&&_e.push({id:`u-${j.messageId}`,role:"user",text:j.userText}),j.note&&_e.push({id:`note-${j.messageId}`,role:"system",text:j.note}),_e.push({id:j.messageId,role:"agent",blocks:[]}),[...Y,..._e]}),f(j.messageId),p(!0);else if(j.type==="reset"){o([]),f(null),p(!1);try{localStorage.removeItem(ai)}catch{}}},A.onerror=()=>p(!1),A.onclose=()=>{if(w(!1),p(!1),f(null),I)return;const le=Math.min(1e3*2**J,1e4);J+=1,ae=setTimeout(q,le)}};return q(),()=>{I=!0,clearTimeout(ae);try{A==null||A.close()}catch{}}},[r]);function N(I,J){if(!t.chatWrite)return;const ae=(typeof I=="string"?I:h).trim();if(!ae||d)return;const A=typeof J=="string"&&J.trim()||ae,q=y.current,S=q==null?void 0:q.readyState;if(!q||S!==WebSocket.OPEN&&S!==WebSocket.CONNECTING){o(j=>[...j,{id:`err-${Date.now()}`,role:"error",text:"reconnecting to your agent — try again in a few seconds"}]);return}const Q=`m-${Date.now()}`;E.current=!0,o(j=>[...j,{id:`u-${Q}`,role:"user",text:A},{id:Q,role:"agent",blocks:[]}]),f(Q),p(!0),m("");const le=JSON.stringify({type:"send",text:ae,mode:n,messageId:Q});S===WebSocket.OPEN?q.send(le):q.addEventListener("open",()=>{try{q.send(le)}catch{}},{once:!0})}T.current=N,k.useEffect(()=>{var I;!(a!=null&&a.text)||_.current===a.ts||(_.current=a.ts,E.current=!0,(I=T.current)==null||I.call(T,a.text))},[a]);function M(){var I;((I=y.current)==null?void 0:I.readyState)===WebSocket.OPEN&&y.current.send(JSON.stringify({type:"cancel"})),p(!1),f(null)}function $(){var I;((I=y.current)==null?void 0:I.readyState)===WebSocket.OPEN&&y.current.send(JSON.stringify({type:"reset"})),o([]),f(null),p(!1);try{localStorage.removeItem(ai)}catch{}}function L(I){I.key==="Enter"&&!I.shiftKey&&(I.preventDefault(),N())}const B=s.length===0;return u.jsxs(u.Fragment,{children:[!B&&t.chatWrite&&u.jsx("div",{className:"chat-toolbar","data-testid":"chat-toolbar",children:u.jsx("button",{className:"chat-newbtn",onClick:$,disabled:d,"data-testid":"new-chat-btn",title:"Start a fresh conversation — the agent forgets the current thread",children:"+ New chat"})}),u.jsxs("div",{className:"chat-messages",ref:C,onScroll:R,"data-testid":"chat-messages",children:[B&&u.jsx(FN,{role:e,connected:v,agentName:l,canSend:t.chatWrite&&!d,onSend:N}),s.map(I=>u.jsx(PN,{message:I,streaming:I.id===c,bazaarState:g,canReply:t.chatWrite&&!d,onQuickReply:N},I.id))]}),t.chatWrite&&u.jsxs("div",{className:"chat-input","data-testid":"chat-input",children:[u.jsx("textarea",{"data-testid":"chat-textarea",placeholder:e==="client"?"Describe the change you’d like…":"Ask the agent to build, fix, or explain something — Enter to send",value:h,onChange:I=>m(I.target.value),onKeyDown:L,disabled:d,rows:2}),d?u.jsx("button",{onClick:M,"data-testid":"cancel-btn",children:"Stop"}):u.jsx("button",{className:"primary send-btn",onClick:N,disabled:!h.trim(),"data-testid":"send-btn",children:"Send"})]}),!t.chatWrite&&e==="viewer"&&u.jsx("div",{className:"chat-readonly-banner",children:"You’re viewing a shared workspace (read-only)."})]})}function PN({message:e,streaming:t,bazaarState:n,canReply:r,onQuickReply:i}){if(e.role==="user")return u.jsx("div",{className:"chat-msg user","data-testid":"chat-msg-user",children:u.jsx("div",{className:"msg-plain",children:e.text})});if(e.role==="system")return u.jsx("div",{className:"chat-msg system","data-testid":"chat-msg-system",children:e.text});if(e.role==="error")return u.jsxs("div",{className:"chat-msg error","data-testid":"chat-msg-error",children:["⚠ ",e.text]});const a=e.blocks||[],l=a[a.length-1],s=t&&(l==null?void 0:l.type)==="text"?a.length-1:-1,o=t&&(a.length===0||(l==null?void 0:l.type)==="tool"&&l.done);return u.jsxs("div",{className:"chat-msg agent","data-testid":"chat-msg-agent",children:[a.map((c,f)=>u.jsx(RN,{block:c,cursor:f===s,bazaarState:n,canReply:r,onQuickReply:i},c.id||`${c.type}-${f}`)),o&&u.jsx(LN,{}),e.usage&&u.jsx(ON,{usage:e.usage,costUsd:e.costUsd,durationMs:e.durationMs}),e.stderr&&u.jsxs("details",{className:"stderr-block",children:[u.jsx("summary",{children:"stderr"}),u.jsx("pre",{children:e.stderr})]})]})}function RN({block:e,cursor:t,bazaarState:n,canReply:r,onQuickReply:i}){var a;return e.type==="bazaar"?u.jsx(gN,{block:e,bazaarState:n,canReply:r,onQuickReply:i}):e.type==="text"?u.jsxs("div",{className:"agent-text",children:[u.jsx(Vy,{text:e.text}),t&&u.jsx("span",{className:"stream-cursor"})]}):e.type==="thinking"?u.jsxs("details",{className:"thinking-block",children:[u.jsx("summary",{children:"💭 Thought process"}),u.jsx("div",{className:"thinking-body",children:e.text})]}):e.type==="tool"?e.name==="AskUserQuestion"&&Array.isArray((a=e.input)==null?void 0:a.questions)&&e.input.questions.length?u.jsx(AN,{block:e,canReply:r,onQuickReply:i}):u.jsx(mN,{block:e}):e.type==="canvas"?u.jsx(IN,{block:e}):e.type==="error"?u.jsxs("div",{className:"agent-error",children:["⚠ ",e.text]}):null}function IN({block:e}){var r,i,a,l;if(e.phase==="result"&&!e.isError&&((r=e.data)==null?void 0:r.kind)==="theme"&&e.data.op==="set"){const s=(i=e.data.theme)==null?void 0:i.name;return u.jsxs("div",{className:"canvas-card","data-testid":"canvas-card",children:[u.jsx("span",{className:"canvas-card-icon",children:"🎨"}),u.jsxs("span",{className:"canvas-card-text",children:["Restyled your workspace",s?u.jsxs(u.Fragment,{children:[" — ",u.jsx("strong",{children:s})]}):null]})]})}const t=(a=e.data)==null?void 0:a.block;if(e.phase==="call"||!t)return u.jsx("div",{className:"canvas-card is-pending","data-testid":"canvas-card",children:"🧩 Building a block…"});if(e.isError)return u.jsx("div",{className:"canvas-card is-error","data-testid":"canvas-card",children:"⚠ Couldn’t build that block."});const n=((l=e.data)==null?void 0:l.op)==="update"?"Updated":"Added";return u.jsxs("div",{className:"canvas-card","data-testid":"canvas-card",children:[u.jsx("span",{className:"canvas-card-icon",children:t.icon||"🧩"}),u.jsxs("span",{className:"canvas-card-text",children:[n," ",u.jsx("strong",{children:t.title})," to your canvas"]})]})}function AN({block:e,canReply:t,onQuickReply:n}){const r=e.input.questions;return u.jsxs("div",{className:"ask-card","data-testid":"ask-card",children:[u.jsxs("div",{className:"ask-head",children:[u.jsx("span",{className:"ask-icon",children:"🤔"}),u.jsx("span",{children:"Your call"})]}),r.map((i,a)=>u.jsx(DN,{q:i,canReply:t,onQuickReply:n},a)),u.jsx("div",{className:"ask-foot",children:"…or just type your answer below."})]})}function DN({q:e,canReply:t,onQuickReply:n}){const[r,i]=k.useState([]),a=!!e.multiSelect,l=Array.isArray(e.options)?e.options:[],s=o=>i(c=>c.includes(o)?c.filter(f=>f!==o):[...c,o]);return u.jsxs("div",{className:"ask-q",children:[e.header&&u.jsx("span",{className:"ask-q-header",children:e.header}),e.question&&u.jsx("p",{className:"ask-q-text",children:e.question}),u.jsx("div",{className:"ask-options",children:l.map((o,c)=>a?u.jsxs("button",{type:"button",className:`ask-opt${r.includes(o.label)?" sel":""}`,disabled:!t,onClick:()=>s(o.label),title:o.description||"",children:[u.jsx("span",{className:"ask-opt-check",children:r.includes(o.label)?"☑":"☐"}),u.jsxs("span",{className:"ask-opt-main",children:[u.jsx("span",{className:"ask-opt-label",children:o.label}),o.description&&u.jsx("span",{className:"ask-opt-desc",children:o.description})]})]},c):u.jsxs("button",{type:"button",className:"ask-opt",disabled:!t,onClick:()=>t&&n(o.label),title:o.description||"",children:[u.jsxs("span",{className:"ask-opt-main",children:[u.jsx("span",{className:"ask-opt-label",children:o.label}),o.description&&u.jsx("span",{className:"ask-opt-desc",children:o.description})]}),u.jsx("span",{className:"ask-opt-go",children:"→"})]},c))}),a&&u.jsxs("button",{type:"button",className:"primary ask-send",disabled:!t||!r.length,onClick:()=>t&&r.length&&n(r.join(", ")),children:["Send",r.length?` (${r.length})`:""]})]})}function LN(){return u.jsxs("div",{className:"agent-working","data-testid":"agent-working",children:[u.jsxs("span",{className:"dots",children:[u.jsx("i",{}),u.jsx("i",{}),u.jsx("i",{})]}),"working"]})}function ON({usage:e,costUsd:t,durationMs:n}){const r=typeof t=="number"?t:e==null?void 0:e.cost_usd;return u.jsxs("div",{className:"usage-footer","data-testid":"usage-footer",children:[(e==null?void 0:e.output_tokens)!=null&&u.jsxs("span",{title:"output tokens",children:["↑ ",e.output_tokens.toLocaleString()]}),typeof r=="number"&&r>0&&u.jsxs("span",{title:"cost (USD)",children:["$",r.toFixed(4)]}),n!=null&&u.jsxs("span",{children:[(n/1e3).toFixed(1),"s"]})]})}function FN({role:e,connected:t,agentName:n,canSend:r,onSend:i}){if(e==="client")return u.jsxs("div",{className:"chat-empty","data-testid":"chat-empty",children:[u.jsx("div",{className:"chat-empty-mark",children:"✦"}),u.jsx("p",{className:"chat-empty-title",children:"Describe what you’d like changed"}),u.jsx("p",{className:"chat-empty-sub",children:"The team’s AI agent will pick it up and you’ll see it here."}),!t&&u.jsx("p",{className:"chat-empty-warn",children:"connecting to the agent bridge…"})]});const a=n&&n!=="Chat"?n:null,l=[{label:"✦ Build my workspace for me",display:"Build my workspace for me.",primary:!0,prompt:"Set up a friendly starter workspace for me. Use your canvas tools to add a couple of useful blocks — for example a short welcome note, a quick getting-started checklist, and maybe a tips block — and pick a warm, welcoming theme if you'd like. Then say a brief, friendly hello telling me what you set up. Keep it light."},{label:"Show me around",display:"Show me around.",prompt:"What's in this workspace? Give me a quick, friendly tour."},{label:"Make something I can show off",display:"Make something I can show off.",prompt:"Build me a simple, good-looking landing page, and put a Live view on my canvas so I can watch it come together."}];return u.jsxs("div",{className:"chat-empty","data-testid":"chat-empty",children:[u.jsx("div",{className:"chat-empty-mark",children:"✦"}),u.jsx("p",{className:"chat-empty-title",children:a?`Hi — I’m ${a}.`:"Hi — I’m your agent."}),u.jsx("p",{className:"chat-empty-sub",children:"Tell me what you’re working on and I’ll set it up for you — I can build, write, and arrange your workspace as we go. Not sure where to start?"}),u.jsx("div",{className:"chat-empty-starters",children:l.map(s=>u.jsx("button",{type:"button",className:`chat-empty-starter${s.primary?" primary":""}`,onClick:()=>i==null?void 0:i(s.prompt,s.display),disabled:!r||!t,"data-testid":"chat-empty-starter",children:s.label},s.label))}),!t&&u.jsx("p",{className:"chat-empty-warn",children:"connecting to the agent bridge…"})]})}function Lr(e){const{margin:t,containerPadding:n,containerWidth:r,cols:i}=e;return(r-t[0]*(i-1)-n[0]*2)/i}function Sn(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function al(e,t,n,r,i,a,l){const{margin:s,containerPadding:o,rowHeight:c}=e,f=Lr(e);let d,p,h,m;if(l?(d=Math.round(l.width),p=Math.round(l.height)):(d=Sn(r,f,s[0]),p=Sn(i,c,s[1])),a?(h=Math.round(a.top),m=Math.round(a.left)):l?(h=Math.round(l.top),m=Math.round(l.left)):(h=Math.round((c+s[1])*n+o[1]),m=Math.round((f+s[0])*t+o[0])),!a&&!l){if(Number.isFinite(r)){const w=Math.round((f+s[0])*(t+r)+o[0])-m-d;w!==s[0]&&(d+=w-s[0])}if(Number.isFinite(i)){const w=Math.round((c+s[1])*(n+i)+o[1])-h-p;w!==s[1]&&(p+=w-s[1])}}return{top:h,left:m,width:d,height:p}}function MN(e,t,n,r,i){const{margin:a,containerPadding:l,cols:s,rowHeight:o,maxRows:c}=e,f=Lr(e);let d=Math.round((n-l[0])/(f+a[0])),p=Math.round((t-l[1])/(o+a[1]));return d=ns(d,0,s-r),p=ns(p,0,c-i),{x:d,y:p}}function ll(e,t,n){const{margin:r,containerPadding:i,rowHeight:a}=e,l=Lr(e),s=Math.round((n-i[0])/(l+r[0])),o=Math.round((t-i[1])/(a+r[1]));return{x:s,y:o}}function $N(e,t,n){const{margin:r,rowHeight:i}=e,a=Lr(e),l=Math.max(1,Math.round((t+r[0])/(a+r[0]))),s=Math.max(1,Math.round((n+r[1])/(i+r[1])));return{w:l,h:s}}function ns(e,t,n){return Math.max(Math.min(e,n),t)}function pd(e,t){return!(e.i===t.i||e.x+e.w<=t.x||e.x>=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function _r(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r!==void 0&&pd(r,t))return r}}function Yy(e,t){return e.filter(n=>pd(n,t))}function BN(e,t){return t==="horizontal"?Xy(e):t==="vertical"||t==="wrap"?Gu(e):[...e]}function Gu(e){return[...e].sort((t,n)=>t.y!==n.y?t.y-n.y:t.x-n.x)}function Xy(e){return[...e].sort((t,n)=>t.x!==n.x?t.x-n.x:t.y-n.y)}function _s(e){let t=0;for(let n=0;n<e.length;n++){const r=e[n];if(r!==void 0){const i=r.y+r.h;i>t&&(t=i)}}return t}function br(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r!==void 0&&r.i===t)return r}}function zs(e){return e.filter(t=>t.static===!0)}function Or(e){return{i:e.i,x:e.x,y:e.y,w:e.w,h:e.h,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:!!e.moved,static:!!e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,constraints:e.constraints,isBounded:e.isBounded}}function dr(e){const t=new Array(e.length);for(let n=0;n<e.length;n++){const r=e[n];r!==void 0&&(t[n]=Or(r))}return t}function HN(e,t){const n=new Array(e.length);for(let r=0;r<e.length;r++){const i=e[r];i!==void 0&&(t.i===i.i?n[r]=t:n[r]=i)}return n}function UN(e,t,n){let r=br(e,t);return r?(r=n(Or(r)),[HN(e,r),r]):[[...e],null]}function hd(e,t){const n=zs(e);for(let r=0;r<e.length;r++){const i=e[r];if(i!==void 0)if(i.x+i.w>t.cols&&(i.x=t.cols-i.w),i.x<0&&(i.x=0,i.w=t.cols),!i.static)n.push(i);else for(;_r(n,i);)i.y++}return e}function Cr(e,t,n,r,i,a,l,s,o){if(t.static&&t.isDraggable!==!0)return[...e];if(t.y===r&&t.x===n)return[...e];const c=t.x,f=t.y;typeof n=="number"&&(t.x=n),typeof r=="number"&&(t.y=r),t.moved=!0;let d=BN(e,l);(l==="vertical"&&typeof r=="number"?f>=r:l==="horizontal"&&typeof n=="number"?c>=n:!1)&&(d=d.reverse());const h=Yy(d,t),m=h.length>0;if(m&&o)return dr(e);if(m&&a)return t.x=c,t.y=f,t.moved=!1,e;let v=[...e];for(let w=0;w<h.length;w++){const g=h[w];g!==void 0&&(g.moved||(g.static?v=Bp(v,g,t,i,l):v=Bp(v,t,g,i,l)))}return v}function Bp(e,t,n,r,i,a){const l=i==="horizontal",s=i==="vertical",o=t.static;if(r){r=!1;const d={x:l?Math.max(t.x-n.w,0):n.x,y:s?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"},p=_r(e,d),h=p!==void 0&&p.y+p.h>t.y,m=p!==void 0&&t.x+t.w>p.x;if(!p)return Cr(e,n,l?d.x:void 0,s?d.y:void 0,r,o,i);if(h&&s)return Cr(e,n,void 0,n.y+1,r,o,i);if(h&&i===null)return t.y=n.y,n.y=n.y+n.h,[...e];if(m&&l)return Cr(e,t,n.x,void 0,r,o,i)}const c=l?n.x+1:void 0,f=s?n.y+1:void 0;return c===void 0&&f===void 0?[...e]:Cr(e,n,c,f,r,o,i)}function li(e,t,n){return Math.max(t,Math.min(n,e))}var WN={name:"gridBounds",constrainPosition(e,t,n,{cols:r,maxRows:i}){return{x:li(t,0,Math.max(0,r-e.w)),y:li(n,0,Math.max(0,i-e.h))}},constrainSize(e,t,n,r,{cols:i,maxRows:a}){const l=r==="w"||r==="nw"||r==="sw"?e.x+e.w:i-e.x,s=r==="n"||r==="nw"||r==="ne"?e.y+e.h:a-e.y;return{w:li(t,1,Math.max(1,l)),h:li(n,1,Math.max(1,s))}}},VN={name:"minMaxSize",constrainSize(e,t,n){return{w:li(t,e.minW??1,e.maxW??1/0),h:li(n,e.minH??1,e.maxH??1/0)}}},Ky=[WN,VN];function sl(e,t,n,r,i){let a={x:n,y:r};for(const l of e)l.constrainPosition&&(a=l.constrainPosition(t,a.x,a.y,i));if(t.constraints)for(const l of t.constraints)l.constrainPosition&&(a=l.constrainPosition(t,a.x,a.y,i));return a}function GN(e,t,n,r,i,a){let l={w:n,h:r};for(const s of e)s.constrainSize&&(l=s.constrainSize(t,l.w,l.h,i,a));if(t.constraints)for(const s of t.constraints)s.constrainSize&&(l=s.constrainSize(t,l.w,l.h,i,a));return l}function md({top:e,left:t,width:n,height:r}){const i=`translate(${t}px,${e}px)`;return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:`${n}px`,height:`${r}px`,position:"absolute"}}function Qy({top:e,left:t,width:n,height:r}){return{top:`${e}px`,left:`${t}px`,width:`${n}px`,height:`${r}px`,position:"absolute"}}function Hp(e){return e*100+"%"}function qN(e,t,n,r){return e+n>r?t:n}function Zy(e,t,n){return e<0?t:n}function YN(e){return Math.max(0,e)}function rs(e){return Math.max(0,e)}var gd=(e,t,n)=>{const{left:r,height:i,width:a}=t,l=e.top-(i-e.height);return{left:r,width:a,height:Zy(l,e.height,i),top:rs(l)}},yd=(e,t,n)=>{const{top:r,left:i,height:a,width:l}=t;return{top:r,height:a,width:qN(e.left,e.width,l,n),left:YN(i)}},xd=(e,t,n)=>{const{top:r,height:i,width:a}=t,l=e.left+e.width-a;return l<0?{height:i,width:e.left+e.width,top:rs(r),left:0}:{height:i,width:a,top:rs(r),left:l}},vd=(e,t,n)=>{const{top:r,left:i,height:a,width:l}=t;return{width:l,left:i,height:Zy(r,e.height,a),top:rs(r)}},XN=(e,t,n)=>gd(e,yd(e,t,n)),KN=(e,t,n)=>gd(e,xd(e,t)),QN=(e,t,n)=>vd(e,yd(e,t,n)),ZN=(e,t,n)=>vd(e,xd(e,t)),JN={n:gd,ne:XN,e:yd,se:QN,s:vd,sw:ZN,w:xd,nw:KN};function eT(e,t,n,r){const i=JN[e];return i?i(t,{...t,...n},r):n}var Jy={type:"transform",scale:1,calcStyle(e){return md(e)}},tT={type:"absolute",scale:1,calcStyle(e){return Qy(e)}};function nT(e){return{type:"transform",scale:e,calcStyle(t){return md(t)},calcDragPosition(t,n,r,i){return{left:(t-r)/e,top:(n-i)/e}}}}var rT=Jy,iT={cols:12,rowHeight:150,margin:[10,10],containerPadding:null,maxRows:1/0},aT={enabled:!0,bounded:!1,threshold:3},lT={enabled:!0,handles:["se"]},sT={enabled:!1,defaultItem:{w:1,h:1}};function wd(e,t,n,r,i){const a=r==="x"?"w":"h";t[r]+=1;const l=e.findIndex(o=>o.i===t.i),s=i??zs(e).length>0;for(let o=l+1;o<e.length;o++){const c=e[o];if(c!==void 0&&!c.static){if(!s&&c.y>t.y+t.h)break;pd(t,c)&&wd(e,c,n+t[a],r,s)}}t[r]=n}function oT(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0),t.y=Math.min(r,t.y);t.y>0&&!_r(e,t);)t.y--;let i;for(;(i=_r(e,t))!==void 0;)wd(n,t,i.y+i.h,"y");return t.y=Math.max(t.y,0),t}function uT(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0);t.x>0&&!_r(e,t);)t.x--;let i;for(;(i=_r(e,t))!==void 0;)if(wd(r,t,i.x+i.w,"x"),t.x+t.w>n)for(t.x=n-t.w,t.y++;t.x>0&&!_r(e,t);)t.x--;return t.x=Math.max(t.x,0),t}var ex={type:"vertical",allowOverlap:!1,compact(e,t){const n=zs(e);let r=_s(n);const i=Gu(e),a=new Array(e.length);for(let l=0;l<i.length;l++){const s=i[l];if(s===void 0)continue;let o=Or(s);o.static||(o=oT(n,o,i,r),r=Math.max(r,o.y+o.h),n.push(o));const c=e.indexOf(s);a[c]=o,o.moved=!1}return a}},tx={type:"horizontal",allowOverlap:!1,compact(e,t){const n=zs(e),r=Xy(e),i=new Array(e.length);for(let a=0;a<r.length;a++){const l=r[a];if(l===void 0)continue;let s=Or(l);s.static||(s=uT(n,s,t,r),n.push(s));const o=e.indexOf(l);i[o]=s,s.moved=!1}return i}},nx={type:null,allowOverlap:!1,compact(e,t){return dr(e)}},cT={...ex,allowOverlap:!0,compact(e,t){return dr(e)}},dT={...tx,allowOverlap:!0,compact(e,t){return dr(e)}},fT={...nx,allowOverlap:!0};function Ps(e,t=!1,n=!1){let r;return t?e==="vertical"?r=cT:e==="horizontal"?r=dT:r=fT:e==="vertical"?r=ex:e==="horizontal"?r=tx:r=nx,n?{...r,preventCollision:n}:r}function rx(e){return Object.keys(e).sort((n,r)=>e[n]-e[r])}function Up(e,t){const n=rx(e);let r=n[0];if(r===void 0)throw new Error("No breakpoints defined");for(let i=1;i<n.length;i++){const a=n[i];if(a===void 0)continue;const l=e[a];t>l&&(r=a)}return r}function Wp(e,t){const n=t[e];if(n===void 0)throw new Error(`ResponsiveReactGridLayout: \`cols\` entry for breakpoint ${String(e)} is missing!`);return n}function No(e,t,n,r,i,a){const l=e[n];if(l)return dr(l);let s=e[r];const o=rx(t),c=o.slice(o.indexOf(n));for(let h=0;h<c.length;h++){const m=c[h];if(m===void 0)continue;const v=e[m];if(v){s=v;break}}const f=dr(s||[]),d=hd(f,{cols:i});return(typeof a=="object"&&a!==null?a:Ps(a)).compact(d,i)}function ol(e,t){if(Array.isArray(e))return e;const n=e,r=n[t];if(r!==void 0)return r;const i=Object.keys(n);for(const a of i){const l=n[a];if(l!==void 0)return l}return[10,10]}var ix={exports:{}},pT="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",hT=pT,mT=hT;function ax(){}function lx(){}lx.resetWarningCache=ax;var gT=function(){function e(r,i,a,l,s,o){if(o!==mT){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:lx,resetWarningCache:ax};return n.PropTypes=n,n};ix.exports=gT();var bd=ix.exports;const Ee=Sa(bd);var yT={};function qu(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]}function Vp(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function Vi(e){return typeof e=="number"&&!isNaN(e)}function Tt(e){return parseInt(e,10)}function hi(e,t,n){if(e[t])return new Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)}var To=["Moz","Webkit","O","ms"];function xT(e="transform"){var t,n;if(typeof window>"u")return"";const r=(n=(t=window.document)==null?void 0:t.documentElement)==null?void 0:n.style;if(!r||e in r)return"";for(let i=0;i<To.length;i++)if(sx(e,To[i])in r)return To[i];return""}function sx(e,t){return t?`${t}${vT(e)}`:e}function vT(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):e[r]==="-"?n=!0:t+=e[r];return t}var wT=xT(),_o="";function bT(e,t){var n;_o||(_o=(n=qu(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(i){return Vp(e[i])}))!=null?n:"");const r=e[_o];return Vp(r)?!!r.call(e,t):!1}function Gp(e,t,n){let r=e;do{if(bT(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1}function zo(e,t,n,r){if(!e)return;const i={capture:!0,...r},a=n;e.addEventListener?e.addEventListener(t,a,i):e.attachEvent?e.attachEvent("on"+t,a):e["on"+t]=a}function xr(e,t,n,r){if(!e)return;const i={capture:!0,...r},a=n;e.removeEventListener?e.removeEventListener(t,a,i):e.detachEvent?e.detachEvent("on"+t,a):e["on"+t]=null}function kT(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=Tt(n.borderTopWidth),t+=Tt(n.borderBottomWidth),t}function ST(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=Tt(n.borderLeftWidth),t+=Tt(n.borderRightWidth),t}function ET(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=Tt(n.paddingTop),t-=Tt(n.paddingBottom),t}function jT(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=Tt(n.paddingLeft),t-=Tt(n.paddingRight),t}function CT(e,t,n){const i=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),a=(e.clientX+t.scrollLeft-i.left)/n,l=(e.clientY+t.scrollTop-i.top)/n;return{x:a,y:l}}function NT(e,t){const n=ox(e,t,"px");return{[sx("transform",wT)]:n}}function TT(e,t){return ox(e,t,"")}function ox({x:e,y:t},n,r){let i=`translate(${e}${r},${t}${r})`;if(n){const a=`${typeof n.x=="string"?n.x:n.x+r}`,l=`${typeof n.y=="string"?n.y:n.y+r}`;i=`translate(${a}, ${l})`+i}return i}function _T(e,t){return e.targetTouches&&qu(e.targetTouches,n=>t===n.identifier)||e.changedTouches&&qu(e.changedTouches,n=>t===n.identifier)}function zT(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function PT(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
90
90
  `,t.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
91
- `,e.getElementsByTagName("head")[0].appendChild(t)),e.body&&zT(e.body,"react-draggable-transparent-selection")}function Gp(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{qp(e)}):qp(e)}function qp(e){if(e)try{e.body&&PT(e.body,"react-draggable-transparent-selection");const t=e.selection;if(t)t.empty();else{const n=(e.defaultView||window).getSelection();n&&n.type!=="Caret"&&n.removeAllRanges()}}catch{}}function zT(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function PT(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}function RT(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r=="string"?r:DT(r);const i=bd(e);if(typeof r=="string"){const{ownerDocument:l}=i,a=l.defaultView;if(!a)throw new Error("Cannot resolve the owner window of the draggable node.");let s;if(r==="parent"?s=i.parentNode:s=i.getRootNode().querySelector(r),!(s instanceof a.HTMLElement))throw new Error('Bounds selector "'+r+'" could not find an element.');const o=s,c=a.getComputedStyle(i),f=a.getComputedStyle(o);r={left:-i.offsetLeft+Tt(f.paddingLeft)+Tt(c.marginLeft),top:-i.offsetTop+Tt(f.paddingTop)+Tt(c.marginTop),right:ST(o)-bT(i)-i.offsetLeft+Tt(f.paddingRight)-Tt(c.marginRight),bottom:kT(o)-wT(i)-i.offsetTop+Tt(f.paddingBottom)-Tt(c.marginBottom)}}return Vi(r.right)&&(t=Math.min(t,r.right)),Vi(r.bottom)&&(n=Math.min(n,r.bottom)),Vi(r.left)&&(t=Math.max(t,r.left)),Vi(r.top)&&(n=Math.max(n,r.top)),[t,n]}function Yp(e,t,n){const r=Math.round(t/e[0])*e[0],i=Math.round(n/e[1])*e[1];return[r,i]}function IT(e){return e.props.axis==="both"||e.props.axis==="x"}function AT(e){return e.props.axis==="both"||e.props.axis==="y"}function Po(e,t,n){const r=typeof t=="number"?NT(e,t):null;if(typeof t=="number"&&!r)return null;const i=bd(n),l=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return ET(r||e,l,n.props.scale)}function Ro(e,t,n){const r=!Vi(e.lastX),i=bd(e);return r?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:i,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}}function Io(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function DT(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function bd(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}function En(...e){mT.DRAGGABLE_DEBUG&&console.log(...e)}var dn={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},qn=dn.mouse,gr=class extends S.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&(typeof e.button=="number"&&e.button!==0||e.ctrlKey))return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!Vp(e.target,this.props.handle,t)||this.props.cancel&&Vp(e.target,this.props.cancel,t))return;e.type==="touchstart"&&!this.props.allowMobileScroll&&e.preventDefault();const r=TT(e);this.touchIdentifier=r;const i=Po(e,r,this);if(i==null)return;const{x:l,y:a}=i,s=Ro(this,l,a);En("DraggableCore: handleDragStart: %j",s),En("calling",this.props.onStart),!(this.props.onStart(e,s)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&_T(n),this.dragging=!0,this.lastX=l,this.lastY=a,zo(n,qn.move,this.handleDrag),zo(n,qn.stop,this.handleDragStop))},this.handleDrag=e=>{const t=Po(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let a=n-this.lastX,s=r-this.lastY;if([a,s]=Yp(this.props.grid,a,s),!a&&!s)return;n=this.lastX+a,r=this.lastY+s}const i=Ro(this,n,r);if(En("DraggableCore: handleDrag: %j",i),this.props.onDrag(e,i)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const a=document.createEvent("MouseEvents");a.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(a)}return}this.lastX=n,this.lastY=r},this.handleDragStop=e=>{if(!this.dragging)return;const t=Po(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let s=n-this.lastX||0,o=r-this.lastY||0;[s,o]=Yp(this.props.grid,s,o),n=this.lastX+s,r=this.lastY+o}const i=Ro(this,n,r);if(this.props.onStop(e,i)===!1||this.mounted===!1)return!1;const a=this.findDOMNode();a&&this.props.enableUserSelectHack&&Gp(a.ownerDocument),En("DraggableCore: handleDragStop: %j",i),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&(En("DraggableCore: Removing handlers"),xr(a.ownerDocument,qn.move,this.handleDrag),xr(a.ownerDocument,qn.stop,this.handleDragStop))},this.onMouseDown=e=>(qn=dn.mouse,this.handleDragStart(e)),this.onMouseUp=e=>(qn=dn.mouse,this.handleDragStop(e)),this.onTouchStart=e=>(qn=dn.touch,this.handleDragStart(e)),this.onTouchEnd=e=>(qn=dn.touch,this.handleDragStop(e))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&zo(e,dn.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;xr(t,dn.mouse.move,this.handleDrag),xr(t,dn.touch.move,this.handleDrag),xr(t,dn.mouse.stop,this.handleDragStop),xr(t,dn.touch.stop,this.handleDragStop),xr(e,dn.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&Gp(t)}}findDOMNode(){var e;if((e=this.props)!=null&&e.nodeRef)return this.props.nodeRef.current;const t=Pg;return typeof t.findDOMNode=="function"?t.findDOMNode(this):(En("react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef"),null)}render(){return S.cloneElement(S.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};gr.displayName="DraggableCore";gr.propTypes={allowAnyClick:Ee.bool,allowMobileScroll:Ee.bool,children:Ee.node.isRequired,disabled:Ee.bool,enableUserSelectHack:Ee.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Ee.arrayOf(Ee.number),handle:Ee.string,cancel:Ee.string,nodeRef:Ee.object,onStart:Ee.func,onDrag:Ee.func,onStop:Ee.func,onMouseDown:Ee.func,scale:Ee.number,className:hi,style:hi,transform:hi};gr.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var Rs=class extends S.Component{constructor(e){super(e),this.onDragStart=(t,n)=>{if(En("Draggable: onDragStart: %j",n),this.props.onStart(t,Io(this,n))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(t,n)=>{if(!this.state.dragging)return!1;En("Draggable: onDrag: %j",n);const r=Io(this,n),i={x:r.x,y:r.y,slackX:0,slackY:0};if(this.props.bounds){const{x:a,y:s}=i;i.x+=this.state.slackX,i.y+=this.state.slackY;const[o,c]=RT(this,i.x,i.y);i.x=o,i.y=c,i.slackX=this.state.slackX+(a-i.x),i.slackY=this.state.slackY+(s-i.y),r.x=i.x,r.y=i.y,r.deltaX=i.x-this.state.x,r.deltaY=i.y-this.state.y}if(this.props.onDrag(t,r)===!1)return!1;this.setState(i)},this.onDragStop=(t,n)=>{if(!this.state.dragging||this.props.onStop(t,Io(this,n))===!1)return!1;En("Draggable: onDragStop: %j",n);const i={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:a,y:s}=this.props.position;i.x=a,i.y=s}this.setState(i)},this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:e},{prevPropsPosition:t}){return e&&(!t||e.x!==t.x||e.y!==t.y)?(En("Draggable: getDerivedStateFromProps %j",{position:e,prevPropsPosition:t}),{x:e.x,y:e.y,prevPropsPosition:{...e}}):null}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){var e;if((e=this.props)!=null&&e.nodeRef)return this.props.nodeRef.current;const t=Pg;return typeof t.findDOMNode=="function"?t.findDOMNode(this):null}render(){const{axis:e,bounds:t,children:n,defaultPosition:r,defaultClassName:i,defaultClassNameDragging:l,defaultClassNameDragged:a,position:s,positionOffset:o,scale:c,...f}=this.props;let d={},p=null;const m=!!!s||this.state.dragging,v=s||r,w={x:IT(this)&&m?this.state.x:v.x,y:AT(this)&&m?this.state.y:v.y};this.state.isElementSVG?p=CT(w,o):d=jT(w,o);const g=S.Children.only(n),x=Ti(g.props.className||"",i,{[l]:this.state.dragging,[a]:this.state.dragged});return S.createElement(gr,{...f,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},S.cloneElement(g,{className:x,style:{...g.props.style,...d},transform:p}))}};Rs.displayName="Draggable";Rs.propTypes={...gr.propTypes,axis:Ee.oneOf(["both","x","y","none"]),bounds:Ee.oneOfType([Ee.shape({left:Ee.number,right:Ee.number,top:Ee.number,bottom:Ee.number}),Ee.string,Ee.oneOf([!1])]),defaultClassName:Ee.string,defaultClassNameDragging:Ee.string,defaultClassNameDragged:Ee.string,defaultPosition:Ee.shape({x:Ee.number,y:Ee.number}),positionOffset:Ee.shape({x:Ee.oneOfType([Ee.number,Ee.string]),y:Ee.oneOfType([Ee.number,Ee.string])}),position:Ee.shape({x:Ee.number,y:Ee.number}),className:hi,style:hi,transform:hi};Rs.defaultProps={...gr.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1};var LT=Rs;const OT=Object.freeze(Object.defineProperty({__proto__:null,DraggableCore:gr,default:LT},Symbol.toStringTag,{value:"Module"}));var kd={exports:{}},Rl={};const FT=_x(OT);var Sd={};Sd.__esModule=!0;Sd.cloneElement=WT;var MT=$T(S);function $T(e){return e&&e.__esModule?e:{default:e}}function Xp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Kp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xp(Object(n),!0).forEach(function(r){BT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BT(e,t,n){return(t=HT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HT(e){var t=UT(e,"string");return typeof t=="symbol"?t:t+""}function UT(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function WT(e,t){return t.style&&e.props.style&&(t.style=Kp(Kp({},e.props.style),t.style)),t.className&&e.props.className&&(t.className=e.props.className+" "+t.className),MT.default.cloneElement(e,t)}var Il={};Il.__esModule=!0;Il.resizableProps=void 0;var Se=VT(wd);function VT(e){return e&&e.__esModule?e:{default:e}}Il.resizableProps={axis:Se.default.oneOf(["both","x","y","none"]),className:Se.default.string,children:Se.default.element.isRequired,draggableOpts:Se.default.shape({allowAnyClick:Se.default.bool,cancel:Se.default.string,children:Se.default.node,disabled:Se.default.bool,enableUserSelectHack:Se.default.bool,offsetParent:typeof Element<"u"?Se.default.instanceOf(Element):Se.default.any,grid:Se.default.arrayOf(Se.default.number),handle:Se.default.string,nodeRef:Se.default.object,onStart:Se.default.func,onDrag:Se.default.func,onStop:Se.default.func,onMouseDown:Se.default.func,scale:Se.default.number}),height:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0];return r.axis==="both"||r.axis==="y"?Se.default.number.isRequired(...t):Se.default.number(...t)},handle:Se.default.oneOfType([Se.default.node,Se.default.func]),handleSize:Se.default.arrayOf(Se.default.number),lockAspectRatio:Se.default.bool,maxConstraints:Se.default.arrayOf(Se.default.number),minConstraints:Se.default.arrayOf(Se.default.number),onResizeStop:Se.default.func,onResizeStart:Se.default.func,onResize:Se.default.func,resizeHandles:Se.default.arrayOf(Se.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:Se.default.number,width:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0];return r.axis==="both"||r.axis==="x"?Se.default.number.isRequired(...t):Se.default.number(...t)}};Rl.__esModule=!0;Rl.default=void 0;var Ur=sx(S),GT=FT,qT=Sd,YT=Il;const XT=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function sx(e,t){if(typeof WeakMap=="function")var n=new WeakMap,r=new WeakMap;return(sx=function(i,l){if(!l&&i&&i.__esModule)return i;var a,s,o={__proto__:null,default:i};if(i===null||typeof i!="object"&&typeof i!="function")return o;if(a=l?r:n){if(a.has(i))return a.get(i);a.set(i,o)}for(const c in i)c!=="default"&&{}.hasOwnProperty.call(i,c)&&((s=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,c))&&(s.get||s.set)?a(o,c,s):o[c]=i[c]);return o})(e,t)}function qu(){return qu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qu.apply(null,arguments)}function KT(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Qp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ao(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qp(Object(n),!0).forEach(function(r){QT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QT(e,t,n){return(t=ZT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZT(e){var t=JT(e,"string");return typeof t=="symbol"?t:t+""}function JT(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}let Ed=class extends Ur.Component{constructor(){super(...arguments),this.handleRefs={},this.lastHandleRect=null,this.slack=null,this.lastSize=null}componentWillUnmount(){this.resetData()}resetData(){this.lastHandleRect=this.slack=this.lastSize=null}runConstraints(t,n){const r=this.props,i=r.minConstraints,l=r.maxConstraints,a=r.lockAspectRatio;if(!i&&!l&&!a)return[t,n];if(a){const p=this.props.width/this.props.height,h=t-this.props.width,m=n-this.props.height;Math.abs(h)>Math.abs(m*p)?n=t/p:t=n*p}const s=t,o=n;let c=this.slack||[0,0],f=c[0],d=c[1];return t+=f,n+=d,i&&(t=Math.max(i[0],t),n=Math.max(i[1],n)),l&&(t=Math.min(l[0],t),n=Math.min(l[1],n)),this.slack=[f+(s-t),d+(o-n)],[t,n]}resizeHandler(t,n){return(r,i)=>{var l,a,s,o;let c=i.node,f=i.deltaX,d=i.deltaY;t==="onResizeStart"&&this.resetData();const p=(this.props.axis==="both"||this.props.axis==="x")&&n!=="n"&&n!=="s",h=(this.props.axis==="both"||this.props.axis==="y")&&n!=="e"&&n!=="w";if(!p&&!h)return;const m=n[0],v=n[n.length-1],w=c.getBoundingClientRect();if(this.lastHandleRect!=null){if(v==="w"){const N=w.left-this.lastHandleRect.left;f+=N}if(m==="n"){const N=w.top-this.lastHandleRect.top;d+=N}}this.lastHandleRect=w,v==="w"&&(f=-f),m==="n"&&(d=-d);const g=(l=(a=this.lastSize)==null?void 0:a.width)!=null?l:this.props.width,x=(s=(o=this.lastSize)==null?void 0:o.height)!=null?s:this.props.height;let y=g+(p?f/this.props.transformScale:0),C=x+(h?d/this.props.transformScale:0);var E=this.runConstraints(y,C);if(y=E[0],C=E[1],t==="onResizeStop"&&this.lastSize){var b=this.lastSize;y=b.width,C=b.height}const T=y!==g||C!==x;t!=="onResizeStop"&&(this.lastSize={width:y,height:C});const _=typeof this.props[t]=="function"?this.props[t]:null;_&&!(t==="onResize"&&!T)&&(r.persist==null||r.persist(),_(r,{node:c,size:{width:y,height:C},handle:n})),t==="onResizeStop"&&this.resetData()}}renderResizeHandle(t,n){const r=this.props.handle;if(!r)return Ur.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+t,ref:n});if(typeof r=="function")return r(t,n);const i=typeof r.type=="string",l=Ao({ref:n},i?{}:{handleAxis:t});return Ur.cloneElement(r,l)}render(){const t=this.props,n=t.children,r=t.className,i=t.draggableOpts;t.width,t.height,t.handle,t.handleSize,t.lockAspectRatio,t.axis,t.minConstraints,t.maxConstraints,t.onResize,t.onResizeStop,t.onResizeStart;const l=t.resizeHandles;t.transformScale;const a=KT(t,XT);return(0,qT.cloneElement)(n,Ao(Ao({},a),{},{className:(r?r+" ":"")+"react-resizable",children:[...Ur.Children.toArray(n.props.children),...l.map(s=>{var o;const c=(o=this.handleRefs[s])!=null?o:this.handleRefs[s]=Ur.createRef();return Ur.createElement(GT.DraggableCore,qu({},i,{nodeRef:c,key:"resizableHandle-"+s,onStop:this.resizeHandler("onResizeStop",s),onStart:this.resizeHandler("onResizeStart",s),onDrag:this.resizeHandler("onResize",s)}),this.renderResizeHandle(s,c))})]}))}};Rl.default=Ed;Ed.propTypes=YT.resizableProps;Ed.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1};var Is={};Is.__esModule=!0;Is.default=void 0;var Do=ux(S),e_=ox(wd),t_=ox(Rl),n_=Il;const r_=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function ox(e){return e&&e.__esModule?e:{default:e}}function ux(e,t){if(typeof WeakMap=="function")var n=new WeakMap,r=new WeakMap;return(ux=function(i,l){if(!l&&i&&i.__esModule)return i;var a,s,o={__proto__:null,default:i};if(i===null||typeof i!="object"&&typeof i!="function")return o;if(a=l?r:n){if(a.has(i))return a.get(i);a.set(i,o)}for(const c in i)c!=="default"&&{}.hasOwnProperty.call(i,c)&&((s=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,c))&&(s.get||s.set)?a(o,c,s):o[c]=i[c]);return o})(e,t)}function Yu(){return Yu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yu.apply(null,arguments)}function Zp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function is(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zp(Object(n),!0).forEach(function(r){i_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function i_(e,t,n){return(t=l_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l_(e){var t=a_(e,"string");return typeof t=="symbol"?t:t+""}function a_(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function s_(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}class cx extends Do.Component{constructor(){super(...arguments),this.state={width:this.props.width,height:this.props.height,propsWidth:this.props.width,propsHeight:this.props.height},this.onResize=(t,n)=>{const r=n.size;this.props.onResize?(t.persist==null||t.persist(),this.setState(r,()=>this.props.onResize&&this.props.onResize(t,n))):this.setState(r)}}static getDerivedStateFromProps(t,n){return n.propsWidth!==t.width||n.propsHeight!==t.height?{width:t.width,height:t.height,propsWidth:t.width,propsHeight:t.height}:null}render(){const t=this.props,n=t.handle,r=t.handleSize;t.onResize;const i=t.onResizeStart,l=t.onResizeStop,a=t.draggableOpts,s=t.minConstraints,o=t.maxConstraints,c=t.lockAspectRatio,f=t.axis;t.width,t.height;const d=t.resizeHandles,p=t.style,h=t.transformScale,m=s_(t,r_);return Do.createElement(t_.default,{axis:f,draggableOpts:a,handle:n,handleSize:r,height:this.state.height,lockAspectRatio:c,maxConstraints:o,minConstraints:s,onResizeStart:i,onResize:this.onResize,onResizeStop:l,resizeHandles:d,transformScale:h,width:this.state.width},Do.createElement("div",Yu({},m,{style:is(is({},p),{},{width:this.state.width+"px",height:this.state.height+"px"})})))}}Is.default=cx;cx.propTypes=is(is({},n_.resizableProps),{},{children:e_.default.element});kd.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")};var o_=kd.exports.Resizable=Rl.default;kd.exports.ResizableBox=Is.default;function dx(e){return function(n,r,i,l,a,s,o){return e(n,r,o)}}function As(e){return function(n,r,i,l){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i,l);var a=l.get(n),s=l.get(r);if(a&&s)return a===r&&s===n;l.set(n,r),l.set(r,n);var o=e(n,r,i,l);return l.delete(n),l.delete(r),o}}function fx(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function Jp(e){return e.constructor===Object||e.constructor==null}function eh(e){return typeof e.then=="function"}function Ds(e,t){return e===t||e!==e&&t!==t}var u_="[object Arguments]",c_="[object Boolean]",d_="[object Date]",f_="[object RegExp]",p_="[object Map]",h_="[object Number]",m_="[object Object]",g_="[object Set]",y_="[object String]",th=Object.prototype.toString;function Ls(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,l=e.areRegExpsEqual,a=e.areSetsEqual,s=e.createIsNestedEqual,o=s(c);function c(f,d,p){if(f===d)return!0;if(!f||!d||typeof f!="object"||typeof d!="object")return f!==f&&d!==d;if(Jp(f)&&Jp(d))return i(f,d,o,p);var h=Array.isArray(f),m=Array.isArray(d);if(h||m)return h===m&&t(f,d,o,p);var v=th.call(f);return v!==th.call(d)?!1:v===d_?n(f,d,o,p):v===f_?l(f,d,o,p):v===p_?r(f,d,o,p):v===g_?a(f,d,o,p):v===m_||v===u_?eh(f)||eh(d)?!1:i(f,d,o,p):v===c_||v===h_||v===y_?Ds(f.valueOf(),d.valueOf()):!1}return c}function px(e,t,n,r){var i=e.length;if(t.length!==i)return!1;for(;i-- >0;)if(!n(e[i],t[i],i,i,e,t,r))return!1;return!0}var x_=As(px);function hx(e,t){return Ds(e.valueOf(),t.valueOf())}function mx(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var l={},a=0;return e.forEach(function(s,o){if(i){var c=!1,f=0;t.forEach(function(d,p){!c&&!l[f]&&(c=n(o,p,a,f,e,t,r)&&n(s,d,o,p,e,t,r))&&(l[f]=!0),f++}),a++,i=c}}),i}var v_=As(mx),w_="_owner",b_=Object.prototype.hasOwnProperty;function gx(e,t,n,r){var i=Object.keys(e),l=i.length;if(Object.keys(t).length!==l)return!1;for(var a;l-- >0;){if(a=i[l],a===w_){var s=!!e.$$typeof,o=!!t.$$typeof;if((s||o)&&s!==o)return!1}if(!b_.call(t,a)||!n(e[a],t[a],a,a,e,t,r))return!1}return!0}var k_=As(gx);function yx(e,t){return e.source===t.source&&e.flags===t.flags}function xx(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var l={};return e.forEach(function(a,s){if(i){var o=!1,c=0;t.forEach(function(f,d){!o&&!l[c]&&(o=n(a,f,s,d,e,t,r))&&(l[c]=!0),c++}),i=o}}),i}var S_=As(xx),vx=Object.freeze({areArraysEqual:px,areDatesEqual:hx,areMapsEqual:mx,areObjectsEqual:gx,areRegExpsEqual:yx,areSetsEqual:xx,createIsNestedEqual:dx}),wx=Object.freeze({areArraysEqual:x_,areDatesEqual:hx,areMapsEqual:v_,areObjectsEqual:k_,areRegExpsEqual:yx,areSetsEqual:S_,createIsNestedEqual:dx}),E_=Ls(vx);function An(e,t){return E_(e,t,void 0)}Ls(fx(vx,{createIsNestedEqual:function(){return Ds}}));Ls(wx);Ls(fx(wx,{createIsNestedEqual:function(){return Ds}}));function nh(e){const{children:t,cols:n,containerWidth:r,margin:i,containerPadding:l,rowHeight:a,maxRows:s,isDraggable:o,isResizable:c,isBounded:f,static:d,useCSSTransforms:p=!0,usePercentages:h=!1,transformScale:m=1,positionStrategy:v,dragThreshold:w=0,droppingPosition:g,className:x="",style:y,handle:C="",cancel:E="",x:b,y:T,w:_,h:R,minW:N=1,maxW:M=1/0,minH:$=1,maxH:L=1/0,i:B,resizeHandles:I,resizeHandle:J,constraints:le=Yy,layoutItem:A,layout:q=[],onDragStart:k,onDrag:Q,onDragStop:ae,onResizeStart:j,onResize:oe,onResizeStop:ve}=e,[ne,re]=S.useState(!1),[we,ce]=S.useState(!1),ze=S.useRef(null),Y=S.useRef({left:0,top:0}),_e=S.useRef({top:0,left:0,width:0,height:0}),fe=S.useRef(void 0),pt=S.useRef(q);pt.current=q;const rt=S.useRef(null),Fe=S.useRef(null),Le=S.useRef(!1),Ft=S.useRef({x:0,y:0}),De=S.useRef(!1),je=S.useMemo(()=>({cols:n,containerPadding:l,containerWidth:r,margin:i,maxRows:s,rowHeight:a}),[n,l,r,i,s,a]),qe=S.useMemo(()=>({cols:n,maxRows:s,containerWidth:r,containerHeight:0,rowHeight:a,margin:i,layout:[]}),[n,s,r,a,i]),Ke=S.useCallback(()=>({...qe,layout:pt.current}),[qe]),it=S.useMemo(()=>A??{i:B,x:b,y:T,w:_,h:R,minW:N,maxW:M,minH:$,maxH:L},[A,B,b,T,_,R,N,M,$,L]),un=S.useCallback(U=>{if(v!=null&&v.calcStyle)return v.calcStyle(U);if(p)return hd(U);const K=Xy(U);return h?{...K,left:Bp(U.left/r),width:Bp(U.width/r)}:K},[v,p,h,r]),ht=S.useCallback((U,{node:K})=>{if(!k)return;const{offsetParent:se}=K;if(!se)return;const Te=se.getBoundingClientRect(),Re=K.getBoundingClientRect(),Me=Re.left/m,at=Te.left/m,ut=Re.top/m,P=Te.top/m;let Z;if(v!=null&&v.calcDragPosition){const he=U;Z=v.calcDragPosition(he.clientX,he.clientY,he.clientX-Re.left,he.clientY-Re.top)}else Z={left:Me-at+se.scrollLeft,top:ut-P+se.scrollTop};if(Y.current=Z,w>0){const he=U;Ft.current={x:he.clientX,y:he.clientY},Le.current=!0,De.current=!1,re(!0);return}re(!0);const de=aa(je,Z.top,Z.left),{x:ye,y:X}=sa(le,it,de.x,de.y,Ke());k(B,ye,X,{e:U,node:K,newPosition:Z})},[k,m,je,v,w,le,it,Ke,B]),z=S.useCallback((U,{node:K,deltaX:se,deltaY:Te})=>{if(!Q||!ne)return;const Re=U;if(Le.current&&!De.current){const ye=Re.clientX-Ft.current.x,X=Re.clientY-Ft.current.y;if(Math.hypot(ye,X)<w)return;if(De.current=!0,Le.current=!1,k){const ie=aa(je,Y.current.top,Y.current.left),{x:xe,y:ge}=sa(le,it,ie.x,ie.y,Ke());k(B,xe,ge,{e:U,node:K,newPosition:Y.current})}}let Me=Y.current.top+Te,at=Y.current.left+se;if(f){const{offsetParent:ye}=K;if(ye){const X=ye.clientHeight-Sn(R,a,i[1]);Me=ns(Me,0,X);const he=Lr(je),ie=r-Sn(_,he,i[0]);at=ns(at,0,ie)}}const ut={top:Me,left:at};Y.current=ut;const P=aa(je,Me,at),{x:Z,y:de}=sa(le,it,P.x,P.y,Ke());Q(B,Z,de,{e:U,node:K,newPosition:ut})},[Q,k,ne,w,f,R,a,i,je,r,_,B,le,it,Ke]),F=S.useCallback((U,{node:K})=>{if(!ae||!ne)return;const se=Le.current;if(Le.current=!1,De.current=!1,Ft.current={x:0,y:0},se){re(!1),Y.current={left:0,top:0};return}const{left:Te,top:Re}=Y.current,Me={top:Re,left:Te};re(!1),Y.current={left:0,top:0};const at=aa(je,Re,Te),{x:ut,y:P}=sa(le,it,at.x,at.y,Ke());ae(B,ut,P,{e:U,node:K,newPosition:Me})},[ae,ne,je,le,it,Ke,B]);rt.current=ht,Fe.current=z;const te=S.useCallback((U,{node:K,size:se,handle:Te},Re,Me)=>{const at=Me==="onResizeStart"?j:Me==="onResize"?oe:ve;if(!at)return;let ut;K?ut=ZN(Te,Re,se,r):ut={...se,top:Re.top,left:Re.left},_e.current=ut;const P=FN(je,ut.width,ut.height),{w:Z,h:de}=WN(le,it,P.w,P.h,Te,Ke());at(B,Z,de,{e:U.nativeEvent,node:K,size:ut,handle:Te})},[j,oe,ve,r,je,B,le,it,Ke]),pe=S.useCallback((U,K)=>{ce(!0);const se=la(je,b,T,_,R),Te={...K,handle:K.handle};te(U,Te,se,"onResizeStart")},[te,je,b,T,_,R]),me=S.useCallback((U,K)=>{const se=la(je,b,T,_,R),Te={...K,handle:K.handle};te(U,Te,se,"onResize")},[te,je,b,T,_,R]),Ae=S.useCallback((U,K)=>{ce(!1),_e.current={top:0,left:0,width:0,height:0};const se=la(je,b,T,_,R),Te={...K,handle:K.handle};te(U,Te,se,"onResizeStop")},[te,je,b,T,_,R]);S.useEffect(()=>{var Te,Re;if(!g)return;const U=ze.current;if(!U)return;const K=fe.current||{left:0,top:0},se=ne&&(g.left!==K.left||g.top!==K.top);if(ne){if(se){const Me=g.left-Y.current.left,at=g.top-Y.current.top,ut={node:U,deltaX:Me,deltaY:at,lastX:Y.current.left,lastY:Y.current.top,x:g.left,y:g.top};(Re=Fe.current)==null||Re.call(Fe,g.e,ut)}}else{const Me={node:U,deltaX:g.left,deltaY:g.top,lastX:0,lastY:0,x:g.left,y:g.top};(Te=rt.current)==null||Te.call(rt,g.e,Me)}fe.current=g},[g,ne,B]);const Qe=la(je,b,T,_,R,ne?Y.current:null,we?_e.current:null),ot=xn.Children.only(t),bt=Lr(je),mt=[Sn(N,bt,i[0]),Sn($,a,i[1])],Ze=[Sn(M,bt,i[0]),Sn(L,a,i[1])],We=ot.props,xt=We.className,O=We.style;let W=xn.cloneElement(ot,{ref:ze,className:Ti("react-grid-item",xt,x,{static:d,resizing:we,"react-draggable":o,"react-draggable-dragging":ne,dropping:!!g,cssTransforms:p}),style:{...y,...O,...un(Qe)}});const G=J;return W=u.jsx(o_,{draggableOpts:{disabled:!c},className:c?void 0:"react-resizable-hide",width:Qe.width,height:Qe.height,minConstraints:mt,maxConstraints:Ze,onResizeStart:pe,onResize:me,onResizeStop:Ae,transformScale:m,resizeHandles:I,handle:G,children:W}),W=u.jsx(gr,{disabled:!o,onStart:ht,onDrag:z,onStop:F,handle:C,cancel:".react-resizable-handle"+(E?","+E:""),scale:m,nodeRef:ze,children:W}),W}var Pn=()=>{},rh="react-grid-layout",bx=!1;try{bx=/firefox/i.test(navigator.userAgent)}catch{}function j_(e,t){const n=xn.Children.toArray(e),r=xn.Children.toArray(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){const l=n[i],a=r[i];if((l==null?void 0:l.key)!==(a==null?void 0:a.key))return!1}return!0}function ih(e,t,n,r){const i=[],l=new Set;xn.Children.forEach(t,s=>{if(!xn.isValidElement(s)||s.key===null)return;const o=String(s.key);l.add(o);const c=e.find(f=>f.i===o);if(c)i.push(Or(c));else{const d=s.props["data-grid"];d?i.push({i:o,x:d.x??0,y:d.y??0,w:d.w??1,h:d.h??1,minW:d.minW,maxW:d.maxW,minH:d.minH,maxH:d.maxH,static:d.static,isDraggable:d.isDraggable,isResizable:d.isResizable,resizeHandles:d.resizeHandles,isBounded:d.isBounded}):i.push({i:o,x:0,y:_s(i),w:1,h:1})}});const a=pd(i,{cols:n});return r.compact(a,n)}function C_(e){const{children:t,width:n,gridConfig:r,dragConfig:i,resizeConfig:l,dropConfig:a,positionStrategy:s=tT,compactor:o,constraints:c=Yy,layout:f=[],droppingItem:d,autoSize:p=!0,className:h="",style:m={},innerRef:v,onLayoutChange:w=Pn,onDragStart:g=Pn,onDrag:x=Pn,onDragStop:y=Pn,onResizeStart:C=Pn,onResize:E=Pn,onResizeStop:b=Pn,onDrop:T=Pn,onDropDragOver:_=Pn}=e,R=S.useMemo(()=>({...nT,...r}),[r]),N=S.useMemo(()=>({...rT,...i}),[i]),M=S.useMemo(()=>({...iT,...l}),[l]),$=S.useMemo(()=>({...lT,...a}),[a]),{cols:L,rowHeight:B,maxRows:I,margin:J,containerPadding:le}=R,{enabled:A,bounded:q,handle:k,cancel:Q,threshold:ae}=N,{enabled:j,handles:oe,handleComponent:ve}=M,{enabled:ne,defaultItem:re,onDragOver:we}=$,ce=o??Ps("vertical"),ze=ce.type,Y=ce.allowOverlap,_e=ce.preventCollision??!1,fe=S.useMemo(()=>d??{i:"__dropping-elem__",...re},[d,re]),pt=s.type==="transform",rt=s.scale,Fe=le??J,[Le,Ft]=S.useState(!1),[De,je]=S.useState(()=>ih(f,t,L,ce)),[qe,Ke]=S.useState(null),[it,un]=S.useState(!1),[ht,z]=S.useState(null),[F,te]=S.useState(),pe=S.useRef(null),me=S.useRef(null),Ae=S.useRef(null),Qe=S.useRef(0),ot=S.useRef(De),bt=S.useRef(f),mt=S.useRef(t),Ze=S.useRef(ze),We=S.useRef(De);We.current=De,S.useEffect(()=>{Ft(!0),An(De,f)||w(De)},[]),S.useEffect(()=>{if(qe||ht)return;const X=!An(f,bt.current),he=!j_(t,mt.current),ie=ze!==Ze.current;if(X||he||ie){const ge=ih(X?f:De,t,L,ce);An(ge,De)||je(ge)}bt.current=f,mt.current=t,Ze.current=ze},[f,t,L,ze,ce,qe,ht,De]),S.useEffect(()=>{if(!qe&&!An(De,ot.current)){ot.current=De;const X=De.filter(he=>he.i!==fe.i);w(X)}},[De,qe,w,fe.i]);const xt=S.useMemo(()=>{if(!p)return;const X=_s(De),he=Fe[1];return X*B+(X-1)*J[1]+he*2+"px"},[p,De,B,J,Fe]),O=S.useCallback((X,he,ie,xe)=>{const ge=We.current,be=br(ge,X);if(!be)return;const Be={w:be.w,h:be.h,x:be.x,y:be.y,i:X};pe.current=Or(be),Ae.current=ge,Ke(Be),g(ge,be,be,null,xe.e,xe.node)},[g]),W=S.useCallback((X,he,ie,xe)=>{const ge=We.current,be=pe.current,Be=br(ge,X);if(!Be)return;const ct={w:Be.w,h:Be.h,x:Be.x,y:Be.y,i:X},Ye=Cr(ge,Be,he,ie,!0,_e,ze,L,Y);x(Ye,be,Be,ct,xe.e,xe.node),je(ce.compact(Ye,L)),Ke(ct)},[_e,ze,L,Y,ce,x]),G=S.useCallback((X,he,ie,xe)=>{if(!qe)return;const ge=We.current,be=pe.current,Be=br(ge,X);if(!Be)return;const ct=Cr(ge,Be,he,ie,!0,_e,ze,L,Y),Ye=ce.compact(ct,L);y(Ye,be,Be,null,xe.e,xe.node);const jt=Ae.current;pe.current=null,Ae.current=null,Ke(null),je(Ye),jt&&!An(jt,Ye)&&w(Ye)},[qe,_e,ze,L,Y,ce,y,w]),U=S.useCallback((X,he,ie,xe)=>{const ge=We.current,be=br(ge,X);be&&(me.current=Or(be),Ae.current=ge,un(!0),C(ge,be,be,null,xe.e,xe.node))},[C]),K=S.useCallback((X,he,ie,xe)=>{const ge=We.current,be=me.current,{handle:Be}=xe;let ct=!1,Ye,jt;const[Al,zn]=BN(ge,X,Je=>(Ye=Je.x,jt=Je.y,["sw","w","nw","n","ne"].includes(Be)&&(["sw","nw","w"].includes(Be)&&(Ye=Je.x+(Je.w-he),he=Je.x!==Ye&&Ye<0?Je.w:he,Ye=Ye<0?0:Ye),["ne","n","nw"].includes(Be)&&(jt=Je.y+(Je.h-ie),ie=Je.y!==jt&&jt<0?Je.h:ie,jt=jt<0?0:jt),ct=!0),_e&&!Y&&Gy(ge,{...Je,w:he,h:ie,x:Ye??Je.x,y:jt??Je.y}).filter(Ll=>Ll.i!==Je.i).length>0&&(jt=Je.y,ie=Je.h,Ye=Je.x,he=Je.w,ct=!1),Je.w=he,Je.h=ie,Je));if(!zn)return;let _i=Al;ct&&Ye!==void 0&&jt!==void 0&&(_i=Cr(Al,zn,Ye,jt,!0,_e,ze,L,Y));const Dl={w:zn.w,h:zn.h,x:zn.x,y:zn.y,i:X,static:!0};E(_i,be,zn,Dl,xe.e,xe.node),je(ce.compact(_i,L)),Ke(Dl)},[_e,ze,L,Y,ce,E]),se=S.useCallback((X,he,ie,xe)=>{const ge=We.current,be=me.current,Be=br(ge,X),ct=ce.compact(ge,L);b(ct,be,Be??null,null,xe.e,xe.node);const Ye=Ae.current;me.current=null,Ae.current=null,Ke(null),un(!1),je(ct),Ye&&!An(Ye,ct)&&w(ct)},[L,ce,b,w]),Te=S.useCallback(()=>{const X=We.current;if(!X.some(xe=>xe.i===fe.i)){z(null),Ke(null),te(void 0);return}const ie=ce.compact(X.filter(xe=>xe.i!==fe.i),L);je(ie),z(null),Ke(null),te(void 0)},[fe.i,L,ce]),Re=S.useCallback(X=>{var Nd;if(X.preventDefault(),X.stopPropagation(),bx&&!((Nd=X.nativeEvent.target)!=null&&Nd.classList.contains(rh)))return!1;const he=we?we(X.nativeEvent):_(X);if(he===!1)return ht&&Te(),!1;const{dragOffsetX:ie=0,dragOffsetY:xe=0,...ge}=he??{},be={...fe,...ge},Be=X.currentTarget.getBoundingClientRect(),ct={cols:L,margin:J,maxRows:I,rowHeight:B,containerWidth:n,containerPadding:Fe},Ye=Lr(ct),jt=Sn(be.w,Ye,J[0]),Al=Sn(be.h,B,J[1]),zn=jt/2,_i=Al/2,Dl=X.clientX-Be.left+ie-zn,Je=X.clientY-Be.top+xe-_i,Os=Math.max(0,Dl),Ll=Math.max(0,Je),Ol={left:Os/rt,top:Ll/rt,e:X.nativeEvent};if(ht)F&&(F.left!==Ol.left||F.top!==Ol.top)&&te(Ol);else{const Fs=ON(ct,Ll,Os,be.w,be.h);z(u.jsx("div",{},be.i)),te(Ol);const Nx=We.current.filter(Tx=>Tx.i!==be.i);je([...Nx,{...be,x:Fs.x,y:Fs.y,static:!1,isDraggable:!0}])}},[ht,F,fe,we,_,Te,rt,L,J,I,B,n,Fe]),Me=S.useCallback(X=>{X.preventDefault(),X.stopPropagation(),Qe.current--,Qe.current<0&&(Qe.current=0),Qe.current===0&&Te()},[Te]),at=S.useCallback(X=>{X.preventDefault(),X.stopPropagation(),Qe.current++},[]),ut=S.useCallback(X=>{X.preventDefault(),X.stopPropagation();const he=We.current,ie=he.find(xe=>xe.i===fe.i);Qe.current=0,Te(),T(he,ie,X.nativeEvent)},[fe.i,Te,T]),P=S.useCallback((X,he)=>{if(!X||!X.key)return null;const ie=br(De,String(X.key));if(!ie)return null;const xe=typeof ie.isDraggable=="boolean"?ie.isDraggable:!ie.static&&A,ge=typeof ie.isResizable=="boolean"?ie.isResizable:!ie.static&&j,be=ie.resizeHandles||[...oe],Be=xe&&q&&ie.isBounded!==!1,ct=ve;return u.jsx(nh,{containerWidth:n,cols:L,margin:J,containerPadding:Fe,maxRows:I,rowHeight:B,cancel:Q,handle:k,onDragStart:O,onDrag:W,onDragStop:G,onResizeStart:U,onResize:K,onResizeStop:se,isDraggable:xe,isResizable:ge,isBounded:Be,useCSSTransforms:pt&&Le,usePercentages:!Le,transformScale:rt,positionStrategy:s,dragThreshold:ae,w:ie.w,h:ie.h,x:ie.x,y:ie.y,i:ie.i,minH:ie.minH,minW:ie.minW,maxH:ie.maxH,maxW:ie.maxW,static:ie.static,droppingPosition:he?F:void 0,resizeHandles:be,resizeHandle:ct,constraints:c,layoutItem:ie,layout:De,children:X},ie.i)},[De,n,L,J,Fe,I,B,Q,k,O,W,G,U,K,se,A,j,q,pt,Le,rt,s,ae,F,oe,ve,c]),Z=()=>qe?u.jsx(nh,{w:qe.w,h:qe.h,x:qe.x,y:qe.y,i:qe.i,className:`react-grid-placeholder ${it?"placeholder-resizing":""}`,containerWidth:n,cols:L,margin:J,containerPadding:Fe,maxRows:I,rowHeight:B,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:pt,transformScale:rt,constraints:c,layout:De,children:u.jsx("div",{})}):null,de=Ti(rh,h),ye={height:xt,...m};return u.jsxs("div",{ref:v,className:de,style:ye,onDrop:ne?ut:void 0,onDragLeave:ne?Me:void 0,onDragEnter:ne?at:void 0,onDragOver:ne?Re:void 0,children:[xn.Children.map(t,X=>xn.isValidElement(X)?P(X):null),ne&&ht&&P(ht,!0),Z()]})}var N_={lg:1200,md:996,sm:768,xs:480,xxs:0},T_={lg:12,md:10,sm:6,xs:4,xxs:2},Lo=()=>{};function __(e,t,n,r){const i=[];xn.Children.forEach(t,a=>{if(!xn.isValidElement(a)||a.key===null)return;const s=String(a.key),o=e.find(c=>c.i===s);if(o)i.push({...o,i:s});else{const f=a.props["data-grid"];f?i.push({i:s,x:f.x??0,y:f.y??0,w:f.w??1,h:f.h??1,minW:f.minW,maxW:f.maxW,minH:f.minH,maxH:f.maxH,static:f.static,isDraggable:f.isDraggable,isResizable:f.isResizable,resizeHandles:f.resizeHandles,isBounded:f.isBounded}):i.push({i:s,x:0,y:_s(i),w:1,h:1})}});const l=pd(i,{cols:n});return r.compact(l,n)}function z_(e){const{children:t,width:n,breakpoint:r,breakpoints:i=N_,cols:l=T_,layouts:a={},rowHeight:s=150,maxRows:o=1/0,margin:c=[10,10],containerPadding:f=null,compactor:d,onBreakpointChange:p=Lo,onLayoutChange:h=Lo,onWidthChange:m=Lo,...v}=e,w=d??Ps("vertical"),g=w.type,x=w.allowOverlap,y=S.useMemo(()=>r??Hp(i,n),[]),C=S.useMemo(()=>Up(y,l),[y,l]),E=S.useMemo(()=>No(a,i,y,y,C,g),[]),[b,T]=S.useState(y),[_,R]=S.useState(C),[N,M]=S.useState(E),[$,L]=S.useState(a),B=S.useRef(n),I=S.useRef(r),J=S.useRef(i),le=S.useRef(l),A=S.useRef(a),q=S.useRef(g),k=S.useRef($);S.useEffect(()=>{k.current=$},[$]);const Q=S.useMemo(()=>An(a,A.current)?null:No(a,i,b,b,_,w),[a,i,b,_,w]),ae=Q??N;S.useEffect(()=>{Q!==null&&(M(Q),L(a),k.current=a,A.current=a)},[Q,a]),S.useEffect(()=>{if(g!==q.current){const re=w.compact(dr(ae),_),we={...k.current,[b]:re};M(re),L(we),k.current=we,h(re,we),q.current=g}},[g,w,ae,_,x,b,h]),S.useEffect(()=>{const re=n!==B.current,we=r!==I.current,ce=!An(i,J.current),ze=!An(l,le.current);if(re||we||ce||ze){const Y=r??Hp(i,n),_e=Up(Y,l),fe=b;if(fe!==Y||ce||ze){const Fe={...k.current};Fe[fe]||(Fe[fe]=dr(N));let Le=No(Fe,i,Y,fe,_e,w);Le=__(Le,t,_e,w),Fe[Y]=Le,T(Y),R(_e),M(Le),L(Fe),k.current=Fe,p(Y,_e),h(Le,Fe)}const pt=oa(c,Y),rt=f?oa(f,Y):null;m(n,pt,_e,rt),B.current=n,I.current=r,J.current=i,le.current=l}},[n,r,i,l,b,_,N,t,w,g,x,c,f,p,h,m]);const j=S.useCallback(re=>{const ce={...k.current,[b]:re};M(re),L(ce),k.current=ce,h(re,ce)},[b,h]),oe=S.useMemo(()=>oa(c,b),[c,b]),ve=S.useMemo(()=>f===null?null:oa(f,b),[f,b]),ne=S.useMemo(()=>({cols:_,rowHeight:s,maxRows:o,margin:oe,containerPadding:ve}),[_,s,o,oe,ve]);return u.jsx(C_,{...v,width:n,gridConfig:ne,compactor:w,onLayoutChange:j,layout:ae,children:t})}function kx(e){const{children:t,width:n,breakpoint:r,breakpoints:i,cols:l,layouts:a,onBreakpointChange:s,onLayoutChange:o,onWidthChange:c,rowHeight:f,maxRows:d,margin:p,containerPadding:h,droppingItem:m,compactType:v,preventCollision:w=!1,allowOverlap:g=!1,verticalCompact:x,isDraggable:y=!0,isBounded:C=!1,draggableHandle:E,draggableCancel:b,isResizable:T=!0,resizeHandles:_=["se"],resizeHandle:R,isDroppable:N=!1,useCSSTransforms:M=!0,transformScale:$=1,autoSize:L,className:B,style:I,innerRef:J,onDragStart:le,onDrag:A,onDragStop:q,onResizeStart:k,onResize:Q,onResizeStop:ae,onDrop:j,onDropDragOver:oe}=e;let ve=v===void 0?"vertical":v;x===!1&&(ve=null);const ne={enabled:y,bounded:C,handle:E,cancel:b},re={enabled:T,handles:_,handleComponent:R},we={enabled:N};let ce;M?$!==1?ce=eT($):ce=Qy:ce=JN;const ze=Ps(ve,g,w);return u.jsx(z_,{width:n,breakpoint:r,breakpoints:i,cols:l,layouts:a,rowHeight:f,maxRows:d,margin:p,containerPadding:h,compactor:ze,dragConfig:ne,resizeConfig:re,dropConfig:we,positionStrategy:ce,droppingItem:m,autoSize:L,className:B,style:I,innerRef:J,onBreakpointChange:s,onLayoutChange:o,onWidthChange:c,onDragStart:le,onDrag:A,onDragStop:q,onResizeStart:k,onResize:Q,onResizeStop:ae,onDrop:j,onDropDragOver:oe,children:t})}kx.displayName="ResponsiveReactGridLayout";var P_=kx,R_="react-grid-layout";function I_(e){function t(n){const{measureBeforeMount:r=!1,className:i,style:l,...a}=n,[s,o]=S.useState(1280),[c,f]=S.useState(!1),d=S.useRef(null),p=S.useRef(null);return S.useEffect(()=>{f(!0)},[]),S.useEffect(()=>{const h=d.current;if(!(h instanceof HTMLElement))return;let m=null;const v=new ResizeObserver(w=>{if(w[0]){const g=w[0].contentRect.width;m!==null&&cancelAnimationFrame(m),m=requestAnimationFrame(()=>{o(g),m=null})}});return v.observe(h),p.current=v,()=>{m!==null&&cancelAnimationFrame(m),v.unobserve(h),v.disconnect()}},[c]),r&&!c?u.jsx("div",{className:Ti(i,R_),style:l,ref:d}):u.jsx(e,{innerRef:d,className:i,style:l,...a,width:s})}return t.displayName=`WidthProvider(${e.displayName||e.name||"Component"})`,t}const A_=I_(P_),D_={lg:12,xxs:1},L_={lg:640,xxs:0},lh=12,Xu=20,Ea=16;function O_(e){const t=e-Xu*2-(lh-1)*Ea;return Math.max(16,t/lh)}function F_({blocks:e,layouts:t,mode:n,onLayoutChange:r,renderBlock:i,blockMeta:l,onRemove:a,onDuplicate:s,canRemove:o=()=>!0,canDuplicate:c=()=>!0}){const f=n==="layout",d=S.useRef(null),[p,h]=S.useState(46);return S.useLayoutEffect(()=>{const m=d.current;if(!m)return;const v=()=>h(O_(m.clientHeight));if(v(),typeof ResizeObserver>"u")return;const w=new ResizeObserver(v);return w.observe(m),()=>w.disconnect()},[]),u.jsx("div",{ref:d,className:`block-canvas ${f?"arranging":""}`,style:{"--row-pitch":`${p+Ea}px`},"data-testid":"block-canvas",children:u.jsx(A_,{className:"rgl",layouts:t,breakpoints:L_,cols:D_,rowHeight:p,margin:[Ea,Ea],containerPadding:[Xu,Xu],isDraggable:f,isResizable:f,draggableHandle:".block-handle",onLayoutChange:(m,v)=>r(v),compactType:"vertical",useCSSTransforms:!0,children:e.map(m=>{const v=l(m);return u.jsxs("div",{className:`block ${f?"is-arranging":""}`,"data-testid":`block-${m.type}`,"data-rgl-id":m.id,children:[u.jsxs("div",{className:`block-header ${f?"block-handle":""}`,children:[u.jsx("span",{className:"block-icon",children:v.icon}),u.jsx("span",{className:"block-title",children:v.title}),u.jsx("span",{className:"spacer"}),f&&u.jsxs("span",{className:"block-actions",children:[c(m)&&u.jsx("button",{title:"Duplicate",onClick:()=>s(m.id),"data-testid":"block-duplicate",children:"⧉"}),o(m)?u.jsx("button",{title:"Remove",onClick:()=>a(m.id),"data-testid":"block-remove",children:"✕"}):u.jsx("span",{className:"block-pin",title:"Chat is always here",children:"📌"})]})]}),u.jsx("div",{className:"block-body",children:i(m)})]},m.id)})})})}function M_({blocks:e,activeId:t,setActiveId:n,mode:r,renderBlock:i,blockMeta:l,onRemove:a,canRemove:s=()=>!0}){const o=e.find(f=>f.id===t)||e[0],c=r==="layout";return u.jsxs("div",{className:"mobile-canvas","data-testid":"mobile-canvas",children:[u.jsx("div",{className:"mobile-tabs","data-testid":"mobile-tabs",children:e.map(f=>{const d=l(f);return u.jsxs("button",{className:`mtab ${f.id===(o==null?void 0:o.id)?"active":""}`,onClick:()=>n(f.id),"data-testid":`mtab-${f.type}`,children:[u.jsx("span",{className:"mtab-icon",children:d.icon}),u.jsx("span",{className:"mtab-label",children:d.title}),c&&s(f)&&u.jsx("span",{className:"mtab-x",role:"button",title:"Remove",onClick:p=>{p.stopPropagation(),a(f.id)},children:"✕"})]},f.id)})}),u.jsx("div",{className:"mobile-block",children:o&&u.jsx("div",{className:"block",children:u.jsx("div",{className:"block-body",children:i(o)})})})]})}function $_({items:e,bazaarItems:t=[],onAdd:n,onClose:r}){return u.jsx("div",{className:"modal-backdrop",onClick:r,"data-testid":"add-gallery-backdrop",children:u.jsxs("div",{className:"modal add-gallery",onClick:i=>i.stopPropagation(),"data-testid":"add-gallery",children:[u.jsx("h2",{children:"Add a block"}),u.jsx("p",{className:"muted",children:"Build your space — drop in whatever's useful. Move and resize it however you like."}),u.jsx("div",{className:"gallery-grid",children:e.map(i=>u.jsxs("button",{className:"gallery-item",disabled:i.soon,onClick:()=>!i.soon&&n(i.type),"data-testid":`gallery-add-${i.type}`,children:[u.jsx("span",{className:"gallery-glyph",children:i.icon}),u.jsx("span",{className:"gallery-name",children:i.title}),u.jsx("span",{className:"gallery-desc",children:i.desc}),i.soon&&u.jsx("span",{className:"gallery-soon",children:"soon"})]},i.type))}),t.length>0&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"gallery-section",children:"🛍️ from the Bazaar"}),u.jsx("div",{className:"gallery-grid",children:t.map(i=>u.jsxs("button",{className:"gallery-item bazaar",onClick:()=>n(i.type),"data-testid":`gallery-add-${i.type}`,children:[u.jsx("span",{className:"gallery-glyph",children:i.icon}),u.jsx("span",{className:"gallery-name",children:i.title}),u.jsx("span",{className:"gallery-desc",children:i.desc})]},i.type))})]}),u.jsxs("div",{className:"gallery-agent-hint","data-testid":"gallery-agent-hint",children:["✨ Or ask your agent in chat — ",u.jsx("em",{children:"“make me a block that shows today’s signups”"})," — and it builds one for you."]}),u.jsx("div",{className:"actions",children:u.jsx("button",{onClick:r,children:"Done"})})]})})}const B_={chat:{icon:"🗨️",label:"Chat"},liveview:{icon:"👁️",label:"Live view"},notes:{icon:"📝",label:"Notes"},earnings:{icon:"💸",label:"Earnings"},analytics:{icon:"📊",label:"Analytics"}};function ah({blocks:e}){return u.jsx("span",{className:"tpl-chips",children:e.map((t,n)=>{const r=B_[t.type]||{icon:"▫️",label:t.type};return u.jsxs("span",{className:"tpl-chip",title:r.label,children:[u.jsx("span",{className:"tpl-chip-icon",children:r.icon}),r.label]},n)})})}function H_({builtins:e=[],saved:t=[],onApply:n,onSaveCurrent:r,onDelete:i,onClose:l}){const[a,s]=S.useState("");function o(){const c=a.trim();c&&(r(c),s(""))}return u.jsx("div",{className:"modal-backdrop",onClick:l,"data-testid":"template-gallery-backdrop",children:u.jsxs("div",{className:"modal template-gallery",onClick:c=>c.stopPropagation(),"data-testid":"template-gallery",children:[u.jsx("h2",{children:"Start from a template"}),u.jsx("p",{className:"muted",children:"Pick a layout to start from — it swaps your current blocks for the template's. Chat always stays."}),u.jsx("div",{className:"gallery-grid",children:e.map(c=>u.jsxs("button",{className:"gallery-item template-card",onClick:()=>n(c),"data-testid":`template-${c.id}`,children:[u.jsx("span",{className:"gallery-glyph",children:c.icon}),u.jsx("span",{className:"gallery-name",children:c.name}),u.jsx("span",{className:"gallery-desc",children:c.desc}),u.jsx(ah,{blocks:c.blocks})]},c.id))}),t.length>0&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"gallery-section",children:"⭐ your templates"}),u.jsx("div",{className:"gallery-grid",children:t.map(c=>u.jsxs("div",{className:"gallery-item template-card saved","data-testid":`template-${c.id}`,children:[u.jsxs("button",{className:"tpl-apply",onClick:()=>n(c),"data-testid":`template-apply-${c.id}`,children:[u.jsx("span",{className:"gallery-glyph",children:c.icon||"⭐"}),u.jsx("span",{className:"gallery-name",children:c.name}),u.jsx(ah,{blocks:c.blocks})]}),u.jsx("button",{className:"tpl-del",title:"Delete this template",onClick:()=>i(c.id),"data-testid":`template-delete-${c.id}`,children:"✕"})]},c.id))})]}),u.jsxs("div",{className:"tpl-save-row",children:[u.jsx("input",{className:"tpl-save-input",value:a,onChange:c=>s(c.target.value),onKeyDown:c=>c.key==="Enter"&&o(),placeholder:"Save current layout as…","data-testid":"template-save-name",maxLength:40}),u.jsx("button",{className:"primary",onClick:o,disabled:!a.trim(),"data-testid":"template-save-btn",children:"Save layout"})]}),u.jsx("div",{className:"actions",children:u.jsx("button",{onClick:l,children:"Done"})})]})})}const Sx="wild:theme",Ku=[{id:"cyan",name:"VentureWild",accent:"#0891b2",hot:"#0e7490"},{id:"teal",name:"Teal",accent:"#0d9488",hot:"#0f766e"},{id:"blue",name:"Blue",accent:"#2563eb",hot:"#1d4ed8"},{id:"violet",name:"Violet",accent:"#7c3aed",hot:"#6d28d9"},{id:"emerald",name:"Emerald",accent:"#059669",hot:"#047857"},{id:"amber",name:"Amber",accent:"#d97706",hot:"#b45309"},{id:"rose",name:"Rose",accent:"#e11d48",hot:"#be123c"}],U_=[{id:"light",name:"Light",glyph:"☀️",desc:"Bright & warm (default)"},{id:"dark",name:"Dark",glyph:"🌙",desc:"The venturewild.llc look"}],Ex={bg:"--bg",bgElev:"--bg-elev",surface:"--surface",border:"--border",text:"--text",textMuted:"--text-muted",canvas1:"--canvas-1",canvas2:"--canvas-2",canvas3:"--canvas-3"},ja={mode:"light",accent:Ku[0].accent,hot:Ku[0].hot,accentManual:!1,tokens:{}};function Fn(e){if(typeof e!="string")return null;const t=e.trim();return/^#([0-9a-f]{6})$/i.test(t)?t.toLowerCase():null}function jx(e){const t=Fn(e)||"#000000";return[parseInt(t.slice(1,3),16),parseInt(t.slice(3,5),16),parseInt(t.slice(5,7),16)]}function jd(e,t=.16){const[n,r,i]=jx(e),l=1-t,a=s=>Math.max(0,Math.min(255,Math.round(s*l)));return`#${[a(n),a(r),a(i)].map(s=>s.toString(16).padStart(2,"0")).join("")}`}function Cx(e){const[t,n,r]=jx(e).map(l=>{const a=l/255;return a<=.03928?a/12.92:((a+.055)/1.055)**2.4});return .2126*t+.7152*n+.0722*r>.42?"#08232b":"#ffffff"}function Cd(e){const t={};if(e&&typeof e=="object")for(const n of Object.keys(Ex)){const r=Fn(e[n]);r&&(t[n]=r)}return t}function W_(e,t,n){const r=t&&typeof t=="object"?t:{},i=n?e.accent:Fn(r.accent)||e.accent,l=n?e.hot:Fn(r.hot)||Fn(r.accent)||e.hot;return{...e,mode:r.mode==="dark"?"dark":"light",accent:i,hot:l,tokens:Cd(r.tokens),accentManual:!0}}function V_(){try{const e=localStorage.getItem(Sx);if(!e)return{...ja};const t=JSON.parse(e),n=Fn(t.accent)||ja.accent;return{mode:t.mode==="dark"?"dark":"light",accent:n,hot:Fn(t.hot)||jd(n),accentManual:!!t.accentManual,tokens:Cd(t.tokens)}}catch{return{...ja}}}function G_(e){try{localStorage.setItem(Sx,JSON.stringify(e))}catch{}}function q_(e){const t=document.documentElement;e.mode==="dark"?t.dataset.theme="dark":delete t.dataset.theme;const n=Fn(e.accent)||ja.accent;t.style.setProperty("--accent",n),t.style.setProperty("--accent-hot",Fn(e.hot)||jd(n)),t.style.setProperty("--accent-ink",Cx(n));const r=Cd(e.tokens);for(const[i,l]of Object.entries(Ex))r[i]?t.style.setProperty(l,r[i]):t.style.removeProperty(l)}function Y_({theme:e,onChange:t,onClose:n}){const[r,i]=S.useState(e.accent);function l(o){t({...e,mode:o})}function a(o){i(o.accent),t({...e,accent:o.accent,hot:o.hot,accentManual:!0})}function s(o){i(o),/^#([0-9a-f]{6})$/i.test(o)&&t({...e,accent:o,hot:jd(o),accentManual:!0})}return u.jsx("div",{className:"modal-backdrop",onClick:n,"data-testid":"theme-picker-backdrop",children:u.jsxs("div",{className:"modal theme-picker",onClick:o=>o.stopPropagation(),"data-testid":"theme-picker",children:[u.jsx("h2",{children:"Make it yours"}),u.jsx("p",{className:"muted",children:"Pick a look. Changes apply live and follow you across your workspaces."}),u.jsx("div",{className:"theme-section",children:"Mode"}),u.jsx("div",{className:"theme-modes",children:U_.map(o=>u.jsxs("button",{className:`theme-mode ${e.mode===o.id?"active":""}`,onClick:()=>l(o.id),"data-testid":`theme-mode-${o.id}`,"aria-pressed":e.mode===o.id,children:[u.jsx("span",{className:"theme-mode-glyph",children:o.glyph}),u.jsx("span",{className:"theme-mode-name",children:o.name}),u.jsx("span",{className:"theme-mode-desc",children:o.desc})]},o.id))}),u.jsx("div",{className:"theme-section",children:"Accent"}),u.jsx("div",{className:"theme-swatches",children:Ku.map(o=>{const c=e.accent.toLowerCase()===o.accent.toLowerCase();return u.jsx("button",{className:`theme-swatch ${c?"active":""}`,style:{background:o.accent,color:Cx(o.accent)},onClick:()=>a(o),title:o.name,"data-testid":`theme-accent-${o.id}`,"aria-pressed":c,children:c?"✓":""},o.id)})}),u.jsxs("div",{className:"theme-custom",children:[u.jsx("label",{htmlFor:"theme-hex",className:"muted",children:"Custom"}),u.jsx("input",{id:"theme-hex",type:"color",value:/^#([0-9a-f]{6})$/i.test(r)?r:"#0891b2",onChange:o=>s(o.target.value),"data-testid":"theme-custom-color","aria-label":"Custom accent color"}),u.jsx("input",{className:"theme-hex-input",value:r,onChange:o=>s(o.target.value),placeholder:"#0891b2",maxLength:7,spellCheck:!1,"data-testid":"theme-custom-hex"})]}),u.jsx("div",{className:"actions",children:u.jsx("button",{className:"primary",onClick:n,"data-testid":"theme-done",children:"Done"})})]})})}function X_({bazaarPreview:e}){const[t,n]=S.useState(null);S.useEffect(()=>{let i=!1;async function l(){var c;const s=await fetch("/api/preview/ports").catch(()=>null);if(!s||i)return;const o=await s.json().catch(()=>({}));i||!t&&((c=o.ports)==null?void 0:c.length)>0&&n(o.ports[0].port)}l();const a=setInterval(l,4e3);return()=>{i=!0,clearInterval(a)}},[t]);const r=e!=null&&e.url?`${e.url}${e.url.includes("?")?"&":"?"}_=${e.ts||""}`:null;return r?u.jsx("iframe",{className:"liveview-frame",src:r,title:"Live view","data-testid":"liveview-frame",sandbox:"allow-scripts"},`bz-${e.ts}`):t?u.jsx("iframe",{className:"liveview-frame",src:`http://localhost:${t}`,title:"Live view","data-testid":"liveview-frame"},t):u.jsxs("div",{className:"liveview-empty","data-testid":"liveview-empty",children:[u.jsx("div",{className:"liveview-empty-mark",children:"👁️"}),u.jsx("p",{className:"liveview-empty-title",children:"Nothing to show yet"}),u.jsx("p",{className:"liveview-empty-sub",children:"When your agent builds something, it appears here — live, as it works."})]})}function K_({id:e}){const t=`wild:notes:${e}`,[n,r]=S.useState(()=>{try{return localStorage.getItem(t)||""}catch{return""}});return S.useEffect(()=>{try{localStorage.setItem(t,n)}catch{}},[t,n]),u.jsx("textarea",{className:"notes-block",value:n,onChange:i=>r(i.target.value),placeholder:"Jot anything — a plan, a link, a reminder…","data-testid":"notes-block"})}function Q_(e){return`$${(Number(e)||0).toFixed(2)}`}function Z_(e=[],t=[]){if(!e.length)return t.length?{name:"You",handle:"you",total:0,uses:0,matches:0,serviceCalls:0}:null;const n=e[0];return(n.total||0)===0&&e.find(r=>r.handle==="you")||n}function J_({live:e,token:t}){const[n,r]=S.useState(e||null);S.useEffect(()=>{let m=!1;const v=t?{Authorization:`Bearer ${t}`}:{};return fetch("/api/bazaar/state",{headers:v}).then(w=>w.ok?w.json():null).then(w=>{!m&&w&&r(g=>g||w)}).catch(()=>{}),()=>{m=!0}},[t]),S.useEffect(()=>{e&&r(e)},[e]);const i=S.useMemo(()=>Z_(n==null?void 0:n.earnings,n==null?void 0:n.listings),[n]),l=i==null?void 0:i.handle,a=(i==null?void 0:i.total)??0,s=S.useRef({handle:null,total:null}),[o,c]=S.useState([]);if(S.useEffect(()=>{const m=s.current;if(m.handle!==l){s.current={handle:l,total:a},c([]);return}if(m.total===null){s.current={handle:l,total:a};return}const v=a-m.total;s.current={handle:l,total:a},v>0&&c(w=>[...w,v].slice(-28))},[l,a]),!i)return u.jsxs("div",{className:"earn-empty","data-testid":"earnings-empty",children:[u.jsx("div",{className:"earn-empty-mark",children:"💸"}),u.jsx("p",{className:"earn-empty-title",children:"No earnings yet"}),u.jsx("p",{className:"earn-empty-sub",children:"When someone builds on what you share — or uses a tool you wired in — represented earnings show up here, live."})]});const f=i.handle==="you",d=(i.serviceCalls||0)>0||(i.matches||0)>0,p=d?i.matches||0:i.uses||0,h=d?p===1?"match":"matches":p===1?"build":"builds";return u.jsxs("div",{className:"earn-block","data-testid":"earnings-block",children:[u.jsxs("div",{className:"earn-who",children:[u.jsxs("span",{className:"earn-name",children:[i.name,f&&u.jsx("span",{className:"earn-you-tag",children:"you"})]}),u.jsx("span",{className:"earn-sub",children:f?"your producer earnings":"a producer's earnings, live"})]}),u.jsx("div",{className:"earn-amount","data-testid":"earnings-amount",children:Q_(a)}),u.jsxs("div",{className:"earn-meta",children:[u.jsxs("span",{children:[u.jsx("strong",{children:p})," ",h]}),u.jsx("span",{className:"earn-rep",title:"No real money moves yet — a preview of how earnings would work.",children:"represented · settles later"})]}),u.jsx(ez,{values:o})]})}function ez({values:e}){const t=e&&e.length>0,n=t?e:Array.from({length:16},()=>0),r=t?Math.max(...e):1;return u.jsxs("div",{className:`earn-spark ${t?"":"is-baseline"}`,"data-testid":"earnings-spark","aria-hidden":"true",children:[u.jsx("div",{className:"earn-bars",children:n.map((i,l)=>u.jsx("span",{className:"earn-bar",style:{height:`${t?8+Math.round(i/r*92):6}%`}},l))}),u.jsx("span",{className:"earn-spark-live",children:"live"})]})}function sh(e){return`$${(Number(e)||0).toFixed(2)}`}function tz({live:e,token:t}){const[n,r]=S.useState(e||null);S.useEffect(()=>{let c=!1;const f=t?{Authorization:`Bearer ${t}`}:{};return fetch("/api/bazaar/state",{headers:f}).then(d=>d.ok?d.json():null).then(d=>{!c&&d&&r(p=>p||d)}).catch(()=>{}),()=>{c=!0}},[t]),S.useEffect(()=>{e&&r(e)},[e]);const i=(n==null?void 0:n.earnings)||[],l=(n==null?void 0:n.totals)||{creditPaid:0},a=i.reduce((c,f)=>c+(f.matches||0),0),s=i.reduce((c,f)=>c+(f.uses||0),0),o=Math.max(1,...i.map(c=>c.total||0));return i.length?u.jsxs("div",{className:"analytics-block","data-testid":"analytics-block",children:[u.jsxs("div",{className:"an-stats",children:[u.jsxs("div",{className:"an-stat",children:[u.jsx("span",{className:"an-stat-num",children:sh(l.creditPaid)}),u.jsx("span",{className:"an-stat-lbl",children:"represented"})]}),u.jsxs("div",{className:"an-stat",children:[u.jsx("span",{className:"an-stat-num",children:a||s}),u.jsx("span",{className:"an-stat-lbl",children:a?"matches":"builds"})]}),u.jsxs("div",{className:"an-stat",children:[u.jsx("span",{className:"an-stat-num",children:i.length}),u.jsx("span",{className:"an-stat-lbl",children:i.length===1?"producer":"producers"})]})]}),u.jsx("div",{className:"an-board",children:i.slice(0,6).map(c=>u.jsxs("div",{className:"an-row","data-testid":`analytics-row-${c.handle}`,children:[u.jsxs("span",{className:"an-row-name",children:[c.name,c.handle==="you"&&u.jsx("span",{className:"earn-you-tag",children:"you"})]}),u.jsx("span",{className:"an-row-bar",children:u.jsx("span",{className:"an-row-fill",style:{width:`${Math.round((c.total||0)/o*100)}%`}})}),u.jsx("span",{className:"an-row-val",children:sh(c.total)})]},c.handle))}),u.jsx("div",{className:"an-foot",children:"represented · settles later"})]}):u.jsxs("div",{className:"earn-empty","data-testid":"analytics-empty",children:[u.jsx("div",{className:"earn-empty-mark",children:"📊"}),u.jsx("p",{className:"earn-empty-title",children:"No activity yet"}),u.jsx("p",{className:"earn-empty-sub",children:"Once builds and matches start flowing across the shelf, you'll see who's earning and how much, here."})]})}function nz({token:e,selectedFile:t,onOpenFile:n}){const[r,i]=S.useState(null),[l,a]=S.useState(null),[s,o]=S.useState(()=>new Set);S.useEffect(()=>{let d=!1;const p=e?{Authorization:`Bearer ${e}`}:{};return fetch("/api/workspace/tree",{headers:p}).then(h=>h.json()).then(h=>{d||(h.error?a(h.error):i(h.entries||[]))}).catch(h=>!d&&a(h.message||String(h))),()=>{d=!0}},[e]);function c(d){o(p=>{const h=new Set(p);return h.has(d)?h.delete(d):h.add(d),h})}function f(d,p=0){var w;const h=d.type==="dir",m=s.has(d.path),v=!h&&d.path===t;return u.jsxs("div",{children:[u.jsxs("div",{className:`fnode ${h?"dir":""} ${v?"sel":""}`,onClick:()=>h?c(d.path):n==null?void 0:n(d.path),style:{paddingLeft:p*12+6},"data-testid":`files-node-${d.path}`,title:d.path,children:[u.jsx("span",{className:"fnode-tw",children:h?m?"▾":"▸":""}),u.jsx("span",{className:"fnode-ic",children:h?"📁":"📄"}),u.jsx("span",{className:"fnode-nm",children:d.name})]}),h&&m&&((w=d.children)==null?void 0:w.map(g=>f(g,p+1)))]},d.path)}return u.jsxs("div",{className:"files-block","data-testid":"files-block",children:[l&&u.jsx("div",{className:"files-msg err",children:l==="forbidden"?"Files aren't available on this view.":l}),!r&&!l&&u.jsxs("div",{className:"files-msg",children:[u.jsx("span",{className:"spinner"})," loading…"]}),(r==null?void 0:r.length)===0&&u.jsx("div",{className:"files-msg",children:"Empty workspace"}),r==null?void 0:r.map(d=>f(d,0))]})}const rz={js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"jsx",ts:"typescript",tsx:"tsx",json:"json",md:"markdown",markdown:"markdown",css:"css",scss:"scss",html:"markup",xml:"markup",svg:"markup",py:"python",rs:"rust",go:"go",sh:"bash",bash:"bash",zsh:"bash",yml:"yaml",yaml:"yaml",toml:"toml",sql:"sql",java:"java",c:"c",h:"c",cpp:"cpp",rb:"ruby",php:"php"};function iz(e){const t=String(e||"").split(".").pop().toLowerCase();return rz[t]||"text"}function lz({path:e,token:t,onPickFile:n}){const[r,i]=S.useState(e||""),[l,a]=S.useState({loading:!1});S.useEffect(()=>{i(e||"")},[e]),S.useEffect(()=>{if(!e){a({loading:!1});return}let o=!1;a({loading:!0});const c=t?{Authorization:`Bearer ${t}`}:{};return fetch(`/api/workspace/file?path=${encodeURIComponent(e)}`,{headers:c}).then(f=>f.json()).then(f=>{o||a({loading:!1,...f})}).catch(f=>{o||a({loading:!1,error:f.message||String(f)})}),()=>{o=!0}},[e,t]);const s=iz(e);return u.jsxs("div",{className:"codeblock","data-testid":"code-view-block",children:[u.jsxs("div",{className:"codeblock-bar",children:[u.jsx("input",{className:"codeblock-path",value:r,onChange:o=>i(o.target.value),onKeyDown:o=>o.key==="Enter"&&(n==null?void 0:n(r.trim())),placeholder:"path/to/file",spellCheck:!1,"data-testid":"code-path"}),l.truncated&&u.jsx("span",{className:"codeblock-trunc",title:"Large file — showing the start",children:"truncated"})]}),u.jsxs("div",{className:"codeblock-body",children:[!e&&u.jsx("div",{className:"codeblock-msg",children:"Pick a file in the Files block — or type a path above — to view it here."}),e&&l.loading&&u.jsxs("div",{className:"codeblock-msg",children:[u.jsx("span",{className:"spinner"})," loading…"]}),e&&l.error&&u.jsx("div",{className:"codeblock-msg err",children:l.error==="forbidden"?"Files aren't available on this view.":l.error}),e&&!l.loading&&!l.error&&typeof l.content=="string"&&u.jsx(Hy,{theme:dd.vsDark,code:l.content,language:s,children:({tokens:o,getLineProps:c,getTokenProps:f})=>u.jsx("pre",{className:"codeblock-pre",children:o.map((d,p)=>u.jsxs("div",{...c({line:d}),className:"codeblock-line",children:[u.jsx("span",{className:"codeblock-ln",children:p+1}),u.jsx("span",{className:"codeblock-lc",children:d.map((h,m)=>u.jsx("span",{...f({token:h})},m))})]},p))})})]})]})}function az({id:e}){const t=`wild:todo:${e}`,[n,r]=S.useState(()=>{try{const f=JSON.parse(localStorage.getItem(t)||"[]");return Array.isArray(f)?f:[]}catch{return[]}}),[i,l]=S.useState("");S.useEffect(()=>{try{localStorage.setItem(t,JSON.stringify(n))}catch{}},[t,n]);function a(){const f=i.trim();f&&(r(d=>[...d,{id:`${Date.now().toString(36)}-${d.length}`,text:f,done:!1}]),l(""))}function s(f){r(d=>d.map(p=>p.id===f?{...p,done:!p.done}:p))}function o(f){r(d=>d.filter(p=>p.id!==f))}const c=n.filter(f=>!f.done).length;return u.jsxs("div",{className:"todo-block","data-testid":"todo-block",children:[u.jsxs("div",{className:"todo-add",children:[u.jsx("input",{value:i,onChange:f=>l(f.target.value),onKeyDown:f=>f.key==="Enter"&&a(),placeholder:"Add a to-do…","data-testid":"todo-input"}),u.jsx("button",{onClick:a,disabled:!i.trim(),"data-testid":"todo-add-btn",children:"Add"})]}),u.jsxs("div",{className:"todo-list",children:[n.length===0&&u.jsx("div",{className:"todo-msg",children:"Nothing yet — add your first to-do above."}),n.map(f=>u.jsxs("div",{className:`todo-item ${f.done?"done":""}`,"data-testid":"todo-item",children:[u.jsxs("label",{children:[u.jsx("input",{type:"checkbox",checked:f.done,onChange:()=>s(f.id)}),u.jsx("span",{className:"todo-text",children:f.text})]}),u.jsx("button",{className:"todo-del",title:"Remove",onClick:()=>o(f.id),children:"✕"})]},f.id))]}),n.length>0&&u.jsxs("div",{className:"todo-foot",children:[c," left · ",n.length-c," done"]})]})}function sz({spec:e}){if(!e||!e.kind)return u.jsx("div",{className:"cb-empty","data-testid":"custom-empty",children:"This block has nothing to show yet."});const{kind:t,note:n,data:r={}}=e;return u.jsxs("div",{className:"cb-block","data-testid":"custom-block","data-kind":t,children:[n&&u.jsx("p",{className:"cb-note",children:n}),t==="metric"&&u.jsx(oz,{data:r}),t==="list"&&u.jsx(uz,{data:r}),t==="table"&&u.jsx(cz,{data:r}),t==="markdown"&&u.jsx(dz,{data:r})]})}function oz({data:e}){const t=["up","down","flat"].includes(e.trend)?e.trend:null;return u.jsxs("div",{className:"cb-metric","data-testid":"custom-metric",children:[u.jsx("div",{className:"cb-metric-value",children:e.value??"—"}),e.label&&u.jsx("div",{className:"cb-metric-label",children:e.label}),e.delta&&u.jsxs("div",{className:`cb-metric-delta ${t?`is-${t}`:""}`,"data-testid":"custom-delta",children:[t==="up"?"▲ ":t==="down"?"▼ ":"",e.delta]}),Array.isArray(e.spark)&&e.spark.length>0&&u.jsx(fz,{values:e.spark})]})}function uz({data:e}){const t=Array.isArray(e.items)?e.items:[];return t.length?u.jsx("ul",{className:"cb-list","data-testid":"custom-list",children:t.map((n,r)=>u.jsxs("li",{className:"cb-list-row",children:[u.jsx("span",{className:"cb-list-label",children:n.label}),n.value!==void 0&&n.value!==""&&u.jsx("span",{className:"cb-list-value",children:n.value})]},r))}):u.jsx("div",{className:"cb-empty","data-testid":"custom-empty",children:"Empty list."})}function cz({data:e}){const t=Array.isArray(e.columns)?e.columns:[],n=Array.isArray(e.rows)?e.rows:[];return n.length?u.jsx("div",{className:"cb-table-wrap",children:u.jsxs("table",{className:"cb-table","data-testid":"custom-table",children:[t.length>0&&u.jsx("thead",{children:u.jsx("tr",{children:t.map((r,i)=>u.jsx("th",{children:r},i))})}),u.jsx("tbody",{children:n.map((r,i)=>u.jsx("tr",{children:(Array.isArray(r)?r:[r]).map((l,a)=>u.jsx("td",{children:l},a))},i))})]})}):u.jsx("div",{className:"cb-empty","data-testid":"custom-empty",children:"No rows."})}function dz({data:e}){const t=typeof e.text=="string"?e.text:"";return t?u.jsx("div",{className:"cb-markdown","data-testid":"custom-markdown",children:u.jsx(Uy,{text:t})}):u.jsx("div",{className:"cb-empty","data-testid":"custom-empty",children:"Empty note."})}function fz({values:e}){const t=Math.max(...e,1);return u.jsx("div",{className:"cb-spark","data-testid":"custom-spark","aria-hidden":"true",children:e.map((n,r)=>u.jsx("span",{className:"cb-spark-bar",style:{height:`${8+Math.round(Math.max(0,n)/t*92)}%`}},r))})}function pz({onClose:e}){const[t,n]=S.useState("viewer"),[r,i]=S.useState(24),[l,a]=S.useState(""),[s,o]=S.useState(null),[c,f]=S.useState([]),[d,p]=S.useState(null),[h,m]=S.useState(!1);S.useEffect(()=>{v()},[]);async function v(){const y=await fetch("/api/share").catch(()=>null);if(!y||!y.ok)return;const C=await y.json();f(C.tokens||[])}async function w(){p(null),m(!0);try{const y=await fetch("/api/share",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({role:t,ttlSeconds:Math.max(60,Number(r)*3600),label:l})}),C=await y.json();if(!y.ok)throw new Error(C.error||`HTTP ${y.status}`);o(C),v()}catch(y){p(y.message||String(y))}finally{m(!1)}}async function g(y){await fetch(`/api/share/${encodeURIComponent(y)}`,{method:"DELETE"}),v()}async function x(y){try{await navigator.clipboard.writeText(y)}catch{}}return u.jsx("div",{className:"modal-backdrop",onClick:e,children:u.jsxs("div",{className:"modal",onClick:y=>y.stopPropagation(),"data-testid":"share-dialog",children:[u.jsx("h2",{children:"Share workspace"}),u.jsx("p",{className:"muted",children:"Issue a token-protected URL. Anyone with the link opens this workspace in their browser with the role you choose."}),u.jsx("label",{children:"Role"}),u.jsx("div",{className:"row",children:u.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,color:"var(--text)"},children:[u.jsx("input",{type:"radio",name:"role",value:"viewer",checked:t==="viewer",onChange:()=>n("viewer"),"data-testid":"share-role-viewer"}),u.jsx("span",{children:"Viewer — read-only chat + preview"})]})}),u.jsx("div",{className:"row",children:u.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,color:"var(--text)"},children:[u.jsx("input",{type:"radio",name:"role",value:"client",checked:t==="client",onChange:()=>n("client"),"data-testid":"share-role-client"}),u.jsx("span",{children:"Client — chat + request changes (for AI-installer GTM)"})]})}),u.jsxs("div",{className:"row",children:[u.jsxs("div",{children:[u.jsx("label",{children:"Expires in"}),u.jsx("input",{type:"number",min:"1",value:r,onChange:y=>i(y.target.value),style:{width:80,background:"var(--bg)",color:"var(--text)",border:"1px solid var(--border)",padding:"4px 8px",borderRadius:6},"data-testid":"share-ttl"}),u.jsx("span",{style:{marginLeft:6,color:"var(--text-muted)",fontSize:12},children:"hours"})]}),u.jsxs("div",{style:{flex:1},children:[u.jsx("label",{children:"Label (optional)"}),u.jsx("input",{value:l,onChange:y=>a(y.target.value),placeholder:"e.g. Mel preview",style:{width:"100%",background:"var(--bg)",color:"var(--text)",border:"1px solid var(--border)",padding:"4px 8px",borderRadius:6},"data-testid":"share-label"})]})]}),d&&u.jsx("div",{style:{color:"var(--error)",fontSize:12,marginBottom:8},"data-testid":"share-error",children:d}),s&&u.jsxs(u.Fragment,{children:[u.jsx("label",{children:"Share URL"}),u.jsx("div",{className:"url-output","data-testid":"share-url",children:s.shareUrl}),u.jsxs("div",{style:{display:"flex",gap:8},children:[u.jsx("button",{onClick:()=>x(s.shareUrl),"data-testid":"share-copy",children:"Copy"}),u.jsx("a",{href:s.shareUrl,target:"_blank",rel:"noreferrer",children:u.jsx("button",{children:"Open"})})]})]}),c.length>0&&u.jsxs("div",{style:{marginTop:16},children:[u.jsx("label",{children:"Active share tokens"}),u.jsx("div",{style:{maxHeight:140,overflow:"auto",border:"1px solid var(--border)",borderRadius:6},children:c.map(y=>u.jsxs("div",{style:{padding:"6px 10px",borderBottom:"1px solid var(--border)",display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:12},"data-testid":`active-token-${y.sub}`,children:[u.jsxs("div",{children:[u.jsx("strong",{children:y.label||y.role})," ",u.jsxs("span",{style:{color:"var(--text-muted)"},children:["(",y.role,", expires ",new Date(y.exp*1e3).toLocaleString(),")"]})]}),u.jsx("button",{onClick:()=>g(y.sub),style:{fontSize:11},"data-testid":`revoke-${y.sub}`,children:"Revoke"})]},y.sub))})]}),u.jsxs("div",{className:"actions",children:[u.jsx("button",{onClick:e,"data-testid":"share-close",children:"Close"}),u.jsx("button",{className:"primary",onClick:w,disabled:h,"data-testid":"share-issue",children:h?u.jsx("span",{className:"spinner"}):"Issue URL"})]})]})})}function hz({onClose:e,token:t}){var M,$;const[n,r]=S.useState(null),[i,l]=S.useState(!1),[a,s]=S.useState(null),[o,c]=S.useState(!1),[f,d]=S.useState(""),[p,h]=S.useState(""),[m,v]=S.useState(168),[w,g]=S.useState(null);S.useEffect(()=>{y()},[]);function x(L,B={}){const I={...B.headers||{}};return t&&(I.Authorization=`Bearer ${t}`),fetch(L,{...B,headers:I})}async function y(){s(null),l(!1);const L=await x("/api/sync/status").catch(()=>null);if(!L||!L.ok){l(!0);return}r(await L.json())}async function C(L){s(null),c(!0);try{await L()}catch(B){s(B.message||String(B))}finally{c(!1)}}const E=()=>C(async()=>{const L=await x("/api/sync/pair",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({inviteCode:f})}),B=await L.json();if(!L.ok)throw new Error(B.error||`HTTP ${L.status}`);d(""),await y()}),b=()=>C(async()=>{var I,J;const L=await x("/api/sync/invite",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({projectCode:(J=(I=n==null?void 0:n.workspaces)==null?void 0:I[0])==null?void 0:J.projectId,displayName:p,expiresHours:Math.max(1,Number(m)||168)})}),B=await L.json();if(!L.ok)throw new Error(B.error||`HTTP ${L.status}`);g(B.invite)}),T=()=>C(async()=>{var I,J;const L=await x("/api/sync/detach",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({workspaceId:(J=(I=n==null?void 0:n.workspaces)==null?void 0:I[0])==null?void 0:J.workspaceId})}),B=await L.json();if(!L.ok)throw new Error(B.error||`HTTP ${L.status}`);g(null),await y()});async function _(L){try{await navigator.clipboard.writeText(L)}catch{}}const R=((M=n==null?void 0:n.workspaces)==null?void 0:M[0])||null,N=!!n&&!(($=n.daemon)!=null&&$.running);return u.jsx("div",{className:"modal-backdrop",onClick:e,children:u.jsxs("div",{className:"modal",onClick:L=>L.stopPropagation(),"data-testid":"sync-dialog",children:[u.jsx("h2",{children:"Collaborate on this folder"}),u.jsx("p",{className:"muted",children:"bmo-sync keeps this workspace folder identical across machines — yours and a collaborator's. Both of you edit; changes flow both ways. Like a shared drive, but built for workspaces."}),!n&&!i&&u.jsxs("div",{className:"muted",children:[u.jsx("span",{className:"spinner"})," Checking sync status…"]}),i&&u.jsxs("div",{className:"sync-state warn","data-testid":"sync-load-failed",children:[u.jsx("strong",{children:"Couldn't load sync status."}),u.jsx("span",{className:"muted",children:"The workspace server didn't answer. Try again."})]}),N&&u.jsxs("div",{className:"sync-state warn","data-testid":"sync-daemon-down",children:[u.jsx("strong",{children:"The bmo-sync daemon isn't running."}),u.jsx("span",{className:"muted",children:"Folder sharing needs the background sync service running on this machine. Start it, then recheck."})]}),n&&!N&&!R&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"sync-state","data-testid":"sync-unpaired",children:[u.jsxs("strong",{children:[n.workspaceName," isn't shared yet."]}),u.jsx("span",{className:"muted",children:"Got an invite code from a collaborator? Paste it to sync this folder with theirs."})]}),u.jsx("label",{children:"Invite code"}),u.jsxs("div",{className:"row",children:[u.jsx("input",{className:"sync-input",style:{flex:1},value:f,onChange:L=>d(L.target.value),placeholder:"e.g. CAFE-MILANO-A8X3","data-testid":"sync-invite-input"}),u.jsx("button",{className:"primary",onClick:E,disabled:o||!f.trim(),"data-testid":"sync-join",children:o?u.jsx("span",{className:"spinner"}):"Connect folder"})]})]}),n&&!N&&R&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"sync-state ok","data-testid":"sync-paired",children:[u.jsxs("strong",{children:["✓ Synced — ",R.projectName||R.projectId]}),u.jsxs("span",{className:"muted",children:["This folder is shared. Edits sync both ways automatically",R.conflictCount?` · ${R.conflictCount} conflict${R.conflictCount>1?"s":""} resolved`:"","."]})]}),n.canInvite?u.jsxs(u.Fragment,{children:[u.jsx("label",{children:"Invite a collaborator"}),u.jsxs("div",{className:"row",children:[u.jsx("input",{className:"sync-input",style:{flex:1},value:p,onChange:L=>h(L.target.value),placeholder:"Their name — e.g. Mel","data-testid":"sync-invite-name"}),u.jsx("input",{className:"sync-input",style:{width:64},type:"number",min:"1",value:m,onChange:L=>v(L.target.value),title:"Invite expires in (hours)"}),u.jsx("button",{onClick:b,disabled:o,"data-testid":"sync-create-invite",children:o?u.jsx("span",{className:"spinner"}):"Create invite"})]}),w&&u.jsxs(u.Fragment,{children:[u.jsx("label",{children:"Send this code to your collaborator"}),u.jsx("div",{className:"url-output","data-testid":"sync-invite-code",children:w.code}),u.jsxs("div",{className:"row",style:{marginBottom:0},children:[u.jsx("button",{onClick:()=>_(w.code),"data-testid":"sync-copy-code",children:"Copy code"}),w.expiresAt&&u.jsxs("span",{className:"muted",style:{margin:0},children:["expires ",new Date(w.expiresAt*1e3).toLocaleDateString()]})]})]})]}):u.jsxs("p",{className:"muted","data-testid":"sync-no-invite",children:["Inviting from here needs a bmo-sync admin key (set"," ",u.jsx("span",{className:"md-code-inline",children:"BMO_SYNC_ADMIN_KEY"}),"). Without it, anyone you've already invited can still join with their own code."]})]}),a&&u.jsx("div",{style:{color:"var(--error)",fontSize:12,marginTop:8},"data-testid":"sync-error",children:a}),u.jsxs("div",{className:"actions",children:[(N||i)&&u.jsx("button",{onClick:y,disabled:o,"data-testid":"sync-recheck",children:"Recheck"}),R&&!N&&u.jsx("button",{onClick:T,disabled:o,"data-testid":"sync-disconnect",children:"Disconnect"}),u.jsx("button",{onClick:e,"data-testid":"sync-close",children:"Close"})]})]})})}function mz({alert:e,onDismiss:t}){if(!e)return null;const n=e.kind==="fatal";return u.jsxs("div",{className:"conflict-banner","data-testid":"conflict-banner",role:"status",children:[u.jsx("span",{className:"ico",children:n?"⛔":"⚠️"}),n?u.jsxs("span",{children:[u.jsx("strong",{children:"Sync stopped."})," ",e.message||"The sync engine hit a fatal error."," Reconnect from the Collaborate dialog."]}):u.jsxs("span",{children:[u.jsx("strong",{children:"Sync conflict"})," on ",u.jsx("code",{children:e.path||"a file"})," — bmo-sync kept ",u.jsx("strong",{children:e.resolution||"the latest edit"}),e.user?` (also edited by ${e.user})`:"","."]}),u.jsx("span",{className:"spacer"}),u.jsx("button",{onClick:t,"data-testid":"conflict-dismiss",children:"Dismiss"})]})}function gz({urlToken:e,onClose:t}){const[n,r]=S.useState([]),[i,l]=S.useState(!0),[a,s]=S.useState(null),[o,c]=S.useState(null),[f,d]=S.useState({}),[p,h]=S.useState(null),m=e?{Authorization:`Bearer ${e}`}:{};function v(){l(!0),fetch("/api/conflicts",{headers:m}).then(y=>y.ok?y.json():{conflicts:[]}).then(y=>{r(Array.isArray(y==null?void 0:y.conflicts)?y.conflicts:[]),s(null)}).catch(y=>s(String((y==null?void 0:y.message)||y))).finally(()=>l(!1))}S.useEffect(v,[]);function w(y){return`${y.workspaceId}:${y.path}`}async function g(y){const C=w(y);if(f[C])return;const E=new URL("/api/conflicts/view",window.location.origin);E.searchParams.set("workspaceId",y.workspaceId),E.searchParams.set("path",y.path);const b=await fetch(E.toString(),{headers:m});if(!b.ok){s(`Could not load ${y.path} (HTTP ${b.status})`);return}const T=await b.json().catch(()=>null);T&&d(_=>({..._,[C]:{mine:oh(T.mine),theirs:oh(T.theirs),conflict:T.conflict}}))}async function x(y,C){const E=w(y);h(E);try{const b=await fetch("/api/conflicts/resolve",{method:"POST",headers:{"content-type":"application/json",...m},body:JSON.stringify({workspaceId:y.workspaceId,path:y.path,action:C})});if(!b.ok){const T=await b.json().catch(()=>({}));s((T==null?void 0:T.error)||`Resolve failed (HTTP ${b.status}).`);return}v(),c(null)}finally{h(null)}}return u.jsxs("div",{className:"conflict-panel","data-testid":"conflict-panel",role:"dialog","aria-label":"Open conflicts",children:[u.jsxs("header",{className:"conflict-panel-header",children:[u.jsx("strong",{children:"Open conflicts"})," ",u.jsxs("span",{className:"muted",children:["(",n.length,") · changes saved to the daemon back-office until you resolve"]}),u.jsx("span",{className:"spacer"}),u.jsx("button",{onClick:v,children:"Refresh"}),u.jsx("button",{onClick:t,children:"Close"})]}),i&&u.jsx("div",{className:"muted",children:"Loading…"}),a&&u.jsx("div",{className:"conflict-panel-error",children:a}),!i&&n.length===0&&u.jsx("div",{className:"muted",children:"No open conflicts."}),u.jsx("ul",{className:"conflict-list",children:n.map(y=>{const C=w(y),E=o===C,b=f[C];return u.jsxs("li",{className:"conflict-row",children:[u.jsxs("div",{className:"conflict-row-head",onClick:()=>{E?c(null):(c(C),y.resolution!=="remote_announced"&&g(y))},children:[u.jsx("code",{children:y.path}),u.jsxs("span",{className:"muted",children:["·"," ",y.resolution==="remote_announced"?`${y.conflictingUser||"peer"} flagged`:y.conflictingUser||"peer"," ","·"," ",new Date((y.detectedAt||0)*1e3).toLocaleTimeString()]}),u.jsx("span",{className:"spacer"}),u.jsx("span",{className:"muted",children:E?"▲":"▼"})]}),E&&y.resolution==="remote_announced"&&u.jsxs("div",{className:"conflict-row-body",children:[u.jsxs("div",{className:"muted",children:[y.conflictingUser||"A peer"," reported a conflict on this file. Your local copy is unchanged here — open it, decide whether to keep your version or pull theirs, save, and the next sync will reconcile."]}),u.jsx("div",{className:"conflict-actions",children:u.jsx("button",{disabled:p===C,onClick:()=>x(y,"keep_mine"),"data-testid":"conflict-acknowledge",children:"Acknowledge"})})]}),E&&y.resolution!=="remote_announced"&&u.jsxs("div",{className:"conflict-row-body",children:[!b&&u.jsx("div",{className:"muted",children:"Loading diff…"}),b&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"conflict-meta",children:[u.jsxs("span",{children:["mine: ",u.jsx("code",{children:Oo(y.mineSha256)})]}),u.jsxs("span",{children:["theirs: ",u.jsx("code",{children:Oo(y.theirsSha256)})]}),y.baseSha256&&u.jsxs("span",{children:["base: ",u.jsx("code",{children:Oo(y.baseSha256)})]})]}),u.jsx(yz,{mine:b.mine,theirs:b.theirs}),u.jsxs("div",{className:"conflict-actions",children:[u.jsx("button",{disabled:p===C,onClick:()=>x(y,"keep_mine"),"data-testid":"conflict-keep-mine",children:"Keep mine"}),u.jsx("button",{disabled:p===C,onClick:()=>x(y,"take_theirs"),"data-testid":"conflict-take-theirs",children:"Take theirs"})]})]})]})]},C)})})]})}function oh(e){if(typeof e!="string")return null;try{const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return new TextDecoder().decode(n)}catch{return null}}function Oo(e){return typeof e!="string"?"∅":e.length>12?`${e.slice(0,12)}…`:e}function yz({mine:e,theirs:t}){return e==null&&t==null?u.jsx("div",{className:"muted",children:"Both versions unavailable on disk."}):e==null||t==null?u.jsx("div",{className:"muted",children:"Only one side is available — the other was deleted before resolution."}):u.jsx(Sa,{oldText:t,newText:e})}function xz({role:e,urlToken:t,onSyncAlert:n,onOpenConflicts:r}){const[i,l]=S.useState([]),[a,s]=S.useState({tokensIn:0,tokensOut:0,costUsd:0}),[o,c]=S.useState([]),[f,d]=S.useState(!1),[p,h]=S.useState(null),[m,v]=S.useState(0);S.useEffect(()=>{if(e!=="partner")return;const C=t?{Authorization:`Bearer ${t}`}:{};fetch("/api/sync/status",{headers:C}).then(E=>E.ok?E.json():null).then(E=>{var b;E&&h({paired:!!E.paired,daemonRunning:!!((b=E.daemon)!=null&&b.running),peer:null})}).catch(()=>{}),fetch("/api/conflicts",{headers:C}).then(E=>E.ok?E.json():{conflicts:[]}).then(E=>v(Array.isArray(E==null?void 0:E.conflicts)?E.conflicts.length:0)).catch(()=>{})},[e,t]),S.useEffect(()=>{const C=window.location.protocol==="https:"?"wss":"ws",E=new URL(`${C}://${window.location.host}/ws/activity`);t&&E.searchParams.set("t",t);const b=new WebSocket(E.toString());return b.onopen=()=>d(!0),b.onclose=()=>d(!1),b.onmessage=T=>{let _;try{_=JSON.parse(T.data)}catch{return}_.type==="snapshot"?(l(_.snapshot.presence||[]),s(_.snapshot.usage||{tokensIn:0,tokensOut:0,costUsd:0}),c(_.snapshot.recent||[])):(c(R=>[...R.slice(-49),_]),w(_))},()=>{try{b.close()}catch{}}},[t]);function w(C){C.type==="daemon-status"?h(E=>({...E||{paired:!1},daemonRunning:!!C.connected})):C.type==="sync-paired"?h(E=>({...E||{},paired:!0,daemonRunning:!0})):C.type==="sync-detached"?h(E=>({...E||{},paired:!1,peer:null})):C.type==="remote-presence"?h(E=>({...E||{paired:!0},peer:C.user||null})):C.type==="sync-conflict"?(n==null||n({kind:"conflict",path:C.path,resolution:C.resolution,user:C.conflictingUser}),(C.resolution==="local_pre_write_guard"||C.resolution==="remote_announced")&&v(E=>E+1)):C.type==="sync-conflict-resolved"?v(E=>Math.max(0,E-1)):C.type==="sync-fatal"&&(n==null||n({kind:"fatal",message:C.message}))}const g=[...o].reverse().find(C=>C.type==="chat-stream"||C.type==="chat-user"||C.type==="chat-end"),x=o.find(C=>C.type==="inbox-change");let y=null;return p!=null&&p.paired&&(y=p.daemonRunning?u.jsxs("span",{className:"pill synced","data-testid":"activity-sync",children:["⇄ Synced",p.peer?` · with ${p.peer}`:""]}):u.jsx("span",{className:"pill sync-off","data-testid":"activity-sync",children:"⇄ Sync paused"})),u.jsxs("footer",{className:"bottombar","data-testid":"activity-bar",children:[u.jsx("span",{className:`pill ${f?"live":""}`,"data-testid":"activity-connected",children:f?"live":"reconnecting…"}),u.jsxs("span",{className:"pill","data-testid":"activity-presence",children:["👥 ",i.length," viewing"]}),y,e==="partner"&&m>0&&u.jsxs("button",{type:"button",className:"pill conflict-badge","data-testid":"activity-conflicts",onClick:()=>r==null?void 0:r(),title:"Resolve open sync conflicts",children:["🛑 ",m," conflict",m===1?"":"s"]}),u.jsxs("span",{className:"pill","data-testid":"activity-usage",children:["↓",a.tokensIn," ↑",a.tokensOut," · $",(a.costUsd||0).toFixed(3)]}),g&&u.jsx("span",{className:"pill",style:{maxWidth:380,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},"data-testid":"activity-last",children:g.type==="chat-end"?"✓ agent finished":"… agent streaming"}),x&&u.jsx("span",{className:"pill","data-testid":"activity-inbox",children:"📦 inbox updated"}),u.jsx("span",{style:{flex:1}}),u.jsxs("span",{style:{fontSize:11},children:["v0.1.0 · ",e]})]})}function vz(){var r;const[e,t]=S.useState(null);if(S.useEffect(()=>{let i=!1;async function l(){try{const o=await(await fetch("/api/inbox")).json();i||t(o)}catch{}}l();const a=setInterval(l,5e3);return()=>{i=!0,clearInterval(a)}},[]),!e||!e.hasInbox||!((r=e.imports)!=null&&r.length))return null;const n=e.imports.filter(i=>{var a;const l=Object.keys(e.installed||{}).find(s=>s.startsWith(i.replace(/-v[\d.]+$/,"")));return l?((a=e.installed[l])==null?void 0:a.integrated)!==!0:!0});return n.length===0?null:u.jsxs("div",{className:"inbox-card","data-testid":"inbox-card",children:["📦 ",u.jsx("strong",{children:"Component inbox"}),": ",n.length," pending integration",n.length!==1?"s":"",": ",n.join(", "),".",u.jsxs("span",{className:"muted",children:["Ask the agent: ",u.jsxs("em",{children:["“walk me through integrating ",n[0],"”"]})]})]})}function uh(e){return`${Math.round((Number(e)||0)*100)}%`}function ch(e){return`$${(Number(e)||0).toFixed(2)}`}function dh(e){const t=Math.max(0,Math.min(5,Math.round(Number(e)||0)));return"★★★★★".slice(0,t)+"☆☆☆☆☆".slice(0,5-t)}function Fo(e){var t,n;return((t=e.producer)==null?void 0:t.handle)==="you"||((n=e.producer)==null?void 0:n.kind)==="me"}function wz(e){const t=`${e.title} ${(e.tags||[]).join(" ")} ${e.pitch||""}`.toLowerCase(),n=[[/match|candidate|recruit|\bhir|screen|talent/,"🎯"],[/\bcv\b|resume|parse|extract/,"📄"],[/kanban|board|pipeline|stage|drag/,"🗂️"],[/deploy|cloudflare|worker|\bhost|ship|edge|serverless/,"🚀"],[/landing|waitlist|subscription|launch|checkout/,"🌱"],[/portfolio|personal site/,"🖼️"],[/receipt|expense|invoice|account/,"🧾"],[/feedback|survey|\bform\b/,"💬"],[/book|slot|appointment|schedul|calendar/,"📅"]];for(const[r,i]of n)if(r.test(t))return i;return"🧩"}function fh(e){var n,r,i,l;const t=(((n=e.reward)==null?void 0:n.unit)||"").toLowerCase();return e.hasService||((r=e.reward)==null?void 0:r.model)==="recurring"||/match|use/.test(t)?"earns per use":((i=e.reward)==null?void 0:i.model)==="one-time"?"one-time reward":(l=e.reward)!=null&&l.model?`${e.reward.model} reward`:null}function bz(e,t){var n;return t?`I want to build "${e.title}" from my own recipe.`:`I want to build "${e.title}". Use ${((n=e.producer)==null?void 0:n.name)||"the producer"}'s recipe.`}function kz({theme:e}){const t=(e==null?void 0:e.tokens)||{},n=`radial-gradient(120% 80% at 15% 0%, ${t.canvas1||"#e8f7f0"}, transparent 60%),radial-gradient(120% 90% at 100% 0%, ${t.canvas2||"#e7f0fb"}, transparent 55%),linear-gradient(160deg, ${t.canvas3||"#fef8ee"}, ${t.bg||"#ffffff"} 75%)`;return u.jsxs("div",{className:"bz-theme-swatch",style:{background:n},"aria-hidden":!0,children:[u.jsxs("span",{className:"bz-theme-card",style:{background:t.surface||"#fff",borderColor:t.border||"#e2e6ee"},children:[u.jsx("span",{className:"bz-theme-line",style:{background:t.text||"#1d2430"}}),u.jsx("span",{className:"bz-theme-line short",style:{background:t.textMuted||"#687083"}})]}),u.jsx("span",{className:"bz-theme-dot",style:{background:(e==null?void 0:e.accent)||"#0891b2"}})]})}function Sz({onClose:e,onBuild:t,onApplyTheme:n,token:r}){const[i,l]=S.useState([]),[a,s]=S.useState(null),[o,c]=S.useState(null),[f,d]=S.useState(null),[p,h]=S.useState(null);async function m(E){if(!(!n||p)){h(E.id);try{const b=r?{Authorization:`Bearer ${r}`}:{},T=await fetch(`/api/bazaar/themes/${encodeURIComponent(E.id)}/apply`,{method:"POST",headers:b}),_=T.ok?await T.json():null,R=(_==null?void 0:_.theme)||E.theme;R?(n(R),e==null||e()):c("Could not apply that theme.")}catch(b){c(String(b.message||b))}finally{h(null)}}}S.useEffect(()=>{let E=!1;async function b(){try{const[T,_]=await Promise.all([fetch("/api/bazaar/shelf"),fetch("/api/bazaar/state")]);if(E)return;const R=await T.json(),N=await _.json();if(E)return;const M=(R.recipes||[]).slice().sort(($,L)=>(L.outcomeScore||0)-($.outcomeScore||0));l(M),s(N)}catch(T){E||c(String(T.message||T))}}return b(),()=>{E=!0}},[]);const v=((a==null?void 0:a.earnings)||[]).filter(E=>E.total>0),w=i.filter(E=>E.kind==="theme"),g=i.filter(E=>E.kind!=="theme"),x=g.filter(Fo),y=v.find(E=>E.handle==="you"),C=new Set(i.map(E=>{var b,T;return((b=E.producer)==null?void 0:b.handle)||((T=E.producer)==null?void 0:T.name)||"?"})).size;return u.jsx("div",{className:"modal-backdrop",onClick:e,children:u.jsxs("div",{className:"modal bazaar-modal",onClick:E=>E.stopPropagation(),"data-testid":"bazaar-shelf",children:[u.jsxs("div",{className:"bz-store-head",children:[u.jsxs("div",{className:"bz-store-headings",children:[u.jsx("h2",{children:"🛍️ The bazaar"}),u.jsx("p",{className:"muted bz-store-sub",children:"Proven recipes from a network of producers. Your agent reaches onto this shelf for you — ranked by how often each one actually gets a working result, not by marketing."})]}),u.jsxs("div",{className:"bz-store-stats","data-testid":"bazaar-store-stats",children:[u.jsxs("span",{className:"bz-stat",children:[u.jsx("strong",{children:g.length}),"recipes"]}),w.length>0&&u.jsxs("span",{className:"bz-stat",children:[u.jsx("strong",{children:w.length}),"themes"]}),u.jsxs("span",{className:"bz-stat",children:[u.jsx("strong",{children:C}),"producers"]})]})]}),o&&u.jsx("div",{className:"bz-err",children:o}),x.length>0&&u.jsxs("div",{className:"bz-you-banner","data-testid":"bazaar-you-banner",children:[u.jsx("span",{className:"bz-you-spark",children:"✦"}),u.jsxs("span",{children:["You're a producer here — ",u.jsx("strong",{children:x.length})," ",x.length===1?"of your recipes is":"of your recipes are"," on the shelf",y&&u.jsxs(u.Fragment,{children:[" · earning ",u.jsx("strong",{children:ch(y.total)}),u.jsx("span",{className:"bz-represented",children:" represented"})]})]})]}),w.length>0&&u.jsxs("div",{className:"bz-theme-section","data-testid":"bazaar-themes",children:[u.jsxs("div",{className:"bz-theme-section-head",children:[u.jsx("span",{className:"gallery-section",children:"🎨 themes — make your workspace yours"}),u.jsx("span",{className:"muted bz-theme-section-sub",children:"Pure colour, applies in one tap. The maker earns when you wear it."})]}),u.jsx("div",{className:"bz-theme-grid",children:w.map(E=>{var T,_,R;const b=Fo(E);return u.jsxs("div",{className:`bz-theme-card-wrap${b?" mine":""}`,"data-testid":`shelf-theme-${E.id}`,children:[u.jsx(kz,{theme:E.theme}),u.jsxs("div",{className:"bz-theme-meta",children:[u.jsx("span",{className:"bz-theme-title",children:E.title}),u.jsxs("span",{className:"bz-theme-by",children:["by ",((T=E.producer)==null?void 0:T.name)||"a maker",b&&" (you)"]}),E.pitch&&u.jsx("span",{className:"bz-theme-pitch",children:E.pitch}),u.jsxs("div",{className:"bz-theme-foot",children:[((_=E.rating)==null?void 0:_.count)>0&&u.jsx("span",{className:"bz-theme-rating",children:dh(E.rating.stars)}),u.jsxs("span",{className:"bz-reward-pill",children:[ch((R=E.reward)==null?void 0:R.oneTimeValue)," · per apply"]})]})]}),u.jsx("button",{type:"button",className:"bz-theme-apply","data-testid":`shelf-apply-theme-${E.id}`,disabled:p===E.id,onClick:()=>m(E),children:p===E.id?"Applying…":"Apply"})]},E.id)})})]}),u.jsx("div",{className:"bz-shelf-grid","data-testid":"bazaar-shelf-grid",children:g.map(E=>{var N,M,$,L,B,I;const b=Fo(E),T=((N=E.outcomeStats)==null?void 0:N.builds)||0,_=T===0||E.safetyBadge==="new",R=f===E.id;return u.jsxs("div",{className:`bz-card${b?" mine":""}${R?" open":""}`,"data-testid":`shelf-recipe-${E.id}`,onClick:()=>d(R?null:E.id),children:[u.jsxs("div",{className:"bz-card-head",children:[u.jsx("span",{className:"bz-card-glyph","aria-hidden":!0,children:wz(E)}),u.jsxs("div",{className:"bz-card-titles",children:[u.jsx("span",{className:"bz-card-title",children:E.title}),u.jsxs("span",{className:"bz-card-by",children:["by ",((M=E.producer)==null?void 0:M.name)||"a producer",u.jsx("span",{className:`bz-kind bz-kind-${b?"you":(($=E.producer)==null?void 0:$.kind)||"maker"}`,children:b?"you":((L=E.producer)==null?void 0:L.kind)==="vendor"?"vendor":"maker"}),E.hasService&&u.jsx("span",{className:"bz-kind bz-kind-tool",children:"tool"})]})]}),u.jsx("div",{className:"bz-card-score",children:_?u.jsx("span",{className:"bz-new",title:"Just listed — earns its rank by working",children:"NEW"}):u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"bz-score-pct",children:uh(E.outcomeScore)}),u.jsx("span",{className:"bz-score-label",children:"works"})]})})]}),!_&&u.jsx("div",{className:"bz-score-bar",title:"Measured: how often this recipe reaches a working result",children:u.jsx("i",{style:{width:uh(E.outcomeScore)}})}),E.pitch&&u.jsx("p",{className:"bz-card-pitch",children:E.pitch}),u.jsxs("div",{className:"bz-card-foot",children:[E.safetyBadge&&E.safetyBadge!=="new"&&u.jsx("span",{className:`bz-badge bz-badge-${E.safetyBadge}`,children:E.safetyBadge}),((B=E.rating)==null?void 0:B.count)>0&&u.jsxs("span",{className:"bz-card-rating",title:`${E.rating.stars} from ${E.rating.count}`,children:[dh(E.rating.stars)," ",u.jsxs("span",{className:"muted",children:["(",E.rating.count,")"]})]}),fh(E)&&u.jsx("span",{className:"bz-reward-pill",children:fh(E)}),u.jsx("span",{className:"bz-card-expand",children:R?"▾":"▸"})]}),R&&u.jsxs("div",{className:"bz-card-detail","data-testid":`shelf-detail-${E.id}`,children:[E.summary&&u.jsx("p",{className:"bz-detail-summary",children:E.summary}),!_&&T>0&&u.jsxs("p",{className:"muted bz-detail-stat",children:[E.outcomeStats.working," of ",T," builds reached a working result."]}),u.jsxs("p",{className:"bz-detail-hint",children:["Your agent builds this for you and credits"," ",b?"you":((I=E.producer)==null?void 0:I.name)||"the producer"," when it does."]}),t&&u.jsx("button",{type:"button",className:"bz-build-btn","data-testid":`shelf-build-${E.id}`,onClick:J=>{J.stopPropagation(),t(bz(E,b))},children:"Build this →"})]})]},E.id)})}),u.jsx("div",{className:"actions",children:u.jsx("button",{onClick:e,"data-testid":"bazaar-shelf-close",children:"Close"})})]})})}const Ez=[{id:"concise",label:"Concise",sample:"Got it. Done."},{id:"playful",label:"Playful",sample:"Oh nice — let's go!"},{id:"formal",label:"Formal",sample:"Understood. Proceeding now."},{id:"dry",label:"Dry",sample:"Sure. If we must."}],ph=["#22d3ee","#a78bfa","#f472b6","#facc15","#34d399","#fb7185"],jz=[{id:"drive",label:"Google Drive",note:"Files & docs"},{id:"notion",label:"Notion",note:"Wiki & notes"},{id:"gmail",label:"Gmail",note:"Inbox & threads"},{id:"calendar",label:"Calendar",note:"Schedule"},{id:"canva",label:"Canva",note:"Designs"},{id:"github",label:"GitHub",note:"Code & PRs"}],Cz=new Set(["login","missing","subscribe"]),Nz=new Set(["login","missing"]),hh={missing:{title:"Almost there — I need Claude installed before I can think.",subtitle:"That's the brain I run on. Install it once, then come back here.",cmdLabel:"Run this in your terminal",cmd:"curl -fsSL https://claude.ai/install.sh | bash",after:"Then come back and press the button below.",retry:"Still don't see Claude on this machine. Make sure the install finished, then try again."},login:{title:"One quick thing before we dig in — sign me in to Claude.",subtitle:"It's a one-time sign-in to your own Claude account — it runs on your machine, on your plan. After this you won't be asked again.",cmdLabel:"Run this once in your terminal",cmd:"claude auth login",after:"A browser window opens — sign in with your Claude account, then come back and press the button.",retry:"Hmm — still not signed in. Finish the sign-in in your browser, then press it again."},subscribe:{title:"You're in — I just need an active Claude plan to start thinking.",subtitle:"Claude Code runs on a Claude Pro plan (or higher). Grab one on your own account, then come back — you won’t be asked again.",cmdLabel:"Get a plan, then come back",link:"https://claude.ai/upgrade",linkLabel:"Open claude.ai →",after:"Subscribe at claude.ai, then come back and press the button.",retry:"Still no active plan showing. Give it a moment after subscribing, then try again."}},Tz=new Set(["md","txt","json","yml","yaml","toml","js","mjs","cjs","ts","tsx","jsx","py","rb","go","rs","java","kt","swift","c","h","cpp","cc","hpp","css","scss","html","sh","env","sql","xml","svg","csv"]);function _z(e){const t=e.lastIndexOf(".");return t>=0?e.slice(t+1).toLowerCase():""}function zz(e){if(!e)return null;try{const t=new URL(e);return t.hostname==="localhost"||t.hostname==="127.0.0.1"?null:t.protocol==="http:"&&(t.port===""||t.port==="80")||t.protocol==="https:"&&(t.port===""||t.port==="443")?t.hostname:`${t.hostname}:${t.port}`}catch{return null}}async function Pz(e){const t=Array.from(e||[]).slice(0,200);if(t.length===0)return{folderName:null,files:[]};const n=(t[0].webkitRelativePath||t[0].name).split("/")[0]||"folder",r=40,i=600,l=[];for(const s of t){if(l.length>=r)break;const o=s.webkitRelativePath||s.name,c=_z(s.name);if(!Tz.has(c)){l.push({path:o,head:""});continue}if(s.size>100*1024){l.push({path:o,head:""});continue}try{const p=await s.slice(0,i).text();l.push({path:o,head:p})}catch{l.push({path:o,head:""})}}const a=Math.max(t.length-l.length,0);return{folderName:n,files:l,totalFiles:t.length,untouched:a}}function Rz({peekSummary:e,services:t,agentName:n}){const r=[],i=e!=null&&e.folderName?` (you just glanced at "${e.folderName}")`:"";return r.push({kind:"survey",title:"Tell me what's in my workspace",sub:e!=null&&e.folderName?"I'll read the workspace I'm running in and summarize.":"I'll read what's here and summarize the project."}),(t==null?void 0:t.size)>0?r.push({kind:"startup",title:"Help me start something new",sub:`${n} will ask one question to figure out what to build.`}):r.push({kind:"startup",title:"Help me start a project",sub:"Tell me the rough idea — I'll scaffold it."}),r.push({kind:"chat",title:"Just chat — find me work",sub:"No agenda yet. Get me into the workspace."}),r}function mh(e,t=55,n=380){const[r,i]=S.useState(""),[l,a]=S.useState(!1),[s,o]=S.useState(!1);return S.useEffect(()=>{if(!e){i(""),a(!1),o(!1);return}i(""),a(!1),o(!1);let c=0,f=null;const d=setTimeout(()=>{o(!0),f=setInterval(()=>{c+=1,i(e.slice(0,c)),c>=e.length&&(clearInterval(f),a(!0))},t)},n);return()=>{clearTimeout(d),f&&clearInterval(f)}},[e,t,n]),[r,l,s]}function Yn({children:e,from:t="agent",accent:n,streaming:r=!1}){return u.jsx("div",{className:`ob-bubble ob-bubble-${t}${r?" ob-bubble-streaming":""}`,style:t==="user"?{borderColor:n}:void 0,children:e})}function Wr(){return u.jsx("span",{className:"ob-caret","aria-hidden":"true",children:"▍"})}function gh(e){const t=Math.random().toString(36).slice(2,8);return`${e}-${Date.now().toString(36)}-${t}`}function Iz({session:e,token:t,onComplete:n}){var Re,Me,at,ut;const[r,i]=S.useState(1),l=S.useMemo(()=>zz(e==null?void 0:e.shareBaseUrl),[e==null?void 0:e.shareBaseUrl]),[a,s]=S.useState(((Re=e==null?void 0:e.identity)==null?void 0:Re.name)||""),[o,c]=S.useState(((Me=e==null?void 0:e.identity)==null?void 0:Me.tone)||"concise"),[f,d]=S.useState(((at=e==null?void 0:e.identity)==null?void 0:at.color)||ph[0]),[p,h]=S.useState(!1),[m,v]=S.useState(null),[w,g]=S.useState(null),[x,y]=S.useState(!1),[C,E]=S.useState(!1),[b,T]=S.useState(null),[_,R]=S.useState(""),[N,M]=S.useState(new Set(((ut=e==null?void 0:e.identity)==null?void 0:ut.connectedServices)||[])),[$,L]=S.useState(!1),[B,I]=S.useState(null),[J,le]=S.useState(null),[A,q]=S.useState(!1),k=S.useRef(null),Q=S.useRef(null),ae=S.useRef({}),[j,oe]=S.useState({}),ve=S.useCallback((P,Z,de)=>{P&&oe(ye=>{const X=ye[P]||{text:"",done:!1,error:null},he=Z==="text"?X.text+(de||""):X.text,ie={...ye,[P]:{...X,text:he}};return ae.current[P]=he,ie})},[]),ne=S.useCallback((P,Z)=>{P&&oe(de=>{const ye=de[P]||{text:"",done:!1,error:null};return{...de,[P]:{...ye,done:!0,error:Z||ye.error}}})},[]);S.useEffect(()=>{let P=!1,Z=0,de=null,ye=null;const X=()=>{if(P)return;const he=window.location.protocol==="https:"?"wss":"ws",ie=new URL(`${he}://${window.location.host}/ws/chat`);t&&ie.searchParams.set("t",t),ye=new WebSocket(ie.toString()),Q.current=ye,ye.onmessage=xe=>{var be;let ge;try{ge=JSON.parse(xe.data)}catch{return}ge.type==="chunk"&&((be=ge.chunk)==null?void 0:be.type)==="text"?ve(ge.messageId,"text",ge.chunk.text):ge.type==="end"?ne(ge.messageId,null):ge.type==="error"&&ne(ge.messageId,ge.message||"agent error")},ye.onopen=()=>{Z=0},ye.onclose=()=>{if(Q.current=null,P)return;const xe=Math.min(1e3*2**Z,8e3);Z+=1,de=setTimeout(X,xe)},ye.onerror=()=>{}};return X(),()=>{P=!0,clearTimeout(de);try{ye==null||ye.close()}catch{}}},[t,ve,ne]),S.useEffect(()=>{document.documentElement.style.setProperty("--accent",f),document.documentElement.style.setProperty("--accent-hot",f)},[f]);const re=S.useMemo(()=>{const P={"content-type":"application/json"};return t&&(P.Authorization=`Bearer ${t}`),P},[t]);async function we(P){const Z=await fetch("/api/agent/identity",{method:"POST",headers:re,body:JSON.stringify({name:a,tone:o,color:f,...P})});if(!Z.ok){const de=await Z.json().catch(()=>({}));throw new Error(de.error||`save failed (${Z.status})`)}return Z.json()}const ce=S.useCallback(async(P=!1)=>{y(!0);try{const Z=await fetch(`/api/agent/readiness${P?"?fresh=1":""}`,{headers:re});return Z.ok?await Z.json():{status:"unknown"}}catch{return{status:"unknown"}}finally{y(!1)}},[re]);async function ze(){if(v(null),!a.trim()){v("Pick a name — even just one syllable.");return}h(!0);try{await we({});const P=await ce(!1);if(Cz.has(P.status)){g(P);return}i(2)}catch(P){v(String(P.message||P))}finally{h(!1)}}async function Y(){const P=await ce(!0);if(E(!0),P.status==="login"||P.status==="missing"){g(P);return}g(null),i(2)}async function _e(){const P=await ce(!0);if(P.status==="ready"||P.status==="unknown"){T(null),g(null),i(2);return}T(null),g(P)}async function fe(){E(!1),T({status:"starting",url:null,error:null});try{const Z=await(await fetch("/api/agent/login/start",{method:"POST",headers:re})).json();T(Z),Z.status==="success"&&_e()}catch{T({status:"error",url:null,error:"Could not start sign-in."})}}async function pt(){const P=_.trim();if(P){R("");try{const Z=await fetch("/api/agent/login/code",{method:"POST",headers:{...re,"content-type":"application/json"},body:JSON.stringify({code:P})});T(await Z.json())}catch{}}}S.useEffect(()=>{if(!(b&&["starting","awaiting-browser","awaiting-code"].includes(b.status)))return;let Z=!0;const de=setInterval(async()=>{try{const X=await(await fetch("/api/agent/login/status",{headers:re})).json();if(!Z)return;T(X),X.status==="success"&&(clearInterval(de),_e())}catch{}},2e3);return()=>{Z=!1,clearInterval(de)}},[b==null?void 0:b.status,re]);const[rt,Fe]=S.useState(null),Le=rt?j[rt]:null;async function Ft(P){if(le(null),!(!P||P.length===0)){L(!0);try{const Z=await Pz(P);if(Z.files.length===0){le("That folder looks empty — try another?"),L(!1);return}I(Z);const de=gh("peek");Fe(de),oe(X=>({...X,[de]:{text:"",done:!1,error:null}}));const ye=await fetch("/api/onboarding/peek",{method:"POST",headers:re,body:JSON.stringify({folderName:Z.folderName,files:Z.files,totalFiles:Z.totalFiles,messageId:de})});if(!ye.ok){const X=await ye.json().catch(()=>({}));throw new Error(X.error||`peek failed (${ye.status})`)}}catch(Z){le(String(Z.message||Z))}finally{L(!1)}}}function De(P){M(Z=>{const de=new Set(Z);return de.has(P)?de.delete(P):de.add(P),de})}const[je,qe]=S.useState(null),[Ke,it]=S.useState(null),[un,ht]=S.useState(null),z=je?j[je]:null,[F,te]=S.useState(null),[pe,me]=S.useState(!1);async function Ae(){ht(null),it("remix"),me(!0);try{const de=((await(await fetch("/api/bazaar/shelf",{headers:re})).json()).recipes||[]).slice().sort((ye,X)=>(X.outcomeScore||0)-(ye.outcomeScore||0)).slice(0,3);te(de)}catch{te([])}finally{me(!1)}}async function Qe(P){var de;const Z=`Build me “${P.title}”. Use ${((de=P.producer)==null?void 0:de.name)||"the producer"}'s recipe.`;try{await we({connectedServices:[...N]}),await fetch("/api/agent/onboarded",{method:"POST",headers:re}),n==null||n({build:Z})}catch(ye){ht(String(ye.message||ye))}}async function ot(P){ht(null),it(P);const Z=gh("job");qe(Z),oe(de=>({...de,[Z]:{text:"",done:!1,error:null}}));try{await we({connectedServices:[...N]});const de=await fetch("/api/onboarding/start-job",{method:"POST",headers:re,body:JSON.stringify({kind:P,messageId:Z,peekFolderName:(B==null?void 0:B.folderName)||null})});if(!de.ok){const ye=await de.json().catch(()=>({}));throw new Error(ye.error||`start-job failed (${de.status})`)}}catch(de){ht(String(de.message||de)),qe(null),it(null)}}async function bt(){var P;try{await we({connectedServices:[...N]});const Z=await fetch("/api/agent/onboarded",{method:"POST",headers:re});if(!Z.ok){const ye=await Z.json().catch(()=>({}));throw new Error(ye.error||`mark-onboarded failed (${Z.status})`)}let de=null;if(je&&(z!=null&&z.done)&&z.text&&!z.error){const ye=((P=K.find(X=>X.kind===Ke))==null?void 0:P.title)||"Let’s get started";de={messageId:je,userText:ye,agentText:z.text}}n==null||n(de?{seedChat:de}:void 0)}catch(Z){v(String(Z.message||Z))}}const mt=a.trim()||"your agent",Ze="Hey. I'm new here.",We="Before we start — what should I call myself?",[xt,O]=mh(r===1?Ze:"",65,420),[W,G]=mh(r===1&&O?We:"",48,520),U=r===1?G:!0,K=S.useMemo(()=>Rz({peekSummary:B,services:N,agentName:mt}),[B,N,mt]),se=w?hh[w.status]||hh.login:null,Te=w?Nz.has(w.status):!1;return u.jsx("div",{className:"ob-root",children:u.jsxs("div",{className:"ob-stage",children:[u.jsxs("div",{className:"ob-brand",children:[u.jsx("span",{className:"ob-brand-mark",children:"✦"})," VentureWild"]}),u.jsxs("header",{className:"ob-header",children:[u.jsx("div",{className:"ob-step-dots","aria-label":`Step ${r} of 4`,children:[1,2,3,4].map(P=>u.jsx("span",{className:`ob-dot ${P===r?"active":""} ${P<r?"done":""}`},P))}),r>1&&!w&&u.jsx("button",{className:"ob-back",onClick:()=>i(r-1),children:"← Back"})]}),w&&se&&u.jsxs("section",{className:"ob-step",children:[u.jsxs(Yn,{children:[u.jsx("p",{className:"ob-bubble-text",children:se.title}),u.jsx("p",{className:"ob-bubble-subtle",children:se.subtitle})]}),u.jsxs("div",{className:"ob-card ob-reveal",children:[w.status==="login"?u.jsxs("div",{className:"ob-login-inapp",children:[(!b||b.status==="idle")&&u.jsx("button",{className:"ob-next primary",onClick:fe,children:"Sign in to Claude →"}),b&&(b.status==="starting"||b.status==="awaiting-browser")&&u.jsxs(u.Fragment,{children:[u.jsx("p",{className:"ob-bubble-text",children:"Opening Claude in your browser…"}),u.jsx("p",{className:"ob-bubble-subtle",children:"Sign in there with your Claude account — I'll detect it automatically, nothing to come back and click."}),b.url&&u.jsx("a",{className:"ob-login-link",href:b.url,target:"_blank",rel:"noreferrer",children:"If the browser didn't open, click here →"})]}),b&&b.status==="awaiting-code"&&u.jsxs("div",{className:"ob-login-code",children:[u.jsx("label",{className:"ob-label",children:"Paste the code from your browser"}),u.jsxs("div",{className:"ob-actions",children:[u.jsx("input",{className:"ob-input",value:_,onChange:P=>R(P.target.value),placeholder:"code from claude.ai"}),u.jsx("button",{className:"ob-next primary",onClick:pt,children:"Submit"})]})]}),b&&(b.status==="error"||b.status==="unsupported")&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"ob-error",children:[b.error||"I couldn't run the in-app sign-in."," You can sign in from a terminal instead:"]}),u.jsx("div",{className:"ob-login-cmd",children:u.jsx("code",{children:se.cmd})}),u.jsx("p",{className:"ob-bubble-subtle",style:{marginTop:10},children:se.after})]})]}):u.jsxs(u.Fragment,{children:[u.jsx("label",{className:"ob-label",children:se.cmdLabel}),se.cmd?u.jsx("div",{className:"ob-login-cmd",children:u.jsx("code",{children:se.cmd})}):u.jsx("a",{className:"ob-login-link",href:se.link,target:"_blank",rel:"noreferrer",children:se.linkLabel}),u.jsx("p",{className:"ob-bubble-subtle",style:{marginTop:10},children:se.after})]}),C&&u.jsx("div",{className:"ob-error",style:{marginTop:12},children:se.retry}),u.jsx("div",{className:"ob-actions",children:u.jsx("button",{className:"ob-next primary",onClick:Y,disabled:x,children:x?"Checking…":"I've done it — continue →"})}),!Te&&u.jsx("div",{className:"ob-actions",children:u.jsx("button",{className:"ob-skip",onClick:()=>{g(null),i(2)},children:"I already have a plan — continue"})})]})]}),r===1&&!w&&u.jsxs("section",{className:"ob-step",children:[u.jsxs(Yn,{streaming:!O||!G,children:[u.jsxs("p",{className:"ob-bubble-text",children:[xt,!O&&u.jsx(Wr,{})]}),O&&u.jsxs("p",{className:"ob-bubble-text",children:[W,!G&&u.jsx(Wr,{})]})]}),U&&u.jsxs("div",{className:"ob-card ob-reveal",children:[u.jsx("label",{className:"ob-label",children:"Name"}),u.jsx("input",{autoFocus:!0,className:"ob-input",placeholder:"Echo, Pip, Atlas, Sage…",value:a,onChange:P=>s(P.target.value),onKeyDown:P=>{P.key==="Enter"&&ze()},maxLength:40}),u.jsx("label",{className:"ob-label",children:"Voice"}),u.jsx("div",{className:"ob-tone-grid",children:Ez.map(P=>u.jsxs("button",{className:`ob-tone ${o===P.id?"selected":""}`,onClick:()=>c(P.id),children:[u.jsx("span",{className:"ob-tone-label",children:P.label}),u.jsx("span",{className:"ob-tone-sample",children:P.sample})]},P.id))}),u.jsx("label",{className:"ob-label",children:"Color"}),u.jsx("div",{className:"ob-color-row",children:ph.map(P=>u.jsx("button",{className:`ob-color-swatch ${f===P?"selected":""}`,style:{background:P},onClick:()=>d(P),"aria-label":`Pick ${P}`},P))}),m&&u.jsx("div",{className:"ob-error",children:m}),u.jsx("div",{className:"ob-actions",children:u.jsx("button",{className:"ob-next primary",onClick:ze,disabled:p||!a.trim(),children:p?"Saving…":`I'm ${mt}. Let's go →`})})]})]}),r===2&&u.jsxs("section",{className:"ob-step",children:[u.jsxs(Yn,{children:[u.jsx("p",{className:"ob-bubble-text",children:"Cool. Now — show me something you're working on. Drag a folder onto me."}),u.jsx("p",{className:"ob-bubble-subtle",children:"I'll read filenames + a short sample of each text file (≤40 files, ≤600 bytes each) so I can react. Files stay on your machine; the sample goes to Anthropic the same way every chat turn does. Pick something you'd be OK talking about in chat."})]}),u.jsxs("div",{className:`ob-dropzone ${A?"over":""} ${$?"peeking":""}`,onDragOver:P=>{P.preventDefault(),q(!0)},onDragLeave:()=>q(!1),onDrop:async P=>{var de,ye;P.preventDefault(),q(!1);const Z=(de=P.dataTransfer)==null?void 0:de.items;if(Z&&Z.length>0&&Z[0].webkitGetAsEntry){const X=[],he=async(ie,xe="")=>{if(ie.isFile)await new Promise(ge=>ie.file(be=>{try{Object.defineProperty(be,"webkitRelativePath",{value:`${xe}${be.name}`})}catch{}X.push(be),ge()},ge));else if(ie.isDirectory){const ge=ie.createReader();await new Promise(be=>ge.readEntries(async Be=>{for(const ct of Be)await he(ct,`${xe}${ie.name}/`);be()},be))}};for(const ie of Z){const xe=ie.webkitGetAsEntry();xe&&await he(xe)}if(X.length>0){await Ft(X);return}}await Ft((ye=P.dataTransfer)==null?void 0:ye.files)},onClick:()=>{var P;return(P=k.current)==null?void 0:P.click()},children:[u.jsx("input",{ref:k,type:"file",webkitdirectory:"",directory:"",multiple:!0,style:{display:"none"},onChange:P=>Ft(P.target.files)}),$?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"ob-drop-icon",children:"👀"}),u.jsx("div",{className:"ob-drop-title",children:"Looking…"})]}):B?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"ob-drop-icon",children:"📁"}),u.jsx("div",{className:"ob-drop-title",children:B.folderName}),u.jsxs("div",{className:"ob-drop-sub",children:[B.totalFiles," file",B.totalFiles===1?"":"s"," · sampled ",B.files.length]})]}):u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"ob-drop-icon",children:"📂"}),u.jsx("div",{className:"ob-drop-title",children:"Drop a folder here"}),u.jsx("div",{className:"ob-drop-sub",children:"or click to pick one"})]})]}),Le&&u.jsxs(Yn,{streaming:!Le.done,children:[Le.text?u.jsxs("p",{className:"ob-bubble-text",children:[Le.text,!Le.done&&u.jsx(Wr,{})]}):u.jsxs("p",{className:"ob-bubble-subtle",children:["👀 ",mt," is reading…",!Le.done&&u.jsx(Wr,{})]}),Le.error&&u.jsx("p",{className:"ob-bubble-subtle ob-bubble-error",children:Le.error})]}),J&&u.jsx("div",{className:"ob-error",children:J}),u.jsxs("div",{className:"ob-actions",children:[u.jsx("button",{className:"ob-skip",onClick:()=>i(3),children:"Skip — I'd rather just chat"}),u.jsx("button",{className:"ob-next primary",onClick:()=>i(3),disabled:!B&&!J,children:"Next →"})]})]}),r===3&&u.jsxs("section",{className:"ob-step",children:[u.jsxs(Yn,{children:[u.jsx("p",{className:"ob-bubble-text",children:"Anything I should keep an eye on?"}),u.jsx("p",{className:"ob-bubble-subtle",children:"Totally optional. Flag what lives in your world and I'll wire it up when these land — you can always add more later."})]}),u.jsx("div",{className:"ob-tile-grid",children:jz.map(P=>u.jsxs("button",{className:`ob-tile ${N.has(P.id)?"selected":""}`,onClick:()=>De(P.id),children:[u.jsx("span",{className:"ob-tile-label",children:P.label}),u.jsx("span",{className:"ob-tile-note",children:P.note}),N.has(P.id)&&u.jsx("span",{className:"ob-tile-check",children:"✓"})]},P.id))}),u.jsxs("div",{className:"ob-soon",children:["These connection flows are landing soon — your picks are saved. And I don't live on one device:",l?u.jsxs(u.Fragment,{children:[" open ",u.jsx("code",{children:l})," on your phone with the same login"]}):u.jsx(u.Fragment,{children:" sign in on any device with the same login"})," ","and I'm right there — same memory, same conversation."]}),u.jsxs("div",{className:"ob-actions",children:[u.jsx("button",{className:"ob-skip",onClick:()=>i(4),children:"Skip →"}),u.jsx("button",{className:"ob-next primary",onClick:()=>i(4),children:"Next: first job →"})]})]}),r===4&&u.jsxs("section",{className:"ob-step",children:[u.jsxs(Yn,{children:[u.jsx("p",{className:"ob-bubble-text",children:"Right — what should I actually do for you first?"}),u.jsx("p",{className:"ob-bubble-subtle",children:"Pick one and I'll start now. Or close this and just talk to me."})]}),F?u.jsxs("div",{className:"ob-remix",children:[u.jsx(Yn,{children:u.jsx("p",{className:"ob-bubble-text",children:"Here's what other builders already got working. Pick one — I'll build it for you the moment you land in your workspace."})}),F.length===0?u.jsx("div",{className:"ob-error",children:"The shelf is empty right now — start from scratch instead."}):F.map(P=>{var Z;return u.jsxs("button",{className:"ob-remix-card",onClick:()=>Qe(P),children:[u.jsxs("div",{className:"ob-remix-main",children:[u.jsx("span",{className:"ob-remix-title",children:P.title}),u.jsxs("span",{className:"ob-remix-by",children:["by ",((Z=P.producer)==null?void 0:Z.name)||"a builder"]}),P.pitch&&u.jsx("span",{className:"ob-remix-pitch",children:P.pitch})]}),u.jsxs("div",{className:"ob-remix-stat",children:[u.jsxs("span",{className:"ob-remix-pct",children:[Math.round((P.outcomeScore||0)*100),"%"]}),u.jsx("span",{className:"ob-remix-pct-sub",children:"worked"})]})]},P.id)}),u.jsx("div",{className:"ob-actions",children:u.jsx("button",{className:"ob-skip",onClick:()=>{te(null),it(null)},children:"← Pick a different job"})})]}):je?u.jsxs(u.Fragment,{children:[u.jsxs(Yn,{streaming:!z||!z.done,children:[z!=null&&z.text?u.jsxs("p",{className:"ob-bubble-text",children:[z.text,!z.done&&u.jsx(Wr,{})]}):u.jsxs("p",{className:"ob-bubble-subtle",children:[mt," is on it…",(!z||!z.done)&&u.jsx(Wr,{})]}),(z==null?void 0:z.error)&&u.jsx("p",{className:"ob-bubble-subtle ob-bubble-error",children:z.error})]}),u.jsxs("div",{className:"ob-actions",children:[u.jsx("button",{className:"ob-skip",onClick:()=>{qe(null),it(null)},children:"← Pick a different job"}),u.jsx("button",{className:"ob-next primary",onClick:bt,disabled:!z||!z.done&&!z.error,children:z!=null&&z.done?"Open my workspace →":"Streaming…"})]})]}):u.jsxs("div",{className:"ob-jobs",children:[u.jsxs("button",{className:"ob-job ob-job-remix",onClick:Ae,disabled:pe,children:[u.jsx("div",{className:"ob-job-title",children:"✦ Remix a proven build"}),u.jsx("div",{className:"ob-job-sub",children:pe?"Pulling up what others have made…":"Start from something other builders already got working — I'll build one for you now."})]}),K.map(P=>u.jsxs("button",{className:"ob-job",onClick:()=>ot(P.kind),children:[u.jsx("div",{className:"ob-job-title",children:P.title}),u.jsx("div",{className:"ob-job-sub",children:P.sub})]},P.kind))]}),(m||un)&&u.jsx("div",{className:"ob-error",children:m||un}),!je&&!F&&u.jsx("div",{className:"ob-actions",children:u.jsx("button",{className:"ob-skip",onClick:bt,children:"Skip to chat →"})})]}),!w&&u.jsx("p",{className:"ob-consent-note",children:"I quietly share how I'm doing — what's working, what breaks, my setup health — with the Venturewild team so they can help if you ever get stuck. Never your words or files. You can turn this off anytime."})]})})}const Az={display:"grid",placeItems:"center",minHeight:"100vh",padding:24,textAlign:"center"},Dz={maxWidth:420,display:"grid",gap:16,justifyItems:"center"},Lz={fontSize:44,letterSpacing:"0.18em",fontWeight:700,fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",color:"var(--accent, #22d3ee)"};function Oz(e){return e&&e.length===6?`${e.slice(0,3)} ${e.slice(3)}`:e}function Fz(){const[e,t]=S.useState("starting"),[n,r]=S.useState(null),[i,l]=S.useState(null),[a,s]=S.useState(0),[o,c]=S.useState(0),f=S.useRef({requestId:null,pollAfterMs:2500}),d=S.useCallback(async()=>{t("starting"),r(null);try{const p=await fetch("/api/auth/pair/start",{method:"POST",headers:{"content-type":"application/json"},body:"{}"});if(p.status===429){t("error"),r("Too many sign-in attempts right now. Wait a minute, then try again.");return}if(!p.ok){t("error"),r("Could not start sign-in. Please try again.");return}const h=await p.json();f.current={requestId:h.requestId,pollAfterMs:h.pollAfterMs||2500},l(h.code),s(h.expiresAt||0),t("waiting")}catch{t("error"),r("Network error. Check your connection and try again.")}},[]);return S.useEffect(()=>{d()},[d]),S.useEffect(()=>{if(e!=="waiting")return;let p=!1,h=null;const{requestId:m,pollAfterMs:v}=f.current;async function w(){try{const g=await fetch("/api/auth/pair/status",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({requestId:m})});if(p)return;const x=await g.json().catch(()=>({}));if(x.status==="approved"&&x.token){if((await fetch("/api/auth/exchange",{method:"POST",headers:{Authorization:`Bearer ${x.token}`}})).ok){window.location.reload();return}t("error"),r("Almost there — sign-in completed but the session could not be saved. Try again.");return}if(x.status==="denied"){t("error"),r("This device was denied.");return}if(x.status==="expired"){t("error"),r("The code expired before it was approved.");return}h=setTimeout(w,v)}catch{p||(h=setTimeout(w,v))}}return h=setTimeout(w,v),()=>{p=!0,clearTimeout(h)}},[e]),S.useEffect(()=>{if(e!=="waiting"||!a)return;const p=()=>c(Math.max(0,Math.round((a-Date.now())/1e3)));p();const h=setInterval(p,1e3);return()=>clearInterval(h)},[e,a]),u.jsx("div",{className:"app",style:{gridTemplateRows:"1fr"},children:u.jsx("div",{style:Az,children:u.jsxs("div",{style:Dz,children:[u.jsx("h2",{style:{margin:0},children:"Sign in to this workspace"}),e==="starting"&&u.jsxs("p",{style:{color:"var(--text-muted)"},children:[u.jsx("span",{className:"spinner"})," Preparing…"]}),e==="waiting"&&u.jsxs(u.Fragment,{children:[u.jsx("p",{style:{color:"var(--text-muted)",margin:0},children:"On a device where you’re already signed in, open this workspace and approve this code:"}),u.jsx("div",{style:Lz,"data-testid":"pair-code",children:Oz(i)}),u.jsxs("p",{style:{color:"var(--text-muted)",fontSize:13,margin:0},children:["Waiting for approval",o?` · expires in ${o}s`:"","…"]})]}),e==="error"&&u.jsxs(u.Fragment,{children:[u.jsx("p",{style:{color:"var(--error)"},children:n}),u.jsx("button",{onClick:d,children:"Try again"})]})]})})})}const Mz={position:"fixed",top:12,left:"50%",transform:"translateX(-50%)",zIndex:1e3,background:"var(--surface, #1e293b)",border:"1px solid var(--accent, #22d3ee)",borderRadius:10,padding:"12px 16px",boxShadow:"0 8px 24px rgba(0,0,0,0.35)",display:"grid",gap:10,maxWidth:460},$z={display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},Bz={fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",letterSpacing:"0.12em",fontWeight:700,color:"var(--accent, #22d3ee)"};function Hz(e){return e&&e.length===6?`${e.slice(0,3)} ${e.slice(3)}`:e}function Uz({token:e}){const[t,n]=S.useState([]),[r,i]=S.useState(null),[l,a]=S.useState(null),s=S.useRef(!0),o=S.useCallback((d={})=>e?{Authorization:`Bearer ${e}`,...d}:d,[e]),c=S.useCallback(async()=>{try{const d=await fetch("/api/auth/pair/requests",{headers:o()});if(!d.ok)return;const p=await d.json();s.current&&n(Array.isArray(p.requests)?p.requests:[])}catch{}},[o]);S.useEffect(()=>{s.current=!0,c();const d=setInterval(c,5e3);return()=>{s.current=!1,clearInterval(d)}},[c]);async function f(d,p,h){if(!r){i(d),a(null);try{const m=await fetch(`/api/auth/pair/${p}`,{method:"POST",headers:o({"content-type":"application/json"}),body:JSON.stringify({requestId:d})});m.ok&&p==="approve"?a({ok:!0,text:`Approved ${h}.`}):m.ok||a({ok:!1,text:"That request is no longer waiting."})}catch{a({ok:!1,text:"Network error."})}finally{i(null),c()}}}return t.length===0?null:u.jsxs("div",{style:Mz,"data-testid":"pair-approvals",children:[u.jsx("strong",{style:{fontSize:13},children:t.length===1?"A device wants to sign in":`${t.length} devices want to sign in`}),u.jsx("span",{style:{fontSize:12,color:"var(--text-muted)"},children:"Check that the code matches the one on that device, then approve."}),t.map(d=>u.jsxs("div",{style:$z,children:[u.jsx("span",{style:{fontSize:13},children:d.label}),u.jsx("span",{style:Bz,"data-testid":"pair-request-code",children:Hz(d.code)}),u.jsx("span",{className:"spacer",style:{flex:1}}),u.jsx("button",{onClick:()=>f(d.requestId,"approve",d.label),disabled:r===d.requestId,"data-testid":"pair-approve-btn",children:r===d.requestId?"Approving…":"Approve"}),u.jsx("button",{onClick:()=>f(d.requestId,"deny",d.label),disabled:r===d.requestId,style:{background:"transparent",color:"var(--text-muted)"},children:"Deny"})]},d.requestId)),l&&u.jsx("span",{style:{fontSize:12,color:l.ok?"var(--accent, #22d3ee)":"var(--error)"},children:l.text})]})}const Wz={partner:"Partner",viewer:"Viewer",client:"Client"},Gr=12,Mo=[{id:"chat-1",type:"chat"}],Vz={lg:[{i:"chat-1",x:0,y:0,w:8,h:Gr,minW:3,minH:4}]},Gz={liveview:{w:4,h:12},notes:{w:3,h:6},earnings:{w:3,h:5},analytics:{w:4,h:7},files:{w:3,h:12},code:{w:5,h:12},todo:{w:3,h:7}},qz=[{type:"liveview",title:"Live view",icon:"👁️",desc:"See what your agent builds, live."},{type:"files",title:"Files",icon:"📁",desc:"Browse your workspace files.",cap:"fileTree"},{type:"code",title:"Code",icon:"💻",desc:"View a file, with highlighting.",cap:"fileTree"},{type:"notes",title:"Notes",icon:"📝",desc:"A place to jot anything."},{type:"todo",title:"To-do",icon:"✅",desc:"A simple checklist."},{type:"chat",title:"Another chat",icon:"🗨️",desc:"A second conversation thread.",soon:!0}],Yz=[{type:"earnings",title:"Producer earnings",icon:"💸",desc:"Watch represented earnings tick in, live."},{type:"analytics",title:"Shelf analytics",icon:"📊",desc:"Who's earning across the marketplace."}],Xz=[{id:"just-chat",name:"Just chat",icon:"💬",desc:"Only the conversation — clean and focused.",blocks:[{type:"chat",l:{x:0,y:0,w:8,h:12,minW:3,minH:4}}]},{id:"build",name:"Build",icon:"🔨",desc:"Chat beside a live view of what you build.",blocks:[{type:"chat",l:{x:0,y:0,w:6,h:12,minW:3,minH:4}},{type:"liveview",l:{x:6,y:0,w:6,h:12,minW:3,minH:4}}]},{id:"producer",name:"Producer",icon:"💸",desc:"Chat + your earnings and the shelf, at a glance.",blocks:[{type:"chat",l:{x:0,y:0,w:6,h:12,minW:3,minH:4}},{type:"earnings",l:{x:6,y:0,w:6,h:5,minW:3,minH:3}},{type:"analytics",l:{x:6,y:5,w:6,h:7,minW:3,minH:3}}]},{id:"workspace",name:"Workspace",icon:"📝",desc:"Chat, a live view, and a notes scratchpad.",blocks:[{type:"chat",l:{x:0,y:0,w:6,h:12,minW:3,minH:4}},{type:"liveview",l:{x:6,y:0,w:6,h:7,minW:3,minH:3}},{type:"notes",l:{x:6,y:7,w:6,h:5,minW:3,minH:3}}]},{id:"code",name:"Code",icon:"💻",desc:"Chat with a file browser and a code view.",cap:"fileTree",blocks:[{type:"chat",l:{x:0,y:0,w:4,h:12,minW:3,minH:4}},{type:"files",l:{x:4,y:0,w:3,h:12,minW:2,minH:4}},{type:"code",l:{x:7,y:0,w:5,h:12,minW:3,minH:4}}]}];let yh=0;function $i(e){return yh+=1,`${e}-${Date.now().toString(36)}-${yh}`}function Kz(e=640){const[t,n]=S.useState(()=>typeof window<"u"&&window.innerWidth<=e);return S.useEffect(()=>{if(typeof window>"u")return;const r=window.matchMedia(`(max-width: ${e}px)`),i=()=>n(r.matches);return i(),r.addEventListener("change",i),()=>r.removeEventListener("change",i)},[e]),t}function Qz(){var mt,Ze,We,xt;const[e,t]=S.useState(null),[n,r]=S.useState(null),[i,l]=S.useState(!1),[a,s]=S.useState(!1),[o,c]=S.useState(!1),[f,d]=S.useState(null),[p,h]=S.useState(!1),[m,v]=S.useState(!1),[w,g]=S.useState("build"),[x,y]=S.useState(null),[C,E]=S.useState(null),[b,T]=S.useState(null),[_,R]=S.useState(!1),[N,M]=S.useState(null),[$,L]=S.useState("use"),[B,I]=S.useState(!1),[J,le]=S.useState(!1),[A,q]=S.useState(!1),[k,Q]=S.useState(()=>typeof window<"u"?V_():{mode:"light",accent:"#0891b2",hot:"#0e7490",accentManual:!1}),[ae,j]=S.useState(()=>{try{const O=JSON.parse(localStorage.getItem("wild:templates")||"[]");return Array.isArray(O)?O:[]}catch{return[]}}),[oe,ve]=S.useState(Mo),[ne,re]=S.useState(Vz),[we,ce]=S.useState(!1),[ze,Y]=S.useState("chat-1"),_e=Kz(),fe=S.useMemo(()=>typeof window>"u"?null:new URLSearchParams(window.location.search).get("t"),[]);S.useEffect(()=>{async function O(){try{const W={};fe&&(W.Authorization=`Bearer ${fe}`);const G=await fetch("/api/session",{headers:W});if(G.status===401){l(!0);return}if(!G.ok)throw new Error(`session fetch failed: ${G.status}`);const U=await G.json();t(U)}catch(W){r(W.message||String(W))}}O()},[fe]),S.useEffect(()=>{q_(k),G_(k)},[k]),S.useEffect(()=>{var W;const O=(W=e==null?void 0:e.identity)==null?void 0:W.color;O&&!k.accentManual&&Q(G=>G.accentManual?G:{...G,accent:O,hot:O})},[(mt=e==null?void 0:e.identity)==null?void 0:mt.color,k.accentManual]);const pt=e!=null&&e.workspaceId?`wild:canvas:v2:${e.workspaceId}`:null;S.useEffect(()=>{if(!(!pt||we)){try{const O=localStorage.getItem(pt);if(O){const W=JSON.parse(O);let G=Array.isArray(W.blocks)&&W.blocks.length?W.blocks:Mo;G.some(U=>U.type==="chat")||(G=[...Mo,...G]),ve(G),W.layouts&&W.layouts.lg&&re(W.layouts)}}catch{}ce(!0)}},[pt,we]),S.useEffect(()=>{if(!(!pt||!we))try{localStorage.setItem(pt,JSON.stringify({blocks:oe,layouts:ne}))}catch{}},[pt,we,oe,ne]),S.useEffect(()=>{var G;if(!we||!((G=e==null?void 0:e.capabilities)!=null&&G.chat))return;let O=!1;const W=fe?{Authorization:`Bearer ${fe}`}:{};return fetch("/api/canvas/blocks",{headers:W}).then(U=>U.ok?U.json():null).then(U=>{O||!Array.isArray(U==null?void 0:U.blocks)||!U.blocks.length||(ve(K=>{const se=new Set(K.map(Re=>Re.id)),Te=U.blocks.filter(Re=>Re.id&&!se.has(Re.id));return Te.length?[...K,...Te.map(Re=>({id:Re.id,type:"custom",spec:Re}))]:K}),re(K=>{const se=K.lg||[],Te=new Set(se.map(Me=>Me.i)),Re=U.blocks.filter(Me=>Me.id&&!Te.has(Me.id));return Re.length?{lg:[...se,...Re.map((Me,at)=>({i:Me.id,x:8,y:at*6,w:4,h:6,minW:3,minH:3}))]}:K}))}).catch(()=>{}),()=>{O=!0}},[we,(Ze=e==null?void 0:e.capabilities)==null?void 0:Ze.chat,fe]),S.useEffect(()=>{var G;if(!((G=e==null?void 0:e.capabilities)!=null&&G.chat)||k.accentManual)return;let O=!1;const W=fe?{Authorization:`Bearer ${fe}`}:{};return fetch("/api/canvas/theme",{headers:W}).then(U=>U.ok?U.json():null).then(U=>{O||!(U!=null&&U.theme)||Q(K=>K.accentManual?K:{...K,mode:U.theme.mode==="dark"?"dark":"light",accent:U.theme.accent||K.accent,hot:U.theme.hot||U.theme.accent||K.hot,tokens:U.theme.tokens||{}})}).catch(()=>{}),()=>{O=!0}},[(We=e==null?void 0:e.capabilities)==null?void 0:We.chat,fe]);function rt(O){const W=$i(O),G=Gz[O]||{w:4,h:12};if(ve(U=>[...U,{id:W,type:O}]),re(U=>({lg:[...U.lg||[],{i:W,x:Math.max(0,12-G.w),y:0,w:G.w,h:G.h,minW:3,minH:3}]})),Y(W),I(!1),typeof window<"u"){const U=K=>{var se;return(se=document.querySelector(`[data-rgl-id="${W}"]`))==null?void 0:se.scrollIntoView({behavior:K,block:"nearest"})};setTimeout(()=>U("smooth"),300),setTimeout(()=>U("auto"),750)}}function Fe(O){const W=oe.find(G=>G.id===O);if(ve(G=>G.filter(U=>U.id!==O)),re(G=>({lg:(G.lg||[]).filter(U=>U.i!==O)})),Y(G=>{var U;return G===O?((U=oe.find(K=>K.type==="chat"))==null?void 0:U.id)||"chat-1":G}),(W==null?void 0:W.type)==="custom"){const G=fe?{Authorization:`Bearer ${fe}`}:{};fetch(`/api/canvas/blocks/${encodeURIComponent(O)}`,{method:"DELETE",headers:G}).catch(()=>{})}}function Le(O){const W=oe.find(G=>G.id===O);W&&rt(W.type)}function Ft(){if(oe.some(W=>W.type==="liveview"))return;const O=$i("liveview");ve(W=>W.some(G=>G.type==="liveview")?W:[...W,{id:O,type:"liveview"}]),re(W=>{const G=(W.lg||[]).map(U=>U.i.startsWith("chat")?{...U,w:6,x:0,h:Gr}:U);return G.push({i:O,x:6,y:0,w:6,h:Gr,minW:3,minH:4}),{lg:G}})}function De(O){if(T(O),oe.some(G=>G.type==="code"))return;const W=$i("code");ve(G=>G.some(U=>U.type==="code")?G:[...G,{id:W,type:"code"}]),re(G=>({lg:[...G.lg||[],{i:W,x:6,y:0,w:6,h:Gr,minW:3,minH:4}]}))}function je(O,W){if(O!=null&&O.id&&(ve(G=>{const U=G.findIndex(K=>K.id===O.id);if(U>=0){const K=G.slice();return K[U]={...K[U],type:"custom",spec:O},K}return[...G,{id:O.id,type:"custom",spec:O}]}),re(G=>{const U=G.lg||[];return U.some(K=>K.i===O.id)?G:{lg:[...U,{i:O.id,x:8,y:0,w:4,h:6,minW:3,minH:3}]}}),W!=="update"&&(Y(O.id),typeof window<"u"))){const G=U=>{var K;return(K=document.querySelector(`[data-rgl-id="${O.id}"]`))==null?void 0:K.scrollIntoView({behavior:U,block:"nearest"})};setTimeout(()=>G("smooth"),300),setTimeout(()=>G("auto"),750)}}function qe(O){!O||typeof O!="object"||Q(W=>{var G;return W_(W,O,W.accentManual||!!((G=e==null?void 0:e.identity)!=null&&G.color))})}function Ke(O){var U;const W=[],G=O.blocks.map(K=>{const se=$i(K.type);return W.push({i:se,...K.l||{x:0,y:0,w:4,h:Gr,minW:3,minH:3}}),{id:se,type:K.type}});if(!G.some(K=>K.type==="chat")){const K=$i("chat");G.unshift({id:K,type:"chat"}),W.unshift({i:K,x:0,y:0,w:8,h:Gr,minW:3,minH:4})}ve(G),re({lg:W}),Y(((U=G[0])==null?void 0:U.id)||"chat-1"),le(!1),typeof window<"u"&&setTimeout(()=>{var K;return(K=document.querySelector(".block-canvas"))==null?void 0:K.scrollTo({top:0,behavior:"smooth"})},60)}function it(O){try{localStorage.setItem("wild:templates",JSON.stringify(O))}catch{}return O}function un(O){const W=ne.lg||[],G=oe.map(K=>{const se=W.find(Te=>Te.i===K.id);return{type:K.type,l:se?{x:se.x,y:se.y,w:se.w,h:se.h,minW:se.minW??3,minH:se.minH??4}:{x:0,y:0,w:4,h:10,minW:3,minH:4}}}),U={id:`saved-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,name:O,icon:"⭐",desc:"Your saved layout",blocks:G,custom:!0};j(K=>it([...K,U]))}function ht(O){j(W=>it(W.filter(G=>G.id!==O)))}if(i)return u.jsx(Fz,{});if(n)return u.jsx("div",{className:"app",style:{gridTemplateRows:"1fr",alignItems:"center",justifyItems:"center"},children:u.jsxs("div",{style:{padding:24},children:[u.jsx("h2",{children:"wild-workspace"}),u.jsxs("p",{style:{color:"var(--error)"},children:["Could not load session: ",n]}),u.jsx("p",{style:{color:"var(--text-muted)",fontSize:13},children:"Verify the server is running and the share URL token is valid."})]})});if(!e)return u.jsx("div",{className:"app",style:{gridTemplateRows:"1fr",alignItems:"center",justifyItems:"center"},children:u.jsxs("div",{style:{padding:24,color:"var(--text-muted)"},children:[u.jsx("span",{className:"spinner"})," Loading workspace…"]})});if((xt=e.capabilities)!=null&&xt.chatWrite&&!e.onboarded)return u.jsx(Iz,{session:e,token:fe,onComplete:async O=>{O!=null&&O.seedChat&&jN(O.seedChat);try{const W={};fe&&(W.Authorization=`Bearer ${fe}`);const G=await fetch("/api/session",{headers:W});G.ok?t(await G.json()):t({...e,onboarded:!0})}catch{t({...e,onboarded:!0})}O!=null&&O.build&&M({text:O.build,ts:Date.now()})}});const{role:z,capabilities:F,workspace:te,workspaceId:pe,agent:me,identity:Ae}=e,Qe=(Ae==null?void 0:Ae.name)||(me==null?void 0:me.label)||"Chat";function ot(O){var W,G;switch(O.type){case"chat":return{title:Qe,icon:"🗨️"};case"liveview":return{title:"Live view",icon:"👁️"};case"notes":return{title:"Notes",icon:"📝"};case"earnings":return{title:"Producer earnings",icon:"💸"};case"analytics":return{title:"Shelf analytics",icon:"📊"};case"files":return{title:"Files",icon:"📁"};case"code":return{title:"Code",icon:"💻"};case"todo":return{title:"To-do",icon:"✅"};case"custom":return{title:((W=O.spec)==null?void 0:W.title)||"Block",icon:((G=O.spec)==null?void 0:G.icon)||"🧩"};default:return{title:O.type,icon:"▫️"}}}function bt(O){switch(O.type){case"chat":return u.jsxs(u.Fragment,{children:[F.chatWrite&&u.jsx("div",{className:"chat-block-bar",children:u.jsxs("span",{className:"chat-mode-toggle","data-testid":"mode-toggle",children:[u.jsx("button",{className:w==="build"?"active":"",onClick:()=>g("build"),"data-testid":"mode-build",children:"Build"}),u.jsx("button",{className:w==="plan"?"active":"",onClick:()=>g("plan"),"data-testid":"mode-plan",children:"Plan"})]})}),F.inbox&&u.jsx(vz,{}),u.jsx(TN,{role:z,capabilities:F,mode:w,token:fe,inject:N,agentName:Qe,onBazaarEvent:W=>{(W==null?void 0:W.type)==="preview"?(y({url:W.url,ts:W.ts}),Ft()):(W==null?void 0:W.type)==="meter"?E(W.state):(W==null?void 0:W.type)==="block"?je(W.block,W.op):(W==null?void 0:W.type)==="theme"&&qe(W.theme)}})]});case"liveview":return u.jsx(X_,{bazaarPreview:x});case"notes":return u.jsx(K_,{id:O.id});case"earnings":return u.jsx(J_,{live:C,token:fe});case"analytics":return u.jsx(tz,{live:C,token:fe});case"files":return u.jsx(nz,{token:fe,selectedFile:b,onOpenFile:De});case"code":return u.jsx(lz,{path:b,token:fe,onPickFile:T});case"todo":return u.jsx(az,{id:O.id});case"custom":return u.jsx(sz,{spec:O.spec});default:return null}}return u.jsxs("div",{className:"app",children:[F.share&&u.jsx(Uz,{token:fe}),u.jsxs("header",{className:"topbar","data-testid":"topbar",children:[u.jsx("span",{className:"brand",children:"wild-workspace"}),u.jsx("span",{className:`badge ${z}`,"data-testid":"role-badge",children:Wz[z]||z}),u.jsx("span",{className:"badge","data-testid":"workspace-name",children:(te==null?void 0:te.name)||pe}),Ae!=null&&Ae.name?u.jsx("span",{className:"badge","data-testid":"agent-name",style:{borderColor:Ae.color,color:Ae.color},children:Ae.name}):me&&u.jsx("span",{className:"badge","data-testid":"agent-name",children:me.label||me.id}),u.jsx("span",{className:"spacer"}),u.jsx("button",{onClick:()=>q(!0),"data-testid":"theme-btn",title:"Theme — make it yours (light/dark + accent)",children:"🎨 Theme"}),F.chatWrite&&u.jsx("button",{onClick:()=>le(!0),"data-testid":"templates-btn",title:"Start from a template layout",children:"▾ Templates"}),F.chatWrite&&u.jsx("button",{className:$==="layout"?"primary":"",onClick:()=>L(O=>O==="layout"?"use":"layout"),"data-testid":"arrange-toggle",title:"Rearrange your blocks",children:$==="layout"?"✓ Done":"✥ Arrange"}),F.chat&&u.jsx("button",{onClick:()=>R(!0),"data-testid":"bazaar-btn",title:"Browse the marketplace shelf",children:"🛍️ Bazaar"}),F.sync&&u.jsx("button",{onClick:()=>c(!0),"data-testid":"collaborate-btn",children:"Collaborate"}),F.share&&u.jsx("button",{onClick:()=>s(!0),"data-testid":"share-btn",children:"Share"}),F.terminal&&u.jsx("button",{onClick:()=>v(O=>!O),"data-testid":"terminal-toggle",children:m?"Hide terminal":"Terminal"})]}),u.jsxs("main",{className:"canvas-wrap","data-testid":"canvas-wrap",children:[$==="layout"&&u.jsxs("div",{className:"arrange-bar","data-testid":"arrange-bar",children:[u.jsx("span",{className:"arrange-hint",children:"✥ Arranging your space — drag a block's header, resize from its corner, or add a new one."}),u.jsx("span",{className:"spacer"}),u.jsx("button",{className:"primary",onClick:()=>I(!0),"data-testid":"add-block-btn",children:"+ Add block"}),u.jsx("button",{onClick:()=>L("use"),children:"Done"})]}),_e?u.jsx(M_,{blocks:oe,activeId:ze,setActiveId:Y,mode:$,renderBlock:bt,blockMeta:ot,onRemove:Fe,canRemove:O=>O.type!=="chat"}):u.jsx(F_,{blocks:oe,layouts:ne,mode:$,onLayoutChange:re,renderBlock:bt,blockMeta:ot,onRemove:Fe,onDuplicate:Le,canRemove:O=>O.type!=="chat",canDuplicate:O=>O.type!=="chat"&&O.type!=="custom"})]}),u.jsx(xz,{role:z,capabilities:F,session:e,urlToken:fe,onSyncAlert:d,onOpenConflicts:()=>h(!0)}),u.jsx(mz,{alert:f,onDismiss:()=>d(null)}),p&&u.jsx(gz,{urlToken:fe,onClose:()=>h(!1)}),B&&u.jsx($_,{items:qz.filter(O=>!O.cap||F[O.cap]),bazaarItems:Yz,onAdd:rt,onClose:()=>I(!1)}),J&&u.jsx(H_,{builtins:Xz.filter(O=>!O.cap||F[O.cap]),saved:ae,onApply:Ke,onSaveCurrent:un,onDelete:ht,onClose:()=>le(!1)}),A&&u.jsx(Y_,{theme:k,onChange:Q,onClose:()=>q(!1)}),_&&u.jsx(Sz,{token:fe,onApplyTheme:qe,onClose:()=>R(!1),onBuild:O=>{M({text:O,ts:Date.now()}),R(!1)}}),a&&u.jsx(pz,{onClose:()=>s(!1),workspaceId:pe}),o&&u.jsx(hz,{onClose:()=>c(!1),token:fe}),m&&u.jsxs("div",{className:"terminal-overlay","data-testid":"terminal-overlay",children:[u.jsxs("header",{children:[u.jsx("strong",{children:"Terminal (preview)"}),u.jsx("button",{onClick:()=>v(!1),children:"close"})]}),u.jsx("p",{children:"Power-user terminal is a hidden-by-default toggle. The xterm.js + node-pty integration ships in v1.1. For now use your OS terminal — wild-workspace doesn't replace your shell, it surfaces the agent."})]})]})}function Zz(e){const t=window.fetch.bind(window);window.fetch=(n,r={})=>{const i=typeof n=="string"?n:(n==null?void 0:n.url)||"";if(!(i.startsWith("/api/")||i.includes("://")===!1&&i.startsWith("api/")))return t(n,r);const a=new Headers(r.headers||{});return a.has("Authorization")||a.set("Authorization",`Bearer ${e}`),t(n,{...r,headers:a})}}function Jz(){$o.createRoot(document.getElementById("root")).render(u.jsx(xn.StrictMode,{children:u.jsx(Qz,{})}))}async function eP(){const t=typeof window<"u"&&window.fetch?new URLSearchParams(window.location.search).get("t"):null;if(t){let n=!1;try{const r=await window.fetch("/api/auth/exchange",{method:"POST",headers:{Authorization:`Bearer ${t}`}});n=r.ok&&(await r.json().catch(()=>({}))).cookie===!0}catch{}if(n){const r=new URLSearchParams(window.location.search);r.delete("t");const i=r.toString(),l=window.location.pathname+(i?`?${i}`:"")+window.location.hash;window.history.replaceState(null,"",l)}else Zz(t)}Jz()}eP();
91
+ `,e.getElementsByTagName("head")[0].appendChild(t)),e.body&&RT(e.body,"react-draggable-transparent-selection")}function qp(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{Yp(e)}):Yp(e)}function Yp(e){if(e)try{e.body&&IT(e.body,"react-draggable-transparent-selection");const t=e.selection;if(t)t.empty();else{const n=(e.defaultView||window).getSelection();n&&n.type!=="Caret"&&n.removeAllRanges()}}catch{}}function RT(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function IT(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}function AT(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r=="string"?r:OT(r);const i=kd(e);if(typeof r=="string"){const{ownerDocument:a}=i,l=a.defaultView;if(!l)throw new Error("Cannot resolve the owner window of the draggable node.");let s;if(r==="parent"?s=i.parentNode:s=i.getRootNode().querySelector(r),!(s instanceof l.HTMLElement))throw new Error('Bounds selector "'+r+'" could not find an element.');const o=s,c=l.getComputedStyle(i),f=l.getComputedStyle(o);r={left:-i.offsetLeft+Tt(f.paddingLeft)+Tt(c.marginLeft),top:-i.offsetTop+Tt(f.paddingTop)+Tt(c.marginTop),right:jT(o)-ST(i)-i.offsetLeft+Tt(f.paddingRight)-Tt(c.marginRight),bottom:ET(o)-kT(i)-i.offsetTop+Tt(f.paddingBottom)-Tt(c.marginBottom)}}return Vi(r.right)&&(t=Math.min(t,r.right)),Vi(r.bottom)&&(n=Math.min(n,r.bottom)),Vi(r.left)&&(t=Math.max(t,r.left)),Vi(r.top)&&(n=Math.max(n,r.top)),[t,n]}function Xp(e,t,n){const r=Math.round(t/e[0])*e[0],i=Math.round(n/e[1])*e[1];return[r,i]}function DT(e){return e.props.axis==="both"||e.props.axis==="x"}function LT(e){return e.props.axis==="both"||e.props.axis==="y"}function Po(e,t,n){const r=typeof t=="number"?_T(e,t):null;if(typeof t=="number"&&!r)return null;const i=kd(n),a=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return CT(r||e,a,n.props.scale)}function Ro(e,t,n){const r=!Vi(e.lastX),i=kd(e);return r?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:i,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}}function Io(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function OT(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function kd(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}function En(...e){yT.DRAGGABLE_DEBUG&&console.log(...e)}var dn={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},qn=dn.mouse,gr=class extends k.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&(typeof e.button=="number"&&e.button!==0||e.ctrlKey))return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!Gp(e.target,this.props.handle,t)||this.props.cancel&&Gp(e.target,this.props.cancel,t))return;e.type==="touchstart"&&!this.props.allowMobileScroll&&e.preventDefault();const r=zT(e);this.touchIdentifier=r;const i=Po(e,r,this);if(i==null)return;const{x:a,y:l}=i,s=Ro(this,a,l);En("DraggableCore: handleDragStart: %j",s),En("calling",this.props.onStart),!(this.props.onStart(e,s)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&PT(n),this.dragging=!0,this.lastX=a,this.lastY=l,zo(n,qn.move,this.handleDrag),zo(n,qn.stop,this.handleDragStop))},this.handleDrag=e=>{const t=Po(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let l=n-this.lastX,s=r-this.lastY;if([l,s]=Xp(this.props.grid,l,s),!l&&!s)return;n=this.lastX+l,r=this.lastY+s}const i=Ro(this,n,r);if(En("DraggableCore: handleDrag: %j",i),this.props.onDrag(e,i)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const l=document.createEvent("MouseEvents");l.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(l)}return}this.lastX=n,this.lastY=r},this.handleDragStop=e=>{if(!this.dragging)return;const t=Po(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let s=n-this.lastX||0,o=r-this.lastY||0;[s,o]=Xp(this.props.grid,s,o),n=this.lastX+s,r=this.lastY+o}const i=Ro(this,n,r);if(this.props.onStop(e,i)===!1||this.mounted===!1)return!1;const l=this.findDOMNode();l&&this.props.enableUserSelectHack&&qp(l.ownerDocument),En("DraggableCore: handleDragStop: %j",i),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,l&&(En("DraggableCore: Removing handlers"),xr(l.ownerDocument,qn.move,this.handleDrag),xr(l.ownerDocument,qn.stop,this.handleDragStop))},this.onMouseDown=e=>(qn=dn.mouse,this.handleDragStart(e)),this.onMouseUp=e=>(qn=dn.mouse,this.handleDragStop(e)),this.onTouchStart=e=>(qn=dn.touch,this.handleDragStart(e)),this.onTouchEnd=e=>(qn=dn.touch,this.handleDragStop(e))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&zo(e,dn.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;xr(t,dn.mouse.move,this.handleDrag),xr(t,dn.touch.move,this.handleDrag),xr(t,dn.mouse.stop,this.handleDragStop),xr(t,dn.touch.stop,this.handleDragStop),xr(e,dn.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&qp(t)}}findDOMNode(){var e;if((e=this.props)!=null&&e.nodeRef)return this.props.nodeRef.current;const t=Ig;return typeof t.findDOMNode=="function"?t.findDOMNode(this):(En("react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef"),null)}render(){return k.cloneElement(k.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};gr.displayName="DraggableCore";gr.propTypes={allowAnyClick:Ee.bool,allowMobileScroll:Ee.bool,children:Ee.node.isRequired,disabled:Ee.bool,enableUserSelectHack:Ee.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Ee.arrayOf(Ee.number),handle:Ee.string,cancel:Ee.string,nodeRef:Ee.object,onStart:Ee.func,onDrag:Ee.func,onStop:Ee.func,onMouseDown:Ee.func,scale:Ee.number,className:hi,style:hi,transform:hi};gr.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var Rs=class extends k.Component{constructor(e){super(e),this.onDragStart=(t,n)=>{if(En("Draggable: onDragStart: %j",n),this.props.onStart(t,Io(this,n))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(t,n)=>{if(!this.state.dragging)return!1;En("Draggable: onDrag: %j",n);const r=Io(this,n),i={x:r.x,y:r.y,slackX:0,slackY:0};if(this.props.bounds){const{x:l,y:s}=i;i.x+=this.state.slackX,i.y+=this.state.slackY;const[o,c]=AT(this,i.x,i.y);i.x=o,i.y=c,i.slackX=this.state.slackX+(l-i.x),i.slackY=this.state.slackY+(s-i.y),r.x=i.x,r.y=i.y,r.deltaX=i.x-this.state.x,r.deltaY=i.y-this.state.y}if(this.props.onDrag(t,r)===!1)return!1;this.setState(i)},this.onDragStop=(t,n)=>{if(!this.state.dragging||this.props.onStop(t,Io(this,n))===!1)return!1;En("Draggable: onDragStop: %j",n);const i={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:l,y:s}=this.props.position;i.x=l,i.y=s}this.setState(i)},this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:e},{prevPropsPosition:t}){return e&&(!t||e.x!==t.x||e.y!==t.y)?(En("Draggable: getDerivedStateFromProps %j",{position:e,prevPropsPosition:t}),{x:e.x,y:e.y,prevPropsPosition:{...e}}):null}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){var e;if((e=this.props)!=null&&e.nodeRef)return this.props.nodeRef.current;const t=Ig;return typeof t.findDOMNode=="function"?t.findDOMNode(this):null}render(){const{axis:e,bounds:t,children:n,defaultPosition:r,defaultClassName:i,defaultClassNameDragging:a,defaultClassNameDragged:l,position:s,positionOffset:o,scale:c,...f}=this.props;let d={},p=null;const m=!!!s||this.state.dragging,v=s||r,w={x:DT(this)&&m?this.state.x:v.x,y:LT(this)&&m?this.state.y:v.y};this.state.isElementSVG?p=TT(w,o):d=NT(w,o);const g=k.Children.only(n),x=Ti(g.props.className||"",i,{[a]:this.state.dragging,[l]:this.state.dragged});return k.createElement(gr,{...f,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},k.cloneElement(g,{className:x,style:{...g.props.style,...d},transform:p}))}};Rs.displayName="Draggable";Rs.propTypes={...gr.propTypes,axis:Ee.oneOf(["both","x","y","none"]),bounds:Ee.oneOfType([Ee.shape({left:Ee.number,right:Ee.number,top:Ee.number,bottom:Ee.number}),Ee.string,Ee.oneOf([!1])]),defaultClassName:Ee.string,defaultClassNameDragging:Ee.string,defaultClassNameDragged:Ee.string,defaultPosition:Ee.shape({x:Ee.number,y:Ee.number}),positionOffset:Ee.shape({x:Ee.oneOfType([Ee.number,Ee.string]),y:Ee.oneOfType([Ee.number,Ee.string])}),position:Ee.shape({x:Ee.number,y:Ee.number}),className:hi,style:hi,transform:hi};Rs.defaultProps={...gr.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1};var FT=Rs;const MT=Object.freeze(Object.defineProperty({__proto__:null,DraggableCore:gr,default:FT},Symbol.toStringTag,{value:"Module"}));var Sd={exports:{}},Ra={};const $T=Px(MT);var Ed={};Ed.__esModule=!0;Ed.cloneElement=GT;var BT=HT(k);function HT(e){return e&&e.__esModule?e:{default:e}}function Kp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Qp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kp(Object(n),!0).forEach(function(r){UT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UT(e,t,n){return(t=WT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WT(e){var t=VT(e,"string");return typeof t=="symbol"?t:t+""}function VT(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function GT(e,t){return t.style&&e.props.style&&(t.style=Qp(Qp({},e.props.style),t.style)),t.className&&e.props.className&&(t.className=e.props.className+" "+t.className),BT.default.cloneElement(e,t)}var Ia={};Ia.__esModule=!0;Ia.resizableProps=void 0;var Se=qT(bd);function qT(e){return e&&e.__esModule?e:{default:e}}Ia.resizableProps={axis:Se.default.oneOf(["both","x","y","none"]),className:Se.default.string,children:Se.default.element.isRequired,draggableOpts:Se.default.shape({allowAnyClick:Se.default.bool,cancel:Se.default.string,children:Se.default.node,disabled:Se.default.bool,enableUserSelectHack:Se.default.bool,offsetParent:typeof Element<"u"?Se.default.instanceOf(Element):Se.default.any,grid:Se.default.arrayOf(Se.default.number),handle:Se.default.string,nodeRef:Se.default.object,onStart:Se.default.func,onDrag:Se.default.func,onStop:Se.default.func,onMouseDown:Se.default.func,scale:Se.default.number}),height:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0];return r.axis==="both"||r.axis==="y"?Se.default.number.isRequired(...t):Se.default.number(...t)},handle:Se.default.oneOfType([Se.default.node,Se.default.func]),handleSize:Se.default.arrayOf(Se.default.number),lockAspectRatio:Se.default.bool,maxConstraints:Se.default.arrayOf(Se.default.number),minConstraints:Se.default.arrayOf(Se.default.number),onResizeStop:Se.default.func,onResizeStart:Se.default.func,onResize:Se.default.func,resizeHandles:Se.default.arrayOf(Se.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:Se.default.number,width:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0];return r.axis==="both"||r.axis==="x"?Se.default.number.isRequired(...t):Se.default.number(...t)}};Ra.__esModule=!0;Ra.default=void 0;var Ur=ux(k),YT=$T,XT=Ed,KT=Ia;const QT=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function ux(e,t){if(typeof WeakMap=="function")var n=new WeakMap,r=new WeakMap;return(ux=function(i,a){if(!a&&i&&i.__esModule)return i;var l,s,o={__proto__:null,default:i};if(i===null||typeof i!="object"&&typeof i!="function")return o;if(l=a?r:n){if(l.has(i))return l.get(i);l.set(i,o)}for(const c in i)c!=="default"&&{}.hasOwnProperty.call(i,c)&&((s=(l=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,c))&&(s.get||s.set)?l(o,c,s):o[c]=i[c]);return o})(e,t)}function Yu(){return Yu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yu.apply(null,arguments)}function ZT(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Zp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ao(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zp(Object(n),!0).forEach(function(r){JT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function JT(e,t,n){return(t=e_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e_(e){var t=t_(e,"string");return typeof t=="symbol"?t:t+""}function t_(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}let jd=class extends Ur.Component{constructor(){super(...arguments),this.handleRefs={},this.lastHandleRect=null,this.slack=null,this.lastSize=null}componentWillUnmount(){this.resetData()}resetData(){this.lastHandleRect=this.slack=this.lastSize=null}runConstraints(t,n){const r=this.props,i=r.minConstraints,a=r.maxConstraints,l=r.lockAspectRatio;if(!i&&!a&&!l)return[t,n];if(l){const p=this.props.width/this.props.height,h=t-this.props.width,m=n-this.props.height;Math.abs(h)>Math.abs(m*p)?n=t/p:t=n*p}const s=t,o=n;let c=this.slack||[0,0],f=c[0],d=c[1];return t+=f,n+=d,i&&(t=Math.max(i[0],t),n=Math.max(i[1],n)),a&&(t=Math.min(a[0],t),n=Math.min(a[1],n)),this.slack=[f+(s-t),d+(o-n)],[t,n]}resizeHandler(t,n){return(r,i)=>{var a,l,s,o;let c=i.node,f=i.deltaX,d=i.deltaY;t==="onResizeStart"&&this.resetData();const p=(this.props.axis==="both"||this.props.axis==="x")&&n!=="n"&&n!=="s",h=(this.props.axis==="both"||this.props.axis==="y")&&n!=="e"&&n!=="w";if(!p&&!h)return;const m=n[0],v=n[n.length-1],w=c.getBoundingClientRect();if(this.lastHandleRect!=null){if(v==="w"){const N=w.left-this.lastHandleRect.left;f+=N}if(m==="n"){const N=w.top-this.lastHandleRect.top;d+=N}}this.lastHandleRect=w,v==="w"&&(f=-f),m==="n"&&(d=-d);const g=(a=(l=this.lastSize)==null?void 0:l.width)!=null?a:this.props.width,x=(s=(o=this.lastSize)==null?void 0:o.height)!=null?s:this.props.height;let y=g+(p?f/this.props.transformScale:0),C=x+(h?d/this.props.transformScale:0);var E=this.runConstraints(y,C);if(y=E[0],C=E[1],t==="onResizeStop"&&this.lastSize){var b=this.lastSize;y=b.width,C=b.height}const T=y!==g||C!==x;t!=="onResizeStop"&&(this.lastSize={width:y,height:C});const _=typeof this.props[t]=="function"?this.props[t]:null;_&&!(t==="onResize"&&!T)&&(r.persist==null||r.persist(),_(r,{node:c,size:{width:y,height:C},handle:n})),t==="onResizeStop"&&this.resetData()}}renderResizeHandle(t,n){const r=this.props.handle;if(!r)return Ur.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+t,ref:n});if(typeof r=="function")return r(t,n);const i=typeof r.type=="string",a=Ao({ref:n},i?{}:{handleAxis:t});return Ur.cloneElement(r,a)}render(){const t=this.props,n=t.children,r=t.className,i=t.draggableOpts;t.width,t.height,t.handle,t.handleSize,t.lockAspectRatio,t.axis,t.minConstraints,t.maxConstraints,t.onResize,t.onResizeStop,t.onResizeStart;const a=t.resizeHandles;t.transformScale;const l=ZT(t,QT);return(0,XT.cloneElement)(n,Ao(Ao({},l),{},{className:(r?r+" ":"")+"react-resizable",children:[...Ur.Children.toArray(n.props.children),...a.map(s=>{var o;const c=(o=this.handleRefs[s])!=null?o:this.handleRefs[s]=Ur.createRef();return Ur.createElement(YT.DraggableCore,Yu({},i,{nodeRef:c,key:"resizableHandle-"+s,onStop:this.resizeHandler("onResizeStop",s),onStart:this.resizeHandler("onResizeStart",s),onDrag:this.resizeHandler("onResize",s)}),this.renderResizeHandle(s,c))})]}))}};Ra.default=jd;jd.propTypes=KT.resizableProps;jd.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1};var Is={};Is.__esModule=!0;Is.default=void 0;var Do=dx(k),n_=cx(bd),r_=cx(Ra),i_=Ia;const a_=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function cx(e){return e&&e.__esModule?e:{default:e}}function dx(e,t){if(typeof WeakMap=="function")var n=new WeakMap,r=new WeakMap;return(dx=function(i,a){if(!a&&i&&i.__esModule)return i;var l,s,o={__proto__:null,default:i};if(i===null||typeof i!="object"&&typeof i!="function")return o;if(l=a?r:n){if(l.has(i))return l.get(i);l.set(i,o)}for(const c in i)c!=="default"&&{}.hasOwnProperty.call(i,c)&&((s=(l=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,c))&&(s.get||s.set)?l(o,c,s):o[c]=i[c]);return o})(e,t)}function Xu(){return Xu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xu.apply(null,arguments)}function Jp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function is(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jp(Object(n),!0).forEach(function(r){l_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function l_(e,t,n){return(t=s_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s_(e){var t=o_(e,"string");return typeof t=="symbol"?t:t+""}function o_(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function u_(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}class fx extends Do.Component{constructor(){super(...arguments),this.state={width:this.props.width,height:this.props.height,propsWidth:this.props.width,propsHeight:this.props.height},this.onResize=(t,n)=>{const r=n.size;this.props.onResize?(t.persist==null||t.persist(),this.setState(r,()=>this.props.onResize&&this.props.onResize(t,n))):this.setState(r)}}static getDerivedStateFromProps(t,n){return n.propsWidth!==t.width||n.propsHeight!==t.height?{width:t.width,height:t.height,propsWidth:t.width,propsHeight:t.height}:null}render(){const t=this.props,n=t.handle,r=t.handleSize;t.onResize;const i=t.onResizeStart,a=t.onResizeStop,l=t.draggableOpts,s=t.minConstraints,o=t.maxConstraints,c=t.lockAspectRatio,f=t.axis;t.width,t.height;const d=t.resizeHandles,p=t.style,h=t.transformScale,m=u_(t,a_);return Do.createElement(r_.default,{axis:f,draggableOpts:l,handle:n,handleSize:r,height:this.state.height,lockAspectRatio:c,maxConstraints:o,minConstraints:s,onResizeStart:i,onResize:this.onResize,onResizeStop:a,resizeHandles:d,transformScale:h,width:this.state.width},Do.createElement("div",Xu({},m,{style:is(is({},p),{},{width:this.state.width+"px",height:this.state.height+"px"})})))}}Is.default=fx;fx.propTypes=is(is({},i_.resizableProps),{},{children:n_.default.element});Sd.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")};var c_=Sd.exports.Resizable=Ra.default;Sd.exports.ResizableBox=Is.default;function px(e){return function(n,r,i,a,l,s,o){return e(n,r,o)}}function As(e){return function(n,r,i,a){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i,a);var l=a.get(n),s=a.get(r);if(l&&s)return l===r&&s===n;a.set(n,r),a.set(r,n);var o=e(n,r,i,a);return a.delete(n),a.delete(r),o}}function hx(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function eh(e){return e.constructor===Object||e.constructor==null}function th(e){return typeof e.then=="function"}function Ds(e,t){return e===t||e!==e&&t!==t}var d_="[object Arguments]",f_="[object Boolean]",p_="[object Date]",h_="[object RegExp]",m_="[object Map]",g_="[object Number]",y_="[object Object]",x_="[object Set]",v_="[object String]",nh=Object.prototype.toString;function Ls(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,a=e.areRegExpsEqual,l=e.areSetsEqual,s=e.createIsNestedEqual,o=s(c);function c(f,d,p){if(f===d)return!0;if(!f||!d||typeof f!="object"||typeof d!="object")return f!==f&&d!==d;if(eh(f)&&eh(d))return i(f,d,o,p);var h=Array.isArray(f),m=Array.isArray(d);if(h||m)return h===m&&t(f,d,o,p);var v=nh.call(f);return v!==nh.call(d)?!1:v===p_?n(f,d,o,p):v===h_?a(f,d,o,p):v===m_?r(f,d,o,p):v===x_?l(f,d,o,p):v===y_||v===d_?th(f)||th(d)?!1:i(f,d,o,p):v===f_||v===g_||v===v_?Ds(f.valueOf(),d.valueOf()):!1}return c}function mx(e,t,n,r){var i=e.length;if(t.length!==i)return!1;for(;i-- >0;)if(!n(e[i],t[i],i,i,e,t,r))return!1;return!0}var w_=As(mx);function gx(e,t){return Ds(e.valueOf(),t.valueOf())}function yx(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={},l=0;return e.forEach(function(s,o){if(i){var c=!1,f=0;t.forEach(function(d,p){!c&&!a[f]&&(c=n(o,p,l,f,e,t,r)&&n(s,d,o,p,e,t,r))&&(a[f]=!0),f++}),l++,i=c}}),i}var b_=As(yx),k_="_owner",S_=Object.prototype.hasOwnProperty;function xx(e,t,n,r){var i=Object.keys(e),a=i.length;if(Object.keys(t).length!==a)return!1;for(var l;a-- >0;){if(l=i[a],l===k_){var s=!!e.$$typeof,o=!!t.$$typeof;if((s||o)&&s!==o)return!1}if(!S_.call(t,l)||!n(e[l],t[l],l,l,e,t,r))return!1}return!0}var E_=As(xx);function vx(e,t){return e.source===t.source&&e.flags===t.flags}function wx(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={};return e.forEach(function(l,s){if(i){var o=!1,c=0;t.forEach(function(f,d){!o&&!a[c]&&(o=n(l,f,s,d,e,t,r))&&(a[c]=!0),c++}),i=o}}),i}var j_=As(wx),bx=Object.freeze({areArraysEqual:mx,areDatesEqual:gx,areMapsEqual:yx,areObjectsEqual:xx,areRegExpsEqual:vx,areSetsEqual:wx,createIsNestedEqual:px}),kx=Object.freeze({areArraysEqual:w_,areDatesEqual:gx,areMapsEqual:b_,areObjectsEqual:E_,areRegExpsEqual:vx,areSetsEqual:j_,createIsNestedEqual:px}),C_=Ls(bx);function An(e,t){return C_(e,t,void 0)}Ls(hx(bx,{createIsNestedEqual:function(){return Ds}}));Ls(kx);Ls(hx(kx,{createIsNestedEqual:function(){return Ds}}));function rh(e){const{children:t,cols:n,containerWidth:r,margin:i,containerPadding:a,rowHeight:l,maxRows:s,isDraggable:o,isResizable:c,isBounded:f,static:d,useCSSTransforms:p=!0,usePercentages:h=!1,transformScale:m=1,positionStrategy:v,dragThreshold:w=0,droppingPosition:g,className:x="",style:y,handle:C="",cancel:E="",x:b,y:T,w:_,h:R,minW:N=1,maxW:M=1/0,minH:$=1,maxH:L=1/0,i:B,resizeHandles:I,resizeHandle:J,constraints:ae=Ky,layoutItem:A,layout:q=[],onDragStart:S,onDrag:Q,onDragStop:le,onResizeStart:j,onResize:oe,onResizeStop:ve}=e,[ne,re]=k.useState(!1),[we,ce]=k.useState(!1),ze=k.useRef(null),Y=k.useRef({left:0,top:0}),_e=k.useRef({top:0,left:0,width:0,height:0}),de=k.useRef(void 0),pt=k.useRef(q);pt.current=q;const rt=k.useRef(null),Fe=k.useRef(null),Le=k.useRef(!1),Ft=k.useRef({x:0,y:0}),De=k.useRef(!1),je=k.useMemo(()=>({cols:n,containerPadding:a,containerWidth:r,margin:i,maxRows:s,rowHeight:l}),[n,a,r,i,s,l]),qe=k.useMemo(()=>({cols:n,maxRows:s,containerWidth:r,containerHeight:0,rowHeight:l,margin:i,layout:[]}),[n,s,r,l,i]),Ke=k.useCallback(()=>({...qe,layout:pt.current}),[qe]),it=k.useMemo(()=>A??{i:B,x:b,y:T,w:_,h:R,minW:N,maxW:M,minH:$,maxH:L},[A,B,b,T,_,R,N,M,$,L]),un=k.useCallback(U=>{if(v!=null&&v.calcStyle)return v.calcStyle(U);if(p)return md(U);const K=Qy(U);return h?{...K,left:Hp(U.left/r),width:Hp(U.width/r)}:K},[v,p,h,r]),ht=k.useCallback((U,{node:K})=>{if(!S)return;const{offsetParent:se}=K;if(!se)return;const Te=se.getBoundingClientRect(),Re=K.getBoundingClientRect(),Me=Re.left/m,lt=Te.left/m,ut=Re.top/m,P=Te.top/m;let Z;if(v!=null&&v.calcDragPosition){const he=U;Z=v.calcDragPosition(he.clientX,he.clientY,he.clientX-Re.left,he.clientY-Re.top)}else Z={left:Me-lt+se.scrollLeft,top:ut-P+se.scrollTop};if(Y.current=Z,w>0){const he=U;Ft.current={x:he.clientX,y:he.clientY},Le.current=!0,De.current=!1,re(!0);return}re(!0);const fe=ll(je,Z.top,Z.left),{x:ye,y:X}=sl(ae,it,fe.x,fe.y,Ke());S(B,ye,X,{e:U,node:K,newPosition:Z})},[S,m,je,v,w,ae,it,Ke,B]),z=k.useCallback((U,{node:K,deltaX:se,deltaY:Te})=>{if(!Q||!ne)return;const Re=U;if(Le.current&&!De.current){const ye=Re.clientX-Ft.current.x,X=Re.clientY-Ft.current.y;if(Math.hypot(ye,X)<w)return;if(De.current=!0,Le.current=!1,S){const ie=ll(je,Y.current.top,Y.current.left),{x:xe,y:ge}=sl(ae,it,ie.x,ie.y,Ke());S(B,xe,ge,{e:U,node:K,newPosition:Y.current})}}let Me=Y.current.top+Te,lt=Y.current.left+se;if(f){const{offsetParent:ye}=K;if(ye){const X=ye.clientHeight-Sn(R,l,i[1]);Me=ns(Me,0,X);const he=Lr(je),ie=r-Sn(_,he,i[0]);lt=ns(lt,0,ie)}}const ut={top:Me,left:lt};Y.current=ut;const P=ll(je,Me,lt),{x:Z,y:fe}=sl(ae,it,P.x,P.y,Ke());Q(B,Z,fe,{e:U,node:K,newPosition:ut})},[Q,S,ne,w,f,R,l,i,je,r,_,B,ae,it,Ke]),F=k.useCallback((U,{node:K})=>{if(!le||!ne)return;const se=Le.current;if(Le.current=!1,De.current=!1,Ft.current={x:0,y:0},se){re(!1),Y.current={left:0,top:0};return}const{left:Te,top:Re}=Y.current,Me={top:Re,left:Te};re(!1),Y.current={left:0,top:0};const lt=ll(je,Re,Te),{x:ut,y:P}=sl(ae,it,lt.x,lt.y,Ke());le(B,ut,P,{e:U,node:K,newPosition:Me})},[le,ne,je,ae,it,Ke,B]);rt.current=ht,Fe.current=z;const te=k.useCallback((U,{node:K,size:se,handle:Te},Re,Me)=>{const lt=Me==="onResizeStart"?j:Me==="onResize"?oe:ve;if(!lt)return;let ut;K?ut=eT(Te,Re,se,r):ut={...se,top:Re.top,left:Re.left},_e.current=ut;const P=$N(je,ut.width,ut.height),{w:Z,h:fe}=GN(ae,it,P.w,P.h,Te,Ke());lt(B,Z,fe,{e:U.nativeEvent,node:K,size:ut,handle:Te})},[j,oe,ve,r,je,B,ae,it,Ke]),pe=k.useCallback((U,K)=>{ce(!0);const se=al(je,b,T,_,R),Te={...K,handle:K.handle};te(U,Te,se,"onResizeStart")},[te,je,b,T,_,R]),me=k.useCallback((U,K)=>{const se=al(je,b,T,_,R),Te={...K,handle:K.handle};te(U,Te,se,"onResize")},[te,je,b,T,_,R]),Ae=k.useCallback((U,K)=>{ce(!1),_e.current={top:0,left:0,width:0,height:0};const se=al(je,b,T,_,R),Te={...K,handle:K.handle};te(U,Te,se,"onResizeStop")},[te,je,b,T,_,R]);k.useEffect(()=>{var Te,Re;if(!g)return;const U=ze.current;if(!U)return;const K=de.current||{left:0,top:0},se=ne&&(g.left!==K.left||g.top!==K.top);if(ne){if(se){const Me=g.left-Y.current.left,lt=g.top-Y.current.top,ut={node:U,deltaX:Me,deltaY:lt,lastX:Y.current.left,lastY:Y.current.top,x:g.left,y:g.top};(Re=Fe.current)==null||Re.call(Fe,g.e,ut)}}else{const Me={node:U,deltaX:g.left,deltaY:g.top,lastX:0,lastY:0,x:g.left,y:g.top};(Te=rt.current)==null||Te.call(rt,g.e,Me)}de.current=g},[g,ne,B]);const Qe=al(je,b,T,_,R,ne?Y.current:null,we?_e.current:null),ot=xn.Children.only(t),bt=Lr(je),mt=[Sn(N,bt,i[0]),Sn($,l,i[1])],Ze=[Sn(M,bt,i[0]),Sn(L,l,i[1])],We=ot.props,xt=We.className,O=We.style;let W=xn.cloneElement(ot,{ref:ze,className:Ti("react-grid-item",xt,x,{static:d,resizing:we,"react-draggable":o,"react-draggable-dragging":ne,dropping:!!g,cssTransforms:p}),style:{...y,...O,...un(Qe)}});const G=J;return W=u.jsx(c_,{draggableOpts:{disabled:!c},className:c?void 0:"react-resizable-hide",width:Qe.width,height:Qe.height,minConstraints:mt,maxConstraints:Ze,onResizeStart:pe,onResize:me,onResizeStop:Ae,transformScale:m,resizeHandles:I,handle:G,children:W}),W=u.jsx(gr,{disabled:!o,onStart:ht,onDrag:z,onStop:F,handle:C,cancel:".react-resizable-handle"+(E?","+E:""),scale:m,nodeRef:ze,children:W}),W}var Pn=()=>{},ih="react-grid-layout",Sx=!1;try{Sx=/firefox/i.test(navigator.userAgent)}catch{}function N_(e,t){const n=xn.Children.toArray(e),r=xn.Children.toArray(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){const a=n[i],l=r[i];if((a==null?void 0:a.key)!==(l==null?void 0:l.key))return!1}return!0}function ah(e,t,n,r){const i=[],a=new Set;xn.Children.forEach(t,s=>{if(!xn.isValidElement(s)||s.key===null)return;const o=String(s.key);a.add(o);const c=e.find(f=>f.i===o);if(c)i.push(Or(c));else{const d=s.props["data-grid"];d?i.push({i:o,x:d.x??0,y:d.y??0,w:d.w??1,h:d.h??1,minW:d.minW,maxW:d.maxW,minH:d.minH,maxH:d.maxH,static:d.static,isDraggable:d.isDraggable,isResizable:d.isResizable,resizeHandles:d.resizeHandles,isBounded:d.isBounded}):i.push({i:o,x:0,y:_s(i),w:1,h:1})}});const l=hd(i,{cols:n});return r.compact(l,n)}function T_(e){const{children:t,width:n,gridConfig:r,dragConfig:i,resizeConfig:a,dropConfig:l,positionStrategy:s=rT,compactor:o,constraints:c=Ky,layout:f=[],droppingItem:d,autoSize:p=!0,className:h="",style:m={},innerRef:v,onLayoutChange:w=Pn,onDragStart:g=Pn,onDrag:x=Pn,onDragStop:y=Pn,onResizeStart:C=Pn,onResize:E=Pn,onResizeStop:b=Pn,onDrop:T=Pn,onDropDragOver:_=Pn}=e,R=k.useMemo(()=>({...iT,...r}),[r]),N=k.useMemo(()=>({...aT,...i}),[i]),M=k.useMemo(()=>({...lT,...a}),[a]),$=k.useMemo(()=>({...sT,...l}),[l]),{cols:L,rowHeight:B,maxRows:I,margin:J,containerPadding:ae}=R,{enabled:A,bounded:q,handle:S,cancel:Q,threshold:le}=N,{enabled:j,handles:oe,handleComponent:ve}=M,{enabled:ne,defaultItem:re,onDragOver:we}=$,ce=o??Ps("vertical"),ze=ce.type,Y=ce.allowOverlap,_e=ce.preventCollision??!1,de=k.useMemo(()=>d??{i:"__dropping-elem__",...re},[d,re]),pt=s.type==="transform",rt=s.scale,Fe=ae??J,[Le,Ft]=k.useState(!1),[De,je]=k.useState(()=>ah(f,t,L,ce)),[qe,Ke]=k.useState(null),[it,un]=k.useState(!1),[ht,z]=k.useState(null),[F,te]=k.useState(),pe=k.useRef(null),me=k.useRef(null),Ae=k.useRef(null),Qe=k.useRef(0),ot=k.useRef(De),bt=k.useRef(f),mt=k.useRef(t),Ze=k.useRef(ze),We=k.useRef(De);We.current=De,k.useEffect(()=>{Ft(!0),An(De,f)||w(De)},[]),k.useEffect(()=>{if(qe||ht)return;const X=!An(f,bt.current),he=!N_(t,mt.current),ie=ze!==Ze.current;if(X||he||ie){const ge=ah(X?f:De,t,L,ce);An(ge,De)||je(ge)}bt.current=f,mt.current=t,Ze.current=ze},[f,t,L,ze,ce,qe,ht,De]),k.useEffect(()=>{if(!qe&&!An(De,ot.current)){ot.current=De;const X=De.filter(he=>he.i!==de.i);w(X)}},[De,qe,w,de.i]);const xt=k.useMemo(()=>{if(!p)return;const X=_s(De),he=Fe[1];return X*B+(X-1)*J[1]+he*2+"px"},[p,De,B,J,Fe]),O=k.useCallback((X,he,ie,xe)=>{const ge=We.current,be=br(ge,X);if(!be)return;const Be={w:be.w,h:be.h,x:be.x,y:be.y,i:X};pe.current=Or(be),Ae.current=ge,Ke(Be),g(ge,be,be,null,xe.e,xe.node)},[g]),W=k.useCallback((X,he,ie,xe)=>{const ge=We.current,be=pe.current,Be=br(ge,X);if(!Be)return;const ct={w:Be.w,h:Be.h,x:Be.x,y:Be.y,i:X},Ye=Cr(ge,Be,he,ie,!0,_e,ze,L,Y);x(Ye,be,Be,ct,xe.e,xe.node),je(ce.compact(Ye,L)),Ke(ct)},[_e,ze,L,Y,ce,x]),G=k.useCallback((X,he,ie,xe)=>{if(!qe)return;const ge=We.current,be=pe.current,Be=br(ge,X);if(!Be)return;const ct=Cr(ge,Be,he,ie,!0,_e,ze,L,Y),Ye=ce.compact(ct,L);y(Ye,be,Be,null,xe.e,xe.node);const jt=Ae.current;pe.current=null,Ae.current=null,Ke(null),je(Ye),jt&&!An(jt,Ye)&&w(Ye)},[qe,_e,ze,L,Y,ce,y,w]),U=k.useCallback((X,he,ie,xe)=>{const ge=We.current,be=br(ge,X);be&&(me.current=Or(be),Ae.current=ge,un(!0),C(ge,be,be,null,xe.e,xe.node))},[C]),K=k.useCallback((X,he,ie,xe)=>{const ge=We.current,be=me.current,{handle:Be}=xe;let ct=!1,Ye,jt;const[Aa,zn]=UN(ge,X,Je=>(Ye=Je.x,jt=Je.y,["sw","w","nw","n","ne"].includes(Be)&&(["sw","nw","w"].includes(Be)&&(Ye=Je.x+(Je.w-he),he=Je.x!==Ye&&Ye<0?Je.w:he,Ye=Ye<0?0:Ye),["ne","n","nw"].includes(Be)&&(jt=Je.y+(Je.h-ie),ie=Je.y!==jt&&jt<0?Je.h:ie,jt=jt<0?0:jt),ct=!0),_e&&!Y&&Yy(ge,{...Je,w:he,h:ie,x:Ye??Je.x,y:jt??Je.y}).filter(La=>La.i!==Je.i).length>0&&(jt=Je.y,ie=Je.h,Ye=Je.x,he=Je.w,ct=!1),Je.w=he,Je.h=ie,Je));if(!zn)return;let _i=Aa;ct&&Ye!==void 0&&jt!==void 0&&(_i=Cr(Aa,zn,Ye,jt,!0,_e,ze,L,Y));const Da={w:zn.w,h:zn.h,x:zn.x,y:zn.y,i:X,static:!0};E(_i,be,zn,Da,xe.e,xe.node),je(ce.compact(_i,L)),Ke(Da)},[_e,ze,L,Y,ce,E]),se=k.useCallback((X,he,ie,xe)=>{const ge=We.current,be=me.current,Be=br(ge,X),ct=ce.compact(ge,L);b(ct,be,Be??null,null,xe.e,xe.node);const Ye=Ae.current;me.current=null,Ae.current=null,Ke(null),un(!1),je(ct),Ye&&!An(Ye,ct)&&w(ct)},[L,ce,b,w]),Te=k.useCallback(()=>{const X=We.current;if(!X.some(xe=>xe.i===de.i)){z(null),Ke(null),te(void 0);return}const ie=ce.compact(X.filter(xe=>xe.i!==de.i),L);je(ie),z(null),Ke(null),te(void 0)},[de.i,L,ce]),Re=k.useCallback(X=>{var Td;if(X.preventDefault(),X.stopPropagation(),Sx&&!((Td=X.nativeEvent.target)!=null&&Td.classList.contains(ih)))return!1;const he=we?we(X.nativeEvent):_(X);if(he===!1)return ht&&Te(),!1;const{dragOffsetX:ie=0,dragOffsetY:xe=0,...ge}=he??{},be={...de,...ge},Be=X.currentTarget.getBoundingClientRect(),ct={cols:L,margin:J,maxRows:I,rowHeight:B,containerWidth:n,containerPadding:Fe},Ye=Lr(ct),jt=Sn(be.w,Ye,J[0]),Aa=Sn(be.h,B,J[1]),zn=jt/2,_i=Aa/2,Da=X.clientX-Be.left+ie-zn,Je=X.clientY-Be.top+xe-_i,Os=Math.max(0,Da),La=Math.max(0,Je),Oa={left:Os/rt,top:La/rt,e:X.nativeEvent};if(ht)F&&(F.left!==Oa.left||F.top!==Oa.top)&&te(Oa);else{const Fs=MN(ct,La,Os,be.w,be.h);z(u.jsx("div",{},be.i)),te(Oa);const _x=We.current.filter(zx=>zx.i!==be.i);je([..._x,{...be,x:Fs.x,y:Fs.y,static:!1,isDraggable:!0}])}},[ht,F,de,we,_,Te,rt,L,J,I,B,n,Fe]),Me=k.useCallback(X=>{X.preventDefault(),X.stopPropagation(),Qe.current--,Qe.current<0&&(Qe.current=0),Qe.current===0&&Te()},[Te]),lt=k.useCallback(X=>{X.preventDefault(),X.stopPropagation(),Qe.current++},[]),ut=k.useCallback(X=>{X.preventDefault(),X.stopPropagation();const he=We.current,ie=he.find(xe=>xe.i===de.i);Qe.current=0,Te(),T(he,ie,X.nativeEvent)},[de.i,Te,T]),P=k.useCallback((X,he)=>{if(!X||!X.key)return null;const ie=br(De,String(X.key));if(!ie)return null;const xe=typeof ie.isDraggable=="boolean"?ie.isDraggable:!ie.static&&A,ge=typeof ie.isResizable=="boolean"?ie.isResizable:!ie.static&&j,be=ie.resizeHandles||[...oe],Be=xe&&q&&ie.isBounded!==!1,ct=ve;return u.jsx(rh,{containerWidth:n,cols:L,margin:J,containerPadding:Fe,maxRows:I,rowHeight:B,cancel:Q,handle:S,onDragStart:O,onDrag:W,onDragStop:G,onResizeStart:U,onResize:K,onResizeStop:se,isDraggable:xe,isResizable:ge,isBounded:Be,useCSSTransforms:pt&&Le,usePercentages:!Le,transformScale:rt,positionStrategy:s,dragThreshold:le,w:ie.w,h:ie.h,x:ie.x,y:ie.y,i:ie.i,minH:ie.minH,minW:ie.minW,maxH:ie.maxH,maxW:ie.maxW,static:ie.static,droppingPosition:he?F:void 0,resizeHandles:be,resizeHandle:ct,constraints:c,layoutItem:ie,layout:De,children:X},ie.i)},[De,n,L,J,Fe,I,B,Q,S,O,W,G,U,K,se,A,j,q,pt,Le,rt,s,le,F,oe,ve,c]),Z=()=>qe?u.jsx(rh,{w:qe.w,h:qe.h,x:qe.x,y:qe.y,i:qe.i,className:`react-grid-placeholder ${it?"placeholder-resizing":""}`,containerWidth:n,cols:L,margin:J,containerPadding:Fe,maxRows:I,rowHeight:B,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:pt,transformScale:rt,constraints:c,layout:De,children:u.jsx("div",{})}):null,fe=Ti(ih,h),ye={height:xt,...m};return u.jsxs("div",{ref:v,className:fe,style:ye,onDrop:ne?ut:void 0,onDragLeave:ne?Me:void 0,onDragEnter:ne?lt:void 0,onDragOver:ne?Re:void 0,children:[xn.Children.map(t,X=>xn.isValidElement(X)?P(X):null),ne&&ht&&P(ht,!0),Z()]})}var __={lg:1200,md:996,sm:768,xs:480,xxs:0},z_={lg:12,md:10,sm:6,xs:4,xxs:2},Lo=()=>{};function P_(e,t,n,r){const i=[];xn.Children.forEach(t,l=>{if(!xn.isValidElement(l)||l.key===null)return;const s=String(l.key),o=e.find(c=>c.i===s);if(o)i.push({...o,i:s});else{const f=l.props["data-grid"];f?i.push({i:s,x:f.x??0,y:f.y??0,w:f.w??1,h:f.h??1,minW:f.minW,maxW:f.maxW,minH:f.minH,maxH:f.maxH,static:f.static,isDraggable:f.isDraggable,isResizable:f.isResizable,resizeHandles:f.resizeHandles,isBounded:f.isBounded}):i.push({i:s,x:0,y:_s(i),w:1,h:1})}});const a=hd(i,{cols:n});return r.compact(a,n)}function R_(e){const{children:t,width:n,breakpoint:r,breakpoints:i=__,cols:a=z_,layouts:l={},rowHeight:s=150,maxRows:o=1/0,margin:c=[10,10],containerPadding:f=null,compactor:d,onBreakpointChange:p=Lo,onLayoutChange:h=Lo,onWidthChange:m=Lo,...v}=e,w=d??Ps("vertical"),g=w.type,x=w.allowOverlap,y=k.useMemo(()=>r??Up(i,n),[]),C=k.useMemo(()=>Wp(y,a),[y,a]),E=k.useMemo(()=>No(l,i,y,y,C,g),[]),[b,T]=k.useState(y),[_,R]=k.useState(C),[N,M]=k.useState(E),[$,L]=k.useState(l),B=k.useRef(n),I=k.useRef(r),J=k.useRef(i),ae=k.useRef(a),A=k.useRef(l),q=k.useRef(g),S=k.useRef($);k.useEffect(()=>{S.current=$},[$]);const Q=k.useMemo(()=>An(l,A.current)?null:No(l,i,b,b,_,w),[l,i,b,_,w]),le=Q??N;k.useEffect(()=>{Q!==null&&(M(Q),L(l),S.current=l,A.current=l)},[Q,l]),k.useEffect(()=>{if(g!==q.current){const re=w.compact(dr(le),_),we={...S.current,[b]:re};M(re),L(we),S.current=we,h(re,we),q.current=g}},[g,w,le,_,x,b,h]),k.useEffect(()=>{const re=n!==B.current,we=r!==I.current,ce=!An(i,J.current),ze=!An(a,ae.current);if(re||we||ce||ze){const Y=r??Up(i,n),_e=Wp(Y,a),de=b;if(de!==Y||ce||ze){const Fe={...S.current};Fe[de]||(Fe[de]=dr(N));let Le=No(Fe,i,Y,de,_e,w);Le=P_(Le,t,_e,w),Fe[Y]=Le,T(Y),R(_e),M(Le),L(Fe),S.current=Fe,p(Y,_e),h(Le,Fe)}const pt=ol(c,Y),rt=f?ol(f,Y):null;m(n,pt,_e,rt),B.current=n,I.current=r,J.current=i,ae.current=a}},[n,r,i,a,b,_,N,t,w,g,x,c,f,p,h,m]);const j=k.useCallback(re=>{const ce={...S.current,[b]:re};M(re),L(ce),S.current=ce,h(re,ce)},[b,h]),oe=k.useMemo(()=>ol(c,b),[c,b]),ve=k.useMemo(()=>f===null?null:ol(f,b),[f,b]),ne=k.useMemo(()=>({cols:_,rowHeight:s,maxRows:o,margin:oe,containerPadding:ve}),[_,s,o,oe,ve]);return u.jsx(T_,{...v,width:n,gridConfig:ne,compactor:w,onLayoutChange:j,layout:le,children:t})}function Ex(e){const{children:t,width:n,breakpoint:r,breakpoints:i,cols:a,layouts:l,onBreakpointChange:s,onLayoutChange:o,onWidthChange:c,rowHeight:f,maxRows:d,margin:p,containerPadding:h,droppingItem:m,compactType:v,preventCollision:w=!1,allowOverlap:g=!1,verticalCompact:x,isDraggable:y=!0,isBounded:C=!1,draggableHandle:E,draggableCancel:b,isResizable:T=!0,resizeHandles:_=["se"],resizeHandle:R,isDroppable:N=!1,useCSSTransforms:M=!0,transformScale:$=1,autoSize:L,className:B,style:I,innerRef:J,onDragStart:ae,onDrag:A,onDragStop:q,onResizeStart:S,onResize:Q,onResizeStop:le,onDrop:j,onDropDragOver:oe}=e;let ve=v===void 0?"vertical":v;x===!1&&(ve=null);const ne={enabled:y,bounded:C,handle:E,cancel:b},re={enabled:T,handles:_,handleComponent:R},we={enabled:N};let ce;M?$!==1?ce=nT($):ce=Jy:ce=tT;const ze=Ps(ve,g,w);return u.jsx(R_,{width:n,breakpoint:r,breakpoints:i,cols:a,layouts:l,rowHeight:f,maxRows:d,margin:p,containerPadding:h,compactor:ze,dragConfig:ne,resizeConfig:re,dropConfig:we,positionStrategy:ce,droppingItem:m,autoSize:L,className:B,style:I,innerRef:J,onBreakpointChange:s,onLayoutChange:o,onWidthChange:c,onDragStart:ae,onDrag:A,onDragStop:q,onResizeStart:S,onResize:Q,onResizeStop:le,onDrop:j,onDropDragOver:oe,children:t})}Ex.displayName="ResponsiveReactGridLayout";var I_=Ex,A_="react-grid-layout";function D_(e){function t(n){const{measureBeforeMount:r=!1,className:i,style:a,...l}=n,[s,o]=k.useState(1280),[c,f]=k.useState(!1),d=k.useRef(null),p=k.useRef(null);return k.useEffect(()=>{f(!0)},[]),k.useEffect(()=>{const h=d.current;if(!(h instanceof HTMLElement))return;let m=null;const v=new ResizeObserver(w=>{if(w[0]){const g=w[0].contentRect.width;m!==null&&cancelAnimationFrame(m),m=requestAnimationFrame(()=>{o(g),m=null})}});return v.observe(h),p.current=v,()=>{m!==null&&cancelAnimationFrame(m),v.unobserve(h),v.disconnect()}},[c]),r&&!c?u.jsx("div",{className:Ti(i,A_),style:a,ref:d}):u.jsx(e,{innerRef:d,className:i,style:a,...l,width:s})}return t.displayName=`WidthProvider(${e.displayName||e.name||"Component"})`,t}const L_=D_(I_),O_={lg:12,xxs:1},F_={lg:640,xxs:0},lh=12,Ku=20,El=16;function M_(e){const t=e-Ku*2-(lh-1)*El;return Math.max(16,t/lh)}function $_({blocks:e,layouts:t,mode:n,onLayoutChange:r,renderBlock:i,blockMeta:a,onRemove:l,onDuplicate:s,canRemove:o=()=>!0,canDuplicate:c=()=>!0}){const f=n==="layout",d=k.useRef(null),[p,h]=k.useState(46);return k.useLayoutEffect(()=>{const m=d.current;if(!m)return;const v=()=>h(M_(m.clientHeight));if(v(),typeof ResizeObserver>"u")return;const w=new ResizeObserver(v);return w.observe(m),()=>w.disconnect()},[]),u.jsx("div",{ref:d,className:`block-canvas ${f?"arranging":""}`,style:{"--row-pitch":`${p+El}px`},"data-testid":"block-canvas",children:u.jsx(L_,{className:"rgl",layouts:t,breakpoints:F_,cols:O_,rowHeight:p,margin:[El,El],containerPadding:[Ku,Ku],isDraggable:f,isResizable:f,draggableHandle:".block-handle",onLayoutChange:(m,v)=>r(v),compactType:"vertical",useCSSTransforms:!0,children:e.map(m=>{const v=a(m);return u.jsxs("div",{className:`block ${f?"is-arranging":""}`,"data-testid":`block-${m.type}`,"data-rgl-id":m.id,children:[u.jsxs("div",{className:`block-header ${f?"block-handle":""}`,children:[u.jsx("span",{className:"block-icon",children:v.icon}),u.jsx("span",{className:"block-title",children:v.title}),u.jsx("span",{className:"spacer"}),f&&u.jsxs("span",{className:"block-actions",children:[c(m)&&u.jsx("button",{title:"Duplicate",onClick:()=>s(m.id),"data-testid":"block-duplicate",children:"⧉"}),o(m)?u.jsx("button",{title:"Remove",onClick:()=>l(m.id),"data-testid":"block-remove",children:"✕"}):u.jsx("span",{className:"block-pin",title:"Chat is always here",children:"📌"})]})]}),u.jsx("div",{className:"block-body",children:i(m)})]},m.id)})})})}function B_({blocks:e,activeId:t,setActiveId:n,mode:r,renderBlock:i,blockMeta:a,onRemove:l,canRemove:s=()=>!0}){const o=e.find(f=>f.id===t)||e[0],c=r==="layout";return u.jsxs("div",{className:"mobile-canvas","data-testid":"mobile-canvas",children:[u.jsx("div",{className:"mobile-tabs","data-testid":"mobile-tabs",children:e.map(f=>{const d=a(f);return u.jsxs("button",{className:`mtab ${f.id===(o==null?void 0:o.id)?"active":""}`,onClick:()=>n(f.id),"data-testid":`mtab-${f.type}`,children:[u.jsx("span",{className:"mtab-icon",children:d.icon}),u.jsx("span",{className:"mtab-label",children:d.title}),c&&s(f)&&u.jsx("span",{className:"mtab-x",role:"button",title:"Remove",onClick:p=>{p.stopPropagation(),l(f.id)},children:"✕"})]},f.id)})}),u.jsx("div",{className:"mobile-block",children:o&&u.jsx("div",{className:"block",children:u.jsx("div",{className:"block-body",children:i(o)})})})]})}function H_({items:e,bazaarItems:t=[],onAdd:n,onClose:r}){return u.jsx("div",{className:"modal-backdrop",onClick:r,"data-testid":"add-gallery-backdrop",children:u.jsxs("div",{className:"modal add-gallery",onClick:i=>i.stopPropagation(),"data-testid":"add-gallery",children:[u.jsx("h2",{children:"Add a block"}),u.jsx("p",{className:"muted",children:"Build your space — drop in whatever's useful. Move and resize it however you like."}),u.jsx("div",{className:"gallery-grid",children:e.map(i=>u.jsxs("button",{className:"gallery-item",disabled:i.soon,onClick:()=>!i.soon&&n(i.type),"data-testid":`gallery-add-${i.type}`,children:[u.jsx("span",{className:"gallery-glyph",children:i.icon}),u.jsx("span",{className:"gallery-name",children:i.title}),u.jsx("span",{className:"gallery-desc",children:i.desc}),i.soon&&u.jsx("span",{className:"gallery-soon",children:"soon"})]},i.type))}),t.length>0&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"gallery-section",children:"🛍️ from the Bazaar"}),u.jsx("div",{className:"gallery-grid",children:t.map(i=>u.jsxs("button",{className:"gallery-item bazaar",onClick:()=>n(i.type),"data-testid":`gallery-add-${i.type}`,children:[u.jsx("span",{className:"gallery-glyph",children:i.icon}),u.jsx("span",{className:"gallery-name",children:i.title}),u.jsx("span",{className:"gallery-desc",children:i.desc})]},i.type))})]}),u.jsxs("div",{className:"gallery-agent-hint","data-testid":"gallery-agent-hint",children:["✨ Or ask your agent in chat — ",u.jsx("em",{children:"“make me a block that shows today’s signups”"})," — and it builds one for you."]}),u.jsx("div",{className:"actions",children:u.jsx("button",{onClick:r,children:"Done"})})]})})}const U_={chat:{icon:"🗨️",label:"Chat"},liveview:{icon:"👁️",label:"Live view"},notes:{icon:"📝",label:"Notes"},earnings:{icon:"💸",label:"Earnings"},analytics:{icon:"📊",label:"Analytics"}};function sh({blocks:e}){return u.jsx("span",{className:"tpl-chips",children:e.map((t,n)=>{const r=U_[t.type]||{icon:"▫️",label:t.type};return u.jsxs("span",{className:"tpl-chip",title:r.label,children:[u.jsx("span",{className:"tpl-chip-icon",children:r.icon}),r.label]},n)})})}function W_({builtins:e=[],saved:t=[],onApply:n,onSaveCurrent:r,onDelete:i,onClose:a}){const[l,s]=k.useState("");function o(){const c=l.trim();c&&(r(c),s(""))}return u.jsx("div",{className:"modal-backdrop",onClick:a,"data-testid":"template-gallery-backdrop",children:u.jsxs("div",{className:"modal template-gallery",onClick:c=>c.stopPropagation(),"data-testid":"template-gallery",children:[u.jsx("h2",{children:"Start from a template"}),u.jsx("p",{className:"muted",children:"Pick a layout to start from — it swaps your current blocks for the template's. Chat always stays."}),u.jsx("div",{className:"gallery-grid",children:e.map(c=>u.jsxs("button",{className:"gallery-item template-card",onClick:()=>n(c),"data-testid":`template-${c.id}`,children:[u.jsx("span",{className:"gallery-glyph",children:c.icon}),u.jsx("span",{className:"gallery-name",children:c.name}),u.jsx("span",{className:"gallery-desc",children:c.desc}),u.jsx(sh,{blocks:c.blocks})]},c.id))}),t.length>0&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"gallery-section",children:"⭐ your templates"}),u.jsx("div",{className:"gallery-grid",children:t.map(c=>u.jsxs("div",{className:"gallery-item template-card saved","data-testid":`template-${c.id}`,children:[u.jsxs("button",{className:"tpl-apply",onClick:()=>n(c),"data-testid":`template-apply-${c.id}`,children:[u.jsx("span",{className:"gallery-glyph",children:c.icon||"⭐"}),u.jsx("span",{className:"gallery-name",children:c.name}),u.jsx(sh,{blocks:c.blocks})]}),u.jsx("button",{className:"tpl-del",title:"Delete this template",onClick:()=>i(c.id),"data-testid":`template-delete-${c.id}`,children:"✕"})]},c.id))})]}),u.jsxs("div",{className:"tpl-save-row",children:[u.jsx("input",{className:"tpl-save-input",value:l,onChange:c=>s(c.target.value),onKeyDown:c=>c.key==="Enter"&&o(),placeholder:"Save current layout as…","data-testid":"template-save-name",maxLength:40}),u.jsx("button",{className:"primary",onClick:o,disabled:!l.trim(),"data-testid":"template-save-btn",children:"Save layout"})]}),u.jsx("div",{className:"actions",children:u.jsx("button",{onClick:a,children:"Done"})})]})})}const jx="wild:theme",Qu=[{id:"cyan",name:"VentureWild",accent:"#0891b2",hot:"#0e7490"},{id:"teal",name:"Teal",accent:"#0d9488",hot:"#0f766e"},{id:"blue",name:"Blue",accent:"#2563eb",hot:"#1d4ed8"},{id:"violet",name:"Violet",accent:"#7c3aed",hot:"#6d28d9"},{id:"emerald",name:"Emerald",accent:"#059669",hot:"#047857"},{id:"amber",name:"Amber",accent:"#d97706",hot:"#b45309"},{id:"rose",name:"Rose",accent:"#e11d48",hot:"#be123c"}],V_=[{id:"light",name:"Light",glyph:"☀️",desc:"Bright & warm (default)"},{id:"dark",name:"Dark",glyph:"🌙",desc:"The venturewild.llc look"}],Cx={bg:"--bg",bgElev:"--bg-elev",surface:"--surface",border:"--border",text:"--text",textMuted:"--text-muted",canvas1:"--canvas-1",canvas2:"--canvas-2",canvas3:"--canvas-3"},jl={mode:"light",accent:Qu[0].accent,hot:Qu[0].hot,accentManual:!1,tokens:{}};function Fn(e){if(typeof e!="string")return null;const t=e.trim();return/^#([0-9a-f]{6})$/i.test(t)?t.toLowerCase():null}function Nx(e){const t=Fn(e)||"#000000";return[parseInt(t.slice(1,3),16),parseInt(t.slice(3,5),16),parseInt(t.slice(5,7),16)]}function Cd(e,t=.16){const[n,r,i]=Nx(e),a=1-t,l=s=>Math.max(0,Math.min(255,Math.round(s*a)));return`#${[l(n),l(r),l(i)].map(s=>s.toString(16).padStart(2,"0")).join("")}`}function Tx(e){const[t,n,r]=Nx(e).map(a=>{const l=a/255;return l<=.03928?l/12.92:((l+.055)/1.055)**2.4});return .2126*t+.7152*n+.0722*r>.42?"#08232b":"#ffffff"}function Nd(e){const t={};if(e&&typeof e=="object")for(const n of Object.keys(Cx)){const r=Fn(e[n]);r&&(t[n]=r)}return t}function G_(e,t,n){const r=t&&typeof t=="object"?t:{},i=n?e.accent:Fn(r.accent)||e.accent,a=n?e.hot:Fn(r.hot)||Fn(r.accent)||e.hot;return{...e,mode:r.mode==="dark"?"dark":"light",accent:i,hot:a,tokens:Nd(r.tokens),accentManual:!0}}function q_(){try{const e=localStorage.getItem(jx);if(!e)return{...jl};const t=JSON.parse(e),n=Fn(t.accent)||jl.accent;return{mode:t.mode==="dark"?"dark":"light",accent:n,hot:Fn(t.hot)||Cd(n),accentManual:!!t.accentManual,tokens:Nd(t.tokens)}}catch{return{...jl}}}function Y_(e){try{localStorage.setItem(jx,JSON.stringify(e))}catch{}}function X_(e){const t=document.documentElement;e.mode==="dark"?t.dataset.theme="dark":delete t.dataset.theme;const n=Fn(e.accent)||jl.accent;t.style.setProperty("--accent",n),t.style.setProperty("--accent-hot",Fn(e.hot)||Cd(n)),t.style.setProperty("--accent-ink",Tx(n));const r=Nd(e.tokens);for(const[i,a]of Object.entries(Cx))r[i]?t.style.setProperty(a,r[i]):t.style.removeProperty(a)}function K_({theme:e,onChange:t,onClose:n}){const[r,i]=k.useState(e.accent);function a(o){t({...e,mode:o})}function l(o){i(o.accent),t({...e,accent:o.accent,hot:o.hot,accentManual:!0})}function s(o){i(o),/^#([0-9a-f]{6})$/i.test(o)&&t({...e,accent:o,hot:Cd(o),accentManual:!0})}return u.jsx("div",{className:"modal-backdrop",onClick:n,"data-testid":"theme-picker-backdrop",children:u.jsxs("div",{className:"modal theme-picker",onClick:o=>o.stopPropagation(),"data-testid":"theme-picker",children:[u.jsx("h2",{children:"Make it yours"}),u.jsx("p",{className:"muted",children:"Pick a look. Changes apply live and follow you across your workspaces."}),u.jsx("div",{className:"theme-section",children:"Mode"}),u.jsx("div",{className:"theme-modes",children:V_.map(o=>u.jsxs("button",{className:`theme-mode ${e.mode===o.id?"active":""}`,onClick:()=>a(o.id),"data-testid":`theme-mode-${o.id}`,"aria-pressed":e.mode===o.id,children:[u.jsx("span",{className:"theme-mode-glyph",children:o.glyph}),u.jsx("span",{className:"theme-mode-name",children:o.name}),u.jsx("span",{className:"theme-mode-desc",children:o.desc})]},o.id))}),u.jsx("div",{className:"theme-section",children:"Accent"}),u.jsx("div",{className:"theme-swatches",children:Qu.map(o=>{const c=e.accent.toLowerCase()===o.accent.toLowerCase();return u.jsx("button",{className:`theme-swatch ${c?"active":""}`,style:{background:o.accent,color:Tx(o.accent)},onClick:()=>l(o),title:o.name,"data-testid":`theme-accent-${o.id}`,"aria-pressed":c,children:c?"✓":""},o.id)})}),u.jsxs("div",{className:"theme-custom",children:[u.jsx("label",{htmlFor:"theme-hex",className:"muted",children:"Custom"}),u.jsx("input",{id:"theme-hex",type:"color",value:/^#([0-9a-f]{6})$/i.test(r)?r:"#0891b2",onChange:o=>s(o.target.value),"data-testid":"theme-custom-color","aria-label":"Custom accent color"}),u.jsx("input",{className:"theme-hex-input",value:r,onChange:o=>s(o.target.value),placeholder:"#0891b2",maxLength:7,spellCheck:!1,"data-testid":"theme-custom-hex"})]}),u.jsx("div",{className:"actions",children:u.jsx("button",{className:"primary",onClick:n,"data-testid":"theme-done",children:"Done"})})]})})}function Q_({bazaarPreview:e}){const[t,n]=k.useState(null);k.useEffect(()=>{let i=!1;async function a(){var c;const s=await fetch("/api/preview/ports").catch(()=>null);if(!s||i)return;const o=await s.json().catch(()=>({}));i||!t&&((c=o.ports)==null?void 0:c.length)>0&&n(o.ports[0].port)}a();const l=setInterval(a,4e3);return()=>{i=!0,clearInterval(l)}},[t]);const r=e!=null&&e.url?`${e.url}${e.url.includes("?")?"&":"?"}_=${e.ts||""}`:null;return r?u.jsx("iframe",{className:"liveview-frame",src:r,title:"Live view","data-testid":"liveview-frame",sandbox:"allow-scripts"},`bz-${e.ts}`):t?u.jsx("iframe",{className:"liveview-frame",src:`http://localhost:${t}`,title:"Live view","data-testid":"liveview-frame"},t):u.jsxs("div",{className:"liveview-empty","data-testid":"liveview-empty",children:[u.jsx("div",{className:"liveview-empty-mark",children:"👁️"}),u.jsx("p",{className:"liveview-empty-title",children:"Nothing to show yet"}),u.jsx("p",{className:"liveview-empty-sub",children:"When your agent builds something, it appears here — live, as it works."})]})}function Z_({id:e}){const t=`wild:notes:${e}`,[n,r]=k.useState(()=>{try{return localStorage.getItem(t)||""}catch{return""}});return k.useEffect(()=>{try{localStorage.setItem(t,n)}catch{}},[t,n]),u.jsx("textarea",{className:"notes-block",value:n,onChange:i=>r(i.target.value),placeholder:"Jot anything — a plan, a link, a reminder…","data-testid":"notes-block"})}function J_(e){return`$${(Number(e)||0).toFixed(2)}`}function ez(e=[],t=[]){if(!e.length)return t.length?{name:"You",handle:"you",total:0,uses:0,matches:0,serviceCalls:0}:null;const n=e[0];return(n.total||0)===0&&e.find(r=>r.handle==="you")||n}function tz({live:e,token:t}){const[n,r]=k.useState(e||null);k.useEffect(()=>{let m=!1;const v=t?{Authorization:`Bearer ${t}`}:{};return fetch("/api/bazaar/state",{headers:v}).then(w=>w.ok?w.json():null).then(w=>{!m&&w&&r(g=>g||w)}).catch(()=>{}),()=>{m=!0}},[t]),k.useEffect(()=>{e&&r(e)},[e]);const i=k.useMemo(()=>ez(n==null?void 0:n.earnings,n==null?void 0:n.listings),[n]),a=i==null?void 0:i.handle,l=(i==null?void 0:i.total)??0,s=k.useRef({handle:null,total:null}),[o,c]=k.useState([]);if(k.useEffect(()=>{const m=s.current;if(m.handle!==a){s.current={handle:a,total:l},c([]);return}if(m.total===null){s.current={handle:a,total:l};return}const v=l-m.total;s.current={handle:a,total:l},v>0&&c(w=>[...w,v].slice(-28))},[a,l]),!i)return u.jsxs("div",{className:"earn-empty","data-testid":"earnings-empty",children:[u.jsx("div",{className:"earn-empty-mark",children:"💸"}),u.jsx("p",{className:"earn-empty-title",children:"No earnings yet"}),u.jsx("p",{className:"earn-empty-sub",children:"When someone builds on what you share — or uses a tool you wired in — represented earnings show up here, live."})]});const f=i.handle==="you",d=(i.serviceCalls||0)>0||(i.matches||0)>0,p=d?i.matches||0:i.uses||0,h=d?p===1?"match":"matches":p===1?"build":"builds";return u.jsxs("div",{className:"earn-block","data-testid":"earnings-block",children:[u.jsxs("div",{className:"earn-who",children:[u.jsxs("span",{className:"earn-name",children:[i.name,f&&u.jsx("span",{className:"earn-you-tag",children:"you"})]}),u.jsx("span",{className:"earn-sub",children:f?"your producer earnings":"a producer's earnings, live"})]}),u.jsx("div",{className:"earn-amount","data-testid":"earnings-amount",children:J_(l)}),u.jsxs("div",{className:"earn-meta",children:[u.jsxs("span",{children:[u.jsx("strong",{children:p})," ",h]}),u.jsx("span",{className:"earn-rep",title:"No real money moves yet — a preview of how earnings would work.",children:"represented · settles later"})]}),u.jsx(nz,{values:o})]})}function nz({values:e}){const t=e&&e.length>0,n=t?e:Array.from({length:16},()=>0),r=t?Math.max(...e):1;return u.jsxs("div",{className:`earn-spark ${t?"":"is-baseline"}`,"data-testid":"earnings-spark","aria-hidden":"true",children:[u.jsx("div",{className:"earn-bars",children:n.map((i,a)=>u.jsx("span",{className:"earn-bar",style:{height:`${t?8+Math.round(i/r*92):6}%`}},a))}),u.jsx("span",{className:"earn-spark-live",children:"live"})]})}function oh(e){return`$${(Number(e)||0).toFixed(2)}`}function rz({live:e,token:t}){const[n,r]=k.useState(e||null);k.useEffect(()=>{let c=!1;const f=t?{Authorization:`Bearer ${t}`}:{};return fetch("/api/bazaar/state",{headers:f}).then(d=>d.ok?d.json():null).then(d=>{!c&&d&&r(p=>p||d)}).catch(()=>{}),()=>{c=!0}},[t]),k.useEffect(()=>{e&&r(e)},[e]);const i=(n==null?void 0:n.earnings)||[],a=(n==null?void 0:n.totals)||{creditPaid:0},l=i.reduce((c,f)=>c+(f.matches||0),0),s=i.reduce((c,f)=>c+(f.uses||0),0),o=Math.max(1,...i.map(c=>c.total||0));return i.length?u.jsxs("div",{className:"analytics-block","data-testid":"analytics-block",children:[u.jsxs("div",{className:"an-stats",children:[u.jsxs("div",{className:"an-stat",children:[u.jsx("span",{className:"an-stat-num",children:oh(a.creditPaid)}),u.jsx("span",{className:"an-stat-lbl",children:"represented"})]}),u.jsxs("div",{className:"an-stat",children:[u.jsx("span",{className:"an-stat-num",children:l||s}),u.jsx("span",{className:"an-stat-lbl",children:l?"matches":"builds"})]}),u.jsxs("div",{className:"an-stat",children:[u.jsx("span",{className:"an-stat-num",children:i.length}),u.jsx("span",{className:"an-stat-lbl",children:i.length===1?"producer":"producers"})]})]}),u.jsx("div",{className:"an-board",children:i.slice(0,6).map(c=>u.jsxs("div",{className:"an-row","data-testid":`analytics-row-${c.handle}`,children:[u.jsxs("span",{className:"an-row-name",children:[c.name,c.handle==="you"&&u.jsx("span",{className:"earn-you-tag",children:"you"})]}),u.jsx("span",{className:"an-row-bar",children:u.jsx("span",{className:"an-row-fill",style:{width:`${Math.round((c.total||0)/o*100)}%`}})}),u.jsx("span",{className:"an-row-val",children:oh(c.total)})]},c.handle))}),u.jsx("div",{className:"an-foot",children:"represented · settles later"})]}):u.jsxs("div",{className:"earn-empty","data-testid":"analytics-empty",children:[u.jsx("div",{className:"earn-empty-mark",children:"📊"}),u.jsx("p",{className:"earn-empty-title",children:"No activity yet"}),u.jsx("p",{className:"earn-empty-sub",children:"Once builds and matches start flowing across the shelf, you'll see who's earning and how much, here."})]})}function iz({token:e,selectedFile:t,onOpenFile:n}){const[r,i]=k.useState(null),[a,l]=k.useState(null),[s,o]=k.useState(()=>new Set);k.useEffect(()=>{let d=!1;const p=e?{Authorization:`Bearer ${e}`}:{};return fetch("/api/workspace/tree",{headers:p}).then(h=>h.json()).then(h=>{d||(h.error?l(h.error):i(h.entries||[]))}).catch(h=>!d&&l(h.message||String(h))),()=>{d=!0}},[e]);function c(d){o(p=>{const h=new Set(p);return h.has(d)?h.delete(d):h.add(d),h})}function f(d,p=0){var w;const h=d.type==="dir",m=s.has(d.path),v=!h&&d.path===t;return u.jsxs("div",{children:[u.jsxs("div",{className:`fnode ${h?"dir":""} ${v?"sel":""}`,onClick:()=>h?c(d.path):n==null?void 0:n(d.path),style:{paddingLeft:p*12+6},"data-testid":`files-node-${d.path}`,title:d.path,children:[u.jsx("span",{className:"fnode-tw",children:h?m?"▾":"▸":""}),u.jsx("span",{className:"fnode-ic",children:h?"📁":"📄"}),u.jsx("span",{className:"fnode-nm",children:d.name})]}),h&&m&&((w=d.children)==null?void 0:w.map(g=>f(g,p+1)))]},d.path)}return u.jsxs("div",{className:"files-block","data-testid":"files-block",children:[a&&u.jsx("div",{className:"files-msg err",children:a==="forbidden"?"Files aren't available on this view.":a}),!r&&!a&&u.jsxs("div",{className:"files-msg",children:[u.jsx("span",{className:"spinner"})," loading…"]}),(r==null?void 0:r.length)===0&&u.jsx("div",{className:"files-msg",children:"Empty workspace"}),r==null?void 0:r.map(d=>f(d,0))]})}const az={js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"jsx",ts:"typescript",tsx:"tsx",json:"json",md:"markdown",markdown:"markdown",css:"css",scss:"scss",html:"markup",xml:"markup",svg:"markup",py:"python",rs:"rust",go:"go",sh:"bash",bash:"bash",zsh:"bash",yml:"yaml",yaml:"yaml",toml:"toml",sql:"sql",java:"java",c:"c",h:"c",cpp:"cpp",rb:"ruby",php:"php"};function lz(e){const t=String(e||"").split(".").pop().toLowerCase();return az[t]||"text"}function sz({path:e,token:t,onPickFile:n}){const[r,i]=k.useState(e||""),[a,l]=k.useState({loading:!1});k.useEffect(()=>{i(e||"")},[e]),k.useEffect(()=>{if(!e){l({loading:!1});return}let o=!1;l({loading:!0});const c=t?{Authorization:`Bearer ${t}`}:{};return fetch(`/api/workspace/file?path=${encodeURIComponent(e)}`,{headers:c}).then(f=>f.json()).then(f=>{o||l({loading:!1,...f})}).catch(f=>{o||l({loading:!1,error:f.message||String(f)})}),()=>{o=!0}},[e,t]);const s=lz(e);return u.jsxs("div",{className:"codeblock","data-testid":"code-view-block",children:[u.jsxs("div",{className:"codeblock-bar",children:[u.jsx("input",{className:"codeblock-path",value:r,onChange:o=>i(o.target.value),onKeyDown:o=>o.key==="Enter"&&(n==null?void 0:n(r.trim())),placeholder:"path/to/file",spellCheck:!1,"data-testid":"code-path"}),a.truncated&&u.jsx("span",{className:"codeblock-trunc",title:"Large file — showing the start",children:"truncated"})]}),u.jsxs("div",{className:"codeblock-body",children:[!e&&u.jsx("div",{className:"codeblock-msg",children:"Pick a file in the Files block — or type a path above — to view it here."}),e&&a.loading&&u.jsxs("div",{className:"codeblock-msg",children:[u.jsx("span",{className:"spinner"})," loading…"]}),e&&a.error&&u.jsx("div",{className:"codeblock-msg err",children:a.error==="forbidden"?"Files aren't available on this view.":a.error}),e&&!a.loading&&!a.error&&typeof a.content=="string"&&u.jsx(Wy,{theme:fd.vsDark,code:a.content,language:s,children:({tokens:o,getLineProps:c,getTokenProps:f})=>u.jsx("pre",{className:"codeblock-pre",children:o.map((d,p)=>u.jsxs("div",{...c({line:d}),className:"codeblock-line",children:[u.jsx("span",{className:"codeblock-ln",children:p+1}),u.jsx("span",{className:"codeblock-lc",children:d.map((h,m)=>u.jsx("span",{...f({token:h})},m))})]},p))})})]})]})}function oz({id:e}){const t=`wild:todo:${e}`,[n,r]=k.useState(()=>{try{const f=JSON.parse(localStorage.getItem(t)||"[]");return Array.isArray(f)?f:[]}catch{return[]}}),[i,a]=k.useState("");k.useEffect(()=>{try{localStorage.setItem(t,JSON.stringify(n))}catch{}},[t,n]);function l(){const f=i.trim();f&&(r(d=>[...d,{id:`${Date.now().toString(36)}-${d.length}`,text:f,done:!1}]),a(""))}function s(f){r(d=>d.map(p=>p.id===f?{...p,done:!p.done}:p))}function o(f){r(d=>d.filter(p=>p.id!==f))}const c=n.filter(f=>!f.done).length;return u.jsxs("div",{className:"todo-block","data-testid":"todo-block",children:[u.jsxs("div",{className:"todo-add",children:[u.jsx("input",{value:i,onChange:f=>a(f.target.value),onKeyDown:f=>f.key==="Enter"&&l(),placeholder:"Add a to-do…","data-testid":"todo-input"}),u.jsx("button",{onClick:l,disabled:!i.trim(),"data-testid":"todo-add-btn",children:"Add"})]}),u.jsxs("div",{className:"todo-list",children:[n.length===0&&u.jsx("div",{className:"todo-msg",children:"Nothing yet — add your first to-do above."}),n.map(f=>u.jsxs("div",{className:`todo-item ${f.done?"done":""}`,"data-testid":"todo-item",children:[u.jsxs("label",{children:[u.jsx("input",{type:"checkbox",checked:f.done,onChange:()=>s(f.id)}),u.jsx("span",{className:"todo-text",children:f.text})]}),u.jsx("button",{className:"todo-del",title:"Remove",onClick:()=>o(f.id),children:"✕"})]},f.id))]}),n.length>0&&u.jsxs("div",{className:"todo-foot",children:[c," left · ",n.length-c," done"]})]})}function uz({spec:e}){if(!e||!e.kind)return u.jsx("div",{className:"cb-empty","data-testid":"custom-empty",children:"This block has nothing to show yet."});const{kind:t,note:n,data:r={}}=e;return u.jsxs("div",{className:"cb-block","data-testid":"custom-block","data-kind":t,children:[n&&u.jsx("p",{className:"cb-note",children:n}),t==="metric"&&u.jsx(cz,{data:r}),t==="list"&&u.jsx(dz,{data:r}),t==="table"&&u.jsx(fz,{data:r}),t==="markdown"&&u.jsx(pz,{data:r})]})}function cz({data:e}){const t=["up","down","flat"].includes(e.trend)?e.trend:null;return u.jsxs("div",{className:"cb-metric","data-testid":"custom-metric",children:[u.jsx("div",{className:"cb-metric-value",children:e.value??"—"}),e.label&&u.jsx("div",{className:"cb-metric-label",children:e.label}),e.delta&&u.jsxs("div",{className:`cb-metric-delta ${t?`is-${t}`:""}`,"data-testid":"custom-delta",children:[t==="up"?"▲ ":t==="down"?"▼ ":"",e.delta]}),Array.isArray(e.spark)&&e.spark.length>0&&u.jsx(hz,{values:e.spark})]})}function dz({data:e}){const t=Array.isArray(e.items)?e.items:[];return t.length?u.jsx("ul",{className:"cb-list","data-testid":"custom-list",children:t.map((n,r)=>u.jsxs("li",{className:"cb-list-row",children:[u.jsx("span",{className:"cb-list-label",children:n.label}),n.value!==void 0&&n.value!==""&&u.jsx("span",{className:"cb-list-value",children:n.value})]},r))}):u.jsx("div",{className:"cb-empty","data-testid":"custom-empty",children:"Empty list."})}function fz({data:e}){const t=Array.isArray(e.columns)?e.columns:[],n=Array.isArray(e.rows)?e.rows:[];return n.length?u.jsx("div",{className:"cb-table-wrap",children:u.jsxs("table",{className:"cb-table","data-testid":"custom-table",children:[t.length>0&&u.jsx("thead",{children:u.jsx("tr",{children:t.map((r,i)=>u.jsx("th",{children:r},i))})}),u.jsx("tbody",{children:n.map((r,i)=>u.jsx("tr",{children:(Array.isArray(r)?r:[r]).map((a,l)=>u.jsx("td",{children:a},l))},i))})]})}):u.jsx("div",{className:"cb-empty","data-testid":"custom-empty",children:"No rows."})}function pz({data:e}){const t=typeof e.text=="string"?e.text:"";return t?u.jsx("div",{className:"cb-markdown","data-testid":"custom-markdown",children:u.jsx(Vy,{text:t})}):u.jsx("div",{className:"cb-empty","data-testid":"custom-empty",children:"Empty note."})}function hz({values:e}){const t=Math.max(...e,1);return u.jsx("div",{className:"cb-spark","data-testid":"custom-spark","aria-hidden":"true",children:e.map((n,r)=>u.jsx("span",{className:"cb-spark-bar",style:{height:`${8+Math.round(Math.max(0,n)/t*92)}%`}},r))})}function mz({onClose:e}){const[t,n]=k.useState("viewer"),[r,i]=k.useState(24),[a,l]=k.useState(""),[s,o]=k.useState(null),[c,f]=k.useState([]),[d,p]=k.useState(null),[h,m]=k.useState(!1);k.useEffect(()=>{v()},[]);async function v(){const y=await fetch("/api/share").catch(()=>null);if(!y||!y.ok)return;const C=await y.json();f(C.tokens||[])}async function w(){p(null),m(!0);try{const y=await fetch("/api/share",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({role:t,ttlSeconds:Math.max(60,Number(r)*3600),label:a})}),C=await y.json();if(!y.ok)throw new Error(C.error||`HTTP ${y.status}`);o(C),v()}catch(y){p(y.message||String(y))}finally{m(!1)}}async function g(y){await fetch(`/api/share/${encodeURIComponent(y)}`,{method:"DELETE"}),v()}async function x(y){try{await navigator.clipboard.writeText(y)}catch{}}return u.jsx("div",{className:"modal-backdrop",onClick:e,children:u.jsxs("div",{className:"modal",onClick:y=>y.stopPropagation(),"data-testid":"share-dialog",children:[u.jsx("h2",{children:"Share workspace"}),u.jsx("p",{className:"muted",children:"Issue a token-protected URL. Anyone with the link opens this workspace in their browser with the role you choose."}),u.jsx("label",{children:"Role"}),u.jsx("div",{className:"row",children:u.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,color:"var(--text)"},children:[u.jsx("input",{type:"radio",name:"role",value:"viewer",checked:t==="viewer",onChange:()=>n("viewer"),"data-testid":"share-role-viewer"}),u.jsx("span",{children:"Viewer — read-only chat + preview"})]})}),u.jsx("div",{className:"row",children:u.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,color:"var(--text)"},children:[u.jsx("input",{type:"radio",name:"role",value:"client",checked:t==="client",onChange:()=>n("client"),"data-testid":"share-role-client"}),u.jsx("span",{children:"Client — chat + request changes (for AI-installer GTM)"})]})}),u.jsxs("div",{className:"row",children:[u.jsxs("div",{children:[u.jsx("label",{children:"Expires in"}),u.jsx("input",{type:"number",min:"1",value:r,onChange:y=>i(y.target.value),style:{width:80,background:"var(--bg)",color:"var(--text)",border:"1px solid var(--border)",padding:"4px 8px",borderRadius:6},"data-testid":"share-ttl"}),u.jsx("span",{style:{marginLeft:6,color:"var(--text-muted)",fontSize:12},children:"hours"})]}),u.jsxs("div",{style:{flex:1},children:[u.jsx("label",{children:"Label (optional)"}),u.jsx("input",{value:a,onChange:y=>l(y.target.value),placeholder:"e.g. Mel preview",style:{width:"100%",background:"var(--bg)",color:"var(--text)",border:"1px solid var(--border)",padding:"4px 8px",borderRadius:6},"data-testid":"share-label"})]})]}),d&&u.jsx("div",{style:{color:"var(--error)",fontSize:12,marginBottom:8},"data-testid":"share-error",children:d}),s&&u.jsxs(u.Fragment,{children:[u.jsx("label",{children:"Share URL"}),u.jsx("div",{className:"url-output","data-testid":"share-url",children:s.shareUrl}),u.jsxs("div",{style:{display:"flex",gap:8},children:[u.jsx("button",{onClick:()=>x(s.shareUrl),"data-testid":"share-copy",children:"Copy"}),u.jsx("a",{href:s.shareUrl,target:"_blank",rel:"noreferrer",children:u.jsx("button",{children:"Open"})})]})]}),c.length>0&&u.jsxs("div",{style:{marginTop:16},children:[u.jsx("label",{children:"Active share tokens"}),u.jsx("div",{style:{maxHeight:140,overflow:"auto",border:"1px solid var(--border)",borderRadius:6},children:c.map(y=>u.jsxs("div",{style:{padding:"6px 10px",borderBottom:"1px solid var(--border)",display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:12},"data-testid":`active-token-${y.sub}`,children:[u.jsxs("div",{children:[u.jsx("strong",{children:y.label||y.role})," ",u.jsxs("span",{style:{color:"var(--text-muted)"},children:["(",y.role,", expires ",new Date(y.exp*1e3).toLocaleString(),")"]})]}),u.jsx("button",{onClick:()=>g(y.sub),style:{fontSize:11},"data-testid":`revoke-${y.sub}`,children:"Revoke"})]},y.sub))})]}),u.jsxs("div",{className:"actions",children:[u.jsx("button",{onClick:e,"data-testid":"share-close",children:"Close"}),u.jsx("button",{className:"primary",onClick:w,disabled:h,"data-testid":"share-issue",children:h?u.jsx("span",{className:"spinner"}):"Issue URL"})]})]})})}function gz({onClose:e,token:t}){var M,$;const[n,r]=k.useState(null),[i,a]=k.useState(!1),[l,s]=k.useState(null),[o,c]=k.useState(!1),[f,d]=k.useState(""),[p,h]=k.useState(""),[m,v]=k.useState(168),[w,g]=k.useState(null);k.useEffect(()=>{y()},[]);function x(L,B={}){const I={...B.headers||{}};return t&&(I.Authorization=`Bearer ${t}`),fetch(L,{...B,headers:I})}async function y(){s(null),a(!1);const L=await x("/api/sync/status").catch(()=>null);if(!L||!L.ok){a(!0);return}r(await L.json())}async function C(L){s(null),c(!0);try{await L()}catch(B){s(B.message||String(B))}finally{c(!1)}}const E=()=>C(async()=>{const L=await x("/api/sync/pair",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({inviteCode:f})}),B=await L.json();if(!L.ok)throw new Error(B.error||`HTTP ${L.status}`);d(""),await y()}),b=()=>C(async()=>{var I,J;const L=await x("/api/sync/invite",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({projectCode:(J=(I=n==null?void 0:n.workspaces)==null?void 0:I[0])==null?void 0:J.projectId,displayName:p,expiresHours:Math.max(1,Number(m)||168)})}),B=await L.json();if(!L.ok)throw new Error(B.error||`HTTP ${L.status}`);g(B.invite)}),T=()=>C(async()=>{var I,J;const L=await x("/api/sync/detach",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({workspaceId:(J=(I=n==null?void 0:n.workspaces)==null?void 0:I[0])==null?void 0:J.workspaceId})}),B=await L.json();if(!L.ok)throw new Error(B.error||`HTTP ${L.status}`);g(null),await y()});async function _(L){try{await navigator.clipboard.writeText(L)}catch{}}const R=((M=n==null?void 0:n.workspaces)==null?void 0:M[0])||null,N=!!n&&!(($=n.daemon)!=null&&$.running);return u.jsx("div",{className:"modal-backdrop",onClick:e,children:u.jsxs("div",{className:"modal",onClick:L=>L.stopPropagation(),"data-testid":"sync-dialog",children:[u.jsx("h2",{children:"Collaborate on this folder"}),u.jsx("p",{className:"muted",children:"bmo-sync keeps this workspace folder identical across machines — yours and a collaborator's. Both of you edit; changes flow both ways. Like a shared drive, but built for workspaces."}),!n&&!i&&u.jsxs("div",{className:"muted",children:[u.jsx("span",{className:"spinner"})," Checking sync status…"]}),i&&u.jsxs("div",{className:"sync-state warn","data-testid":"sync-load-failed",children:[u.jsx("strong",{children:"Couldn't load sync status."}),u.jsx("span",{className:"muted",children:"The workspace server didn't answer. Try again."})]}),N&&u.jsxs("div",{className:"sync-state warn","data-testid":"sync-daemon-down",children:[u.jsx("strong",{children:"The bmo-sync daemon isn't running."}),u.jsx("span",{className:"muted",children:"Folder sharing needs the background sync service running on this machine. Start it, then recheck."})]}),n&&!N&&!R&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"sync-state","data-testid":"sync-unpaired",children:[u.jsxs("strong",{children:[n.workspaceName," isn't shared yet."]}),u.jsx("span",{className:"muted",children:"Got an invite code from a collaborator? Paste it to sync this folder with theirs."})]}),u.jsx("label",{children:"Invite code"}),u.jsxs("div",{className:"row",children:[u.jsx("input",{className:"sync-input",style:{flex:1},value:f,onChange:L=>d(L.target.value),placeholder:"e.g. CAFE-MILANO-A8X3","data-testid":"sync-invite-input"}),u.jsx("button",{className:"primary",onClick:E,disabled:o||!f.trim(),"data-testid":"sync-join",children:o?u.jsx("span",{className:"spinner"}):"Connect folder"})]})]}),n&&!N&&R&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"sync-state ok","data-testid":"sync-paired",children:[u.jsxs("strong",{children:["✓ Synced — ",R.projectName||R.projectId]}),u.jsxs("span",{className:"muted",children:["This folder is shared. Edits sync both ways automatically",R.conflictCount?` · ${R.conflictCount} conflict${R.conflictCount>1?"s":""} resolved`:"","."]})]}),n.canInvite?u.jsxs(u.Fragment,{children:[u.jsx("label",{children:"Invite a collaborator"}),u.jsxs("div",{className:"row",children:[u.jsx("input",{className:"sync-input",style:{flex:1},value:p,onChange:L=>h(L.target.value),placeholder:"Their name — e.g. Mel","data-testid":"sync-invite-name"}),u.jsx("input",{className:"sync-input",style:{width:64},type:"number",min:"1",value:m,onChange:L=>v(L.target.value),title:"Invite expires in (hours)"}),u.jsx("button",{onClick:b,disabled:o,"data-testid":"sync-create-invite",children:o?u.jsx("span",{className:"spinner"}):"Create invite"})]}),w&&u.jsxs(u.Fragment,{children:[u.jsx("label",{children:"Send this code to your collaborator"}),u.jsx("div",{className:"url-output","data-testid":"sync-invite-code",children:w.code}),u.jsxs("div",{className:"row",style:{marginBottom:0},children:[u.jsx("button",{onClick:()=>_(w.code),"data-testid":"sync-copy-code",children:"Copy code"}),w.expiresAt&&u.jsxs("span",{className:"muted",style:{margin:0},children:["expires ",new Date(w.expiresAt*1e3).toLocaleDateString()]})]})]})]}):u.jsxs("p",{className:"muted","data-testid":"sync-no-invite",children:["Inviting from here needs a bmo-sync admin key (set"," ",u.jsx("span",{className:"md-code-inline",children:"BMO_SYNC_ADMIN_KEY"}),"). Without it, anyone you've already invited can still join with their own code."]})]}),l&&u.jsx("div",{style:{color:"var(--error)",fontSize:12,marginTop:8},"data-testid":"sync-error",children:l}),u.jsxs("div",{className:"actions",children:[(N||i)&&u.jsx("button",{onClick:y,disabled:o,"data-testid":"sync-recheck",children:"Recheck"}),R&&!N&&u.jsx("button",{onClick:T,disabled:o,"data-testid":"sync-disconnect",children:"Disconnect"}),u.jsx("button",{onClick:e,"data-testid":"sync-close",children:"Close"})]})]})})}function yz({alert:e,onDismiss:t}){if(!e)return null;const n=e.kind==="fatal";return u.jsxs("div",{className:"conflict-banner","data-testid":"conflict-banner",role:"status",children:[u.jsx("span",{className:"ico",children:n?"⛔":"⚠️"}),n?u.jsxs("span",{children:[u.jsx("strong",{children:"Sync stopped."})," ",e.message||"The sync engine hit a fatal error."," Reconnect from the Collaborate dialog."]}):u.jsxs("span",{children:[u.jsx("strong",{children:"Sync conflict"})," on ",u.jsx("code",{children:e.path||"a file"})," — bmo-sync kept ",u.jsx("strong",{children:e.resolution||"the latest edit"}),e.user?` (also edited by ${e.user})`:"","."]}),u.jsx("span",{className:"spacer"}),u.jsx("button",{onClick:t,"data-testid":"conflict-dismiss",children:"Dismiss"})]})}function xz({urlToken:e,onClose:t}){const[n,r]=k.useState([]),[i,a]=k.useState(!0),[l,s]=k.useState(null),[o,c]=k.useState(null),[f,d]=k.useState({}),[p,h]=k.useState(null),m=e?{Authorization:`Bearer ${e}`}:{};function v(){a(!0),fetch("/api/conflicts",{headers:m}).then(y=>y.ok?y.json():{conflicts:[]}).then(y=>{r(Array.isArray(y==null?void 0:y.conflicts)?y.conflicts:[]),s(null)}).catch(y=>s(String((y==null?void 0:y.message)||y))).finally(()=>a(!1))}k.useEffect(v,[]);function w(y){return`${y.workspaceId}:${y.path}`}async function g(y){const C=w(y);if(f[C])return;const E=new URL("/api/conflicts/view",window.location.origin);E.searchParams.set("workspaceId",y.workspaceId),E.searchParams.set("path",y.path);const b=await fetch(E.toString(),{headers:m});if(!b.ok){s(`Could not load ${y.path} (HTTP ${b.status})`);return}const T=await b.json().catch(()=>null);T&&d(_=>({..._,[C]:{mine:uh(T.mine),theirs:uh(T.theirs),conflict:T.conflict}}))}async function x(y,C){const E=w(y);h(E);try{const b=await fetch("/api/conflicts/resolve",{method:"POST",headers:{"content-type":"application/json",...m},body:JSON.stringify({workspaceId:y.workspaceId,path:y.path,action:C})});if(!b.ok){const T=await b.json().catch(()=>({}));s((T==null?void 0:T.error)||`Resolve failed (HTTP ${b.status}).`);return}v(),c(null)}finally{h(null)}}return u.jsxs("div",{className:"conflict-panel","data-testid":"conflict-panel",role:"dialog","aria-label":"Open conflicts",children:[u.jsxs("header",{className:"conflict-panel-header",children:[u.jsx("strong",{children:"Open conflicts"})," ",u.jsxs("span",{className:"muted",children:["(",n.length,") · changes saved to the daemon back-office until you resolve"]}),u.jsx("span",{className:"spacer"}),u.jsx("button",{onClick:v,children:"Refresh"}),u.jsx("button",{onClick:t,children:"Close"})]}),i&&u.jsx("div",{className:"muted",children:"Loading…"}),l&&u.jsx("div",{className:"conflict-panel-error",children:l}),!i&&n.length===0&&u.jsx("div",{className:"muted",children:"No open conflicts."}),u.jsx("ul",{className:"conflict-list",children:n.map(y=>{const C=w(y),E=o===C,b=f[C];return u.jsxs("li",{className:"conflict-row",children:[u.jsxs("div",{className:"conflict-row-head",onClick:()=>{E?c(null):(c(C),y.resolution!=="remote_announced"&&g(y))},children:[u.jsx("code",{children:y.path}),u.jsxs("span",{className:"muted",children:["·"," ",y.resolution==="remote_announced"?`${y.conflictingUser||"peer"} flagged`:y.conflictingUser||"peer"," ","·"," ",new Date((y.detectedAt||0)*1e3).toLocaleTimeString()]}),u.jsx("span",{className:"spacer"}),u.jsx("span",{className:"muted",children:E?"▲":"▼"})]}),E&&y.resolution==="remote_announced"&&u.jsxs("div",{className:"conflict-row-body",children:[u.jsxs("div",{className:"muted",children:[y.conflictingUser||"A peer"," reported a conflict on this file. Your local copy is unchanged here — open it, decide whether to keep your version or pull theirs, save, and the next sync will reconcile."]}),u.jsx("div",{className:"conflict-actions",children:u.jsx("button",{disabled:p===C,onClick:()=>x(y,"keep_mine"),"data-testid":"conflict-acknowledge",children:"Acknowledge"})})]}),E&&y.resolution!=="remote_announced"&&u.jsxs("div",{className:"conflict-row-body",children:[!b&&u.jsx("div",{className:"muted",children:"Loading diff…"}),b&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"conflict-meta",children:[u.jsxs("span",{children:["mine: ",u.jsx("code",{children:Oo(y.mineSha256)})]}),u.jsxs("span",{children:["theirs: ",u.jsx("code",{children:Oo(y.theirsSha256)})]}),y.baseSha256&&u.jsxs("span",{children:["base: ",u.jsx("code",{children:Oo(y.baseSha256)})]})]}),u.jsx(vz,{mine:b.mine,theirs:b.theirs}),u.jsxs("div",{className:"conflict-actions",children:[u.jsx("button",{disabled:p===C,onClick:()=>x(y,"keep_mine"),"data-testid":"conflict-keep-mine",children:"Keep mine"}),u.jsx("button",{disabled:p===C,onClick:()=>x(y,"take_theirs"),"data-testid":"conflict-take-theirs",children:"Take theirs"})]})]})]})]},C)})})]})}function uh(e){if(typeof e!="string")return null;try{const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return new TextDecoder().decode(n)}catch{return null}}function Oo(e){return typeof e!="string"?"∅":e.length>12?`${e.slice(0,12)}…`:e}function vz({mine:e,theirs:t}){return e==null&&t==null?u.jsx("div",{className:"muted",children:"Both versions unavailable on disk."}):e==null||t==null?u.jsx("div",{className:"muted",children:"Only one side is available — the other was deleted before resolution."}):u.jsx(Sl,{oldText:t,newText:e})}function wz({role:e,urlToken:t,onSyncAlert:n,onOpenConflicts:r}){const[i,a]=k.useState([]),[l,s]=k.useState({tokensIn:0,tokensOut:0,costUsd:0}),[o,c]=k.useState([]),[f,d]=k.useState(!1),[p,h]=k.useState(null),[m,v]=k.useState(0);k.useEffect(()=>{if(e!=="partner")return;const C=t?{Authorization:`Bearer ${t}`}:{};fetch("/api/sync/status",{headers:C}).then(E=>E.ok?E.json():null).then(E=>{var b;E&&h({paired:!!E.paired,daemonRunning:!!((b=E.daemon)!=null&&b.running),peer:null})}).catch(()=>{}),fetch("/api/conflicts",{headers:C}).then(E=>E.ok?E.json():{conflicts:[]}).then(E=>v(Array.isArray(E==null?void 0:E.conflicts)?E.conflicts.length:0)).catch(()=>{})},[e,t]),k.useEffect(()=>{const C=window.location.protocol==="https:"?"wss":"ws",E=new URL(`${C}://${window.location.host}/ws/activity`);t&&E.searchParams.set("t",t);const b=new WebSocket(E.toString());return b.onopen=()=>d(!0),b.onclose=()=>d(!1),b.onmessage=T=>{let _;try{_=JSON.parse(T.data)}catch{return}_.type==="snapshot"?(a(_.snapshot.presence||[]),s(_.snapshot.usage||{tokensIn:0,tokensOut:0,costUsd:0}),c(_.snapshot.recent||[])):(c(R=>[...R.slice(-49),_]),w(_))},()=>{try{b.close()}catch{}}},[t]);function w(C){C.type==="daemon-status"?h(E=>({...E||{paired:!1},daemonRunning:!!C.connected})):C.type==="sync-paired"?h(E=>({...E||{},paired:!0,daemonRunning:!0})):C.type==="sync-detached"?h(E=>({...E||{},paired:!1,peer:null})):C.type==="remote-presence"?h(E=>({...E||{paired:!0},peer:C.user||null})):C.type==="sync-conflict"?(n==null||n({kind:"conflict",path:C.path,resolution:C.resolution,user:C.conflictingUser}),(C.resolution==="local_pre_write_guard"||C.resolution==="remote_announced")&&v(E=>E+1)):C.type==="sync-conflict-resolved"?v(E=>Math.max(0,E-1)):C.type==="sync-fatal"&&(n==null||n({kind:"fatal",message:C.message}))}const g=[...o].reverse().find(C=>C.type==="chat-stream"||C.type==="chat-user"||C.type==="chat-end"),x=o.find(C=>C.type==="inbox-change");let y=null;return p!=null&&p.paired&&(y=p.daemonRunning?u.jsxs("span",{className:"pill synced","data-testid":"activity-sync",children:["⇄ Synced",p.peer?` · with ${p.peer}`:""]}):u.jsx("span",{className:"pill sync-off","data-testid":"activity-sync",children:"⇄ Sync paused"})),u.jsxs("footer",{className:"bottombar","data-testid":"activity-bar",children:[u.jsx("span",{className:`pill ${f?"live":""}`,"data-testid":"activity-connected",children:f?"live":"reconnecting…"}),u.jsxs("span",{className:"pill","data-testid":"activity-presence",children:["👥 ",i.length," viewing"]}),y,e==="partner"&&m>0&&u.jsxs("button",{type:"button",className:"pill conflict-badge","data-testid":"activity-conflicts",onClick:()=>r==null?void 0:r(),title:"Resolve open sync conflicts",children:["🛑 ",m," conflict",m===1?"":"s"]}),u.jsxs("span",{className:"pill","data-testid":"activity-usage",children:["↓",l.tokensIn," ↑",l.tokensOut," · $",(l.costUsd||0).toFixed(3)]}),g&&u.jsx("span",{className:"pill",style:{maxWidth:380,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},"data-testid":"activity-last",children:g.type==="chat-end"?"✓ agent finished":"… agent streaming"}),x&&u.jsx("span",{className:"pill","data-testid":"activity-inbox",children:"📦 inbox updated"}),u.jsx("span",{style:{flex:1}}),u.jsxs("span",{style:{fontSize:11},children:["v0.1.0 · ",e]})]})}function bz(){var r;const[e,t]=k.useState(null);if(k.useEffect(()=>{let i=!1;async function a(){try{const o=await(await fetch("/api/inbox")).json();i||t(o)}catch{}}a();const l=setInterval(a,5e3);return()=>{i=!0,clearInterval(l)}},[]),!e||!e.hasInbox||!((r=e.imports)!=null&&r.length))return null;const n=e.imports.filter(i=>{var l;const a=Object.keys(e.installed||{}).find(s=>s.startsWith(i.replace(/-v[\d.]+$/,"")));return a?((l=e.installed[a])==null?void 0:l.integrated)!==!0:!0});return n.length===0?null:u.jsxs("div",{className:"inbox-card","data-testid":"inbox-card",children:["📦 ",u.jsx("strong",{children:"Component inbox"}),": ",n.length," pending integration",n.length!==1?"s":"",": ",n.join(", "),".",u.jsxs("span",{className:"muted",children:["Ask the agent: ",u.jsxs("em",{children:["“walk me through integrating ",n[0],"”"]})]})]})}function ch(e){return`${Math.round((Number(e)||0)*100)}%`}function dh(e){return`$${(Number(e)||0).toFixed(2)}`}function fh(e){const t=Math.max(0,Math.min(5,Math.round(Number(e)||0)));return"★★★★★".slice(0,t)+"☆☆☆☆☆".slice(0,5-t)}function Fo(e){var t,n;return((t=e.producer)==null?void 0:t.handle)==="you"||((n=e.producer)==null?void 0:n.kind)==="me"}function kz(e){const t=`${e.title} ${(e.tags||[]).join(" ")} ${e.pitch||""}`.toLowerCase(),n=[[/match|candidate|recruit|\bhir|screen|talent/,"🎯"],[/\bcv\b|resume|parse|extract/,"📄"],[/kanban|board|pipeline|stage|drag/,"🗂️"],[/deploy|cloudflare|worker|\bhost|ship|edge|serverless/,"🚀"],[/landing|waitlist|subscription|launch|checkout/,"🌱"],[/portfolio|personal site/,"🖼️"],[/receipt|expense|invoice|account/,"🧾"],[/feedback|survey|\bform\b/,"💬"],[/book|slot|appointment|schedul|calendar/,"📅"]];for(const[r,i]of n)if(r.test(t))return i;return"🧩"}function ph(e){var n,r,i,a;const t=(((n=e.reward)==null?void 0:n.unit)||"").toLowerCase();return e.hasService||((r=e.reward)==null?void 0:r.model)==="recurring"||/match|use/.test(t)?"earns per use":((i=e.reward)==null?void 0:i.model)==="one-time"?"one-time reward":(a=e.reward)!=null&&a.model?`${e.reward.model} reward`:null}function Sz(e,t){var n;return t?`I want to build "${e.title}" from my own recipe.`:`I want to build "${e.title}". Use ${((n=e.producer)==null?void 0:n.name)||"the producer"}'s recipe.`}function Ez({theme:e}){const t=(e==null?void 0:e.tokens)||{},n=`radial-gradient(120% 80% at 15% 0%, ${t.canvas1||"#e8f7f0"}, transparent 60%),radial-gradient(120% 90% at 100% 0%, ${t.canvas2||"#e7f0fb"}, transparent 55%),linear-gradient(160deg, ${t.canvas3||"#fef8ee"}, ${t.bg||"#ffffff"} 75%)`;return u.jsxs("div",{className:"bz-theme-swatch",style:{background:n},"aria-hidden":!0,children:[u.jsxs("span",{className:"bz-theme-card",style:{background:t.surface||"#fff",borderColor:t.border||"#e2e6ee"},children:[u.jsx("span",{className:"bz-theme-line",style:{background:t.text||"#1d2430"}}),u.jsx("span",{className:"bz-theme-line short",style:{background:t.textMuted||"#687083"}})]}),u.jsx("span",{className:"bz-theme-dot",style:{background:(e==null?void 0:e.accent)||"#0891b2"}})]})}function jz({onClose:e,onBuild:t,onApplyTheme:n,token:r}){const[i,a]=k.useState([]),[l,s]=k.useState(null),[o,c]=k.useState(null),[f,d]=k.useState(null),[p,h]=k.useState(null);async function m(E){if(!(!n||p)){h(E.id);try{const b=r?{Authorization:`Bearer ${r}`}:{},T=await fetch(`/api/bazaar/themes/${encodeURIComponent(E.id)}/apply`,{method:"POST",headers:b}),_=T.ok?await T.json():null,R=(_==null?void 0:_.theme)||E.theme;R?(n(R),e==null||e()):c("Could not apply that theme.")}catch(b){c(String(b.message||b))}finally{h(null)}}}k.useEffect(()=>{let E=!1;async function b(){try{const[T,_]=await Promise.all([fetch("/api/bazaar/shelf"),fetch("/api/bazaar/state")]);if(E)return;const R=await T.json(),N=await _.json();if(E)return;const M=(R.recipes||[]).slice().sort(($,L)=>(L.outcomeScore||0)-($.outcomeScore||0));a(M),s(N)}catch(T){E||c(String(T.message||T))}}return b(),()=>{E=!0}},[]);const v=((l==null?void 0:l.earnings)||[]).filter(E=>E.total>0),w=i.filter(E=>E.kind==="theme"),g=i.filter(E=>E.kind!=="theme"),x=g.filter(Fo),y=v.find(E=>E.handle==="you"),C=new Set(i.map(E=>{var b,T;return((b=E.producer)==null?void 0:b.handle)||((T=E.producer)==null?void 0:T.name)||"?"})).size;return u.jsx("div",{className:"modal-backdrop",onClick:e,children:u.jsxs("div",{className:"modal bazaar-modal",onClick:E=>E.stopPropagation(),"data-testid":"bazaar-shelf",children:[u.jsxs("div",{className:"bz-store-head",children:[u.jsxs("div",{className:"bz-store-headings",children:[u.jsx("h2",{children:"🛍️ The bazaar"}),u.jsx("p",{className:"muted bz-store-sub",children:"Proven recipes from a network of producers. Your agent reaches onto this shelf for you — ranked by how often each one actually gets a working result, not by marketing."})]}),u.jsxs("div",{className:"bz-store-stats","data-testid":"bazaar-store-stats",children:[u.jsxs("span",{className:"bz-stat",children:[u.jsx("strong",{children:g.length}),"recipes"]}),w.length>0&&u.jsxs("span",{className:"bz-stat",children:[u.jsx("strong",{children:w.length}),"themes"]}),u.jsxs("span",{className:"bz-stat",children:[u.jsx("strong",{children:C}),"producers"]})]})]}),o&&u.jsx("div",{className:"bz-err",children:o}),x.length>0&&u.jsxs("div",{className:"bz-you-banner","data-testid":"bazaar-you-banner",children:[u.jsx("span",{className:"bz-you-spark",children:"✦"}),u.jsxs("span",{children:["You're a producer here — ",u.jsx("strong",{children:x.length})," ",x.length===1?"of your recipes is":"of your recipes are"," on the shelf",y&&u.jsxs(u.Fragment,{children:[" · earning ",u.jsx("strong",{children:dh(y.total)}),u.jsx("span",{className:"bz-represented",children:" represented"})]})]})]}),w.length>0&&u.jsxs("div",{className:"bz-theme-section","data-testid":"bazaar-themes",children:[u.jsxs("div",{className:"bz-theme-section-head",children:[u.jsx("span",{className:"gallery-section",children:"🎨 themes — make your workspace yours"}),u.jsx("span",{className:"muted bz-theme-section-sub",children:"Pure colour, applies in one tap. The maker earns when you wear it."})]}),u.jsx("div",{className:"bz-theme-grid",children:w.map(E=>{var T,_,R;const b=Fo(E);return u.jsxs("div",{className:`bz-theme-card-wrap${b?" mine":""}`,"data-testid":`shelf-theme-${E.id}`,children:[u.jsx(Ez,{theme:E.theme}),u.jsxs("div",{className:"bz-theme-meta",children:[u.jsx("span",{className:"bz-theme-title",children:E.title}),u.jsxs("span",{className:"bz-theme-by",children:["by ",((T=E.producer)==null?void 0:T.name)||"a maker",b&&" (you)"]}),E.pitch&&u.jsx("span",{className:"bz-theme-pitch",children:E.pitch}),u.jsxs("div",{className:"bz-theme-foot",children:[((_=E.rating)==null?void 0:_.count)>0&&u.jsx("span",{className:"bz-theme-rating",children:fh(E.rating.stars)}),u.jsxs("span",{className:"bz-reward-pill",children:[dh((R=E.reward)==null?void 0:R.oneTimeValue)," · per apply"]})]})]}),u.jsx("button",{type:"button",className:"bz-theme-apply","data-testid":`shelf-apply-theme-${E.id}`,disabled:p===E.id,onClick:()=>m(E),children:p===E.id?"Applying…":"Apply"})]},E.id)})})]}),u.jsx("div",{className:"bz-shelf-grid","data-testid":"bazaar-shelf-grid",children:g.map(E=>{var N,M,$,L,B,I;const b=Fo(E),T=((N=E.outcomeStats)==null?void 0:N.builds)||0,_=T===0||E.safetyBadge==="new",R=f===E.id;return u.jsxs("div",{className:`bz-card${b?" mine":""}${R?" open":""}`,"data-testid":`shelf-recipe-${E.id}`,onClick:()=>d(R?null:E.id),children:[u.jsxs("div",{className:"bz-card-head",children:[u.jsx("span",{className:"bz-card-glyph","aria-hidden":!0,children:kz(E)}),u.jsxs("div",{className:"bz-card-titles",children:[u.jsx("span",{className:"bz-card-title",children:E.title}),u.jsxs("span",{className:"bz-card-by",children:["by ",((M=E.producer)==null?void 0:M.name)||"a producer",u.jsx("span",{className:`bz-kind bz-kind-${b?"you":(($=E.producer)==null?void 0:$.kind)||"maker"}`,children:b?"you":((L=E.producer)==null?void 0:L.kind)==="vendor"?"vendor":"maker"}),E.hasService&&u.jsx("span",{className:"bz-kind bz-kind-tool",children:"tool"})]})]}),u.jsx("div",{className:"bz-card-score",children:_?u.jsx("span",{className:"bz-new",title:"Just listed — earns its rank by working",children:"NEW"}):u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"bz-score-pct",children:ch(E.outcomeScore)}),u.jsx("span",{className:"bz-score-label",children:"works"})]})})]}),!_&&u.jsx("div",{className:"bz-score-bar",title:"Measured: how often this recipe reaches a working result",children:u.jsx("i",{style:{width:ch(E.outcomeScore)}})}),E.pitch&&u.jsx("p",{className:"bz-card-pitch",children:E.pitch}),u.jsxs("div",{className:"bz-card-foot",children:[E.safetyBadge&&E.safetyBadge!=="new"&&u.jsx("span",{className:`bz-badge bz-badge-${E.safetyBadge}`,children:E.safetyBadge}),((B=E.rating)==null?void 0:B.count)>0&&u.jsxs("span",{className:"bz-card-rating",title:`${E.rating.stars} from ${E.rating.count}`,children:[fh(E.rating.stars)," ",u.jsxs("span",{className:"muted",children:["(",E.rating.count,")"]})]}),ph(E)&&u.jsx("span",{className:"bz-reward-pill",children:ph(E)}),u.jsx("span",{className:"bz-card-expand",children:R?"▾":"▸"})]}),R&&u.jsxs("div",{className:"bz-card-detail","data-testid":`shelf-detail-${E.id}`,children:[E.summary&&u.jsx("p",{className:"bz-detail-summary",children:E.summary}),!_&&T>0&&u.jsxs("p",{className:"muted bz-detail-stat",children:[E.outcomeStats.working," of ",T," builds reached a working result."]}),u.jsxs("p",{className:"bz-detail-hint",children:["Your agent builds this for you and credits"," ",b?"you":((I=E.producer)==null?void 0:I.name)||"the producer"," when it does."]}),t&&u.jsx("button",{type:"button",className:"bz-build-btn","data-testid":`shelf-build-${E.id}`,onClick:J=>{J.stopPropagation(),t(Sz(E,b))},children:"Build this →"})]})]},E.id)})}),u.jsx("div",{className:"actions",children:u.jsx("button",{onClick:e,"data-testid":"bazaar-shelf-close",children:"Close"})})]})})}const Cz=[{id:"concise",label:"Concise",sample:"Got it. Done."},{id:"playful",label:"Playful",sample:"Oh nice — let's go!"},{id:"formal",label:"Formal",sample:"Understood. Proceeding now."},{id:"dry",label:"Dry",sample:"Sure. If we must."}],hh=["#22d3ee","#a78bfa","#f472b6","#facc15","#34d399","#fb7185"],Nz=[{id:"drive",label:"Google Drive",note:"Files & docs"},{id:"notion",label:"Notion",note:"Wiki & notes"},{id:"gmail",label:"Gmail",note:"Inbox & threads"},{id:"calendar",label:"Calendar",note:"Schedule"},{id:"canva",label:"Canva",note:"Designs"},{id:"github",label:"GitHub",note:"Code & PRs"}],Tz=new Set(["login","missing","subscribe"]),_z=new Set(["login","missing"]),mh={missing:{title:"Almost there — I need Claude installed before I can think.",subtitle:"That's the brain I run on. Install it once, then come back here.",cmdLabel:"Run this in your terminal",cmd:"curl -fsSL https://claude.ai/install.sh | bash",after:"Then come back and press the button below.",retry:"Still don't see Claude on this machine. Make sure the install finished, then try again."},login:{title:"One quick thing before we dig in — sign me in to Claude.",subtitle:"It's a one-time sign-in to your own Claude account — it runs on your machine, on your plan. After this you won't be asked again.",cmdLabel:"Run this once in your terminal",cmd:"claude auth login",after:"A browser window opens — sign in with your Claude account, then come back and press the button.",retry:"Hmm — still not signed in. Finish the sign-in in your browser, then press it again."},subscribe:{title:"You're in — I just need an active Claude plan to start thinking.",subtitle:"Claude Code runs on a Claude Pro plan (or higher). Grab one on your own account, then come back — you won’t be asked again.",cmdLabel:"Get a plan, then come back",link:"https://claude.ai/upgrade",linkLabel:"Open claude.ai →",after:"Subscribe at claude.ai, then come back and press the button.",retry:"Still no active plan showing. Give it a moment after subscribing, then try again."}},zz=new Set(["md","txt","json","yml","yaml","toml","js","mjs","cjs","ts","tsx","jsx","py","rb","go","rs","java","kt","swift","c","h","cpp","cc","hpp","css","scss","html","sh","env","sql","xml","svg","csv"]);function Pz(e){const t=e.lastIndexOf(".");return t>=0?e.slice(t+1).toLowerCase():""}function Rz(e){if(!e)return null;try{const t=new URL(e);return t.hostname==="localhost"||t.hostname==="127.0.0.1"?null:t.protocol==="http:"&&(t.port===""||t.port==="80")||t.protocol==="https:"&&(t.port===""||t.port==="443")?t.hostname:`${t.hostname}:${t.port}`}catch{return null}}async function Iz(e){const t=Array.from(e||[]).slice(0,200);if(t.length===0)return{folderName:null,files:[]};const n=(t[0].webkitRelativePath||t[0].name).split("/")[0]||"folder",r=40,i=600,a=[];for(const s of t){if(a.length>=r)break;const o=s.webkitRelativePath||s.name,c=Pz(s.name);if(!zz.has(c)){a.push({path:o,head:""});continue}if(s.size>100*1024){a.push({path:o,head:""});continue}try{const p=await s.slice(0,i).text();a.push({path:o,head:p})}catch{a.push({path:o,head:""})}}const l=Math.max(t.length-a.length,0);return{folderName:n,files:a,totalFiles:t.length,untouched:l}}function Az({peekSummary:e,services:t,agentName:n}){const r=[],i=e!=null&&e.folderName?` (you just glanced at "${e.folderName}")`:"";return r.push({kind:"survey",title:"Tell me what's in my workspace",sub:e!=null&&e.folderName?"I'll read the workspace I'm running in and summarize.":"I'll read what's here and summarize the project."}),(t==null?void 0:t.size)>0?r.push({kind:"startup",title:"Help me start something new",sub:`${n} will ask one question to figure out what to build.`}):r.push({kind:"startup",title:"Help me start a project",sub:"Tell me the rough idea — I'll scaffold it."}),r.push({kind:"chat",title:"Just chat — find me work",sub:"No agenda yet. Get me into the workspace."}),r}function gh(e,t=55,n=380){const[r,i]=k.useState(""),[a,l]=k.useState(!1),[s,o]=k.useState(!1);return k.useEffect(()=>{if(!e){i(""),l(!1),o(!1);return}i(""),l(!1),o(!1);let c=0,f=null;const d=setTimeout(()=>{o(!0),f=setInterval(()=>{c+=1,i(e.slice(0,c)),c>=e.length&&(clearInterval(f),l(!0))},t)},n);return()=>{clearTimeout(d),f&&clearInterval(f)}},[e,t,n]),[r,a,s]}function Yn({children:e,from:t="agent",accent:n,streaming:r=!1}){return u.jsx("div",{className:`ob-bubble ob-bubble-${t}${r?" ob-bubble-streaming":""}`,style:t==="user"?{borderColor:n}:void 0,children:e})}function Wr(){return u.jsx("span",{className:"ob-caret","aria-hidden":"true",children:"▍"})}function yh(e){const t=Math.random().toString(36).slice(2,8);return`${e}-${Date.now().toString(36)}-${t}`}function Dz({session:e,token:t,onComplete:n}){var Re,Me,lt,ut;const[r,i]=k.useState(1),a=k.useMemo(()=>Rz(e==null?void 0:e.shareBaseUrl),[e==null?void 0:e.shareBaseUrl]),[l,s]=k.useState(((Re=e==null?void 0:e.identity)==null?void 0:Re.name)||""),[o,c]=k.useState(((Me=e==null?void 0:e.identity)==null?void 0:Me.tone)||"concise"),[f,d]=k.useState(((lt=e==null?void 0:e.identity)==null?void 0:lt.color)||hh[0]),[p,h]=k.useState(!1),[m,v]=k.useState(null),[w,g]=k.useState(null),[x,y]=k.useState(!1),[C,E]=k.useState(!1),[b,T]=k.useState(null),[_,R]=k.useState(""),[N,M]=k.useState(new Set(((ut=e==null?void 0:e.identity)==null?void 0:ut.connectedServices)||[])),[$,L]=k.useState(!1),[B,I]=k.useState(null),[J,ae]=k.useState(null),[A,q]=k.useState(!1),S=k.useRef(null),Q=k.useRef(null),le=k.useRef({}),[j,oe]=k.useState({}),ve=k.useCallback((P,Z,fe)=>{P&&oe(ye=>{const X=ye[P]||{text:"",done:!1,error:null},he=Z==="text"?X.text+(fe||""):X.text,ie={...ye,[P]:{...X,text:he}};return le.current[P]=he,ie})},[]),ne=k.useCallback((P,Z)=>{P&&oe(fe=>{const ye=fe[P]||{text:"",done:!1,error:null};return{...fe,[P]:{...ye,done:!0,error:Z||ye.error}}})},[]);k.useEffect(()=>{let P=!1,Z=0,fe=null,ye=null;const X=()=>{if(P)return;const he=window.location.protocol==="https:"?"wss":"ws",ie=new URL(`${he}://${window.location.host}/ws/chat`);t&&ie.searchParams.set("t",t),ye=new WebSocket(ie.toString()),Q.current=ye,ye.onmessage=xe=>{var be;let ge;try{ge=JSON.parse(xe.data)}catch{return}ge.type==="chunk"&&((be=ge.chunk)==null?void 0:be.type)==="text"?ve(ge.messageId,"text",ge.chunk.text):ge.type==="end"?ne(ge.messageId,null):ge.type==="error"&&ne(ge.messageId,ge.message||"agent error")},ye.onopen=()=>{Z=0},ye.onclose=()=>{if(Q.current=null,P)return;const xe=Math.min(1e3*2**Z,8e3);Z+=1,fe=setTimeout(X,xe)},ye.onerror=()=>{}};return X(),()=>{P=!0,clearTimeout(fe);try{ye==null||ye.close()}catch{}}},[t,ve,ne]),k.useEffect(()=>{document.documentElement.style.setProperty("--accent",f),document.documentElement.style.setProperty("--accent-hot",f)},[f]);const re=k.useMemo(()=>{const P={"content-type":"application/json"};return t&&(P.Authorization=`Bearer ${t}`),P},[t]);async function we(P){const Z=await fetch("/api/agent/identity",{method:"POST",headers:re,body:JSON.stringify({name:l,tone:o,color:f,...P})});if(!Z.ok){const fe=await Z.json().catch(()=>({}));throw new Error(fe.error||`save failed (${Z.status})`)}return Z.json()}const ce=k.useCallback(async(P=!1)=>{y(!0);try{const Z=await fetch(`/api/agent/readiness${P?"?fresh=1":""}`,{headers:re});return Z.ok?await Z.json():{status:"unknown"}}catch{return{status:"unknown"}}finally{y(!1)}},[re]);async function ze(){if(v(null),!l.trim()){v("Pick a name — even just one syllable.");return}h(!0);try{await we({});const P=await ce(!1);if(Tz.has(P.status)){g(P);return}i(2)}catch(P){v(String(P.message||P))}finally{h(!1)}}async function Y(){const P=await ce(!0);if(E(!0),P.status==="login"||P.status==="missing"){g(P);return}g(null),i(2)}async function _e(){const P=await ce(!0);if(P.status==="ready"||P.status==="unknown"){T(null),g(null),i(2);return}T(null),g(P)}async function de(){E(!1),T({status:"starting",url:null,error:null});try{const Z=await(await fetch("/api/agent/login/start",{method:"POST",headers:re})).json();T(Z),Z.status==="success"&&_e()}catch{T({status:"error",url:null,error:"Could not start sign-in."})}}async function pt(){const P=_.trim();if(P){R("");try{const Z=await fetch("/api/agent/login/code",{method:"POST",headers:{...re,"content-type":"application/json"},body:JSON.stringify({code:P})});T(await Z.json())}catch{}}}k.useEffect(()=>{if(!(b&&["starting","awaiting-browser","awaiting-code"].includes(b.status)))return;let Z=!0;const fe=setInterval(async()=>{try{const X=await(await fetch("/api/agent/login/status",{headers:re})).json();if(!Z)return;T(X),X.status==="success"&&(clearInterval(fe),_e())}catch{}},2e3);return()=>{Z=!1,clearInterval(fe)}},[b==null?void 0:b.status,re]);const[rt,Fe]=k.useState(null),Le=rt?j[rt]:null;async function Ft(P){if(ae(null),!(!P||P.length===0)){L(!0);try{const Z=await Iz(P);if(Z.files.length===0){ae("That folder looks empty — try another?"),L(!1);return}I(Z);const fe=yh("peek");Fe(fe),oe(X=>({...X,[fe]:{text:"",done:!1,error:null}}));const ye=await fetch("/api/onboarding/peek",{method:"POST",headers:re,body:JSON.stringify({folderName:Z.folderName,files:Z.files,totalFiles:Z.totalFiles,messageId:fe})});if(!ye.ok){const X=await ye.json().catch(()=>({}));throw new Error(X.error||`peek failed (${ye.status})`)}}catch(Z){ae(String(Z.message||Z))}finally{L(!1)}}}function De(P){M(Z=>{const fe=new Set(Z);return fe.has(P)?fe.delete(P):fe.add(P),fe})}const[je,qe]=k.useState(null),[Ke,it]=k.useState(null),[un,ht]=k.useState(null),z=je?j[je]:null,[F,te]=k.useState(null),[pe,me]=k.useState(!1);async function Ae(){ht(null),it("remix"),me(!0);try{const fe=((await(await fetch("/api/bazaar/shelf",{headers:re})).json()).recipes||[]).slice().sort((ye,X)=>(X.outcomeScore||0)-(ye.outcomeScore||0)).slice(0,3);te(fe)}catch{te([])}finally{me(!1)}}async function Qe(P){var fe;const Z=`Build me “${P.title}”. Use ${((fe=P.producer)==null?void 0:fe.name)||"the producer"}'s recipe.`;try{await we({connectedServices:[...N]}),await fetch("/api/agent/onboarded",{method:"POST",headers:re}),n==null||n({build:Z})}catch(ye){ht(String(ye.message||ye))}}async function ot(P){ht(null),it(P);const Z=yh("job");qe(Z),oe(fe=>({...fe,[Z]:{text:"",done:!1,error:null}}));try{await we({connectedServices:[...N]});const fe=await fetch("/api/onboarding/start-job",{method:"POST",headers:re,body:JSON.stringify({kind:P,messageId:Z,peekFolderName:(B==null?void 0:B.folderName)||null})});if(!fe.ok){const ye=await fe.json().catch(()=>({}));throw new Error(ye.error||`start-job failed (${fe.status})`)}}catch(fe){ht(String(fe.message||fe)),qe(null),it(null)}}async function bt(){var P;try{await we({connectedServices:[...N]});const Z=await fetch("/api/agent/onboarded",{method:"POST",headers:re});if(!Z.ok){const ye=await Z.json().catch(()=>({}));throw new Error(ye.error||`mark-onboarded failed (${Z.status})`)}let fe=null;if(je&&(z!=null&&z.done)&&z.text&&!z.error){const ye=((P=K.find(X=>X.kind===Ke))==null?void 0:P.title)||"Let’s get started";fe={messageId:je,userText:ye,agentText:z.text}}n==null||n(fe?{seedChat:fe}:void 0)}catch(Z){v(String(Z.message||Z))}}const mt=l.trim()||"your agent",Ze="Hey. I'm new here.",We="Before we start — what should I call myself?",[xt,O]=gh(r===1?Ze:"",65,420),[W,G]=gh(r===1&&O?We:"",48,520),U=r===1?G:!0,K=k.useMemo(()=>Az({peekSummary:B,services:N,agentName:mt}),[B,N,mt]),se=w?mh[w.status]||mh.login:null,Te=w?_z.has(w.status):!1;return u.jsx("div",{className:"ob-root",children:u.jsxs("div",{className:"ob-stage",children:[u.jsxs("div",{className:"ob-brand",children:[u.jsx("span",{className:"ob-brand-mark",children:"✦"})," VentureWild"]}),u.jsxs("header",{className:"ob-header",children:[u.jsx("div",{className:"ob-step-dots","aria-label":`Step ${r} of 4`,children:[1,2,3,4].map(P=>u.jsx("span",{className:`ob-dot ${P===r?"active":""} ${P<r?"done":""}`},P))}),r>1&&!w&&u.jsx("button",{className:"ob-back",onClick:()=>i(r-1),children:"← Back"})]}),w&&se&&u.jsxs("section",{className:"ob-step",children:[u.jsxs(Yn,{children:[u.jsx("p",{className:"ob-bubble-text",children:se.title}),u.jsx("p",{className:"ob-bubble-subtle",children:se.subtitle})]}),u.jsxs("div",{className:"ob-card ob-reveal",children:[w.status==="login"?u.jsxs("div",{className:"ob-login-inapp",children:[(!b||b.status==="idle")&&u.jsx("button",{className:"ob-next primary",onClick:de,children:"Sign in to Claude →"}),b&&(b.status==="starting"||b.status==="awaiting-browser")&&u.jsxs(u.Fragment,{children:[u.jsx("p",{className:"ob-bubble-text",children:"Opening Claude in your browser…"}),u.jsx("p",{className:"ob-bubble-subtle",children:"Sign in there with your Claude account — I'll detect it automatically, nothing to come back and click."}),b.url&&u.jsx("a",{className:"ob-login-link",href:b.url,target:"_blank",rel:"noreferrer",children:"If the browser didn't open, click here →"})]}),b&&b.status==="awaiting-code"&&u.jsxs("div",{className:"ob-login-code",children:[u.jsx("label",{className:"ob-label",children:"Paste the code from your browser"}),u.jsxs("div",{className:"ob-actions",children:[u.jsx("input",{className:"ob-input",value:_,onChange:P=>R(P.target.value),placeholder:"code from claude.ai"}),u.jsx("button",{className:"ob-next primary",onClick:pt,children:"Submit"})]})]}),b&&(b.status==="error"||b.status==="unsupported")&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"ob-error",children:[b.error||"I couldn't run the in-app sign-in."," You can sign in from a terminal instead:"]}),u.jsx("div",{className:"ob-login-cmd",children:u.jsx("code",{children:se.cmd})}),u.jsx("p",{className:"ob-bubble-subtle",style:{marginTop:10},children:se.after})]})]}):u.jsxs(u.Fragment,{children:[u.jsx("label",{className:"ob-label",children:se.cmdLabel}),se.cmd?u.jsx("div",{className:"ob-login-cmd",children:u.jsx("code",{children:se.cmd})}):u.jsx("a",{className:"ob-login-link",href:se.link,target:"_blank",rel:"noreferrer",children:se.linkLabel}),u.jsx("p",{className:"ob-bubble-subtle",style:{marginTop:10},children:se.after})]}),C&&u.jsx("div",{className:"ob-error",style:{marginTop:12},children:se.retry}),u.jsx("div",{className:"ob-actions",children:u.jsx("button",{className:"ob-next primary",onClick:Y,disabled:x,children:x?"Checking…":"I've done it — continue →"})}),!Te&&u.jsx("div",{className:"ob-actions",children:u.jsx("button",{className:"ob-skip",onClick:()=>{g(null),i(2)},children:"I already have a plan — continue"})})]})]}),r===1&&!w&&u.jsxs("section",{className:"ob-step",children:[u.jsxs(Yn,{streaming:!O||!G,children:[u.jsxs("p",{className:"ob-bubble-text",children:[xt,!O&&u.jsx(Wr,{})]}),O&&u.jsxs("p",{className:"ob-bubble-text",children:[W,!G&&u.jsx(Wr,{})]})]}),U&&u.jsxs("div",{className:"ob-card ob-reveal",children:[u.jsx("label",{className:"ob-label",children:"Name"}),u.jsx("input",{autoFocus:!0,className:"ob-input",placeholder:"Echo, Pip, Atlas, Sage…",value:l,onChange:P=>s(P.target.value),onKeyDown:P=>{P.key==="Enter"&&ze()},maxLength:40}),u.jsx("label",{className:"ob-label",children:"Voice"}),u.jsx("div",{className:"ob-tone-grid",children:Cz.map(P=>u.jsxs("button",{className:`ob-tone ${o===P.id?"selected":""}`,onClick:()=>c(P.id),children:[u.jsx("span",{className:"ob-tone-label",children:P.label}),u.jsx("span",{className:"ob-tone-sample",children:P.sample})]},P.id))}),u.jsx("label",{className:"ob-label",children:"Color"}),u.jsx("div",{className:"ob-color-row",children:hh.map(P=>u.jsx("button",{className:`ob-color-swatch ${f===P?"selected":""}`,style:{background:P},onClick:()=>d(P),"aria-label":`Pick ${P}`},P))}),m&&u.jsx("div",{className:"ob-error",children:m}),u.jsx("div",{className:"ob-actions",children:u.jsx("button",{className:"ob-next primary",onClick:ze,disabled:p||!l.trim(),children:p?"Saving…":`I'm ${mt}. Let's go →`})})]})]}),r===2&&u.jsxs("section",{className:"ob-step",children:[u.jsxs(Yn,{children:[u.jsx("p",{className:"ob-bubble-text",children:"Cool. Now — show me something you're working on. Drag a folder onto me."}),u.jsx("p",{className:"ob-bubble-subtle",children:"I'll read filenames + a short sample of each text file (≤40 files, ≤600 bytes each) so I can react. Files stay on your machine; the sample goes to Anthropic the same way every chat turn does. Pick something you'd be OK talking about in chat."})]}),u.jsxs("div",{className:`ob-dropzone ${A?"over":""} ${$?"peeking":""}`,onDragOver:P=>{P.preventDefault(),q(!0)},onDragLeave:()=>q(!1),onDrop:async P=>{var fe,ye;P.preventDefault(),q(!1);const Z=(fe=P.dataTransfer)==null?void 0:fe.items;if(Z&&Z.length>0&&Z[0].webkitGetAsEntry){const X=[],he=async(ie,xe="")=>{if(ie.isFile)await new Promise(ge=>ie.file(be=>{try{Object.defineProperty(be,"webkitRelativePath",{value:`${xe}${be.name}`})}catch{}X.push(be),ge()},ge));else if(ie.isDirectory){const ge=ie.createReader();await new Promise(be=>ge.readEntries(async Be=>{for(const ct of Be)await he(ct,`${xe}${ie.name}/`);be()},be))}};for(const ie of Z){const xe=ie.webkitGetAsEntry();xe&&await he(xe)}if(X.length>0){await Ft(X);return}}await Ft((ye=P.dataTransfer)==null?void 0:ye.files)},onClick:()=>{var P;return(P=S.current)==null?void 0:P.click()},children:[u.jsx("input",{ref:S,type:"file",webkitdirectory:"",directory:"",multiple:!0,style:{display:"none"},onChange:P=>Ft(P.target.files)}),$?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"ob-drop-icon",children:"👀"}),u.jsx("div",{className:"ob-drop-title",children:"Looking…"})]}):B?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"ob-drop-icon",children:"📁"}),u.jsx("div",{className:"ob-drop-title",children:B.folderName}),u.jsxs("div",{className:"ob-drop-sub",children:[B.totalFiles," file",B.totalFiles===1?"":"s"," · sampled ",B.files.length]})]}):u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"ob-drop-icon",children:"📂"}),u.jsx("div",{className:"ob-drop-title",children:"Drop a folder here"}),u.jsx("div",{className:"ob-drop-sub",children:"or click to pick one"})]})]}),Le&&u.jsxs(Yn,{streaming:!Le.done,children:[Le.text?u.jsxs("p",{className:"ob-bubble-text",children:[Le.text,!Le.done&&u.jsx(Wr,{})]}):u.jsxs("p",{className:"ob-bubble-subtle",children:["👀 ",mt," is reading…",!Le.done&&u.jsx(Wr,{})]}),Le.error&&u.jsx("p",{className:"ob-bubble-subtle ob-bubble-error",children:Le.error})]}),J&&u.jsx("div",{className:"ob-error",children:J}),u.jsxs("div",{className:"ob-actions",children:[u.jsx("button",{className:"ob-skip",onClick:()=>i(3),children:"Skip — I'd rather just chat"}),u.jsx("button",{className:"ob-next primary",onClick:()=>i(3),disabled:!B&&!J,children:"Next →"})]})]}),r===3&&u.jsxs("section",{className:"ob-step",children:[u.jsxs(Yn,{children:[u.jsx("p",{className:"ob-bubble-text",children:"Anything I should keep an eye on?"}),u.jsx("p",{className:"ob-bubble-subtle",children:"Totally optional. Flag what lives in your world and I'll wire it up when these land — you can always add more later."})]}),u.jsx("div",{className:"ob-tile-grid",children:Nz.map(P=>u.jsxs("button",{className:`ob-tile ${N.has(P.id)?"selected":""}`,onClick:()=>De(P.id),children:[u.jsx("span",{className:"ob-tile-label",children:P.label}),u.jsx("span",{className:"ob-tile-note",children:P.note}),N.has(P.id)&&u.jsx("span",{className:"ob-tile-check",children:"✓"})]},P.id))}),u.jsxs("div",{className:"ob-soon",children:["These connection flows are landing soon — your picks are saved. And I don't live on one device:",a?u.jsxs(u.Fragment,{children:[" open ",u.jsx("code",{children:a})," on your phone with the same login"]}):u.jsx(u.Fragment,{children:" sign in on any device with the same login"})," ","and I'm right there — same memory, same conversation."]}),u.jsxs("div",{className:"ob-actions",children:[u.jsx("button",{className:"ob-skip",onClick:()=>i(4),children:"Skip →"}),u.jsx("button",{className:"ob-next primary",onClick:()=>i(4),children:"Next: first job →"})]})]}),r===4&&u.jsxs("section",{className:"ob-step",children:[u.jsxs(Yn,{children:[u.jsx("p",{className:"ob-bubble-text",children:"Right — what should I actually do for you first?"}),u.jsx("p",{className:"ob-bubble-subtle",children:"Pick one and I'll start now. Or close this and just talk to me."})]}),F?u.jsxs("div",{className:"ob-remix",children:[u.jsx(Yn,{children:u.jsx("p",{className:"ob-bubble-text",children:"Here's what other builders already got working. Pick one — I'll build it for you the moment you land in your workspace."})}),F.length===0?u.jsx("div",{className:"ob-error",children:"The shelf is empty right now — start from scratch instead."}):F.map(P=>{var Z;return u.jsxs("button",{className:"ob-remix-card",onClick:()=>Qe(P),children:[u.jsxs("div",{className:"ob-remix-main",children:[u.jsx("span",{className:"ob-remix-title",children:P.title}),u.jsxs("span",{className:"ob-remix-by",children:["by ",((Z=P.producer)==null?void 0:Z.name)||"a builder"]}),P.pitch&&u.jsx("span",{className:"ob-remix-pitch",children:P.pitch})]}),u.jsxs("div",{className:"ob-remix-stat",children:[u.jsxs("span",{className:"ob-remix-pct",children:[Math.round((P.outcomeScore||0)*100),"%"]}),u.jsx("span",{className:"ob-remix-pct-sub",children:"worked"})]})]},P.id)}),u.jsx("div",{className:"ob-actions",children:u.jsx("button",{className:"ob-skip",onClick:()=>{te(null),it(null)},children:"← Pick a different job"})})]}):je?u.jsxs(u.Fragment,{children:[u.jsxs(Yn,{streaming:!z||!z.done,children:[z!=null&&z.text?u.jsxs("p",{className:"ob-bubble-text",children:[z.text,!z.done&&u.jsx(Wr,{})]}):u.jsxs("p",{className:"ob-bubble-subtle",children:[mt," is on it…",(!z||!z.done)&&u.jsx(Wr,{})]}),(z==null?void 0:z.error)&&u.jsx("p",{className:"ob-bubble-subtle ob-bubble-error",children:z.error})]}),u.jsxs("div",{className:"ob-actions",children:[u.jsx("button",{className:"ob-skip",onClick:()=>{qe(null),it(null)},children:"← Pick a different job"}),u.jsx("button",{className:"ob-next primary",onClick:bt,disabled:!z||!z.done&&!z.error,children:z!=null&&z.done?"Open my workspace →":"Streaming…"})]})]}):u.jsxs("div",{className:"ob-jobs",children:[u.jsxs("button",{className:"ob-job ob-job-remix",onClick:Ae,disabled:pe,children:[u.jsx("div",{className:"ob-job-title",children:"✦ Remix a proven build"}),u.jsx("div",{className:"ob-job-sub",children:pe?"Pulling up what others have made…":"Start from something other builders already got working — I'll build one for you now."})]}),K.map(P=>u.jsxs("button",{className:"ob-job",onClick:()=>ot(P.kind),children:[u.jsx("div",{className:"ob-job-title",children:P.title}),u.jsx("div",{className:"ob-job-sub",children:P.sub})]},P.kind))]}),(m||un)&&u.jsx("div",{className:"ob-error",children:m||un}),!je&&!F&&u.jsx("div",{className:"ob-actions",children:u.jsx("button",{className:"ob-skip",onClick:bt,children:"Skip to chat →"})})]}),!w&&u.jsx("p",{className:"ob-consent-note",children:"I quietly share how I'm doing — what's working, what breaks, my setup health — with the Venturewild team so they can help if you ever get stuck. Never your words or files. You can turn this off anytime."})]})})}const Lz={display:"grid",placeItems:"center",minHeight:"100vh",padding:24,textAlign:"center"},Oz={maxWidth:420,display:"grid",gap:16,justifyItems:"center"},Fz={fontSize:44,letterSpacing:"0.18em",fontWeight:700,fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",color:"var(--accent, #22d3ee)"};function Mz(e){return e&&e.length===6?`${e.slice(0,3)} ${e.slice(3)}`:e}function $z(){const[e,t]=k.useState("starting"),[n,r]=k.useState(null),[i,a]=k.useState(null),[l,s]=k.useState(0),[o,c]=k.useState(0),f=k.useRef({requestId:null,pollAfterMs:2500}),d=k.useCallback(async()=>{t("starting"),r(null);try{const p=await fetch("/api/auth/pair/start",{method:"POST",headers:{"content-type":"application/json"},body:"{}"});if(p.status===429){t("error"),r("Too many sign-in attempts right now. Wait a minute, then try again.");return}if(!p.ok){t("error"),r("Could not start sign-in. Please try again.");return}const h=await p.json();f.current={requestId:h.requestId,pollAfterMs:h.pollAfterMs||2500},a(h.code),s(h.expiresAt||0),t("waiting")}catch{t("error"),r("Network error. Check your connection and try again.")}},[]);return k.useEffect(()=>{d()},[d]),k.useEffect(()=>{if(e!=="waiting")return;let p=!1,h=null;const{requestId:m,pollAfterMs:v}=f.current;async function w(){try{const g=await fetch("/api/auth/pair/status",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({requestId:m})});if(p)return;const x=await g.json().catch(()=>({}));if(x.status==="approved"&&x.token){if((await fetch("/api/auth/exchange",{method:"POST",headers:{Authorization:`Bearer ${x.token}`}})).ok){window.location.reload();return}t("error"),r("Almost there — sign-in completed but the session could not be saved. Try again.");return}if(x.status==="denied"){t("error"),r("This device was denied.");return}if(x.status==="expired"){t("error"),r("The code expired before it was approved.");return}h=setTimeout(w,v)}catch{p||(h=setTimeout(w,v))}}return h=setTimeout(w,v),()=>{p=!0,clearTimeout(h)}},[e]),k.useEffect(()=>{if(e!=="waiting"||!l)return;const p=()=>c(Math.max(0,Math.round((l-Date.now())/1e3)));p();const h=setInterval(p,1e3);return()=>clearInterval(h)},[e,l]),u.jsx("div",{className:"app",style:{gridTemplateRows:"1fr"},children:u.jsx("div",{style:Lz,children:u.jsxs("div",{style:Oz,children:[u.jsx("h2",{style:{margin:0},children:"Sign in to this workspace"}),e==="starting"&&u.jsxs("p",{style:{color:"var(--text-muted)"},children:[u.jsx("span",{className:"spinner"})," Preparing…"]}),e==="waiting"&&u.jsxs(u.Fragment,{children:[u.jsx("p",{style:{color:"var(--text-muted)",margin:0},children:"On a device where you’re already signed in, open this workspace and approve this code:"}),u.jsx("div",{style:Fz,"data-testid":"pair-code",children:Mz(i)}),u.jsxs("p",{style:{color:"var(--text-muted)",fontSize:13,margin:0},children:["Waiting for approval",o?` · expires in ${o}s`:"","…"]})]}),e==="error"&&u.jsxs(u.Fragment,{children:[u.jsx("p",{style:{color:"var(--error)"},children:n}),u.jsx("button",{onClick:d,children:"Try again"})]})]})})})}const Bz={position:"fixed",top:12,left:"50%",transform:"translateX(-50%)",zIndex:1e3,background:"var(--surface, #1e293b)",border:"1px solid var(--accent, #22d3ee)",borderRadius:10,padding:"12px 16px",boxShadow:"0 8px 24px rgba(0,0,0,0.35)",display:"grid",gap:10,maxWidth:460},Hz={display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},Uz={fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",letterSpacing:"0.12em",fontWeight:700,color:"var(--accent, #22d3ee)"};function Wz(e){return e&&e.length===6?`${e.slice(0,3)} ${e.slice(3)}`:e}function Vz({token:e}){const[t,n]=k.useState([]),[r,i]=k.useState(null),[a,l]=k.useState(null),s=k.useRef(!0),o=k.useCallback((d={})=>e?{Authorization:`Bearer ${e}`,...d}:d,[e]),c=k.useCallback(async()=>{try{const d=await fetch("/api/auth/pair/requests",{headers:o()});if(!d.ok)return;const p=await d.json();s.current&&n(Array.isArray(p.requests)?p.requests:[])}catch{}},[o]);k.useEffect(()=>{s.current=!0,c();const d=setInterval(c,5e3);return()=>{s.current=!1,clearInterval(d)}},[c]);async function f(d,p,h){if(!r){i(d),l(null);try{const m=await fetch(`/api/auth/pair/${p}`,{method:"POST",headers:o({"content-type":"application/json"}),body:JSON.stringify({requestId:d})});m.ok&&p==="approve"?l({ok:!0,text:`Approved ${h}.`}):m.ok||l({ok:!1,text:"That request is no longer waiting."})}catch{l({ok:!1,text:"Network error."})}finally{i(null),c()}}}return t.length===0?null:u.jsxs("div",{style:Bz,"data-testid":"pair-approvals",children:[u.jsx("strong",{style:{fontSize:13},children:t.length===1?"A device wants to sign in":`${t.length} devices want to sign in`}),u.jsx("span",{style:{fontSize:12,color:"var(--text-muted)"},children:"Check that the code matches the one on that device, then approve."}),t.map(d=>u.jsxs("div",{style:Hz,children:[u.jsx("span",{style:{fontSize:13},children:d.label}),u.jsx("span",{style:Uz,"data-testid":"pair-request-code",children:Wz(d.code)}),u.jsx("span",{className:"spacer",style:{flex:1}}),u.jsx("button",{onClick:()=>f(d.requestId,"approve",d.label),disabled:r===d.requestId,"data-testid":"pair-approve-btn",children:r===d.requestId?"Approving…":"Approve"}),u.jsx("button",{onClick:()=>f(d.requestId,"deny",d.label),disabled:r===d.requestId,style:{background:"transparent",color:"var(--text-muted)"},children:"Deny"})]},d.requestId)),a&&u.jsx("span",{style:{fontSize:12,color:a.ok?"var(--accent, #22d3ee)":"var(--error)"},children:a.text})]})}const Gz=15e3,qz=2500;function Yz(e){const t=Math.round(e/6e4);return t<=0?"expiring":t<60?`${t} min`:`${Math.floor(t/60)}h ${t%60}m`}function Xz({token:e}){var g;const[t,n]=k.useState(null),[r,i]=k.useState(!1),[a,l]=k.useState(!1),s=k.useRef(null),o=k.useCallback(()=>e?{Authorization:`Bearer ${e}`}:{},[e]),c=k.useCallback(async()=>{try{const x=await fetch("/api/support/status",{headers:o()});if(!x.ok)return;n(await x.json())}catch{}},[o]),f=!!((g=t==null?void 0:t.operate)!=null&&g.active);k.useEffect(()=>{c();const x=f?qz:Gz;return s.current=setInterval(c,x),()=>clearInterval(s.current)},[c,f]);const d=k.useCallback(async()=>{i(!0);try{await fetch("/api/support/revoke",{method:"POST",headers:o()})}catch{}i(!1),c()},[o,c]),p=k.useCallback(async()=>{l(!0);try{await fetch("/api/support/operate/cancel",{method:"POST",headers:o()})}catch{}l(!1),c()},[o,c]),h=(t==null?void 0:t.operate)||null;if(!t||!t.enabled&&!t.active&&!h)return null;if(h){const x=(h.lines||[]).slice(-6);return u.jsxs("div",{role:"status","aria-live":"polite",style:xh(!0),children:[u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,width:"100%"},children:[u.jsx("span",{"aria-hidden":"true",children:"⚙️"}),u.jsx("span",{style:{fontWeight:600},children:h.active?"VentureWild support is operating your agent":"VentureWild support finished helping"}),h.active&&u.jsx("button",{type:"button",onClick:p,disabled:a,style:Mo,children:a?"Stopping…":"Stop"}),u.jsx("button",{type:"button",onClick:d,disabled:r,style:{...Mo,marginLeft:h.active?0:"auto"},children:r?"Revoking…":"Revoke access"})]}),x.length>0&&u.jsx("div",{"data-testid":"operate-transcript",style:{width:"100%",marginTop:4,maxHeight:96,overflowY:"auto",font:"12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace",opacity:.92,whiteSpace:"pre-wrap"},children:x.map((y,C)=>u.jsx("div",{children:y.text},`${y.ts}-${C}`))})]})}const m=t.active,v=m?"VentureWild support is connected":`Support access allowed (tier ${t.tier})`,w=m?t.lastAction?`last action: ${t.lastAction.action}`:"a support session is live":`auto-expires in ${Yz(t.remainingMs)}`;return u.jsxs("div",{role:"status","aria-live":"polite",style:xh(m),children:[u.jsx("span",{"aria-hidden":"true",children:m?"🟢":"🛟"}),u.jsx("span",{style:{fontWeight:600},children:v}),u.jsxs("span",{style:{opacity:.8},children:["· ",w]}),u.jsx("button",{type:"button",onClick:d,disabled:r,style:{...Mo,marginLeft:"auto"},children:r?"Revoking…":"Revoke"})]})}function xh(e){return{position:"fixed",top:0,left:0,right:0,zIndex:9999,display:"flex",flexWrap:"wrap",alignItems:"center",gap:12,padding:"6px 14px",background:e?"var(--accent, #0891b2)":"var(--surface-2, #f4f4f5)",color:e?"var(--accent-ink, #fff)":"var(--text, #222)",borderBottom:"1px solid var(--border, #e4e4e7)",boxShadow:"0 1px 6px rgba(0,0,0,0.12)",font:"13px/1.4 -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"}}const Mo={padding:"3px 12px",borderRadius:6,border:"1px solid currentColor",background:"transparent",color:"inherit",cursor:"pointer",fontWeight:600},Kz={partner:"Partner",viewer:"Viewer",client:"Client"},Gr=12,$o=[{id:"chat-1",type:"chat"}],Qz={lg:[{i:"chat-1",x:0,y:0,w:8,h:Gr,minW:3,minH:4}]},Zz={liveview:{w:4,h:12},notes:{w:3,h:6},earnings:{w:3,h:5},analytics:{w:4,h:7},files:{w:3,h:12},code:{w:5,h:12},todo:{w:3,h:7}},Jz=[{type:"liveview",title:"Live view",icon:"👁️",desc:"See what your agent builds, live."},{type:"files",title:"Files",icon:"📁",desc:"Browse your workspace files.",cap:"fileTree"},{type:"code",title:"Code",icon:"💻",desc:"View a file, with highlighting.",cap:"fileTree"},{type:"notes",title:"Notes",icon:"📝",desc:"A place to jot anything."},{type:"todo",title:"To-do",icon:"✅",desc:"A simple checklist."},{type:"chat",title:"Another chat",icon:"🗨️",desc:"A second conversation thread.",soon:!0}],eP=[{type:"earnings",title:"Producer earnings",icon:"💸",desc:"Watch represented earnings tick in, live."},{type:"analytics",title:"Shelf analytics",icon:"📊",desc:"Who's earning across the marketplace."}],tP=[{id:"just-chat",name:"Just chat",icon:"💬",desc:"Only the conversation — clean and focused.",blocks:[{type:"chat",l:{x:0,y:0,w:8,h:12,minW:3,minH:4}}]},{id:"build",name:"Build",icon:"🔨",desc:"Chat beside a live view of what you build.",blocks:[{type:"chat",l:{x:0,y:0,w:6,h:12,minW:3,minH:4}},{type:"liveview",l:{x:6,y:0,w:6,h:12,minW:3,minH:4}}]},{id:"producer",name:"Producer",icon:"💸",desc:"Chat + your earnings and the shelf, at a glance.",blocks:[{type:"chat",l:{x:0,y:0,w:6,h:12,minW:3,minH:4}},{type:"earnings",l:{x:6,y:0,w:6,h:5,minW:3,minH:3}},{type:"analytics",l:{x:6,y:5,w:6,h:7,minW:3,minH:3}}]},{id:"workspace",name:"Workspace",icon:"📝",desc:"Chat, a live view, and a notes scratchpad.",blocks:[{type:"chat",l:{x:0,y:0,w:6,h:12,minW:3,minH:4}},{type:"liveview",l:{x:6,y:0,w:6,h:7,minW:3,minH:3}},{type:"notes",l:{x:6,y:7,w:6,h:5,minW:3,minH:3}}]},{id:"code",name:"Code",icon:"💻",desc:"Chat with a file browser and a code view.",cap:"fileTree",blocks:[{type:"chat",l:{x:0,y:0,w:4,h:12,minW:3,minH:4}},{type:"files",l:{x:4,y:0,w:3,h:12,minW:2,minH:4}},{type:"code",l:{x:7,y:0,w:5,h:12,minW:3,minH:4}}]}];let vh=0;function $i(e){return vh+=1,`${e}-${Date.now().toString(36)}-${vh}`}function nP(e=640){const[t,n]=k.useState(()=>typeof window<"u"&&window.innerWidth<=e);return k.useEffect(()=>{if(typeof window>"u")return;const r=window.matchMedia(`(max-width: ${e}px)`),i=()=>n(r.matches);return i(),r.addEventListener("change",i),()=>r.removeEventListener("change",i)},[e]),t}function rP(){var mt,Ze,We,xt;const[e,t]=k.useState(null),[n,r]=k.useState(null),[i,a]=k.useState(!1),[l,s]=k.useState(!1),[o,c]=k.useState(!1),[f,d]=k.useState(null),[p,h]=k.useState(!1),[m,v]=k.useState(!1),[w,g]=k.useState("build"),[x,y]=k.useState(null),[C,E]=k.useState(null),[b,T]=k.useState(null),[_,R]=k.useState(!1),[N,M]=k.useState(null),[$,L]=k.useState("use"),[B,I]=k.useState(!1),[J,ae]=k.useState(!1),[A,q]=k.useState(!1),[S,Q]=k.useState(()=>typeof window<"u"?q_():{mode:"light",accent:"#0891b2",hot:"#0e7490",accentManual:!1}),[le,j]=k.useState(()=>{try{const O=JSON.parse(localStorage.getItem("wild:templates")||"[]");return Array.isArray(O)?O:[]}catch{return[]}}),[oe,ve]=k.useState($o),[ne,re]=k.useState(Qz),[we,ce]=k.useState(!1),[ze,Y]=k.useState("chat-1"),_e=nP(),de=k.useMemo(()=>typeof window>"u"?null:new URLSearchParams(window.location.search).get("t"),[]);k.useEffect(()=>{async function O(){try{const W={};de&&(W.Authorization=`Bearer ${de}`);const G=await fetch("/api/session",{headers:W});if(G.status===401){a(!0);return}if(!G.ok)throw new Error(`session fetch failed: ${G.status}`);const U=await G.json();t(U)}catch(W){r(W.message||String(W))}}O()},[de]),k.useEffect(()=>{X_(S),Y_(S)},[S]),k.useEffect(()=>{var W;const O=(W=e==null?void 0:e.identity)==null?void 0:W.color;O&&!S.accentManual&&Q(G=>G.accentManual?G:{...G,accent:O,hot:O})},[(mt=e==null?void 0:e.identity)==null?void 0:mt.color,S.accentManual]);const pt=e!=null&&e.workspaceId?`wild:canvas:v2:${e.workspaceId}`:null;k.useEffect(()=>{if(!(!pt||we)){try{const O=localStorage.getItem(pt);if(O){const W=JSON.parse(O);let G=Array.isArray(W.blocks)&&W.blocks.length?W.blocks:$o;G.some(U=>U.type==="chat")||(G=[...$o,...G]),ve(G),W.layouts&&W.layouts.lg&&re(W.layouts)}}catch{}ce(!0)}},[pt,we]),k.useEffect(()=>{if(!(!pt||!we))try{localStorage.setItem(pt,JSON.stringify({blocks:oe,layouts:ne}))}catch{}},[pt,we,oe,ne]),k.useEffect(()=>{var G;if(!we||!((G=e==null?void 0:e.capabilities)!=null&&G.chat))return;let O=!1;const W=de?{Authorization:`Bearer ${de}`}:{};return fetch("/api/canvas/blocks",{headers:W}).then(U=>U.ok?U.json():null).then(U=>{O||!Array.isArray(U==null?void 0:U.blocks)||!U.blocks.length||(ve(K=>{const se=new Set(K.map(Re=>Re.id)),Te=U.blocks.filter(Re=>Re.id&&!se.has(Re.id));return Te.length?[...K,...Te.map(Re=>({id:Re.id,type:"custom",spec:Re}))]:K}),re(K=>{const se=K.lg||[],Te=new Set(se.map(Me=>Me.i)),Re=U.blocks.filter(Me=>Me.id&&!Te.has(Me.id));return Re.length?{lg:[...se,...Re.map((Me,lt)=>({i:Me.id,x:8,y:lt*6,w:4,h:6,minW:3,minH:3}))]}:K}))}).catch(()=>{}),()=>{O=!0}},[we,(Ze=e==null?void 0:e.capabilities)==null?void 0:Ze.chat,de]),k.useEffect(()=>{var G;if(!((G=e==null?void 0:e.capabilities)!=null&&G.chat)||S.accentManual)return;let O=!1;const W=de?{Authorization:`Bearer ${de}`}:{};return fetch("/api/canvas/theme",{headers:W}).then(U=>U.ok?U.json():null).then(U=>{O||!(U!=null&&U.theme)||Q(K=>K.accentManual?K:{...K,mode:U.theme.mode==="dark"?"dark":"light",accent:U.theme.accent||K.accent,hot:U.theme.hot||U.theme.accent||K.hot,tokens:U.theme.tokens||{}})}).catch(()=>{}),()=>{O=!0}},[(We=e==null?void 0:e.capabilities)==null?void 0:We.chat,de]);function rt(O){const W=$i(O),G=Zz[O]||{w:4,h:12};if(ve(U=>[...U,{id:W,type:O}]),re(U=>({lg:[...U.lg||[],{i:W,x:Math.max(0,12-G.w),y:0,w:G.w,h:G.h,minW:3,minH:3}]})),Y(W),I(!1),typeof window<"u"){const U=K=>{var se;return(se=document.querySelector(`[data-rgl-id="${W}"]`))==null?void 0:se.scrollIntoView({behavior:K,block:"nearest"})};setTimeout(()=>U("smooth"),300),setTimeout(()=>U("auto"),750)}}function Fe(O){const W=oe.find(G=>G.id===O);if(ve(G=>G.filter(U=>U.id!==O)),re(G=>({lg:(G.lg||[]).filter(U=>U.i!==O)})),Y(G=>{var U;return G===O?((U=oe.find(K=>K.type==="chat"))==null?void 0:U.id)||"chat-1":G}),(W==null?void 0:W.type)==="custom"){const G=de?{Authorization:`Bearer ${de}`}:{};fetch(`/api/canvas/blocks/${encodeURIComponent(O)}`,{method:"DELETE",headers:G}).catch(()=>{})}}function Le(O){const W=oe.find(G=>G.id===O);W&&rt(W.type)}function Ft(){if(oe.some(W=>W.type==="liveview"))return;const O=$i("liveview");ve(W=>W.some(G=>G.type==="liveview")?W:[...W,{id:O,type:"liveview"}]),re(W=>{const G=(W.lg||[]).map(U=>U.i.startsWith("chat")?{...U,w:6,x:0,h:Gr}:U);return G.push({i:O,x:6,y:0,w:6,h:Gr,minW:3,minH:4}),{lg:G}})}function De(O){if(T(O),oe.some(G=>G.type==="code"))return;const W=$i("code");ve(G=>G.some(U=>U.type==="code")?G:[...G,{id:W,type:"code"}]),re(G=>({lg:[...G.lg||[],{i:W,x:6,y:0,w:6,h:Gr,minW:3,minH:4}]}))}function je(O,W){if(O!=null&&O.id&&(ve(G=>{const U=G.findIndex(K=>K.id===O.id);if(U>=0){const K=G.slice();return K[U]={...K[U],type:"custom",spec:O},K}return[...G,{id:O.id,type:"custom",spec:O}]}),re(G=>{const U=G.lg||[];return U.some(K=>K.i===O.id)?G:{lg:[...U,{i:O.id,x:8,y:0,w:4,h:6,minW:3,minH:3}]}}),W!=="update"&&(Y(O.id),typeof window<"u"))){const G=U=>{var K;return(K=document.querySelector(`[data-rgl-id="${O.id}"]`))==null?void 0:K.scrollIntoView({behavior:U,block:"nearest"})};setTimeout(()=>G("smooth"),300),setTimeout(()=>G("auto"),750)}}function qe(O){!O||typeof O!="object"||Q(W=>{var G;return G_(W,O,W.accentManual||!!((G=e==null?void 0:e.identity)!=null&&G.color))})}function Ke(O){var U;const W=[],G=O.blocks.map(K=>{const se=$i(K.type);return W.push({i:se,...K.l||{x:0,y:0,w:4,h:Gr,minW:3,minH:3}}),{id:se,type:K.type}});if(!G.some(K=>K.type==="chat")){const K=$i("chat");G.unshift({id:K,type:"chat"}),W.unshift({i:K,x:0,y:0,w:8,h:Gr,minW:3,minH:4})}ve(G),re({lg:W}),Y(((U=G[0])==null?void 0:U.id)||"chat-1"),ae(!1),typeof window<"u"&&setTimeout(()=>{var K;return(K=document.querySelector(".block-canvas"))==null?void 0:K.scrollTo({top:0,behavior:"smooth"})},60)}function it(O){try{localStorage.setItem("wild:templates",JSON.stringify(O))}catch{}return O}function un(O){const W=ne.lg||[],G=oe.map(K=>{const se=W.find(Te=>Te.i===K.id);return{type:K.type,l:se?{x:se.x,y:se.y,w:se.w,h:se.h,minW:se.minW??3,minH:se.minH??4}:{x:0,y:0,w:4,h:10,minW:3,minH:4}}}),U={id:`saved-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,name:O,icon:"⭐",desc:"Your saved layout",blocks:G,custom:!0};j(K=>it([...K,U]))}function ht(O){j(W=>it(W.filter(G=>G.id!==O)))}if(i)return u.jsx($z,{});if(n)return u.jsx("div",{className:"app",style:{gridTemplateRows:"1fr",alignItems:"center",justifyItems:"center"},children:u.jsxs("div",{style:{padding:24},children:[u.jsx("h2",{children:"wild-workspace"}),u.jsxs("p",{style:{color:"var(--error)"},children:["Could not load session: ",n]}),u.jsx("p",{style:{color:"var(--text-muted)",fontSize:13},children:"Verify the server is running and the share URL token is valid."})]})});if(!e)return u.jsx("div",{className:"app",style:{gridTemplateRows:"1fr",alignItems:"center",justifyItems:"center"},children:u.jsxs("div",{style:{padding:24,color:"var(--text-muted)"},children:[u.jsx("span",{className:"spinner"})," Loading workspace…"]})});if((xt=e.capabilities)!=null&&xt.chatWrite&&!e.onboarded)return u.jsx(Dz,{session:e,token:de,onComplete:async O=>{O!=null&&O.seedChat&&NN(O.seedChat);try{const W={};de&&(W.Authorization=`Bearer ${de}`);const G=await fetch("/api/session",{headers:W});G.ok?t(await G.json()):t({...e,onboarded:!0})}catch{t({...e,onboarded:!0})}O!=null&&O.build&&M({text:O.build,ts:Date.now()})}});const{role:z,capabilities:F,workspace:te,workspaceId:pe,agent:me,identity:Ae}=e,Qe=(Ae==null?void 0:Ae.name)||(me==null?void 0:me.label)||"Chat";function ot(O){var W,G;switch(O.type){case"chat":return{title:Qe,icon:"🗨️"};case"liveview":return{title:"Live view",icon:"👁️"};case"notes":return{title:"Notes",icon:"📝"};case"earnings":return{title:"Producer earnings",icon:"💸"};case"analytics":return{title:"Shelf analytics",icon:"📊"};case"files":return{title:"Files",icon:"📁"};case"code":return{title:"Code",icon:"💻"};case"todo":return{title:"To-do",icon:"✅"};case"custom":return{title:((W=O.spec)==null?void 0:W.title)||"Block",icon:((G=O.spec)==null?void 0:G.icon)||"🧩"};default:return{title:O.type,icon:"▫️"}}}function bt(O){switch(O.type){case"chat":return u.jsxs(u.Fragment,{children:[F.chatWrite&&u.jsx("div",{className:"chat-block-bar",children:u.jsxs("span",{className:"chat-mode-toggle","data-testid":"mode-toggle",children:[u.jsx("button",{className:w==="build"?"active":"",onClick:()=>g("build"),"data-testid":"mode-build",children:"Build"}),u.jsx("button",{className:w==="plan"?"active":"",onClick:()=>g("plan"),"data-testid":"mode-plan",children:"Plan"})]})}),F.inbox&&u.jsx(bz,{}),u.jsx(zN,{role:z,capabilities:F,mode:w,token:de,inject:N,agentName:Qe,onBazaarEvent:W=>{(W==null?void 0:W.type)==="preview"?(y({url:W.url,ts:W.ts}),Ft()):(W==null?void 0:W.type)==="meter"?E(W.state):(W==null?void 0:W.type)==="block"?je(W.block,W.op):(W==null?void 0:W.type)==="theme"&&qe(W.theme)}})]});case"liveview":return u.jsx(Q_,{bazaarPreview:x});case"notes":return u.jsx(Z_,{id:O.id});case"earnings":return u.jsx(tz,{live:C,token:de});case"analytics":return u.jsx(rz,{live:C,token:de});case"files":return u.jsx(iz,{token:de,selectedFile:b,onOpenFile:De});case"code":return u.jsx(sz,{path:b,token:de,onPickFile:T});case"todo":return u.jsx(oz,{id:O.id});case"custom":return u.jsx(uz,{spec:O.spec});default:return null}}return u.jsxs("div",{className:"app",children:[u.jsx(Xz,{token:de}),F.share&&u.jsx(Vz,{token:de}),u.jsxs("header",{className:"topbar","data-testid":"topbar",children:[u.jsx("span",{className:"brand",children:"wild-workspace"}),u.jsx("span",{className:`badge ${z}`,"data-testid":"role-badge",children:Kz[z]||z}),u.jsx("span",{className:"badge","data-testid":"workspace-name",children:(te==null?void 0:te.name)||pe}),Ae!=null&&Ae.name?u.jsx("span",{className:"badge","data-testid":"agent-name",style:{borderColor:Ae.color,color:Ae.color},children:Ae.name}):me&&u.jsx("span",{className:"badge","data-testid":"agent-name",children:me.label||me.id}),u.jsx("span",{className:"spacer"}),u.jsx("button",{onClick:()=>q(!0),"data-testid":"theme-btn",title:"Theme — make it yours (light/dark + accent)",children:"🎨 Theme"}),F.chatWrite&&u.jsx("button",{onClick:()=>ae(!0),"data-testid":"templates-btn",title:"Start from a template layout",children:"▾ Templates"}),F.chatWrite&&u.jsx("button",{className:$==="layout"?"primary":"",onClick:()=>L(O=>O==="layout"?"use":"layout"),"data-testid":"arrange-toggle",title:"Rearrange your blocks",children:$==="layout"?"✓ Done":"✥ Arrange"}),F.chat&&u.jsx("button",{onClick:()=>R(!0),"data-testid":"bazaar-btn",title:"Browse the marketplace shelf",children:"🛍️ Bazaar"}),F.sync&&u.jsx("button",{onClick:()=>c(!0),"data-testid":"collaborate-btn",children:"Collaborate"}),F.share&&u.jsx("button",{onClick:()=>s(!0),"data-testid":"share-btn",children:"Share"}),F.terminal&&u.jsx("button",{onClick:()=>v(O=>!O),"data-testid":"terminal-toggle",children:m?"Hide terminal":"Terminal"})]}),u.jsxs("main",{className:"canvas-wrap","data-testid":"canvas-wrap",children:[$==="layout"&&u.jsxs("div",{className:"arrange-bar","data-testid":"arrange-bar",children:[u.jsx("span",{className:"arrange-hint",children:"✥ Arranging your space — drag a block's header, resize from its corner, or add a new one."}),u.jsx("span",{className:"spacer"}),u.jsx("button",{className:"primary",onClick:()=>I(!0),"data-testid":"add-block-btn",children:"+ Add block"}),u.jsx("button",{onClick:()=>L("use"),children:"Done"})]}),_e?u.jsx(B_,{blocks:oe,activeId:ze,setActiveId:Y,mode:$,renderBlock:bt,blockMeta:ot,onRemove:Fe,canRemove:O=>O.type!=="chat"}):u.jsx($_,{blocks:oe,layouts:ne,mode:$,onLayoutChange:re,renderBlock:bt,blockMeta:ot,onRemove:Fe,onDuplicate:Le,canRemove:O=>O.type!=="chat",canDuplicate:O=>O.type!=="chat"&&O.type!=="custom"})]}),u.jsx(wz,{role:z,capabilities:F,session:e,urlToken:de,onSyncAlert:d,onOpenConflicts:()=>h(!0)}),u.jsx(yz,{alert:f,onDismiss:()=>d(null)}),p&&u.jsx(xz,{urlToken:de,onClose:()=>h(!1)}),B&&u.jsx(H_,{items:Jz.filter(O=>!O.cap||F[O.cap]),bazaarItems:eP,onAdd:rt,onClose:()=>I(!1)}),J&&u.jsx(W_,{builtins:tP.filter(O=>!O.cap||F[O.cap]),saved:le,onApply:Ke,onSaveCurrent:un,onDelete:ht,onClose:()=>ae(!1)}),A&&u.jsx(K_,{theme:S,onChange:Q,onClose:()=>q(!1)}),_&&u.jsx(jz,{token:de,onApplyTheme:qe,onClose:()=>R(!1),onBuild:O=>{M({text:O,ts:Date.now()}),R(!1)}}),l&&u.jsx(mz,{onClose:()=>s(!1),workspaceId:pe}),o&&u.jsx(gz,{onClose:()=>c(!1),token:de}),m&&u.jsxs("div",{className:"terminal-overlay","data-testid":"terminal-overlay",children:[u.jsxs("header",{children:[u.jsx("strong",{children:"Terminal (preview)"}),u.jsx("button",{onClick:()=>v(!1),children:"close"})]}),u.jsx("p",{children:"Power-user terminal is a hidden-by-default toggle. The xterm.js + node-pty integration ships in v1.1. For now use your OS terminal — wild-workspace doesn't replace your shell, it surfaces the agent."})]})]})}function iP(e){const t=window.fetch.bind(window);window.fetch=(n,r={})=>{const i=typeof n=="string"?n:(n==null?void 0:n.url)||"";if(!(i.startsWith("/api/")||i.includes("://")===!1&&i.startsWith("api/")))return t(n,r);const l=new Headers(r.headers||{});return l.has("Authorization")||l.set("Authorization",`Bearer ${e}`),t(n,{...r,headers:l})}}function aP(){Bo.createRoot(document.getElementById("root")).render(u.jsx(xn.StrictMode,{children:u.jsx(rP,{})}))}async function lP(){const t=typeof window<"u"&&window.fetch?new URLSearchParams(window.location.search).get("t"):null;if(t){let n=!1;try{const r=await window.fetch("/api/auth/exchange",{method:"POST",headers:{Authorization:`Bearer ${t}`}});n=r.ok&&(await r.json().catch(()=>({}))).cookie===!0}catch{}if(n){const r=new URLSearchParams(window.location.search);r.delete("t");const i=r.toString(),a=window.location.pathname+(i?`?${i}`:"")+window.location.hash;window.history.replaceState(null,"",a)}else iP(t)}aP()}lP();