playthrough 0.1.0 → 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.
- package/INSTRUCTIONS.md +60 -64
- package/package.json +1 -1
- package/src/{read-BBNVC-oH.js → flows-Dt7fcPLt.js} +647 -1098
- package/src/playthrough.js +246 -122
- package/src/playwright.config.js +6 -10
- package/src/read-Bg9XVTtn.js +278 -0
- package/src/reporter-4C_7joIm.js +919 -0
- package/src/reporter.js +1 -1
- package/src/test.js +121 -16
- package/types/cli/src/app.d.ts +4 -0
- package/types/cli/src/changes.d.ts +1 -0
- package/types/cli/src/compare.d.ts +7 -2
- package/types/cli/src/flows.d.ts +8 -4
- package/types/cli/src/pictures.d.ts +1 -0
- package/types/cli/src/read.d.ts +3 -1
- package/types/cli/src/repo.d.ts +4 -0
- package/types/cli/src/reporter.d.ts +15 -5
- package/types/cli/src/setup.d.ts +5 -2
- package/types/cli/src/test.d.ts +1 -1
- package/types/cli/src/try-setup.d.ts +2 -0
- package/types/page/src/reading.d.ts +11 -0
- package/types/review/src/rules.d.ts +2 -1
- package/types/review/src/store.d.ts +3 -0
- package/viewer/assets/index-Bbi9sjtm.js +193 -0
- package/viewer/assets/index-gTfnUrcK.css +2 -0
- package/viewer/index.html +2 -2
- package/src/reporter-Biym3TnN.js +0 -197
- package/viewer/assets/index-BriVL50M.js +0 -193
- package/viewer/assets/index-DaS2F2-s.css +0 -2
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var t=e((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),n=e(((e,n)=>{n.exports=t()})),r=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`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`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ee(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ee(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),ee(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=ee(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=ee(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ee(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function te(e,t,n){if(e==null)return e;var r=[],i=0;return ee(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ne(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var re=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function ie(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,re)}catch(e){re(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ae(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else ie(ae.bind(null,e))}var oe={map:te,forEach:function(e,t,n){te(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return te(e,function(){t++}),t},toArray:function(e){return te(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=oe,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=ae,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ne}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ie,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),i=e(((e,t)=>{t.exports=r()})),a=e((e=>{var t=i();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;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.`}function r(){}var a={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for(`react.portal`),s=Symbol.for(`react.recoverable`),c=Symbol.for(`react.optimistic_key`);function l(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:r===c?c:``+r,children:e,containerInfo:t,implementation:n}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.browser=function(e){return{$$typeof:s,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return l(e,t,null,r)},e.flushSync=function(e){var t=u.T,n=a.p;try{if(u.T=null,a.p=2,e)return e()}finally{u.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version=`19.3.1`})),o=e(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=a()})),s=e((e=>{var t=n(),r=i(),a=o();function s(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;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.`}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function u(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(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(s(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(s(188));return t===e?e:null}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 f(i),e;if(a===r)return f(i),t;a=a.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,c=i.child;c;){if(c===n){o=!0,n=i,r=a;break}if(c===r){o=!0,r=i,n=a;break}c=c.sibling}if(!o){for(c=a.child;c;){if(c===n){o=!0,n=a,r=i;break}if(c===r){o=!0,r=a,n=i;break}c=c.sibling}if(!o)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(n.tag!==3)throw Error(s(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}function h(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&h(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(s(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),k=Symbol.for(`react.transitional.element`),A=Symbol.for(`react.portal`),j=Symbol.for(`react.fragment`),M=Symbol.for(`react.strict_mode`),N=Symbol.for(`react.profiler`),ee=Symbol.for(`react.consumer`),te=Symbol.for(`react.context`),ne=Symbol.for(`react.forward_ref`),re=Symbol.for(`react.suspense`),ie=Symbol.for(`react.suspense_list`),ae=Symbol.for(`react.memo`),oe=Symbol.for(`react.lazy`),se=Symbol.for(`react.activity`),ce=Symbol.for(`react.legacy_hidden`),le=Symbol.for(`react.memo_cache_sentinel`),ue=Symbol.for(`react.view_transition`),de=Symbol.for(`react.recoverable`),fe=Symbol.iterator;function pe(e){return typeof e!=`object`||!e?null:(e=fe&&e[fe]||e[`@@iterator`],typeof e==`function`?e:null)}var me=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===me?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case j:return`Fragment`;case N:return`Profiler`;case M:return`StrictMode`;case re:return`Suspense`;case ie:return`SuspenseList`;case se:return`Activity`;case ue:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case A:return`Portal`;case te:return e.displayName||`Context`;case ee:return(e._context.displayName||`Context`)+`.Consumer`;case ne:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ae:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case oe:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var he=Array.isArray,F=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L={pending:!1,data:null,method:null,action:null},R=[],ge=-1;function z(e){return{current:e}}function B(e){0>ge||(e.current=R[ge],R[ge]=null,ge--)}function V(e,t){ge++,R[ge]=e.current,e.current=t}var _e=z(null),ve=z(null),ye=z(null),be=z(null);function xe(e,t){switch(V(ye,t),V(ve,e),V(_e,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?pp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=pp(t),e=mp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}B(_e),V(_e,e)}function Se(){B(_e),B(ve),B(ye)}function Ce(e){var t=e.memoizedState;t!==null&&(uh._currentValue=t.memoizedState,V(be,e)),t=_e.current;var n=mp(t,e.type);t!==n&&(V(ve,e),V(_e,n))}function we(e){ve.current===e&&(B(_e),B(ve)),be.current===e&&(B(be),uh._currentValue=L)}var Te,Ee;function De(e){if(Te===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Te=t&&t[1]||``,Ee=-1<e.stack.indexOf(`
|
|
2
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
+
`+Te+e+Ee}var Oe=!1;function ke(e,t){if(!e||Oe)return``;Oe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
4
|
+
`),l=s.split(`
|
|
5
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
6
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Oe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?De(n):``}function Ae(e,t){switch(e.tag){case 26:case 27:case 5:return De(e.type);case 16:return De(`Lazy`);case 13:return e.child!==t&&t!==null?De(`Suspense Fallback`):De(`Suspense`);case 19:return De(`SuspenseList`);case 0:case 15:return ke(e.type,!1);case 11:return ke(e.type.render,!1);case 1:return ke(e.type,!0);case 31:return De(`Activity`);case 30:return De(`ViewTransition`);default:return``}}function je(e){try{var t=``,n=null;do t+=Ae(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}}var Me=Object.prototype.hasOwnProperty,Ne=t.unstable_scheduleCallback,Pe=t.unstable_cancelCallback,Fe=t.unstable_shouldYield,Ie=t.unstable_requestPaint,H=t.unstable_now,Le=t.unstable_getCurrentPriorityLevel,Re=t.unstable_ImmediatePriority,ze=t.unstable_UserBlockingPriority,Be=t.unstable_NormalPriority,Ve=t.unstable_LowPriority,He=t.unstable_IdlePriority,Ue=t.log,We=t.unstable_setDisableYieldValue,Ge=null,Ke=null;function qe(e){if(typeof Ue==`function`&&We(e),Ke&&typeof Ke.setStrictMode==`function`)try{Ke.setStrictMode(Ge,e)}catch{}}var Je=Math.clz32?Math.clz32:Ze,Ye=Math.log,Xe=Math.LN2;function Ze(e){return e>>>=0,e===0?32:31-(Ye(e)/Xe|0)|0}var Qe=256,$e=262144,et=4194304;function tt(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function nt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=tt(n))):i=tt(o):i=tt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=tt(n))):i=tt(o)):i=tt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function rt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function it(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Je(n),i=1<<r;t|=e[r],n&=~i}return t}function at(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ot(){var e=et;return et<<=1,!(et&62914560)&&(et=4194304),e}function st(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ct(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function lt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Je(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ut(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ut(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Je(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function dt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Je(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ft(e,t){var n=t&-t;return n=n&42?1:pt(n),(n&(e.suspendedLanes|t))===0?n:0}function pt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function mt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ht(){var e=I.p;return e===0?(e=window.event,e===void 0?32:Eh(e.type)):e}function gt(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var U=Math.random().toString(36).slice(2),_t=`__reactFiber$`+U,vt=`__reactProps$`+U,yt=`__reactContainer$`+U,bt=`__reactEvents$`+U,xt=`__reactListeners$`+U,St=`__reactHandles$`+U,Ct=`__reactResources$`+U,W=`__reactMarker$`+U,wt=`__reactLoad$`+U;function Tt(e){delete e[_t],delete e[vt],delete e[xt],delete e[St]}function Et(e){var t;if(t=e[_t])return t;for(var n=e.parentNode;n;){if(t=n[yt]||n[_t]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=hm(e);e!==null;){if(n=e[_t])return n;e=hm(e)}return t}e=n,n=e.parentNode}return null}function Dt(e){if(e=e[_t]||e[yt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ot(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function kt(e){var t=e[Ct];return t||=e[Ct]={hoistableStyles:new Map,hoistableScripts:new Map},t}function At(e){e[W]=!0}function jt(e){e[wt]=void 0}var Mt=new Set,Nt={};function Pt(e,t){Ft(e,t),Ft(e+`Capture`,t)}function Ft(e,t){for(Nt[e]=t,e=0;e<t.length;e++)Mt.add(t[e])}var It=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Lt={},Rt={};function zt(e){return Me.call(Rt,e)?!0:Me.call(Lt,e)?!1:It.test(e)?Rt[e]=!0:(Lt[e]=!0,!1)}var Bt=!1;function Vt(){var e=Bt;return Bt=!1,e}function Ht(e,t,n){if(zt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Ut(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function Wt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Gt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Kt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function qt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Jt(e){if(!e._valueTracker){var t=Kt(e)?`checked`:`value`;e._valueTracker=qt(e,t,``+e[t])}}function Yt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Kt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var Xt=/[\n"\\]/g;function Zt(e){return e.replace(Xt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Qt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Gt(t)):e.value!==``+Gt(t)&&(e.value=``+Gt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):en(e,Gt(n)):o===`number`&&e.value==t?en(e,Gt(e.value)):en(e,Gt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Gt(s):e.removeAttribute(`name`)}function $t(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Jt(e);return}n=n==null?``:``+Gt(n),t=t==null?n:``+Gt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Jt(e)}function en(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function tn(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=``+Gt(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 nn(e,t,n){t!=null&&(t=``+Gt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Gt(n)}function rn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(s(92));if(he(r)){if(1<r.length)throw Error(s(93));r=r[0]}n=r}n??=``,t=n}n=Gt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Jt(e)}function an(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var on=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function sn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||on.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function cn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(s(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,Bt=!0);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&(sn(e,i,r),Bt=!0)}else for(var a in t)t.hasOwnProperty(a)&&sn(e,a,t[a])}function ln(e){if(e.indexOf(`-`)===-1)return!1;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 un=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),dn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function fn(e){return dn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function pn(){}var mn=null;function hn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gn=null,_n=null;function vn(e){var t=Dt(e);if(t&&(e=t.stateNode)){var n=e[vt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Qt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Zt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[vt]||null;if(!i)throw Error(s(90));Qt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Yt(r)}break a;case`textarea`:nn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&tn(e,!!n.multiple,t,!1)}}}var yn=!1;function bn(e,t,n){if(yn)return e(t,n);yn=!0;try{return e(t)}finally{if(yn=!1,(gn!==null||_n!==null)&&(Vd(),gn&&(t=gn,e=_n,_n=gn=null,vn(t),e)))for(t=0;t<e.length;t++)vn(e[t])}}function xn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[vt]||null;if(r===null)return null;n=r[t];a: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 a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(s(231,t,typeof n));return n}var Sn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Cn=!1;if(Sn)try{var wn={};Object.defineProperty(wn,"passive",{get:function(){Cn=!0}}),window.addEventListener(`test`,wn,wn),window.removeEventListener(`test`,wn,wn)}catch{Cn=!1}var Tn=null,En=null,Dn=null;function On(){if(Dn)return Dn;var e,t=En,n=t.length,r,i=`value`in Tn?Tn.value:Tn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Dn=i.slice(e,1<r?1-r:void 0)}function kn(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 An(){return!0}function jn(){return!1}function Mn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?An:jn,this.isPropagationStopped=jn,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=An)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=An)},persist:function(){},isPersistent:An}),t}var Nn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pn=Mn(Nn),Fn=D({},Nn,{view:0,detail:0}),In=Mn(Fn),Ln,Rn,zn,Bn=D({},Fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zn,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!==zn&&(zn&&e.type===`mousemove`?(Ln=e.screenX-zn.screenX,Rn=e.screenY-zn.screenY):Rn=Ln=0,zn=e),Ln)},movementY:function(e){return`movementY`in e?e.movementY:Rn}}),Vn=Mn(Bn),Hn=Mn(D({},Bn,{dataTransfer:0})),Un=Mn(D({},Fn,{relatedTarget:0})),Wn=Mn(D({},Nn,{animationName:0,elapsedTime:0,pseudoElement:0})),Gn=Mn(D({},Nn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Kn=Mn(D({},Nn,{data:0})),qn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Jn={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`},Yn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yn[e])?!!t[e]:!1}function Zn(){return Xn}var Qn=Mn(D({},Fn,{key:function(e){if(e.key){var t=qn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=kn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Jn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zn,charCode:function(e){return e.type===`keypress`?kn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?kn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),$n=Mn(D({},Bn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),er=Mn(D({},Nn,{submitter:0})),tr=Mn(D({},Fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zn})),nr=Mn(D({},Nn,{propertyName:0,elapsedTime:0,pseudoElement:0})),rr=Mn(D({},Bn,{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})),ir=Mn(D({},Nn,{newState:0,oldState:0,source:0})),ar=[9,13,27,32],or=Sn&&`CompositionEvent`in window,sr=null;Sn&&`documentMode`in document&&(sr=document.documentMode);var cr=Sn&&`TextEvent`in window&&!sr,lr=Sn&&(!or||sr&&8<sr&&11>=sr),ur=` `,dr=!1;function fr(e,t){switch(e){case`keyup`:return ar.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function pr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var G=!1;function mr(e,t){switch(e){case`compositionend`:return pr(t);case`keypress`:return t.which===32?(dr=!0,ur):null;case`textInput`:return e=t.data,e===ur&&dr?null:e;default:return null}}function hr(e,t){if(G)return e===`compositionend`||!or&&fr(e,t)?(e=On(),Dn=En=Tn=null,G=!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 lr&&t.locale!==`ko`?null:t.data;default:return null}}var gr={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 _r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!gr[e.type]:t===`textarea`}function vr(e,t,n,r){gn?_n?_n.push(r):_n=[r]:gn=r,t=Xf(t,`onChange`),0<t.length&&(n=new Pn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var yr=null,br=null;function xr(e){Hf(e,0)}function Sr(e){if(Yt(Ot(e)))return e}function Cr(e,t){if(e===`change`)return t}var wr=!1;if(Sn){var Tr;if(Sn){var Er=`oninput`in document;if(!Er){var Dr=document.createElement(`div`);Dr.setAttribute(`oninput`,`return;`),Er=typeof Dr.oninput==`function`}Tr=Er}else Tr=!1;wr=Tr&&(!document.documentMode||9<document.documentMode)}function Or(){yr&&(yr.detachEvent(`onpropertychange`,kr),br=yr=null)}function kr(e){if(e.propertyName===`value`&&Sr(br)){var t=[];vr(t,br,e,hn(e)),bn(xr,t)}}function Ar(e,t,n){e===`focusin`?(Or(),yr=t,br=n,yr.attachEvent(`onpropertychange`,kr)):e===`focusout`&&Or()}function jr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Sr(br)}function Mr(e,t){if(e===`click`)return Sr(t)}function Nr(e,t){if(e===`input`||e===`change`)return Sr(t)}function Pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Fr=typeof Object.is==`function`?Object.is:Pr;function Ir(e,t){if(Fr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)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(!Me.call(t,i)||!Fr(e[i],t[i]))return!1}return!0}function Lr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Rr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zr(e,t){var n=Rr(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}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Rr(n)}}function Br(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Br(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Lr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lr(e.document)}return t}function Hr(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`)}var Ur=Sn&&`documentMode`in document&&11>=document.documentMode,Wr=null,Gr=null,Kr=null,qr=!1;function Jr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qr||Wr==null||Wr!==Lr(r)||(r=Wr,`selectionStart`in r&&Hr(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}),Kr&&Ir(Kr,r)||(Kr=r,r=Xf(Gr,`onSelect`),0<r.length&&(t=new Pn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Wr)))}function Yr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Xr={animationend:Yr(`Animation`,`AnimationEnd`),animationiteration:Yr(`Animation`,`AnimationIteration`),animationstart:Yr(`Animation`,`AnimationStart`),transitionrun:Yr(`Transition`,`TransitionRun`),transitionstart:Yr(`Transition`,`TransitionStart`),transitioncancel:Yr(`Transition`,`TransitionCancel`),transitionend:Yr(`Transition`,`TransitionEnd`)},Zr={},Qr={};Sn&&(Qr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Xr.animationend.animation,delete Xr.animationiteration.animation,delete Xr.animationstart.animation),`TransitionEvent`in window||delete Xr.transitionend.transition);function $r(e){if(Zr[e])return Zr[e];if(!Xr[e])return e;var t=Xr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Qr)return Zr[e]=t[n];return e}var ei=$r(`animationend`),ti=$r(`animationiteration`),ni=$r(`animationstart`),ri=$r(`transitionrun`),ii=$r(`transitionstart`),ai=$r(`transitioncancel`),oi=$r(`transitionend`),si=new Map,ci=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(` `);ci.push(`scrollEnd`);function li(e,t){si.set(e,t),Pt(t,[e])}var ui=0;function di(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Sd.identifierPrefix;var n=ui++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function fi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Ad;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function pi(e,t){return e=fi(e),t=fi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var mi=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},hi=[],gi=0,_i=0;function vi(){for(var e=gi,t=_i=gi=0;t<e;){var n=hi[t];hi[t++]=null;var r=hi[t];hi[t++]=null;var i=hi[t];hi[t++]=null;var a=hi[t];if(hi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Si(n,i,a)}}function yi(e,t,n,r){hi[gi++]=e,hi[gi++]=t,hi[gi++]=n,hi[gi++]=r,_i|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function bi(e,t,n,r){return yi(e,t,n,r),Ci(e)}function xi(e,t){return yi(e,null,null,t),Ci(e)}function Si(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Je(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Ci(e){if(50<jd)throw jd=0,Md=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var wi={};function Ti(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.refCleanup=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 Ei(e,t,n,r){return new Ti(e,t,n,r)}function Di(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Oi(e,t){var n=e.alternate;return n===null?(n=Ei(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&1206910976,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.refCleanup=e.refCleanup,n}function ki(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ai(e,t,n,r,i,a){var o=0;if(r=e,typeof r==`function`)Di(r)&&(o=1);else if(typeof r==`string`)o=Xm(e,n,_e.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case se:return e=Ei(31,n,t,i),e.elementType=se,e.lanes=a,e;case j:return ji(n.children,i,a,t);case M:o=8,i|=24;break;case N:return e=Ei(12,n,t,i|2),e.elementType=N,e.lanes=a,e;case re:return e=Ei(13,n,t,i),e.elementType=re,e.lanes=a,e;case ie:return e=Ei(19,n,t,i),e.elementType=ie,e.lanes=a,e;case ce:case ue:return e=i|32,e=Ei(30,n,t,e),e.elementType=ue,e.lanes=a,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case te:o=10;break a;case ee:o=9;break a;case ne:o=11;break a;case ae:o=14;break a;case oe:o=16,r=null;break a}o=29,n=Error(s(130,e===null?`null`:typeof e,``)),r=null}return t=Ei(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function ji(e,t,n,r){return e=Ei(7,e,r,t),e.lanes=n,e}function Mi(e,t,n){return e=Ei(6,e,null,t),e.lanes=n,e}function Ni(e){var t=Ei(18,null,null,0);return t.stateNode=e,t}function Pi(e,t,n){return t=Ei(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Fi=new WeakMap;function Ii(e,t){if(typeof e==`object`&&e){var n=Fi.get(e);return n===void 0?(t={value:e,source:t,stack:je(t)},Fi.set(e,t),t):n}return{value:e,source:t,stack:je(t)}}var Li=[],Ri=0,zi=null,Bi=0,Vi=[],Hi=0,Ui=null,Wi=1,Gi=``;function Ki(e,t){Li[Ri++]=Bi,Li[Ri++]=zi,zi=e,Bi=t}function qi(e,t,n){Vi[Hi++]=Wi,Vi[Hi++]=Gi,Vi[Hi++]=Ui,Ui=e;var r=Wi;e=Gi;var i=32-Je(r)-1;r&=~(1<<i),n+=1;var a=32-Je(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Wi=1<<32-Je(t)+i|n<<i|r,Gi=a+e}else Wi=1<<a|n<<i|r,Gi=e}function Ji(e){e.return!==null&&(Ki(e,1),qi(e,1,0))}function Yi(e){for(;e===zi;)zi=Li[--Ri],Li[Ri]=null,Bi=Li[--Ri],Li[Ri]=null;for(;e===Ui;)Ui=Vi[--Hi],Vi[Hi]=null,Gi=Vi[--Hi],Vi[Hi]=null,Wi=Vi[--Hi],Vi[Hi]=null}function Xi(e,t){Vi[Hi++]=Wi,Vi[Hi++]=Gi,Vi[Hi++]=Ui,Wi=t.id,Gi=t.overflow,Ui=e}var Zi=null,Qi=null,K=!1,$i=null,ea=!1,ta=Error(s(519));function na(e){throw ca(Ii(Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ta}function ra(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[_t]=e,t[vt]=r,n){case`dialog`:Uf(`cancel`,t),Uf(`close`,t);break;case`iframe`:case`object`:case`embed`:Uf(`load`,t);break;case`video`:case`audio`:for(n=0;n<Bf.length;n++)Uf(Bf[n],t);break;case`source`:Uf(`error`,t);break;case`img`:case`image`:case`link`:Uf(`error`,t),Uf(`load`,t);break;case`details`:Uf(`toggle`,t);break;case`input`:Uf(`invalid`,t),$t(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Uf(`invalid`,t);break;case`textarea`:Uf(`invalid`,t),rn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||np(t.textContent,n)?(r.popover!=null&&(Uf(`beforetoggle`,t),Uf(`toggle`,t)),r.onScroll!=null&&Uf(`scroll`,t),r.onScrollEnd!=null&&Uf(`scrollend`,t),r.onClick!=null&&(t.onclick=pn),t=!0):t=!1,t||na(e,!0)}function ia(e){for(Zi=e.return;Zi;)switch(Zi.tag){case 5:case 31:case 13:ea=!1;return;case 27:case 3:ea=!0;return;default:Zi=Zi.return}}function aa(e){if(e!==Zi)return!1;if(!K)return ia(e),K=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||gp(e.type,e.memoizedProps)),n=!n),n&&Qi&&na(e),ia(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(317));Qi=mm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(317));Qi=mm(e)}else t===27?(t=Qi,Tp(e.type)?(e=pm,pm=null,Qi=e):Qi=t):Qi=Zi?fm(e.stateNode.nextSibling):null;return!0}function oa(){Qi=Zi=null,K=!1}function sa(){var e=$i;return e!==null&&(md===null?md=e:md.push.apply(md,e),$i=null),e}function ca(e){$i===null?$i=[e]:$i.push(e)}var la=z(null),ua=null,da=null;function fa(e,t,n){V(la,t._currentValue),t._currentValue=n}function pa(e){e._currentValue=la.current,B(la)}function ma(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ha(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var o=i.child;a=a.firstContext;a:for(;a!==null;){var c=a;a=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),ma(a.return,n,e),r||(o=null);break a}a=c.next}}else if(i.tag===18){if(o=i.return,o===null)throw Error(s(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),ma(o,n,e),o=null}else i.tag===13&&i.memoizedState!==null&&i.memoizedState.dehydrated===null?(i.lanes|=n,o=i.alternate,o!==null&&(o.lanes|=n),ma(i.return,n,e),o=i.child,o=o===null?null:o.sibling):o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}}function ga(e,t,n,r){e=null;for(var i=t,a=!1;i!==null;){if(!a){if(i.flags&524288)a=!0;else if(i.flags&262144)break}if(i.tag===10){var o=i.alternate;if(o===null)throw Error(s(387));if(o=o.memoizedProps,o!==null){var c=i.type;Fr(i.pendingProps.value,o.value)||(e===null?e=[c]:e.push(c))}}else if(i===be.current){if(o=i.alternate,o===null)throw Error(s(387));o.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[uh]:e.push(uh))}i=i.return}return e!==null&&ha(t,e,n,r),t.flags|=262144,e!==null}function _a(e){for(e=e.firstContext;e!==null;){if(!Fr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function va(e){ua=e,da=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ya(e){return xa(ua,e)}function ba(e,t){return ua===null&&va(e),xa(e,t)}function xa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},da===null){if(e===null)throw Error(s(308));da=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else da=da.next=t;return n}var Sa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Ca=t.unstable_scheduleCallback,wa=t.unstable_NormalPriority,Ta={$$typeof:te,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ea(){return{controller:new Sa,data:new Map,refCount:0}}function Da(e){e.refCount--,e.refCount===0&&Ca(wa,function(){e.controller.abort()})}function Oa(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var ka=null;function Aa(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var ja=null,Ma=0,Na=0,Pa=null;function Fa(e,t){if(ja===null){var n=ja=[];Ma=0,Na=Ff(),Pa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ma++,t.then(Ia,Ia),t}function Ia(){if(--Ma===0&&(ka=null,ja!==null)){Pa!==null&&(Pa.status=`fulfilled`);var e=ja;ja=null,Na=0,Pa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function La(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ra=F.S;F.S=function(e,t){if(_d=H(),typeof t==`object`&&t&&typeof t.then==`function`&&Fa(e,t),ka!==null)for(var n=Y;n!==null;)Oa(n,ka),n=n.next;if(n=e.types,n!==null){for(var r=Y;r!==null;)Oa(r,n),r=r.next;if(Na!==0){r=ka,r===null&&(r=ka=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ra!==null&&Ra(e,t)};var za=z(null);function Ba(){var e=za.current;return e===null?Qu.pooledCache:e}function Va(e,t){t===null?V(za,za.current):V(za,t.pool)}function Ha(){var e=Ba();return e===null?null:{parent:Ta._currentValue,pool:e}}var Ua=Error(s(460)),Wa=Error(s(474)),Ga=Error(s(542)),Ka={then:function(){}};function qa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ja(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(pn,pn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Qa(e),e===void 0&&!(`reason`in t)?Error(s(600)):e;default:if(typeof t.status==`string`)t.then(pn,pn);else{if(e=Qu,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Qa(e),e}throw Xa=t,Ua}}function Ya(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Xa=e,Ua):e}}var Xa=null;function Za(){if(Xa===null)throw Error(s(459));var e=Xa;return Xa=null,e}function Qa(e){if(e===Ua||e===Ga)throw Error(s(483))}var $a=null,eo=0;function to(e){var t=eo;return eo+=1,$a===null&&($a=[]),Ja($a,e,t)}function no(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ro(e,t){throw t.$$typeof===O?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function io(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=Oi(e,t),e.index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function o(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Mi(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===j?(e=d(e,t,n.props.children,r,n.key),no(e,n),e):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===oe&&Ya(a)===t.type)?(t=i(t,n.props),no(t,n),t.return=e,t):(t=Ai(n.type,n.key,n.props,null,e.mode,r),no(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Pi(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=ji(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Mi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case k:return n=Ai(t.type,t.key,t.props,null,e.mode,n),no(n,t),n.return=e,n;case A:return t=Pi(t,e.mode,n),t.return=e,t;case oe:return t=Ya(t),f(e,t,n)}if(he(t)||pe(t))return t=ji(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,to(t),n);if(t.$$typeof===te)return f(e,ba(e,t),n);ro(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case k:return n.key===i?l(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null;case oe:return n=Ya(n),p(e,t,n,r)}if(he(n)||pe(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,to(n),r);if(n.$$typeof===te)return p(e,t,ba(e,n),r);ro(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case k:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case A:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case oe:return r=Ya(r),m(e,t,n,r,i)}if(he(r)||pe(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,to(r),i);if(r.$$typeof===te)return m(e,t,n,ba(t,r),i);ro(t,r)}return null}function h(i,o,s,c){for(var l=null,u=null,d=o,h=o=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),K&&Ki(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(o=a(d,o,h),u===null?l=d:u.sibling=d,u=d);return K&&Ki(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),o=a(g,o,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),K&&Ki(i,h),l}function g(i,o,c,l){if(c==null)throw Error(s(151));for(var u=null,d=null,h=o,g=o=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),o=a(y,o,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),K&&Ki(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return K&&Ki(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),K&&Ki(i,g),u}function _(e,r,a,c){if(typeof a==`object`&&a&&a.type===j&&a.key===null&&a.props.ref===void 0&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case k:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===j){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),no(c,a),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===oe&&Ya(l)===r.type){n(e,r.sibling),c=i(r,a.props),no(c,a),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}a.type===j?(c=ji(a.props.children,e.mode,c,a.key),no(c,a),c.return=e,e=c):(c=Ai(a.type,a.key,a.props,null,e.mode,c),no(c,a),c.return=e,e=c)}return o(e);case A:a:{for(l=a.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Pi(a,e.mode,c),c.return=e,e=c}return o(e);case oe:return a=Ya(a),_(e,r,a,c)}if(he(a))return h(e,r,a,c);if(pe(a)){if(l=pe(a),typeof l!=`function`)throw Error(s(150));return a=l.call(a),g(e,r,a,c)}if(typeof a.then==`function`)return _(e,r,to(a),c);if(a.$$typeof===te)return _(e,r,ba(e,a),c);ro(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=Mi(a,e.mode,c),c.return=e,e=c),o(e)):n(e,r)}return function(e,t,n,r){try{eo=0;var i=_(e,t,n,r);return $a=null,i}catch(t){if(t===Ua||t===Ga)throw t;var a=Ei(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var ao=io(!0),oo=io(!1),so=!1;function co(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function lo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function uo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function fo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Zu&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ci(e),Si(e,null,n),t}return yi(e,r,t,n),Ci(e)}function po(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dt(e,n)}}function mo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var ho=!1;function go(){if(ho){var e=Pa;if(e!==null)throw e}}function _o(e,t,n,r){ho=!1;var i=e.updateQueue;so=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(ed&f)===f:(r&f)===f){f!==0&&f===Na&&(ho=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:so=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;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(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),cd|=o,e.lanes=o,e.memoizedState=d}}function vo(e,t){if(typeof e!=`function`)throw Error(s(191,e));e.call(t)}function yo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)vo(n[e],t)}var bo=z(null),xo=z(0);function So(e,t){e=od,V(xo,e),V(bo,t),od=e|t.baseLanes}function Co(){V(xo,od),V(bo,bo.current)}function wo(){od=xo.current,B(bo),B(xo)}var To=z(null),Eo=null;function Do(e){var t=e.alternate;V(Mo,Mo.current&1),V(To,e),Eo===null&&(t===null||bo.current!==null||t.memoizedState!==null)&&(Eo=e)}function Oo(e){V(Mo,Mo.current),V(To,e),Eo===null&&(Eo=e)}function ko(e){e.tag===22?(V(Mo,Mo.current),V(To,e),Eo===null&&(Eo=e)):Ao()}function Ao(){V(Mo,Mo.current),V(To,To.current)}function jo(e){B(To),Eo===e&&(Eo=null),B(Mo)}var Mo=z(0);function No(e,t){V(To,To.current),V(Mo,t)}function Po(e){B(Mo),B(To),Eo===e&&(Eo=null)}function Fo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||lm(n)||um(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){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 Io=0,q=null,Lo=null,Ro=null,zo=!1,Bo=!1,Vo=!1,Ho=0,Uo=0,Wo=null,Go=0;function Ko(){throw Error(s(321))}function qo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fr(e[n],t[n]))return!1;return!0}function Jo(e,t,n,r,i,a){return Io=a,q=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?dc:fc,Vo=!1,a=n(r,i),Vo=!1,Bo&&(a=Xo(t,n,r,i)),Yo(e),a}function Yo(e){F.H=uc;var t=Lo!==null&&Lo.next!==null;if(Io=0,Ro=Lo=q=null,zo=!1,Uo=0,Wo=null,t)throw Error(s(300));e===null||kc||(e=e.dependencies,e!==null&&_a(e)&&(kc=!0))}function Xo(e,t,n,r){q=e;var i=0;do{if(Bo&&(Wo=null),Uo=0,Bo=!1,25<=i)throw Error(s(301));if(i+=1,Ro=Lo=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}F.H=pc,a=t(n,r)}while(Bo);return a}function Zo(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?is(t):t,e=e.useState()[0],(Lo===null?null:Lo.memoizedState)!==e&&(q.flags|=1024),t}function Qo(){var e=Ho!==0;return Ho=0,e}function $o(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function es(e){if(zo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}zo=!1}Io=0,Ro=Lo=q=null,Bo=!1,Uo=Ho=0,Wo=null}function ts(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ro===null?q.memoizedState=Ro=e:Ro=Ro.next=e,Ro}function ns(){if(Lo===null){var e=q.alternate;e=e===null?null:e.memoizedState}else e=Lo.next;var t=Ro===null?q.memoizedState:Ro.next;if(t!==null)Ro=t,Lo=e;else{if(e===null)throw q.alternate===null?Error(s(467)):Error(s(310));Lo=e,e={memoizedState:Lo.memoizedState,baseState:Lo.baseState,baseQueue:Lo.baseQueue,queue:Lo.queue,next:null},Ro===null?q.memoizedState=Ro=e:Ro=Ro.next=e}return Ro}function rs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function is(e){var t=Uo;return Uo+=1,Wo===null&&(Wo=[]),e=Ja(Wo,e,t),t=q,(Ro===null?t.memoizedState:Ro.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?dc:fc),e}function as(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return is(e);if(e.$$typeof===de)return;if(e.$$typeof===te)return ya(e)}throw Error(s(438,String(e)))}function os(e){var t=null,n=q.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=q.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=rs(),q.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=le;return t.index++,n}function ss(e,t){return typeof t==`function`?t(e):t}function cs(e){return ls(ns(),Lo,e)}function ls(e,t,n){var r=e.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}t.baseQueue=i=a,r.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var c=o=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Io&f)===f:(ed&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Na&&(d=!0);else if((Io&p)===p){u=u.next,p===Na&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,o=a):l=l.next=f,q.lanes|=p,cd|=p;f=u.action,Vo&&n(a,f),a=u.hasEagerState?u.eagerState:n(a,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,o=a):l=l.next=p,q.lanes|=f,cd|=f;u=u.next}while(u!==null&&u!==t);if(l===null?o=a:l.next=c,!Fr(a,e.memoizedState)&&(kc=!0,d&&(n=Pa,n!==null)))throw n;e.memoizedState=a,e.baseState=o,e.baseQueue=l,r.lastRenderedState=a}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function us(e){var t=ns(),n=t.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);Fr(a,t.memoizedState)||(kc=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function ds(e,t,n){var r=q,i=ns(),a=K;if(a){if(n===void 0)throw Error(s(407));n=n()}else n=t();var o=!Fr((Lo||i).memoizedState,n);if(o&&(i.memoizedState=n,kc=!0),i=i.queue,Is(ms.bind(null,r,i,e),[e]),e=i.getSnapshot!==t||o||Ro!==null&&!!(Ro.memoizedState.tag&1),js(e?9:8,{destroy:void 0},ps.bind(null,r,i,n,t),null),e){if(r.flags|=2048,Qu===null)throw Error(s(349));a||Io&127||fs(r,t,n)}return n}function fs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=q.updateQueue,t===null?(t=rs(),q.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ps(e,t,n,r){t.value=n,t.getSnapshot=r,hs(t)&&gs(e)}function ms(e,t,n){return n(function(){hs(t)&&gs(e)})}function hs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Fr(e,n)}catch{return!0}}function gs(e){var t=xi(e,2);t!==null&&Id(t,e,2)}function _s(e){var t=ts();if(typeof e==`function`){var n=e;if(e=n(),Vo){qe(!0);try{n()}finally{qe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:e},t}function vs(e,t,n,r){return e.baseState=n,ls(e,Lo,typeof r==`function`?r:ss)}function ys(e,t,n,r,i){if(sc(e))throw Error(s(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};F.T===null?a.isTransition=!1:n(!0),r(a),n=t.pending,n===null?(a.next=t.pending=a,bs(t,a)):(a.next=n.next,t.pending=n.next=a)}}function bs(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=F.T,o={};o.types=a===null?null:a.types,F.T=o;try{var s=n(i,r),c=F.S;c!==null&&c(o,s),xs(e,t,s)}catch(n){Cs(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),xs(e,t,a)}catch(n){Cs(e,t,n)}}function xs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ss(e,t,n)},function(n){return Cs(e,t,n)}):Ss(e,t,n)}function Ss(e,t,n){t.status=`fulfilled`,t.value=n,ws(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,bs(e,n)))}function Cs(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ws(t),t=t.next;while(t!==r)}e.action=null}function ws(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ts(e,t){return t}function Es(e,t){if(K){var n=Qu.formState;if(n!==null){a:{var r=q;if(K){if(Qi){b:{for(var i=Qi,a=ea;i.nodeType!==8;)if(!a||(i=fm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Qi=fm(i.nextSibling),r=i.data===`F!`;break a}}na(r)}r=!1}r&&(t=n[0])}}return n=ts(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ts,lastRenderedState:t},n.queue=r,n=ic.bind(null,q,r),r.dispatch=n,r=_s(!1),a=oc.bind(null,q,!1,r.queue),r=ts(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=ys.bind(null,q,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ds(e){return Os(ns(),Lo,e)}function Os(e,t,n){if(t=ls(e,t,Ts)[0],e=cs(ss)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=is(t)}catch(e){throw e===Ua?Ga:e}else r=t;t=ns();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(q.flags|=2048,js(9,{destroy:void 0},ks.bind(null,i,n),null)),[r,a,e]}function ks(e,t){e.action=t}function As(e){var t=ns(),n=Lo;if(n!==null)return Os(t,n,e);ns(),t=t.memoizedState,n=ns();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function js(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=q.updateQueue,t===null&&(t=rs(),q.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ms(){return ns().memoizedState}function Ns(e,t,n,r){var i=ts();q.flags|=e,i.memoizedState=js(1|t,{destroy:void 0},n,r===void 0?null:r)}function Ps(e,t,n,r){var i=ns();r=r===void 0?null:r;var a=i.memoizedState.inst;Lo!==null&&r!==null&&qo(r,Lo.memoizedState.deps)?i.memoizedState=js(t,a,n,r):(q.flags|=e,i.memoizedState=js(1|t,a,n,r))}function Fs(e,t){Ns(8390656,8,e,t)}function Is(e,t){Ps(2048,8,e,t)}function Ls(e){q.flags|=4;var t=q.updateQueue;if(t===null)t=rs(),q.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Rs(e){var t=ns().memoizedState;return Ls({ref:t,nextImpl:e}),function(){if(Zu&2)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function zs(e,t){return Ps(4,2,e,t)}function Bs(e,t){return Ps(4,4,e,t)}function Vs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Hs(e,t,n){n=n==null?null:n.concat([e]),Ps(4,4,Vs.bind(null,t,e),n)}function Us(){}function Ws(e,t){var n=ns();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&qo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Gs(e,t){var n=ns();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&qo(t,r[1]))return r[0];if(r=e(),Vo){qe(!0);try{e()}finally{qe(!1)}}return n.memoizedState=[r,t],r}function Ks(e,t,n){return n===void 0||Io&1073741824&&!(ed&261930)?e.memoizedState=t:(e.memoizedState=n,e=Pd(),q.lanes|=e,cd|=e,n)}function qs(e,t,n,r){return Fr(n,t)?n:bo.current===null?!(Io&106)||Io&1073741824&&!(ed&261930)?(kc=!0,e.memoizedState=n):(e=Pd(),q.lanes|=e,cd|=e,t):(e=Ks(e,n,r),Fr(e,t)||(kc=!0),e)}function Js(e,t,n,r,i){var a=I.p;I.p=a!==0&&8>a?a:8;var o=F.T,s={};s.types=o===null?null:o.types,F.T=s,oc(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?ac(e,t,La(c,r),Nd(e)):ac(e,t,r,Nd(e))}catch(n){ac(e,t,{then:function(){},status:`rejected`,reason:n},Nd())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function Ys(){}function Xs(e,t,n,r){if(e.tag!==5)throw Error(s(476));var i=Zs(e).queue;Js(e,i,t,L,n===null?Ys:function(){return Qs(e),n(r)})}function Zs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:L,baseState:L,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:L},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Qs(e){var t=Zs(e);t.next===null&&(t=e.alternate.memoizedState),ac(e,t.next.queue,{},Nd())}function $s(){return ya(uh)}function ec(){return ns().memoizedState}function tc(){return ns().memoizedState}function nc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Nd();e=uo(n);var r=fo(t,e,n);r!==null&&(Id(r,t,n),po(r,t,n)),t={cache:Ea()},e.payload=t;return}t=t.return}}function rc(e,t,n){var r=Nd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},sc(e)?cc(t,n):(n=bi(e,t,n,r),n!==null&&(Id(n,e,r),lc(n,t,r)))}function ic(e,t,n){ac(e,t,n,Nd())}function ac(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(sc(e))cc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Fr(s,o))return yi(e,t,i,0),Qu===null&&vi(),!1}catch{}if(n=bi(e,t,i,r),n!==null)return Id(n,e,r),lc(n,t,r),!0}return!1}function oc(e,t,n,r){if(r={lane:2,revertLane:Ff(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},sc(e)){if(t)throw Error(s(479))}else t=bi(e,n,r,2),t!==null&&Id(t,e,2)}function sc(e){var t=e.alternate;return e===q||t!==null&&t===q}function cc(e,t){Bo=zo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function lc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dt(e,n)}}var uc={readContext:ya,use:as,useCallback:Ko,useContext:Ko,useEffect:Ko,useImperativeHandle:Ko,useLayoutEffect:Ko,useInsertionEffect:Ko,useMemo:Ko,useReducer:Ko,useRef:Ko,useState:Ko,useDebugValue:Ko,useDeferredValue:Ko,useTransition:Ko,useSyncExternalStore:Ko,useId:Ko,useHostTransitionStatus:Ko,useFormState:Ko,useActionState:Ko,useOptimistic:Ko,useMemoCache:Ko,useCacheRefresh:Ko,useEffectEvent:Ko},dc={readContext:ya,use:as,useCallback:function(e,t){return ts().memoizedState=[e,t===void 0?null:t],e},useContext:ya,useEffect:Fs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ns(4194308,4,Vs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ns(4194308,4,e,t)},useInsertionEffect:function(e,t){Ns(4,2,e,t)},useMemo:function(e,t){var n=ts();t=t===void 0?null:t;var r=e();if(Vo){qe(!0);try{e()}finally{qe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ts();if(n!==void 0){var i=n(t);if(Vo){qe(!0);try{n(t)}finally{qe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=rc.bind(null,q,e),[r.memoizedState,e]},useRef:function(e){var t=ts();return e={current:e},t.memoizedState=e},useState:function(e){e=_s(e);var t=e.queue,n=ic.bind(null,q,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Us,useDeferredValue:function(e,t){return Ks(ts(),e,t)},useTransition:function(){var e=_s(!1);return e=Js.bind(null,q,e.queue,!0,!1),ts().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=q,i=ts();if(K){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),Qu===null)throw Error(s(349));ed&127||fs(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Fs(ms.bind(null,r,a,e),[e]),r.flags|=2048,js(9,{destroy:void 0},ps.bind(null,r,a,n,t),null),n},useId:function(){var e=ts(),t=Qu.identifierPrefix;if(K){var n=Gi,r=Wi;n=(r&~(1<<32-Je(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Ho++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Go++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:$s,useFormState:Es,useActionState:Es,useOptimistic:function(e){var t=ts();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=oc.bind(null,q,!0,n),n.dispatch=t,[e,t]},useMemoCache:os,useCacheRefresh:function(){return ts().memoizedState=nc.bind(null,q)},useEffectEvent:function(e){var t=ts(),n={impl:e};return t.memoizedState=n,function(){if(Zu&2)throw Error(s(440));return n.impl.apply(void 0,arguments)}}},fc={readContext:ya,use:as,useCallback:Ws,useContext:ya,useEffect:Is,useImperativeHandle:Hs,useInsertionEffect:zs,useLayoutEffect:Bs,useMemo:Gs,useReducer:cs,useRef:Ms,useState:function(){return cs(ss)},useDebugValue:Us,useDeferredValue:function(e,t){return qs(ns(),Lo.memoizedState,e,t)},useTransition:function(){var e=cs(ss)[0],t=ns().memoizedState;return[typeof e==`boolean`?e:is(e),t]},useSyncExternalStore:ds,useId:ec,useHostTransitionStatus:$s,useFormState:Ds,useActionState:Ds,useOptimistic:function(e,t){return vs(ns(),Lo,e,t)},useMemoCache:os,useCacheRefresh:tc,useEffectEvent:Rs},pc={readContext:ya,use:as,useCallback:Ws,useContext:ya,useEffect:Is,useImperativeHandle:Hs,useInsertionEffect:zs,useLayoutEffect:Bs,useMemo:Gs,useReducer:us,useRef:Ms,useState:function(){return us(ss)},useDebugValue:Us,useDeferredValue:function(e,t){var n=ns();return Lo===null?Ks(n,e,t):qs(n,Lo.memoizedState,e,t)},useTransition:function(){var e=us(ss)[0],t=ns().memoizedState;return[typeof e==`boolean`?e:is(e),t]},useSyncExternalStore:ds,useId:ec,useHostTransitionStatus:$s,useFormState:As,useActionState:As,useOptimistic:function(e,t){var n=ns();return Lo===null?(n.baseState=e,[e,n.queue.dispatch]):vs(n,Lo,e,t)},useMemoCache:os,useCacheRefresh:tc,useEffectEvent:Rs};function mc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var hc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Nd(),i=uo(r);i.payload=t,n!=null&&(i.callback=n),t=fo(e,i,r),t!==null&&(Id(t,e,r),po(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Nd(),i=uo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=fo(e,i,r),t!==null&&(Id(t,e,r),po(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Nd(),r=uo(n);r.tag=2,t!=null&&(r.callback=t),t=fo(e,r,n),t!==null&&(Id(t,e,n),po(t,e,n))}};function gc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ir(n,r)||!Ir(i,a):!0}function _c(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&&hc.enqueueReplaceState(t,t.state,null)}function vc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function yc(e){mi(e)}function bc(e){console.error(e)}function xc(e){mi(e)}function Sc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Cc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function wc(e,t,n){return n=uo(n),n.tag=3,n.payload={element:null},n.callback=function(){Sc(e,t)},n}function Tc(e){return e=uo(e),e.tag=3,e}function Ec(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Cc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Cc(t,n,r),typeof i!=`function`&&(bd===null?bd=new Set([this]):bd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Dc(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ga(t,n,i,!0),n=To.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Eo===null?Jd():n.alternate===null&&sd===0&&(sd=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Ka?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),_f(e,r,i)),!1;case 22:return n.flags|=65536,r===Ka?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),_f(e,r,i)),!1}throw Error(s(435,n.tag))}return _f(e,r,i),Jd(),!1}if(K)return t=To.current,t===null?(r!==ta&&(t=Error(s(423),{cause:r}),ca(Ii(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=Ii(r,n),i=wc(e.stateNode,r,i),mo(e,i),sd!==4&&(sd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==ta&&(e=Error(s(422),{cause:r}),ca(Ii(e,n)))),!1;var a=Error(s(520),{cause:r});if(a=Ii(a,n),pd===null?pd=[a]:pd.push(a),sd!==4&&(sd=2),t===null)return!0;r=Ii(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=wc(n.stateNode,r,e),mo(n,e),!1;case 1:if(t=n.type,a=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||a!==null&&typeof a.componentDidCatch==`function`&&(bd===null||!bd.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Tc(i),Ec(i,e,n,r),mo(n,i),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Oc=Error(s(461)),kc=!1;function Ac(e,t,n,r){t.child=e===null?oo(t,null,n,r):ao(t,e.child,n,r)}function jc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return va(t),r=Jo(e,t,n,o,a,i),s=Qo(),e!==null&&!kc?($o(e,t,i),al(e,t,i)):(K&&s&&Ji(t),t.flags|=1,Ac(e,t,r,i),t.child)}function Mc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Di(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Nc(e,t,a,r,i)):(e=Ai(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ol(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ir:n,n(o,r)&&e.ref===t.ref)return al(e,t,i)}return t.flags|=1,e=Oi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Nc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ir(a,r)&&e.ref===t.ref){if(kc=!1,t.pendingProps=r=a,ol(e,i))e.flags&131072&&(kc=!0);else return t.lanes=e.lanes,al(e,t,i)}}return Vc(e,t,n,r,i)}function Pc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Ic(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Va(t,a===null?null:a.cachePool),a===null?Co():So(t,a),ko(t);else return r=t.lanes=536870912,Ic(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Va(t,null),Co(),Ao()):(Va(t,a.cachePool),So(t,a),Ao(),t.memoizedState=null);return Ac(e,t,i,n),t.child}function Fc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ic(e,t,n,r,i){var a=Ba();return a=a===null?null:{parent:Ta._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Va(t,null),Co(),ko(t),e!==null&&ga(e,t,r,!0),t.childLanes=i,null}function Lc(e,t){return t=Xc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Rc(e,t,n){return ao(t,e.child,null,n),e=Lc(t,t.pendingProps),e.flags|=2,jo(t),t.memoizedState=null,e}function zc(e,t,n){var r=t.pendingProps,i=!!(t.flags&128);if(t.flags&=-129,e===null){if(K){if(r.mode===`hidden`)return e=Lc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Fc(null,e);if(Oo(t),(e=Qi)?(e=cm(e,ea),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ui===null?null:{id:Wi,overflow:Gi},retryLane:536870912,hydrationErrors:null},n=Ni(e),n.return=t,t.child=n,Zi=t,Qi=null)):e=null,e===null)throw na(t);return t.lanes=536870912,null}return Lc(t,r)}var a=e.memoizedState;if(a!==null){var o=a.dehydrated;if(Oo(t),i){if(t.flags&256)t.flags&=-257,t=Rc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558))}else if(kc||ga(e,t,n,!1),i=(n&e.childLanes)!==0,kc||i){if(bo.current===null){if(r=Qu,r!==null&&(o=ft(r,n),o!==0&&o!==a.retryLane))throw a.retryLane=o,xi(e,o),Id(r,e,o),Oc;Jd()}t=Rc(e,t,n)}else e=a.treeContext,Qi=fm(o.nextSibling),Zi=t,K=!0,$i=null,ea=!1,e!==null&&Xi(t,e),t=Lc(t,r),t.flags|=134221824;return t}return e=Oi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Bc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(s(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Vc(e,t,n,r,i){return va(t),n=Jo(e,t,n,r,void 0,i),r=Qo(),e!==null&&!kc?($o(e,t,i),al(e,t,i)):(K&&r&&Ji(t),t.flags|=1,Ac(e,t,n,i),t.child)}function Hc(e,t,n,r,i,a){return va(t),t.updateQueue=null,n=Xo(t,r,n,i),Yo(e),r=Qo(),e!==null&&!kc?($o(e,t,a),al(e,t,a)):(K&&r&&Ji(t),t.flags|=1,Ac(e,t,n,a),t.child)}function Uc(e,t,n,r,i){if(va(t),t.stateNode===null){var a=wi,o=n.contextType;typeof o==`object`&&o&&(a=ya(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=hc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},co(t),o=n.contextType,a.context=typeof o==`object`&&o?ya(o):wi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(mc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&hc.enqueueReplaceState(a,a.state,null),_o(t,r,a,i),go(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=vc(n,s);a.props=c;var l=a.context,u=n.contextType;o=wi,typeof u==`object`&&u&&(o=ya(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&_c(t,a,r,o),so=!1;var f=t.memoizedState;a.state=f,_o(t,r,a,i),go(),l=t.memoizedState,s||f!==l||so?(typeof d==`function`&&(mc(t,n,d,r),l=t.memoizedState),(c=so||gc(t,n,c,r,f,l,o))?(u||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=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,lo(e,t),o=t.memoizedProps,u=vc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=wi,typeof l==`object`&&l&&(c=ya(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&_c(t,a,r,c),so=!1,f=t.memoizedState,a.state=f,_o(t,r,a,i),go();var p=t.memoizedState;o!==d||f!==p||so||e!==null&&e.dependencies!==null&&_a(e.dependencies)?(typeof s==`function`&&(mc(t,n,s,r),p=t.memoizedState),(u=so||gc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&_a(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Bc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=ao(t,e.child,null,i),t.child=ao(t,null,n,i)):Ac(e,t,n,i),t.memoizedState=a.state,e=t.child):e=al(e,t,i),e}function Wc(e,t,n,r){return oa(),t.flags|=256,Ac(e,t,n,r),t.child}var Gc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Kc(e){return{baseLanes:e,cachePool:Ha()}}function qc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=dd),e}function Jc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Mo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(K){if(i?Do(t):Ao(),(e=Qi)?(e=cm(e,ea),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ui===null?null:{id:Wi,overflow:Gi},retryLane:536870912,hydrationErrors:null},n=Ni(e),n.return=t,t.child=n,Zi=t,Qi=null)):e=null,e===null)throw na(t);return t.lanes=um(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Ao(),i=t.mode,a=Xc({mode:`hidden`,children:a},i),r=ji(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Kc(n),r.childLanes=qc(e,o,n),t.memoizedState=Gc,Fc(null,r)):(Do(t),Yc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return Qc(e,t,a,o,r,c,s,n)}return i?(Ao(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Oi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=ji(i,a,n,null),i.flags|=2):i=Oi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Fc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Kc(n):(a=i.cachePool,a===null?a=Ha():(s=Ta._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=qc(e,o,n),t.memoizedState=Gc,Fc(e.child,r)):(Do(t),n=e.child,e=n.sibling,n=Oi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Yc(e,t){return t=Xc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Xc(e,t){return e=Ei(22,e,null,t),e.lanes=0,e}function Zc(e,t,n){return ao(t,e.child,null,n),e=Yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Qc(e,t,n,r,i,a,o,c){if(n)return t.flags&256?(Do(t),t.flags&=-257,Zc(e,t,c)):t.memoizedState===null?(Ao(),a=i.fallback,o=t.mode,i=Xc({mode:`visible`,children:i.children},o),a=ji(a,o,c,null),a.flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,ao(t,e.child,null,c),i=t.child,i.memoizedState=Kc(c),i.childLanes=qc(e,r,c),t.memoizedState=Gc,Fc(null,i)):(Ao(),t.child=e.child,t.flags|=128,null);if(Do(t),um(a)){if(r=a.nextSibling&&a.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(i=Error(s(419)),i.stack=``,i.digest=r,ca({value:i,source:null,stack:null})),Zc(e,t,c)}if(kc||ga(e,t,c,!1),r=(c&e.childLanes)!==0,kc||r){if(bo.current!==null)return Zc(e,t,c);if(r=Qu,r!==null&&(i=ft(r,c),i!==0&&i!==o.retryLane))throw o.retryLane=i,xi(e,i),Id(r,e,i),Oc;return lm(a)||Jd(),Zc(e,t,c)}return lm(a)?(t.flags|=192,t.child=e.child,null):(e=o.treeContext,Qi=fm(a.nextSibling),Zi=t,K=!0,$i=null,ea=!1,e!==null&&Xi(t,e),t=Yc(t,i.children),t.flags|=134221824,t)}function $c(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ma(e.return,t,n)}function el(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Fo(n)===null&&(t=e),e=e.sibling}return t}function tl(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function nl(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function rl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Mo.current;if(t.flags&128)return No(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,No(t,o),i===`backwards`&&e!==null?(nl(e),Ac(e,t,r,n),nl(e)):Ac(e,t,r,n),r=K?Bi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$c(e,n,t);else if(e.tag===19)$c(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=el(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,nl(t)),tl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Fo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}tl(t,!0,n,null,a,r);break;case`together`:tl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=el(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),tl(t,!1,i,n,a,r)}return t.child}function il(e,t,n){var r=t.pendingProps;return fa(t,t.type,r.value),Ac(e,t,r.children,n),t.child}function al(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),cd|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ga(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,n=Oi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Oi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ol(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&_a(e)))}function sl(e,t,n){switch(t.tag){case 3:xe(t,t.stateNode.containerInfo),fa(t,Ta,e.memoizedState.cache),oa();break;case 27:case 5:Ce(t);break;case 4:xe(t,t.stateNode.containerInfo);break;case 10:fa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Oo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Do(t),t.flags|=128,null;r=ga(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Jc(e,t,n):(Do(t),e=al(e,t,n),e===null?null:e.sibling)}Do(t);break;case 19:if(t.flags&128)return rl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(ga(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return rl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),No(t,Mo.current),r)break;return null;case 22:return t.lanes=0,Pc(e,t,n,t.pendingProps);case 24:fa(t,Ta,e.memoizedState.cache)}return al(e,t,n)}function cl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)kc=!0;else{if(!ol(e,n)&&!(t.flags&128))return kc=!1,sl(e,t,n);kc=!!(e.flags&131072)}}else kc=!1,K&&t.flags&1048576&&qi(t,Bi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ya(t.elementType),t.type=e,typeof e==`function`)Di(e)?(r=vc(e,r),t.tag=1,t=Uc(null,t,e,r,n)):(t.tag=0,t=Vc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===ne){t.tag=11,t=jc(null,t,e,r,n);break a}if(i===ae){t.tag=14,t=Mc(null,t,e,r,n);break a}if(i===te){t.tag=10,t.type=e,t=il(null,t,n);break a}}throw t=P(e)||e,Error(s(306,t,``))}}return t;case 0:return Vc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=vc(r,t.pendingProps),Uc(e,t,r,i,n);case 3:a:{if(xe(t,t.stateNode.containerInfo),e===null)throw Error(s(387));r=t.pendingProps;var a=t.memoizedState;i=a.element,lo(e,t),_o(t,r,null,n);var o=t.memoizedState;if(r=o.cache,fa(t,Ta,r),r!==a.cache&&ha(t,[Ta],n,!0),go(),r=o.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=Wc(e,t,r,n);break a}if(r!==i){i=Ii(Error(s(424)),t),ca(i),t=Wc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Qi=fm(e.firstChild),Zi=t,K=!0,$i=null,ea=!0,n=oo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(oa(),r===i){t=al(e,t,n);break a}Ac(e,t,r,n)}t=t.child}return t;case 26:return Bc(e,t),e===null?(n=Im(t.type,null,t.pendingProps,null))?t.memoizedState=n:K||(t.stateNode=hp(t.type,t.pendingProps,ye.current,t)):t.memoizedState=Im(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ce(t),e===null&&K&&(r=t.stateNode=vm(t.type,t.pendingProps,ye.current),Zi=t,ea=!0,i=Qi,Tp(t.type)?(pm=i,Qi=fm(r.firstChild)):Qi=i),Ac(e,t,t.pendingProps.children,n),Bc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&K&&((i=r=Qi)&&(r=om(r,t.type,t.pendingProps,ea),r===null?i=!1:(t.stateNode=r,Zi=t,Qi=fm(r.firstChild),ea=!1,i=!0)),i||na(t)),Ce(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,r=a.children,gp(i,a)?r=null:o!==null&&gp(i,o)&&(t.flags|=32),t.memoizedState!==null&&(i=Jo(e,t,Zo,null,null,n),uh._currentValue=i),Bc(e,t),Ac(e,t,r,n),t.child;case 6:return e===null&&K&&((e=n=Qi)&&(n=sm(n,t.pendingProps,ea),n===null?e=!1:(t.stateNode=n,Zi=t,Qi=null,e=!0)),e||na(t)),null;case 13:return Jc(e,t,n);case 4:return xe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ao(t,null,r,n):Ac(e,t,r,n),t.child;case 11:return jc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Bc(e,t),Ac(e,t,r,n),t.child;case 8:return Ac(e,t,t.pendingProps.children,n),t.child;case 12:return Ac(e,t,t.pendingProps.children,n),t.child;case 10:return il(e,t,n);case 9:return i=t.type._context,r=t.pendingProps.children,va(t),i=ya(i),r=r(i),t.flags|=1,Ac(e,t,r,n),t.child;case 14:return Mc(e,t,t.type,t.pendingProps,n);case 15:return Nc(e,t,t.type,t.pendingProps,n);case 19:return rl(e,t,n);case 31:return zc(e,t,n);case 22:return Pc(e,t,n,t.pendingProps);case 24:return va(t),r=ya(Ta),e===null?(i=Ba(),i===null&&(i=Qu,a=Ea(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},co(t),fa(t,Ta,i)):((e.lanes&n)!==0&&(lo(e,t),_o(t,null,null,n),go()),i=e.memoizedState,a=t.memoizedState,i.parent===r?(r=a.cache,fa(t,Ta,r),r!==i.cache&&ha(t,[Ta],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),fa(t,Ta,r))),Ac(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:K&&Ji(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Bc(e,t),Ac(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function ll(e){e.flags|=4}function ul(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Zm(t,r):Zm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Gd())e.flags|=8192;else throw Xa=Ka,Wa}}else e.flags&=-16777217}function dl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Qm(t)){if(Gd())e.flags|=8192;else throw Xa=Ka,Wa}}function fl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ot(),e.lanes|=t,fd|=t)}function pl(e,t){if(!K)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,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;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function ml(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&1206910976,r|=i.flags&1206910976,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 hl(e,t,n){var r=t.pendingProps;switch(Yi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ml(t),null;case 1:return ml(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),pa(Ta),Se(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(aa(t)?ll(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,sa())),ml(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(ll(t),a===null?(ml(t),ul(t,i,null,r,n)):(ml(t),dl(t,a))):a?a===e.memoizedState?(ml(t),t.flags&=-16777217):(ll(t),ml(t),dl(t,a)):(e=e.memoizedProps,e!==r&&ll(t),ml(t),ul(t,i,e,r,n)),null;case 27:if(we(t),n=ye.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ll(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return ml(t),t.subtreeFlags&=-33554433,null}e=_e.current,aa(t)?ra(t,e):(e=vm(i,r,n),t.stateNode=e,ll(t))}return ml(t),t.subtreeFlags&=-33554433,null;case 5:if(we(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ll(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return ml(t),t.subtreeFlags&=-33554433,null}if(a=_e.current,aa(t))ra(t,a);else{var o=fp(ye.current);switch(a){case 1:a=o.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:a=o.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:a=o.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:a=o.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:a=o.createElement(`div`),a.innerHTML=`<script><\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?o.createElement(`select`,{is:r.is}):o.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?o.createElement(i,{is:r.is}):o.createElement(i)}}a[_t]=t,a[vt]=r;a:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)a.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break a;for(;o.sibling===null;){if(o.return===null||o.return===t)break a;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=a;a:switch(ap(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&ll(t)}}return ml(t),t.subtreeFlags&=-33554433,ul(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ll(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(s(166));if(e=ye.current,aa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Zi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[_t]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||np(e.nodeValue,n)),e||na(t,!0)}else e=fp(e).createTextNode(r),e[_t]=t,t.stateNode=e}return ml(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=aa(t),n!==null){if(e===null){if(!r)throw Error(s(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(557));e[_t]=t}else oa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ml(t),e=!1}else n=sa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(jo(t),t):(jo(t),null);if(t.flags&128)throw Error(s(558))}return ml(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=aa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(s(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(s(317));i[_t]=t}else oa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ml(t),i=!1}else i=sa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(jo(t),t):(jo(t),null)}return jo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),fl(t,t.updateQueue),ml(t),null);case 4:return Se(),e===null&&Kf(t.stateNode.containerInfo),t.flags|=67108864,ml(t),null;case 10:return pa(t.type),ml(t),null;case 19:if(Po(t),r=t.memoizedState,r===null)return ml(t),null;if(i=!!(t.flags&128),a=r.rendering,a===null){if(i)pl(r,!1);else{if(sd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Fo(e),a!==null){for(t.flags|=128,pl(r,!1),e=a.updateQueue,t.updateQueue=e,fl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ki(n,e),n=n.sibling;return No(t,Mo.current&1|2),K&&Ki(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&H()>vd&&(t.flags|=128,i=!0,pl(r,!1),t.lanes=4194304)}}else{if(!i){if(e=Fo(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,fl(t,e),pl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!a.alternate&&!K)return ml(t),null}else 2*H()-r.renderingStartTime>vd&&n!==536870912&&(t.flags|=128,i=!0,pl(r,!1),t.lanes=4194304)}r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=H(),e.sibling=null,a=Mo.current,a=i?a&1|2:a&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||K?No(t,a):(n=a,V(To,t),V(Mo,n),Eo===null&&(Eo=t)),K&&Ki(t,r.treeForkCount),e}return ml(t),null;case 22:case 23:return jo(t),wo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(ml(t),t.subtreeFlags&6&&(t.flags|=8192)):ml(t),n=t.updateQueue,n!==null&&fl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&B(za),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),pa(Ta),ml(t),null;case 25:return null;case 30:return t.flags|=33554432,ml(t),null}throw Error(s(156,t.tag))}function gl(e,t){switch(Yi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pa(Ta),Se(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return we(t),null;case 31:if(t.memoizedState!==null){if(jo(t),t.alternate===null)throw Error(s(340));oa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(jo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));oa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Po(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Se(),null;case 10:return pa(t.type),null;case 22:case 23:return jo(t),wo(),e!==null&&B(za),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return pa(Ta),null;case 25:return null;default:return null}}function _l(e,t){switch(Yi(t),t.tag){case 3:pa(Ta),Se();break;case 26:case 27:case 5:we(t);break;case 4:Se();break;case 31:t.memoizedState!==null&&jo(t);break;case 13:jo(t);break;case 19:Po(t);break;case 10:pa(t.type);break;case 22:case 23:jo(t),wo(),e!==null&&B(za);break;case 24:pa(Ta)}}function vl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){gf(t,t.return,e)}}function yl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){gf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){gf(t,t.return,e)}}function bl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{yo(t,n)}catch(t){gf(e,e.return,t)}}}function xl(e,t,n){n.props=vc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){gf(e,t,n)}}function Sl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=di(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Lp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Rp(e);h(e.child,!1,tm,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){gf(e,t,n)}}function Cl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){gf(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){gf(e,t,n)}else n.current=null}}function wl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)rm(e.stateNode,t[n])}function Tl(e){for(var t=e.return;t!==null&&(Ol(t)&&rm(e.stateNode,t.stateNode),!Dl(t));)t=t.return}function El(e){for(var t=e.return;t!==null&&(Ol(t)&&im(e.stateNode,t.stateNode),!Dl(t));)t=t.return}function Dl(e){return e.tag===5||e.tag===3||e.tag===27}function Ol(e){return e&&e.tag===7&&e.stateNode!==null}function kl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){gf(e,e.return,t)}}function Al(e,t,n){try{var r=e.stateNode;sp(r,e.type,n,t),r[vt]=t}catch(t){gf(e,e.return,t)}}function jl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Tp(e.type)||e.tag===4}function Ml(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||jl(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.tag===27&&Tp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Nl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=pn)),wl(e,r),Bt=!0;else if(i!==4&&(i===27&&(wl(e,r),r=null,Tp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Nl(e,t,n,r),e=e.sibling;e!==null;)Nl(e,t,n,r),e=e.sibling}function Pl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),wl(e,r),Bt=!0;else if(i!==4&&(i===27&&(wl(e,r),r=null,Tp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Pl(e,t,n,r),e=e.sibling;e!==null;)Pl(e,t,n,r),e=e.sibling}function Fl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);ap(t,r,n),t[_t]=e,t[vt]=n}catch(t){gf(e,e.return,t)}}var Il=!1,Ll=null;function J(e){(e.tag===30||e.subtreeFlags&33554432)&&(Il=!0)}var Rl=null;function zl(){var e=Rl;return Rl=null,e}var Bl=0;function Vl(e,t,n,r,i){return Bl=0,Hl(e.child,t,n,r,i)}function Hl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=jp(o);r.push(s),s.view&&(a=!0)}else a||jp(o).view&&(a=!0);Il=!0,Op(o,Bl===0?t:t+`_`+Bl,n),Bl++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||Hl(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Ul(e,t){for(;e!==null;)e.tag===5?kp(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Ul(e.child,t),e=e.sibling}function Wl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Wl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(s(544));var n=t.name;t=pi(t.default,t.share),t!==`none`&&(Vl(e,n,t,null,!1)||Ul(e.child,!1))}e=e.sibling}}function Gl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=di(r,n),a=pi(r.default,n.paired?r.share:r.enter);a===`none`?Wl(e):Vl(e,i,a,null,!1)?(Wl(e),n.paired||t||Fd(e,r.onEnter)):Ul(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Gl(e,t),e=e.sibling;else Wl(e)}function Kl(e){if(Ll!==null&&Ll.size!==0){var t=Ll;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=pi(n.default,n.share);if(a!==`none`&&(Vl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Fd(e,n.onShare)):Ul(e.child,!1)),t.delete(r),t.size===0)break}}}Kl(e)}e=e.sibling}}}function ql(e){if(e.tag===30){var t=e.memoizedProps,n=di(t,e.stateNode),r=Ll===null?void 0:Ll.get(n),i=pi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Vl(e,n,i,null,!1)?r===void 0?Fd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Ll.delete(n),Fd(e,t.onShare)):Ul(e.child,!1)),Ll!==null&&Kl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)ql(e),e=e.sibling;else Ll!==null&&Kl(e)}function Jl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=di(t,e.stateNode);t=pi(t.default,t.update),e.flags&=-5,t!==`none`&&Vl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Jl(e);e=e.sibling}}function Yl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Ul(e.child,!1))}Yl(e)}e=e.sibling}}function Xl(e){if(e.tag===30)e.stateNode.paired=null,Ul(e.child,!1),Yl(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Xl(e),e=e.sibling;else Yl(e)}function Zl(e){for(e=e.child;e!==null;)e.tag===30?Ul(e.child,!1):e.subtreeFlags&33554432&&Zl(e),e=e.sibling}function Ql(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Bl<a.length){var l=a[Bl],u=jp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Op(c,Bl===0?n:n+`_`+Bl,i),s&&e.flags&4||(Rl===null&&(Rl=[]),Rl.push(c,Bl===0?r:r+`_`+Bl,t.memoizedProps)),Bl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:Ql(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function $l(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=di(n,r),a=pi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Mp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Bl=0,i=Ql(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Fd(e,n.onUpdate))}else e.subtreeFlags&33554432&&$l(e,t);e=e.sibling}}var eu=!1,tu=!1,nu=!1,ru=!1,iu=typeof WeakSet==`function`?WeakSet:Set,au=null,ou=!1,su=!1,cu=!1,lu=!1;function uu(e,t,n){if(e=e.containerInfo,up=yh,e=Vr(e),Hr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(dp={focusedElem:e,selectionRange:r},yh=!1,n=(n&335544064)===n,au=t,t=n?9270:1024;au!==null;){if(e=au,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&ql(r[a]);if(e.alternate===null&&e.flags&2)n&&J(e),du(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&ql(r),du(n);continue}if(r!==null&&r.memoizedState!==null){n&&J(e),du(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,au=r):(n&&Jl(e),du(n))}}Ll=null}function du(e){for(;au!==null;){var t=au,n=e,r=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(i&1024&&r!==null){n=void 0,i=r.memoizedProps,r=r.memoizedState;var a=t.stateNode;try{var o=vc(t.type,i);n=a.getSnapshotBeforeUpdate(o,r),a.__reactInternalSnapshotBeforeUpdate=n}catch(e){gf(t,t.return,e)}}break;case 3:if(i&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)am(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:am(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=di(r.memoizedProps,r.stateNode),i=t.memoizedProps,i=pi(i.default,i.update),i!==`none`&&Vl(r,n,i,r.memoizedState=[],!0));break;default:if(i&1024)throw Error(s(163))}if(r=t.sibling,r!==null){r.return=t.return,au=r;break}au=t.return}}function fu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Mu(e,n),r&4&&vl(5,n);break;case 1:if(Mu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){gf(n,n.return,e)}else{var i=vc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){gf(n,n.return,e)}}}r&64&&bl(n),r&512&&Sl(n,n.return);break;case 3:if(Mu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{yo(e,t)}catch(e){gf(n,n.return,e)}}break;case 27:t===null&&r&4&&Fl(n);case 26:case 5:Mu(e,n),t===null&&r&4&&kl(n),r&512&&Sl(n,n.return);break;case 12:Mu(e,n);break;case 31:Mu(e,n),r&4&&xu(e,n);break;case 13:Mu(e,n),r&4&&Su(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=bf.bind(null,n),dm(e,n))));break;case 22:if(r=n.memoizedState!==null||eu,!r){var a=t!==null&&t.memoizedState!==null||tu;t=eu,i=tu,eu=r,(tu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Pu(e,n,r)):Mu(e,n),eu=t,tu=i}break;case 30:Mu(e,n),r&512&&Sl(n,n.return);break;case 7:r&512&&Sl(n,n.return);default:Mu(e,n)}}function pu(e,t){for(e=e.child;e!==null;)mu(e,t),e=e.sibling}function mu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){gf(e,e.return,t)}hu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Bt=!0}catch(t){gf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Dp(s,!0):Dp(e.stateNode,!1)}catch(t){gf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&pu(e,t);break;default:pu(e,t)}}function hu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:mu(n,r);break a;case 22:n.memoizedState===null&&hu(n,r);break a;default:hu(n,r)}}e=e.sibling}}function gu(e){var t=e.alternate;t!==null&&(e.alternate=null,gu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Tt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var _u=null,vu=!1;function yu(e,t,n){for(n=n.child;n!==null;)bu(e,t,n),n=n.sibling}function bu(e,t,n){if(Ke&&typeof Ke.onCommitFiberUnmount==`function`)try{Ke.onCommitFiberUnmount(Ge,n)}catch{}switch(n.tag){case 26:tu||Cl(n,t),yu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!tu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:tu||Cl(n,t),El(n);var r=_u,i=vu;Tp(n.type)&&(_u=n.stateNode,vu=!1),yu(e,t,n),ym(n.stateNode,n.type,n.memoizedProps),_u=r,vu=i;break;case 5:tu||Cl(n,t),El(n);case 6:if(n.tag===6&&El(n),r=_u,i=vu,_u=null,yu(e,t,n),_u=r,vu=i,_u!==null){if(vu)try{(_u.nodeType===9?_u.body:_u.nodeName===`HTML`?_u.ownerDocument.body:_u).removeChild(n.stateNode),Bt=!0}catch(e){gf(n,t,e)}else try{_u.removeChild(n.stateNode),Bt=!0}catch(e){gf(n,t,e)}}break;case 18:_u!==null&&(vu?(e=_u,Ep(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Gh(e)):Ep(_u,n.stateNode));break;case 4:r=_u,i=vu,_u=n.stateNode.containerInfo,vu=!0,yu(e,t,n),_u=r,vu=i;break;case 0:case 11:case 14:case 15:yl(2,n,t),tu||yl(4,n,t),yu(e,t,n);break;case 1:tu||(Cl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&xl(n,t,r)),yu(e,t,n);break;case 21:yu(e,t,n);break;case 22:tu=(r=tu)||n.memoizedState!==null,yu(e,t,n),tu=r;break;case 30:Cl(n,t),yu(e,t,n);break;case 7:tu||Cl(n,t),yu(e,t,n);break;default:yu(e,t,n)}}function xu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Gh(e)}catch(e){gf(t,t.return,e)}}}function Su(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gh(e)}catch(e){gf(t,t.return,e)}}function Cu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new iu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new iu),t;default:throw Error(s(435,e.tag))}}function wu(e,t){var n=Cu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=xf.bind(null,e,t);t.then(r,r)}})}function Tu(e,t,n){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var a=r[i],o=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Tp(l.type)){_u=l.stateNode,vu=!1;break a}break;case 5:_u=l.stateNode,vu=!1;break a;case 3:case 4:_u=l.stateNode.containerInfo,vu=!0;break a}l=l.return}if(_u===null)throw Error(s(160));bu(o,c,a),_u=null,vu=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Du(t,e,n),t=t.sibling}var Eu=null;function Du(e,t,n){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(i&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var a=0;a<r.length;a++){var o=r[a];o.ref.impl=o.nextImpl}Tu(t,e,n),Ou(e),i&4&&(yl(3,e,e.return),vl(3,e),yl(5,e,e.return));break;case 1:Tu(t,e,n),Ou(e),i&512&&(tu||r===null||Cl(r,r.return)),i&64&&eu&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(a=Eu,Tu(t,e,n),Ou(e),i&512&&(tu||r===null||Cl(r,r.return)),i&4){if(i=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(eu)e.stateNode=hp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,i=a.ownerDocument||a;b:switch(t){case`title`:r=i.getElementsByTagName(`title`)[0],(!r||r[W]||r[_t]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=i.createElement(t),i.head.insertBefore(r,i.querySelector(`head > title`))),ap(r,t,n),r[_t]=e,At(r),t=r;break a;case`link`:if(a=Jm(`link`,`href`,i).get(t+(n.href||``))){for(o=0;o<a.length;o++)if(r=a[o],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){a.splice(o,1);break b}}r=i.createElement(t),ap(r,t,n),i.head.appendChild(r);break;case`meta`:if(a=Jm(`meta`,`content`,i).get(t+(n.content||``))){for(o=0;o<a.length;o++)if(r=a[o],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){a.splice(o,1);break b}}r=i.createElement(t),ap(r,t,n),i.head.appendChild(r);break;default:throw Error(s(468,t))}r[_t]=e,At(r),t=r}e.stateNode=t}}else eu||Ym(a,e.type,e.stateNode)}else e.stateNode=Um(a,n,e.memoizedProps)}else i===n?n===null&&e.stateNode!==null&&Al(e,e.memoizedProps,r.memoizedProps):(i===null?(t=r.stateNode,t===null||tu||t.parentNode.removeChild(t)):i.count--,n===null?eu||Ym(a,e.type,e.stateNode):Um(a,n,e.memoizedProps))}break;case 27:Tu(t,e,n),Ou(e),i&512&&(tu||r===null||Cl(r,r.return)),r!==null&&i&4&&Al(e,e.memoizedProps,r.memoizedProps);break;case 5:if(a=nu,nu=!1,Tu(t,e,n),nu=a,Ou(e),i&512&&(tu||r===null||Cl(r,r.return)),e.flags&32){t=e.stateNode;try{an(t,``),Bt=!0}catch(t){gf(e,e.return,t)}}i&4&&e.stateNode!=null&&(t=e.memoizedProps,Al(e,t,r===null?t:r.memoizedProps)),i&1024&&(ru=!0);break;case 6:if(Tu(t,e,n),Ou(e),i&4){if(e.stateNode===null)throw Error(s(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Bt=!0}catch(t){gf(e,e.return,t)}}break;case 3:if(Bt=!1,qm=null,a=Eu,Eu=Cm(t.containerInfo),Tu(t,e,n),Eu=a,Ou(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{Gh(t.containerInfo)}catch(t){gf(e,e.return,t)}ru&&(ru=!1,ku(e)),Bt=!1;break;case 4:i=nu,nu=eu,r=Vt(),a=Eu,Eu=Cm(e.stateNode.containerInfo),Tu(t,e,n),Ou(e),Eu=a,Bt&&su&&(cu=!0),Bt=r,nu=i;break;case 12:Tu(t,e,n),Ou(e);break;case 31:Tu(t,e,n),Ou(e),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,wu(e,t)));break;case 13:Tu(t,e,n),Ou(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(gd=H()),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,wu(e,t)));break;case 22:a=e.memoizedState!==null,o=r!==null&&r.memoizedState!==null;var c=eu,l=tu,u=nu;eu=c||a,nu=u||a,tu=l||o,Tu(t,e,n),tu=l,nu=u,eu=c,Ou(e),i&8192&&(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,!a||r===null||o||eu||tu||(t=o||tu,n=eu,r=tu,eu=a||eu,tu=t,Nu(e,2),eu=n,tu=r),!a&&nu||pu(e,a)),i&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,wu(e,n))));break;case 19:Tu(t,e,n),Ou(e),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,wu(e,t)));break;case 30:i&512&&(tu||r===null||Cl(r,r.return)),i=Vt(),a=su,o=(n&335544064)===n,c=e.memoizedProps,su=o&&pi(c.default,c.update)!==`none`,Tu(t,e,n),Ou(e),o&&r!==null&&Bt&&(e.flags|=4),su=a,Bt=i;break;case 21:break;case 7:i&512&&(tu||r===null||Cl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Tu(t,e,n),Ou(e)}}function Ou(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(jl(r)){n=r;break}r=r.return}r=null;for(var i=e.return;i!==null;){if(Ol(i)){var a=i.stateNode;r===null?r=[a]:r.push(a)}if(Dl(i))break;i=i.return}var o=r;if(n==null)throw Error(s(160));switch(n.tag){case 27:var c=n.stateNode;Pl(e,Ml(e),c,o);break;case 5:var l=n.stateNode;n.flags&32&&(an(l,``),n.flags&=-33),Pl(e,Ml(e),l,o);break;case 3:case 4:var u=n.stateNode.containerInfo;Nl(e,Ml(e),u,o);break;default:throw Error(s(161))}}catch(t){gf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ku(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ku(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,yh=!0,t.reset(),yh=!1),e=e.sibling}}function Au(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)ju(t,e),t=t.sibling;else $l(t,!1)}function ju(e,t){var n=e.alternate;if(n===null)Gl(e,!1);else switch(e.tag){case 3:if(lu=ou=!1,zl(),Au(t,e),!ou&&!cu){if(e=Rl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];kp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),lu=!0}Rl=null;break;case 5:Au(t,e);break;case 4:r=ou,ou=!1,Au(t,e),ou&&(cu=!0),ou=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Au(t,e):Gl(e,!1));break;case 30:r=ou,i=zl(),ou=!1,Au(t,e),ou&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=di(a,o),o=di(n.memoizedProps,o);var s=pi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Bl=0,t=Ql(e,n,t,o,s,a,!0),Bl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Fd(e,e.memoizedProps.onUpdate),Rl=i):i!==null&&(i.push.apply(i,Rl),Rl=i),ou=e.flags&32?!0:r;break;default:Au(t,e)}}function Mu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)fu(e,t.alternate,t),t=t.sibling}function Nu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:yl(4,n,n.return),Nu(n,r);break;case 1:Cl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&xl(n,n.return,i),Nu(n,r);break;case 27:r&2&&ym(n.stateNode,n.type,n.memoizedProps);case 5:Cl(n,n.return),n.tag!==5&&n.tag!==27||El(n),Nu(n,r);break;case 6:El(n);break;case 26:Cl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||tu||i.parentNode.removeChild(i),Nu(n,r);break;case 22:n.memoizedState===null&&Nu(n,r);break;case 30:Cl(n,n.return),Nu(n,r);break;case 7:Cl(n,n.return);default:Nu(n,r)}e=e.sibling}}function Pu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Pu(i,a,n),vl(4,a);break;case 1:if(Pu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){gf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)vo(l[i],c)}catch(e){gf(r,r.return,e)}}s&&o&64&&bl(a),Sl(a,a.return);break;case 27:n&2&&Fl(a);case 5:a.tag!==5&&a.tag!==27||Tl(a),Pu(i,a,n),s&&r===null&&o&4&&kl(a),Sl(a,a.return);break;case 6:Tl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||eu||Ym(Cm(c.ownerDocument),a.type,c),Pu(i,a,n),s&&r===null&&o&4&&kl(a),Sl(a,a.return);break;case 12:Pu(i,a,n);break;case 31:Pu(i,a,n),s&&o&4&&xu(i,a);break;case 13:Pu(i,a,n),s&&o&4&&Su(i,a);break;case 22:a.memoizedState===null&&Pu(i,a,n),Sl(a,a.return);break;case 30:Pu(i,a,n),Sl(a,a.return);break;case 7:Sl(a,a.return);default:Pu(i,a,n)}t=t.sibling}}function Fu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Da(n))}function Iu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Da(e))}function Lu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Ru(e,t,n,r),t=t.sibling;else i&&Zl(t)}function Ru(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Xl(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Lu(e,t,n,r),a&2048&&vl(9,t);break;case 1:Lu(e,t,n,r);break;case 3:Lu(e,t,n,r),i&&lu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Da(a)));break;case 12:if(a&2048){Lu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){gf(t,t.return,e)}}else Lu(e,t,n,r);break;case 31:Lu(e,t,n,r);break;case 13:Lu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&Xl(t),o._visibility&2?Lu(e,t,n,r):(o._visibility|=2,zu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&Xl(s),o._visibility&2?Lu(e,t,n,r):Bu(e,t)),a&2048&&Fu(s,t);break;case 24:Lu(e,t,n,r),a&2048&&Iu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Ul(a.child,!0),Ul(t.child,!0))),Lu(e,t,n,r);break;default:Lu(e,t,n,r)}}function zu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:zu(a,o,s,c,i),vl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,zu(a,o,s,c,i)):u._visibility&2?zu(a,o,s,c,i):Bu(a,o),i&&l&2048&&Fu(o.alternate,o);break;case 24:zu(a,o,s,c,i),i&&l&2048&&Iu(o.alternate,o);break;default:zu(a,o,s,c,i)}t=t.sibling}}function Bu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Bu(n,r),i&2048&&Fu(r.alternate,r);break;case 24:Bu(n,r),i&2048&&Iu(r.alternate,r);break;default:Bu(n,r)}t=t.sibling}}var Vu=8192;function Hu(e,t,n){if(e.subtreeFlags&Vu)for(e=e.child;e!==null;)Uu(e,t,n),e=e.sibling}function Uu(e,t,n){switch(e.tag){case 26:Hu(e,t,n),e.flags&Vu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&eh(n,e)):th(n,Eu,e.memoizedState,e.memoizedProps));break;case 5:Hu(e,t,n),e.flags&Vu&&(e=e.stateNode,(t&335544128)===t&&eh(n,e));break;case 3:case 4:var r=Eu;Eu=Cm(e.stateNode.containerInfo),Hu(e,t,n),Eu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Vu,Vu=16777216,Hu(e,t,n),Vu=r):Hu(e,t,n));break;case 30:if((e.flags&Vu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Ll===null&&(Ll=new Map),Ll.set(r,i)}Hu(e,t,n);break;default:Hu(e,t,n)}}function Wu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Gu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];au=r,Ju(r,e)}Wu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ku(e),e=e.sibling}function Ku(e){switch(e.tag){case 0:case 11:case 15:Gu(e),e.flags&2048&&yl(9,e,e.return);break;case 3:Gu(e);break;case 12:Gu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,qu(e)):Gu(e);break;default:Gu(e)}}function qu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];au=r,Ju(r,e)}Wu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:yl(8,t,t.return),qu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,qu(t));break;default:qu(t)}e=e.sibling}}function Ju(e,t){for(;au!==null;){var n=au;switch(n.tag){case 0:case 11:case 15:yl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Da(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,au=r;else a:for(n=e;au!==null;){r=au;var i=r.sibling,a=r.return;if(gu(r),r===n){au=null;break a}if(i!==null){i.return=a,au=i;break a}au=a}}}var Yu={getCacheForType:function(e){var t=ya(Ta),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ya(Ta).controller.signal}},Xu=typeof WeakMap==`function`?WeakMap:Map,Zu=0,Qu=null,$u=null,ed=0,td=0,nd=null,rd=!1,id=!1,ad=!1,od=0,sd=0,cd=0,ld=0,ud=0,dd=0,fd=0,pd=null,md=null,hd=!1,gd=0,_d=0,vd=1/0,yd=null,bd=null,xd=0,Sd=null,Cd=null,wd=0,Td=0,Ed=null,Dd=null,Od=null,kd=null,Ad=null,jd=0,Md=null;function Nd(){return Zu&2&&ed!==0?ed&-ed:F.T===null?ht():Ff()}function Pd(){if(dd===0){if(!(ed&536870912)||K){var e=$e;$e<<=1,!($e&3932160)&&($e=262144),dd=e}else dd=536870912}return e=To.current,e!==null&&(e.flags|=32),dd}function Fd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Lp(di(e.memoizedProps,n))),kd===null&&(kd=[]),kd.push(t.bind(null,r))}}function Id(e,t,n){(e===Qu&&(td===2||td===9)||e.cancelPendingCommit!==null)&&(Ud(e,0),Bd(e,ed,dd,!1)),ct(e,n),Zu&2&&e===Qu||(e===Qu&&(!(Zu&2)&&(ld|=n),sd===4&&Bd(e,ed,dd,!1)),Df(e))}function Ld(e,t,n){if(Zu&6)throw Error(s(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||rt(e,t),i=r?Zd(e,t):Yd(e,t,!0),a=r;do{if(i===0){id&&!r&&Bd(e,t,0,!1);break}if(n=e.current.alternate,a&&!zd(n))i=Yd(e,t,!1),a=!1;else{if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var o=0;else o=e.pendingLanes&-536870913,o=o===0?o&536870912?536870912:0:o;if(o!==0){t=o;a:{var c=e;i=pd;var l=c.current.memoizedState.isDehydrated;if(l&&(Ud(c,o).flags|=256),o=Yd(c,o,!1),o!==2&&o!==6){if(ad&&!l){c.errorRecoveryDisabledLanes|=a,ld|=a,i=4;break a}a=md,md=i,a!==null&&(md===null?md=a:md.push.apply(md,a))}i=o}if(a=!1,i!==2)continue}}if(i===1){Ud(e,0),Bd(e,t,0,!0);break}a:{switch(r=e,a=i,a){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Bd(r,t,dd,!rd);break a;case 2:md=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(i=gd+300-H(),10<i)){if(Bd(r,t,dd,!rd),nt(r,0,!0)!==0)break a;wd=t,r.timeoutHandle=yp(Rd.bind(null,r,n,md,yd,hd,t,dd,ld,fd,rd,a,`Throttled`,-0,0),i);break a}Rd(r,n,md,yd,hd,t,dd,ld,fd,rd,a,null,-0,0)}break}}while(1);Df(e)}function Rd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:pn},Ll=null,Uu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=ah.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?gd-H():(a&4194048)===a?_d-H():0,m=rh(d,m),m!==null)?(wd=a,e.cancelPendingCommit=m(af.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Bd(e,a,o,!l)):af(e,t,a,n,r,i,o,s,c,l,u,d)}function zd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,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(!Fr(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 Bd(e,t,n,r){t=it(e,t),t&=~ud,t&=~ld,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Je(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ut(e,n,t)}function Vd(){return Zu&6?!0:(Of(0,!1),!1)}function Hd(){if($u!==null){if(td===0)var e=$u.return;else e=$u,da=ua=null,es(e),$a=null,eo=0,e=$u;for(;e!==null;)_l(e.alternate,e),e=e.return;$u=null}}function Ud(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,bp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),wd=0,Hd(),Qu=e,$u=n=Oi(e.current,null),ed=t,td=0,nd=null,rd=!1,id=rt(e,t),ad=!1,fd=dd=ud=ld=cd=sd=0,md=pd=null,hd=!1,od=it(e,t),vi(),n}function Wd(e,t){q=null,F.H=uc,t===Ua||t===Ga?(t=Za(),td=3):t===Wa?(t=Za(),td=4):td=t===Oc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,nd=t,$u===null&&(sd=1,Sc(e,Ii(t,e.current)))}function Gd(){var e=To.current;return e===null?!0:(ed&4194048)===ed?Eo===null:(ed&62914560)===ed||ed&536870912?e===Eo:!1}function Kd(){var e=F.H;return F.H=uc,e===null?uc:e}function qd(){var e=F.A;return F.A=Yu,e}function Jd(){sd=4,rd||(ed&4194048)!==ed&&To.current!==null||(id=!0),!(cd&134217727)&&!(ld&134217727)||Qu===null||Bd(Qu,ed,dd,!1)}function Yd(e,t,n){var r=Zu;Zu|=2;var i=Kd(),a=qd();(Qu!==e||ed!==t)&&(yd=null,Ud(e,t)),t=!1;var o=sd;a:do try{if(td!==0&&$u!==null){var s=$u,c=nd;switch(td){case 8:Hd(),o=6;break a;case 3:case 2:case 9:case 6:To.current===null&&(t=!0);var l=td;if(td=0,nd=null,tf(e,s,c,l),n&&id){o=0;break a}break;default:l=td,td=0,nd=null,tf(e,s,c,l)}}Xd(),o=sd;break}catch(t){Wd(e,t)}while(1);return t&&e.shellSuspendCounter++,da=ua=null,Zu=r,F.H=i,F.A=a,$u===null&&(Qu=null,ed=0,vi()),o}function Xd(){for(;$u!==null;)$d($u)}function Zd(e,t){var n=Zu;Zu|=2;var r=Kd(),i=qd();Qu!==e||ed!==t?(yd=null,vd=H()+500,Ud(e,t)):id=rt(e,t);a:do try{if(td!==0&&$u!==null){t=$u;var a=nd;b:switch(td){case 1:td=0,nd=null,tf(e,t,a,1);break;case 2:case 9:if(qa(a)){td=0,nd=null,ef(t);break}t=function(){td!==2&&td!==9||Qu!==e||(td=7),Df(e)},a.then(t,t);break a;case 3:td=7;break a;case 4:td=5;break a;case 7:qa(a)?(td=0,nd=null,ef(t)):(td=0,nd=null,tf(e,t,a,7));break;case 5:var o=null;switch($u.tag){case 26:o=$u.memoizedState;case 5:case 27:var c=$u;if(o?Qm(o):c.stateNode.complete){td=0,nd=null;var l=c.sibling;if(l!==null)$u=l;else{var u=c.return;u===null?$u=null:($u=u,nf(u))}break b}}td=0,nd=null,tf(e,t,a,5);break;case 6:td=0,nd=null,tf(e,t,a,6);break;case 8:Hd(),sd=6;break a;default:throw Error(s(462))}}Qd();break}catch(t){Wd(e,t)}while(1);return da=ua=null,F.H=r,F.A=i,Zu=n,$u===null?(Qu=null,ed=0,vi(),sd):0}function Qd(){for(;$u!==null&&!Fe();)$d($u)}function $d(e){var t=cl(e.alternate,e,od);e.memoizedProps=e.pendingProps,t===null?nf(e):$u=t}function ef(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Hc(n,t,t.pendingProps,t.type,void 0,ed);break;case 11:t=Hc(n,t,t.pendingProps,t.type.render,t.ref,ed);break;case 5:es(t);var r=t;r===Zi&&(K?(ia(r),r.tag===5&&r.stateNode!=null&&(Qi=r.stateNode)):(ia(r),K=!0));default:_l(n,t),t=$u=ki(t,od),t=cl(n,t,od)}e.memoizedProps=e.pendingProps,t===null?nf(e):$u=t}function tf(e,t,n,r){da=ua=null,es(t),$a=null,eo=0;var i=t.return;try{if(Dc(e,i,t,n,ed)){sd=1,Sc(e,Ii(n,e.current)),$u=null;return}}catch(t){if(i!==null)throw $u=i,t;sd=1,Sc(e,Ii(n,e.current)),$u=null;return}t.flags&32768?(K||r===1?e=!0:id||ed&536870912?e=!1:(rd=e=!0,(r===2||r===9||r===3||r===6)&&(r=To.current,r!==null&&r.tag===13&&(r.flags|=16384))),rf(t,e)):nf(t)}function nf(e){var t=e;do{if(t.flags&32768){rf(t,rd);return}e=t.return;var n=hl(t.alternate,t,od);if(n!==null){$u=n;return}if(t=t.sibling,t!==null){$u=t;return}$u=t=e}while(t!==null);sd===0&&(sd=5)}function rf(e,t){do{var n=gl(e.alternate,e);if(n!==null){n.flags&=32767,$u=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){$u=e;return}$u=e=n}while(e!==null);sd=6,$u=null}function af(e,t,n,r,i,a,o,c,l,u,d,f){e.cancelPendingCommit=null;do pf();while(xd!==0);if(Zu&6)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));e===Qu&&($u=Qu=null,ed=0),Cd=t,Sd=e,wd=n,Ed=i,Dd=r,of(e,t,n,o,c,l,f)}}function of(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Td=s,s|=_i,lt(e,n,s,r,i,a),kd=null,(n&335544064)===n?(Ad=Aa(e),r=10262):(Ad=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Sf(Be,function(){return mf(),null})):(e.callbackNode=null,e.callbackPriority=0),Il=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=F.T,F.T=null,i=I.p,I.p=2,a=Zu,Zu|=4;try{uu(e,t,n)}finally{Zu=a,I.p=i,F.T=r}}xd=1,Il?Od=Fp(o,e.containerInfo,Ad,lf,uf,cf,df,mf,sf,null,null):(lf(),uf(),df())}function sf(e){if(xd!==0){var t=Sd.onRecoverableError;t(e,{componentStack:null})}}function cf(){xd===3&&(xd=0,ju(Cd,Sd),xd=4)}function lf(){if(xd===1){xd=0;var e=Sd,t=Cd,n=wd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=F.T,F.T=null;var i=I.p;I.p=2;var a=Zu;Zu|=4;try{su=cu=!1,Du(t,e,n),n=dp;var o=Vr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Br(s.ownerDocument.documentElement,s)){if(c!==null&&Hr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=zr(s,h),v=zr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}yh=!!up,dp=up=null}finally{Zu=a,I.p=i,F.T=r}}e.current=t,xd=2}}function uf(){if(xd===2){xd=0;var e=Sd,t=Cd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Zu;Zu|=4;try{fu(e,t.alternate,t)}finally{Zu=i,I.p=r,F.T=n}}xd=3}}function df(){if(xd===4||xd===3){xd=0;var e=Od;Od=null,Ie();var t=Sd,n=Cd,r=wd,i=Dd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?xd=5:(xd=0,Cd=Sd=null,ff(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(bd=null),mt(r),n=n.stateNode,Ke&&typeof Ke.onCommitFiberRoot==`function`)try{Ke.onCommitFiberRoot(Ge,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=F.T,a=I.p,I.p=2,F.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{F.T=n,I.p=a}}if(i=kd,o=Ad,Ad=null,i!==null&&(kd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);wd&3&&pf(),Df(t),a=t.pendingLanes,r&261930&&a&42?t===Md?jd++:(jd=0,Md=t):(jd=0,Md=null),Of(0,!1)}}function ff(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Da(t)))}function pf(){return Od!==null&&(Od.skipTransition(),Od=null),lf(),uf(),df(),mf()}function mf(){if(xd!==5)return!1;var e=Sd,t=Td;Td=0;var n=mt(wd),r=F.T,i=I.p;try{I.p=32>n?32:n,F.T=null,n=Ed,Ed=null;var a=Sd,o=wd;if(xd=0,Cd=Sd=null,wd=0,Zu&6)throw Error(s(331));var c=Zu;if(Zu|=4,Ku(a.current),Ru(a,a.current,o,n),Zu=c,Of(0,!1),Ke&&typeof Ke.onPostCommitFiberRoot==`function`)try{Ke.onPostCommitFiberRoot(Ge,a)}catch{}return!0}finally{I.p=i,F.T=r,ff(e,t)}}function hf(e,t,n){t=Ii(n,t),t=wc(e.stateNode,t,2),e=fo(e,t,2),e!==null&&(ct(e,2),Df(e))}function gf(e,t,n){if(e.tag===3)hf(e,e,n);else for(;t!==null;){if(t.tag===3){hf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(bd===null||!bd.has(r))){e=Ii(n,e),n=Tc(2),r=fo(t,n,2),r!==null&&(Ec(n,r,t,e),ct(r,2),Df(r));break}}t=t.return}}function _f(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Xu;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)||(ad=!0,i.add(n),e=vf.bind(null,e,t,n),t.then(e,e))}function vf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Qu===e&&(ed&n)===n&&(sd===4||sd===3&&(ed&62914560)===ed&&300>H()-gd?Zu&2?ud|=n:Ud(e,0):ud|=n,fd===ed&&(fd=0)),Df(e)}function yf(e,t){t===0&&(t=ot()),e=xi(e,t),e!==null&&(ct(e,t),Df(e))}function bf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),yf(e,n)}function xf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(t),yf(e,n)}function Sf(e,t){return Ne(e,t)}var Y=null,Cf=null,wf=!1,Tf=!1,X=!1,Ef=0;function Df(e){e!==Cf&&e.next===null&&(Cf===null?Y=Cf=e:Cf=Cf.next=e),Tf=!0,wf||(wf=!0,Pf())}function Of(e,t){if(!X&&Tf){X=!0;do for(var n=!1,r=Y;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Je(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Nf(r,a))}else a=ed,a=nt(r,r===Qu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||rt(r,a)||(n=!0,Nf(r,a))}r=r.next}while(n);X=!1}}function kf(){Af()}function Af(){Tf=wf=!1;var e=0;Ef!==0&&vp()&&(e=Ef);for(var t=H(),n=null,r=Y;r!==null;){var i=r.next,a=jf(r,t);a===0?(r.next=null,n===null?Y=i:n.next=i,i===null&&(Cf=n)):(n=r,(e!==0||a&3)&&(Tf=!0)),r=i}xd!==0&&xd!==5||Of(e,!1),Ef!==0&&(Ef=0)}function jf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Je(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=at(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Qu,n=ed,n=nt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(td===2||td===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Pe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||rt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Pe(r),mt(n)){case 2:case 8:n=ze;break;case 32:n=Be;break;case 268435456:n=He;break;default:n=Be}return r=Mf.bind(null,e),n=Ne(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Pe(r),e.callbackPriority=2,e.callbackNode=null,2}function Mf(e,t){if(xd!==0&&xd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(pf()&&e.callbackNode!==n)return null;var r=ed;return r=nt(e,e===Qu?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Ld(e,r,t),jf(e,H()),e.callbackNode!=null&&e.callbackNode===n?Mf.bind(null,e):null)}function Nf(e,t){if(pf())return null;Ld(e,t,!0)}function Pf(){Cp(function(){Zu&6?Ne(Re,kf):Af()})}function Ff(){if(Ef===0){var e=Na;e===0&&(e=Qe,Qe<<=1,!(Qe&261888)&&(Qe=256)),Ef=e}return Ef}function If(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:fn(e)}function Lf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=If((i[vt]||null).action),o=r.submitter;o&&(t=(t=o[vt]||null)?If(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Pn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Ef!==0){var e=new FormData(i,o);Xs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Xs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Rf=0;Rf<ci.length;Rf++){var zf=ci[Rf];li(zf.toLowerCase(),`on`+(zf[0].toUpperCase()+zf.slice(1)))}li(ei,`onAnimationEnd`),li(ti,`onAnimationIteration`),li(ni,`onAnimationStart`),li(`dblclick`,`onDoubleClick`),li(`focusin`,`onFocus`),li(`focusout`,`onBlur`),li(ri,`onTransitionRun`),li(ii,`onTransitionStart`),li(ai,`onTransitionCancel`),li(oi,`onTransitionEnd`),Ft(`onMouseEnter`,[`mouseout`,`mouseover`]),Ft(`onMouseLeave`,[`mouseout`,`mouseover`]),Ft(`onPointerEnter`,[`pointerout`,`pointerover`]),Ft(`onPointerLeave`,[`pointerout`,`pointerover`]),Pt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Pt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Pt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Pt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Pt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Pt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Bf=`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(` `),Vf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Bf));function Hf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){mi(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){mi(e)}i.currentTarget=null,a=c}}}}function Uf(e,t){var n=t[bt];n===void 0&&(n=t[bt]=new Set);var r=e+`__bubble`;n.has(r)||(qf(t,e,2,!1),n.add(r))}function Wf(e,t,n){var r=0;t&&(r|=4),qf(n,e,r,t)}var Gf=`_reactListening`+Math.random().toString(36).slice(2);function Kf(e){if(!e[Gf]){e[Gf]=!0,Mt.forEach(function(t){t!==`selectionchange`&&(Vf.has(t)||Wf(t,!1,e),Wf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Gf]||(t[Gf]=!0,Wf(`selectionchange`,!1,t))}}function qf(e,t,n,r){switch(Eh(t)){case 2:var i=bh;break;case 8:i=xh;break;default:i=Sh}n=i.bind(null,t,n,e),i=void 0,!Cn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Jf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=Et(s),o===null)return;if(c=o.tag,c===5||c===6||c===26||c===27){r=a=o;continue a}s=s.parentNode}}r=r.return}bn(function(){var r=a,i=hn(n),o=[];a:{var s=si.get(e);if(s!==void 0){var c=Pn,u=e;switch(e){case`keypress`:if(kn(n)===0)break a;case`keydown`:case`keyup`:c=Qn;break;case`focusin`:u=`focus`,c=Un;break;case`focusout`:u=`blur`,c=Un;break;case`beforeblur`:case`afterblur`:c=Un;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=Vn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Hn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=tr;break;case ei:case ti:case ni:c=Wn;break;case oi:c=nr;break;case`scroll`:case`scrollend`:c=In;break;case`wheel`:c=rr;break;case`copy`:case`cut`:case`paste`:c=Gn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=$n;break;case`submit`:c=er;break;case`toggle`:case`beforetoggle`:c=ir}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?s===null?null:s+`Capture`:s;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=xn(m,p),g!=null&&d.push(Yf(m,g,h))),f)break;m=m.return}0<d.length&&(s=new c(s,u,null,n,i),o.push({event:s,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,s=e===`mouseout`||e===`pointerout`,c&&n!==mn&&(u=n.relatedTarget||n.fromElement)&&(Et(u)||u[yt]))break a;(s||c)&&(u=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,s?(c=n.relatedTarget||n.toElement,s=r,c=c?Et(c):null,c!==null&&(f=l(c),d=c.tag,c!==f||d!==5&&d!==27&&d!==6)&&(c=null)):(s=null,c=r),s!==c&&(d=Vn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=$n,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=s==null?u:Ot(s),h=c==null?u:Ot(c),u=new d(g,m+`leave`,s,n,i),u.target=f,u.relatedTarget=h,g=null,Et(i)===r&&(d=new d(p,m+`enter`,c,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=s&&c?E(s,c,Zf):null,s!==null&&Qf(o,u,s,d,!1),c!==null&&f!==null&&Qf(o,f,c,d,!0)))}a:{if(s=r?Ot(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var _=Cr;else if(_r(s)){if(wr)_=Nr;else{_=jr;var v=Ar}}else c=s.nodeName,!c||c.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&ln(r.elementType)&&(_=Cr):_=Mr;if(_&&=_(e,r)){vr(o,_,n,i);break a}v&&v(e,s,r)}switch(v=r?Ot(r):window,e){case`focusin`:(_r(v)||v.contentEditable===`true`)&&(Wr=v,Gr=r,Kr=null);break;case`focusout`:Kr=Gr=Wr=null;break;case`mousedown`:qr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:qr=!1,Jr(o,n,i);break;case`selectionchange`:if(Ur)break;case`keydown`:case`keyup`:Jr(o,n,i)}var y;if(or)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else G?fr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(lr&&n.locale!==`ko`&&(G||b!==`onCompositionStart`?b===`onCompositionEnd`&&G&&(y=On()):(Tn=i,En=`value`in Tn?Tn.value:Tn.textContent,G=!0)),v=Xf(r,b),0<v.length&&(b=new Kn(b,e,null,n,i),o.push({event:b,listeners:v}),y?b.data=y:(y=pr(n),y!==null&&(b.data=y)))),(y=cr?mr(e,n):hr(e,n))&&(b=Xf(r,`onBeforeInput`),0<b.length&&(v=new Kn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:v,listeners:b}),v.data=y)),Lf(o,e,r,n,i)}Hf(o,t)})}function Yf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Xf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=xn(e,n),i!=null&&r.unshift(Yf(e,i,a)),i=xn(e,t),i!=null&&r.push(Yf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Zf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Qf(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=xn(n,a),l!=null&&o.unshift(Yf(n,l,c))):i||(l=xn(n,a),l!=null&&o.push(Yf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var $f=/\r\n?/g,ep=/\u0000|\uFFFD/g;function tp(e){return(typeof e==`string`?e:``+e).replace($f,`
|
|
9
|
+
`).replace(ep,``)}function np(e,t){return t=tp(t),tp(e)===t}function rp(e,t,n,r,i,a){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||an(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&an(e,``+r);else return;break;case`className`:Ut(e,`class`,r);break;case`tabIndex`:Ut(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ut(e,n,r);break;case`style`:cn(e,r,a);return;case`data`:if(t!==`object`){Ut(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=fn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof a==`function`&&(n===`formAction`?(t!==`input`&&rp(e,t,`name`,i.name,i,null),rp(e,t,`formEncType`,i.formEncType,i,null),rp(e,t,`formMethod`,i.formMethod,i,null),rp(e,t,`formTarget`,i.formTarget,i,null)):(rp(e,t,`encType`,i.encType,i,null),rp(e,t,`method`,i.method,i,null),rp(e,t,`target`,i.target,i,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=fn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=pn);return;case`onScroll`:r!=null&&Uf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Uf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(s(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(s(60));a?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=fn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Uf(`beforetoggle`,e),Uf(`toggle`,e),Ht(e,`popover`,r);break;case`xlinkActuate`:Wt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Wt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Wt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Wt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Wt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Wt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Ht(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=un.get(n)||n,Ht(e,n,r);else return}Bt=!0}function ip(e,t,n,r,i,a){switch(n){case`style`:cn(e,r,a);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(s(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(s(60));a?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)an(e,r);else if(typeof r==`number`||typeof r==`bigint`)an(e,``+r);else return;break;case`onScroll`:r!=null&&Uf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Uf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=pn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Nt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),a=n.slice(2,i?n.length-7:void 0),t=e[vt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(a,t,i),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(a,r,i);break a}Bt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Ht(e,n,r)}return}Bt=!0}function ap(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Uf(`error`,e),Uf(`load`,e);var r=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var o=n[a];if(o!=null)switch(a){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(s(137,t));default:rp(e,t,a,o,n,null)}}i&&rp(e,t,`srcSet`,n.srcSet,n,null),r&&rp(e,t,`src`,n.src,n,null);return;case`input`:Uf(`invalid`,e);var c=a=o=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:o=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:a=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(s(137,t));break;default:rp(e,t,r,d,n,null)}}$t(e,a,c,l,u,o,i,!1);return;case`select`:for(i in Uf(`invalid`,e),r=o=a=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:a=c;break;case`defaultValue`:o=c;break;case`multiple`:r=c;default:rp(e,t,i,c,n,null)}t=a,n=o,e.multiple=!!r,t==null?n!=null&&tn(e,!!r,n,!0):tn(e,!!r,t,!1);return;case`textarea`:for(o in Uf(`invalid`,e),a=i=r=null,n)if(n.hasOwnProperty(o)&&(c=n[o],c!=null))switch(o){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:a=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(s(91));break;default:rp(e,t,o,c,n,null)}rn(e,r,i,a);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:rp(e,t,l,r,n,null)}return;case`dialog`:Uf(`beforetoggle`,e),Uf(`toggle`,e),Uf(`cancel`,e),Uf(`close`,e);break;case`iframe`:case`object`:Uf(`load`,e);break;case`video`:case`audio`:for(r=0;r<Bf.length;r++)Uf(Bf[r],e);break;case`image`:Uf(`error`,e),Uf(`load`,e);break;case`details`:Uf(`toggle`,e);break;case`embed`:case`source`:case`link`:Uf(`error`,e),Uf(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(s(137,t));default:rp(e,t,u,r,n,null)}return;default:if(ln(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&ip(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&rp(e,t,c,r,n,null))}var op={};function sp(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,a=null,o=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||rp(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Bt=!0),a=m;break;case`name`:m!==f&&(Bt=!0),i=m;break;case`checked`:m!==f&&(Bt=!0),u=m;break;case`defaultChecked`:m!==f&&(Bt=!0),d=m;break;case`value`:m!==f&&(Bt=!0),o=m;break;case`defaultValue`:m!==f&&(Bt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(s(137,t));break;default:m!==f&&rp(e,t,p,m,r,f)}}Qt(e,o,c,l,u,d,a,i);return;case`select`:for(a in m=o=c=p=null,n)if(l=n[a],n.hasOwnProperty(a)&&l!=null)switch(a){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(a)||rp(e,t,a,null,r,l)}for(i in r)if(a=r[i],l=n[i],r.hasOwnProperty(i)&&(a!=null||l!=null))switch(i){case`value`:a!==l&&(Bt=!0),p=a;break;case`defaultValue`:a!==l&&(Bt=!0),c=a;break;case`multiple`:a!==l&&(Bt=!0),o=a;default:a!==l&&rp(e,t,i,a,r,l)}t=c,n=o,r=m,p==null?!!r!=!!n&&(t==null?tn(e,!!n,n?[]:``,!1):tn(e,!!n,t,!0)):tn(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:rp(e,t,c,null,r,i)}for(o in r)if(i=r[o],a=n[o],r.hasOwnProperty(o)&&(i!=null||a!=null))switch(o){case`value`:i!==a&&(Bt=!0),p=i;break;case`defaultValue`:i!==a&&(Bt=!0),m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(s(91));break;default:i!==a&&rp(e,t,o,i,r,a)}nn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:rp(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Bt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:rp(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&rp(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(s(137,t));break;default:rp(e,t,u,p,r,m)}return;default:if(ln(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&ip(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||ip(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&rp(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||rp(e,t,f,p,r,m)}function cp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function lp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&cp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&cp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var up=null,dp=null;function fp(e){return e.nodeType===9?e:e.ownerDocument}function pp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function mp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function hp(e,t,n,r){return n=fp(n).createElement(e),n[_t]=r,n[vt]=t,ap(n,e,t),At(n),n}function gp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _p=null;function vp(){var e=window.event;return e&&e.type===`popstate`?e!==_p&&(_p=e,!0):(_p=null,!1)}var yp=typeof setTimeout==`function`?setTimeout:void 0,bp=typeof clearTimeout==`function`?clearTimeout:void 0,xp=typeof Promise==`function`?Promise:void 0,Sp=typeof requestAnimationFrame==`function`?requestAnimationFrame:yp,Cp=typeof queueMicrotask==`function`?queueMicrotask:xp===void 0?yp:function(e){return xp.resolve(null).then(e).catch(wp)};function wp(e){setTimeout(function(){throw e})}function Tp(e){return e===`head`}function Ep(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===`/$`||n===`/&`){if(r===0){e.removeChild(i),Gh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)bm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,bm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[W]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&bm(e.ownerDocument.body)}n=i}while(n);Gh(t)}function Dp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Op(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function kp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Ap(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function jp(e){return Ap(e.getBoundingClientRect(),getComputedStyle(e),e)}function Mp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Ap(t,n,e)}function Np(e){return e.documentElement.clientHeight}function Pp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Fp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Np(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=$m(f),u>nh){s.length=o;break}f=new Promise(Pp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Ip(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Ip.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Ip.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Ip.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Lp(e){return{name:e,group:new Ip(`group`,e),imagePair:new Ip(`image-pair`,e),old:new Ip(`old`,e),new:new Ip(`new`,e)}}function Rp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Rp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Up(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Vp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),h(this._fragmentFiber.child,!1,zp,e,s,r)}this._eventListeners=a}};function zp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Rp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Up(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Vp(i.optionsOrUseCapture),h(this._fragmentFiber.child,!1,Bp,e,n,i),r.splice(t,1),a!==null&&a()}};function Bp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Vp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Hp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Up(e,t,n,r){if(e.length===0)return-1;r=Hp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Hp(a.optionsOrUseCapture)===r)return i}return-1}Rp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Vp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Vp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Rp.prototype.focus=function(e){h(this._fragmentFiber.child,!0,Wp,e,void 0,void 0)};function Wp(e,t){return e.tag!==6&&(e=b(e),gm(e,t))}Rp.prototype.focusLast=function(e){var t=[];h(this._fragmentFiber.child,!0,Gp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Wp(t[n],e);n--);};function Gp(e,t){return t.push(e),!1}Rp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=fp(e).activeElement,e!==null&&h(this._fragmentFiber.child,!1,Kp,e,void 0,void 0))};function Kp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Rp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),h(this._fragmentFiber.child,!1,qp,e,void 0,void 0)};function qp(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}Rp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),h(this._fragmentFiber.child,!1,Jp,e,void 0,void 0);for(var n=t=0;n<Yp.length;n++){var r=Yp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Yp[t++]=r}Yp.length=t}};function Jp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var Yp=[],Xp=!1;function Zp(e,t,n){Yp.push({fragmentInstance:e,observer:t,instance:n}),Xp||(Xp=!0,_m(function(){Xp=!1;var e=Yp;Yp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Rp.prototype.getClientRects=function(){var e=[];return h(this._fragmentFiber.child,!1,Qp,e,void 0,void 0),e};function Qp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Rp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Rp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];h(this._fragmentFiber.child,!1,Gp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||$p(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function $p(e,t,n,r,i){var a=Et(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(h(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(h(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function em(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Rp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(s(566));var t=[];h(this._fragmentFiber.child,!1,Gp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),em(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var i=t[r];i.tag===6?(i=b(i),em(i,n)):b(i).scrollIntoView(e),r+=n?-1:1}};function tm(e,t){return e=b(e),nm(e,t),!1}function nm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function rm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Vp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Yp.length;i++){var a=Yp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Yp[r++]=a)}Yp.length=r,n.observe(e)}),nm(e,t))}function im(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Vp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Zp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function am(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:am(n),Tt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function om(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[W])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=fm(e.nextSibling),e===null)break}return null}function sm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=fm(e.nextSibling),e===null))return null;return e}function cm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=fm(e.nextSibling),e===null))return null;return e}function lm(e){return e.data===`$?`||e.data===`$~`}function um(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function dm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function fm(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===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var pm=null;function mm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return fm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function hm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function gm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function _m(e){Sp(function(){Sp(function(t){return e(t)})})}function vm(e,t,n){switch(t=fp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(s(452));return e;case`head`:if(e=t.head,!e)throw Error(s(453));return e;case`body`:if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function ym(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&rp(e,t,r,null,op,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===pn&&(e.onclick=null),Tt(e)}function bm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Tt(e)}var xm=new Map,Sm=new Set;function Cm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var wm=I.d;I.d={f:Tm,r:Em,D:km,C:Am,L:jm,m:Mm,X:Pm,S:Nm,M:Fm};function Tm(){var e=wm.f(),t=Vd();return e||t}function Em(e){var t=Dt(e);t!==null&&t.tag===5&&t.type===`form`?Qs(t):wm.r(e)}var Dm=typeof document>`u`?null:document;function Om(e,t,n){var r=Dm;if(r&&typeof t==`string`&&t){var i=Zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Sm.has(i)||(Sm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),ap(t,`link`,e),At(t),r.head.appendChild(t)))}}function km(e){wm.D(e),Om(`dns-prefetch`,e,null)}function Am(e,t){wm.C(e,t),Om(`preconnect`,e,t)}function jm(e,t,n){wm.L(e,t,n);var r=Dm;if(r&&e&&t){var i=`link[rel="preload"][as="`+Zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Zt(n.imageSizes)+`"]`)):i+=`[href="`+Zt(e)+`"]`;var a=i;switch(t){case`style`:a=Lm(e);break;case`script`:a=Vm(e)}if(!(xm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),xm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Rm(a))||t===`script`&&r.querySelector(Hm(a))))){var o=r.createElement(`link`);ap(o,`link`,e),t===`style`&&(o[wt]=!0,o.onload=o.onerror=function(){jt(o)}),At(o),r.head.appendChild(o)}}}function Mm(e,t){wm.m(e,t);var n=Dm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Zt(r)+`"][href="`+Zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Vm(e)}if(!xm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),xm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Hm(a)))return}r=n.createElement(`link`),ap(r,`link`,e),At(r),n.head.appendChild(r)}}}function Nm(e,t,n){wm.S(e,t,n);var r=Dm;if(r&&e){var i=kt(r).hoistableStyles,a=Lm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Rm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=xm.get(a))&&Gm(e,n);var c=o=r.createElement(`link`);At(c),ap(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Wm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Pm(e,t){wm.X(e,t);var n=Dm;if(n&&e){var r=kt(n).hoistableScripts,i=Vm(e),a=r.get(i);a||(a=n.querySelector(Hm(i)),a||(e=D({src:e,async:!0},t),(t=xm.get(i))&&Km(e,t),a=n.createElement(`script`),At(a),ap(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Fm(e,t){wm.M(e,t);var n=Dm;if(n&&e){var r=kt(n).hoistableScripts,i=Vm(e),a=r.get(i);a||(a=n.querySelector(Hm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=xm.get(i))&&Km(e,t),a=n.createElement(`script`),At(a),ap(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Im(e,t,n,r){var i=(i=ye.current)?Cm(i):null;if(!i)throw Error(s(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Lm(n.href),t=kt(i).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Lm(n.href);var a=kt(i).hoistableStyles,o=a.get(e);if(o||(i=i.ownerDocument||i,o={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,o),(a=i.querySelector(Rm(e)))?a._p||(o.instance=a,o.state.loading=5):(a=xm.get(e),a||(a={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},xm.set(e,a)),Bm(i,e,a,o.state))),t&&r===null)throw Error(s(528,``));return o}if(t&&r!==null)throw Error(s(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Vm(n),t=kt(i).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Lm(e){return`href="`+Zt(e)+`"`}function Rm(e){return`link[rel="stylesheet"][`+e+`]`}function zm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Bm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[wt]){r.loading=1;return}}else t=e.createElement(`link`),t[wt]=!0,t.onload=t.onerror=jt.bind(null,t),ap(t,`link`,n),At(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Vm(e){return`[src="`+Zt(e)+`"]`}function Hm(e){return`script[async]`+e}function Um(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Zt(n.href)+`"]`);if(r)return t.instance=r,At(r),r;var i=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),At(r),ap(r,`style`,i),Wm(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Lm(n.href);var a=e.querySelector(Rm(i));if(a)return t.state.loading|=4,t.instance=a,At(a),a;r=zm(n),(i=xm.get(i))&&Gm(r,i),a=(e.ownerDocument||e).createElement(`link`),At(a);var o=a;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),ap(a,`link`,r),t.state.loading|=4,Wm(a,n.precedence,e),t.instance=a;case`script`:return a=Vm(n.src),(i=e.querySelector(Hm(a)))?(t.instance=i,At(i),i):(r=n,(i=xm.get(a))&&(r=D({},n),Km(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),At(i),ap(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(s(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Wm(r,n.precedence,e));return t.instance}function Wm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Gm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Km(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var qm=null;function Jm(e,t,n){if(qm===null){var r=new Map,i=qm=new Map;i.set(n,r)}else i=qm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[W]||a[_t]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Ym(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Xm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Zm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Qm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function $m(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function eh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=$m(t),e.suspenseyImages.push(t)),e=oh.bind(e),t.decode().then(e,e))}function th(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Lm(r.href),a=t.querySelector(Rm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ah.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,At(a);return}a=t.ownerDocument||t,r=zm(r),(i=xm.get(i))&&Gm(r,i),a=a.createElement(`link`),At(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),ap(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ah.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var nh=0;function rh(e,t){return e.stylesheets&&e.count===0&&ch(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ch(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&nh===0&&(nh=62500*lp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ch(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>nh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ih(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ch(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ah(){this.count--,ih(this)}function oh(){this.imgCount--,ih(this)}var sh=null;function ch(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sh=new Map,t.forEach(lh,e),sh=null,ah.call(e))}function lh(e,t){if(!(t.state.loading&4)){var n=sh.get(e);if(n)var r=n.get(null);else{n=new Map,sh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ah.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var uh={$$typeof:te,Provider:null,Consumer:null,_currentValue:L,_currentValue2:L,_threadCount:0};function dh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=st(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=st(0),this.hiddenUpdates=st(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function fh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new dh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ei(3,null,null,t),e.current=a,a.stateNode=e,t=Ea(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},co(a),e}function ph(e){return e?(e=wi,e):wi}function mh(e,t,n,r,i,a){i=ph(i),r.context===null?r.context=i:r.pendingContext=i,r=uo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=fo(e,r,t),n!==null&&(Id(n,e,t),po(n,e,t))}function hh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gh(e,t){hh(e,t),(e=e.alternate)&&hh(e,t)}function _h(e){if(e.tag===13||e.tag===31){var t=xi(e,67108864);t!==null&&Id(t,e,67108864),gh(e,67108864)}}function vh(e){if(e.tag===13||e.tag===31){var t=Nd();t=pt(t);var n=xi(e,t);n!==null&&Id(n,e,t),gh(e,t)}}var yh=!0;function bh(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=2,Sh(e,t,n,r)}finally{I.p=a,F.T=i}}function xh(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=8,Sh(e,t,n,r)}finally{I.p=a,F.T=i}}function Sh(e,t,n,r){if(yh){var i=Ch(r);if(i===null)Jf(e,t,r,wh,n),Fh(e,r);else if(Lh(i,e,t,n,r))r.stopPropagation();else if(Fh(e,r),t&4&&-1<Ph.indexOf(e)){for(;i!==null;){var a=Dt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=tt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Je(o);s.entanglements[1]|=c,o&=~c}Df(a),!(Zu&6)&&(vd=H()+500,Of(0,!1))}}break;case 31:case 13:s=xi(a,2),s!==null&&Id(s,a,2),Vd(),gh(a,2)}if(a=Ch(r),a===null&&Jf(e,t,r,wh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Jf(e,t,r,null,n)}}function Ch(e){return e=hn(e),Th(e)}var wh=null;function Th(e){if(wh=null,e=Et(e),e!==null){var t=l(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=u(t),e!==null)return e;e=null}else if(n===31){if(e=d(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 wh=e,null}function Eh(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Le()){case Re:return 2;case ze:return 8;case Be:case Ve:return 32;case He:return 268435456;default:return 32}default:return 32}}var Dh=!1,Oh=null,kh=null,Ah=null,jh=new Map,Mh=new Map,Nh=[],Ph=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Fh(e,t){switch(e){case`focusin`:case`focusout`:Oh=null;break;case`dragenter`:case`dragleave`:kh=null;break;case`mouseover`:case`mouseout`:Ah=null;break;case`pointerover`:case`pointerout`:jh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Mh.delete(t.pointerId)}}function Ih(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=Dt(t),t!==null&&_h(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Lh(e,t,n,r,i){switch(t){case`focusin`:return Oh=Ih(Oh,e,t,n,r,i),!0;case`dragenter`:return kh=Ih(kh,e,t,n,r,i),!0;case`mouseover`:return Ah=Ih(Ah,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return jh.set(a,Ih(jh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Mh.set(a,Ih(Mh.get(a)||null,e,t,n,r,i)),!0}return!1}function Rh(e){var t=Et(e.target);if(t!==null){var n=l(t);if(n!==null){if(t=n.tag,t===13){if(t=u(n),t!==null){e.blockedOn=t,gt(e.priority,function(){vh(n)});return}}else if(t===31){if(t=d(n),t!==null){e.blockedOn=t,gt(e.priority,function(){vh(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 zh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ch(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);mn=r,n.target.dispatchEvent(r),mn=null}else return t=Dt(n),t!==null&&_h(t),e.blockedOn=n,!1;t.shift()}return!0}function Bh(e,t,n){zh(e)&&n.delete(t)}function Vh(){Dh=!1,Oh!==null&&zh(Oh)&&(Oh=null),kh!==null&&zh(kh)&&(kh=null),Ah!==null&&zh(Ah)&&(Ah=null),jh.forEach(Bh),Mh.forEach(Bh)}function Hh(e,n){e.blockedOn===n&&(e.blockedOn=null,Dh||(Dh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Vh)))}var Uh=null;function Wh(e){Uh!==e&&(Uh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Uh===e&&(Uh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Th(r||n)===null)continue;break}var a=Dt(n);a!==null&&(e.splice(t,3),t-=3,Xs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Gh(e){function t(t){return Hh(t,e)}Oh!==null&&Hh(Oh,e),kh!==null&&Hh(kh,e),Ah!==null&&Hh(Ah,e),jh.forEach(t),Mh.forEach(t);for(var n=0;n<Nh.length;n++){var r=Nh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Nh.length&&(n=Nh[0],n.blockedOn===null);)Rh(n),n.blockedOn===null&&Nh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[vt]||null;if(typeof a==`function`)o||Wh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[vt]||null)s=o.formAction;else if(Th(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Wh(n)}}}function Kh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function qh(e){this._internalRoot=e}Jh.prototype.render=qh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var n=t.current;mh(n,Nd(),e,t,null,null)},Jh.prototype.unmount=qh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mh(e.current,2,null,e,null,null),Vd(),t[yt]=null}};function Jh(e){this._internalRoot=e}Jh.prototype.unstable_scheduleHydration=function(e){if(e){var t=ht();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Nh.length&&t!==0&&t<Nh[n].priority;n++);Nh.splice(n,0,e),n===0&&Rh(e)}};var Yh=r.version;if(Yh!==`19.3.1`)throw Error(s(527,Yh,`19.3.1`));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(s(188)):(e=Object.keys(e).join(`,`),Error(s(268,e)));return e=p(t),e=e===null?null:m(e),e=e===null?null:e.stateNode,e};var Xh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Zh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zh.isDisabled&&Zh.supportsFiber)try{Ge=Zh.inject(Xh),Ke=Zh}catch{}}e.createRoot=function(e,t){if(!c(e))throw Error(s(299));var n=!1,r=``,i=yc,a=bc,o=xc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=fh(e,1,!1,null,null,n,r,null,i,a,o,Kh),e[yt]=t.current,Kf(e),new qh(t)}})),c=e(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()}))(),l=i();function u(e){let[t,n]=(0,l.useState)();return(0,l.useEffect)(()=>{let t=new EventSource(`/api/reviews/${e}/live`);return t.onmessage=e=>n(JSON.parse(e.data)),t.onerror=async()=>{if(t.readyState!==EventSource.CLOSED)return;let r=await C(`/api/reviews`).catch(()=>void 0);r&&!r.some(t=>t.id===e)&&n([`There's no review called “${e}” here.`])},()=>t.close()},[e]),t}function d(){let[e,t]=(0,l.useState)();return(0,l.useEffect)(()=>void C(`/api/reviews`).then(t),[]),e}function f(){let[e,t]=(0,l.useState)();return(0,l.useEffect)(()=>void C(`/api/you`).then(({name:e})=>t(e)),[]),e}var p=new Map;function m(e,t,n){let r=`/api/reviews/${e}/rounds/${t}/files/${n}`;return p.has(r)||p.set(r,C(r)),p.get(r)}function h(e,t,n){let r=`/api/reviews/${e}/rounds/${t}/files/${n}`;if(!p.has(r)){let i=m(e,t,`assets/${n}`).catch(()=>({})),a=fetch(r).then(e=>e.ok?e.text():Promise.reject(Error(`${r}: ${e.status}`)));p.set(r,Promise.all([a,i]).then(([n,r])=>JSON.parse(g(n,r,`/api/reviews/${e}/rounds/${t}/files/`))))}return p.get(r)}function g(e,t,n){if(!Object.keys(t).length)return e;let r=e=>e.trim().split(/\s+/)[0];return e.replace(/"srcset":"([^"]*)"/g,(e,n)=>{let i=n.split(/,\s+/).map(r).find(e=>e in t);return i?`"srcset":"${i}"`:e}).replace(/https?:\/\/[^\s"'()\\]+/g,e=>e in t?n+t[e]:e)}var _=e=>`readings/${e.replace(/\.json$/,``)}`,v=(e,t,n)=>m(e,t,`${_(n)}.json`).catch(()=>[]),y=(e,t,n)=>m(e,t,`${_(n)}.glimpses.json`).catch(()=>[]),b=(e,t,n,r)=>`/api/reviews/${e}/rounds/${t}/files/${_(n)}/${r+1}.png`;async function x(e,t){return w(`/api/reviews/${e}/sends`,t)}async function S(e,t){return w(`/api/reviews/${e}/accept`,{by:t})}async function C(e){let t=await fetch(e);if(!t.ok)throw Error(`${e}: ${t.status}`);return t.json()}async function w(e,t){try{let n=await fetch(e,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t)});return n.ok?[]:(await n.json()).problems??[`It wasn't kept (${n.status}).`]}catch{return[`Playthrough isn't running here any more. Start it again with playthrough open, then try again.`]}}async function T(e,t,n,r,i){try{let a=await fetch(`/api/reviews/${e}/branches`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({round:t,...n,events:r,recording:i})});return a.ok?(await a.json()).length:void 0}catch{return}}var E={button:`button`,link:`link`,dialog:`dialog`,alertdialog:`dialog`,table:`table`,grid:`table`,treegrid:`table`,heading:`heading`,textbox:`field`,searchbox:`search field`,combobox:`menu`,checkbox:`checkbox`,radio:`option`,switch:`switch`,slider:`slider`,listbox:`list`,option:`option`,tab:`tab`,menu:`menu`,menuitem:`menu item`,img:`image`,group:`choice`,radiogroup:`choice`},D=e=>E[e.role]??e.role,O=e=>(e.role===`button`||e.role===`link`)&&!!e.name&&e.words.replace(/\s/g,``).length<=2&&!/[\p{L}\p{N}]/u.test(e.words),k=(e,t=60)=>e.length>t?e.slice(0,t-1).trimEnd()+`…`:e;function A(e){return e.role===`status`||e.role===`alert`?`Message`:e.role===`box`?`“${k(j(e))}” ${e.live?`message`:`area`}`:e.role===`text`?`“${k(e.words)}”`:!E[e.role]&&e.name?`“${k(e.name)}”`:e.role===`menuitem`&&e.name?`“${k(e.name)}” in the menu`:O(e)?e.name:`${k(e.name)} ${D(e)}`.trim()}function j({name:e,wordsInside:t}){return e.length>2||!t?.startsWith(e)?e:t.slice(e.length).trim()||e}var M=(e,t,n=4)=>Math.abs(e-t)<=n,N=/^(dialog|alertdialog|status|alert|group|radiogroup|table|grid|treegrid|listbox|menu|box)$/,ee=(e,t)=>t.holder===void 0?void 0:e.things[t.holder],te=(e,t)=>t.parent===void 0?void 0:e.things[t.parent],ne=/^(for|from|of|in|on|at|to|by|and|with|·|–|—|-|:|,)$/i;function re(e){let t=e.replace(/[“”"]/g,``).split(/\s+/).filter(e=>e&&!/\d/.test(e)&&!/^[$€£¥%#+−-]+$/.test(e));for(;t.length&&ne.test(t.at(-1));)t.pop();for(;t.length&&ne.test(t[0]);)t.shift();return t.join(` `)}var ie=e=>`${e.role}:${e.name}|${e.words}`,ae=(e,t)=>JSON.stringify(e.look)===JSON.stringify(t.look),oe=(e,t)=>Math.hypot(e.page.x-t.page.x,e.page.y-t.page.y),se=(e,t)=>M(e.page.x,t.page.x,8)&&M(e.page.y,t.page.y,8);function ce(e,t){let n=Math.min(e.page.x+e.box.width,t.page.x+t.box.width)-Math.max(e.page.x,t.page.x),r=Math.min(e.page.y+e.box.height,t.page.y+t.box.height)-Math.max(e.page.y,t.page.y);return Math.max(0,n)*Math.max(0,r)/Math.max(1,Math.min(e.box.width*e.box.height,t.box.width*t.box.height))}function le(e,t){let n=new Map,r=[],i=(e,t)=>{let n=ee(e,t);return n?ie(n):``},a=(e,t)=>{n.set(t,e);let i=de(e,t);i&&r.push(i)},o=new Map,s=e=>o.get(e)??o.set(e,{then:[],now:[]}).get(e);for(let t of e.things)s(ie(t)).then.push(t);for(let e of t.things)s(ie(e)).now.push(e);let c=[],l=[];for(let{then:r,now:s}of o.values()){let o=[],u=[];for(let n of new Set(r.map(t=>i(e,t)))){let c=r.filter(t=>i(e,t)===n),l=s.filter(e=>i(t,e)===n);c.length===l.length?c.forEach((e,t)=>a(e,l[t])):o.push(...c)}u.push(...s.filter(e=>!n.has(e)));let d=o.flatMap(n=>u.map(r=>({a:n,b:r,cost:oe(n,r)+(ae(n,r)?0:200)+(i(e,n)===i(t,r)?0:400)}))),f=new Set;for(let{a:e,b:t}of d.sort((e,t)=>e.cost-t.cost))f.has(e)||f.has(t)||(f.add(e).add(t),a(e,t));c.push(...o.filter(e=>!f.has(e))),l.push(...u.filter(e=>!f.has(e)))}c.sort((t,n)=>e.things.indexOf(t)-e.things.indexOf(n)),l.sort((e,n)=>t.things.indexOf(e)-t.things.indexOf(n));let u=(e,t)=>{let n=new Map;for(let r of t){if(r.role!==`text`||!ee(e,r))continue;let t=i(e,r);n.set(t,(n.get(t)??0)+1)}return n},d=u(e,c),f=u(t,l),p=e=>{let t=c.findIndex(e);return t<0?void 0:c.splice(t,1)[0]};for(let o of l){let s=/^(button|link|tab|checkbox|switch)$/.test(o.role)?p(e=>e.role===`text`&&e.words===o.name&&ce(e,o)>.5):void 0;s?(n.set(o,s),r.push({what:`became`,then:s,now:o})):(s=o.role===`text`?void 0:p(n=>n.role===o.role&&(pe(t,o,n.name)||pe(e,n,o.name)||P(e,n)&&P(t,o)&&ce(n,o)>.5)),s?(n.set(o,s),ae(s,o)||r.push({what:`looks different`,then:s,now:o})):(s=o.role===`text`?p(e=>e.role===`text`&&se(e,o))??(ee(t,o)&&d.get(i(t,o))===f.get(i(t,o))?p(n=>n.role===`text`&&i(e,n)===i(t,o)):void 0)??p(n=>n.role===`text`&&i(e,n)===i(t,o)&&!!re(o.words)&&re(n.words)===re(o.words)):p(e=>e.role===o.role&&(e.name===o.name||se(e,o)||he(e,o)||F(e,o)||me.test(o.role)&&(!!re(o.name)&&re(e.name)===re(o.name)||ce(e,o)>.5))),s?o.role===`box`?a(s,o):(n.set(o,s),r.push({what:`reworded`,then:s,now:o})):r.push({what:`new`,now:o})))}for(let e of c)r.push({what:`gone`,then:e});for(let[e,i]of[...r.entries()].reverse()){if(i.what!==`new`||i.now.role!==`box`)continue;let a=i.now,o=t.things.find(e=>e.role===`text`&&ee(t,e)===a&&e.words===a.name),s=o&&n.get(o);if(!s||!se(s,a)||!M(s.box.width,a.box.width)||!M(s.box.height,a.box.height))continue;n.set(a,s),r.splice(e,1);let c=r.findIndex(e=>`now`in e&&e.now===o);c>=0&&r.splice(c,1);let{background:l,...u}=s.look,{background:d,...f}=o.look;JSON.stringify(u)!==JSON.stringify(f)&&r.push({what:`looks different`,then:s,now:o})}let m=new Set(r.flatMap(e=>e.what===`new`&&N.test(e.now.role)?[e.now]:[])),h=e=>[ee(t,e),te(t,e)].some(e=>e&&(m.has(e)||h(e)));for(let[e,t]of[...n]){if(!h(e))continue;n.delete(e);let i=r.findIndex(t=>`now`in t&&t.now===e);i>=0&&r.splice(i,1),r.push({what:`new`,now:e},{what:`gone`,then:t})}let g=new Set(r.flatMap(e=>e.what===`new`?[e.now]:[])),_=new Set(r.flatMap(e=>e.what===`gone`?[e.then]:[])),v=new Set(r.flatMap(e=>e.what===`reworded`&&e.now.role===`text`?[e.now]:[])),y=new Set(r.flatMap(e=>e.what===`reworded`&&e.then.role===`text`?[e.then]:[])),b=(e,t,n)=>[ee(e,t),te(e,t)].some(e=>e&&n.has(e));return{differences:ue(r.filter(n=>{if(n.what===`new`&&b(t,n.now,g)||n.what===`gone`&&b(e,n.then,_))return!1;if(n.what===`looks different`)return!0;let[r,i,a]=n.what===`gone`?[e,n.then,y]:[t,n.now,v],o=te(r,i);return!(i.role===`text`&&o&&a.has(o))}),e,t),was:n}}function ue(e,t,n){let r=new Map,i=new Set;for(let t of[`new`,`gone`]){let n=new Map;for(let r of e){if(r.what!==t)continue;let e=r.what===`new`?r.now:r.then;if(e.role!==`text`)continue;let a=[...n.keys()].find(t=>t.parent===e.parent&&M(t.page.y,e.page.y));a?n.get(a).push(e):n.set(e,[e]),i.add(e)}for(let[e,t]of n)r.set(e,t)}return e.flatMap(e=>{if(e.what!==`new`&&e.what!==`gone`)return[e];let a=e.what===`new`?e.now:e.then,o=r.get(a);if(!o)return i.has(a)?[]:[e];if(o.length===1)return[e];let s=e.what===`new`?n:t,c=o.sort((e,t)=>s.things.indexOf(e)-s.things.indexOf(t)),l=c.map(e=>e.words).join(` `),u=Math.min(...c.map(e=>e.page.x)),d=Math.max(...c.map(e=>e.page.x+e.box.width)),f={...c[0],name:l,words:l,box:{...c[0].box,x:c[0].box.x+u-c[0].page.x,width:d-u},page:{...c[0].page,x:u}};return[e.what===`new`?{what:`new`,now:f}:{what:`gone`,then:f}]})}function de(e,t){if(!ae(e,t))return{what:`looks different`,then:e,now:t};if(!fe(e,t)){if(!M(e.box.width,t.box.width)||!M(e.box.height,t.box.height))return{what:`resized`,then:e,now:t};if(!M(e.page.x,t.page.x)||!M(e.page.y,t.page.y))return{what:`moved`,then:e,now:t}}}function fe(e,t){let n=e=>/^(transparent|rgba\(0, 0, 0, 0\))$/.test(e.look.background)&&e.look.border===`none`,r=M(e.page.x,t.page.x)||M(e.page.x+e.box.width,t.page.x+t.box.width);return e.role===`text`&&e.words===t.words&&n(e)&&n(t)&&M(e.box.height,t.box.height)&&M(e.page.y,t.page.y)&&r}function pe(e,t,n){if(!n||!t.name.startsWith(n+` `))return!1;let r=t.name.slice(n.length+1);return e.things.some(n=>te(e,n)===t&&n.words===r)}var me=/^(button|link|textbox|searchbox|combobox|checkbox|radio|switch|slider|tab|menuitem|option)$/,P=(e,t)=>e.things.some(n=>te(e,n)===t&&me.test(n.role)),he=(e,t)=>N.test(t.role)&&ce(e,t)>.5,F=(e,t)=>/^(box|menu)$/.test(t.role)&&!!e.wordsInside&&I(e)===I(t),I=e=>(e.wordsInside??``).split(` `).sort().join(` `);function L(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function R(e,t=`|`){return e.map(e=>Le(e)).join(t)}function ge(e,t){return typeof t==`bigint`?t.toString():t}var z=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function B(e){return new z(e)}function V(e){return e==null}function _e(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ve(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function ye(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function be(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function xe(e){return be(e._zod.def)??e._zod.def.shape}function Se(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return ye(this,t,e),e},enumerable:!0,configurable:!0})}function Ce(e,t,n){t in e?ye(e,t,n):e[t]=n}function we(e,t,n,r){let i=xe(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?Se(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):Ce(e,a,r?r(n.value,a):n.value))}}function Te(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?Se(e,n,()=>t[n]):Ce(e,n,r.value))}}function Ee(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function De(e){return JSON.stringify(e)}function Oe(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var ke=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Ae(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var je=B(()=>{if(Et.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Me(e){if(Ae(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Ae(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function Ne(e){return Me(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Pe=new Set([`string`,`number`,`symbol`]);function Fe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Ie(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function H(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Le(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Re(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var ze={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Be={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Ve(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return we(i,e,He(e,t)),Ie(e,Ee(n,{shape:i,checks:[]}))}function He(e,t){let n=xe(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function Ue(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(He(e,t)),a={};return we(a,e,Reflect.ownKeys(xe(e)).filter(e=>!i.has(e))),Ie(e,Ee(n,{shape:a,checks:[]}))}function We(e,t){if(!Me(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=xe(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Ie(e,Ee(e._zod.def,{shape:Ge(e,t)}))}function Ge(e,t){let n={};return we(n,e,Reflect.ownKeys(xe(e))),Te(n,t),n}function Ke(e,t){if(!Me(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Ie(e,Ee(e._zod.def,{shape:Ge(e,t)}))}function qe(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return we(n,e,Reflect.ownKeys(xe(e))),we(n,t,Reflect.ownKeys(xe(t))),Ie(e,Ee(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Je(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(He(t,n)):void 0,o={};return we(o,t,Reflect.ownKeys(xe(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),Ie(t,Ee(t._zod.def,{shape:o,checks:[]}))}function Ye(e,t,n){let r=n?new Set(He(t,n)):void 0,i={};return we(i,t,Reflect.ownKeys(xe(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),Ie(t,Ee(t._zod.def,{shape:i}))}function Xe(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Ze(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Qe(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function $e(e){return typeof e==`string`?e:e?.message}function et(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function tt(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function nt(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:$e(e.inst?._zod.def?.error?.(e))??$e(a?.(e))??$e(t?.error?.(e))??$e(n.customError?.(e))??$e(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var rt=/[\uD800-\uDBFF]/;function it(e){let t=e.length;if(!rt.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function at(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function ot(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function st(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function ct(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):ft(e,n,r.value)}}function lt(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function ut(e,t,n){return lt(e,t,n,!1)}function dt(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return lt(this,n,r(this))},set(e){lt(this,n,e)}})}return t}function ft(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:lt(this,t,n.bind(this))},set(e){lt(this,t,e)}})}function pt(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var mt,ht=!1,gt={configurable:!0,get(){ht=!0}};function U(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&mt!==e._zod?mt=void 0:(mt=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,gt);let e=ht;ht=!1;try{let r=n(this);return ht?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),ht||=e,r}catch(n){throw delete this[t],ht||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function _t(e,t,n,r){let i=pt(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var vt=`~constantCatch`;function yt(e){let t=()=>e;return t[vt]=!0,t}var bt,xt={value:void 0,enumerable:!1},St=`captureStackTrace`in Error?Error:null;function Ct(e){let t=St;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return St=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function W(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){xt.value=new a(r);try{Object.defineProperty(n,"_zod",xt)}finally{xt.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),ct(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Ct(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var wt=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Tt=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(bt=globalThis).__zod_globalConfig??(bt.__zod_globalConfig={});var Et=globalThis.__zod_globalConfig;function Dt(e){return e&&Object.assign(Et,e),Et}function Ot(){let e=this._zod;return e.message??=JSON.stringify(e.def,ge,2),e.message}function kt(e){this._zod.message=e}var At={get:Ot,set:kt,enumerable:!0,configurable:!0},jt={value:void 0,enumerable:!1},Mt=new WeakSet([Object.prototype,Error.prototype]),Nt=W(`$ZodError`,(e,t)=>{e.name=`$ZodError`,jt.value=t,Object.defineProperty(e,"issues",jt),jt.value=void 0,Object.defineProperty(e,"message",At);let n=Object.getPrototypeOf(e);Mt.has(n)||(Mt.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))});function Pt(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Ft(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Pt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function It(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function Lt(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Rt=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new wt;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>nt(e,o,Dt())));throw ke(n,a?.callee??t),n}return s.value};return t},zt=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>nt(e,o,Dt())));throw ke(n,a?.callee??t),n}return s.value};return t},Bt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new wt;return a.issues.length?Vt(e,a.issues,i):{success:!0,data:a.value}};function Vt(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>nt(e,n,Dt()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Ht=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Vt(e,a.issues,i):{success:!0,data:a.value}},Ut=Symbol.for(`zod.compile.invalid`),Wt=Symbol.for(`zod.compile.fallback`),Gt=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==Ut)return!0;if(r.definite===!0&&n===void 0)return!1}return Kt(e,t,n)});function Kt(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Wt]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new wt;return a.issues.length===0}var qt=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},Jt=e=>{let t=Rt(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,Lt(n,a))};return n},Yt=e=>{let t=Rt(e),n=(e,r,i,a)=>t(e,r,i,Lt(n,a));return n},Xt=e=>{let t=zt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,Lt(n,a))};return n},Zt=e=>{let t=zt(e),n=async(e,r,i,a)=>await t(e,r,i,Lt(n,a));return n},Qt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Bt(e)(t,n,i)},$t=e=>(t,n,r)=>Bt(e)(t,n,r),en=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ht(e)(t,n,i)},tn=e=>async(t,n,r)=>Ht(e)(t,n,r),nn=/^[cC][0-9a-z]{6,}$/,rn=/^[0-9a-z]+$/,an=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,on=/^[0-9a-vA-V]{20}$/,sn=/^[A-Za-z0-9]{27}$/,cn=/^[a-zA-Z0-9_-]{21}$/;function ln(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var un=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,dn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,fn=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,pn=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,mn=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function hn(){return new RegExp(mn,`u`)}var gn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,_n=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,vn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,yn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,bn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,xn=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Sn=/^https?$/,Cn=/^\+[1-9]\d{6,14}$/,wn=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function Tn(e){return RegExp(`^${e}$`)}var En=Tn(wn);function Dn(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function On(e){return RegExp(`^${Dn(e)}$`)}function kn(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Dn({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Dn({precision:e.precision})}`:n;return RegExp(`^${wn}T(?:${r})$`)}var An=/^[\s\S]{0,}$/,jn=/^-?\d+$/,Mn=/^-?\d+(?:\.\d+)?$/,Nn=/^(?:true|false)$/i,Pn=/^[^A-Z]*$/,Fn=/^[^a-z]*$/,In=W(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ln=e=>{let t=e.value;return!V(t)&&t.length!==void 0},Rn={number:`number`,bigint:`bigint`,object:`date`},zn=W(`$ZodCheckLessThan`,(e,t)=>{In.init(e,t);let n=Rn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Rn[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Bn=W(`$ZodCheckGreaterThan`,(e,t)=>{In.init(e,t);let n=Rn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Rn[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Vn=W(`$ZodCheckMultipleOf`,(e,t)=>{In.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):ve(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Hn=W(`$ZodCheckNumberFormat`,(e,t)=>{In.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ze[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Un=W(`$ZodCheckMaxLength`,(e,t)=>{var n;In.init(e,t),(n=e._zod.def).when??(n.when=Ln),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?it(r):i)<=t.maximum)return;let a=at(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Wn=W(`$ZodCheckMinLength`,(e,t)=>{var n;In.init(e,t),(n=e._zod.def).when??(n.when=Ln),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?it(r):i)>=t.minimum)return;let a=at(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Gn=W(`$ZodCheckLengthEquals`,(e,t)=>{var n;In.init(e,t),(n=e._zod.def).when??(n.when=Ln),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?it(r):i;if(a===t.length)return;let o=at(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Kn=W(`$ZodCheckStringFormat`,(e,t)=>{var n,r;In.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),qn=W(`$ZodCheckRegex`,(e,t)=>{Kn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Jn=W(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Pn,Kn.init(e,t)}),Yn=W(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Fn,Kn.init(e,t)}),Xn=W(`$ZodCheckIncludes`,(e,t)=>{In.init(e,t);let n=Fe(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Zn=W(`$ZodCheckStartsWith`,(e,t)=>{In.init(e,t);let n=RegExp(`^${Fe(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Qn=W(`$ZodCheckEndsWith`,(e,t)=>{In.init(e,t);let n=RegExp(`.*${Fe(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),$n=W(`$ZodCheckOverwrite`,(e,t)=>{In.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),er=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
10
|
+
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
|
|
11
|
+
`)}\n};`)(...Object.values(this.closed))}},tr={major:4,minor:6,patch:7},nr=W(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=tr;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=Xe(t),a;for(let o of n){if(o._zod.def.when){if(Ze(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new wt;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(tt(t.issues,n,e),i||=Xe(t,n))});else{if(t.issues.length===n)continue;tt(t.issues,n,e),i||=Xe(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Xe(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new wt;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new wt;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return ut(this,`~standard`,ar(this))},set"~standard"(e){lt(this,`~standard`,e)}}),rr=(e,t)=>e.issues.length?{issues:e.issues.map(e=>nt(e,t,Dt()))}:{value:e.value};async function ir(e,t){let n={async:!0};return rr(await e._zod.run({value:t,issues:[]},n),n)}function ar(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return rr(r,n)}catch{}return ir(e,t)},vendor:`zod`,version:1}}var or=W(`$ZodString`,(e,t)=>{nr.init(e,t),e._zod.pattern=t.pattern??An,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),sr=W(`$ZodStringFormat`,(e,t)=>{Kn.init(e,t),or.init(e,t)}),cr=W(`$ZodGUID`,(e,t)=>{t.pattern??=dn,sr.init(e,t)}),lr=W(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=fn(e)}else t.pattern??=fn();sr.init(e,t)}),ur=W(`$ZodEmail`,(e,t)=>{t.pattern??=pn,sr.init(e,t)});function dr(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function fr(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?dr(e)||2:pr(e,t)}function pr(e,t){if(!t.normalize&&t.protocol?.source===Sn.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var G=/[\t\n\r]/g;function mr(e){return e.replace(G,``)}function hr(e,t){return t.lastIndex=0,t.test(e.hostname)}function gr(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var _r=W(`$ZodURL`,(e,t)=>{sr.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=fr(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=mr(r);return}t.hostname&&!hr(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!gr(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:mr(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),vr=W(`$ZodEmoji`,(e,t)=>{t.pattern??=hn(),sr.init(e,t)}),yr=W(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?cn:ln(t.length),sr.init(e,t)}),br=W(`$ZodCUID`,(e,t)=>{t.pattern??=nn,sr.init(e,t)}),xr=W(`$ZodCUID2`,(e,t)=>{t.pattern??=rn,sr.init(e,t)}),Sr=W(`$ZodULID`,(e,t)=>{t.pattern??=an,sr.init(e,t)}),Cr=W(`$ZodXID`,(e,t)=>{t.pattern??=on,sr.init(e,t)}),wr=W(`$ZodKSUID`,(e,t)=>{t.pattern??=sn,sr.init(e,t)}),Tr=W(`$ZodISODateTime`,(e,t)=>{t.pattern??=kn(t),sr.init(e,t)}),Er=W(`$ZodISODate`,(e,t)=>{t.pattern??=En,sr.init(e,t)}),Dr=W(`$ZodISOTime`,(e,t)=>{t.pattern??=On(t),sr.init(e,t)}),Or=W(`$ZodISODuration`,(e,t)=>{t.pattern??=un,sr.init(e,t)}),kr=W(`$ZodIPv4`,(e,t)=>{t.pattern??=gn,sr.init(e,t)}),Ar=/^[0-9a-fA-F:.]+$/;function jr(e){return Ar.test(e)?dr(`http://[${e}]`):!1}var Mr=W(`$ZodIPv6`,(e,t)=>{t.pattern??=_n,sr.init(e,t),e._zod.check=n=>{jr(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Nr=W(`$ZodCIDRv4`,(e,t)=>{t.pattern??=vn,sr.init(e,t)});function Pr(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:jr(n)}var Fr=W(`$ZodCIDRv6`,(e,t)=>{t.pattern??=yn,sr.init(e,t),e._zod.check=n=>{Pr(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Ir(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Lr=/^[0-9a-zA-Z+/]*={0,2}$/,Rr=W(`$ZodBase64`,(e,t)=>{t.pattern??=Lr,sr.init(e,t),e._zod.check=n=>{Ir(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),zr=/^[A-Za-z0-9_-]*$/;function Br(e){if(!zr.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Ir(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Vr=W(`$ZodBase64URL`,(e,t)=>{t.pattern??=zr,sr.init(e,t),e._zod.check=n=>{Br(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Hr=W(`$ZodE164`,(e,t)=>{t.pattern??=Cn,sr.init(e,t)});function Ur(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Wr=W(`$ZodJWT`,(e,t)=>{sr.init(e,t),e._zod.check=n=>{Ur(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Gr=W(`$ZodNumber`,(e,t)=>{nr.init(e,t),e._zod.pattern=Mn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Kr=W(`$ZodNumberFormat`,(e,t)=>{Hn.init(e,t),Gr.init(e,t)}),qr=W(`$ZodBoolean`,(e,t)=>{nr.init(e,t),e._zod.pattern=Nn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Jr=W(`$ZodUnknown`,(e,t)=>{nr.init(e,t),e._zod.parse=e=>e}),Yr=W(`$ZodNever`,(e,t)=>{nr.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Xr(e,t){let n=et(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of et(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,tt(n.issues,t,e),n}}return i(n,a)}}var Zr=e=>Array.isArray(e)?e.length:-1;function Qr(e,t,n){e.issues.length&&t.issues.push(...Qe(n,e.issues)),t.value[n]=e.value}var $r=W(`$ZodArray`,(e,t)=>{nr.init(e,t);let n=Et.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>Qr(t,r,e)));else if(Qr(c,r,e),s&&c.issues.length!==0&&Xe(c))break}return o.length?Promise.all(o).then(()=>r):r},Xr(e,Zr)});function ei(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...Qe(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var ti=[];function ni(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:ti,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Re(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function ri(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(Xe(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>ei(e,n,i,t,d,f))):ei(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var ii=W(`$ZodObject`,(e,t)=>{nr.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=B(()=>ni(t));U(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||ye(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=Ae,o=t.catchall,s,c=Et.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(Xe(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>ei(n,t,e,r,a,o))):ei(s,t,e,r,a,o)}return o?ri(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),ai=W(`$ZodObjectJIT`,(e,t)=>{ii.init(e,t);let n=e._zod.parse,r=B(()=>ni(t)),i=Et.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new er([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
|
|
12
|
+
let ${e}_ab = false;
|
|
13
|
+
for (let i = 0; i < ${e}.issues.length; i++) {
|
|
14
|
+
const iss = ${e}.issues[i];
|
|
15
|
+
iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
|
|
16
|
+
payload.issues.push(iss);
|
|
17
|
+
if (iss.continue !== true) ${e}_ab = true;
|
|
18
|
+
}
|
|
19
|
+
if (${e}_ab && ctx && ctx.abortEarly) {
|
|
20
|
+
payload.value = newResult;
|
|
21
|
+
return payload;
|
|
22
|
+
}`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:De(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
|
|
23
|
+
const ${n}_present = ${i};
|
|
24
|
+
if (!${n}.issues.length || ${n}_present) {
|
|
25
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (${e}) {
|
|
29
|
+
newResult[${r}] = ${n}.value;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
`)}else f?(o.write(`
|
|
34
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
35
|
+
}
|
|
36
|
+
`),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
|
|
37
|
+
if (${n}.value !== undefined || ${i}) {
|
|
38
|
+
newResult[${r}] = ${n}.value;
|
|
39
|
+
}
|
|
40
|
+
`)):o.write(`
|
|
41
|
+
const ${n}_present = ${i};
|
|
42
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
43
|
+
}
|
|
44
|
+
if (!${n}_present && !${n}.issues.length) {
|
|
45
|
+
payload.issues.push({
|
|
46
|
+
code: "invalid_type",
|
|
47
|
+
expected: "nonoptional",
|
|
48
|
+
input: undefined,
|
|
49
|
+
path: [${r}]
|
|
50
|
+
});
|
|
51
|
+
if (ctx && ctx.abortEarly) {
|
|
52
|
+
payload.value = newResult;
|
|
53
|
+
return payload;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (${n}_present) {
|
|
58
|
+
newResult[${r}] = ${n}.value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
`)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=Ae,c=!Et.jitless,l=c&&je.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?ri([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function oi(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Xe(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>nt(e,r,Dt())))}),t)}var si=W(`$ZodUnion`,(e,t)=>{nr.init(e,t),U(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),U(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),U(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),U(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>_e(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>oi(t,r,e,i)):oi(o,r,e,i)}}),ci=W(`$ZodIntersection`,(e,t)=>{nr.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>ui(e,t,n)):ui(e,i,a)}});function li(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Me(e)&&Me(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=li(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=li(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ui(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=li(t.value,n.value);if(!c.valid){if(Xe(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var di=W(`$ZodRecord`,(e,t)=>{nr.init(e,t);let n=Et.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Me(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>nt(e,i,Dt())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...Qe(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...Qe(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&Mn.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>nt(e,i,Dt())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...Qe(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...Qe(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),fi=W(`$ZodEnum`,(e,t)=>{nr.init(e,t);let n=L(t.entries),r=new Set(n);e._zod.values=r,U(e,`pattern`,e=>{let t=L(e.def.entries).filter(e=>Pe.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Fe(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),pi=W(`$ZodTransform`,(e,t)=>{nr.init(e,t),e._zod.optin=`optional`,Et.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Tt(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new wt;return n.value=i,n}});function mi(e,t){return e.value=t.issues.length?void 0:t.value,e}var hi=W(`$ZodOptional`,(e,t)=>{nr.init(e,t),U(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,U(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),U(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${_e(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>mi(e,t)):mi(e,r)}return t.innerType._zod.run(e,n)}}),gi=W(`$ZodExactOptional`,(e,t)=>{hi.init(e,t),U(e,`values`,e=>e.def.innerType._zod.values),U(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),_i=W(`$ZodNullable`,(e,t)=>{nr.init(e,t),U(e,`optin`,e=>e.def.innerType._zod.optin),U(e,`optout`,e=>e.def.innerType._zod.optout),U(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${_e(t.source)}|null)$`):void 0}),U(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),vi=W(`$ZodDefault`,(e,t)=>{nr.init(e,t),e._zod.optin=`defaulted`,U(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>yi(e,t)):yi(r,t)}});function yi(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var bi=W(`$ZodPrefault`,(e,t)=>{nr.init(e,t),e._zod.optin=`defaulted`,U(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),xi=W(`$ZodNonOptional`,(e,t)=>{nr.init(e,t),U(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Si(t,e)):Si(i,e)}});function Si(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Ci(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>nt(e,r,Dt()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var wi=W(`$ZodCatch`,(e,t)=>{nr.init(e,t),U(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),U(e,`optout`,e=>e.def.innerType._zod.optout),U(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Ci(e,r,t,n)):Ci(e,r,t,n)}}),Ti=W(`$ZodPipe`,(e,t)=>{nr.init(e,t),U(e,`values`,e=>e.def.in._zod.values),U(e,`optin`,e=>e.def.in._zod.optin),U(e,`optout`,e=>e.def.out._zod.optout),U(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Ei(e,t.in,n)):Ei(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Ei(e,t.out,n)):Ei(r,t.out,n)}});function Ei(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Di=W(`$ZodReadonly`,(e,t)=>{nr.init(e,t),U(e,`propValues`,e=>e.def.innerType._zod.propValues),U(e,`values`,e=>e.def.innerType._zod.values),U(e,`optin`,e=>e.def.innerType?._zod?.optin),U(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Oi):Oi(r)}});function Oi(e){return e.memo||(e.value=Object.freeze(e.value)),e}var ki=W(`$ZodCustom`,(e,t)=>{In.init(e,t),nr.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Ai(t,n,r,e));Ai(i,n,r,e)}});function Ai(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(st(e))}}var ji=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Mi=`~memo`,Ni=[];function Pi(e){return typeof e==`object`&&!!e}function Fi(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Ii=new WeakMap,Li=0,Ri=1,zi=2;function Bi(e,t,n){let r=Ii.get(e);if(r!==void 0)return r?zi:Li;if(t.has(e))return zi;t.add(e);let i=Li,a=e=>{if(i!==zi&&e?._zod){let r=Bi(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Li;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Ri:o.value?._zod?Bi(o.value,t,n):Li;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=be(c);s(e?o(e,!0):Ri),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?Bi(r,t,!1):Ri);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),Vi(e,i)}function Vi(e,t){return t!==Ri&&Ii.set(e,t===zi),t}function Hi(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var Ui,Wi=[],Gi={alloc(e,t,n){let r=Ui;if(!r)return n;Ui=void 0;let i={value:n,issues:null};return r.set(t.value,i),Wi.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&qi(n,e.value))throw new ji;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=Bi(e,new Set,!1);if(i===Li)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===zi||r?n=!0:r=!0}let l=s.value;if(!Pi(l))return t(s,c);let u=c[Mi];u||(u={buckets:new WeakMap,backEdges:void 0},c[Mi]=u);let d;i===c?d=a:(d=Hi(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...Fi(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;Ui=d;let p=Wi.length,m=t(s,c);Ui=void 0;let h=Wi.length>p?Wi.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?Fi(e.issues):Ni),e)):(h&&(h.issues=m.issues.length?Fi(m.issues):Ni),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Ki(){return Gi}function qi(e,t){let n=e[Mi]?.backEdges;return n!==void 0&&Pi(t)&&n.has(t)}var Ji=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(ot(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Le(e.values[0])}`:`Invalid option: expected one of ${R(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function Yi(){return{localeError:Ji()}}var Xi,Zi=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Qi(){return new Zi}(Xi=globalThis).__zod_globalRegistry??(Xi.__zod_globalRegistry=Qi());var K=globalThis.__zod_globalRegistry;function $i(e){return e.checks&&=[...e.checks],e}function ea(e,t){return new e($i({type:`string`,...H(t)}))}function ta(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...H(t)})}function na(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...H(t)})}function ra(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...H(t)})}function ia(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...H(t)})}function aa(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...H(t)})}function oa(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...H(t)})}function sa(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...H(t)})}function ca(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...H(t)})}function la(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...H(t)})}function ua(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...H(t)})}function da(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...H(t)})}function fa(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...H(t)})}function pa(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...H(t)})}function ma(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...H(t)})}function ha(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...H(t)})}function ga(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...H(t)})}function _a(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...H(t)})}function va(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...H(t)})}function ya(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...H(t)})}function ba(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...H(t)})}function xa(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...H(t)})}function Sa(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...H(t)})}function Ca(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...H(t)})}function wa(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...H(t)})}function Ta(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...H(t)})}function Ea(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...H(t)})}function Da(e,t){return new e($i({type:`number`,checks:[],...H(t)}))}function Oa(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...H(t)})}function ka(e,t){return new e({type:`boolean`,...H(t)})}function Aa(e){return new e({type:`unknown`})}function ja(e,t){return new e({type:`never`,...H(t)})}function Ma(e,t){return new zn({check:`less_than`,...H(t),value:e,inclusive:!1})}function Na(e,t){return new zn({check:`less_than`,...H(t),value:e,inclusive:!0})}function Pa(e,t){return new Bn({check:`greater_than`,...H(t),value:e,inclusive:!1})}function Fa(e,t){return new Bn({check:`greater_than`,...H(t),value:e,inclusive:!0})}function Ia(e,t){return new Vn({check:`multiple_of`,...H(t),value:e})}function La(e,t){return new Un({check:`max_length`,...H(t),maximum:e})}function Ra(e,t){return new Wn({check:`min_length`,...H(t),minimum:e})}function za(e,t){return new Gn({check:`length_equals`,...H(t),length:e})}function Ba(e,t){return new qn({check:`string_format`,format:`regex`,...H(t),pattern:e})}function Va(e){return new Jn({check:`string_format`,format:`lowercase`,...H(e)})}function Ha(e){return new Yn({check:`string_format`,format:`uppercase`,...H(e)})}function Ua(e,t){return new Xn({check:`string_format`,format:`includes`,...H(t),includes:e})}function Wa(e,t){return new Zn({check:`string_format`,format:`starts_with`,...H(t),prefix:e})}function Ga(e,t){return new Qn({check:`string_format`,format:`ends_with`,...H(t),suffix:e})}function Ka(e){return new $n({check:`overwrite`,tx:e})}function qa(e){return Ka(t=>t.normalize(e))}function Ja(){return Ka(e=>e.trim())}function Ya(){return Ka(e=>e.toLowerCase())}function Xa(){return Ka(e=>e.toUpperCase())}function Za(){return Ka(e=>Oe(e))}function Qa(e,t,n){return new e({type:`array`,element:t,...H(n)})}function $a(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...H(n)})}function eo(e,t){let n=to(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(st(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(st(r))}},e(t.value,t)),t);return n}function to(e,t){let n=new In({check:`custom`,...H(t)});return n._zod.check=e,n}function no(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&ye(e,t,n[t]);return e}function ro(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??K,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function io(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function ao(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,ao(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&no(o.schema,c),t.io===`input`&&go(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function oo(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function so(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${oo(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+oo(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
62
|
+
|
|
63
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function co(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;co(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var lo=new Set([`type`,`properties`,`required`,`additionalProperties`]),uo=[`oneOf`,`anyOf`];function fo(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function po(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!lo.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??fo(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}ye(n,r,e.length===1?e[0]:po(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=fo(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function mo(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of lo)if(t in e)return;let n=t.filter(e=>uo.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=po(t);else{let e=n[0],i=uo.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>po([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,no(e,r))}function ho(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):no(i,s),no(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())co(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])mo(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}no(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,ye(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:vo(t,`input`,e.processors),output:vo(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function go(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return go(r.element,n);if(r.type===`set`)return go(r.valueType,n);if(r.type===`lazy`)return go(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return go(r.innerType,n);if(r.type===`intersection`)return go(r.left,n)||go(r.right,n);if(r.type===`record`||r.type===`map`)return go(r.keyType,n)||go(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:go(r.in,n)||go(r.out,n);if(r.type===`object`){for(let e in r.shape)if(go(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(go(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(go(e,n))return!0;return!!(r.rest&&go(r.rest,n))}return!1}var _o=(e,t={})=>n=>{let r=ro({...n,processors:t});return ao(e,r),so(r,e),ho(r,e)},vo=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=ro({...i??{},target:a,io:t,processors:n});return ao(e,o),so(o,e),ho(o,e)},yo=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},bo=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},xo=(e,t)=>{yo(e,`minimum`,t),bo(e,`maximum`,t)},So=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Co=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},wo=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},To=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Eo=(e,t)=>yo(e,`minimum`,t.minimum),Do=(e,t)=>bo(e,`maximum`,t.maximum),Oo=e=>(t,n)=>{To(t,n.format);let[r,i]=e[n.format];yo(t,`minimum`,r),bo(t,`maximum`,i)},ko={greater_than:(e,t)=>yo(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>bo(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>So(e,t.value),number_format:Oo(ze),bigint_format:Oo(Be),min_length:Eo,max_length:Do,length_equals:(e,t)=>xo(e,t.length),min_size:Eo,max_size:Do,size_equals:(e,t)=>xo(e,t.size),string_format:(e,t)=>{To(e,t.format),t.pattern&&Co(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>wo(e,t.mime)};function Ao(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)ko[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&yo(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&yo(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&bo(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&bo(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&So(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&wo(t,i.mime);for(let e of i.patterns??[])Co(t,e);return t}var jo={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Mo=new Map([[Lr,bn],[zr,xn]]),No=e=>Mo.get(e)??e,Po=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=Ao(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=jo[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(No);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Fo=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=Ao(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):io(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Io=(e,t,n,r)=>{n.type=`boolean`},q=(e,t,n,r)=>{n.not={}},Lo=(e,t,n,r)=>{let i=e._zod.def,a=L(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},Ro=(e,t,n,r)=>{io(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},zo=(e,t,n,r)=>{io(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Bo=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=Ao(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=ao(a.element,t,{...r,path:[...r.path,`items`]})};function Vo(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Vo(t.out):t.type===`catch`?Vo(t.innerType):e._zod.optin}var Ho=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&io(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)ye(i.properties,e,ao(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?Vo(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=ao(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Uo=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>ao(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Wo=(e,t,n,r)=>{let i=e._zod.def,a=ao(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=ao(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)};function Go(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=Go(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>Go(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i&&(p.type=`string`,a||(p.pattern=(r.includes(`number`)?Mn:jn).source)),p}var Ko=new WeakMap;function qo(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of Ko.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=Go(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var Jo=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=Ao(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=ao(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)ye(i.patternProperties,No(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=ao(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=Ko.get(t);n||(n=[],Ko.set(t,n),t.deferred.push(()=>qo(t))),n.push(e)}i.additionalProperties=ao(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&Vo(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},Yo=(e,t,n,r)=>{let i=e._zod.def,a=ao(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Xo=(e,t,n,r)=>{let i=e._zod.def;ao(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Zo=Symbol();function Qo(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(io(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Zo):JSON.parse(o)}var $o=(e,t,n,r)=>{let i=e._zod.def;ao(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=Qo(i.defaultValue,e,t,n,r);o!==Zo&&(n.default=o)},es=(e,t,n,r)=>{let i=e._zod.def;ao(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=Qo(i.defaultValue,e,t,n,r);o!==Zo&&(n._prefault=o)},ts=(e,t,n,r)=>{let i=e._zod.def;ao(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{io(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},ns=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;ao(o,t,r);let s=t.seen.get(e);s.ref=o},rs=(e,t,n,r)=>{let i=e._zod.def;ao(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},is=(e,t,n,r)=>{let i=e._zod.def;ao(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},as=new WeakSet([Object.prototype,Error.prototype]);function os(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var ss=W(`ZodError`,(e,t)=>{Nt.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);as.has(n)||(as.add(n),os(n,`format`,e=>t=>It(e,t)),os(n,`flatten`,e=>t=>Ft(e,t)),os(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,ge,2)}),os(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,ge,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),cs=Rt(ss),ls=zt(ss),us=Bt(ss),ds=Ht(ss),fs=Jt(ss),ps=Yt(ss),ms=Xt(ss),hs=Zt(ss),gs=Qt(ss),_s=$t(ss),vs=en(ss),ys=tn(ss);function bs(){Et.localeError||Dt(Yi())}function xs(){Et.memoizer||Dt({memoizer:Ki()})}var Ss=W(`ZodType`,(e,t)=>(bs(),nr.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(Ee(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Ie(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(zc(e,t))},superRefine(e,t){return this.check(Bc(e,t))},overwrite(e){return this.check(Ka(e))},optional(){return xc(this)},exactOptional(){return Cc(this)},nullable(){return Tc(this)},nullish(){return xc(Tc(this))},nonoptional(e){return jc(this,e)},array(){return sc(this)},or(e){return dc([this,e])},and(e){return pc(this,e)},transform(e){return Fc(this,yc(e))},default(e){return Dc(this,e)},prefault(e){return kc(this,e)},catch(e){return Nc(this,e)},pipe(e){return Fc(this,e)},readonly(){return Lc(this)},describe(e){let t=this.clone();return K.add(t,{description:e}),t},meta(...e){if(e.length===0)return K.get(this);let t=this.clone();return K.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return ut(this,`~standard`,{...ar(this),jsonSchema:{input:vo(this,`input`),output:vo(this,`output`)}})},set"~standard"(e){lt(this,`~standard`,e)},parse:function e(t,n){return cs(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await ls(this,t,n,{callee:e})},safeParse(e,t){return us(this,e,t)},async safeParseAsync(e,t){return ds(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){lt(this,`spa`,e)},validate(e,t){return Gt(this,e,t)},validateAsync(e,t){return qt(this,e,t)},encode:function e(t,n){return fs(this,t,n,{callee:e})},decode:function e(t,n){return ps(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await ms(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await hs(this,t,n,{callee:e})},safeEncode(e,t){return gs(this,e,t)},safeDecode(e,t){return _s(this,e,t)},async safeEncodeAsync(e,t){return vs(this,e,t)},async safeDecodeAsync(e,t){return ys(this,e,t)},toJSONSchema(e){return _o(this,{})(e)},get description(){return K.get(this)?.description},get _def(){return this._zod.def}}),Cs=W(`_ZodString`,(e,t)=>{or.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Po(e,t,n,r)},dt({format:e=>Ao(e).format??null,minLength:e=>Ao(e).minimum??null,maxLength:e=>Ao(e).maximum??null},{regex(...e){return this.check(Ba(...e))},includes(...e){return this.check(Ua(...e))},startsWith(...e){return this.check(Wa(...e))},endsWith(...e){return this.check(Ga(...e))},min(...e){return this.check(Ra(...e))},max(...e){return this.check(La(...e))},length(...e){return this.check(za(...e))},nonempty(...e){return this.check(Ra(1,...e))},lowercase(e){return this.check(Va(e))},uppercase(e){return this.check(Ha(e))},trim(){return this.check(Ja())},normalize(...e){return this.check(qa(...e))},toLowerCase(){return this.check(Ya())},toUpperCase(){return this.check(Xa())},slugify(){return this.check(Za())}})),ws=W(`ZodString`,(e,t)=>{or.init(e,t),Cs.init(e,t)},{email(e){return this.check(ta(js,e))},url(e){return this.check(sa(Ps,e))},jwt(e){return this.check(Sa(Ys,e))},emoji(e){return this.check(ca(Fs,e))},guid(e){return this.check(na(Ms,e))},uuid(e){return this.check(ra(Ns,e))},uuidv4(e){return this.check(ia(Ns,e))},uuidv6(e){return this.check(aa(Ns,e))},uuidv7(e){return this.check(oa(Ns,e))},nanoid(e){return this.check(la(Is,e))},cuid(e){return this.check(ua(Ls,e))},cuid2(e){return this.check(da(Rs,e))},ulid(e){return this.check(fa(zs,e))},base64(e){return this.check(ya(Ks,e))},base64url(e){return this.check(ba(qs,e))},xid(e){return this.check(pa(Bs,e))},ksuid(e){return this.check(ma(Vs,e))},ipv4(e){return this.check(ha(Hs,e))},ipv6(e){return this.check(ga(Us,e))},cidrv4(e){return this.check(_a(Ws,e))},cidrv6(e){return this.check(va(Gs,e))},e164(e){return this.check(xa(Js,e))},datetime(e){return this.check(Ca(Ds,e))},date(e){return this.check(wa(Os,e))},time(e){return this.check(Ta(ks,e))},duration(e){return this.check(Ea(As,e))}});function Ts(e){return ea(ws,e)}var Es=W(`ZodStringFormat`,(e,t)=>{sr.init(e,t),Cs.init(e,t)}),Ds=W(`ZodISODateTime`,(e,t)=>{Tr.init(e,t),Es.init(e,t)}),Os=W(`ZodISODate`,(e,t)=>{Er.init(e,t),Es.init(e,t)}),ks=W(`ZodISOTime`,(e,t)=>{Dr.init(e,t),Es.init(e,t)}),As=W(`ZodISODuration`,(e,t)=>{Or.init(e,t),Es.init(e,t)}),js=W(`ZodEmail`,(e,t)=>{ur.init(e,t),Es.init(e,t)}),Ms=W(`ZodGUID`,(e,t)=>{cr.init(e,t),Es.init(e,t)}),Ns=W(`ZodUUID`,(e,t)=>{lr.init(e,t),Es.init(e,t)}),Ps=W(`ZodURL`,(e,t)=>{_r.init(e,t),Es.init(e,t)}),Fs=W(`ZodEmoji`,(e,t)=>{vr.init(e,t),Es.init(e,t)}),Is=W(`ZodNanoID`,(e,t)=>{yr.init(e,t),Es.init(e,t)}),Ls=W(`ZodCUID`,(e,t)=>{br.init(e,t),Es.init(e,t)}),Rs=W(`ZodCUID2`,(e,t)=>{xr.init(e,t),Es.init(e,t)}),zs=W(`ZodULID`,(e,t)=>{Sr.init(e,t),Es.init(e,t)}),Bs=W(`ZodXID`,(e,t)=>{Cr.init(e,t),Es.init(e,t)}),Vs=W(`ZodKSUID`,(e,t)=>{wr.init(e,t),Es.init(e,t)}),Hs=W(`ZodIPv4`,(e,t)=>{kr.init(e,t),Es.init(e,t)}),Us=W(`ZodIPv6`,(e,t)=>{Mr.init(e,t),Es.init(e,t)}),Ws=W(`ZodCIDRv4`,(e,t)=>{Nr.init(e,t),Es.init(e,t)}),Gs=W(`ZodCIDRv6`,(e,t)=>{Fr.init(e,t),Es.init(e,t)}),Ks=W(`ZodBase64`,(e,t)=>{Rr.init(e,t),Es.init(e,t)}),qs=W(`ZodBase64URL`,(e,t)=>{Vr.init(e,t),Es.init(e,t)}),Js=W(`ZodE164`,(e,t)=>{Hr.init(e,t),Es.init(e,t)}),Ys=W(`ZodJWT`,(e,t)=>{Wr.init(e,t),Es.init(e,t)}),Xs=W(`ZodNumber`,(e,t)=>{Gr.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fo(e,t,n,r),e.isFinite=!0},dt({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=Ao(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=Ao(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=Ao(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>Ao(e).format??null},{gt(e,t){return this.check(Pa(e,t))},gte(e,t){return this.check(Fa(e,t))},min(e,t){return this.check(Fa(e,t))},lt(e,t){return this.check(Ma(e,t))},lte(e,t){return this.check(Na(e,t))},max(e,t){return this.check(Na(e,t))},int(e){return this.check($s(e))},safe(e){return this.check($s(e))},positive(e){return this.check(Pa(0,e))},nonnegative(e){return this.check(Fa(0,e))},negative(e){return this.check(Ma(0,e))},nonpositive(e){return this.check(Na(0,e))},multipleOf(e,t){return this.check(Ia(e,t))},step(e,t){return this.check(Ia(e,t))},finite(){return this}}));function Zs(e){return Da(Xs,e)}var Qs=W(`ZodNumberFormat`,(e,t)=>{Kr.init(e,t),Xs.init(e,t)});function $s(e){return Oa(Qs,e)}var ec=W(`ZodBoolean`,(e,t)=>{qr.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Io(e,t,n,r)});function tc(e){return ka(ec,e)}var nc=W(`ZodUnknown`,(e,t)=>{Jr.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function rc(){return Aa(nc)}var ic=W(`ZodNever`,(e,t)=>{Yr.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>q(e,t,n,r)});function ac(e){return ja(ic,e)}var oc=W(`ZodArray`,(e,t)=>{xs(),$r.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bo(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Ra(e,t))},nonempty(e){return this.check(Ra(1,e))},max(e,t){return this.check(La(e,t))},length(e,t){return this.check(za(e,t))},unwrap(){return this.element}});function sc(e,t){return Qa(oc,e,t)}var cc=W(`ZodObject`,(e,t)=>{xs(),ai.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ho(e,t,n,r),_t(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return _c(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Ee(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Ee(this._zod.def,{catchall:rc()}))},loose(){return this.clone(Ee(this._zod.def,{catchall:rc()}))},strict(){return this.clone(Ee(this._zod.def,{catchall:ac()}))},strip(){return this.clone(Ee(this._zod.def,{catchall:void 0}))},extend(e){return We(this,e)},safeExtend(e){return Ke(this,e)},merge(e){return qe(this,e)},pick(e){return Ve(this,e)},omit(e){return Ue(this,e)},partial(...e){return Je(bc,this,e[0])},exactPartial(...e){return Je(Sc,this,e[0],`exactPartial`)},required(...e){return Ye(Ac,this,e[0])}});function lc(e,t){return new cc({type:`object`,shape:e,catchall:ac(),...H(t)})}var uc=W(`ZodUnion`,(e,t)=>{si.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Uo(e,t,n,r),e.options=t.options});function dc(e,t){return new uc({type:`union`,options:e,...H(t)})}var fc=W(`ZodIntersection`,(e,t)=>{ci.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wo(e,t,n,r)});function pc(e,t){return new fc({type:`intersection`,left:e,right:t})}var mc=W(`ZodRecord`,(e,t)=>{xs(),di.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jo(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function hc(e,t,n){return!t||!t._zod?new mc({type:`record`,keyType:Ts(),valueType:e,...H(t)}):new mc({type:`record`,keyType:e,valueType:t,...H(n)})}var gc=W(`ZodEnum`,(e,t)=>{fi.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lo(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new gc({...t,checks:[],...H(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new gc({...t,checks:[],...H(r),entries:i})}});function _c(e,t){return new gc({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...H(t)})}var vc=W(`ZodTransform`,(e,t)=>{xs(),pi.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zo(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Tt(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(st(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(st(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function yc(e){return new vc({type:`transform`,transform:e})}var bc=W(`ZodOptional`,(e,t)=>{hi.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>is(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function xc(e){return new bc({type:`optional`,innerType:e})}var Sc=W(`ZodExactOptional`,(e,t)=>{gi.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>is(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Cc(e){return new Sc({type:`optional`,innerType:e})}var wc=W(`ZodNullable`,(e,t)=>{_i.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Tc(e){return new wc({type:`nullable`,innerType:e})}var Ec=W(`ZodDefault`,(e,t)=>{vi.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$o(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Dc(e,t){return new Ec({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ne(t)}})}var Oc=W(`ZodPrefault`,(e,t)=>{bi.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>es(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function kc(e,t){return new Oc({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ne(t)}})}var Ac=W(`ZodNonOptional`,(e,t)=>{xi.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function jc(e,t){return new Ac({type:`nonoptional`,innerType:e,...H(t)})}var Mc=W(`ZodCatch`,(e,t)=>{wi.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ts(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Nc(e,t){return new Mc({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:yt(t)})}var Pc=W(`ZodPipe`,(e,t)=>{Ti.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ns(e,t,n,r),e.in=t.in,e.out=t.out});function Fc(e,t){return new Pc({type:`pipe`,in:e,out:t})}var Ic=W(`ZodReadonly`,(e,t)=>{Di.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Lc(e){return new Ic({type:`readonly`,innerType:e})}var Rc=W(`ZodCustom`,(e,t)=>{ki.init(e,t),Ss.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ro(e,t,n,r)});function zc(e,t={}){return $a(Rc,e,t)}function Bc(e,t){return eo(e,t)}function Vc(e){return Ca(Ds,e)}var Hc=e=>Ts({error:e}).refine(e=>e.trim()!==``,{error:e}),Uc=e=>Zs({error:e}).min(0,{error:e}),Wc=e=>Zs({error:e}).min(0,{error:e}).max(1,{error:e}),Gc=e=>Ts({error:e}).regex(/^[\w.-]+(\/[\w.-]+)*$/,{error:e}).refine(e=>!e.split(`/`).some(e=>e===`.`||e===`..`),{error:e}),Kc=lc({role:Hc(`needs its role`).describe(`As getByRole takes it, or text, row or box for something with no role of its own`),name:Hc(`needs its name`),css:Ts().optional(),node:Zs().int().optional().describe(`The element in that round's recording`)}),qc=`isn't on the screen. Boxes and points are shares of the screen, from 0 to 1`,Jc=lc({x:Wc(qc),y:Wc(qc),width:Wc(qc),height:Wc(qc)}).refine(e=>e.x+e.width<=1&&e.y+e.height<=1,{error:qc}),Yc=lc({x:Wc(qc),y:Wc(qc)}),Xc=lc({does:Hc(`needs what it did`),on:Hc(`needs the path to what it was done on`),with:dc([Ts(),tc(),sc(Ts())]).optional(),what:Ts().optional().describe(`The words of what it was done on`)}),Zc=lc({flow:Hc(`needs the flow it's on`),at:Uc(`needs its moment, in seconds`).optional().describe(`Without it, the whole flow`),until:Uc(`needs its end, in seconds`).optional().describe(`The end of a stretch`),element:Kc.optional(),alike:sc(Kc).optional().describe(`The other things changed alike with its element, each where it is`),box:Jc.optional().describe(`Something with no words of its own, or where only the pixels changed`),point:Yc.optional().describe(`Empty space`),app:lc({from:lc({flow:Hc(`needs the flow it was taken over in`),at:Uc(`needs the moment it was taken over at, in seconds`)}),did:sc(Xc).describe(`What the person did there, in order`),recording:Gc(`needs its recording: the name of a file in the round`).describe(`The flow up to where it was taken over, then the person's own steps`),length:Zs({error:`needs its length, in seconds`}).positive({error:`needs its length, in seconds`})}).optional().describe(`In the app: on the person's own recording, which branches off a flow where they took it over. Its flow names the branch`)}).refine(e=>[e.element,e.box,e.point].filter(e=>e).length<=1,{error:`is on more than one thing. Choose an element, a box or a point`}).refine(e=>e.at!==void 0||!(e.element||e.box||e.point),{error:`is on something but at no moment. Give it one`}).refine(e=>e.until===void 0||e.at!==void 0&&e.until>e.at,{error:`ends before it starts. A stretch ends after its moment`}),Qc=lc({title:Hc(`needs a title`).describe(`Steps are matched across rounds by their title`),at:Uc(`needs the moment it starts, in seconds`),actions:sc(Uc(`needs the moment each of its actions was done, in seconds`)).optional().describe(`When each of its actions was done: between them the page rests, and a person can take the flow over there`),person:Hc(`needs the name of who does it, or no person`).optional().describe(`Who does it, once the flow has changed hands: someone other than who the flow is done as`)}),$c=lc({name:Hc(`needs a name`).describe(`Its identity: a new name is a new flow`),length:Zs({error:`needs its length, in seconds`}).positive({error:`needs its length, in seconds`}),steps:sc(Qc),recording:Gc(`needs its recording: the name of a file in the round`),line:Hc(`needs words in its line, or no line`).optional().describe(`The agent's, at the flow's start: what it starts from, or the choice it shows`),stopped:Hc(`needs the step it stopped at`).optional().describe(`On Before, the step the flow couldn't take there: it's kept as far as that, and tried again by playthrough start`),person:Hc(`needs the name of who it acts as, or no person`).optional().describe(`Who the flow is done as, as its file or the app's setup names them: the name on the recorded pointer, handed to you when you take over`),unsteady:sc(Hc(`needs the ids of the changes it makes by itself`)).optional().describe(`Changes found between two recordings of the same app, like a time the server stamps: left out of every comparison, in every flow`)}),el=lc({id:Hc(`needs an id`).describe(`Its thing and its kind of change, so it keeps its id in every round while it's the same change`),words:Hc(`needs its words`).describe(`What changed, for the agent: “Download CSV and Cancel have swapped places”`),seen:sc(Zc,{error:`needs where it's seen, a list`}).min(1,{error:`needs where it's seen: each flow, at its moment there`}).describe(`Each flow it's seen in, at its moment there; a flow that's gone, with no moment`)}),tl=lc({round:Zs({error:`needs its round`}).int().min(1,{error:`needs its round, after Before`}),since:Zs({error:`needs the round it's compared with`}).int().min(0).describe(`0 is Before`),changes:sc(el,{error:`needs its changes, a list, even if it's empty`})}),nl=dc([lc({line:Hc(`needs words in its line`)}).describe(`Why it's there, in the agent's voice: what it meant or chose`),lc({note:Hc(`needs the note it was made for`)}).describe(`Made for that note: the reply on the note says why`),lc({notReal:Hc(`needs to say why nothing really changed`)}).describe(`Nothing really changed; nobody is shown it`)],{error:`says one of { line }, { note } or { notReal }`}),rl=lc({note:Hc(`needs the note it answers`),words:Ts({error:`needs its words, even if empty until it's answered`}),on:Zc.optional().describe(`Where it shows on this round's recording; without it, the note's place was lost`),watch:Hc(`needs a step's title`).optional().describe(`For an answer that moves: the step of its flow it's seen in, which the note then plays`)}),il=lc({id:Hc(`needs an id`),on:Zc.optional().describe(`Without it, about the work in general`),words:Hc(`needs words`)}),al=lc({number:Zs().int().min(0).describe(`Round 0 is Before: the app as it was`),by:Hc(`needs to say which agent recorded it`).describe(`By the name it goes by, “Claude Code” or “Codex”: one review can pass between agents`),flows:sc($c),replies:sc(rl).describe(`The agent's answer to each note that asks for one`),accounts:hc(Ts(),nl).describe(`What the agent says about each change new since the round before, by its id`),commit:Ts().optional().describe(`What it was recorded from`),cantStart:sc(Hc(`needs the flow's name`)).optional().describe(`Before: the flows the app as it was can't start, so they have no Before`),finished:Vc().optional()}),ol=lc({note:Hc(`needs the note it's on`),verdict:_c([`looks good`,`not quite`],{error:`is “looks good” or “not quite”`}),words:Ts().optional()}).refine(e=>e.verdict!==`not quite`||e.words?.trim(),{error:`is not quite, so it needs words saying what's still wrong`}),sl=lc({id:Hc(`needs an id`).describe(`Chosen by the sender, so sending twice sends once`),round:Zs().int().min(0),by:Hc(`needs to say who sent it`),sent:Vc({error:`needs to say when it was sent, as an ISO date`}),notes:sc(il).describe(`New ones`),verdicts:sc(ol),looksGood:sc(Hc(`needs the flow's name`)).describe(`Flows that look good as a whole; one that isn't quite right gets a note`),takenBack:sc(Hc(`needs the flow's name`)).optional().describe(`Flows whose Looks good, said before, is taken back: they ask again`)}),cl=lc({send:Ts(),round:Zs().int(),at:Vc()}),ll=lc({by:Ts(),at:Vc()});lc({id:Ts(),title:Ts().describe(`A few words for the change, as a pull request's title`),asked:Ts().optional().describe(`What was asked, in the person's words`),started:Vc(),rounds:sc(al),comparisons:sc(tl),sends:sc(sl),taken:sc(cl),accepted:ll.optional()});function ul(){return Array.from(crypto.getRandomValues(new Uint8Array(8)),e=>`abcdefghijkmnpqrstuvwxyz23456789`[e%32]).join(``)}var dl=e=>e.length>1?`${e.slice(0,-1).join(`, `)} and ${e.at(-1)}`:e[0]??``,fl=e=>`${Math.floor(e/60)}:${String(Math.floor(e%60)).padStart(2,`0`)}`;function pl(e){let t=new Map;for(let n of e.sends)for(let e of n.notes)t.set(e.id,{note:e,round:n.round,by:n.by});return t}function ml(e,t){let n=pl(e).get(t);if(!n)return[];let r=[{turn:{by:n.by,agent:!1,round:n.round,words:n.note.words},order:0}];for(let i of e.rounds.filter(e=>e.number>n.round)){let e=i.replies.find(e=>e.note===t);e?.words.trim()&&r.push({turn:{by:i.by,agent:!0,round:i.number,words:e.words},order:1})}for(let n of e.sends)for(let e of n.verdicts.filter(e=>e.note===t))r.push({turn:{by:n.by,agent:!1,round:n.round,words:e.words??``,verdict:e.verdict},order:2});return r.sort((e,t)=>e.turn.round-t.turn.round||e.order-t.order).map(({turn:e})=>e)}function hl(e){let t=t=>{let n=e.taken.find(e=>e.send===t.id);return!!n&&e.rounds.some(e=>e.number===n.round&&e.finished)};return gl(e.sends.filter(e=>!t(e)))}function gl(e){let t=new Set,n=new Map;for(let r of e){for(let e of r.notes)t.add(e.id);for(let e of r.verdicts)n.set(e.note,e.verdict)}for(let[e,r]of n)r===`not quite`&&t.add(e);return[...t]}function _l(e,t,n){return e.rounds.findLast(e=>e.number<=t&&e.accounts[n])?.accounts[n]}function vl(e,t){if(!bl(t))return[`Accepting needs to say who accepted.`];if(!e.rounds.some(e=>e.finished&&e.number>0))return[`There's no finished round to accept yet.`];let n=pl(e);return hl(e).map(e=>{let t=n.get(e);return`Note ${e}${t?`, “${yl(t.note.words)}”,`:``} still waits for the agent's answer, so the work can't be accepted yet.`})}var yl=e=>e.length>48?`${e.slice(0,47).trimEnd()}…`:e,bl=e=>typeof e==`string`&&e.trim()!==``;function xl(e,t,n,r){if(e<=0)return e;let[i,a]=r?Cl(Sl(t,n),r):Sl(t,n);for(let t=0;t<i.length-1;t++)if(e<=i[t+1])return a[t]+(a[t+1]-a[t])*Math.min(1,Math.max(0,(e-i[t])/(i[t+1]-i[t])));return n.length}function Sl(e,t){let n=e=>[...e.steps.map(e=>e.at),e.length],r=n(e),i=n(t);if(r.length===i.length)return[r,i];let a=[0],o=[0],s=(e,t)=>{e===void 0||t===void 0||t<o.at(-1)||(e>a.at(-1)?(a.push(e),o.push(t)):e===a.at(-1)&&t>o.at(-1)&&(a.push(e+.001),o.push(t)))},c=0;return e.steps.forEach((e,n)=>{let a=t.steps.findIndex((t,n)=>n>=c&&t.title===e.title);a<0||(s(r[n],i[a]),s(r[n+1],i[a+1]),c=a+1)}),s(r.at(-1),i.at(-1)),[a,o]}function Cl([e,t],n){let r=[e[0]],i=[t[0]];for(let a=0;a<e.length-1;a++){let o=(e,t,n)=>e.filter(e=>e>t&&e<n),s=o(n.from,e[a],e[a+1]),c=o(n.to,t[a],t[a+1]);s.length===c.length&&(r.push(...s),i.push(...c)),r.push(e[a+1]),i.push(t[a+1])}return[r,i]}function wl(e,t){let n=e.steps.findLast(e=>e.at<=t+.05)??e.steps[0];if(!n)return;let r=n.actions??[],i=r.filter(e=>e<=t).length;if(i===r.length)return{step:n.title};if(i)return{step:n.title,actions:i};let a=e.steps[e.steps.indexOf(n)-1];return a?{step:a.title}:{step:n.title,actions:1}}function Tl(e,t,n,r=1/0){let i=pl(e),a=e.sends.filter(e=>e.by===t&&e.round<r).filter(e=>e.looksGood.includes(n)||!!e.takenBack?.includes(n)||e.notes.some(e=>e.on?.flow===n)||e.verdicts.some(e=>i.get(e.note)?.note.on?.flow===n)).map(e=>e.round);return a.length?Math.max(...a):void 0}function El(e,t,n){let r=e.rounds.find(e=>e.number===t),i=e.rounds[0]?.number;if(!r||i===void 0)return[];let a=e.comparisons.filter(e=>e.round===t),o=pl(e),s=r.flows.map(e=>e.name),c=[...new Set(e.rounds.flatMap(e=>[...e.flows.map(e=>e.name),...e.cantStart??[]]))],l=a.flatMap(e=>e.changes),u=[];for(let r of new Set(l.map(e=>e.id))){let s=_l(e,t,r);if(s&&`notReal`in s)continue;let d=[...new Set(l.filter(e=>e.id===r).flatMap(e=>e.seen.map(e=>e.flow)))].map(r=>Tl(e,n,r,t)).filter(e=>e!==void 0),f=d.length?Math.max(...d):i,p=a.find(e=>e.since===f)?.changes.find(e=>e.id===r);if(!p)continue;let m=[s&&`note`in s?o.get(s.note)?.note.on?.flow:void 0,...c].find(e=>p.seen.some(t=>t.flow===e))??p.seen[0].flow,h=p.seen.filter(e=>e.flow===m).sort((e,t)=>(e.at??0)-(t.at??0))[0];u.push({change:p,on:h,since:f})}return u.sort((e,t)=>s.indexOf(e.on.flow)-s.indexOf(t.on.flow)||(e.on.at??0)-(t.on.at??0))}function Dl(e,t,n){let r=new Map;for(let i of pl(e).keys()){let a=ml(e,i).filter(e=>e.round<=t);a.some(e=>!e.agent&&e.by===n&&e.verdict!==`looks good`)&&r.set(i,a)}return r}function Ol(e){let t=e.findLast(e=>e.agent)?.round;return t!==void 0&&!e.some(e=>!e.agent&&e.verdict&&e.round>=t)}function kl(e,t,n){return[...Dl(e,t,n)].filter(([,e])=>Ol(e)).map(([e])=>e)}function Al(e,t,n,r){let i=e.sends.findLast(e=>e.by===n&&e.round<=t&&(e.looksGood.includes(r)||e.takenBack?.includes(r)));if(!i?.looksGood.includes(r))return!1;for(let a=i.round+1;a<=t;a++)if(El(e,a,n).some(e=>e.on.flow===r))return!1;let a=pl(e),o=Dl(e,t,n);return![...kl(e,t,n),...hl(e).filter(e=>o.has(e))].some(e=>a.get(e)?.note.on?.flow===r)}function jl(e,t){let n=e.rounds.findLast(e=>e.finished&&e.number>0);return!n||vl(e,t).length||kl(e,n.number,t).length?!1:n.flows.every(r=>Al(e,n.number,t,r.name))}function Ml(e,t,n){if(e.at===void 0)return{flow:e.flow};let r=e=>Math.min(n.flow.length,Math.round(xl(e,t.flow,n.flow)*100)/100),i=e.until===void 0?void 0:r(e.until),a={flow:e.flow,at:r(e.at),...i!==void 0&&i>r(e.at)&&{until:i}};if(e.box)return{...a,box:e.box};if(e.point)return{...a,point:e.point};let o=r=>{let i=Nl(t.readings,r,e.at,n.readings);return i&&Il(i.thing,r.name)},s=e.element&&o(e.element),c=s&&e.alike?.map(o).filter(e=>e!==void 0);return s?{...a,element:s,...c?.length&&{alike:c}}:a}function Nl(e,t,n,r){let i=Pl(e,t,n);return i&&Fl(i,e,r)}function Pl(e,t,n){let r=t=>{let r;for(let i of e){let e=i.things.find(t);e&&(!r||Math.abs(i.at-n)<Math.abs(r.reading.at-n))&&(r={reading:i,thing:e})}return r};return(t.node===void 0?void 0:r(e=>e.node===t.node))??r(e=>e.role===t.role&&e.name===t.name)}function Fl({reading:e,thing:t},n,r){let i=n.filter(t=>t.step===e.step).indexOf(e),a=r.filter(t=>t.step===e.step)[i];if(a){for(let[n,r]of le(e,a).was)if(r===t)return{reading:a,thing:n}}}var Il=(e,t)=>({role:e.role,name:e.name||t,...e.node!==void 0&&{node:e.node}}),Ll=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),J=e(((e,t)=>{t.exports=Ll()}))(),Rl=/Mac|iPhone|iPad/.test(navigator.userAgent);function zl({who:e,children:t,after:n}){return(0,J.jsxs)(`div`,{className:`grid gap-px`,children:[(0,J.jsxs)(`span`,{className:`flex items-baseline gap-3 text-[11.5px] text-faint`,children:[(0,J.jsx)(`span`,{className:`min-w-0 flex-1`,children:e}),n]}),(0,J.jsx)(`p`,{className:`leading-normal whitespace-pre-wrap text-fg`,children:t})]})}function Bl(e){let{children:t,keys:n,pressed:r,tone:i,onClick:a}=e;return(0,J.jsxs)(`button`,{className:`inline-flex h-[30px] min-w-0 flex-[1_1_auto] items-center justify-center rounded-md font-medium whitespace-nowrap transition-colors duration-150 ease-calm ${n?`pr-[7px] before:flex-[1_0_10px] before:content-[''] after:order-1 after:flex-[1_0_10px] after:content-['']`:`px-2.5`} ${r?i===`good`?`bg-green/12 text-green`:`bg-slate/14 text-slate`:`bg-hover text-fg hover:bg-line`}`,"aria-pressed":r,disabled:e.disabled,"aria-keyshortcuts":n===`↵`?`Enter`:n,onMouseDown:e=>e.preventDefault(),onClick:a,children:[t,n&&(0,J.jsx)(Vl,{className:`order-2`,children:n})]})}function Vl({children:e,className:t=``}){return(0,J.jsx)(`kbd`,{className:`min-w-4 flex-none rounded-[3px] whitespace-nowrap pointer-coarse:hidden px-[3px] text-center font-ui text-[11px] leading-4 font-normal text-faint shadow-[0_0_0_1px_var(--line)] in-aria-pressed:text-inherit in-aria-pressed:opacity-60 in-aria-pressed:shadow-[0_0_0_1px_currentColor] ${t}`,children:e})}var Hl=(0,J.jsx)(`svg`,{viewBox:`0 0 12 12`,className:`mr-1 size-3 text-green in-aria-pressed:text-inherit`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:(0,J.jsx)(`path`,{d:`M2.8 6.2l2.2 2.2 4.2-4.6`})}),Ul=(0,J.jsx)(`svg`,{viewBox:`0 0 20 20`,className:`mr-1 size-2.5`,fill:`currentColor`,"aria-hidden":!0,children:(0,J.jsx)(`path`,{d:`M7 4.8v10.4c0 .6.7 1 1.2.6l8-5.2a.7.7 0 000-1.2l-8-5.2c-.5-.4-1.2 0-1.2.6z`})});function Wl({on:e,off:t,onPress:n,onRelease:r,bar:i}){return(0,J.jsxs)(`button`,{className:i??`flex h-[30px] flex-none items-center gap-2 rounded-md px-2.5 text-xs font-medium text-fg shadow-[inset_0_0_0_1px_var(--line)] transition-[background-color,box-shadow,color] duration-150 ease-calm select-none enabled:hover:shadow-[inset_0_0_0_1px_var(--faint)] disabled:cursor-default disabled:text-faint aria-pressed:bg-hover`,disabled:t,"aria-pressed":e,"aria-keyshortcuts":`C`,onPointerDown:e=>!t&&e.button===0&&(e.preventDefault(),Gl(n,r)),onContextMenu:e=>e.preventDefault(),onKeyDown:e=>e.key===`Enter`&&(n(),r()),children:[!i&&(0,J.jsx)(`span`,{className:`size-2.5 flex-none rounded-full shadow-[inset_0_0_0_1.5px_currentColor] ${e?`bg-current`:`bg-[linear-gradient(90deg,currentColor_50%,transparent_50%)]`}`}),(0,J.jsx)(`span`,{className:i?``:`min-w-0 flex-1 truncate text-left`,children:`Compare`}),(0,J.jsx)(Vl,{className:i?``:`text-soft`,children:`C`})]})}function Gl(e,t){e();let n=()=>{removeEventListener(`pointerup`,n),removeEventListener(`pointercancel`,n),t()};addEventListener(`pointerup`,n),addEventListener(`pointercancel`,n)}function Kl({waiting:e,onTakeOver:t}){return(0,J.jsxs)(`button`,{className:`flex h-[30px] flex-none items-center gap-2 rounded-md px-2.5 text-xs font-medium text-fg shadow-[inset_0_0_0_1px_var(--line)] transition-[background-color,box-shadow] duration-150 ease-calm select-none hover:shadow-[inset_0_0_0_1px_var(--faint)] aria-pressed:bg-hover`,"aria-pressed":e,"aria-keyshortcuts":`T`,onMouseDown:e=>e.preventDefault(),onClick:t,children:[(0,J.jsx)(ql,{className:`h-2 w-2.5 flex-none`}),(0,J.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-left`,children:e?`Taking over…`:`Take over where you were`}),(0,J.jsx)(Vl,{className:`text-soft`,children:`T`})]})}function ql({className:e,label:t}){return(0,J.jsx)(`svg`,{viewBox:`0 0 10 8`,className:e,fill:`none`,stroke:`var(--amber)`,strokeWidth:`1.5`,"aria-label":t,"aria-hidden":!t,children:(0,J.jsx)(`path`,{d:`M0 7 C 2.5 7, 2.5 1, 5 1 L 10 1`})})}function Jl({children:e,open:t=!1,className:n=``}){return(0,J.jsxs)(`span`,{"data-time":!0,className:`group/time -mr-[7px] inline-flex h-5 min-w-[78px] items-center justify-end gap-[3px] rounded-[10px] pr-[7px] pl-1 text-xs tabular-nums transition-colors duration-150 ease-calm ${t?`hover:bg-hover hover:text-fg`:`group-hover/row:bg-hover group-hover/row:text-fg`} ${n}`,children:[(0,J.jsx)(`svg`,{viewBox:`0 0 20 20`,fill:`currentColor`,className:`size-2.5 opacity-0 transition-opacity duration-150 ease-calm ${t?`group-hover/time:opacity-100`:`group-hover/row:opacity-100`}`,"aria-hidden":!0,children:(0,J.jsx)(`path`,{d:`M7 4.8v10.4c0 .6.7 1 1.2.6l8-5.2a.7.7 0 000-1.2l-8-5.2c-.5-.4-1.2 0-1.2.6z`})}),e]})}var Yl;for(let e of[`pointermove`,`pointerdown`])addEventListener(e,e=>Yl={x:e.clientX,y:e.clientY},!0);function Xl(e,t){let[n,r]=(0,l.useState)(!1);return(0,l.useLayoutEffect)(()=>{let e=()=>{let e=t.current?.getBoundingClientRect();return!!e&&!!Yl&&Yl.x>=e.left&&Yl.x<=e.right&&Yl.y>=e.top&&Yl.y<=e.bottom};if(r(e()),!e())return;let n=()=>r(!1),i=setTimeout(n,1200),a=()=>e()||n();return addEventListener(`pointermove`,a),()=>{clearTimeout(i),removeEventListener(`pointermove`,a)}},[e,t]),n}var Zl=.05,Ql=1.5;function $l(e,t,n){let r=e.rounds.find(e=>e.number===t)?.flows.map(e=>e.name)??[],i=pl(e),a=[];for(let{change:o,on:s,since:c}of El(e,t,n)){if(s.at===void 0||!r.includes(s.flow))continue;let n=e.rounds.findLast(e=>e.number<=t&&e.accounts[o.id]),l=n?.accounts[o.id],u=l&&`note`in l?l.note:void 0,d={change:o,on:s,since:c,line:l&&`line`in l?l.line:void 0,by:n?.by,note:u,answers:!!u&&i.get(u)?.note.on?.flow===s.flow},f=s.until===void 0&&a.find(e=>e.flow===s.flow&&e.until===void 0&&Math.abs(e.at-s.at)<Zl);f?f.changes.push(d):a.push({id:o.id,flow:s.flow,at:s.at,until:s.until,changes:[d]})}return a.map(e=>{let t=e.changes.filter(e=>!e.answers);return{...e,name:eu((t.length?t:e.changes).map(({change:e})=>e)),row:t.length>0}})}function eu(e){return e.length>1?`${e[0].words} and ${e.length-1} more`:e[0].words}var tu=(e,t)=>e.flatMap(e=>e.changes.filter(e=>e.answers&&e.note===t));function nu(e,t){if(t?.at===void 0)return;let n=(e,t)=>t!==void 0&&Math.abs(e-t)<Zl;return e.find(e=>e.row&&e.flow===t.flow&&n(e.at,t.at)&&(e.until===void 0?e.changes.some(({on:e})=>e.element?.node!==void 0&&e.element.node===t.element?.node||!!e.box&&JSON.stringify(e.box)===JSON.stringify(t.box)):!t.element&&!t.box&&!t.point))}var ru=e=>e.until===void 0?fl(e.at):`${fl(e.at)}–${fl(e.until)}`;function iu(e,t,n){let r=e.filter(e=>e.flow===t.flow),i=e=>t.at>=e.at-.001;return r.filter(e=>e.until===void 0&&i(e)&&t.at<Math.min(e.at+Ql,n.find(t=>t>e.at+.001)??1/0)).at(-1)??r.find(e=>e.until!==void 0&&i(e)&&t.at<=e.until)}var au={notes:[],verdicts:[],looksGood:[],takenBack:[],withTheFlow:[],unsaved:[]};function ou(e,t){let n=Object.entries(e).filter(([e])=>Number(e)<=t).map(([,e])=>e);return{notes:n.flatMap(e=>e.notes),verdicts:n.flatMap(e=>e.verdicts),looksGood:n.flatMap(e=>e.looksGood),takenBack:n.flatMap(e=>e.takenBack),withTheFlow:n.flatMap(e=>e.withTheFlow),unsaved:n.flatMap(e=>e.unsaved)}}var su=(e,t)=>Object.fromEntries(Object.entries(e).map(([e,n])=>[e,t(n)])),cu=(e,t,n)=>({...e,[t]:n(e[t]??au)});function lu(e,t,n){let r=n.filter(n=>n.round===t||n.round<t&&pu(e,n.round,t).includes(n.flow));return[...new Set(r.map(e=>e.flow))]}var uu=({notes:e,verdicts:t,looksGood:n,takenBack:r})=>({notes:e,verdicts:t,looksGood:n,...r.length&&{takenBack:r}}),du=e=>e.notes.length+e.verdicts.length+e.looksGood.length+e.takenBack.length;function fu(e,t,n){let r=new Set([...n.filter(e=>e.on?.flow===t).map(e=>e.id),...e.withTheFlow]),i=e=>e.on?.flow===t;return{sending:{...au,notes:e.notes.filter(i),verdicts:e.verdicts.filter(e=>r.has(e.note)),looksGood:e.looksGood,takenBack:e.takenBack},left:{...e,notes:e.notes.filter(e=>!i(e)),verdicts:e.verdicts.filter(e=>!r.has(e.note)),looksGood:[],takenBack:[],withTheFlow:[]}}}function pu(e,t,n){let r=e.rounds.find(e=>e.number===n)?.flows??[],i=e.comparisons.find(e=>e.round===n&&e.since===t);if(!i)return[];let a=i.changes.filter(t=>!(`notReal`in(_l(e,n,t.id)??{})));return r.filter(e=>!a.some(t=>t.seen.some(t=>t.flow===e.name))).map(e=>e.name)}function mu(e){return{...e,rounds:e.rounds.filter(e=>e.finished)}}function hu(e,t){return{...e,rounds:e.rounds.filter(e=>e.number<=t),sends:e.sends.filter(e=>e.round<=t)}}function gu(e,t,n){let r=Object.entries(n).filter(([,e])=>du(e));if(!r.length)return e;let i=new Date().toISOString();return{...e,sends:[...e.sends,...r.map(([e,n])=>({id:`unsent ${e}`,round:Number(e),by:t,sent:i,...uu(n)}))]}}function _u(e){let t=e.rounds.flatMap(t=>e.sends.filter(e=>e.round===t.number).flatMap(e=>e.notes.map(e=>e.id)));return new Map(t.map((e,t)=>[e,t+1]))}function vu(e,t,n,r={}){return bu(e,t,n,r).filter(([,e])=>e).map(([e])=>e)}function yu(e,t,n){return bu(e,t,n,{}).filter(([,e])=>!e).map(([e])=>e)}function bu(e,t,n,r){let i=hu(gu(e,n,r),t),a=ou(r,t),o=_u(i),s=new Set([n,...i.sends.map(e=>e.by)]),c=new Map([...s].map(e=>[e,kl(i,t,e)])),l=hl(i),u=Dl(i,t,n),d=[];for(let[e,{note:r,round:f}]of pl(i)){let p=ml(i,e),m=[...s].filter(t=>t!==n&&c.get(t)?.includes(e)),h=c.get(n)?.includes(e)?`needs you`:l.includes(e)?`with the agent`:m.length?`with someone else`:`settled`,g=a.notes.some(t=>t.id===e)||a.verdicts.some(t=>t.note===e),_={id:e,number:o.get(e)??0,on:r.on,written:f,turns:p,state:h,waitingFor:m,yours:u.has(e),toJudge:Ol(p),unsent:g};d.push([_,f===t||p.some(e=>e.round===t)||h!==`settled`])}return d.sort(([e],[t])=>e.number-t.number)}function xu(e,t,n,r,i){let a=hu(gu(e,n,r),t),o=vu(e,t,n,r),s=ou(r,t),c=e.rounds.find(e=>e.number===t)?.flows??[];return new Map(c.map(({name:r})=>{let c=o.filter(e=>e.on?.flow===r),l=c.filter(e=>e.state===`needs you`).length,u=c.filter(e=>e.unsent&&e.state===`with the agent`).length,d=c.some(e=>e.yours&&!e.unsent&&e.state===`with the agent`),f=(e,t=0,n=!0)=>[r,{is:e,count:t,asks:n}];if(e.accepted)return f(`good`,0,!1);if(Al(a,t,n,r))return f(`good`);if(s.unsaved.some(e=>e.on?.flow===r))return f(`not saved`,1,!1);let p=c.filter(e=>e.state===`needs you`&&e.on?.at!==void 0).length;return u||d?p?f(`needs you`,p,!1):u?f(`to send`,u,!1):f(`with the agent`,0,!1):i.includes(r)?f(`is it good`,l):l?f(`needs you`,l):a.sends.some(e=>e.by===n&&e.looksGood.includes(r))?f(`looked good`):f(`to watch`)}))}function Su(e,t,n){let r=n.filter(e=>e.on?.flow===t&&e.state===`needs you`).map(e=>e.id);return{...e,looksGood:[...e.looksGood.filter(e=>e!==t),t],verdicts:[...e.verdicts,...r.map(e=>({note:e,verdict:`looks good`}))],withTheFlow:[...e.withTheFlow,...r]}}function Cu(e,t,n){let r=e.withTheFlow.filter(e=>n.find(t=>t.id===e)?.on?.flow===t);return{...e,looksGood:e.looksGood.filter(e=>e!==t),verdicts:e.verdicts.filter(e=>!r.includes(e.note)),withTheFlow:e.withTheFlow.filter(e=>!r.includes(e))}}function wu(e){return e.state===`settled`?`green`:e.unsent||e.state===`needs you`?`amber`:`slate`}var Tu=e=>({amber:`bg-amber`,slate:`bg-slate`,green:`bg-green`})[wu(e)],Eu=e=>`var(--${wu(e)})`,Du=1.2,Ou=.3,ku=-.8999999999999999,Au=-.7,ju=(e,t=0,n=1)=>Math.max(t,Math.min(n,e)),Mu=e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2;function Nu(e){if(e>=0)return;let t=e+Du;return{soft:Mu(ju(t/.22))*(1-Mu(ju((t-.8999999999999999)/.3))),name:ju((t-.04)/.2)*(1-ju((t-.8599999999999999)/.22))}}function Pu(e,t){let n=0;for(let r of e){if(r.name===t.flow)return n+Du+t.at;n+=Du+r.length}return 0}function Fu(e,t){let n=0;for(let r of e){if(t<n+1.2+r.length||r===e.at(-1))return{flow:r.name,at:ju(t-n-Du,-1.2,r.length)};n+=Du+r.length}return{flow:``,at:0}}var Iu=class{flows;now;#e=!1;#t=0;#n=0;#r=[];#i;#a;#o;#s=new Set;constructor(e,t){this.flows=e,this.now={moment:t,playing:!1,speed:1,stopped:!1}}get flow(){return this.flows.find(e=>e.name===this.now.moment.flow)??this.flows[0]}play(){if(this.now.playing||!this.flows.length)return;let e=this.flow;if(this.now.moment.at>=e.length-.06){let t=this.flows.slice(this.flows.indexOf(e)+1).find(e=>!e.fork)??this.flows[0];this.#l({moment:{flow:t.name,at:-Du}})}this.#t=performance.now(),this.#l({playing:!0}),this.#n=requestAnimationFrame(this.#c)}pause(){this.#a=this.#o=void 0,this.now.playing&&(cancelAnimationFrame(this.#n),this.#l({playing:!1}))}toggle(){this.now.playing?this.pause():this.play()}seek(e){this.#a=this.#o=void 0,this.#l({moment:{flow:this.flow.name,at:ju(e,-Du,this.flow.length)}})}go(e){this.#a=this.#o=void 0;let t=this.flows.find(t=>t.name===e.flow);t&&this.#l({moment:{flow:t.name,at:ju(e.at,-Du,t.length)}})}watch(e,t){this.pause(),this.flows=e,this.go(t)}keep(e){this.flows=e}run(e,t){this.pause(),this.go(e),this.#a=t,this.play()}repeat(e,t){this.run(e,t),this.#o=e.at}slower(){this.#l({speed:this.now.speed===1?.5:this.now.speed===.5?.25:1})}scrub(e){this.#e=e,this.#t=performance.now()}stopAt(e){this.#r=e}subscribe=e=>(this.#s.add(e),()=>void this.#s.delete(e));destroy(){cancelAnimationFrame(this.#n),this.#s.clear()}#c=e=>{let t=ju((e-this.#t)/1e3,0,.1);if(this.#t=Math.max(this.#t,e),this.#n=requestAnimationFrame(this.#c),this.#e)return;let n=this.flow,r=this.now.moment.at,i=Math.min(n.length,r+t*this.now.speed),a=this.#i?.flow===n.name&&this.#i.at===r?this.#i.ids:void 0,o=e=>e.at>r||!!a&&e.at===r&&!a.includes(e.id),s=this.#a===void 0&&this.#r.find(e=>e.flow===n.name&&o(e)&&e.at<=i);if(s)return cancelAnimationFrame(this.#n),this.#a=void 0,this.#i={flow:n.name,at:s.at,ids:[...s.at===r?a??[]:[],s.id]},this.#l({moment:{flow:n.name,at:s.at},playing:!1,stopped:!0}),s.reached();if(this.#a!==void 0&&i>=this.#a){if(this.#o!==void 0)return this.#l({moment:{flow:n.name,at:this.#o}});cancelAnimationFrame(this.#n);let e=this.#a;return this.#a=void 0,this.#l({moment:{flow:n.name,at:e},playing:!1,stopped:!0})}i>=n.length&&cancelAnimationFrame(this.#n),this.#l({moment:{flow:n.name,at:i},playing:i<n.length})};#l(e){this.now={...this.now,stopped:!1,...e};for(let e of this.#s)e()}},Lu=()=>()=>{},Ru={moment:{flow:``,at:0},playing:!1,speed:1,stopped:!1};function zu(e,t=e=>e){return(0,l.useSyncExternalStore)(e?.subscribe??Lu,()=>t(e?.now??Ru))}var Bu=`size-[18px] flex-none rounded-full text-center text-[10px] leading-[18px] font-semibold`,Vu=`bg-[color-mix(in_srgb,var(--c)_18%,var(--ground))] text-[color-mix(in_srgb,var(--c)_80%,var(--fg))]`,Hu=`bg-(--c) text-white`,Uu=1.5,Wu=4,Gu=`-my-0.5 -mr-1.5 inline-flex flex-none items-center gap-1.5 rounded-md px-1.5 py-0.5 text-xs text-soft transition-colors duration-150 ease-calm select-none enabled:hover:text-fg disabled:cursor-default disabled:text-faint aria-pressed:bg-hover aria-pressed:text-fg`,Ku=`isolate before:pointer-events-none before:absolute before:inset-y-0 before:right-0 before:left-[31px] before:-z-1 before:rounded-lg before:transition-colors before:duration-150 before:ease-calm before:content-['']`,qu=`${Ku} hover:before:bg-hover`,Ju=`${Ku} before:bg-hover pb-3`;function Yu(e){let{note:t,open:n,answers:r}=e,i=t.on?.at,a=zu(e.playhead,({moment:e})=>i!==void 0&&e.flow===t.on?.flow&&e.at>=i-.05&&e.at<=(t.on?.until??i)+Uu);return e.grown?(0,J.jsx)(`button`,{className:`-mt-1 block w-full truncate pr-2.5 pb-1.5 pl-[44px] text-left text-[12.5px] leading-[18px] text-soft transition-colors duration-150 ease-calm hover:text-fg`,onMouseDown:e=>e.preventDefault(),onClick:e.onOpen,children:t.turns[0]?.words}):n||e.whole?(0,J.jsx)(`div`,{"data-open":``,children:(0,J.jsx)(Qu,{...e})}):(0,J.jsx)(`div`,{className:`relative ${qu} ${e.fresh?`before:animate-glow`:``}`,style:{"--c":Eu(t)},children:(0,J.jsxs)(`button`,{className:`group/row grid w-full grid-cols-[18px_minmax(0,1fr)_auto] items-start gap-x-2 py-1.5 pr-2.5 pl-[18px] text-left`,onMouseDown:e=>e.preventDefault(),onClick:e.onOpen,"aria-expanded":!1,children:[(0,J.jsx)(`span`,{className:`${Bu} relative z-1 mt-px ${a?Hu:Vu}`,children:t.number}),(0,J.jsx)(`span`,{className:`truncate`,children:t.turns[0]?.words}),i===void 0?(0,J.jsx)(`span`,{className:`w-[78px]`}):(0,J.jsx)(Jl,{className:a?`text-[color-mix(in_srgb,var(--c)_80%,var(--fg))]`:`text-faint`,children:fl(i)}),r.length>0&&(0,J.jsx)(Xu,{answers:r,lines:!0,className:`col-start-2 col-end-4 mt-[3px] text-[12.5px] leading-[18px] text-soft`})]})})}function Xu({answers:e,className:t,lines:n,onPoint:r,seen:i,onVisit:a}){let o=e.length>Wu?e.slice(0,3):e,s=(0,J.jsx)(`i`,{className:`size-1.5 flex-none translate-y-[-1px] rotate-45 shadow-[inset_0_0_0_1.5px_var(--soft)]`,"aria-hidden":!0});return a?(0,J.jsxs)(`span`,{className:`grid gap-px ${t}`,children:[o.map(e=>{let t=i?.(e);return(0,J.jsxs)(`button`,{className:`group/row -mx-1.5 grid grid-cols-[6px_minmax(0,1fr)_auto] items-baseline gap-x-2 rounded-md px-1.5 py-px text-left text-fg transition-colors duration-150 ease-calm hover:bg-hover`,onMouseDown:e=>e.preventDefault(),onClick:()=>a(e),children:[s,(0,J.jsx)(`span`,{className:`min-w-0`,children:e.change.words}),t!==void 0&&(0,J.jsx)(Jl,{className:`text-faint`,children:fl(t)})]},e.change.id)}),o.length<e.length&&(0,J.jsxs)(`span`,{className:`pl-[15px]`,children:[e.length-o.length,` more changes`]})]}):(0,J.jsxs)(`span`,{className:`grid gap-px ${t}`,children:[o.map(({change:e})=>(0,J.jsxs)(`span`,{className:`group/name flex min-w-0 items-baseline gap-2`,onPointerEnter:r&&(()=>r(e.id)),onPointerLeave:r&&(()=>r(void 0)),children:[(0,J.jsx)(`i`,{className:`size-1.5 flex-none translate-y-[-1px] rotate-45 shadow-[inset_0_0_0_1.5px_var(--soft)] transition-colors duration-150 ease-calm ${r?`group-hover/name:bg-soft`:``}`,"aria-hidden":!0}),(0,J.jsx)(`span`,{className:n?`truncate`:`min-w-0 text-fg`,children:e.words})]},e.id)),o.length<e.length&&(0,J.jsxs)(`span`,{className:`pl-[15px]`,children:[e.length-o.length,` more changes`]})]})}function Zu(e){let t=[];for(let n of e){let e=t.at(-1);!e||!n.agent&&n.verdict!==`looks good`&&e.some(e=>e.agent)?t.push([n]):e.push(n)}return t}function Qu(e){let{note:t,you:n,readOnly:r,compare:i,whereYouWere:a,asking:o}=e,s=t.unsent&&t.turns.length===1,c=t.unsent&&!s?t.turns.at(-1):void 0,u=t.turns.findLast(e=>e.agent)?.round,d=!c&&t.state===`settled`&&u!==void 0&&t.turns.findLast(e=>e.verdict&&e.round>=u)?.verdict===`looks good`,f=e.onAsking,[p,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(!1),_=Zu(c?t.turns.slice(0,-1):t.turns),v=h?_.flat():_.at(-1)??[],y=_.length-1,b=e=>e.agent||e.by!==n?e.by:`You`,x=i&&!e.whole&&!o&&!p&&!e.away&&(0,J.jsx)(Wl,{...i,bar:Gu}),S=v.findLastIndex(e=>e.agent),C=e=>e.verdict&&(0,J.jsxs)(`span`,{className:e.verdict===`looks good`?`text-green`:`text-slate`,children:[` · `,e.verdict===`looks good`?`Looks good`:`Not quite`]}),w=(e,t)=>(0,J.jsxs)(`span`,{className:`flex gap-3 text-[11.5px] text-soft ${t?`mr-5`:``}`,children:[(0,J.jsx)(`button`,{className:`hover:text-fg`,onClick:e,children:`Edit`}),t&&(0,J.jsx)(`button`,{className:`hover:text-fg`,onClick:t,children:`Remove`})]}),T;T=s&&(p||!t.turns[0]?.words)&&!r?(0,J.jsx)($u,{words:t.turns[0]?.words??``,placeholder:`What do you think?`,question:`Your note`,onSave:t=>(e.onEdit(t),m(!1)),onCancel:()=>m(!1)}):(0,J.jsxs)(J.Fragment,{children:[y>0&&(0,J.jsxs)(`button`,{className:`-my-0.5 flex items-center gap-[3px] justify-self-start text-[11.5px] text-soft hover:text-fg`,onClick:()=>g(!h),"aria-expanded":h,children:[y,` earlier `,y===1?`answer`:`answers`,(0,J.jsx)(`svg`,{viewBox:`0 0 12 12`,className:`size-3 transition-transform duration-200 ease-calm ${h?``:`rotate-180`}`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.4`,strokeLinecap:`round`,"aria-hidden":!0,children:(0,J.jsx)(`path`,{d:`M3.5 7.5L6 5l2.5 2.5`})})]}),v.map((t,n)=>(0,J.jsxs)(`div`,{className:`grid gap-2.5`,children:[(t.words||t.verdict)&&(0,J.jsx)(zl,{who:(0,J.jsxs)(J.Fragment,{children:[b(t),C(t)]}),after:s&&!r?w(()=>m(!0),()=>e.onEdit(void 0)):void 0,children:t.words}),n===S&&e.answers.length>0&&(0,J.jsx)(Xu,{answers:e.answers,className:`-mt-0.5 leading-normal`,onPoint:e.whole?void 0:e.onPoint,seen:e.seen,onVisit:e.onVisit})]},n)),t.state===`with someone else`&&!r&&(0,J.jsxs)(`p`,{className:`text-xs leading-[18px] text-slate`,children:[`Waiting for `,dl(t.waitingFor)]}),c?.verdict===`not quite`&&!o&&(0,J.jsx)(zl,{who:(0,J.jsxs)(J.Fragment,{children:[`You`,C(c)]}),after:!r&&w(()=>f(!0)),children:c.words})]});let E=(0,J.jsxs)(Bl,{keys:`↵`,onClick:e.onPlayOn,children:[Ul,`Play on`]}),D,O;return e.whole?[D,O]=[``,void 0]:r?[D,O]=[t.state===`settled`?`Settled`:``,void 0]:o&&!e.away?O=(0,J.jsx)($u,{words:c?.verdict===`not quite`?c.words:``,placeholder:`What’s still not right?`,question:(0,J.jsx)(`span`,{className:`text-slate`,children:`Not quite`}),tone:`back`,onSave:n=>{e.onJudge({note:t.id,verdict:`not quite`,words:n}),f(!1)},onCancel:()=>f(!1)}):(t.toJudge||c||d)&&!e.away?[D,O]=[`Does this fix it?`,(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(Bl,{keys:c||d?void 0:`↵`,tone:`good`,pressed:c?.verdict===`looks good`||d,onClick:()=>{d||(e.onJudge(c?.verdict===`looks good`?void 0:{note:t.id,verdict:`looks good`}),c?.verdict!==`looks good`&&e.onPlayOn())},children:[Hl,`Looks good`]}),(0,J.jsx)(Bl,{keys:c||d?void 0:`X`,tone:`back`,pressed:c?.verdict===`not quite`,onClick:()=>c?.verdict===`not quite`?e.onJudge(void 0):f(!0),children:`Not quite`})]})]:e.away?O=(0,J.jsx)(`button`,{className:`h-[30px] flex-[1_1_100%] rounded-[7px] bg-hover font-medium text-fg shadow-[inset_0_0_0_1px_var(--line)] hover:opacity-88`,onClick:e.onShow,children:`Show it`}):p||([D,O]=[`${t.on?.app?`In the app · `:``}${t.unsent?`Not sent yet`:t.state===`with the agent`?`Sent to the agent`:t.state===`settled`?`Settled`:``}`,t.on?.at===void 0?void 0:E]),(0,J.jsxs)(`div`,{className:`grid gap-2.5 px-4 ${e.whole?`py-3`:`py-2`} [&>p:first-child]:pr-5`,children:[a?.stopped&&(0,J.jsx)(`p`,{className:`leading-normal text-fg`,children:a.stopped}),(0,J.jsx)(`div`,{className:`grid gap-2.5 transition-opacity duration-250 ease-calm ${e.away&&!r?`opacity-45`:``}`,children:T}),a&&a.live!==`shown`&&!o&&!p&&!e.away&&(a.onTakeOver?(0,J.jsx)(Kl,{waiting:a.live===`waiting`,onTakeOver:a.onTakeOver}):!a.stopped&&(0,J.jsxs)(`p`,{className:`text-xs leading-[18px] text-soft`,children:[`Where you took this flow over isn’t in round `,a.round,`’s recording.`]})),(D||x)&&(0,J.jsxs)(`div`,{className:`mt-1.5 flex items-center justify-between gap-2 text-xs leading-[18px] text-soft`,children:[(0,J.jsx)(`span`,{children:D}),x]}),O&&(0,J.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:O})]})}function $u(e){let[t,n]=(0,l.useState)(e.words),r=(0,l.useRef)(null);(0,l.useEffect)(()=>r.current?.focus(),[]);let i=(0,l.useRef)(e.onWords);i.current=e.onWords;let a=(0,l.useRef)(t);a.current=t,(0,l.useEffect)(()=>{let e=setTimeout(()=>i.current?.(t),300);return()=>clearTimeout(e)},[t]),(0,l.useEffect)(()=>()=>i.current?.(a.current),[]);let o=()=>t.trim()&&e.onSave(t.trim());return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`textarea`,{ref:r,rows:5,value:t,placeholder:e.placeholder,className:`block min-h-14 w-full resize-none rounded-md bg-hover px-2.5 py-2 leading-normal shadow-[inset_0_0_0_1px_var(--line)] placeholder:text-faint focus-visible:outline-none ${e.tone===`back`?`focus:shadow-[inset_0_0_0_1px_var(--slate)]`:`focus:shadow-[inset_0_0_0_1px_var(--amber)]`}`,onChange:e=>n(e.target.value),onKeyDown:n=>{n.stopPropagation(),n.key===`Enter`&&(n.ctrlKey||n.metaKey)&&o(),n.key===`Escape`&&(i.current?.(t),t.trim()?n.currentTarget.blur():e.onCancel())}}),e.question&&(0,J.jsx)(`p`,{className:`mt-1.5 text-xs leading-[18px] text-soft`,children:e.question}),(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-1.5`,children:[(0,J.jsx)(Bl,{onClick:e.onCancel,children:`Cancel`}),(0,J.jsxs)(`button`,{className:`inline-flex h-[30px] flex-[1_1_auto] items-center justify-center rounded-[7px] bg-fg pr-[7px] font-medium text-ground transition-opacity duration-150 ease-calm before:flex-[1_0_10px] after:order-1 after:flex-[1_0_10px] hover:opacity-88 disabled:bg-transparent disabled:text-faint disabled:shadow-[inset_0_0_0_1px_var(--line)]`,disabled:!t.trim(),"aria-keyshortcuts":Rl?`Meta+Enter`:`Control+Enter`,onClick:o,children:[`Save`,(0,J.jsx)(`kbd`,{className:`order-2 flex-none rounded-[3px] px-1 font-ui whitespace-nowrap pointer-coarse:hidden text-[11px] leading-4 font-normal opacity-60 shadow-[0_0_0_1px_currentColor]`,children:Rl?`⌘↵`:`Ctrl ↵`})]})]})]})}var ed=(e,t)=>e?.flow===t&&performance.now()-e.at<700;function td(e,t,n,r=!1){return[...t.filter(t=>t.on?.flow===e&&(!r||t.unsent||t.state===`with the agent`)).map(e=>({note:e,at:e.on?.at??1/0})),...n.filter(t=>t.flow===e&&t.row&&!r).map(e=>({diamond:e,at:e.at}))].sort((e,t)=>e.at-t.at)}function nd(e,t){return e?.is===`good`&&!t}function rd(e){let t=zu(e.playhead,e=>e.moment.flow),n=e.round.flows.find(e=>e.name===t),r=e.diamonds.find(t=>t.id===e.chosen);if(r)return(0,J.jsx)(fd,{...e,diamond:r,yours:e.notes.filter(t=>e.grown.get(t.id)===r.id)});let i=n&&e.standing(n.name),a=n?e.notes.filter(e=>e.on?.flow===n.name&&e.on.at===void 0):[],o=!!n&&e.asked===n.name;if(!n||!o&&!a.length&&!e.writing)return null;let s=`mx-4 my-1.5 border-t border-line`,c=a.filter(e=>e.state===`needs you`&&!e.unsent).length;return(0,J.jsxs)(J.Fragment,{children:[a.map((t,n)=>(0,J.jsxs)(l.Fragment,{children:[n>0&&(0,J.jsx)(`hr`,{className:s}),e.note(t)]},t.id)),e.writing,o&&(a.length>0||!!e.writing)&&(0,J.jsx)(`hr`,{className:s}),o&&(i?(0,J.jsx)(id,{...e,flow:n,standing:i,laidOut:c,just:ed(e.landed,n.name)}):e.onward.kind===`go`&&(0,J.jsx)(`div`,{className:`p-4`,children:(0,J.jsx)(ad,{step:e.onward})}))]})}function id({flow:e,standing:t,laidOut:n,just:r,...i}){if(t.is===`to send`||t.is===`with the agent`)return(0,J.jsx)(od,{...i,flow:e,standing:t,just:r});if(t.is===`not saved`)return(0,J.jsx)(sd,{...i,flow:e,just:r});let a=t.is===`good`,o=(0,l.useRef)(null),s=Xl(e.name,o),c=a?0:i.unseen(e.name).length,u=t.count-n;return(0,J.jsxs)(`div`,{className:ld,children:[(0,J.jsx)(hd,{end:a?`good`:`asks`,just:r,className:ud}),(0,J.jsxs)(`p`,{className:`mb-3 text-[13px] leading-[18px] text-soft`,children:[(0,J.jsx)(cd,{onClick:()=>i.onAgain(e)}),`Is this flow good?`,c>0?(0,J.jsxs)(`span`,{className:`block text-xs leading-4 text-faint`,children:[c,` `,c===1?`answer`:`answers`,` you haven’t seen`]}):a?i.waiting&&(0,J.jsx)(`span`,{className:`block text-xs leading-4 text-faint`,children:i.waiting}):u>0&&(0,J.jsxs)(`span`,{className:`block text-xs leading-4 text-faint`,children:[u,` `,u===1?`note`:`notes`,` not answered`]})]}),(0,J.jsxs)(`div`,{ref:o,className:`flex gap-1.5 transition-opacity duration-150 ease-calm ${s?`pointer-events-none opacity-45`:``}`,children:[(0,J.jsx)(Bl,{keys:a?void 0:`↵`,tone:`good`,pressed:a,onClick:()=>i.onGood(e.name),children:c>0?`Show it`:(0,J.jsxs)(J.Fragment,{children:[Hl,`Looks good`]})}),(0,J.jsx)(Bl,{keys:`X`,tone:`back`,onClick:()=>i.onNotQuite(e.name),children:`Not quite`})]}),a&&(0,J.jsx)(`div`,{className:`mt-2`,children:(0,J.jsx)(ad,{step:i.onward})})]})}function ad({step:e}){return e.kind===`go`?(0,J.jsx)(`div`,{className:`flex gap-1.5`,children:(0,J.jsx)(Bl,{keys:`↵`,onClick:e.take,children:(0,J.jsxs)(`span`,{className:`truncate`,children:[e.words,e.what&&(0,J.jsxs)(`span`,{className:`font-normal text-soft`,children:[` · `,e.what]})]})})}):null}function od({flow:e,standing:t,just:n,...r}){let i=t.is===`with the agent`,{onward:a}=r;return(0,J.jsxs)(`div`,{className:ld,children:[(0,J.jsx)(hd,{end:i?`with the agent`:`to send`,just:n,className:ud}),(0,J.jsxs)(`p`,{className:`mb-3 text-[13px] leading-[18px] text-soft`,children:[(0,J.jsx)(cd,{onClick:()=>r.onAgain(e)}),i?`With the agent`:`${t.count} ${t.count===1?`note`:`notes`} for the agent`,i&&r.waiting&&(0,J.jsx)(`span`,{className:`block text-xs leading-4 text-faint`,children:r.waiting})]}),i?(0,J.jsx)(ad,{step:a}):(0,J.jsx)(`div`,{className:`flex gap-1.5`,children:(0,J.jsx)(Bl,{keys:`↵`,onClick:()=>r.onSend(e.name),children:`Send`})})]})}function sd({flow:e,just:t,...n}){return(0,J.jsxs)(`div`,{className:ld,children:[(0,J.jsx)(hd,{end:`asks`,just:t,className:ud}),(0,J.jsxs)(`p`,{className:`mb-3 text-[13px] leading-[18px] text-soft`,children:[(0,J.jsx)(cd,{onClick:()=>n.onAgain(e)}),`Your note isn’t saved`]}),(0,J.jsx)(ad,{step:n.onward})]})}function cd({onClick:e}){return(0,J.jsxs)(`button`,{className:`float-right ml-2 inline-flex items-center gap-1 text-xs leading-[18px] text-faint transition-colors duration-150 ease-calm hover:text-fg`,onMouseDown:dd,onClick:e,children:[(0,J.jsxs)(`svg`,{viewBox:`0 0 20 20`,className:`size-3`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:[(0,J.jsx)(`path`,{d:`M4 10a6 6 0 1 0 1.8-4.3`}),(0,J.jsx)(`path`,{d:`M4 3.5v3h3`})]}),`Watch again`]})}var ld=`relative py-4 pr-4 pl-[42px]`,ud=`absolute top-4 left-4 z-1 size-[18px]`,dd=e=>e.preventDefault();function fd(e){let{diamond:t,yours:n}=e;return(0,J.jsxs)(`div`,{"data-open":``,className:`relative ${Ju}`,children:[(0,J.jsxs)(`button`,{className:`grid w-full grid-cols-[18px_minmax(0,1fr)] gap-2 py-1.5 pr-2.5 pl-[18px] text-left`,onMouseDown:dd,onClick:n=>n.target.closest(`[data-time]`)?e.onDiamond(t):e.onClose(),"aria-expanded":!0,children:[(0,J.jsxs)(`span`,{"data-mark":!0,className:`relative z-1 mt-px grid size-[18px] place-items-center`,children:[(0,J.jsx)(`i`,{className:`size-2 rotate-45 bg-ground shadow-[inset_0_0_0_1.5px_var(--fg),0_0_0_2.5px_var(--ground)]`}),n[0]&&(0,J.jsx)(`b`,{className:`absolute top-[calc(50%-8px)] left-[calc(50%+2px)] size-1.5 rounded-full shadow-[0_0_0_1.5px_var(--ground)]`,style:{background:Eu(n[0])}})]}),(0,J.jsx)(`span`,{className:`-mr-[7px] block min-w-0 pr-[7px]`,children:(0,J.jsxs)(`span`,{className:`block leading-5 [overflow-wrap:anywhere]`,children:[(0,J.jsx)(Jl,{open:!0,className:`float-right ml-2 text-faint`,children:ru(t)}),(0,J.jsx)(`span`,{children:t.name})]})})]}),(0,J.jsx)(`div`,{className:`grid gap-2.5 pr-3.5 pl-[44px]`,children:(0,J.jsx)(pd,{...e})}),n.map(t=>e.note(t,!0)),e.compare&&(0,J.jsx)(`div`,{className:`mt-2.5 grid pr-3.5 pl-[44px]`,children:(0,J.jsx)(Wl,{...e.compare})}),(0,J.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-1.5 pr-3.5 pl-[44px]`,children:[(0,J.jsxs)(Bl,{keys:`↵`,onClick:e.onPlayOn,children:[Ul,`Play on`]}),!n.length&&(0,J.jsx)(Bl,{keys:`X`,onClick:()=>e.onNoteOn(t),children:`Note on this`})]})]})}function pd({diamond:e,notes:t,onNote:n,onPoint:r}){let i=e.changes.filter(e=>!e.answers),a=e=>{let r=e.note&&t.find(t=>t.id===e.note);return r?(0,J.jsx)(zl,{who:`For your note ${r.number}`,children:(0,J.jsx)(`button`,{className:`-mx-[3px] rounded px-[3px] text-left transition-colors duration-150 ease-calm hover:bg-line`,onClick:()=>n(r),children:r.turns[0]?.words})}):e.line&&(0,J.jsx)(zl,{who:e.by,children:e.line})};if(i.length===1)return a(i[0]);let o=[];for(let e of i){let t=o.at(-1);t&&e.line&&t[0].line===e.line?t.push(e):o.push([e])}return o.map(e=>(0,J.jsxs)(`div`,{className:`grid gap-0.5`,children:[e.map(({change:e})=>(0,J.jsxs)(`span`,{className:`group/name flex items-start gap-[9px] leading-normal font-medium`,onPointerEnter:()=>r(e.id),onPointerLeave:()=>r(void 0),children:[(0,J.jsx)(`i`,{className:`mx-0.5 mt-1.5 size-[7px] flex-none rotate-45 shadow-[inset_0_0_0_1.5px_var(--soft)] transition-colors duration-150 ease-calm group-hover/name:bg-soft`,"aria-hidden":!0}),e.words]},e.id)),(0,J.jsx)(`div`,{className:`mt-[3px] ml-[19px] border-l-2 border-line pl-2.5 text-[12.5px] [&_p]:text-[12.5px]`,children:a(e[0])})]},e[0].change.id))}var md=e=>e.is===`good`||e.is===`with the agent`||e.is===`to send`?e.is:`asks`;function hd({end:e,ahead:t,just:n,className:r}){return(0,J.jsxs)(`span`,{"aria-hidden":!0,className:`grid place-items-center rounded-[28%] transition-[background-color,box-shadow,color,scale] duration-250 ease-calm ${e===`good`?`bg-green text-ground shadow-[inset_0_0_0_1.5px_color-mix(in_srgb,var(--green)_70%,var(--fg))]`:e===`with the agent`?`bg-slate text-ground`:t?`bg-ground text-amber-ink shadow-[inset_0_0_0_1.5px_color-mix(in_srgb,var(--amber)_50%,var(--ground))]`:`bg-[color-mix(in_srgb,var(--amber)_22%,var(--ground))] text-amber-ink shadow-[inset_0_0_0_1.5px_var(--amber)]`} ${n?`animate-pop`:``} ${r}`,children:[(e===`good`||e===`with the agent`)&&(0,J.jsx)(gd,{className:`size-[62%] ${n?`animate-tick`:``}`}),e===`to send`&&(0,J.jsx)(`svg`,{viewBox:`0 0 12 12`,className:`size-[62%]`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:(0,J.jsx)(`path`,{d:`M6 9.6V2.8M3.2 5.5 6 2.7l2.8 2.8`})})]})}function gd({className:e,style:t}){return(0,J.jsx)(`svg`,{viewBox:`0 0 12 12`,className:e,style:t,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:(0,J.jsx)(`path`,{d:`M2.8 6.2l2.2 2.2 4.2-4.6`})})}function _d(e){let t=`inline-flex items-center gap-2 rounded-lg px-2.5 py-1.5 whitespace-nowrap text-fg transition-colors duration-150 ease-calm enabled:hover:bg-hover disabled:cursor-default disabled:opacity-50 aria-pressed:bg-hover`,n=e.live===`shown`,r=(0,l.useRef)(null),{listed:i,onList:a}=e;(0,l.useEffect)(()=>{if(!i)return;let e=e=>!r.current?.contains(e.target)&&a(!1),t=e=>e.key===`Escape`&&a(!1);return addEventListener(`pointerdown`,e,!0),addEventListener(`keydown`,t),()=>(removeEventListener(`pointerdown`,e,!0),removeEventListener(`keydown`,t))},[i,a]);let o=e.notes.length+(e.whole?.notes??0),s=`grid w-full grid-cols-[12px_minmax(0,1fr)_auto] items-center gap-x-2.5 rounded-lg px-2.5 py-[7px] text-left transition-colors duration-150 ease-calm hover:bg-hover focus-visible:bg-hover`;return(0,J.jsxs)(`div`,{ref:r,className:`relative`,children:[(0,J.jsx)(`div`,{role:`dialog`,"aria-label":`Notes on ${e.flow}`,"aria-hidden":!i,className:`absolute right-0 bottom-full mb-2 w-[340px] max-w-[calc(100vw-32px)] rounded-xl bg-surface p-1.5 shadow-float transition-[opacity,translate] duration-150 ease-calm ${i?`translate-y-0 opacity-100`:`pointer-events-none translate-y-1 opacity-0`}`,children:(0,J.jsxs)(`div`,{className:`max-h-[min(55vh,420px)] overflow-y-auto`,children:[e.notes.map(t=>(0,J.jsxs)(`button`,{tabIndex:i?0:-1,className:s,onPointerEnter:()=>e.onLight(t.id),onPointerLeave:()=>e.onLight(void 0),onFocus:()=>e.onLight(t.id),onBlur:()=>e.onLight(void 0),onClick:()=>e.onSaid(t.id),children:[(0,J.jsx)(`span`,{className:`size-1.5 justify-self-center rounded-full`,style:{background:t.ink}}),(0,J.jsx)(`span`,{className:`truncate text-[13px] leading-[18px] text-fg`,children:t.words}),(0,J.jsxs)(`span`,{className:`flex items-center gap-1 text-[11.5px] text-faint tabular-nums`,children:[t.app&&(0,J.jsx)(ql,{className:`h-2 w-2.5`,label:`In the app`}),t.at]})]},t.id)),e.whole?(0,J.jsxs)(`button`,{tabIndex:i?0:-1,className:s,onClick:e.onWhole,children:[(0,J.jsx)(hd,{end:e.whole.end,just:!1,className:`size-3`}),(0,J.jsxs)(`span`,{className:`truncate text-[13px] leading-[18px] text-fg`,children:[`The whole flow`,e.whole.notes>0&&(0,J.jsxs)(`span`,{className:`text-soft`,children:[` · `,e.whole.notes,` `,e.whole.notes===1?`note`:`notes`]})]}),(0,J.jsx)(`span`,{className:`text-[11.5px] text-faint`,children:e.whole.words})]}):!o&&(0,J.jsx)(`p`,{className:`px-2.5 py-[7px] text-[13px] text-soft`,children:`No notes on this flow yet.`})]})}),(0,J.jsxs)(`div`,{role:`toolbar`,"aria-label":`This moment`,"data-bar":``,className:`flex gap-0.5 rounded-xl bg-surface p-1 text-[13px] select-none [&_kbd]:text-[color-mix(in_srgb,var(--faint)_55%,var(--soft))] ${n?`shadow-[0_0_0_1.5px_rgba(236,178,72,0.95),0_6px_20px_rgba(20,24,34,0.12)]`:`shadow-[0_0_0_1px_var(--edge),0_6px_20px_var(--drop)]`}`,children:[(0,J.jsxs)(`button`,{className:t,disabled:!e.onNote,"aria-pressed":e.noting,onClick:e.onNote,children:[`Note `,(0,J.jsx)(Vl,{children:`N`})]}),!n&&e.compare&&(0,J.jsx)(Wl,{...e.compare,bar:t}),n?(0,J.jsxs)(`button`,{className:t,onClick:e.onBack,children:[`Back to the recording `,(0,J.jsx)(Vl,{children:`Esc`})]}):(0,J.jsxs)(`button`,{className:t,disabled:!e.latest,"aria-pressed":e.live===`waiting`,onClick:e.onTakeOver,children:[e.live===`waiting`?`Taking over…`:`Take over`,` `,(0,J.jsx)(Vl,{children:`T`})]}),(0,J.jsx)(`span`,{className:`my-1.5 w-px bg-line`}),(0,J.jsx)(`button`,{className:`${t} text-soft`,"aria-pressed":i,onClick:()=>a(!i),children:o?`${o} ${o===1?`note`:`notes`}`:`Notes`})]})]})}var vd={x:innerWidth/2,y:innerHeight/2},yd=(e,t)=>Object.assign(vd,{x:e,y:t}),bd=[`right`,`left`,`over`,`under`],xd=16,Sd=28,Cd=4,wd=1500,Td=120;function Ed({id:e,over:t,standing:n,still:r,resting:i,pinned:a,onAway:o,children:s}){let c=(0,l.useRef)(null),u=(0,l.useRef)(void 0),d=(0,l.useRef)(!1),f=(0,l.useRef)(o);f.current=i?void 0:o,(0,l.useEffect)(()=>{let e=e=>{if(c.current?.contains(e.target)||(yd(e.clientX,e.clientY),!c.current)||e.target.closest?.(`[data-mark], [data-pin]`))return;if(!e.target.closest?.(`[data-frame]`))return f.current?.();let t=n=>{removeEventListener(`pointerup`,t,!0),Math.hypot(n.clientX-e.clientX,n.clientY-e.clientY)<Cd&&f.current?.()};addEventListener(`pointerup`,t,!0)},t=({data:e})=>e?.playthrough===`down`&&c.current&&f.current?.();return addEventListener(`pointerdown`,e,!0),addEventListener(`message`,t),()=>{removeEventListener(`pointerdown`,e,!0),removeEventListener(`message`,t)}},[]),(0,l.useEffect)(()=>{let e=c.current,t=e?.firstElementChild;if(!e||!t)return;let n={id:u.current?.id,height:t.getBoundingClientRect().height},r=new ResizeObserver(()=>{let r=t.getBoundingClientRect().height,i=e.getAnimations().filter(e=>e.id===`length`),a=i.length?e.getBoundingClientRect().height:void 0;i.forEach(e=>e.cancel());let o=n.id===u.current?.id,s=n.height;if(n={id:u.current?.id,height:r},!o||Math.abs(r-s)<2||matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;let{paddingTop:c,paddingBottom:l}=getComputedStyle(e),d=parseFloat(c)+parseFloat(l);e.style.overflow=`hidden`;let f=e.animate([{height:`${a??s+d}px`},{height:`${r+d}px`}],{id:`length`,duration:220,easing:`cubic-bezier(0.2, 0.8, 0.2, 1)`});f.onfinish=()=>e.style.overflow=``});return r.observe(t),()=>r.disconnect()},[!!s]);let p=(0,l.useRef)(void 0);return(0,l.useLayoutEffect)(()=>{if(!s){Dd(p.current),p.current=void 0,u.current=void 0;return}c.current?.parentNode&&(p.current={card:c.current,in:c.current.parentNode});let r=()=>{let r=c.current;if(!r)return;let i=r.offsetWidth,o=r.offsetHeight,s=u.current&&u.current.id===e?u.current:u.current={id:e,at:{...vd},since:performance.now()},l=[...document.querySelectorAll(`[data-frame]:not([hidden], [data-over])`)].map(e=>{let{left:t,top:n,width:r,height:i}=e.getBoundingClientRect();return[t,n,r,i].map(Math.round).join(`,`)}),f=`${innerWidth}x${innerHeight} ${l.join(` `)}`,p=s.layout===f;s.seen?.layout!==f&&(s.seen={layout:f,since:performance.now()});let m=performance.now()-s.seen.since<Td,h=(e,t)=>{if(d.current&&s.last&&!s.put&&p&&([e,t]=[s.last.x,s.last.y]),s.last={x:e,y:t},r.style.translate=`${e.toFixed(1)}px ${t.toFixed(1)}px`,s.shown&&!s.gone)return;let n=!s.shown;s.shown=!0,s.gone=!1,r.style.visibility=``,!matchMedia(`(prefers-reduced-motion: reduce)`).matches&&r.animate(n?[{opacity:0,scale:.96},{opacity:1,scale:1}]:[{opacity:0},{opacity:1}],{duration:n?180:160,easing:`cubic-bezier(0.2, 0, 0, 1)`})},g=`[data-frame][data-watched]`,_=t&&document.querySelector(g)?.getBoundingClientRect();if(_)return h(_.left+_.width/2-i/2,n?_.top+_.height/2-o/2:_.bottom-o-44);if(s.put)return h(Od(s.put.x,xd,innerWidth-i-xd),Od(s.put.y,xd,innerHeight-o-xd));let v=e=>{let t=e?.getBoundingClientRect();return t&&(t.width||t.height)?t:void 0},y=e?document.querySelector(`${g} [data-mark-id="${CSS.escape(e)}"]`):null,b=e?document.querySelector(`${g} [data-pin="${CSS.escape(e)}"]`):null,x=y??b,S=v(y)??v(b),C=!!S,w=a?.(),T=!C&&!w&&!!x&&!s.was&&performance.now()-s.since<wd;if(!T&&s.layout&&!p&&m&&(s.gone=!0),r.style.visibility=T||s.gone?`hidden`:``,T||s.gone&&m)return;if(!C&&!w&&s.was)return h(s.was.x,s.was.y);let E=w??s.at,D=C?S:new DOMRect(E.x,E.y,0,0),O=e?document.querySelector(`${g} [data-pin="${CSS.escape(e)}"]`)?.getBoundingClientRect():void 0,k=O?.width?O:D,A=document.querySelector(`[data-bar]`)?.getBoundingClientRect(),j=A?.height?A.top-xd:innerHeight-xd,M=({x:e,y:t})=>e>=xd&&e+i<=innerWidth-xd&&t>=xd&&t+o<=j,N=s.fromPin&&{x:k.left+s.fromPin.x,y:k.top+s.fromPin.y};if(m&&s.last)return h(Od(s.last.x,xd,innerWidth-i-xd),Od(s.last.y,xd,j-o));if(N&&p&&M(N))return C&&(s.was=N),h(N.x,N.y);let ee=Od(k.right-i,xd,innerWidth-i-xd),te=Od(D.top-24,xd,j-o),ne={right:{x:D.right+Sd,y:te},left:{x:D.left-Sd-i,y:te},under:{x:ee,y:D.bottom+20},over:{x:ee,y:Math.min(D.top,k.top)-16-o}},re=e=>[...document.querySelectorAll(`[data-frame]:not([hidden], [data-over]) ${e}`)].map(e=>e.getBoundingClientRect()).filter(e=>e.width),ie=e?re(`[data-mark-id="${CSS.escape(e)}"]`):[],ae=e=>t=>{let{x:n,y:r}=ne[t];return M(ne[t])&&!e.some(e=>n<e.right&&n+i>e.left&&r<e.bottom&&r+o>e.top)},oe=[...document.querySelectorAll(`[data-frame]:not([hidden], [data-over], [data-watched])`)].map(e=>e.getBoundingClientRect()),se=s.side?[s.side,...bd]:bd,ce=se.find(ae([...ie,...oe,...re(`[data-kind="change"]`)]))??se.find(ae([...ie,...oe]))??se.find(ae(ie))??se.find(ae([]));if((C||w)&&(s.side??=ce),ce&&C&&(s.was=ne[ce]),ce&&(C||w)&&Object.assign(s,{layout:f,fromPin:{x:ne[ce].x-k.left,y:ne[ce].y-k.top}}),ce)return h(ne[ce].x,ne[ce].y);h(D.right+Sd+i<=innerWidth-xd?D.right+Sd:Math.max(xd,D.left-Sd-i),te)};r();let i=requestAnimationFrame(function e(){r(),i=requestAnimationFrame(e)});return()=>cancelAnimationFrame(i)}),s?(0,J.jsxs)(`aside`,{ref:c,inert:!!i,onPointerDown:e=>{let t=c.current;if(e.button!==0||!t||!u.current||e.target.closest(`input, textarea, select, [contenteditable]`))return;let n={x:e.clientX,y:e.clientY},r=t.getBoundingClientRect(),i=u.current,a=!1,o=e=>{!a&&Math.hypot(e.clientX-n.x,e.clientY-n.y)<Cd||(a||getSelection()?.removeAllRanges(),document.documentElement.style.userSelect=`none`,a=!0,i.put={x:r.left+e.clientX-n.x,y:r.top+e.clientY-n.y})},s=()=>{if(removeEventListener(`pointermove`,o),removeEventListener(`pointerup`,s),!a)return;document.documentElement.style.userSelect=``;let e=e=>e.stopPropagation();addEventListener(`click`,e,{capture:!0,once:!0}),setTimeout(()=>removeEventListener(`click`,e,{capture:!0}))};addEventListener(`pointermove`,o),addEventListener(`pointerup`,s)},onPointerEnter:()=>d.current=!0,onPointerLeave:()=>d.current=!1,className:`fixed top-0 left-0 z-30 ${n?`w-[400px]`:`w-[330px]`} rounded-xl bg-ground py-1.5 shadow-float transition-opacity duration-250 ease-calm ${r||i===`shown`?`pointer-events-none opacity-0`:``}`,children:[(0,J.jsx)(`div`,{"data-card":!0,className:`grid grid-cols-[minmax(0,1fr)] ${o?`[&>*>button:first-child]:pr-9`:``}`,children:s}),o&&(0,J.jsx)(`button`,{"aria-label":`Close`,className:`absolute top-[11px] right-2 grid size-5 place-items-center rounded-full text-faint transition-colors duration-150 ease-calm hover:bg-hover hover:text-fg`,onMouseDown:e=>e.preventDefault(),onClick:()=>f.current?.(),children:(0,J.jsx)(`svg`,{viewBox:`0 0 12 12`,className:`size-2.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,"aria-hidden":!0,children:(0,J.jsx)(`path`,{d:`M3 3l6 6M9 3l-6 6`})})})]}):null}function Dd(e){if(!e||matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;let{card:t}=e;t.inert=!0,t.setAttribute(`aria-hidden`,`true`),e.in.append(t);let n=Number(getComputedStyle(t).opacity);if(t.style.visibility===`hidden`||!n)return t.remove();t.animate([{opacity:n,scale:1},{opacity:0,scale:.97}],{duration:140,easing:`cubic-bezier(0.4, 0, 1, 1)`,fill:`forwards`}).onfinish=()=>t.remove()}var Od=(e,t,n)=>Math.min(Math.max(e,t),Math.max(t,n)),kd=new WeakMap,Ad=`cubic-bezier(0.2, 0.8, 0.2, 1)`;function jd(e,t,n){let r=kd.get(e);if(r&&((e,t)=>e.map(e=>`${e.key}:${e.text}`).join(`|`)===t.map(e=>`${e.key}:${e.text}`).join(`|`))(r.parts,t))return;let i=t.flatMap(e=>Md(e).map(t=>Pd(t,e.soft))).join(``);if(kd.set(e,{parts:t,html:i}),!r||!n||matchMedia(`(prefers-reduced-motion: reduce)`).matches)return void(e.innerHTML=i);let a={duration:240,easing:Ad,fill:`both`};if(r.parts.map(e=>e.key).join()!==t.map(e=>e.key).join()){e.innerHTML=`<span class="inline-grid overflow-hidden align-top"><span data-new class="[grid-area:1/1] justify-self-center whitespace-nowrap">${i}</span><span data-old aria-hidden="true" class="[grid-area:1/1] justify-self-center whitespace-nowrap">${r.html}</span></span>`;let t={...a,duration:260};e.querySelector(`[data-new]`).animate([{transform:`translateY(${n*100}%)`},{transform:`none`}],t);let o=e.querySelector(`[data-old]`);o.animate([{transform:`none`},{transform:`translateY(${-n*100}%)`}],t).onfinish=()=>o.remove();return}let o=[];for(let e of t){let t=Md(e),n=Md(r.parts.find(t=>t.key===e.key)),i=t.length-n.length;for(let t=0;t<-i;t++)o.push({was:n[t],soft:e.soft,leaving:!0,group:`trim ${e.key}`});t.forEach((t,r)=>o.push({now:t,was:n[r-i],soft:e.soft,group:r-i<0?`grow ${e.key}`:void 0}))}e.innerHTML=o.map(e=>Pd(e.leaving?e.was:e.now,e.soft)).join(``);let s=[...e.children],c=-1,l;for(let e=o.length-1;e>=0;e--){let t=o[e],r=s[e],i=r.firstElementChild;if(!t.leaving&&t.was===t.now)continue;t.group&&t.group===l||c++,l=t.group;let u={...a,delay:c*28},d=r.offsetWidth;if(t.leaving){i.animate([{transform:`none`},{transform:`translateY(${-n*100}%)`}],u),r.animate([{width:`${d}px`},{width:`0px`}],u).onfinish=()=>r.remove();continue}i.animate([{transform:`translateY(${n*100}%)`},{transform:`none`}],u);let f=0;if(t.was!==void 0){let e=document.createElement(`i`);e.className=`absolute top-0 left-0 not-italic`,e.innerHTML=Nd(t.was),r.append(e),f=e.offsetWidth,e.animate([{transform:`none`},{transform:`translateY(${-n*100}%)`}],u).onfinish=()=>e.remove()}f!==d&&r.animate([{width:`${f}px`},{width:`${d}px`}],{...u,fill:`backwards`})}}var Md=e=>e.word?[e.text]:[...e.text],Nd=e=>e===` `?` `:e.replace(/[&<>"]/g,e=>`&#${e.charCodeAt(0)};`),Pd=(e,t)=>`<span class="relative inline-block overflow-hidden align-top${t?` text-faint`:``}"><i class="inline-block not-italic">${Nd(e)}</i></span>`,Fd=o(),Id=e=>e===0?`Before`:`Round ${e}`,Ld=e=>e<=6?1:Math.max(.25,.82**(e-6));function Rd(e){let{rounds:t,watching:n,earlier:r}=e,i=t[0]?.number??0,a=t.at(-1)?.number??0,o=(0,l.useRef)(e);o.current=e;let s=(0,l.useRef)(null),c=(0,l.useRef)(null),u=(0,l.useRef)(null),d=(0,l.useRef)(null),[f,p]=(0,l.useState)(!1),[m,h]=(0,l.useState)(!0),[g,_]=(0,l.useState)(),v=(0,l.useRef)({}),y=(0,l.useRef)(!1),b=r!==void 0,x=e.arrived&&!f?`arrived`:e.working&&!f?`working`:`round`,S=a>i,C=(e,t)=>t===void 0&&e===0?[{text:`Before`,key:`word`,word:!0}]:t===0?[{text:`Before`,key:`word`,word:!0},{text:` → `,key:`to`,soft:!0},{text:`Round `,key:`round`},{text:String(e),key:`number`}]:t===void 0?[{text:`Round`,key:`word`,word:!0,soft:e!==a},{text:` `,key:`gap`,soft:!0},{text:String(e),key:`number`,soft:e!==a}]:[{text:`Round`,key:`word`,word:!0},{text:` `,key:`gap`,soft:!0},{text:String(t),key:`then`},{text:` → `,key:`to`,soft:!0},{text:String(e),key:`number`}],w=x===`arrived`?[{text:Id(e.arrived.number),key:`word`,word:!0},{text:` is in`,key:`end`,soft:!0}]:x===`working`?[{text:Id(a+1),key:`word`,word:!0},{text:` coming`,key:`end`,soft:!0}]:C(n,r),T=x===`arrived`?1e6:x===`working`?1e6-1:n*1e3+(b?r+1:0),E=(0,l.useRef)(T);(0,l.useLayoutEffect)(()=>{jd(c.current,w,T<E.current?-1:1),E.current=T});let D=(0,l.useRef)(``);(0,l.useLayoutEffect)(()=>{e.quiet||D.current===`${i}-${a}`||(D.current=`${i}-${a}`,c.current.style.minWidth=`${zd(c.current,t,C)}px`)});let O=()=>{let e=u.current;if(!e)return;let t=e.clientWidth,n=0;for(let e=1;e<=a-i;e++)n+=Ld(e);let r=n?t/n:0,o=t,s={};for(let e=0;e<=a-i;e++)e&&(o-=r*Ld(e)),s[a-e]=m?o:t-o;v.current=s};(0,l.useLayoutEffect)(()=>{let e=s.current;if(!f||!e||!c.current)return;let t=e.parentElement,n=e.getBoundingClientRect(),r=t.querySelector(`[data-speed]`)?.getBoundingClientRect(),o=t.querySelector(`[data-views]`)?.getBoundingClientRect(),l=!!r&&Math.abs(r.top-n.top)<8;if(l!==m)return h(l);let u=c.current.offsetWidth+4,d=(l?n.right-r.left:o&&Math.abs(o.top-n.top)<8?o.right-n.left:n.width+170)-u-28,p=0;for(let e=1;e<=a-i;e++)p+=Ld(e);let g=S?ju(p*24,48,Math.max(48,d)):e.querySelector(`[data-none]`)?.offsetWidth??0;e.style.setProperty(`--lw`,`${u}px`),e.style.setProperty(`--hw`,`${u+28+g}px`),O()}),(0,l.useLayoutEffect)(()=>{s.current?.style.setProperty(`--lw`,`${(c.current?.offsetWidth??0)+4}px`),k()});let k=()=>{let e=u.current;if(!e||!S)return;Object.keys(v.current).length||O();for(let t of e.querySelectorAll(`[data-dot]`)){let e=Number(t.dataset.dot);t.style.left=`${v.current[e]??0}px`,t.style.setProperty(`--s`,(2+2*Math.min(1,Ld(a-e)*1.25)).toFixed(2))}let t=[v.current[i]??0,v.current[a]??0];Object.assign(e.querySelector(`[data-rail]`).style,{left:`${Math.min(...t)}px`,width:`${Math.abs(t[1]-t[0])}px`});let n=v.current[o.current.watching]??0;e.querySelector(`[data-now]`).style.left=`${n}px`;let r=v.current[o.current.earlier??o.current.watching-1];r!==void 0&&(e.querySelector(`[data-then]`).style.left=`${r}px`,Object.assign(e.querySelector(`[data-pair]`).style,{left:`${Math.min(r,n)}px`,width:`${Math.abs(n-r)}px`}))},A=e=>{let t=e-u.current.getBoundingClientRect().left,n=a;for(let e=i;e<=a;e++)Math.abs((v.current[e]??0)-t)<Math.abs((v.current[n]??0)-t)&&(n=e);return n},j=e=>{let t=u.current;if(!t)return;let n=e===void 0?void 0:e-t.getBoundingClientRect().left;for(let e of t.querySelectorAll(`[data-dot]`))e.style.setProperty(`--m`,n===void 0?`1`:(1+1.4*Math.max(0,1-Math.abs((v.current[Number(e.dataset.dot)]??0)-n)/26)).toFixed(3))};(0,l.useLayoutEffect)(()=>{let e=d.current,t=s.current;if(!e||!t||g===void 0||!u.current)return;let n=t.getBoundingClientRect(),r=parseFloat(getComputedStyle(t).getPropertyValue(`--hw`))||n.width,i=e.offsetWidth/2,a=m?n.width-r:0,o=u.current.getBoundingClientRect().left-n.left+(v.current[g]??0);e.style.left=`${ju(o,a+i,Math.max(a+i,a+r-i))}px`});let M=(e,t,n)=>{let r=e.pointerId;e.target.setPointerCapture?.(r);let i=e=>e.pointerId===r&&t(e.clientX),a=e=>{e.pointerId===r&&(removeEventListener(`pointermove`,i),removeEventListener(`pointerup`,a),removeEventListener(`pointercancel`,a),n())};addEventListener(`pointermove`,i),addEventListener(`pointerup`,a),addEventListener(`pointercancel`,a)},N=e=>{if(x!==`round`||!S||e.button!==0)return;let t=e.clientX,r=n,i=f,a=!1;M(e,e=>{if(!a&&Math.abs(e-t)<4)return;a||(a=!0,document.documentElement.classList.add(`**:cursor-ew-resize!`),(0,Fd.flushSync)(()=>p(!0)));let n=u.current.getBoundingClientRect().left+(v.current[r]??0)+e-t;j(n);let i=A(n);i!==o.current.watching&&o.current.onRound(i),_(i)},()=>{a&&(document.documentElement.classList.remove(`**:cursor-ew-resize!`),y.current=!0,setTimeout(()=>y.current=!1),p(i),_(void 0),j())})},ee=()=>{if(!y.current){if(x===`arrived`)return e.onRound(e.arrived.number);p(!f),_(void 0)}},te=e=>{if(!S||e.button!==0)return;let t=A(e.clientX),i=r??n-1,s=b&&Math.abs((v.current[t]??0)-(v.current[i]??0))<Math.abs((v.current[t]??0)-(v.current[n]??0)),c=e=>{let t=A(e);s?o.current.onEarlier(t):t!==o.current.watching&&o.current.onRound(t)};c(e.clientX),M(e,c,()=>{!s&&o.current.watching===a&&(p(!1),_(void 0))})},ne=(0,l.useRef)({by:0,opened:!1,fold:0});(0,l.useEffect)(()=>{let e=s.current,t=e=>{let{watching:t}=o.current;if(Math.abs(e.deltaX)<=Math.abs(e.deltaY)||!S||x!==`round`)return;e.preventDefault();let n=ne.current;if(f||((0,Fd.flushSync)(()=>p(!0)),n.opened=!0,n.by=0),n.by+=e.deltaX,Math.abs(n.by)>=30){let e=Math.sign((v.current[a]??0)-(v.current[i]??0))*Math.sign(n.by);n.by=0;let r=ju(t+e,i,a);r!==t&&o.current.onRound(r)}clearTimeout(n.fold),n.fold=window.setTimeout(()=>{n.opened&&p(!1),n.opened=!1,n.by=0},900)};return e?.addEventListener(`wheel`,t,{passive:!1}),()=>e?.removeEventListener(`wheel`,t)}),(0,l.useEffect)(()=>{if(!f)return;let e=e=>!s.current?.contains(e.target)&&p(!1),t=e=>{e.key===`Escape`&&(e.preventDefault(),p(!1),_(void 0),c.current?.focus())};return addEventListener(`pointerdown`,e),addEventListener(`keydown`,t,!0),()=>{removeEventListener(`pointerdown`,e),removeEventListener(`keydown`,t,!0)}},[f]);let re=t=>{if(t.key!==`ArrowLeft`&&t.key!==`ArrowRight`)return;t.preventDefault(),t.stopPropagation();let r=ju(n+(t.key===`ArrowRight`?1:-1),i,a);r!==n&&e.onRound(r)},ie=e=>{let t=new Date(e.finished??0);return`${t.toLocaleDateString(`en-GB`,{day:`numeric`,month:`short`})}, ${t.toLocaleTimeString(`en-GB`,{hour:`2-digit`,minute:`2-digit`})}`},ae=e=>new Date(e).toLocaleTimeString(`en-GB`,{hour:`2-digit`,minute:`2-digit`}),oe=g===void 0?void 0:t.find(e=>e.number===g),se=`pointer-events-none absolute bottom-[calc(100%+3px)] z-7 max-w-[380px] -translate-x-1/2 truncate rounded-[5px] bg-surface px-[7px] py-px text-[11px] leading-[14px] whitespace-nowrap text-soft shadow-tip transition-[opacity,translate] duration-150 ease-calm`,ce=`translate-y-[2px] opacity-0`;return(0,J.jsxs)(`nav`,{ref:s,"data-open":f?m?`left`:`right`:void 0,"aria-label":`Rounds`,className:`group/rounds relative flex h-[calc(1.5em+10px)] items-center gap-3 rounded-lg ${e.quiet?``:`bg-hover px-0.5`}`,children:[(0,J.jsx)(`button`,{ref:c,"aria-expanded":f,"aria-label":x===`arrived`?`The agent's next round is in`:x===`working`?`The agent started at ${ae(e.working)}`:`Rounds`,"data-say":x,className:`relative z-6 touch-pan-y rounded-md px-2.5 py-[3px] text-center whitespace-nowrap tabular-nums transition-colors duration-150 ease-calm ${e.quiet?`text-fg hover:bg-hover aria-expanded:bg-surface aria-expanded:shadow-[0_0_0_1px_var(--line)]`:`text-fg hover:bg-surface hover:shadow-[0_0_0_1px_var(--line)] aria-expanded:bg-surface aria-expanded:shadow-[0_0_0_1px_var(--line)]`} ${x===`round`&&S?`cursor-ew-resize`:``} data-[say=arrived]:before:mr-1.5 data-[say=arrived]:before:mb-px data-[say=arrived]:before:inline-block data-[say=arrived]:before:size-1.5 data-[say=arrived]:before:rounded-full data-[say=arrived]:before:bg-amber data-[say=arrived]:before:align-middle data-[say=working]:before:mt-[calc(.5lh-3px)] data-[say=working]:before:mr-1.5 data-[say=working]:before:inline-block data-[say=working]:before:size-1.5 data-[say=working]:before:animate-breathe data-[say=working]:before:rounded-full data-[say=working]:before:bg-slate data-[say=working]:before:align-top`,onPointerDown:N,onClick:ee,onKeyDown:re}),(0,J.jsx)(`div`,{className:`absolute top-0 bottom-0 z-5 w-[var(--hw,100%)] rounded-lg [background:linear-gradient(var(--hover),var(--hover)),var(--ground)] ${m?`right-0 [clip-path:inset(0_0_0_calc(100%_-_var(--lw,0px))_round_8px)]`:`left-0 [clip-path:inset(0_calc(100%_-_var(--lw,0px))_0_0_round_8px)]`} invisible transition-[clip-path,visibility] duration-[280ms,0s] delay-[0s,280ms] ease-calm group-data-open/rounds:visible group-data-open/rounds:[clip-path:inset(0_0_0_0_round_8px)] group-data-open/rounds:delay-0`,children:(0,J.jsxs)(`div`,{ref:u,role:`slider`,tabIndex:f?0:-1,"aria-label":`Rounds`,"aria-valuemin":i,"aria-valuemax":a,"aria-valuenow":n,"aria-valuetext":Id(n)+(b?`, against ${Id(r)}`:``),className:`absolute top-0 bottom-0 touch-none *:absolute *:top-1/2 ${m?`right-[calc(var(--lw,0px)+12px)] left-4`:`right-4 left-[calc(var(--lw,0px)+12px)]`} ${S?`cursor-pointer`:`cursor-default`}`,onPointerDown:te,onPointerMove:e=>{S&&(j(e.clientX),_(A(e.clientX)))},onPointerLeave:()=>{j(),_(void 0)},onKeyDown:re,children:[S&&(0,J.jsx)(`div`,{"data-rail":!0,className:`-mt-px h-0.5 rounded-full bg-line`}),S&&t.map(e=>(0,J.jsx)(`i`,{"data-dot":e.number,style:{"--i":a-e.number},className:`-mt-[calc(var(--s,4)*.5px)] -ml-[calc(var(--s,4)*.5px)] size-[calc(var(--s,4)*1px)] rounded-full opacity-0 transition-[opacity,scale,background-color] duration-[150ms,120ms,150ms] ease-calm group-data-open/rounds:opacity-100 group-data-open/rounds:delay-[calc(var(--i,0)*22ms+60ms),0s,0s] ${g===e.number?`bg-fg [scale:max(var(--m,1),1.75)]`:`bg-faint [scale:var(--m,1)]`}`},e.number)),S&&(0,J.jsx)(`div`,{"data-pair":!0,className:`-mt-px h-0.5 bg-fg transition-[left,width,opacity] duration-200 ease-calm ${b?`opacity-100`:`opacity-0`}`}),S&&(0,J.jsx)(`i`,{"data-then":!0,className:`-mt-[4.5px] -ml-[4.5px] size-[9px] rounded-full bg-ground shadow-[inset_0_0_0_2px_var(--fg)] transition-[left,opacity] duration-200 ease-calm ${b?`opacity-100`:`opacity-0`}`}),S&&(0,J.jsx)(`i`,{"data-now":!0,className:`-mt-[4.5px] -ml-[4.5px] size-[9px] rounded-full bg-fg shadow-[0_0_0_2px_var(--ground)] transition-[left] duration-200 ease-calm`}),!S&&(0,J.jsx)(`span`,{"data-none":!0,className:`${m?`right-0`:`left-0`} -translate-y-1/2 text-xs whitespace-nowrap text-faint opacity-0 transition-opacity duration-150 ease-calm group-data-open/rounds:opacity-100 group-data-open/rounds:delay-100`,children:`Nothing earlier yet`})]})}),(0,J.jsx)(`span`,{ref:d,"aria-hidden":!0,className:`${se} ${oe&&f?`opacity-100`:ce}`,children:oe&&(0,J.jsx)(`b`,{className:`mr-1.5 font-medium text-fg`,children:oe.number===0?`Before`:`${Id(oe.number)} · ${ie(oe)}`})}),x!==`round`&&(0,J.jsx)(`span`,{"aria-hidden":!0,className:`${se} ${ce} left-[calc(var(--lw,0px)/2)] group-has-[[data-say]:hover]/rounds:translate-y-0 group-has-[[data-say]:hover]/rounds:opacity-100`,children:x===`arrived`?`${Id(e.arrived.number)} came in at ${ae(e.arrived.finished??``)}`:`The agent started at ${ae(e.working)}`})]})}function zd(e,t,n){let r=getComputedStyle(e),i=document.createElement(`canvas`).getContext(`2d`);i.font=`${r.fontWeight} ${r.fontSize} ${r.fontFamily}`;let a=e=>i.measureText(e).width,o=e=>e.map(e=>e.text).join(``),s=t.at(-1)?.number??0,c=a(`${Id(s+1)} coming`)+12;c=Math.max(c,a(`${Id(s+1)} is in`)+12);for(let e of t){c=Math.max(c,a(o(n(e.number))));for(let r of t)r.number<e.number&&(c=Math.max(c,a(o(n(e.number,r.number)))))}return Math.max(96,Math.ceil(c+parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)+4))}var Bd=14,Vd=`end`,Hd=64,Ud=18,Wd=12,Gd=(e,t)=>`calc(${(e*100).toFixed(4)}% - ${(t*(1-e)).toFixed(2)}px)`,Kd=.03,qd=8,Jd=10,Yd=6,Xd=8;function Zd({playhead:e,dots:t,onDot:n,marks:r,onMark:i,live:a,forks:o=[],growing:s,lit:c,end:u}){let d=zu(e),f=e.flows,p=e.flow.fork,m=p&&f.find(e=>e.name===p)||e.flow,h=f.indexOf(m),g=o.find(t=>t.name===e.flow.name),_=(0,l.useRef)(null),[v,y]=(0,l.useState)(),[b,x]=(0,l.useState)(!1),[S,C]=(0,l.useState)(),[w,T]=(0,l.useState)(),E=(0,l.useRef)(void 0);(0,l.useLayoutEffect)(()=>{let e=E.current&&t.filter(e=>!E.current.has(e.id));if(E.current=new Set(t.map(e=>e.id)),e?.length&&!matchMedia(`(prefers-reduced-motion: reduce)`).matches)for(let t of e){let e=_.current?.querySelector(`[data-dot="${CSS.escape(t.id)}"]`);(e?.querySelector(`span`)??e)?.animate([{scale:.3,opacity:0},{scale:1.6,opacity:1,offset:.6},{scale:1}],{duration:360,easing:`cubic-bezier(0.2, 0.8, 0.2, 1)`})}});let D=(0,l.useRef)(null),O=(0,l.useRef)(d.playing);(0,l.useLayoutEffect)(()=>{O.current!==d.playing&&(O.current=d.playing,matchMedia(`(prefers-reduced-motion: reduce)`).matches||D.current?.animate([{opacity:0,scale:.5},{opacity:1,scale:1}],{duration:180,easing:`cubic-bezier(0.2, 0.8, 0.2, 1)`}))});let k=(e,t)=>{let n=f.indexOf(e);return n<h?0:n>h?1:ju((t+Du)/(e.length+Du))},A=(e,t)=>`${(k(e,t)*100).toFixed(4)}%`,j=e=>`${(e*100).toFixed(4)}%`,M=s&&(o.find(e=>e.name===s.name)??s),N=[...o.filter(e=>e.name!==M?.name),...M?[M]:[]],ee=e=>{let n=Math.max(...t.filter(t=>t.fork===e.name).map(e=>e.at));return n>e.at&&n<e.length&&(k(m,e.length)-k(m,n))*oe<Xd?n:e.length},te=e=>{let t=k(m,e.at);return{start:t,end:Math.min(1,Math.max(k(m,ee(e)),t+Kd))}},ne=e=>{let t=(1-k(m,e.at))*oe,n=ju(t,30,Hd);return{length:n,back:Math.max(0,n-t)}},re=(e,t)=>{let{start:n,end:r}=te(e),i=ee(e);return i<=e.at?r:n+(ju(t,e.at,i)-e.at)/(i-e.at)*(r-n)},ie=(e,t)=>{let n=_.current.getBoundingClientRect(),{start:r,end:i}=te(e),a=ee(e);return ju(e.at+(ju((t-n.left)/n.width)-r)/Math.max(1e-4,i-r)*(a-e.at),e.at,a)},ae=e=>{let t=e.fork?N.find(t=>t.name===e.fork):void 0;return t?re(t,e.at):k(m,e.at)},[oe,se]=(0,l.useState)(0);(0,l.useEffect)(()=>{let e=new ResizeObserver(([e])=>se(e.contentRect.width));return e.observe(_.current),()=>e.disconnect()},[]);let ce=new Map,le=t.filter(e=>e.until===void 0).sort((e,t)=>e.at-t.at);for(let e=0;e<le.length;){let t=e+1;for(;t<le.length&&(k(m,le[t].at)-k(m,le[t-1].at))*oe<Bd;)t++;le.slice(e,t).forEach((n,r)=>ce.set(n.id,(r-(t-e-1)/2)*Bd)),e=t}let ue=new Map,de=new Map,fe=N.map((e,t)=>{let{start:n,end:r}=te(e);return{fork:e,made:t,from:n*oe,to:(e===M?n*oe+ne(e).length-ne(e).back:r*oe)+Jd}}).sort((e,t)=>e.from-t.from||t.to-e.to||e.made-t.made),pe;for(let e of fe)pe=pe&&e.from-pe.from<1?{from:pe.from,step:pe.step+Yd}:{from:e.from,step:0},de.set(e.fork.name,pe.step),e.from+=pe.step;for(let e of[...fe].reverse()){let t=fe.filter(t=>t.from>e.from&&t.from<e.to).map(e=>ue.get(e.fork.name));ue.set(e.fork.name,Math.min(2,t.length?1+Math.max(...t):0))}let me=e=>e?(ue.get(e.name)??0)*qd:0,[P,he]=(0,l.useState)(!1),[F,I]=(0,l.useState)(m.name);F!==m.name&&(I(m.name),b||he(!0)),(0,l.useEffect)(()=>{if(!P)return;let e=setTimeout(()=>he(!1),400);return()=>clearTimeout(e)},[P,F]);let L=e=>{let t=_.current.getBoundingClientRect();return-Du+ju((e-t.left)/t.width,0,.9995)*(m.length+Du)},R=(e,t)=>{let n=_.current.getBoundingClientRect(),r=t,i=1/0;for(let t of _.current.querySelectorAll(`[data-at]`)){let a=Number(t.dataset.at),o=Math.abs(e-(n.left+k(m,a)*n.width));o<5&&o<i&&([i,r]=[o,a])}return r},ge=(0,l.useRef)(!1),z=t=>{if(t.button!==0)return;let n=!!t.target.closest(`[data-mark]`),r=o.find(e=>e.name===t.target.closest(`[data-fork]`)?.getAttribute(`data-fork`)),i=t=>r?e.go({flow:r.name,at:ie(r,t)}):e.go({flow:m.name,at:R(t,L(t))}),a=t.clientX,s=t.pointerId,c=e.now.playing,l=!1,u=()=>{l=!0,C(r?.name??``),x(!0),e.scrub(!0),_.current.setPointerCapture(s)};n||(u(),r?i(a):e.go({flow:m.name,at:L(a)}));let d=e=>{e.pointerId===s&&(!l&&Math.abs(e.clientX-a)<4||(l||u(),i(e.clientX)))},f=t=>{t.pointerId===s&&(removeEventListener(`pointermove`,d),removeEventListener(`pointerup`,f),removeEventListener(`pointercancel`,f),l&&(C(void 0),n&&(ge.current=!0,setTimeout(()=>ge.current=!1)),x(!1),e.scrub(!1),c&&e.now.moment.at>=e.flow.length-.06&&e.pause()))};addEventListener(`pointermove`,d),addEventListener(`pointerup`,f),addEventListener(`pointercancel`,f)},B=d.moment.at,V=M??g,_e=e=>`calc(${j(k(m,e.at))} + ${ne(e).length-ne(e).back-Ud}px)`,ve=M?_e(M):j(g?re(g,B):k(m,B)),ye=V?A(m,V.at):ve,be=S??v?.fork??(v?``:void 0),xe=be!==void 0&&be===(V?V.name:``),Se=P?`transition-[left,width,opacity] duration-300 ease-calm`:``,Ce=`pointer-events-none absolute bottom-[calc(100%-1px)] -translate-x-1/2 rounded-[5px] bg-surface px-[7px] py-px text-[11px] leading-[14px] whitespace-nowrap shadow-tip transition-[opacity,translate] duration-150 ease-calm`,we=t.find(e=>e.id===w),Te=r.find(e=>e.id===w),Ee=w===Vd?u:void 0,De=!g&&B>=m.length-.06,Oe=d.playing?void 0:we??Te??Ee,ke=!b&&v!==void 0&&!Oe,Ae=v?.fork?N.find(e=>e.name===v.fork):void 0,je=v===void 0?void 0:j(Ae?re(Ae,v.at):k(m,v.at));return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`button`,{className:`grid size-7 flex-none place-items-center rounded-full text-fg transition-colors duration-150 ease-calm hover:bg-hover`,"aria-label":d.playing?`Pause`:`Play`,onClick:()=>e.toggle(),children:(0,J.jsx)(`svg`,{ref:D,viewBox:`0 0 20 20`,fill:`currentColor`,className:`size-3.5`,"aria-hidden":!0,children:d.playing?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`rect`,{x:`5.5`,y:`4.5`,width:`3`,height:`11`,rx:`1`}),(0,J.jsx)(`rect`,{x:`11.5`,y:`4.5`,width:`3`,height:`11`,rx:`1`})]}):(0,J.jsx)(`path`,{d:`M7 4.8v10.4c0 .6.7 1 1.2.6l8-5.2a.7.7 0 000-1.2l-8-5.2c-.5-.4-1.2 0-1.2.6z`})})}),(0,J.jsxs)(`span`,{className:`grid text-soft tabular-nums`,children:[(0,J.jsxs)(`span`,{className:`col-start-1 row-start-1 ${a?`invisible`:``}`,children:[fl(Math.max(0,B)),(0,J.jsxs)(`small`,{className:`text-[smaller] text-faint`,children:[` / `,fl(e.flow.length)]})]}),a&&(0,J.jsx)(`span`,{className:`col-start-1 row-start-1 text-fg`,children:`Live`})]}),(0,J.jsxs)(`div`,{ref:_,role:`slider`,tabIndex:0,"aria-label":`Playback position`,"aria-valuemin":0,"aria-valuemax":m.length,"aria-valuenow":Math.max(0,B),"data-scrubbing":b?``:void 0,className:`group/line relative mr-5 h-9 min-w-30 flex-[1_1_160px] cursor-pointer touch-none select-none`,onPointerDown:z,onMouseDown:e=>e.preventDefault(),onPointerMove:e=>{if(b)return;let t=e.target,n=N.find(e=>e.name===t.closest(`[data-fork]`)?.getAttribute(`data-fork`));y(t.closest(`[data-mark]`)?void 0:n?{at:ie(n,e.clientX),fork:n.name}:{at:L(e.clientX)})},onPointerLeave:()=>y(void 0),children:[(0,J.jsx)(`div`,{className:`absolute inset-x-0 z-1 bg-line transition-[top,height,border-radius] duration-150 ease-calm ${be===``?`top-4 h-1 rounded-[2px]`:`top-[17px] h-0.5 rounded-[1px]`}`,children:(0,J.jsx)(`div`,{className:`absolute top-0 left-0 h-full rounded-[inherit] ${be===``?`bg-soft`:`bg-faint`} ${Se}`,style:{width:ye}})}),[...N].sort((e,t)=>me(e)-me(t)).map(e=>{let{start:t,end:n}=te(e),r=e===V,i=e===M,a=r?i?1:re(e,B):t,o=be===e.name,s=me(e),c=o||r?`var(--amber)`:`color-mix(in srgb, var(--amber) 40%, var(--ground))`,l=`color-mix(in srgb, var(--amber) ${o?45:25}%, var(--ground))`,u=Wd+s,d=de.get(e.name)??0,f=`M0 ${16+s} C ${u/2} ${16+s}, ${u/2} 4, ${u} 4`;return(0,J.jsxs)(`div`,{"data-fork":e.name,className:`absolute h-2 transition-[width] duration-500 ease-calm`,style:{top:1-s,left:`calc(${j(t)} + ${d-(i?ne(e).back:0)}px)`,width:i?`${ne(e).length}px`:`calc(${j(n-t)} - ${d}px)`},children:[(0,J.jsx)(`span`,{"aria-hidden":!0,className:`absolute inset-x-0 -top-1`,style:{bottom:s?0:-2}}),(0,J.jsx)(`svg`,{width:u,height:`8`,"aria-hidden":!0,className:`pointer-events-none absolute top-0 left-0 overflow-visible`,children:(0,J.jsx)(`path`,{d:f,fill:`none`,stroke:r?c:l,strokeWidth:o?4:2,className:`transition-[stroke-width] duration-150 ease-calm`})}),(0,J.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute transition-[top,height,border-radius] duration-150 ease-calm ${i?`right-[18px]`:`right-0`} ${o?`top-0.5 h-1 rounded-r-[2px]`:`top-[3px] h-0.5 rounded-r-[1px]`}`,style:{left:u,background:i?c:`linear-gradient(90deg, ${c} ${Gd(ju((a-t)/Math.max(1e-4,n-t)),u)}, ${l} 0)`}}),i&&(0,J.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute right-0 w-[18px] animate-breathe motion-reduce:animate-none ${o?`top-0.5 h-1 rounded-r-[2px]`:`top-[3px] h-0.5 rounded-r-[1px]`}`,style:{background:`linear-gradient(90deg, ${c}, transparent)`}})]},e.name)}),f.filter(e=>!e.fork).length>1&&f.filter(e=>!e.fork).map(e=>(0,J.jsx)(`span`,{className:`pointer-events-none absolute top-[23px] truncate text-[10.5px] leading-3 whitespace-nowrap text-faint ${e===m?``:`invisible opacity-0`} ${Se||`transition-opacity duration-300`}`,style:{left:A(e,-1.2),width:`calc(${A(e,e.length)} - ${A(e,-1.2)})`},children:e.name},e.name)),u&&(0,J.jsx)(`button`,{"data-mark":!0,"aria-label":u.words,className:`group/end absolute top-[11px] left-[calc(100%+4px)] z-3 grid size-3.5 place-items-center`,onPointerEnter:()=>T(Vd),onPointerLeave:()=>T(void 0),onClick:()=>!ge.current&&u.go(),children:(0,J.jsx)(hd,{end:u.end,ahead:!De,just:u.just,className:`size-3.5 group-hover/end:scale-115`})}),r.map(e=>{let t={onPointerEnter:()=>T(e.id),onPointerLeave:()=>T(void 0),onClick:()=>!ge.current&&i(e.id)},n=A(m,e.at),r=B<e.at-.02?e.lit?`bg-ground shadow-[inset_0_0_0_1.5px_var(--fg),0_0_0_1.5px_var(--ground),0_0_0_3px_var(--fg)]`:`bg-ground shadow-[inset_0_0_0_1.5px_var(--fg),0_0_0_1.5px_var(--ground)]`:e.lit?`bg-fg shadow-[0_0_0_1.5px_var(--ground),0_0_0_3px_var(--fg)]`:`bg-fg shadow-[0_0_0_1.5px_var(--ground)]`;return(0,J.jsxs)(`button`,{"data-mark":!0,"data-at":e.at,"aria-label":`${e.name}, ${fl(e.at)}`,className:`group/mark absolute top-[11px] z-3 -ml-[7px] grid size-3.5 place-items-center ${Se}`,style:{left:n},...t,children:[(0,J.jsx)(`i`,{className:`size-[7px] rotate-45 transition-[scale,background-color] duration-150 ease-calm group-hover/mark:scale-130 ${r}`}),e.note&&(0,J.jsx)(`b`,{className:`absolute top-[calc(50%-8px)] left-[calc(50%+2px)] size-1.5 rounded-full shadow-[0_0_0_1.5px_var(--ground)]`,style:{background:e.note.ink}})]},e.id)}),t.map(e=>{let t=e.fork?!(V?.name===e.fork&&B>=e.at-.02):B<e.at-.02,r=e.until===void 0?0:ju((B-e.at)/(e.until-e.at))*100,i=e.ink,a=`color-mix(in srgb, ${i} 35%, var(--ground))`;return(0,J.jsx)(`button`,{"data-mark":!0,"data-dot":e.id,"data-at":e.at,"aria-label":`Note ${e.number} at ${fl(e.at)}`,className:`group/dot absolute z-4 grid place-items-center ${e.until===void 0?`${e.fork?``:`top-[11px]`} size-3.5 -translate-x-1/2`:`top-[15px] -ml-[3px] box-content h-1.5 rounded-[3px] px-[3px] shadow-[0_0_0_2px_var(--ground)] transition-[top,height,border-radius] duration-150 ease-calm hover:top-3.5 hover:h-2 hover:rounded-[4px]`} ${Se}`,style:{left:e.fork?`min(${e.fork===M?.name?_e(M):j(ae(e))}, calc(100% - 4px))`:`calc(${j(ae(e))} + ${ce.get(e.id)??0}px)`,...e.fork&&e.until===void 0&&{top:-2-me(N.find(t=>t.name===e.fork))},...e.until!==void 0&&{width:`calc(${A(m,e.until)} - ${A(m,e.at)})`,background:`linear-gradient(90deg, ${i} ${r}%, ${a} ${r}%)`}},onPointerEnter:()=>T(e.id),onPointerLeave:()=>T(void 0),onClick:()=>!ge.current&&n(e.id),children:e.until===void 0&&(0,J.jsx)(`span`,{className:`size-1.5 rounded-full shadow-[0_0_0_2px_var(--ground)] transition-[scale,background-color] duration-150 ease-calm group-hover/dot:scale-140 ${c===e.id?`scale-140`:``}`,style:{background:t?a:i}})},e.id)}),(0,J.jsx)(`div`,{className:`pointer-events-none absolute z-5 bg-fg transition-[top,bottom,width,margin,border-radius] duration-150 ease-calm ${V?xe?`-top-[3px] bottom-[21px]`:`-top-[2px] bottom-[22px]`:xe?`top-1.5 bottom-1.5`:`top-[9px] bottom-[9px]`} ${xe?`-ml-[1.5px] w-[3px] rounded-[1.5px]`:`-ml-px w-0.5 rounded-[1px]`} ${Se}`,style:{left:ve,translate:`0 ${-me(V)}px`}}),(0,J.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute z-4 transition-opacity duration-120 ease-calm ${Ae?`-top-[3px] bottom-[21px] -ml-px w-0.5 rounded-[1px] bg-amber`:`top-1.5 bottom-1.5 -ml-[1.5px] w-[3px] rounded-[1.5px] bg-fg`} ${ke?Ae?`opacity-60`:`opacity-30`:`opacity-0`}`,style:{left:je,translate:`0 ${-me(Ae)}px`}}),(0,J.jsxs)(`span`,{"aria-hidden":!0,className:`${Ce} z-300 text-fg ${Oe?`translate-y-0 opacity-100`:`translate-y-[2px] opacity-0`}`,style:{marginBottom:me(we?.fork?N.find(e=>e.name===we.fork):void 0),left:we?we.fork&&we.fork===M?.name?_e(M):j(ae(we)):Te?A(m,Te.at):Ee?`calc(100% + 11px)`:void 0},children:[we&&(0,J.jsx)(`span`,{className:`block max-w-[220px] truncate`,children:we.words}),Ee&&(0,J.jsx)(`span`,{className:`block`,children:Ee.words}),Te&&(0,J.jsxs)(`span`,{className:`block max-w-[320px] truncate`,children:[Te.note&&(0,J.jsx)(`b`,{className:`mr-[5px] font-semibold text-amber-ink`,children:Te.note.number}),Te.name]})]}),(0,J.jsx)(`span`,{"aria-hidden":!0,className:`${Ce} z-299 tabular-nums ${b?`text-fg`:`text-soft`} ${!Oe&&(b||v!==void 0)?`translate-y-0 opacity-100`:`translate-y-[2px] opacity-0`}`,style:{marginBottom:me(b?V:Ae),left:b?ve:je},children:fl(Math.max(0,b?B:v?.at??0))})]})]})}function Qd(e){let t=zu(e.playhead,e=>e.speed),n=e.watching===e.rounds[0]?.number,r=!e.shown||e.shown.fit>=.995,i=e.zoomed&&!r,a=`${Math.round(Math.min(1,i?e.shown.k:e.shown?.fit??1)*100)}%`,o=`rounded-md px-1.5 py-[3px] whitespace-nowrap text-faint transition-colors duration-150 ease-calm`,s=`transition-opacity duration-200 ease-calm group-has-[[data-open=left]]/controls:pointer-events-none group-has-[[data-open=left]]/controls:opacity-0`,c=e.watching===e.rounds.at(-1)?.number,l=`transition-opacity duration-200 ease-calm group-has-[[data-open=right]]/controls:pointer-events-none group-has-[[data-open=right]]/controls:opacity-0`;return(0,J.jsxs)(`div`,{className:`group/controls flex min-w-0 flex-wrap items-center gap-3 pt-[18px] select-none`,children:[(0,J.jsx)(Zd,{playhead:e.playhead,dots:e.dots,onDot:e.onDot,marks:e.marks,onMark:e.onMark,live:e.live===`shown`,forks:e.forks,growing:e.growing,lit:e.lit,end:e.end}),(0,J.jsx)(`button`,{"data-speed":!0,className:`${o} ${s} text-center hover:bg-hover hover:text-fg ${t<1?`text-amber-ink`:``}`,"aria-label":`Speed ${ef(t)}`,onClick:()=>e.playhead.slower(),children:(0,J.jsx)($d,{text:ef(t),order:t,by:t})}),(0,J.jsx)(`button`,{className:`${o} ${s} -ml-1.5 min-w-[46px] text-left ${r?`cursor-default opacity-55`:`hover:bg-hover hover:text-fg ${i?`text-fg`:``}`}`,"aria-label":r?`Shown at actual size`:i?`Fit the recording to the frame`:`Show the recording at actual size`,onClick:()=>!r&&e.onSize(),children:(0,J.jsx)($d,{text:a,order:parseInt(a),by:i})}),!e.stage&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{className:`h-4 w-px flex-none bg-line ${s}`}),(0,J.jsx)(Rd,{rounds:e.rounds,watching:e.watching,earlier:e.earlier,arrived:e.arrived,working:e.working,onRound:e.onRound,onEarlier:e.onEarlier}),(0,J.jsx)(`div`,{"data-views":!0,role:`group`,"aria-label":`Compare`,className:`flex gap-0.5 rounded-lg bg-hover p-0.5 ${l}`,children:[`one`,`side`].map(t=>{let r=t===`one`?`On its own`:`Side by side`,i=n&&t!==`one`,a=n?t===`one`:e.look===t;return(0,J.jsxs)(`button`,{"aria-pressed":a,"aria-label":r,disabled:i,className:`group/look relative inline-flex items-center rounded-md px-2 py-[3px] text-soft transition-colors duration-150 ease-calm enabled:hover:bg-hover enabled:hover:text-fg disabled:cursor-default disabled:text-faint aria-pressed:bg-surface aria-pressed:text-fg aria-pressed:shadow-[0_0_0_1px_var(--line)]`,onClick:()=>e.onLook(t),children:[(0,J.jsx)(`svg`,{viewBox:`0 0 16 12`,"aria-hidden":!0,className:`block h-[1.5em] w-4 fill-none stroke-current stroke-[1.4] group-disabled/look:opacity-55`,children:t===`one`?(0,J.jsx)(`rect`,{x:`1`,y:`1`,width:`14`,height:`10`,rx:`2`}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`rect`,{x:`1`,y:`1`,width:`6`,height:`10`,rx:`1.5`}),(0,J.jsx)(`rect`,{x:`9`,y:`1`,width:`6`,height:`10`,rx:`1.5`})]})}),(0,J.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute bottom-[calc(100%+5px)] left-1/2 -translate-x-1/2 translate-y-[2px] rounded-[5px] bg-surface px-[7px] py-px text-[11px] leading-[14px] whitespace-nowrap text-fg opacity-0 shadow-tip transition-[opacity,translate] duration-150 ease-calm group-hover/look:translate-y-0 group-hover/look:opacity-100`,children:i?`Nothing earlier to compare with`:r})]},t)})}),(0,J.jsx)(`span`,{className:`h-4 w-px flex-none bg-line ${l}`}),(0,J.jsxs)(`button`,{disabled:!c,"aria-pressed":!!e.live,className:`group/take relative ${o} ${l} enabled:hover:bg-hover enabled:hover:text-fg disabled:cursor-default disabled:opacity-55 aria-pressed:text-fg ${e.live===`waiting`?`animate-pulse`:``}`,onClick:e.onTakeOver,children:[`Take over`,(0,J.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute right-0 bottom-[calc(100%+5px)] translate-y-[2px] rounded-[5px] bg-surface px-[7px] py-px text-[11px] leading-[14px] whitespace-nowrap text-fg opacity-0 shadow-tip transition-[opacity,translate] duration-150 ease-calm group-hover/take:translate-y-0 group-hover/take:opacity-100`,children:c?e.live===`shown`?`Back to the recording · Esc`:e.live===`waiting`?`Getting it ready…`:`Carry on from here in the app, by hand · T`:`Only the latest round is the app as it is now`})]})]})]})}function $d({text:e,order:t,by:n}){let r=(0,l.useRef)(null),i=(0,l.useRef)({order:t,by:n});return(0,l.useLayoutEffect)(()=>{jd(r.current,[{text:e,key:`text`}],n===i.current.by?0:t<i.current.order?-1:1),i.current={order:t,by:n}}),(0,J.jsx)(`span`,{ref:r,"aria-hidden":!0})}var ef=e=>e===1?`1×`:e===.5?`½×`:`¼×`;function tf(e){return of(`playthrough:${e}:unsent`,e=>Object.fromEntries(Object.entries(e??{}).map(([e,t])=>[e,{...au,...t}])),e=>Object.values(e).every(e=>!du(e)&&!e.unsaved.length),()=>Object.fromEntries(rf(e,``).map(({round:e,kept:t})=>[e,t])))}function nf(e){return of(`playthrough:${e}:watched`,e=>Array.isArray(e)?e:[],e=>!e.length,()=>rf(e,`:watched`).flatMap(({round:e,kept:t})=>Array.isArray(t)?t.map(t=>({flow:t,round:e})):[]))}function rf(e,t){let n=RegExp(`^playthrough:${e.replace(/[^\w-]/g,`\\$&`)}:(\\d+)${t}$`);try{return Object.keys(localStorage).flatMap(e=>{let t=n.exec(e)?.[1];if(t===void 0)return[];let r=af(e);return localStorage.removeItem(e),r?[{round:Number(t),kept:r}]:[]})}catch{return[]}}function af(e){try{return JSON.parse(localStorage.getItem(e)??`null`)}catch{return null}}function of(e,t,n,r){let i=e=>(af(e)===null&&sf(e,r(),n),t(af(e))),[a,o]=(0,l.useState)(()=>({key:e,value:i(e)}));return a.key!==e&&o({key:e,value:i(e)}),[a.key===e?a.value:i(e),e=>o(t=>{let r=e(t.value);return sf(t.key,r,n),{key:t.key,value:r}})]}function sf(e,t,n){try{n(t)?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(t))}catch{}}var cf={duration:420,easing:`cubic-bezier(.3,.7,.1,1)`};function lf(e){return matchMedia(`(prefers-reduced-motion: reduce)`).matches?[]:[...e.querySelectorAll(`[data-picture]`)].flatMap(e=>{let t=e.getBoundingClientRect();return t.width?[{flow:e.dataset.picture,from:e,box:t,copy:pf(e)}]:[]})}function uf(e,t){let n=e[0],r=t.getBoundingClientRect();if(!n||!r.width)return 0;let i=ff(n.from,n.box,n.copy);t.toggleAttribute(`data-flying`,!0);let a={left:`${r.left}px`,top:`${r.top}px`,width:`${r.width}px`,height:`${r.height}px`,borderRadius:getComputedStyle(t).borderRadius};return i.animate([{},a],{duration:cf.duration,easing:cf.easing,fill:`forwards`}).onfinish=()=>{for(let e of[n.from,t])e.removeAttribute(`data-flying`);i.remove()},cf.duration}function df(e,t,n,r){let i=r.getBoundingClientRect();if(matchMedia(`(prefers-reduced-motion: reduce)`).matches||!t.width||!i.width)return;let a=pf(r),o=ff(r,t,a);if(e.toggleAttribute(`data-flying`,!0),n){let e=Object.assign(document.createElement(`img`),{src:n,alt:``,className:`absolute inset-0 size-full object-contain`});o.prepend(e),a.animate([{opacity:0},{opacity:0,offset:.5},{opacity:1}],cf.duration)}let s={left:`${i.left}px`,top:`${i.top}px`,width:`${i.width}px`,height:`${i.height}px`,borderRadius:getComputedStyle(r).borderRadius};o.animate([{},s],{duration:cf.duration,easing:cf.easing,fill:`forwards`}).onfinish=()=>{for(let t of[r,e])t.removeAttribute(`data-flying`);o.remove()}}function ff(e,t,n){let r=document.createElement(`div`);return r.className=`pointer-events-none fixed z-60 overflow-hidden bg-paper shadow-frame`,Object.assign(r.style,{left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`,borderRadius:getComputedStyle(e).borderRadius}),r.append(n),document.body.append(r),e.toggleAttribute(`data-flying`,!0),r}function pf(e){let t=document.createElement(`div`);t.className=`absolute inset-0`;for(let n of e.children){let e=getComputedStyle(n);if(n.hasAttribute(`data-pointing`)||Number(e.opacity)<.01||e.visibility===`hidden`)continue;let r=n.cloneNode(!0);Object.assign(r.style,{opacity:e.opacity,zIndex:e.zIndex}),t.append(r)}return t}var mf=e=>[...new Set([e.person,...e.steps.map(e=>e.person)].filter(e=>!!e))];function hf(e,t,n=[]){let r=e.steps.findLastIndex(e=>e.at<=t),i=e.steps[r];if(!i)return e.person;let a=i.person??e.person,o=e.steps[r-1]?.person??e.person,s=n.find(e=>e>=i.at);return a!==o&&s!==void 0&&t<s?o:a}var gf=e=>new Set(e.rounds.flatMap(e=>e.flows.flatMap(mf))).size>1;function _f(e){let t=mf(e);return t.length?`as ${t.join(`, then `)}`:``}function vf({step:e,before:t,className:n}){return(0,J.jsxs)(`button`,{className:`flex h-8 min-w-0 items-center rounded-lg bg-hover px-3 text-xs leading-4 text-fg shadow-[inset_0_0_0_1px_var(--line)] transition-colors duration-150 ease-calm ${n}`,"aria-keyshortcuts":e.final?Rl?`Meta+Enter`:`Control+Enter`:`Enter`,onMouseDown:e=>e.preventDefault(),onClick:e.take,children:[t,(0,J.jsx)(`span`,{className:`flex-none`,children:e.words}),e.what&&(0,J.jsx)(`span`,{className:`flex-none text-faint`,children:`·`}),e.what&&(0,J.jsx)(`b`,{className:`min-w-0 truncate font-medium`,children:e.what}),(0,J.jsx)(Vl,{className:`ml-auto`,children:e.final?Rl?`⌘↵`:`Ctrl ↵`:`↵`})]})}function yf({step:e,className:t}){return(0,J.jsxs)(`p`,{className:`flex h-8 min-w-0 animate-arrive items-center gap-1.5 text-xs font-medium whitespace-nowrap text-fg ${t}`,role:`status`,children:[(0,J.jsx)(`i`,{className:`mr-0.5 size-1.5 flex-none rounded-full bg-slate ${e.busy?`animate-breathe`:`opacity-45`}`,"aria-hidden":!0}),(0,J.jsx)(`span`,{className:`flex-none`,children:e.words}),e.what&&(0,J.jsx)(`span`,{className:`flex-none font-normal text-faint`,children:`·`}),e.what&&(0,J.jsx)(`span`,{className:`min-w-0 truncate font-normal text-soft`,children:e.what})]},e.words)}var bf=e=>{let t=`${e.count} ${e.count===1?`note`:`notes`}`;return{good:`Looks good`,"not saved":`Your note isn’t saved`,"needs you":`${e.count} waiting for your answer`,"to send":`${t} to send`,"with the agent":`With the agent`,"is it good":`Is it good?`,"looked good":`Looked good earlier, changed since`,"to watch":`Not watched yet`}[e.is]},xf=Object.defineProperty,Sf=(e,t,n)=>t in e?xf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Y=(e,t,n)=>Sf(e,typeof t==`symbol`?t:t+``,n),Cf=Object.defineProperty,wf=(e,t,n)=>t in e?Cf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tf=(e,t,n)=>wf(e,typeof t==`symbol`?t:t+``,n),X=(e=>(e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e))(X||{}),Ef={Node:[`childNodes`,`parentNode`,`parentElement`,`textContent`,`ownerDocument`,`firstChild`,`lastChild`,`nextSibling`,`previousSibling`],ShadowRoot:[`host`,`styleSheets`],Element:[`shadowRoot`,`querySelector`,`querySelectorAll`],MutationObserver:[]},Df={Node:[`contains`,`getRootNode`],ShadowRoot:[`getSelection`],Element:[],MutationObserver:[`constructor`]},Of={},kf={},Af=()=>!!globalThis.Zone;function jf(e){if(Of[e])return Of[e];let t=globalThis[e],n=t.prototype,r=e in Ef?Ef[e]:void 0,i=!!(r&&r.every(e=>!!(Object.getOwnPropertyDescriptor(n,e)?.get)?.toString().includes(`[native code]`))),a=e in Df?Df[e]:void 0,o=!!(a&&a.every(e=>typeof n[e]==`function`&&n[e]?.toString().includes(`[native code]`)));if(i&&o&&!Af())return Of[e]=t.prototype,t.prototype;try{let r=document.createElement(`iframe`);r.style.display=`none`,document.body.appendChild(r);let i=r.contentWindow;if(!i)return t.prototype;let a=i[e].prototype;if(!a)return r.remove(),n;let o=navigator.userAgent;return o.includes(`Safari`)&&!o.includes(`Chrome`)?(r.classList.add(`rr-block`),r.setAttribute(`__rrwebUntaintedMutationObserver`,``),kf[e]=()=>r.remove()):r.remove(),Of[e]=a}catch{return n}}var Mf={};function Nf(e,t,n){let r=Mf[e]?.[n];if(r)return r.call(t);let i=jf(e),a=Object.getOwnPropertyDescriptor(i,n)?.get;return a?((Mf[e]||(Mf[e]={}))[n]=a,a.call(t)):t[n]}var Pf={};function Ff(e,t,n){let r=`${e}.${String(n)}`;if(Pf[r])return Pf[r].bind(t);let i=jf(e)[n];return typeof i==`function`?(Pf[r]=i,i.bind(t)):t[n]}function If(e){return Nf(`Node`,e,`ownerDocument`)}function Lf(e){return Nf(`Node`,e,`childNodes`)}function Rf(e){return Nf(`Node`,e,`parentNode`)}function zf(e){return Nf(`Node`,e,`parentElement`)}function Bf(e){return Nf(`Node`,e,`textContent`)}function Vf(e){return Nf(`Node`,e,`firstChild`)}function Hf(e){return Nf(`Node`,e,`lastChild`)}function Uf(e){return Nf(`Node`,e,`nextSibling`)}function Wf(e){return Nf(`Node`,e,`previousSibling`)}function Gf(e,t){return Ff(`Node`,e,`contains`)(t)}function Kf(e){return Ff(`Node`,e,`getRootNode`)()}function qf(e){return!e||!(`host`in e)?null:Nf(`ShadowRoot`,e,`host`)}function Jf(e){return e.styleSheets}function Yf(e){return!e||!(`shadowRoot`in e)?null:Nf(`Element`,e,`shadowRoot`)}function Xf(e,t){return Nf(`Element`,e,`querySelector`)(t)}function Zf(e,t){return Nf(`Element`,e,`querySelectorAll`)(t)}function Qf(){return[jf(`MutationObserver`).constructor,kf.MutationObserver??(()=>{})]}var $f=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||($f=()=>new Date().getTime());function ep(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}var tp={ownerDocument:If,childNodes:Lf,parentNode:Rf,parentElement:zf,textContent:Bf,firstChild:Vf,lastChild:Hf,nextSibling:Uf,previousSibling:Wf,contains:Gf,getRootNode:Kf,host:qf,styleSheets:Jf,shadowRoot:Yf,querySelector:Xf,querySelectorAll:Zf,nowTimestamp:$f,mutationObserverCtor:Qf,patch:ep};function np(e){return e.nodeType===e.ELEMENT_NODE}function rp(e){let t=e&&`host`in e&&`mode`in e&&tp.host(e)||null;return!!(t&&`shadowRoot`in t&&tp.shadowRoot(t)===e)}function ip(e){return Object.prototype.toString.call(e)===`[object ShadowRoot]`}function ap(e){return e.includes(` background-clip: text;`)&&!e.includes(` -webkit-background-clip: text;`)&&(e=e.replace(/\sbackground-clip:\s*text;/g,` -webkit-background-clip: text; background-clip: text;`)),e}function op(e){let{cssText:t}=e;if(t.split(`"`).length<3)return t;let n=[`@import`,`url(${JSON.stringify(e.href)})`];return e.layerName===``?n.push(`layer`):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(` `)+`;`}function sp(e){try{let t=e.rules||e.cssRules;if(!t)return null;let n=e.href;return!n&&e.ownerNode&&(n=e.ownerNode.baseURI),ap(Array.from(t,e=>cp(e,n)).join(``))}catch{return null}}function cp(e,t){if(up(e)){let t;try{t=sp(e.styleSheet)||op(e)}catch{t=e.cssText}return e.styleSheet.href?Ep(t,e.styleSheet.href):t}{let n=e.cssText;return dp(e)&&e.selectorText.includes(`:`)&&(n=lp(n)),t?Ep(n,t):n}}function lp(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,`$1\\$2`)}function up(e){return`styleSheet`in e}function dp(e){return`selectorText`in e}var fp=class{constructor(){Tf(this,`idNodeMap`,new Map),Tf(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function pp(){return new fp}function mp({element:e,maskInputOptions:t,tagName:n,type:r,value:i,maskInputFn:a}){let o=i||``,s=r&&hp(r);return(t[n.toLowerCase()]||s&&t[s])&&(o=a?a(o,e):`*`.repeat(o.length)),o}function hp(e){return e.toLowerCase()}var gp=`__rrweb_original__`;function _p(e){let t=e.getContext(`2d`);if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){let i=t.getImageData,a=gp in i?i[gp]:i;if(new Uint32Array(a.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>e!==0))return!1}return!0}function vp(e,t){return!e||!t||e.type!==t.type?!1:e.type===X.Document?e.compatMode===t.compatMode:e.type===X.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===X.Comment||e.type===X.Text||e.type===X.CDATA?e.textContent===t.textContent:e.type===X.Element&&e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock}function yp(e){let t=e.type;return e.hasAttribute(`data-rr-is-password`)?`password`:t?hp(t):null}function bp(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}return n.pathname.match(/\.([0-9a-z]+)(?:$)/i)?.[1]??null}function xp(e){let t=``;return t=e.indexOf(`//`)>-1?e.split(`/`).slice(0,3).join(`/`):e.split(`/`)[0],t=t.split(`?`)[0],t}var Sp=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Cp=/^(?:[a-z+]+:)?\/\//i,wp=/^www\..*/i,Tp=/^(data:)([^,]*),(.*)/i;function Ep(e,t){return(e||``).replace(Sp,(e,n,r,i,a,o)=>{let s=r||a||o,c=n||i||``;if(!s)return e;if(Cp.test(s)||wp.test(s)||Tp.test(s))return`url(${c}${s}${c})`;if(s[0]===`/`)return`url(${c}${xp(t)+s}${c})`;let l=s.split(`#`)[0],u=s.substring(l.length),d=t.split(`#`)[0].split(`/`),f=l.split(`/`);d.pop();for(let e of f)if(e===`.`)continue;else e===`..`?d.pop():d.push(e);return`url(${c}${d.join(`/`)}${u}${c})`})}var Dp=`(?:/\\*[^*]*\\*/)|[\\s;]`,Op=RegExp(`${Dp}|\\b(0)px?`,`g`),kp=new RegExp(Dp,`g`);function Ap(e,t=!1){return t?e.replace(kp,``):e.replace(Op,`$1`)}function jp(e,t,n=!1){let r=Array.from(t.childNodes),i=[],a=0;if(r.length>1&&e&&typeof e==`string`){let t=Ap(e,n),o=t.length/e.length;for(let s=1;s<r.length;s++)if(r[s].textContent&&typeof r[s].textContent==`string`){let c=Ap(r[s].textContent,n),l=3;for(;l<c.length&&(c[l].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,l),1)!==-1);l++);for(;l<c.length;l++){let u=c.substring(0,l),d=t.split(u),f=-1;if(d.length===2)f=d[0].length;else if(d.length>2&&d[0]===``&&r[s-1].textContent!==``)f=t.indexOf(u,1);else if(d.length===1){if(u=u.substring(0,u.length-1),d=t.split(u),d.length<=1)return i.push(e),i;l=101}else l===c.length-1&&(f=t.indexOf(u));if(d.length>=2&&l>100){let e=r[s-1].textContent;if(e&&typeof e==`string`){let n=Ap(e).length;f=t.indexOf(u,n)}f===-1&&(f=d[0].length)}if(f!==-1){let s=Math.floor(f/o);for(;s>0&&s<e.length;){if(a+=1,a>50*r.length)return i.push(e),i;let c=Ap(e.substring(0,s),n);if(c.length===f){i.push(e.substring(0,s)),e=e.substring(s),t=t.substring(f);break}c.length<f?s+=Math.max(1,Math.floor((f-c.length)/o)):s-=Math.max(1,Math.floor((c.length-f)*o))}break}}}}return i.push(e),i}function Mp(e,t){return jp(e,t).join(`/* rr_split */`)}var Np=1,Pp=RegExp(`[^a-z0-9-_:]`),Fp=-2;function Ip(){return Np++}function Lp(e){if(e instanceof HTMLFormElement)return`form`;let t=hp(e.tagName);return Pp.test(t)?`div`:t}var Rp,zp,Bp=/^[^ \t\n\r\u000c]+/,Vp=/^[, \t\n\r\u000c]+/;function Hp(e,t){if(t.trim()===``)return t;let n=0;function r(e){let r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):``}let i=[];for(;r(Vp),!(n>=t.length);){let a=r(Bp);if(a.slice(-1)===`,`)a=Wp(e,a.substring(0,a.length-1)),i.push(a);else{let r=``;a=Wp(e,a);let o=!1;for(;;){let e=t.charAt(n);if(e===``){i.push((a+r).trim());break}if(o)e===`)`&&(o=!1);else{if(e===`,`){n+=1,i.push((a+r).trim());break}e===`(`&&(o=!0)}r+=e,n+=1}}}return i.join(`, `)}var Up=new WeakMap;function Wp(e,t){return!t||t.trim()===``?t:Kp(e,t)}function Gp(e){return!!(e.tagName===`svg`||e.ownerSVGElement)}function Kp(e,t){let n=Up.get(e);if(n||(n=e.createElement(`a`),Up.set(e,n)),!t)t=``;else if(t.startsWith(`blob:`)||t.startsWith(`data:`))return t;return n.setAttribute(`href`,t),n.href}function qp(e,t,n,r){return r&&(n===`src`||n===`href`&&(t!==`use`||r[0]!==`#`)||n===`xlink:href`&&r[0]!==`#`||n===`background`&&[`table`,`td`,`th`].includes(t)?Wp(e,r):n===`srcset`?Hp(e,r):n===`style`?Ep(r,Kp(e)):t===`object`&&n===`data`?Wp(e,r):r)}function Jp(e,t,n){return[`video`,`audio`].includes(e)&&hp(t)===`autoplay`}function Yp(e,t,n){try{if(typeof t==`string`){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function Xp(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?Xp(tp.parentNode(e),t,n):!1;for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return n?Xp(tp.parentNode(e),t,n):!1}function Zp(e,t,n,r){let i;if(np(e)){if(i=e,!tp.childNodes(i).length)return!1}else if(tp.parentElement(e)===null)return!1;else i=tp.parentElement(e);try{if(typeof t==`string`){if(r){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(Xp(i,t,r))return!0;if(n){if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}}catch{}return!1}function Qp(e,t,n){let r=e.contentWindow;if(!r)return;let i=!1,a;try{a=r.document.readyState}catch{return}if(a!==`complete`){let r=setTimeout(()=>{i||=(t(),!0)},n);e.addEventListener(`load`,()=>{clearTimeout(r),i=!0,t()});return}let o=`about:blank`;if(r.location.href!==o||e.src===o||e.src===``)return setTimeout(t,0),e.addEventListener(`load`,t);e.addEventListener(`load`,t)}function $p(e,t,n){let r=!1,i;try{i=e.sheet}catch{return}if(i)return;let a=setTimeout(()=>{r||=(t(),!0)},n);e.addEventListener(`load`,()=>{clearTimeout(a),r=!0,t()})}function em(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:o,inlineStylesheet:s,maskInputOptions:c={},maskTextFn:l,maskInputFn:u,dataURLOptions:d={},inlineImages:f,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:h=!1,cssCaptured:g=!1}=t,_=tm(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode===`CSS1Compat`?{type:X.Document,childNodes:[]}:{type:X.Document,childNodes:[],compatMode:e.compatMode};case e.DOCUMENT_TYPE_NODE:return{type:X.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:_};case e.ELEMENT_NODE:return rm(e,{doc:n,blockClass:i,blockSelector:a,inlineStylesheet:s,maskInputOptions:c,maskInputFn:u,dataURLOptions:d,inlineImages:f,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:h,rootId:_});case e.TEXT_NODE:return nm(e,{doc:n,needsMask:o,maskTextFn:l,rootId:_,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:X.CDATA,textContent:``,rootId:_};case e.COMMENT_NODE:return{type:X.Comment,textContent:tp.textContent(e)||``,rootId:_};default:return!1}}function tm(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function nm(e,t){let{needsMask:n,maskTextFn:r,rootId:i,cssCaptured:a}=t,o=tp.parentNode(e),s=o&&o.tagName,c=``,l=s===`STYLE`||void 0,u=s===`SCRIPT`||void 0;return u?c=`SCRIPT_PLACEHOLDER`:a||(c=tp.textContent(e),l&&c&&(c=Ep(c,Kp(t.doc)))),!l&&!u&&c&&n&&(c=r?r(c,tp.parentElement(e)):c.replace(/[\S]/g,`*`)),{type:X.Text,textContent:c||``,rootId:i}}function rm(e,t){let{doc:n,blockClass:r,blockSelector:i,inlineStylesheet:a,maskInputOptions:o={},maskInputFn:s,dataURLOptions:c={},inlineImages:l,recordCanvas:u,keepIframeSrcFn:d,newlyAddedElement:f=!1,rootId:p}=t,m=Yp(e,r,i),h=Lp(e),g={},_=e.attributes.length;for(let t=0;t<_;t++){let r=e.attributes[t];Jp(h,r.name,r.value)||(g[r.name]=qp(n,h,hp(r.name),r.value))}if(h===`link`&&a){let t=Array.from(n.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=sp(t)),r&&(delete g.rel,delete g.href,g._cssText=r)}if(h===`style`&&e.sheet){let t=sp(e.sheet);t&&(e.childNodes.length>1&&(t=Mp(t,e)),g._cssText=t)}if([`input`,`textarea`,`select`].includes(h)){let t=e.value,n=e.checked;g.type!==`radio`&&g.type!==`checkbox`&&g.type!==`submit`&&g.type!==`button`&&t?g.value=mp({element:e,type:yp(e),tagName:h,value:t,maskInputOptions:o,maskInputFn:s}):n&&(g.checked=n)}if(h===`option`&&(e.selected&&!o.select?g.selected=!0:delete g.selected),h===`dialog`&&e.open&&(g.rr_open_mode=e.matches(`dialog:modal`)?`modal`:`non-modal`),h===`canvas`&&u){if(e.__context===`2d`)_p(e)||(g.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!(`__context`in e)){let t=e.toDataURL(c.type,c.quality),r=n.createElement(`canvas`);r.width=e.width,r.height=e.height,t!==r.toDataURL(c.type,c.quality)&&(g.rr_dataURL=t)}}if(h===`img`&&l){Rp||(Rp=n.createElement(`canvas`),zp=Rp.getContext(`2d`));let t=e,r=t.currentSrc||t.getAttribute(`src`)||`<unknown-src>`,i=t.crossOrigin,a=()=>{t.removeEventListener(`load`,a);try{Rp.width=t.naturalWidth,Rp.height=t.naturalHeight,zp.drawImage(t,0,0),g.rr_dataURL=Rp.toDataURL(c.type,c.quality)}catch(e){if(t.crossOrigin!==`anonymous`){t.crossOrigin=`anonymous`,t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a);return}console.warn(`Cannot inline img src=${r}! Error: ${e}`)}t.crossOrigin===`anonymous`&&(i?g.crossOrigin=i:t.removeAttribute(`crossorigin`))};t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a)}if([`audio`,`video`].includes(h)){let t=g;t.rr_mediaState=e.paused?`paused`:`played`,t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}if(f||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),m){let{width:t,height:n}=e.getBoundingClientRect();g={class:g.class,rr_width:`${t}px`,rr_height:`${n}px`}}h===`iframe`&&!d(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let v;try{customElements.get(h)&&(v=!0)}catch{}return{type:X.Element,tagName:h,attributes:g,childNodes:[],isSVG:Gp(e)||void 0,needBlock:m,rootId:p,isCustom:v}}function im(e){return e==null?``:e.toLowerCase()}function am(e){return e===!0||e===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e===`all`,headMetaDescKeywords:e===`all`,headTitleMutations:e===`all`}:e||{}}function om(e,t){return!!(t.comment&&e.type===X.Comment||e.type===X.Element&&(t.script&&(e.tagName===`script`||e.tagName===`link`&&(e.attributes.rel===`preload`&&e.attributes.as===`script`||e.attributes.rel===`modulepreload`)||e.tagName===`link`&&e.attributes.rel===`prefetch`&&typeof e.attributes.href==`string`&&bp(e.attributes.href)===`js`)||t.headFavicon&&(e.tagName===`link`&&e.attributes.rel===`shortcut icon`||e.tagName===`meta`&&(im(e.attributes.name).match(/^msapplication-tile(image|color)$/)||im(e.attributes.name)===`application-name`||im(e.attributes.rel)===`icon`||im(e.attributes.rel)===`apple-touch-icon`||im(e.attributes.rel)===`shortcut icon`))||e.tagName===`meta`&&(t.headMetaDescKeywords&&im(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(im(e.attributes.property).match(/^(og|twitter|fb):/)||im(e.attributes.name).match(/^(og|twitter):/)||im(e.attributes.name)===`pinterest`)||t.headMetaRobots&&(im(e.attributes.name)===`robots`||im(e.attributes.name)===`googlebot`||im(e.attributes.name)===`bingbot`)||t.headMetaHttpEquiv&&e.attributes[`http-equiv`]!==void 0||t.headMetaAuthorship&&(im(e.attributes.name)===`author`||im(e.attributes.name)===`generator`||im(e.attributes.name)===`framework`||im(e.attributes.name)===`publisher`||im(e.attributes.name)===`progid`||im(e.attributes.property).match(/^article:/)||im(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(im(e.attributes.name)===`google-site-verification`||im(e.attributes.name)===`yandex-verification`||im(e.attributes.name)===`csrf-token`||im(e.attributes.name)===`p:domain_verify`||im(e.attributes.name)===`verify-v1`||im(e.attributes.name)===`verification`||im(e.attributes.name)===`shopify-checkout-api-token`))))}function sm(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,maskTextClass:o,maskTextSelector:s,skipChild:c=!1,inlineStylesheet:l=!0,maskInputOptions:u={},maskTextFn:d,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m={},inlineImages:h=!1,recordCanvas:g=!1,onSerialize:_,onIframeLoad:v,iframeLoadTimeout:y=5e3,onStylesheetLoad:b,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:C=!1,cssCaptured:w=!1}=t,{needsMask:T}=t,{preserveWhiteSpace:E=!0}=t;T||=Zp(e,o,s,T===void 0);let D=em(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:T,inlineStylesheet:l,maskInputOptions:u,maskTextFn:d,maskInputFn:f,dataURLOptions:m,inlineImages:h,recordCanvas:g,keepIframeSrcFn:S,newlyAddedElement:C,cssCaptured:w});if(!D)return console.warn(e,`not serialized`),null;let O;O=r.hasNode(e)?r.getId(e):om(D,p)||!E&&D.type===X.Text&&!D.textContent.replace(/^\s+|\s+$/gm,``).length?Fp:Ip();let k=Object.assign(D,{id:O});if(r.add(e,k),O===Fp)return null;_&&_(e);let A=!c;if(k.type===X.Element){A&&=!k.needBlock,delete k.needBlock;let t=tp.shadowRoot(e);t&&ip(t)&&(k.isShadowHost=!0)}if((k.type===X.Document||k.type===X.Element)&&A){p.headWhitespace&&k.type===X.Element&&k.tagName===`head`&&(E=!1);let t={doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:T,maskTextClass:o,maskTextSelector:s,skipChild:c,inlineStylesheet:l,maskInputOptions:u,maskTextFn:d,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:h,recordCanvas:g,preserveWhiteSpace:E,onSerialize:_,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:x,keepIframeSrcFn:S,cssCaptured:!1};if(k.type!==X.Element||k.tagName!==`textarea`||k.attributes.value===void 0){k.type===X.Element&&k.attributes._cssText!==void 0&&typeof k.attributes._cssText==`string`&&(t.cssCaptured=!0);for(let n of Array.from(tp.childNodes(e))){let e=sm(n,t);e&&k.childNodes.push(e)}}let C=null;if(np(e)&&(C=tp.shadowRoot(e)))for(let e of Array.from(tp.childNodes(C))){let n=sm(e,t);n&&(ip(C)&&(n.isShadow=!0),k.childNodes.push(n))}}let j=tp.parentNode(e);return j&&rp(j)&&ip(j)&&(k.isShadow=!0),k.type===X.Element&&k.tagName===`iframe`&&Qp(e,()=>{let t=e.contentDocument;if(t&&v){let n=sm(t,{doc:t,mirror:r,blockClass:i,blockSelector:a,needsMask:T,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:d,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:h,recordCanvas:g,preserveWhiteSpace:E,onSerialize:_,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:x,keepIframeSrcFn:S});n&&v(e,n)}},y),k.type===X.Element&&k.tagName===`link`&&typeof k.attributes.rel==`string`&&(k.attributes.rel===`stylesheet`||k.attributes.rel===`preload`&&typeof k.attributes.href==`string`&&bp(k.attributes.href)===`css`)&&$p(e,()=>{if(b){let t=sm(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:T,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:d,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:h,recordCanvas:g,preserveWhiteSpace:E,onSerialize:_,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:x,keepIframeSrcFn:S});t&&b(e,t)}},x),k}function cm(e,t){let{mirror:n=new fp,blockClass:r=`rr-block`,blockSelector:i=null,maskTextClass:a=`rr-mask`,maskTextSelector:o=null,inlineStylesheet:s=!0,inlineImages:c=!1,recordCanvas:l=!1,maskAllInputs:u=!1,maskTextFn:d,maskInputFn:f,slimDOM:p=!1,dataURLOptions:m,preserveWhiteSpace:h,onSerialize:g,onIframeLoad:_,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:x=()=>!1}=t;return sm(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,maskTextClass:a,maskTextSelector:o,skipChild:!1,inlineStylesheet:s,maskInputOptions:u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:u===!1?{password:!0}:u,maskTextFn:d,maskInputFn:f,slimDOMOptions:am(p),dataURLOptions:m,inlineImages:c,recordCanvas:l,preserveWhiteSpace:h,onSerialize:g,onIframeLoad:_,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:x,newlyAddedElement:!1})}var lm=RegExp(`(max|min)-device-(width|height)`,`g`),um={postcssPlugin:`postcss-custom-selectors`,prepare(){return{postcssPlugin:`postcss-custom-selectors`,AtRule:function(e){e.params.match(lm)&&(e.params=e.params.replace(lm,`$1-$2`))}}}},dm={postcssPlugin:`postcss-hover-classes`,prepare:function(){let e=[];return{Rule:function(t){e.indexOf(t)===-1&&(e.push(t),t.selectors.forEach(function(e){e.includes(`:hover`)&&(t.selector+=`,
|
|
64
|
+
`+e.replace(/:hover/g,`.\\:hover`))}))}}}};function fm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function pm(e){if(e.__esModule)return e;var t=e.default;if(typeof t==`function`){var n=function e(){return this instanceof e?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(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var mm={exports:{}},hm;function gm(){if(hm)return mm.exports;hm=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return mm.exports=t(),mm.exports.createColors=t,mm.exports}var _m=pm(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:`Module`}))),vm,ym;function bm(){if(ym)return vm;ym=1;let e=gm(),t=_m;class n extends Error{constructor(e,t,r,i,a,o){super(e),this.name=`CssSyntaxError`,this.reason=e,a&&(this.file=a),i&&(this.source=i),o&&(this.plugin=o),t!==void 0&&r!==void 0&&(typeof t==`number`?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,n)}setMessage(){this.message=this.plugin?this.plugin+`: `:``,this.message+=this.file?this.file:`<css input>`,this.line!==void 0&&(this.message+=`:`+this.line+`:`+this.column),this.message+=`: `+this.reason}showSourceCode(n){if(!this.source)return``;let r=this.source;n??=e.isColorSupported,t&&n&&(r=t(r));let i=r.split(/\r?\n/),a=Math.max(this.line-3,0),o=Math.min(this.line+2,i.length),s=String(o).length,c,l;if(n){let{bold:t,gray:n,red:r}=e.createColors(!0);c=e=>t(r(e)),l=e=>n(e)}else c=l=e=>e;return i.slice(a,o).map((e,t)=>{let n=a+1+t,r=` `+(` `+n).slice(-s)+` | `;if(n===this.line){let t=l(r.replace(/\d/g,` `))+e.slice(0,this.column-1).replace(/[^\t]/g,` `);return c(`>`)+l(r)+e+`
|
|
65
|
+
`+t+c(`^`)}return` `+l(r)+e}).join(`
|
|
66
|
+
`)}toString(){let e=this.showSourceCode();return e&&=`
|
|
67
|
+
|
|
68
|
+
`+e+`
|
|
69
|
+
`,this.name+`: `+this.message+e}}return vm=n,n.default=n,vm}var xm={},Sm;function Cm(){return Sm||(Sm=1,xm.isClean=Symbol(`isClean`),xm.my=Symbol(`my`)),xm}var wm,Tm;function Em(){if(Tm)return wm;Tm=1;let e={after:`
|
|
70
|
+
`,beforeClose:`
|
|
71
|
+
`,beforeComment:`
|
|
72
|
+
`,beforeDecl:`
|
|
73
|
+
`,beforeOpen:` `,beforeRule:`
|
|
74
|
+
`,colon:`: `,commentLeft:` `,commentRight:` `,emptyBody:``,indent:` `,semicolon:!1};function t(e){return e[0].toUpperCase()+e.slice(1)}class n{constructor(e){this.builder=e}atrule(e,t){let n=`@`+e.name,r=e.params?this.rawValue(e,`params`):``;if(e.raws.afterName===void 0?r&&(n+=` `):n+=e.raws.afterName,e.nodes)this.block(e,n+r);else{let i=(e.raws.between||``)+(t?`;`:``);this.builder(n+r+i,e)}}beforeAfter(e,t){let n;n=e.type===`decl`?this.raw(e,null,`beforeDecl`):e.type===`comment`?this.raw(e,null,`beforeComment`):t===`before`?this.raw(e,null,`beforeRule`):this.raw(e,null,`beforeClose`);let r=e.parent,i=0;for(;r&&r.type!==`root`;)i+=1,r=r.parent;if(n.includes(`
|
|
75
|
+
`)){let t=this.raw(e,null,`indent`);if(t.length)for(let e=0;e<i;e++)n+=t}return n}block(e,t){let n=this.raw(e,`between`,`beforeOpen`);this.builder(t+n+`{`,e,`start`);let r;e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,`after`)):r=this.raw(e,`after`,`emptyBody`),r&&this.builder(r),this.builder(`}`,e,`end`)}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type===`comment`;)--t;let n=this.raw(e,`semicolon`);for(let r=0;r<e.nodes.length;r++){let i=e.nodes[r],a=this.raw(i,`before`);a&&this.builder(a),this.stringify(i,t!==r||n)}}comment(e){let t=this.raw(e,`left`,`commentLeft`),n=this.raw(e,`right`,`commentRight`);this.builder(`/*`+t+e.text+n+`*/`,e)}decl(e,t){let n=this.raw(e,`between`,`colon`),r=e.prop+n+this.rawValue(e,`value`);e.important&&(r+=e.raws.important||` !important`),t&&(r+=`;`),this.builder(r,e)}document(e){this.body(e)}raw(n,r,i){let a;if(i||=r,r&&(a=n.raws[r],a!==void 0))return a;let o=n.parent;if(i===`before`&&(!o||o.type===`root`&&o.first===n||o&&o.type===`document`))return``;if(!o)return e[i];let s=n.root();if(s.rawCache||={},s.rawCache[i]!==void 0)return s.rawCache[i];if(i===`before`||i===`after`)return this.beforeAfter(n,i);{let e=`raw`+t(i);this[e]?a=this[e](s,n):s.walk(e=>{if(a=e.raws[r],a!==void 0)return!1})}return a===void 0&&(a=e[i]),s.rawCache[i]=a,a}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&e.raws.after!==void 0)return t=e.raws.after,t.includes(`
|
|
76
|
+
`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawBeforeComment(e,t){let n;return e.walkComments(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(`
|
|
77
|
+
`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeDecl`):n&&=n.replace(/\S/g,``),n}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(`
|
|
78
|
+
`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeRule`):n&&=n.replace(/\S/g,``),n}rawBeforeOpen(e){let t;return e.walk(e=>{if(e.type!==`decl`&&(t=e.raws.between,t!==void 0))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&n.raws.before!==void 0)return t=n.raws.before,t.includes(`
|
|
79
|
+
`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawColon(e){let t;return e.walkDecls(e=>{if(e.raws.between!==void 0)return t=e.raws.between.replace(/[^\s:]/g,``),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length===0&&(t=e.raws.after,t!==void 0))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&n.raws.before!==void 0){let e=n.raws.before.split(`
|
|
80
|
+
`);return t=e[e.length-1],t=t.replace(/\S/g,``),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&e.last.type===`decl`&&(t=e.raws.semicolon,t!==void 0))return!1}),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,`selector`)),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,`end`)}stringify(e,t){if(!this[e.type])throw Error(`Unknown AST node type `+e.type+`. Maybe you need to change PostCSS stringifier.`);this[e.type](e,t)}}return wm=n,n.default=n,wm}var Dm,Om;function km(){if(Om)return Dm;Om=1;let e=Em();function t(t,n){new e(n).stringify(t)}return Dm=t,t.default=t,Dm}var Am,jm;function Mm(){if(jm)return Am;jm=1;let{isClean:e,my:t}=Cm(),n=bm(),r=Em(),i=km();function a(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r===`proxyCache`)continue;let i=e[r],o=typeof i;r===`parent`&&o===`object`?t&&(n[r]=t):r===`source`?n[r]=i:Array.isArray(i)?n[r]=i.map(e=>a(e,n)):(o===`object`&&i!==null&&(i=a(i)),n[r]=i)}return n}class o{constructor(n={}){this.raws={},this[e]=!1,this[t]=!0;for(let e in n)if(e===`nodes`){this.nodes=[];for(let t of n[e])typeof t.clone==`function`?this.append(t.clone()):this.append(t)}else this[e]=n[e]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=a(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)}return new n(e)}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:t===`root`?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t===`prop`||t===`value`||t===`name`||t===`params`||t===`important`||t===`text`)&&e.markDirty()),!0}}}markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let r=t.indexOf(e.word);r!==-1&&(n=this.positionInside(r,t))}return n}positionInside(e,t){let n=t||this.toString(),r=this.source.start.column,i=this.source.start.line;for(let t=0;t<e;t++)n[t]===`
|
|
81
|
+
`?(r=1,i+=1):r+=1;return{column:r,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),i=r.indexOf(e.word);i!==-1&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex==`number`?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new r().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!==`document`;)e=e.parent;return e}toJSON(e,t){let n={},r=t==null;t||=new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||e===`parent`||e===`proxyCache`)continue;let r=this[e];if(Array.isArray(r))n[e]=r.map(e=>typeof e==`object`&&e.toJSON?e.toJSON(null,t):e);else if(typeof r==`object`&&r.toJSON)n[e]=r.toJSON(null,t);else if(e===`source`){let a=t.get(r.input);a??(a=i,t.set(r.input,i),i++),n[e]={end:r.end,inputId:a,start:r.start}}else n[e]=r}return r&&(n.inputs=[...t.keys()].map(e=>e.toJSON())),n}toProxy(){return this.proxyCache||=new Proxy(this,this.getProxyProcessor()),this.proxyCache}toString(e=i){e.stringify&&(e=e.stringify);let t=``;return e(this,e=>{t+=e}),t}warn(e,t,n){let r={node:this};for(let e in n)r[e]=n[e];return e.warn(t,r)}get proxyOf(){return this}}return Am=o,o.default=o,Am}var Nm,Pm;function Fm(){if(Pm)return Nm;Pm=1;let e=Mm();class t extends e{constructor(e){e&&e.value!==void 0&&typeof e.value!=`string`&&(e={...e,value:String(e.value)}),super(e),this.type=`decl`}get variable(){return this.prop.startsWith(`--`)||this.prop[0]===`$`}}return Nm=t,t.default=t,Nm}var Im,Lm;function Rm(){return Lm||(Lm=1,Im={nanoid:(e=21)=>{let t=``,n=e;for(;n--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[Math.random()*64|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r=``,i=n;for(;i--;)r+=e[Math.random()*e.length|0];return r}}),Im}var zm,Bm;function Vm(){if(Bm)return zm;Bm=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=_m,{existsSync:n,readFileSync:r}=_m,{dirname:i,join:a}=_m;function o(e){return Buffer?Buffer.from(e,`base64`).toString():window.atob(e)}class s{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,`data:`);let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||=new e(this.text),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return o(e.substr(RegExp.lastMatch.length));let r=e.match(/data:application\/json;([^,]+),/)[1];throw Error(`Unsupported source map encoding `+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,``).trim()}isMap(e){return typeof e==`object`?typeof e.mappings==`string`||typeof e._mappings==`string`||Array.isArray(e.sections):!1}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf(`*/`,n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=i(e),n(e))return this.mapFile=e,r(e,`utf-8`).toString().trim()}loadMap(n,r){if(r===!1)return!1;if(r){if(typeof r==`string`)return r;if(typeof r==`function`){let e=r(n);if(e){let t=this.loadFile(e);if(!t)throw Error(`Unable to load previous source map: `+e.toString());return t}}else if(r instanceof e)return t.fromSourceMap(r).toString();else if(r instanceof t)return r.toString();else if(this.isMap(r))return JSON.stringify(r);else throw Error(`Unsupported previous source map format: `+r.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let e=this.annotation;return n&&(e=a(i(n),e)),this.loadFile(e)}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return zm=s,s.default=s,zm}var Hm,Um;function Wm(){if(Um)return Hm;Um=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=_m,{fileURLToPath:n,pathToFileURL:r}=_m,{isAbsolute:i,resolve:a}=_m,{nanoid:o}=Rm(),s=_m,c=bm(),l=Vm(),u=Symbol(`fromOffsetCache`),d=!!(e&&t),f=!!(a&&i);class p{constructor(e,t={}){if(e==null||typeof e==`object`&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]===``||this.css[0]===``?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(this.file=!f||/^\w+:\/\//.test(t.from)||i(t.from)?t.from:a(t.from)),f&&d){let e=new l(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=`<input css `+o(6)+`>`),this.map&&(this.map.file=this.from)}error(e,t,n,i={}){let a,o,s;if(t&&typeof t==`object`){let e=t,r=n;if(typeof e.offset==`number`){let r=this.fromOffset(e.offset);t=r.line,n=r.col}else t=e.line,n=e.column;if(typeof r.offset==`number`){let e=this.fromOffset(r.offset);o=e.line,s=e.col}else o=r.line,s=r.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let l=this.origin(t,n,o,s);return a=l?new c(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):new c(e,o===void 0?t:{column:n,line:t},o===void 0?n:{column:s,line:o},this.css,this.file,i.plugin),a.input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(r&&(a.input.url=r(this.file).toString()),a.input.file=this.file),a}fromOffset(e){let t,n;if(this[u])n=this[u];else{let e=this.css.split(`
|
|
82
|
+
`);n=Array(e.length);let t=0;for(let r=0,i=e.length;r<i;r++)n[r]=t,t+=e[r].length+1;this[u]=n}t=n[n.length-1];let r=0;if(e>=t)r=n.length-1;else{let t=n.length-2,i;for(;r<t;)if(i=r+(t-r>>1),e<n[i])t=i-1;else if(e>=n[i+1])r=i+1;else{r=i;break}}return{col:e-n[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:a(this.map.consumer().sourceRoot||this.map.root||`.`,e)}origin(e,t,a,o){if(!this.map)return!1;let s=this.map.consumer(),c=s.originalPositionFor({column:t,line:e});if(!c.source)return!1;let l;typeof a==`number`&&(l=s.originalPositionFor({column:o,line:a}));let u;u=i(c.source)?r(c.source):new URL(c.source,this.map.consumer().sourceRoot||r(this.map.mapFile));let d={column:c.column,endColumn:l&&l.column,endLine:l&&l.line,line:c.line,url:u.toString()};if(u.protocol===`file:`){if(n)d.file=n(u);else throw Error(`file: protocol is not available in this PostCSS build`)}let f=s.sourceContentFor(c.source);return f&&(d.source=f),d}toJSON(){let e={};for(let t of[`hasBOM`,`css`,`file`,`id`])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return Hm=p,p.default=p,s&&s.registerInput&&s.registerInput(p),Hm}var Gm,Km;function qm(){if(Km)return Gm;Km=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=_m,{dirname:n,relative:r,resolve:i,sep:a}=_m,{pathToFileURL:o}=_m,s=Wm(),c=!!(e&&t),l=!!(n&&i&&r&&a);class u{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?`data:application/json;base64,`+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation==`string`?this.mapOpts.annotation:typeof this.mapOpts.annotation==`function`?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+`.map`;let t=`
|
|
83
|
+
`;this.css.includes(`\r
|
|
84
|
+
`)&&(t=`\r
|
|
85
|
+
`),this.css+=t+`/*# sourceMappingURL=`+e+` */`}applyPrevMaps(){for(let t of this.previous()){let r=this.toUrl(this.path(t.file)),i=t.root||n(t.file),a;this.mapOpts.sourcesContent===!1?(a=new e(t.text),a.sourcesContent&&(a.sourcesContent=null)):a=t.consumer(),this.map.applySourceMap(a,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type===`comment`&&e.text.indexOf(`# sourceMappingURL=`)===0&&this.root.removeChild(t)}else this.css&&=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,``)}}generate(){if(this.clearAnnotation(),l&&c&&this.isMap())return this.generateMap();{let e=``;return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css=``,this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,n=1,r=`<no source>`,i={generated:{column:0,line:0},original:{column:0,line:0},source:``},a,o;this.stringify(this.root,(t,s,c)=>{if(this.css+=t,s&&c!==`end`&&(i.generated.line=e,i.generated.column=n-1,s.source&&s.source.start?(i.source=this.sourcePath(s),i.original.line=s.source.start.line,i.original.column=s.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=t.match(/\n/g),a?(e+=a.length,o=t.lastIndexOf(`
|
|
86
|
+
`),n=t.length-o):n+=t.length,s&&c!==`start`){let t=s.parent||{raws:{}};(!(s.type===`decl`||s.type===`atrule`&&!s.nodes)||s!==t.last||t.raws.semicolon)&&(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=e,i.generated.column=n-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=n-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:this.mapOpts.annotation===void 0?!this.previous().length||this.previous().some(e=>e.annotation):this.mapOpts.annotation}isInline(){if(this.mapOpts.inline!==void 0)return this.mapOpts.inline;let e=this.mapOpts.annotation;return e!==void 0&&e!==!0?!1:!this.previous().length||this.previous().some(e=>e.inline)}isMap(){return this.opts.map===void 0?this.previous().length>0:!!this.opts.map}isSourcesContent(){return this.mapOpts.sourcesContent===void 0?!this.previous().length||this.previous().some(e=>e.withContent()):this.mapOpts.sourcesContent}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):`to.css`}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let a=this.opts.to?n(this.opts.to):`.`;typeof this.mapOpts.annotation==`string`&&(a=n(i(a,this.mapOpts.annotation)));let o=r(a,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps){if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new s(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`;this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString(`base64`):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(o){let t=o(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;a===`\\`&&(e=e.replace(/\\/g,`/`));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}return Gm=u,Gm}var Jm,Ym;function Xm(){if(Ym)return Jm;Ym=1;let e=Mm();class t extends e{constructor(e){super(e),this.type=`comment`}}return Jm=t,t.default=t,Jm}var Zm,Qm;function $m(){if(Qm)return Zm;Qm=1;let{isClean:e,my:t}=Cm(),n=Fm(),r=Xm(),i=Mm(),a,o,s,c;function l(e){return e.map(e=>(e.nodes&&=l(e.nodes),delete e.source,e))}function u(t){if(t[e]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)u(e)}class d extends i{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],r=e(this.proxyOf.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||=0,this.indexes||={},this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:e[t]?t===`each`||typeof t==`string`&&t.startsWith(`walk`)?(...n)=>e[t](...n.map(e=>typeof e==`function`?(t,n)=>e(t.toProxy(),n):e)):t===`every`||t===`some`?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):t===`root`?()=>e.root().toProxy():t===`nodes`?e.nodes.map(e=>e.toProxy()):t===`first`||t===`last`?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t===`name`||t===`params`||t===`selector`)&&e.markDirty()),!0}}}index(e){return typeof e==`number`?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of r)this.proxyOf.nodes.splice(n+1,0,e);let i;for(let e in this.indexes)i=this.indexes[e],n<i&&(this.indexes[e]=i+r.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),r=n===0&&`prepend`,i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);for(let e of i)this.proxyOf.nodes.splice(n,0,e);let a;for(let e in this.indexes)a=this.indexes[e],n<=a&&(this.indexes[e]=a+i.length);return this.markDirty(),this}normalize(i,c){if(typeof i==`string`)i=l(a(i).nodes);else if(i===void 0)i=[];else if(Array.isArray(i)){i=i.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type===`root`&&this.type!==`document`){i=i.nodes.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type)i=[i];else if(i.prop){if(i.value===void 0)throw Error(`Value field is missed in node creation`);typeof i.value!=`string`&&(i.value=String(i.value)),i=[new n(i)]}else if(i.selector)i=[new o(i)];else if(i.name)i=[new s(i)];else if(i.text)i=[new r(i)];else throw Error(`Unknown node type in node creation`);return i.map(n=>(n[t]||d.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[e]&&u(n),n.raws.before===void 0&&c&&c.raws.before!==void 0&&(n.raws.before=c.raws.before.replace(/\S/g,``)),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,`prepend`).reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`atrule`&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if(n.type===`atrule`&&n.name===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`atrule`)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if(t.type===`comment`)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`decl`&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if(n.type===`decl`&&n.prop===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`decl`)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`rule`&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if(n.type===`rule`&&n.selector===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`rule`)return t(e,n)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return d.registerParse=e=>{a=e},d.registerRule=e=>{o=e},d.registerAtRule=e=>{s=e},d.registerRoot=e=>{c=e},Zm=d,d.default=d,d.rebuild=e=>{e.type===`atrule`?Object.setPrototypeOf(e,s.prototype):e.type===`rule`?Object.setPrototypeOf(e,o.prototype):e.type===`decl`?Object.setPrototypeOf(e,n.prototype):e.type===`comment`?Object.setPrototypeOf(e,r.prototype):e.type===`root`&&Object.setPrototypeOf(e,c.prototype),e[t]=!0,e.nodes&&e.nodes.forEach(e=>{d.rebuild(e)})},Zm}var eh,th;function nh(){if(th)return eh;th=1;let e=$m(),t,n;class r extends e{constructor(e){super({type:`document`,...e}),this.nodes||=[]}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},eh=r,r.default=r,eh}var rh,ih;function ah(){if(ih)return rh;ih=1;let e={};return rh=function(t){e[t]||(e[t]=!0,typeof console<`u`&&console.warn&&console.warn(t))},rh}var oh,sh;function ch(){if(sh)return oh;sh=1;class e{constructor(e,t={}){if(this.type=`warning`,this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+`: `+this.text:this.text}}return oh=e,e.default=e,oh}var lh,uh;function dh(){if(uh)return lh;uh=1;let e=ch();class t{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new e(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type===`warning`)}get content(){return this.css}}return lh=t,t.default=t,lh}var fh,ph;function mh(){if(ph)return fh;ph=1;let e=/[\t\n\f\r "#'()/;[\\\]{}]/g,t=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,n=/.[\r\n"'(/\\]/,r=/[\da-f]/i;return fh=function(i,a={}){let o=i.css.valueOf(),s=a.ignoreErrors,c,l,u,d,f,p,m,h,g,_,v=o.length,y=0,b=[],x=[];function S(){return y}function C(e){throw i.error(`Unclosed `+e,y)}function w(){return x.length===0&&y>=v}function T(i){if(x.length)return x.pop();if(y>=v)return;let a=i?i.ignoreUnclosed:!1;switch(c=o.charCodeAt(y),c){case 10:case 32:case 9:case 13:case 12:l=y;do l+=1,c=o.charCodeAt(l);while(c===32||c===10||c===9||c===13||c===12);_=[`space`,o.slice(y,l)],y=l-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(c);_=[e,e,y];break}case 40:if(h=b.length?b.pop()[1]:``,g=o.charCodeAt(y+1),h===`url`&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){l=y;do{if(p=!1,l=o.indexOf(`)`,l+1),l===-1){if(s||a){l=y;break}C(`bracket`)}for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`brackets`,o.slice(y,l+1),y,l],y=l}else l=o.indexOf(`)`,y+1),d=o.slice(y,l+1),l===-1||n.test(d)?_=[`(`,`(`,y]:(_=[`brackets`,d,y,l],y=l);break;case 39:case 34:u=c===39?`'`:`"`,l=y;do{if(p=!1,l=o.indexOf(u,l+1),l===-1){if(s||a){l=y+1;break}C(`string`)}for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`string`,o.slice(y,l+1),y,l],y=l;break;case 64:e.lastIndex=y+1,e.test(o),l=e.lastIndex===0?o.length-1:e.lastIndex-2,_=[`at-word`,o.slice(y,l+1),y,l],y=l;break;case 92:for(l=y,f=!0;o.charCodeAt(l+1)===92;)l+=1,f=!f;if(c=o.charCodeAt(l+1),f&&c!==47&&c!==32&&c!==10&&c!==9&&c!==13&&c!==12&&(l+=1,r.test(o.charAt(l)))){for(;r.test(o.charAt(l+1));)l+=1;o.charCodeAt(l+1)===32&&(l+=1)}_=[`word`,o.slice(y,l+1),y,l],y=l;break;default:c===47&&o.charCodeAt(y+1)===42?(l=o.indexOf(`*/`,y+2)+1,l===0&&(s||a?l=o.length:C(`comment`)),_=[`comment`,o.slice(y,l+1),y,l],y=l):(t.lastIndex=y+1,t.test(o),l=t.lastIndex===0?o.length-1:t.lastIndex-2,_=[`word`,o.slice(y,l+1),y,l],b.push(_),y=l)}return y++,_}function E(e){x.push(e)}return{back:E,endOfFile:w,nextToken:T,position:S}},fh}var hh,gh;function _h(){if(gh)return hh;gh=1;let e=$m();class t extends e{constructor(e){super(e),this.type=`atrule`}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return hh=t,t.default=t,e.registerAtRule(t),hh}var vh,yh;function bh(){if(yh)return vh;yh=1;let e=$m(),t,n;class r extends e{constructor(e){super(e),this.type=`root`,this.nodes||=[]}normalize(e,t,n){let r=super.normalize(e);if(t){if(n===`prepend`)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before}return r}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},vh=r,r.default=r,e.registerRoot(r),vh}var xh,Sh;function Ch(){if(Sh)return xh;Sh=1;let e={comma(t){return e.split(t,[`,`],!0)},space(t){return e.split(t,[` `,`
|
|
87
|
+
`,` `])},split(e,t,n){let r=[],i=``,a=!1,o=0,s=!1,c=``,l=!1;for(let n of e)l?l=!1:n===`\\`?l=!0:s?n===c&&(s=!1):n===`"`||n===`'`?(s=!0,c=n):n===`(`?o+=1:n===`)`?o>0&&--o:o===0&&t.includes(n)&&(a=!0),a?(i!==``&&r.push(i.trim()),i=``,a=!1):i+=n;return(n||i!==``)&&r.push(i.trim()),r}};return xh=e,e.default=e,xh}var wh,Th;function Eh(){if(Th)return wh;Th=1;let e=$m(),t=Ch();class n extends e{constructor(e){super(e),this.type=`rule`,this.nodes||=[]}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:`,`+this.raw(`between`,`beforeOpen`);this.selector=e.join(n)}}return wh=n,n.default=n,e.registerRule(n),wh}var Dh,Oh;function kh(){if(Oh)return Dh;Oh=1;let e=Fm(),t=mh(),n=Xm(),r=_h(),i=bh(),a=Eh(),o={empty:!0,space:!0};function s(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}class c{constructor(e){this.input=e,this.root=new i,this.current=this.root,this.spaces=``,this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new r;t.name=e[1].slice(1),t.name===``&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,i,a,o=!1,s=!1,c=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n===`(`||n===`[`?l.push(n===`(`?`)`:`]`):n===`{`&&l.length>0?l.push(`}`):n===l[l.length-1]&&l.pop(),l.length===0){if(n===`;`){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}if(n===`{`){s=!0;break}if(n===`}`){if(c.length>0){for(a=c.length-1,i=c[a];i&&i[0]===`space`;)i=c[--a];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}c.push(e)}else c.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(t.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(t,`params`,c),o&&(e=c[c.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=``)):(t.raws.afterName=``,t.params=``),s&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,r;for(let i=t-1;i>=0&&(r=e[i],!(r[0]!==`space`&&(n+=1,n===2)));i--);throw this.input.error(`Missed semicolon`,r[0]===`word`?r[3]+1:r[2])}colon(e){let t=0,n,r,i;for(let[a,o]of e.entries()){if(n=o,r=n[0],r===`(`&&(t+=1),r===`)`&&--t,t===0&&r===`:`){if(!i)this.doubleColon(n);else if(i[0]===`word`&&i[1]===`progid`)continue;else return a}i=n}return!1}comment(e){let t=new n;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text=``,t.raws.left=r,t.raws.right=``;else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,n){let r=new e;this.init(r,t[0][2]);let i=t[t.length-1];for(i[0]===`;`&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(i[3]||i[2]||s(t)),r.source.end.offset++;t[0][0]!==`word`;)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop=``;t.length;){let e=t[0][0];if(e===`:`||e===`space`||e===`comment`)break;r.prop+=t.shift()[1]}r.raws.between=``;let a;for(;t.length;){if(a=t.shift(),a[0]===`:`){r.raws.between+=a[1];break}a[0]===`word`&&/\w/.test(a[1])&&this.unknownWord([a]),r.raws.between+=a[1]}(r.prop[0]===`_`||r.prop[0]===`*`)&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],c;for(;t.length&&(c=t[0][0],c===`space`||c===`comment`);)o.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(a=t[e],a[1].toLowerCase()===`!important`){r.important=!0;let n=this.stringFrom(t,e);n=this.spacesFromEnd(t)+n,n!==` !important`&&(r.raws.important=n);break}if(a[1].toLowerCase()===`important`){let n=t.slice(0),i=``;for(let t=e;t>0;t--){let e=n[t][0];if(i.trim().indexOf(`!`)===0&&e!==`space`)break;i=n.pop()[1]+i}i.trim().indexOf(`!`)===0&&(r.important=!0,r.raws.important=i,t=n)}if(a[0]!==`space`&&a[0]!==`comment`)break}t.some(e=>e[0]!==`space`&&e[0]!==`comment`)&&(r.raws.between+=o.map(e=>e[1]).join(``),o=[]),this.raw(r,`value`,o.concat(t),n),r.value.includes(`:`)&&!n&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error(`Double colon`,{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new a;this.init(t,e[2]),t.selector=``,t.raws.between=``,this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.spaces=``,this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type===`rule`&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces=``)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces=``,e.type!==`comment`&&(this.semicolon=!1)}other(e){let t=!1,n=null,r=!1,i=null,a=[],o=e[1].startsWith(`--`),s=[],c=e;for(;c;){if(n=c[0],s.push(c),n===`(`||n===`[`)i||=c,a.push(n===`(`?`)`:`]`);else if(o&&r&&n===`{`)i||=c,a.push(`}`);else if(a.length===0){if(n===`;`){if(r){this.decl(s,o);return}break}if(n===`{`){this.rule(s);return}if(n===`}`){this.tokenizer.back(s.pop()),t=!0;break}n===`:`&&(r=!0)}else n===a[a.length-1]&&(a.pop(),a.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(i),t&&r){if(!o)for(;s.length&&(c=s[s.length-1][0],c===`space`||c===`comment`);)this.tokenizer.back(s.pop());this.decl(s,o)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case`space`:this.spaces+=e[1];break;case`;`:this.freeSemicolon(e);break;case`}`:this.end(e);break;case`comment`:this.comment(e);break;case`at-word`:this.atrule(e);break;case`{`:this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let i,a,s=n.length,c=``,l=!0,u,d;for(let e=0;e<s;e+=1)i=n[e],a=i[0],a===`space`&&e===s-1&&!r?l=!1:a===`comment`?(d=n[e-1]?n[e-1][0]:`empty`,u=n[e+1]?n[e+1][0]:`empty`,!o[d]&&!o[u]?c.slice(-1)===`,`?l=!1:c+=i[1]:l=!1):c+=i[1];if(!l){let r=n.reduce((e,t)=>e+t[1],``);e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new a;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,`selector`,e),this.current=t}spacesAndCommentsFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],t===`space`||t===`comment`);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n=``;for(;e.length&&(t=e[0][0],t===`space`||t===`comment`);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],t===`space`);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n=``;for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error(`Unclosed block`,e.line,e.column)}unclosedBracket(e){throw this.input.error(`Unclosed bracket`,{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error(`Unexpected }`,{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error(`Unknown word`,{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error(`At-rule without name`,{offset:t[2]},{offset:t[2]+t[1].length})}}return Dh=c,Dh}var Ah,jh;function Mh(){if(jh)return Ah;jh=1;let e=$m(),t=kh(),n=Wm();function r(e,r){let i=new n(e,r),a=new t(i);try{a.parse()}catch(e){throw e}return a.root}return Ah=r,r.default=r,e.registerParse(r),Ah}var Nh,Ph;function Fh(){if(Ph)return Nh;Ph=1;let{isClean:e,my:t}=Cm(),n=qm(),r=km(),i=$m(),a=nh();ah();let o=dh(),s=Mh(),c=bh(),l={atrule:`AtRule`,comment:`Comment`,decl:`Declaration`,document:`Document`,root:`Root`,rule:`Rule`},u={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},d={Once:!0,postcssPlugin:!0,prepare:!0};function f(e){return typeof e==`object`&&typeof e.then==`function`}function p(e){let t=!1,n=l[e.type];return e.type===`decl`?t=e.prop.toLowerCase():e.type===`atrule`&&(t=e.name.toLowerCase()),t&&e.append?[n,n+`-`+t,0,n+`Exit`,n+`Exit-`+t]:t?[n,n+`-`+t,n+`Exit`,n+`Exit-`+t]:e.append?[n,0,n+`Exit`]:[n,n+`Exit`]}function m(e){let t;return t=e.type===`document`?[`Document`,0,`DocumentExit`]:e.type===`root`?[`Root`,0,`RootExit`]:p(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function h(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>h(e)),t}let g={};class _{constructor(e,n,r){this.stringified=!1,this.processed=!1;let a;if(typeof n==`object`&&n&&(n.type===`root`||n.type===`document`))a=h(n);else if(n instanceof _||n instanceof o)a=h(n.root),n.map&&(r.map===void 0&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let e=s;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{a=e(n,r)}catch(e){this.processed=!0,this.error=e}a&&!a[t]&&i.rebuild(a)}this.result=new o(e,a,r),this.helpers={...g,postcss:g,result:this.result},this.plugins=this.processor.plugins.map(e=>typeof e==`object`&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||=this.runAsync(),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error(`Use process(css).then(cb) to work with async plugins`)}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name===`CssSyntaxError`&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if(typeof t==`object`)for(let n in t){if(!u[n]&&/^[A-Z]/.test(n))throw Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[n]){if(typeof t[n]==`object`)for(let r in t[n])r===`*`?e(t,n,t[n][r]):e(t,n+`-`+r.toLowerCase(),t[n][r]);else typeof t[n]==`function`&&e(t,n,t[n])}}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(f(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let n=[m(t)];for(;n.length>0;){let e=this.visitTick(n);if(f(e))try{await e}catch(e){let t=n[n.length-1].node;throw this.handleError(e,t)}}}if(this.listeners.OnceExit)for(let[e,n]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if(t.type===`document`){let e=t.nodes.map(e=>n(e,this.helpers));await Promise.all(e)}else await n(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e==`object`&&e.Once){if(this.result.root.type===`document`){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if(typeof e==`function`)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=r;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new n(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(f(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit){if(t.type===`document`)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,r]of e){this.result.lastPlugin=n;let e;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if(t.type!==`root`&&t.type!==`document`&&!t.parent)return!0;if(f(e))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:i}=n;if(r.type!==`root`&&r.type!==`document`&&!r.parent){t.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[e,t]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=e;try{return t(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(n.iterator!==0){let i=n.iterator,a;for(;a=r.nodes[r.indexes[i]];)if(r.indexes[i]+=1,!a[e]){a[e]=!0,t.push(m(a));return}n.iterator=0,delete r.indexes[i]}let a=n.events;for(;n.eventIndex<a.length;){let t=a[n.eventIndex];if(n.eventIndex+=1,t===0){r.nodes&&r.nodes.length&&(r[e]=!0,n.iterator=r.getIterator());return}if(this.listeners[t]){n.visitors=this.listeners[t];return}}t.pop()}walkSync(t){t[e]=!0;let n=p(t);for(let r of n)if(r===0)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[r];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return`LazyResult`}}return _.registerPostcss=e=>{g=e},Nh=_,_.default=_,c.registerLazyResult(_),a.registerLazyResult(_),Nh}var Ih,Lh;function Rh(){if(Lh)return Ih;Lh=1;let e=qm(),t=km();ah();let n=Mh(),r=dh();class i{constructor(n,i,a){i=i.toString(),this.stringified=!1,this._processor=n,this._css=i,this._opts=a,this._map=void 0;let o,s=t;this.result=new r(this._processor,o,this._opts),this.result.css=i;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let l=new e(s,o,this._opts,i);if(l.isMap()){let[e,t]=l.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=n;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return`NoWorkResult`}}return Ih=i,i.default=i,Ih}var zh,Bh;function Vh(){if(Bh)return zh;Bh=1;let e=Rh(),t=Fh(),n=nh(),r=bh();class i{constructor(e=[]){this.version=`8.4.38`,this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n==`object`&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n==`object`&&n.postcssPlugin)t.push(n);else if(typeof n==`function`)t.push(n);else if(typeof n!=`object`||!n.parse&&!n.stringify)throw Error(n+` is not a PostCSS plugin`);return t}process(n,r={}){return!this.plugins.length&&!r.parser&&!r.stringifier&&!r.syntax?new e(this,n,r):new t(this,n,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return zh=i,i.default=i,r.registerProcessor(i),n.registerProcessor(i),zh}var Hh,Uh;function Wh(){if(Uh)return Hh;Uh=1;let e=Fm(),t=Vm(),n=Xm(),r=_h(),i=Wm(),a=bh(),o=Eh();function s(c,l){if(Array.isArray(c))return c.map(e=>s(e));let{inputs:u,...d}=c;if(u){l=[];for(let e of u){let n={...e,__proto__:i.prototype};n.map&&={...n.map,__proto__:t.prototype},l.push(n)}}if(d.nodes&&=c.nodes.map(e=>s(e,l)),d.source){let{inputId:e,...t}=d.source;d.source=t,e!=null&&(d.source.input=l[e])}if(d.type===`root`)return new a(d);if(d.type===`decl`)return new e(d);if(d.type===`rule`)return new o(d);if(d.type===`comment`)return new n(d);if(d.type===`atrule`)return new r(d);throw Error(`Unknown node type: `+c.type)}return Hh=s,s.default=s,Hh}var Gh,Kh;function qh(){if(Kh)return Gh;Kh=1;let e=bm(),t=Fm(),n=Fh(),r=$m(),i=Vh(),a=km(),o=Wh(),s=nh(),c=ch(),l=Xm(),u=_h(),d=dh(),f=Wm(),p=Mh(),m=Ch(),h=Eh(),g=bh(),_=Mm();function v(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new i(e)}return v.plugin=function(e,t){let n=!1;function r(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
88
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),{}.LANG&&{}.LANG.startsWith(`cn`)&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
89
|
+
https://www.w3ctech.com/topic/2226`));let a=t(...r);return a.postcssPlugin=e,a.postcssVersion=new i().version,a}let a;return Object.defineProperty(r,"postcss",{get(){return a||=r(),a}}),r.process=function(e,t,n){return v([r(n)]).process(e,t)},r},v.stringify=a,v.parse=p,v.fromJSON=o,v.list=m,v.comment=e=>new l(e),v.atRule=e=>new u(e),v.decl=e=>new t(e),v.rule=e=>new h(e),v.root=e=>new g(e),v.document=e=>new s(e),v.CssSyntaxError=e,v.Declaration=t,v.Container=r,v.Processor=i,v.Document=s,v.Comment=l,v.Warning=c,v.AtRule=u,v.Result=d,v.Input=f,v.Rule=h,v.Root=g,v.Node=_,n.registerPostcss(v),Gh=v,v.default=v,Gh}var Jh=fm(qh());Jh.stringify,Jh.fromJSON,Jh.plugin,Jh.parse,Jh.list,Jh.document,Jh.comment,Jh.atRule,Jh.rule,Jh.decl,Jh.root,Jh.CssSyntaxError,Jh.Declaration,Jh.Container,Jh.Processor,Jh.Document,Jh.Comment,Jh.Warning,Jh.AtRule,Jh.Result,Jh.Input,Jh.Rule,Jh.Root,Jh.Node;var Yh={script:`noscript`,altglyph:`altGlyph`,altglyphdef:`altGlyphDef`,altglyphitem:`altGlyphItem`,animatecolor:`animateColor`,animatemotion:`animateMotion`,animatetransform:`animateTransform`,clippath:`clipPath`,feblend:`feBlend`,fecolormatrix:`feColorMatrix`,fecomponenttransfer:`feComponentTransfer`,fecomposite:`feComposite`,feconvolvematrix:`feConvolveMatrix`,fediffuselighting:`feDiffuseLighting`,fedisplacementmap:`feDisplacementMap`,fedistantlight:`feDistantLight`,fedropshadow:`feDropShadow`,feflood:`feFlood`,fefunca:`feFuncA`,fefuncb:`feFuncB`,fefuncg:`feFuncG`,fefuncr:`feFuncR`,fegaussianblur:`feGaussianBlur`,feimage:`feImage`,femerge:`feMerge`,femergenode:`feMergeNode`,femorphology:`feMorphology`,feoffset:`feOffset`,fepointlight:`fePointLight`,fespecularlighting:`feSpecularLighting`,fespotlight:`feSpotLight`,fetile:`feTile`,feturbulence:`feTurbulence`,foreignobject:`foreignObject`,glyphref:`glyphRef`,lineargradient:`linearGradient`,radialgradient:`radialGradient`};function Xh(e){let t=Yh[e.tagName]?Yh[e.tagName]:e.tagName;return t===`link`&&e.attributes._cssText&&(t=`style`),t}function Zh(e,t){let n=t?.stylesWithHoverClass.get(e);if(n)return n;let r=e;try{r=Jh([um,dm]).process(e).css}catch(e){console.warn(`Failed to adapt css for replay`,e)}return t?.stylesWithHoverClass.set(e,r),r}function Qh(){return{stylesWithHoverClass:new Map}}var $h=`rrweb-snapshot.rebuild() cannot rebuild into an unprotected browser document. Use rebuildIntoSandboxedIframe() or set UNSAFE_allowUnprotectedRebuild: true only when you accept the script-execution risk.`,eg=`rrweb-snapshot.createSandboxedIframe() requires root to be connected to a document before creating a sandboxed iframe.`,tg=new WeakSet;function ng(e){if(!e||e.tagName!==`IFRAME`||!(`sandbox`in e))return!1;let t=Array.from(e.sandbox);return t.length===1&&t[0]===`allow-same-origin`}function rg(e){if(e.UNSAFE_allowUnprotectedRebuild)return;let t=e.doc.defaultView;if(t&&!(tg.has(e.doc)&&ng(t.frameElement)))throw Error($h)}function ig(e,t,n,r){let i=[];for(let t of e.childNodes)t.type===X.Text&&i.push(t);let a=t.split(`/* rr_split */`);for(;a.length>1&&a.length>i.length;)a.splice(-2,2,a.slice(-2).join(``));let o=``;n&&(o=Zh(a.join(``),r));let s=0,c=-1;for(let e=0;e<i.length&&e!==a.length;e++){let t=i[e],r=a[e],l=e<a.length-1?a[e+1]:null;if(n&&l){let e=s,t=l.length;t=Math.min(t,30);let n=!1;for(;t>2;t--){let r=l.substring(0,t),i=o.substring(s).indexOf(r);if(n=i!==-1,n){e+=i;break}}n||(e+=r.length),r=o.substring(s,e),s=e}else n&&(r=o.substring(s));c!==-1&&(r=r.substring(c)),l&&(c!==-1||r.endsWith(`0p`)&&l.startsWith(`x`))&&(c=l.indexOf(`}`),c!==-1&&(c+=1,r+=l.substring(0,c))),t.textContent=r}}function ag(e,t,n,r){let{doc:i,hackCss:a,cache:o}=r;e.childNodes.length?ig(e,n,a,o):(a&&(n=Zh(n,o)),t.appendChild(i.createTextNode(n)))}function og(e,t){let{doc:n,hackCss:r,cache:i}=t;switch(e.type){case X.Document:return n.implementation.createDocument(null,``,null);case X.DocumentType:return n.implementation.createDocumentType(e.name||`html`,e.publicId,e.systemId);case X.Element:{let r=Xh(e),i;e.isSVG?i=n.createElementNS(`http://www.w3.org/2000/svg`,r):(e.isCustom&&n.defaultView?.customElements&&!n.defaultView.customElements.get(e.tagName)&&n.defaultView.customElements.define(e.tagName,class extends n.defaultView.HTMLElement{}),i=n.createElement(r));let a={};for(let o in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,o))continue;let s=e.attributes[o];if((r!==`option`||o!==`selected`||s!==!1)&&s!==null){if(s===!0&&(s=``),o.startsWith(`rr_`))a[o]=s;else{if(typeof s==`string`){if(r===`style`&&o===`_cssText`){ag(e,i,s,t);continue}if(r===`textarea`&&o===`value`){i.appendChild(n.createTextNode(s)),e.childNodes=[];continue}}try{if(e.isSVG&&o===`xlink:href`)i.setAttributeNS(`http://www.w3.org/1999/xlink`,o,s.toString());else if(o===`onload`||o===`onclick`||o.substring(0,7)===`onmouse`)i.setAttribute(`_`+o,s.toString());else if(r===`meta`&&e.attributes[`http-equiv`]===`Content-Security-Policy`&&o===`content`){i.setAttribute(`csp-content`,s.toString());continue}else r===`link`&&(e.attributes.rel===`preload`&&e.attributes.as===`script`||e.attributes.rel===`modulepreload`)||r===`link`&&e.attributes.rel===`prefetch`&&typeof e.attributes.href==`string`&&bp(e.attributes.href)===`js`||(r===`img`&&e.attributes.srcset&&e.attributes.rr_dataURL?i.setAttribute(`rrweb-original-srcset`,e.attributes.srcset):i.setAttribute(o,s.toString()))}catch{}}}}for(let t in a){let o=a[t];if(r===`canvas`&&t===`rr_dataURL`){let e=n.createElement(`img`);e.onload=()=>{let t=i.getContext(`2d`);t&&t.drawImage(e,0,0,e.width,e.height)},e.src=o.toString(),i.RRNodeType&&(i.rr_dataURL=o.toString())}else if(r===`img`&&t===`rr_dataURL`){let t=i;t.currentSrc.startsWith(`data:`)||(t.setAttribute(`rrweb-original-src`,e.attributes.src),t.src=o.toString())}if(t===`rr_width`)i.style.setProperty(`width`,o.toString());else if(t===`rr_height`)i.style.setProperty(`height`,o.toString());else if(t===`rr_mediaCurrentTime`&&typeof o==`number`)i.currentTime=o;else if(t===`rr_mediaState`)switch(o){case`played`:i.play().catch(e=>console.warn(`media playback error`,e));break;case`paused`:i.pause()}else t===`rr_mediaPlaybackRate`&&typeof o==`number`?i.playbackRate=o:t===`rr_mediaMuted`&&typeof o==`boolean`?i.muted=o:t===`rr_mediaLoop`&&typeof o==`boolean`?i.loop=o:t===`rr_mediaVolume`&&typeof o==`number`?i.volume=o:t===`rr_open_mode`&&i.setAttribute(`rr_open_mode`,o)}if(e.isShadowHost){if(!i.shadowRoot)i.attachShadow({mode:`open`});else for(;i.shadowRoot.firstChild;)i.shadowRoot.removeChild(i.shadowRoot.firstChild)}return(r===`input`||r===`textarea`)&&i.setAttribute(`autocomplete`,`off`),i}case X.Text:return e.isStyle&&r?n.createTextNode(Zh(e.textContent,i)):n.createTextNode(e.textContent);case X.CDATA:return n.createCDATASection(e.textContent);case X.Comment:return n.createComment(e.textContent);default:return null}}function sg(e,t){let{doc:n,mirror:r,skipChild:i=!1,hackCss:a=!0,afterAppend:o,cache:s}=t;if(r.has(e.id)){let t=r.getNode(e.id);if(vp(r.getMeta(t),e))return r.getNode(e.id)}let c=og(e,{doc:n,hackCss:a,cache:s});if(!c)return null;if(e.rootId&&r.getNode(e.rootId)!==n&&r.replace(e.rootId,n),e.type===X.Document&&(n.close(),n.open(),e.compatMode===`BackCompat`&&e.childNodes&&e.childNodes[0].type!==X.DocumentType&&(e.childNodes[0].type===X.Element&&`xmlns`in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns===`http://www.w3.org/1999/xhtml`?n.write(`<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">`):n.write(`<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">`)),c=n),r.add(c,e),(e.type===X.Document||e.type===X.Element)&&!i)for(let t of e.childNodes){let i=sg(t,{doc:n,mirror:r,skipChild:!1,hackCss:a,afterAppend:o,cache:s});if(!i)console.warn(`Failed to rebuild`,t);else{if(t.isShadow&&np(c)&&c.shadowRoot)c.shadowRoot.appendChild(i);else if(e.type===X.Document&&t.type==X.Element){let e=i,t=null;e.childNodes.forEach(e=>{e.nodeName===`BODY`&&(t=e)}),t?(e.removeChild(t),c.appendChild(i),e.appendChild(t)):c.appendChild(i)}else c.appendChild(i);o&&o(i,t.id)}}return c}function cg(e,t){function n(e){t(e)}for(let t of e.getIds())e.has(t)&&n(e.getNode(t))}function lg(e,t){let n=t.getMeta(e);if(n?.type!==X.Element)return;let r=e;for(let e in n.attributes){if(!(Object.prototype.hasOwnProperty.call(n.attributes,e)&&e.startsWith(`rr_`)))continue;let t=n.attributes[e];e===`rr_scrollLeft`&&(r.scrollLeft=t),e===`rr_scrollTop`&&(r.scrollTop=t)}}function ug(e,t){rg(t);let{doc:n,onVisit:r,hackCss:i=!0,afterAppend:a,cache:o,mirror:s=new fp}=t,c=sg(e,{doc:n,mirror:s,skipChild:!1,hackCss:i,afterAppend:a,cache:o});return cg(s,e=>{r&&r(e),lg(e,s)}),c}function dg(e){var t;if(!e.root.isConnected)throw Error(eg);let n=e.root.ownerDocument.createElement(`iframe`);for(let[t,r]of Object.entries(e.iframeAttributes||{}))t!==`sandbox`&&n.setAttribute(t,r);n.setAttribute(`sandbox`,`allow-same-origin`),e.root.appendChild(n);let r=n.contentDocument;if(!r||!n.contentWindow)throw(t=n.parentNode)==null||t.removeChild(n),Error(eg);return tg.add(r),n}var fg=Object.defineProperty,pg=(e,t,n)=>t in e?fg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Z=(e,t,n)=>pg(e,typeof t==`symbol`?t:t+``,n),mg=Object.defineProperty,hg=(e,t,n)=>t in e?mg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gg=(e,t,n)=>hg(e,typeof t==`symbol`?t:t+``,n);Date.now().toString();var _g=class{constructor(){gg(this,`idNodeMap`,new Map),gg(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function vg(){return new _g}function yg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function bg(e){if(e.__esModule)return e;var t=e.default;if(typeof t==`function`){var n=function e(){return this instanceof e?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(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var xg={exports:{}},Sg;function Cg(){if(Sg)return xg.exports;Sg=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return xg.exports=t(),xg.exports.createColors=t,xg.exports}var wg=bg(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:`Module`}))),Tg,Eg;function Dg(){if(Eg)return Tg;Eg=1;let e=Cg(),t=wg;class n extends Error{constructor(e,t,r,i,a,o){super(e),this.name=`CssSyntaxError`,this.reason=e,a&&(this.file=a),i&&(this.source=i),o&&(this.plugin=o),t!==void 0&&r!==void 0&&(typeof t==`number`?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,n)}setMessage(){this.message=this.plugin?this.plugin+`: `:``,this.message+=this.file?this.file:`<css input>`,this.line!==void 0&&(this.message+=`:`+this.line+`:`+this.column),this.message+=`: `+this.reason}showSourceCode(n){if(!this.source)return``;let r=this.source;n??=e.isColorSupported,t&&n&&(r=t(r));let i=r.split(/\r?\n/),a=Math.max(this.line-3,0),o=Math.min(this.line+2,i.length),s=String(o).length,c,l;if(n){let{bold:t,gray:n,red:r}=e.createColors(!0);c=e=>t(r(e)),l=e=>n(e)}else c=l=e=>e;return i.slice(a,o).map((e,t)=>{let n=a+1+t,r=` `+(` `+n).slice(-s)+` | `;if(n===this.line){let t=l(r.replace(/\d/g,` `))+e.slice(0,this.column-1).replace(/[^\t]/g,` `);return c(`>`)+l(r)+e+`
|
|
90
|
+
`+t+c(`^`)}return` `+l(r)+e}).join(`
|
|
91
|
+
`)}toString(){let e=this.showSourceCode();return e&&=`
|
|
92
|
+
|
|
93
|
+
`+e+`
|
|
94
|
+
`,this.name+`: `+this.message+e}}return Tg=n,n.default=n,Tg}var Og={},kg;function Ag(){return kg||(kg=1,Og.isClean=Symbol(`isClean`),Og.my=Symbol(`my`)),Og}var jg,Mg;function Ng(){if(Mg)return jg;Mg=1;let e={after:`
|
|
95
|
+
`,beforeClose:`
|
|
96
|
+
`,beforeComment:`
|
|
97
|
+
`,beforeDecl:`
|
|
98
|
+
`,beforeOpen:` `,beforeRule:`
|
|
99
|
+
`,colon:`: `,commentLeft:` `,commentRight:` `,emptyBody:``,indent:` `,semicolon:!1};function t(e){return e[0].toUpperCase()+e.slice(1)}class n{constructor(e){this.builder=e}atrule(e,t){let n=`@`+e.name,r=e.params?this.rawValue(e,`params`):``;if(e.raws.afterName===void 0?r&&(n+=` `):n+=e.raws.afterName,e.nodes)this.block(e,n+r);else{let i=(e.raws.between||``)+(t?`;`:``);this.builder(n+r+i,e)}}beforeAfter(e,t){let n;n=e.type===`decl`?this.raw(e,null,`beforeDecl`):e.type===`comment`?this.raw(e,null,`beforeComment`):t===`before`?this.raw(e,null,`beforeRule`):this.raw(e,null,`beforeClose`);let r=e.parent,i=0;for(;r&&r.type!==`root`;)i+=1,r=r.parent;if(n.includes(`
|
|
100
|
+
`)){let t=this.raw(e,null,`indent`);if(t.length)for(let e=0;e<i;e++)n+=t}return n}block(e,t){let n=this.raw(e,`between`,`beforeOpen`);this.builder(t+n+`{`,e,`start`);let r;e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,`after`)):r=this.raw(e,`after`,`emptyBody`),r&&this.builder(r),this.builder(`}`,e,`end`)}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type===`comment`;)--t;let n=this.raw(e,`semicolon`);for(let r=0;r<e.nodes.length;r++){let i=e.nodes[r],a=this.raw(i,`before`);a&&this.builder(a),this.stringify(i,t!==r||n)}}comment(e){let t=this.raw(e,`left`,`commentLeft`),n=this.raw(e,`right`,`commentRight`);this.builder(`/*`+t+e.text+n+`*/`,e)}decl(e,t){let n=this.raw(e,`between`,`colon`),r=e.prop+n+this.rawValue(e,`value`);e.important&&(r+=e.raws.important||` !important`),t&&(r+=`;`),this.builder(r,e)}document(e){this.body(e)}raw(n,r,i){let a;if(i||=r,r&&(a=n.raws[r],a!==void 0))return a;let o=n.parent;if(i===`before`&&(!o||o.type===`root`&&o.first===n||o&&o.type===`document`))return``;if(!o)return e[i];let s=n.root();if(s.rawCache||={},s.rawCache[i]!==void 0)return s.rawCache[i];if(i===`before`||i===`after`)return this.beforeAfter(n,i);{let e=`raw`+t(i);this[e]?a=this[e](s,n):s.walk(e=>{if(a=e.raws[r],a!==void 0)return!1})}return a===void 0&&(a=e[i]),s.rawCache[i]=a,a}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&e.raws.after!==void 0)return t=e.raws.after,t.includes(`
|
|
101
|
+
`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawBeforeComment(e,t){let n;return e.walkComments(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(`
|
|
102
|
+
`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeDecl`):n&&=n.replace(/\S/g,``),n}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(`
|
|
103
|
+
`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeRule`):n&&=n.replace(/\S/g,``),n}rawBeforeOpen(e){let t;return e.walk(e=>{if(e.type!==`decl`&&(t=e.raws.between,t!==void 0))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&n.raws.before!==void 0)return t=n.raws.before,t.includes(`
|
|
104
|
+
`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawColon(e){let t;return e.walkDecls(e=>{if(e.raws.between!==void 0)return t=e.raws.between.replace(/[^\s:]/g,``),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length===0&&(t=e.raws.after,t!==void 0))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&n.raws.before!==void 0){let e=n.raws.before.split(`
|
|
105
|
+
`);return t=e[e.length-1],t=t.replace(/\S/g,``),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&e.last.type===`decl`&&(t=e.raws.semicolon,t!==void 0))return!1}),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,`selector`)),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,`end`)}stringify(e,t){if(!this[e.type])throw Error(`Unknown AST node type `+e.type+`. Maybe you need to change PostCSS stringifier.`);this[e.type](e,t)}}return jg=n,n.default=n,jg}var Pg,Fg;function Ig(){if(Fg)return Pg;Fg=1;let e=Ng();function t(t,n){new e(n).stringify(t)}return Pg=t,t.default=t,Pg}var Lg,Rg;function zg(){if(Rg)return Lg;Rg=1;let{isClean:e,my:t}=Ag(),n=Dg(),r=Ng(),i=Ig();function a(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r===`proxyCache`)continue;let i=e[r],o=typeof i;r===`parent`&&o===`object`?t&&(n[r]=t):r===`source`?n[r]=i:Array.isArray(i)?n[r]=i.map(e=>a(e,n)):(o===`object`&&i!==null&&(i=a(i)),n[r]=i)}return n}class o{constructor(n={}){this.raws={},this[e]=!1,this[t]=!0;for(let e in n)if(e===`nodes`){this.nodes=[];for(let t of n[e])typeof t.clone==`function`?this.append(t.clone()):this.append(t)}else this[e]=n[e]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=a(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)}return new n(e)}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:t===`root`?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t===`prop`||t===`value`||t===`name`||t===`params`||t===`important`||t===`text`)&&e.markDirty()),!0}}}markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let r=t.indexOf(e.word);r!==-1&&(n=this.positionInside(r,t))}return n}positionInside(e,t){let n=t||this.toString(),r=this.source.start.column,i=this.source.start.line;for(let t=0;t<e;t++)n[t]===`
|
|
106
|
+
`?(r=1,i+=1):r+=1;return{column:r,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),i=r.indexOf(e.word);i!==-1&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex==`number`?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new r().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!==`document`;)e=e.parent;return e}toJSON(e,t){let n={},r=t==null;t||=new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||e===`parent`||e===`proxyCache`)continue;let r=this[e];if(Array.isArray(r))n[e]=r.map(e=>typeof e==`object`&&e.toJSON?e.toJSON(null,t):e);else if(typeof r==`object`&&r.toJSON)n[e]=r.toJSON(null,t);else if(e===`source`){let a=t.get(r.input);a??(a=i,t.set(r.input,i),i++),n[e]={end:r.end,inputId:a,start:r.start}}else n[e]=r}return r&&(n.inputs=[...t.keys()].map(e=>e.toJSON())),n}toProxy(){return this.proxyCache||=new Proxy(this,this.getProxyProcessor()),this.proxyCache}toString(e=i){e.stringify&&(e=e.stringify);let t=``;return e(this,e=>{t+=e}),t}warn(e,t,n){let r={node:this};for(let e in n)r[e]=n[e];return e.warn(t,r)}get proxyOf(){return this}}return Lg=o,o.default=o,Lg}var Bg,Vg;function Hg(){if(Vg)return Bg;Vg=1;let e=zg();class t extends e{constructor(e){e&&e.value!==void 0&&typeof e.value!=`string`&&(e={...e,value:String(e.value)}),super(e),this.type=`decl`}get variable(){return this.prop.startsWith(`--`)||this.prop[0]===`$`}}return Bg=t,t.default=t,Bg}var Ug,Wg;function Gg(){return Wg||(Wg=1,Ug={nanoid:(e=21)=>{let t=``,n=e;for(;n--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[Math.random()*64|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r=``,i=n;for(;i--;)r+=e[Math.random()*e.length|0];return r}}),Ug}var Kg,qg;function Jg(){if(qg)return Kg;qg=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=wg,{existsSync:n,readFileSync:r}=wg,{dirname:i,join:a}=wg;function o(e){return Buffer?Buffer.from(e,`base64`).toString():window.atob(e)}class s{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,`data:`);let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||=new e(this.text),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return o(e.substr(RegExp.lastMatch.length));let r=e.match(/data:application\/json;([^,]+),/)[1];throw Error(`Unsupported source map encoding `+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,``).trim()}isMap(e){return typeof e==`object`?typeof e.mappings==`string`||typeof e._mappings==`string`||Array.isArray(e.sections):!1}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf(`*/`,n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=i(e),n(e))return this.mapFile=e,r(e,`utf-8`).toString().trim()}loadMap(n,r){if(r===!1)return!1;if(r){if(typeof r==`string`)return r;if(typeof r==`function`){let e=r(n);if(e){let t=this.loadFile(e);if(!t)throw Error(`Unable to load previous source map: `+e.toString());return t}}else if(r instanceof e)return t.fromSourceMap(r).toString();else if(r instanceof t)return r.toString();else if(this.isMap(r))return JSON.stringify(r);else throw Error(`Unsupported previous source map format: `+r.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let e=this.annotation;return n&&(e=a(i(n),e)),this.loadFile(e)}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Kg=s,s.default=s,Kg}var Yg,Xg;function Zg(){if(Xg)return Yg;Xg=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=wg,{fileURLToPath:n,pathToFileURL:r}=wg,{isAbsolute:i,resolve:a}=wg,{nanoid:o}=Gg(),s=wg,c=Dg(),l=Jg(),u=Symbol(`fromOffsetCache`),d=!!(e&&t),f=!!(a&&i);class p{constructor(e,t={}){if(e==null||typeof e==`object`&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]===``||this.css[0]===``?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(this.file=!f||/^\w+:\/\//.test(t.from)||i(t.from)?t.from:a(t.from)),f&&d){let e=new l(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=`<input css `+o(6)+`>`),this.map&&(this.map.file=this.from)}error(e,t,n,i={}){let a,o,s;if(t&&typeof t==`object`){let e=t,r=n;if(typeof e.offset==`number`){let r=this.fromOffset(e.offset);t=r.line,n=r.col}else t=e.line,n=e.column;if(typeof r.offset==`number`){let e=this.fromOffset(r.offset);o=e.line,s=e.col}else o=r.line,s=r.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let l=this.origin(t,n,o,s);return a=l?new c(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):new c(e,o===void 0?t:{column:n,line:t},o===void 0?n:{column:s,line:o},this.css,this.file,i.plugin),a.input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(r&&(a.input.url=r(this.file).toString()),a.input.file=this.file),a}fromOffset(e){let t,n;if(this[u])n=this[u];else{let e=this.css.split(`
|
|
107
|
+
`);n=Array(e.length);let t=0;for(let r=0,i=e.length;r<i;r++)n[r]=t,t+=e[r].length+1;this[u]=n}t=n[n.length-1];let r=0;if(e>=t)r=n.length-1;else{let t=n.length-2,i;for(;r<t;)if(i=r+(t-r>>1),e<n[i])t=i-1;else if(e>=n[i+1])r=i+1;else{r=i;break}}return{col:e-n[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:a(this.map.consumer().sourceRoot||this.map.root||`.`,e)}origin(e,t,a,o){if(!this.map)return!1;let s=this.map.consumer(),c=s.originalPositionFor({column:t,line:e});if(!c.source)return!1;let l;typeof a==`number`&&(l=s.originalPositionFor({column:o,line:a}));let u;u=i(c.source)?r(c.source):new URL(c.source,this.map.consumer().sourceRoot||r(this.map.mapFile));let d={column:c.column,endColumn:l&&l.column,endLine:l&&l.line,line:c.line,url:u.toString()};if(u.protocol===`file:`){if(n)d.file=n(u);else throw Error(`file: protocol is not available in this PostCSS build`)}let f=s.sourceContentFor(c.source);return f&&(d.source=f),d}toJSON(){let e={};for(let t of[`hasBOM`,`css`,`file`,`id`])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return Yg=p,p.default=p,s&&s.registerInput&&s.registerInput(p),Yg}var Qg,$g;function e_(){if($g)return Qg;$g=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=wg,{dirname:n,relative:r,resolve:i,sep:a}=wg,{pathToFileURL:o}=wg,s=Zg(),c=!!(e&&t),l=!!(n&&i&&r&&a);class u{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?`data:application/json;base64,`+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation==`string`?this.mapOpts.annotation:typeof this.mapOpts.annotation==`function`?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+`.map`;let t=`
|
|
108
|
+
`;this.css.includes(`\r
|
|
109
|
+
`)&&(t=`\r
|
|
110
|
+
`),this.css+=t+`/*# sourceMappingURL=`+e+` */`}applyPrevMaps(){for(let t of this.previous()){let r=this.toUrl(this.path(t.file)),i=t.root||n(t.file),a;this.mapOpts.sourcesContent===!1?(a=new e(t.text),a.sourcesContent&&(a.sourcesContent=null)):a=t.consumer(),this.map.applySourceMap(a,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type===`comment`&&e.text.indexOf(`# sourceMappingURL=`)===0&&this.root.removeChild(t)}else this.css&&=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,``)}}generate(){if(this.clearAnnotation(),l&&c&&this.isMap())return this.generateMap();{let e=``;return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css=``,this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,n=1,r=`<no source>`,i={generated:{column:0,line:0},original:{column:0,line:0},source:``},a,o;this.stringify(this.root,(t,s,c)=>{if(this.css+=t,s&&c!==`end`&&(i.generated.line=e,i.generated.column=n-1,s.source&&s.source.start?(i.source=this.sourcePath(s),i.original.line=s.source.start.line,i.original.column=s.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=t.match(/\n/g),a?(e+=a.length,o=t.lastIndexOf(`
|
|
111
|
+
`),n=t.length-o):n+=t.length,s&&c!==`start`){let t=s.parent||{raws:{}};(!(s.type===`decl`||s.type===`atrule`&&!s.nodes)||s!==t.last||t.raws.semicolon)&&(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=e,i.generated.column=n-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=n-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:this.mapOpts.annotation===void 0?!this.previous().length||this.previous().some(e=>e.annotation):this.mapOpts.annotation}isInline(){if(this.mapOpts.inline!==void 0)return this.mapOpts.inline;let e=this.mapOpts.annotation;return e!==void 0&&e!==!0?!1:!this.previous().length||this.previous().some(e=>e.inline)}isMap(){return this.opts.map===void 0?this.previous().length>0:!!this.opts.map}isSourcesContent(){return this.mapOpts.sourcesContent===void 0?!this.previous().length||this.previous().some(e=>e.withContent()):this.mapOpts.sourcesContent}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):`to.css`}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let a=this.opts.to?n(this.opts.to):`.`;typeof this.mapOpts.annotation==`string`&&(a=n(i(a,this.mapOpts.annotation)));let o=r(a,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps){if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new s(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`;this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString(`base64`):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(o){let t=o(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;a===`\\`&&(e=e.replace(/\\/g,`/`));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}return Qg=u,Qg}var t_,n_;function r_(){if(n_)return t_;n_=1;let e=zg();class t extends e{constructor(e){super(e),this.type=`comment`}}return t_=t,t.default=t,t_}var i_,a_;function o_(){if(a_)return i_;a_=1;let{isClean:e,my:t}=Ag(),n=Hg(),r=r_(),i=zg(),a,o,s,c;function l(e){return e.map(e=>(e.nodes&&=l(e.nodes),delete e.source,e))}function u(t){if(t[e]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)u(e)}class d extends i{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],r=e(this.proxyOf.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||=0,this.indexes||={},this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:e[t]?t===`each`||typeof t==`string`&&t.startsWith(`walk`)?(...n)=>e[t](...n.map(e=>typeof e==`function`?(t,n)=>e(t.toProxy(),n):e)):t===`every`||t===`some`?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):t===`root`?()=>e.root().toProxy():t===`nodes`?e.nodes.map(e=>e.toProxy()):t===`first`||t===`last`?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t===`name`||t===`params`||t===`selector`)&&e.markDirty()),!0}}}index(e){return typeof e==`number`?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of r)this.proxyOf.nodes.splice(n+1,0,e);let i;for(let e in this.indexes)i=this.indexes[e],n<i&&(this.indexes[e]=i+r.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),r=n===0&&`prepend`,i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);for(let e of i)this.proxyOf.nodes.splice(n,0,e);let a;for(let e in this.indexes)a=this.indexes[e],n<=a&&(this.indexes[e]=a+i.length);return this.markDirty(),this}normalize(i,c){if(typeof i==`string`)i=l(a(i).nodes);else if(i===void 0)i=[];else if(Array.isArray(i)){i=i.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type===`root`&&this.type!==`document`){i=i.nodes.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type)i=[i];else if(i.prop){if(i.value===void 0)throw Error(`Value field is missed in node creation`);typeof i.value!=`string`&&(i.value=String(i.value)),i=[new n(i)]}else if(i.selector)i=[new o(i)];else if(i.name)i=[new s(i)];else if(i.text)i=[new r(i)];else throw Error(`Unknown node type in node creation`);return i.map(n=>(n[t]||d.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[e]&&u(n),n.raws.before===void 0&&c&&c.raws.before!==void 0&&(n.raws.before=c.raws.before.replace(/\S/g,``)),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,`prepend`).reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`atrule`&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if(n.type===`atrule`&&n.name===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`atrule`)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if(t.type===`comment`)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`decl`&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if(n.type===`decl`&&n.prop===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`decl`)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`rule`&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if(n.type===`rule`&&n.selector===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`rule`)return t(e,n)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return d.registerParse=e=>{a=e},d.registerRule=e=>{o=e},d.registerAtRule=e=>{s=e},d.registerRoot=e=>{c=e},i_=d,d.default=d,d.rebuild=e=>{e.type===`atrule`?Object.setPrototypeOf(e,s.prototype):e.type===`rule`?Object.setPrototypeOf(e,o.prototype):e.type===`decl`?Object.setPrototypeOf(e,n.prototype):e.type===`comment`?Object.setPrototypeOf(e,r.prototype):e.type===`root`&&Object.setPrototypeOf(e,c.prototype),e[t]=!0,e.nodes&&e.nodes.forEach(e=>{d.rebuild(e)})},i_}var s_,c_;function l_(){if(c_)return s_;c_=1;let e=o_(),t,n;class r extends e{constructor(e){super({type:`document`,...e}),this.nodes||=[]}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},s_=r,r.default=r,s_}var u_,d_;function f_(){if(d_)return u_;d_=1;let e={};return u_=function(t){e[t]||(e[t]=!0,typeof console<`u`&&console.warn&&console.warn(t))},u_}var p_,m_;function h_(){if(m_)return p_;m_=1;class e{constructor(e,t={}){if(this.type=`warning`,this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+`: `+this.text:this.text}}return p_=e,e.default=e,p_}var g_,__;function v_(){if(__)return g_;__=1;let e=h_();class t{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new e(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type===`warning`)}get content(){return this.css}}return g_=t,t.default=t,g_}var y_,b_;function x_(){if(b_)return y_;b_=1;let e=/[\t\n\f\r "#'()/;[\\\]{}]/g,t=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,n=/.[\r\n"'(/\\]/,r=/[\da-f]/i;return y_=function(i,a={}){let o=i.css.valueOf(),s=a.ignoreErrors,c,l,u,d,f,p,m,h,g,_,v=o.length,y=0,b=[],x=[];function S(){return y}function C(e){throw i.error(`Unclosed `+e,y)}function w(){return x.length===0&&y>=v}function T(i){if(x.length)return x.pop();if(y>=v)return;let a=i?i.ignoreUnclosed:!1;switch(c=o.charCodeAt(y),c){case 10:case 32:case 9:case 13:case 12:l=y;do l+=1,c=o.charCodeAt(l);while(c===32||c===10||c===9||c===13||c===12);_=[`space`,o.slice(y,l)],y=l-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(c);_=[e,e,y];break}case 40:if(h=b.length?b.pop()[1]:``,g=o.charCodeAt(y+1),h===`url`&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){l=y;do{if(p=!1,l=o.indexOf(`)`,l+1),l===-1){if(s||a){l=y;break}C(`bracket`)}for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`brackets`,o.slice(y,l+1),y,l],y=l}else l=o.indexOf(`)`,y+1),d=o.slice(y,l+1),l===-1||n.test(d)?_=[`(`,`(`,y]:(_=[`brackets`,d,y,l],y=l);break;case 39:case 34:u=c===39?`'`:`"`,l=y;do{if(p=!1,l=o.indexOf(u,l+1),l===-1){if(s||a){l=y+1;break}C(`string`)}for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`string`,o.slice(y,l+1),y,l],y=l;break;case 64:e.lastIndex=y+1,e.test(o),l=e.lastIndex===0?o.length-1:e.lastIndex-2,_=[`at-word`,o.slice(y,l+1),y,l],y=l;break;case 92:for(l=y,f=!0;o.charCodeAt(l+1)===92;)l+=1,f=!f;if(c=o.charCodeAt(l+1),f&&c!==47&&c!==32&&c!==10&&c!==9&&c!==13&&c!==12&&(l+=1,r.test(o.charAt(l)))){for(;r.test(o.charAt(l+1));)l+=1;o.charCodeAt(l+1)===32&&(l+=1)}_=[`word`,o.slice(y,l+1),y,l],y=l;break;default:c===47&&o.charCodeAt(y+1)===42?(l=o.indexOf(`*/`,y+2)+1,l===0&&(s||a?l=o.length:C(`comment`)),_=[`comment`,o.slice(y,l+1),y,l],y=l):(t.lastIndex=y+1,t.test(o),l=t.lastIndex===0?o.length-1:t.lastIndex-2,_=[`word`,o.slice(y,l+1),y,l],b.push(_),y=l)}return y++,_}function E(e){x.push(e)}return{back:E,endOfFile:w,nextToken:T,position:S}},y_}var S_,C_;function w_(){if(C_)return S_;C_=1;let e=o_();class t extends e{constructor(e){super(e),this.type=`atrule`}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return S_=t,t.default=t,e.registerAtRule(t),S_}var T_,E_;function D_(){if(E_)return T_;E_=1;let e=o_(),t,n;class r extends e{constructor(e){super(e),this.type=`root`,this.nodes||=[]}normalize(e,t,n){let r=super.normalize(e);if(t){if(n===`prepend`)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before}return r}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},T_=r,r.default=r,e.registerRoot(r),T_}var O_,k_;function A_(){if(k_)return O_;k_=1;let e={comma(t){return e.split(t,[`,`],!0)},space(t){return e.split(t,[` `,`
|
|
112
|
+
`,` `])},split(e,t,n){let r=[],i=``,a=!1,o=0,s=!1,c=``,l=!1;for(let n of e)l?l=!1:n===`\\`?l=!0:s?n===c&&(s=!1):n===`"`||n===`'`?(s=!0,c=n):n===`(`?o+=1:n===`)`?o>0&&--o:o===0&&t.includes(n)&&(a=!0),a?(i!==``&&r.push(i.trim()),i=``,a=!1):i+=n;return(n||i!==``)&&r.push(i.trim()),r}};return O_=e,e.default=e,O_}var j_,M_;function N_(){if(M_)return j_;M_=1;let e=o_(),t=A_();class n extends e{constructor(e){super(e),this.type=`rule`,this.nodes||=[]}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:`,`+this.raw(`between`,`beforeOpen`);this.selector=e.join(n)}}return j_=n,n.default=n,e.registerRule(n),j_}var P_,F_;function I_(){if(F_)return P_;F_=1;let e=Hg(),t=x_(),n=r_(),r=w_(),i=D_(),a=N_(),o={empty:!0,space:!0};function s(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}class c{constructor(e){this.input=e,this.root=new i,this.current=this.root,this.spaces=``,this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new r;t.name=e[1].slice(1),t.name===``&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,i,a,o=!1,s=!1,c=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n===`(`||n===`[`?l.push(n===`(`?`)`:`]`):n===`{`&&l.length>0?l.push(`}`):n===l[l.length-1]&&l.pop(),l.length===0){if(n===`;`){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}if(n===`{`){s=!0;break}if(n===`}`){if(c.length>0){for(a=c.length-1,i=c[a];i&&i[0]===`space`;)i=c[--a];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}c.push(e)}else c.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(t.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(t,`params`,c),o&&(e=c[c.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=``)):(t.raws.afterName=``,t.params=``),s&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,r;for(let i=t-1;i>=0&&(r=e[i],!(r[0]!==`space`&&(n+=1,n===2)));i--);throw this.input.error(`Missed semicolon`,r[0]===`word`?r[3]+1:r[2])}colon(e){let t=0,n,r,i;for(let[a,o]of e.entries()){if(n=o,r=n[0],r===`(`&&(t+=1),r===`)`&&--t,t===0&&r===`:`){if(!i)this.doubleColon(n);else if(i[0]===`word`&&i[1]===`progid`)continue;else return a}i=n}return!1}comment(e){let t=new n;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text=``,t.raws.left=r,t.raws.right=``;else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,n){let r=new e;this.init(r,t[0][2]);let i=t[t.length-1];for(i[0]===`;`&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(i[3]||i[2]||s(t)),r.source.end.offset++;t[0][0]!==`word`;)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop=``;t.length;){let e=t[0][0];if(e===`:`||e===`space`||e===`comment`)break;r.prop+=t.shift()[1]}r.raws.between=``;let a;for(;t.length;){if(a=t.shift(),a[0]===`:`){r.raws.between+=a[1];break}a[0]===`word`&&/\w/.test(a[1])&&this.unknownWord([a]),r.raws.between+=a[1]}(r.prop[0]===`_`||r.prop[0]===`*`)&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],c;for(;t.length&&(c=t[0][0],c===`space`||c===`comment`);)o.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(a=t[e],a[1].toLowerCase()===`!important`){r.important=!0;let n=this.stringFrom(t,e);n=this.spacesFromEnd(t)+n,n!==` !important`&&(r.raws.important=n);break}if(a[1].toLowerCase()===`important`){let n=t.slice(0),i=``;for(let t=e;t>0;t--){let e=n[t][0];if(i.trim().indexOf(`!`)===0&&e!==`space`)break;i=n.pop()[1]+i}i.trim().indexOf(`!`)===0&&(r.important=!0,r.raws.important=i,t=n)}if(a[0]!==`space`&&a[0]!==`comment`)break}t.some(e=>e[0]!==`space`&&e[0]!==`comment`)&&(r.raws.between+=o.map(e=>e[1]).join(``),o=[]),this.raw(r,`value`,o.concat(t),n),r.value.includes(`:`)&&!n&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error(`Double colon`,{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new a;this.init(t,e[2]),t.selector=``,t.raws.between=``,this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.spaces=``,this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type===`rule`&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces=``)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces=``,e.type!==`comment`&&(this.semicolon=!1)}other(e){let t=!1,n=null,r=!1,i=null,a=[],o=e[1].startsWith(`--`),s=[],c=e;for(;c;){if(n=c[0],s.push(c),n===`(`||n===`[`)i||=c,a.push(n===`(`?`)`:`]`);else if(o&&r&&n===`{`)i||=c,a.push(`}`);else if(a.length===0){if(n===`;`){if(r){this.decl(s,o);return}break}if(n===`{`){this.rule(s);return}if(n===`}`){this.tokenizer.back(s.pop()),t=!0;break}n===`:`&&(r=!0)}else n===a[a.length-1]&&(a.pop(),a.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(i),t&&r){if(!o)for(;s.length&&(c=s[s.length-1][0],c===`space`||c===`comment`);)this.tokenizer.back(s.pop());this.decl(s,o)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case`space`:this.spaces+=e[1];break;case`;`:this.freeSemicolon(e);break;case`}`:this.end(e);break;case`comment`:this.comment(e);break;case`at-word`:this.atrule(e);break;case`{`:this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let i,a,s=n.length,c=``,l=!0,u,d;for(let e=0;e<s;e+=1)i=n[e],a=i[0],a===`space`&&e===s-1&&!r?l=!1:a===`comment`?(d=n[e-1]?n[e-1][0]:`empty`,u=n[e+1]?n[e+1][0]:`empty`,!o[d]&&!o[u]?c.slice(-1)===`,`?l=!1:c+=i[1]:l=!1):c+=i[1];if(!l){let r=n.reduce((e,t)=>e+t[1],``);e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new a;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,`selector`,e),this.current=t}spacesAndCommentsFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],t===`space`||t===`comment`);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n=``;for(;e.length&&(t=e[0][0],t===`space`||t===`comment`);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],t===`space`);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n=``;for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error(`Unclosed block`,e.line,e.column)}unclosedBracket(e){throw this.input.error(`Unclosed bracket`,{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error(`Unexpected }`,{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error(`Unknown word`,{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error(`At-rule without name`,{offset:t[2]},{offset:t[2]+t[1].length})}}return P_=c,P_}var L_,R_;function z_(){if(R_)return L_;R_=1;let e=o_(),t=I_(),n=Zg();function r(e,r){let i=new n(e,r),a=new t(i);try{a.parse()}catch(e){throw e}return a.root}return L_=r,r.default=r,e.registerParse(r),L_}var B_,V_;function H_(){if(V_)return B_;V_=1;let{isClean:e,my:t}=Ag(),n=e_(),r=Ig(),i=o_(),a=l_();f_();let o=v_(),s=z_(),c=D_(),l={atrule:`AtRule`,comment:`Comment`,decl:`Declaration`,document:`Document`,root:`Root`,rule:`Rule`},u={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},d={Once:!0,postcssPlugin:!0,prepare:!0};function f(e){return typeof e==`object`&&typeof e.then==`function`}function p(e){let t=!1,n=l[e.type];return e.type===`decl`?t=e.prop.toLowerCase():e.type===`atrule`&&(t=e.name.toLowerCase()),t&&e.append?[n,n+`-`+t,0,n+`Exit`,n+`Exit-`+t]:t?[n,n+`-`+t,n+`Exit`,n+`Exit-`+t]:e.append?[n,0,n+`Exit`]:[n,n+`Exit`]}function m(e){let t;return t=e.type===`document`?[`Document`,0,`DocumentExit`]:e.type===`root`?[`Root`,0,`RootExit`]:p(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function h(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>h(e)),t}let g={};class _{constructor(e,n,r){this.stringified=!1,this.processed=!1;let a;if(typeof n==`object`&&n&&(n.type===`root`||n.type===`document`))a=h(n);else if(n instanceof _||n instanceof o)a=h(n.root),n.map&&(r.map===void 0&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let e=s;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{a=e(n,r)}catch(e){this.processed=!0,this.error=e}a&&!a[t]&&i.rebuild(a)}this.result=new o(e,a,r),this.helpers={...g,postcss:g,result:this.result},this.plugins=this.processor.plugins.map(e=>typeof e==`object`&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||=this.runAsync(),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error(`Use process(css).then(cb) to work with async plugins`)}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name===`CssSyntaxError`&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if(typeof t==`object`)for(let n in t){if(!u[n]&&/^[A-Z]/.test(n))throw Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[n]){if(typeof t[n]==`object`)for(let r in t[n])r===`*`?e(t,n,t[n][r]):e(t,n+`-`+r.toLowerCase(),t[n][r]);else typeof t[n]==`function`&&e(t,n,t[n])}}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(f(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let n=[m(t)];for(;n.length>0;){let e=this.visitTick(n);if(f(e))try{await e}catch(e){let t=n[n.length-1].node;throw this.handleError(e,t)}}}if(this.listeners.OnceExit)for(let[e,n]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if(t.type===`document`){let e=t.nodes.map(e=>n(e,this.helpers));await Promise.all(e)}else await n(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e==`object`&&e.Once){if(this.result.root.type===`document`){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if(typeof e==`function`)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=r;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new n(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(f(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit){if(t.type===`document`)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,r]of e){this.result.lastPlugin=n;let e;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if(t.type!==`root`&&t.type!==`document`&&!t.parent)return!0;if(f(e))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:i}=n;if(r.type!==`root`&&r.type!==`document`&&!r.parent){t.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[e,t]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=e;try{return t(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(n.iterator!==0){let i=n.iterator,a;for(;a=r.nodes[r.indexes[i]];)if(r.indexes[i]+=1,!a[e]){a[e]=!0,t.push(m(a));return}n.iterator=0,delete r.indexes[i]}let a=n.events;for(;n.eventIndex<a.length;){let t=a[n.eventIndex];if(n.eventIndex+=1,t===0){r.nodes&&r.nodes.length&&(r[e]=!0,n.iterator=r.getIterator());return}if(this.listeners[t]){n.visitors=this.listeners[t];return}}t.pop()}walkSync(t){t[e]=!0;let n=p(t);for(let r of n)if(r===0)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[r];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return`LazyResult`}}return _.registerPostcss=e=>{g=e},B_=_,_.default=_,c.registerLazyResult(_),a.registerLazyResult(_),B_}var U_,W_;function G_(){if(W_)return U_;W_=1;let e=e_(),t=Ig();f_();let n=z_(),r=v_();class i{constructor(n,i,a){i=i.toString(),this.stringified=!1,this._processor=n,this._css=i,this._opts=a,this._map=void 0;let o,s=t;this.result=new r(this._processor,o,this._opts),this.result.css=i;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let l=new e(s,o,this._opts,i);if(l.isMap()){let[e,t]=l.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=n;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return`NoWorkResult`}}return U_=i,i.default=i,U_}var K_,q_;function J_(){if(q_)return K_;q_=1;let e=G_(),t=H_(),n=l_(),r=D_();class i{constructor(e=[]){this.version=`8.4.38`,this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n==`object`&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n==`object`&&n.postcssPlugin)t.push(n);else if(typeof n==`function`)t.push(n);else if(typeof n!=`object`||!n.parse&&!n.stringify)throw Error(n+` is not a PostCSS plugin`);return t}process(n,r={}){return!this.plugins.length&&!r.parser&&!r.stringifier&&!r.syntax?new e(this,n,r):new t(this,n,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return K_=i,i.default=i,r.registerProcessor(i),n.registerProcessor(i),K_}var Y_,X_;function Z_(){if(X_)return Y_;X_=1;let e=Hg(),t=Jg(),n=r_(),r=w_(),i=Zg(),a=D_(),o=N_();function s(c,l){if(Array.isArray(c))return c.map(e=>s(e));let{inputs:u,...d}=c;if(u){l=[];for(let e of u){let n={...e,__proto__:i.prototype};n.map&&={...n.map,__proto__:t.prototype},l.push(n)}}if(d.nodes&&=c.nodes.map(e=>s(e,l)),d.source){let{inputId:e,...t}=d.source;d.source=t,e!=null&&(d.source.input=l[e])}if(d.type===`root`)return new a(d);if(d.type===`decl`)return new e(d);if(d.type===`rule`)return new o(d);if(d.type===`comment`)return new n(d);if(d.type===`atrule`)return new r(d);throw Error(`Unknown node type: `+c.type)}return Y_=s,s.default=s,Y_}var Q_,$_;function ev(){if($_)return Q_;$_=1;let e=Dg(),t=Hg(),n=H_(),r=o_(),i=J_(),a=Ig(),o=Z_(),s=l_(),c=h_(),l=r_(),u=w_(),d=v_(),f=Zg(),p=z_(),m=A_(),h=N_(),g=D_(),_=zg();function v(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new i(e)}return v.plugin=function(e,t){let n=!1;function r(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
113
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),{}.LANG&&{}.LANG.startsWith(`cn`)&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
114
|
+
https://www.w3ctech.com/topic/2226`));let a=t(...r);return a.postcssPlugin=e,a.postcssVersion=new i().version,a}let a;return Object.defineProperty(r,"postcss",{get(){return a||=r(),a}}),r.process=function(e,t,n){return v([r(n)]).process(e,t)},r},v.stringify=a,v.parse=p,v.fromJSON=o,v.list=m,v.comment=e=>new l(e),v.atRule=e=>new u(e),v.decl=e=>new t(e),v.rule=e=>new h(e),v.root=e=>new g(e),v.document=e=>new s(e),v.CssSyntaxError=e,v.Declaration=t,v.Container=r,v.Processor=i,v.Document=s,v.Comment=l,v.Warning=c,v.AtRule=u,v.Result=d,v.Input=f,v.Rule=h,v.Root=g,v.Node=_,n.registerPostcss(v),Q_=v,v.default=v,Q_}var tv=yg(ev());tv.stringify,tv.fromJSON,tv.plugin,tv.parse,tv.list,tv.document,tv.comment,tv.atRule,tv.rule,tv.decl,tv.root,tv.CssSyntaxError,tv.Declaration,tv.Container,tv.Processor,tv.Document,tv.Comment,tv.Warning,tv.AtRule,tv.Result,tv.Input,tv.Rule,tv.Root,tv.Node;var nv=(e=>(e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e))(nv||{});function rv(e){let t={},n=/;(?![^(]*\))/g,r=/:(.+)/;return e.replace(/\/\*.*?\*\//g,``).split(n).forEach(function(e){if(e){let n=e.split(r);n.length>1&&(t[sv(n[0].trim())]=n[1].trim())}}),t}function iv(e){let t=[];for(let n in e){let r=e[n];if(typeof r!=`string`)continue;let i=lv(n);t.push(`${i}: ${r};`)}return t.join(` `)}var av=/-([a-z])/g,ov=/^--[a-zA-Z0-9-]+$/,sv=e=>ov.test(e)?e:e.replace(av,(e,t)=>t?t.toUpperCase():``),cv=/\B([A-Z])/g,lv=e=>e.replace(cv,`-$1`).toLowerCase(),uv=class e{constructor(...e){Z(this,`parentElement`,null),Z(this,`parentNode`,null),Z(this,`ownerDocument`),Z(this,`firstChild`,null),Z(this,`lastChild`,null),Z(this,`previousSibling`,null),Z(this,`nextSibling`,null),Z(this,`ELEMENT_NODE`,1),Z(this,`TEXT_NODE`,3),Z(this,`nodeType`),Z(this,`nodeName`),Z(this,`RRNodeType`)}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(t){if(!(t instanceof e)||t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(e){throw Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.`)}insertBefore(e,t){throw Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.`)}removeChild(e){throw Error(`RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.`)}toString(){return`RRNode`}},dv=class e extends uv{constructor(...e){super(e),Z(this,`nodeType`,9),Z(this,`nodeName`,`#document`),Z(this,`compatMode`,`CSS1Compat`),Z(this,`RRNodeType`,nv.Document),Z(this,`textContent`,null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===nv.Element&&e.tagName===`HTML`)||null}get body(){return this.documentElement?.childNodes.find(e=>e.RRNodeType===nv.Element&&e.tagName===`BODY`)||null}get head(){return this.documentElement?.childNodes.find(e=>e.RRNodeType===nv.Element&&e.tagName===`HEAD`)||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){let t=e.RRNodeType;if((t===nv.Element||t===nv.DocumentType)&&this.childNodes.some(e=>e.RRNodeType===t))throw Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===nv.Element?`RRElement`:`RRDoctype`} on RRDocument allowed.`);let n=bv(this,e);return n.parentElement=null,n}insertBefore(e,t){let n=e.RRNodeType;if((n===nv.Element||n===nv.DocumentType)&&this.childNodes.some(e=>e.RRNodeType===n))throw Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${n===nv.Element?`RRElement`:`RRDoctype`} on RRDocument allowed.`);let r=xv(this,e,t);return r.parentElement=null,r}removeChild(e){return Sv(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e===`<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">`?t=`-//W3C//DTD XHTML 1.0 Transitional//EN`:e===`<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">`&&(t=`-//W3C//DTD HTML 4.0 Transitional//EN`),t){let e=this.createDocumentType(`html`,t,``);this.open(),this.appendChild(e)}}createDocument(t,n,r){return new e}createDocumentType(e,t,n){let r=new fv(e,t,n);return r.ownerDocument=this,r}createElement(e){let t=new pv(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){let t=new gv(e);return t.ownerDocument=this,t}createComment(e){let t=new _v(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new vv(e);return t.ownerDocument=this,t}toString(){return`RRDocument`}},fv=class extends uv{constructor(e,t,n){super(),Z(this,`nodeType`,10),Z(this,`RRNodeType`,nv.DocumentType),Z(this,`name`),Z(this,`publicId`),Z(this,`systemId`),Z(this,`textContent`,null),this.name=e,this.publicId=t,this.systemId=n,this.nodeName=e}toString(){return`RRDocumentType`}},pv=class extends uv{constructor(e){super(),Z(this,`nodeType`,1),Z(this,`RRNodeType`,nv.Element),Z(this,`tagName`),Z(this,`attributes`,{}),Z(this,`shadowRoot`,null),Z(this,`scrollLeft`),Z(this,`scrollTop`),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e=``;return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new yv(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||``}get className(){return this.attributes.class||``}get style(){let e=this.attributes.style?rv(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(n,r,i)=>{if(t.test(n))return;let a=sv(n);r?e[a]=r:delete e[a],i===`important`&&(e[a]+=` !important`),this.attributes.style=iv(e)},e.removeProperty=n=>{if(t.test(n))return``;let r=sv(n),i=e[r]||``;return delete e[r],this.attributes.style=iv(e),i},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,n){this.setAttribute(t,n)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return bv(this,e)}insertBefore(e,t){return xv(this,e,t)}removeChild(e){return Sv(this,e)}attachShadow(e){let t=this.ownerDocument.createElement(`SHADOWROOT`);return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e=``;for(let t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}},mv=class extends pv{constructor(){super(...arguments),Z(this,`currentTime`),Z(this,`volume`),Z(this,`paused`),Z(this,`muted`),Z(this,`playbackRate`),Z(this,`loop`)}attachShadow(e){throw Error(`RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow`)}play(){this.paused=!1}pause(){this.paused=!0}},hv=class extends pv{constructor(){super(...arguments),Z(this,`tagName`,`DIALOG`),Z(this,`nodeName`,`DIALOG`)}get isModal(){return this.getAttribute(`rr_open_mode`)===`modal`}get open(){return this.getAttribute(`open`)!==null}close(){this.removeAttribute(`open`),this.removeAttribute(`rr_open_mode`)}show(){this.setAttribute(`open`,``),this.setAttribute(`rr_open_mode`,`non-modal`)}showModal(){this.setAttribute(`open`,``),this.setAttribute(`rr_open_mode`,`modal`)}},gv=class extends uv{constructor(e){super(),Z(this,`nodeType`,3),Z(this,`nodeName`,`#text`),Z(this,`RRNodeType`,nv.Text),Z(this,`data`),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}},_v=class extends uv{constructor(e){super(),Z(this,`nodeType`,8),Z(this,`nodeName`,`#comment`),Z(this,`RRNodeType`,nv.Comment),Z(this,`data`),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}},vv=class extends uv{constructor(e){super(),Z(this,`nodeName`,`#cdata-section`),Z(this,`nodeType`,4),Z(this,`RRNodeType`,nv.CDATA),Z(this,`data`),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}},yv=class{constructor(e,t){if(Z(this,`onChange`),Z(this,`classes`,[]),Z(this,`add`,(...e)=>{for(let t of e){let e=String(t);this.classes.indexOf(e)>=0||this.classes.push(e)}this.onChange&&this.onChange(this.classes.join(` `))}),Z(this,`remove`,(...e)=>{this.classes=this.classes.filter(t=>e.indexOf(t)===-1),this.onChange&&this.onChange(this.classes.join(` `))}),e){let t=e.trim().split(/\s+/);this.classes.push(...t)}this.onChange=t}};function bv(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function xv(e,t,n){if(!n)return bv(e,t);if(n.parentNode!==e)throw Error(`Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.`);return t===n||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=n.previousSibling,n.previousSibling=t,t.nextSibling=n,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function Sv(e,t){if(t.parentNode!==e)throw Error(`Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.`);return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var Cv=(e=>(e[e.PLACEHOLDER=0]=`PLACEHOLDER`,e[e.ELEMENT_NODE=1]=`ELEMENT_NODE`,e[e.ATTRIBUTE_NODE=2]=`ATTRIBUTE_NODE`,e[e.TEXT_NODE=3]=`TEXT_NODE`,e[e.CDATA_SECTION_NODE=4]=`CDATA_SECTION_NODE`,e[e.ENTITY_REFERENCE_NODE=5]=`ENTITY_REFERENCE_NODE`,e[e.ENTITY_NODE=6]=`ENTITY_NODE`,e[e.PROCESSING_INSTRUCTION_NODE=7]=`PROCESSING_INSTRUCTION_NODE`,e[e.COMMENT_NODE=8]=`COMMENT_NODE`,e[e.DOCUMENT_NODE=9]=`DOCUMENT_NODE`,e[e.DOCUMENT_TYPE_NODE=10]=`DOCUMENT_TYPE_NODE`,e[e.DOCUMENT_FRAGMENT_NODE=11]=`DOCUMENT_FRAGMENT_NODE`,e))(Cv||{}),wv={svg:`http://www.w3.org/2000/svg`,"xlink:href":`http://www.w3.org/1999/xlink`,xmlns:`http://www.w3.org/2000/xmlns/`},Tv={altglyph:`altGlyph`,altglyphdef:`altGlyphDef`,altglyphitem:`altGlyphItem`,animatecolor:`animateColor`,animatemotion:`animateMotion`,animatetransform:`animateTransform`,clippath:`clipPath`,feblend:`feBlend`,fecolormatrix:`feColorMatrix`,fecomponenttransfer:`feComponentTransfer`,fecomposite:`feComposite`,feconvolvematrix:`feConvolveMatrix`,fediffuselighting:`feDiffuseLighting`,fedisplacementmap:`feDisplacementMap`,fedistantlight:`feDistantLight`,fedropshadow:`feDropShadow`,feflood:`feFlood`,fefunca:`feFuncA`,fefuncb:`feFuncB`,fefuncg:`feFuncG`,fefuncr:`feFuncR`,fegaussianblur:`feGaussianBlur`,feimage:`feImage`,femerge:`feMerge`,femergenode:`feMergeNode`,femorphology:`feMorphology`,feoffset:`feOffset`,fepointlight:`fePointLight`,fespecularlighting:`feSpecularLighting`,fespotlight:`feSpotLight`,fetile:`feTile`,feturbulence:`feTurbulence`,foreignobject:`foreignObject`,glyphref:`glyphRef`,lineargradient:`linearGradient`,radialgradient:`radialGradient`},Ev=null;function Dv(e,t,n,r=t.mirror||t.ownerDocument.mirror){e=Ov(e,t,n,r),jv(e,t,n,r),kv(e,t,n)}function Ov(e,t,n,r){var i;if(n.afterAppend&&!Ev&&(Ev=new WeakSet,setTimeout(()=>{Ev=null},0)),!Nv(e,t)){let a=Mv(t,n.mirror,r);(i=e.parentNode)==null||i.replaceChild(a,e),e=a}switch(t.RRNodeType){case nv.Document:if(!Pv(e,t,n.mirror,r)){let i=r.getMeta(t);i&&(n.mirror.removeNodeFromMap(e),e.close(),e.open(),n.mirror.add(e,i),Ev?.add(e))}break;case nv.Element:{let i=e,a=t;switch(a.tagName){case`IFRAME`:{let i=e.contentDocument;if(!i)break;Dv(i,t.contentDocument,n,r);break}}a.shadowRoot&&(i.shadowRoot||i.attachShadow({mode:`open`}),jv(i.shadowRoot,a.shadowRoot,n,r)),Av(i,a,r);break}}return e}function kv(e,t,n){var r;switch(t.RRNodeType){case nv.Document:{let e=t.scrollData;e&&n.applyScroll(e,!0);break}case nv.Element:{let r=e,i=t;switch(i.scrollData&&n.applyScroll(i.scrollData,!0),i.inputData&&n.applyInput(i.inputData),i.tagName){case`AUDIO`:case`VIDEO`:{let t=e,n=i;n.paused!==void 0&&(n.paused?t.pause():t.play()),n.muted!==void 0&&(t.muted=n.muted),n.volume!==void 0&&(t.volume=n.volume),n.currentTime!==void 0&&(t.currentTime=n.currentTime),n.playbackRate!==void 0&&(t.playbackRate=n.playbackRate),n.loop!==void 0&&(t.loop=n.loop);break}case`CANVAS`:{let i=t;if(i.rr_dataURL!==null){let e=document.createElement(`img`);e.onload=()=>{let t=r.getContext(`2d`);t&&t.drawImage(e,0,0,e.width,e.height)},e.src=i.rr_dataURL}i.canvasMutations.forEach(t=>n.applyCanvas(t.event,t.mutation,e));break}case`STYLE`:{let e=r.sheet;e&&t.rules.forEach(t=>n.applyStyleSheetMutation(t,e));break}case`DIALOG`:{let e=r,t=i,n=e.open,a=e.matches(`dialog:modal`),o=t.open,s=t.isModal,c=a!==s,l=n!==o;if((c||n&&l)&&e.close(),o&&(l||c))try{s?e.showModal():e.show()}catch(e){console.warn(e)}break}}break}case nv.Text:case nv.Comment:case nv.CDATA:e.textContent!==t.data&&(e.textContent=t.data)}Ev?.has(e)&&(Ev.delete(e),(r=n.afterAppend)==null||r.call(n,e,n.mirror.getId(e)))}function Av(e,t,n){let r=e.attributes,i=t.attributes;for(let r in i){let a=i[r];if(n.getMeta(t)?.isSVG&&wv[r])e.setAttributeNS(wv[r],r,a);else if(t.tagName===`CANVAS`&&r===`rr_dataURL`){let t=document.createElement(`img`);t.src=a,t.onload=()=>{let n=e.getContext(`2d`);n&&n.drawImage(t,0,0,t.width,t.height)}}else if(t.tagName===`IFRAME`&&r===`srcdoc`)continue;else try{e.setAttribute(r,a)}catch(e){console.warn(e)}}for(let{name:t}of Array.from(r))t in i||e.removeAttribute(t);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function jv(e,t,n,r){let i=Array.from(e.childNodes),a=t.childNodes;if(i.length===0&&a.length===0)return;let o=0,s=i.length-1,c=0,l=a.length-1,u=i[o],d=i[s],f=a[c],p=a[l],m,h;for(;o<=s&&c<=l;)if(u===void 0)u=i[++o];else if(d===void 0)d=i[--s];else if(Pv(u,f,n.mirror,r))u=i[++o],f=a[++c];else if(Pv(d,p,n.mirror,r))d=i[--s],p=a[--l];else if(Pv(u,p,n.mirror,r)){try{e.insertBefore(u,d.nextSibling)}catch(e){console.warn(e)}u=i[++o],p=a[--l]}else if(Pv(d,f,n.mirror,r)){try{e.insertBefore(d,u)}catch(e){console.warn(e)}d=i[--s],f=a[++c]}else{if(!m){m={};for(let e=o;e<=s;e++){let t=i[e];t&&n.mirror.hasNode(t)&&(m[n.mirror.getId(t)]=e)}}h=m[r.getId(f)];let t=i[h];if(h!==void 0&&t&&Pv(t,f,n.mirror,r)){try{e.insertBefore(t,u)}catch(e){console.warn(e)}i[h]=void 0}else{let t=Mv(f,n.mirror,r);e.nodeName===`#document`&&u&&(t.nodeType===t.DOCUMENT_TYPE_NODE&&u.nodeType===u.DOCUMENT_TYPE_NODE||t.nodeType===t.ELEMENT_NODE&&u.nodeType===u.ELEMENT_NODE)&&(e.removeChild(u),n.mirror.removeNodeFromMap(u),u=i[++o]);try{e.insertBefore(t,u||null)}catch(e){console.warn(e)}}f=a[++c]}if(o>s){let t=a[l+1],i=null;for(t&&(i=n.mirror.getNode(r.getId(t)));c<=l;++c){let t=Mv(a[c],n.mirror,r);try{e.insertBefore(t,i)}catch(e){console.warn(e)}}}else if(c>l)for(;o<=s;o++){let t=i[o];if(t&&t.parentNode===e)try{e.removeChild(t),n.mirror.removeNodeFromMap(t)}catch(e){console.warn(e)}}let g=e.firstChild,_=t.firstChild;for(;g!==null&&_!==null;)Dv(g,_,n,r),g=g.nextSibling,_=_.nextSibling}function Mv(e,t,n){let r=n.getId(e),i=n.getMeta(e),a=null;if(r>-1&&(a=t.getNode(r)),a!==null&&Nv(a,e))return a;switch(e.RRNodeType){case nv.Document:a=new Document;break;case nv.DocumentType:a=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case nv.Element:{let t=e.tagName.toLowerCase();t=Tv[t]||t,a=i&&`isSVG`in i&&i?.isSVG?document.createElementNS(wv.svg,t):document.createElement(e.tagName);break}case nv.Text:a=document.createTextNode(e.data);break;case nv.Comment:a=document.createComment(e.data);break;case nv.CDATA:a=document.createCDATASection(e.data)}i&&t.add(a,{...i});try{Ev?.add(a)}catch{}return a}function Nv(e,t){return e.nodeType===t.nodeType?e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName:!1}function Pv(e,t,n,r){let i=n.getId(e),a=r.getId(t);return i===-1||i!==a?!1:Nv(e,t)}var Fv=class e extends dv{constructor(e){super(),Z(this,`UNSERIALIZED_STARTING_ID`,-2),Z(this,`_unserializedId`,this.UNSERIALIZED_STARTING_ID),Z(this,`mirror`,Yv()),Z(this,`scrollData`,null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(t,n,r){return new e}createDocumentType(e,t,n){let r=new Iv(e,t,n);return r.ownerDocument=this,r}createElement(e){let t=e.toUpperCase(),n;switch(t){case`AUDIO`:case`VIDEO`:n=new Rv(t);break;case`IFRAME`:n=new Hv(t,this.mirror);break;case`CANVAS`:n=new Bv(t);break;case`STYLE`:n=new Vv(t);break;case`DIALOG`:n=new zv(t);break;default:n=new Lv(t)}return n.ownerDocument=this,n}createComment(e){let t=new Wv(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new Gv(e);return t.ownerDocument=this,t}createTextNode(e){let t=new Uv(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}},Iv=fv,Lv=class extends pv{constructor(){super(...arguments),Z(this,`inputData`,null),Z(this,`scrollData`,null)}},Rv=class extends mv{},zv=class extends hv{},Bv=class extends Lv{constructor(){super(...arguments),Z(this,`rr_dataURL`,null),Z(this,`canvasMutations`,[])}getContext(){return null}},Vv=class extends Lv{constructor(){super(...arguments),Z(this,`rules`,[])}},Hv=class extends Lv{constructor(e,t){super(e),Z(this,`contentDocument`,new Fv),this.contentDocument.mirror=t}},Uv=gv,Wv=_v,Gv=vv;function Kv(e){return e instanceof HTMLFormElement?`FORM`:e.tagName.toUpperCase()}function qv(e,t,n,r){let i;switch(e.nodeType){case Cv.DOCUMENT_NODE:r&&r.nodeName===`IFRAME`?i=r.contentDocument:(i=t,i.compatMode=e.compatMode);break;case Cv.DOCUMENT_TYPE_NODE:{let n=e;i=t.createDocumentType(n.name,n.publicId,n.systemId);break}case Cv.ELEMENT_NODE:{let n=e,r=Kv(n);i=t.createElement(r);let a=i;for(let{name:e,value:t}of Array.from(n.attributes))a.attributes[e]=t;n.scrollLeft&&(a.scrollLeft=n.scrollLeft),n.scrollTop&&(a.scrollTop=n.scrollTop);break}case Cv.TEXT_NODE:i=t.createTextNode(e.textContent||``);break;case Cv.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case Cv.COMMENT_NODE:i=t.createComment(e.textContent||``);break;case Cv.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:`open`});break;default:return null}let a=n.getMeta(e);return t instanceof Fv&&(a||(a=Zv(i,t.unserializedId),n.add(e,a)),t.mirror.add(i,{...a})),i}function Jv(e,t=vg(),n=new Fv){function r(e,i){let a=qv(e,n,t,i);if(a!==null){if(i?.nodeName!==`IFRAME`&&e.nodeType!==Cv.DOCUMENT_FRAGMENT_NODE&&(i?.appendChild(a),a.parentNode=i,a.parentElement=i),e.nodeName===`IFRAME`){let t=e.contentDocument;t&&r(t,a)}else(e.nodeType===Cv.DOCUMENT_NODE||e.nodeType===Cv.ELEMENT_NODE||e.nodeType===Cv.DOCUMENT_FRAGMENT_NODE)&&(e.nodeType===Cv.ELEMENT_NODE&&e.shadowRoot&&r(e.shadowRoot,a),e.childNodes.forEach(e=>r(e,a)))}}return r(e,null),n}function Yv(){return new Xv}var Xv=class{constructor(){Z(this,`idNodeMap`,new Map),Z(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Zv(e,t){switch(e.RRNodeType){case nv.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case nv.DocumentType:{let n=e;return{id:t,type:e.RRNodeType,name:n.name,publicId:n.publicId,systemId:n.systemId}}case nv.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case nv.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||``};case nv.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||``};case nv.CDATA:return{id:t,type:e.RRNodeType,textContent:``}}}var Qv={Node:[`childNodes`,`parentNode`,`parentElement`,`textContent`,`ownerDocument`,`firstChild`,`lastChild`,`nextSibling`,`previousSibling`],ShadowRoot:[`host`,`styleSheets`],Element:[`shadowRoot`,`querySelector`,`querySelectorAll`],MutationObserver:[]},$v={Node:[`contains`,`getRootNode`],ShadowRoot:[`getSelection`],Element:[],MutationObserver:[`constructor`]},ey={},ty={},ny=()=>!!globalThis.Zone;function ry(e){if(ey[e])return ey[e];let t=globalThis[e],n=t.prototype,r=e in Qv?Qv[e]:void 0,i=!!(r&&r.every(e=>!!(Object.getOwnPropertyDescriptor(n,e)?.get)?.toString().includes(`[native code]`))),a=e in $v?$v[e]:void 0,o=!!(a&&a.every(e=>typeof n[e]==`function`&&n[e]?.toString().includes(`[native code]`)));if(i&&o&&!ny())return ey[e]=t.prototype,t.prototype;try{let r=document.createElement(`iframe`);r.style.display=`none`,document.body.appendChild(r);let i=r.contentWindow;if(!i)return t.prototype;let a=i[e].prototype;if(!a)return r.remove(),n;let o=navigator.userAgent;return o.includes(`Safari`)&&!o.includes(`Chrome`)?(r.classList.add(`rr-block`),r.setAttribute(`__rrwebUntaintedMutationObserver`,``),ty[e]=()=>r.remove()):r.remove(),ey[e]=a}catch{return n}}var iy={};function ay(e,t,n){let r=iy[e]?.[n];if(r)return r.call(t);let i=ry(e),a=Object.getOwnPropertyDescriptor(i,n)?.get;return a?((iy[e]||(iy[e]={}))[n]=a,a.call(t)):t[n]}var oy={};function sy(e,t,n){let r=`${e}.${String(n)}`;if(oy[r])return oy[r].bind(t);let i=ry(e)[n];return typeof i==`function`?(oy[r]=i,i.bind(t)):t[n]}function cy(e){return ay(`Node`,e,`ownerDocument`)}function ly(e){return ay(`Node`,e,`childNodes`)}function uy(e){return ay(`Node`,e,`parentNode`)}function dy(e){return ay(`Node`,e,`parentElement`)}function fy(e){return ay(`Node`,e,`textContent`)}function py(e){return ay(`Node`,e,`firstChild`)}function my(e){return ay(`Node`,e,`lastChild`)}function hy(e){return ay(`Node`,e,`nextSibling`)}function gy(e){return ay(`Node`,e,`previousSibling`)}function _y(e,t){return sy(`Node`,e,`contains`)(t)}function vy(e){return sy(`Node`,e,`getRootNode`)()}function yy(e){return!e||!(`host`in e)?null:ay(`ShadowRoot`,e,`host`)}function by(e){return e.styleSheets}function xy(e){return!e||!(`shadowRoot`in e)?null:ay(`Element`,e,`shadowRoot`)}function Sy(e,t){return ay(`Element`,e,`querySelector`)(t)}function Cy(e,t){return ay(`Element`,e,`querySelectorAll`)(t)}function wy(){return[ry(`MutationObserver`).constructor,ty.MutationObserver??(()=>{})]}var Ty=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ty=()=>new Date().getTime());function Ey(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}var Dy={ownerDocument:cy,childNodes:ly,parentNode:uy,parentElement:dy,textContent:fy,firstChild:py,lastChild:my,nextSibling:hy,previousSibling:gy,contains:_y,getRootNode:vy,host:yy,styleSheets:by,shadowRoot:xy,querySelector:Sy,querySelectorAll:Cy,nowTimestamp:Ty,mutationObserverCtor:wy,patch:Ey};function Oy(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var ky=`Please stop import mirror directly. Instead of that,\r
|
|
115
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
116
|
+
or you can use record.mirror to access the mirror instance during recording.`,Ay={map:{},getId(){return console.error(ky),-1},getNode(){return console.error(ky),null},removeNodeFromMap(){console.error(ky)},has(){return console.error(ky),!1},reset(){console.error(ky)}};typeof window<`u`&&window.Proxy&&window.Reflect&&(Ay=new Proxy(Ay,{get(e,t,n){return t===`map`&&console.error(ky),Reflect.get(e,t,n)}}));function jy(e,t,n={}){let r=null,i=0;return function(...a){let o=Date.now();!i&&n.leading===!1&&(i=o);let s=t-(o-i),c=this;s<=0||s>t?(r&&=(clearTimeout(r),null),i=o,e.apply(c,a)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(c,a)},s))}}function My(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){setTimeout(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>My(e,t,a||{},!0)}function Ny(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset===void 0?t.documentElement.scrollLeft||t?.body&&Dy.parentElement(t.body)?.scrollLeft||t?.body?.scrollLeft||0:e.pageXOffset,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset===void 0?t?.documentElement.scrollTop||t?.body&&Dy.parentElement(t.body)?.scrollTop||t?.body?.scrollTop||0:e.pageYOffset}}function Py(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Fy(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Iy(e){return e?e.nodeType===e.ELEMENT_NODE?e:Dy.parentElement(e):null}function Ly(e,t,n,r){if(!e)return!1;let i=Iy(e);if(!i)return!1;try{if(typeof t==`string`){if(i.classList.contains(t)||r&&i.closest(`.`+t)!==null)return!0}else if(Xp(i,t,r))return!0}catch{}return!!(n&&(i.matches(n)||r&&i.closest(n)!==null))}function Ry(e,t){return t.getId(e)!==-1}function zy(e,t,n){return e.tagName===`TITLE`&&n.headTitleMutations?!0:t.getId(e)===Fp}function By(e,t){if(rp(e))return!1;let n=t.getId(e);if(!t.has(n))return!0;let r=Dy.parentNode(e);return r&&r.nodeType===e.DOCUMENT_NODE?!1:!r||By(r,t)}function Vy(e){return!!e.changedTouches}function Hy(e=window){`NodeList`in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),`DOMTokenList`in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Uy(e){let t={},n=(e,n)=>{let r={value:e,parent:n,children:[]};return t[e.node.id]=r,r},r=[];for(let i of e){let{nextId:e,parentId:a}=i;if(e&&e in t){let a=t[e];if(a.parent){let e=a.parent.children.indexOf(a);a.parent.children.splice(e,0,n(i,a.parent))}else{let e=r.indexOf(a);r.splice(e,0,n(i,null))}}else if(a in t){let e=t[a];e.children.push(n(i,e))}else r.push(n(i,null))}return r}function Wy(e,t){t(e.value);for(let n=e.children.length-1;n>=0;n--)Wy(e.children[n],t)}function Gy(e,t){return!!(e.nodeName===`IFRAME`&&t.getMeta(e))}function Ky(e,t){return!!(e.nodeName===`LINK`&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute(`rel`)===`stylesheet`&&t.getMeta(e))}function qy(e,t){let n=e.ownerDocument?.defaultView?.frameElement;if(!n||n===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};let r=n.getBoundingClientRect(),i=qy(n,t),a=r.height/n.clientHeight;return{x:r.x*i.relativeScale+i.x,y:r.y*i.relativeScale+i.y,relativeScale:a,absoluteScale:i.absoluteScale*a}}function Jy(e){return e?e instanceof uv&&`shadowRoot`in e?!!e.shadowRoot:!!Dy.shadowRoot(e):!1}function Yy(e,t){let n=e?.[t[0]];return n?t.length===1?n:Yy(n.cssRules,t.slice(1)):null}function Xy(e){let t=[...e];return{positions:t,index:t.pop()}}function Zy(e){let t=new Set,n=[];for(let r=e.length;r--;){let i=e[r];t.has(i.id)||(n.push(i),t.add(i.id))}return n}var Qy=class{constructor(){Y(this,`id`,1),Y(this,`styleIDMap`,new WeakMap),Y(this,`idStyleMap`,new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=t===void 0?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function $y(e){let t=null;return`getRootNode`in e&&Dy.getRootNode(e)?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&Dy.host(Dy.getRootNode(e))&&(t=Dy.host(Dy.getRootNode(e))),t}function eb(e){let t=e,n;for(;n=$y(t);)t=n;return t}function tb(e){let t=Dy.ownerDocument(e);if(!t)return!1;let n=eb(e);return Dy.contains(t,n)}function nb(e){let t=Dy.ownerDocument(e);return t?Dy.contains(t,e)||tb(e):!1}var Q=(e=>(e[e.DomContentLoaded=0]=`DomContentLoaded`,e[e.Load=1]=`Load`,e[e.FullSnapshot=2]=`FullSnapshot`,e[e.IncrementalSnapshot=3]=`IncrementalSnapshot`,e[e.Meta=4]=`Meta`,e[e.Custom=5]=`Custom`,e[e.Plugin=6]=`Plugin`,e[e.Asset=7]=`Asset`,e))(Q||{}),$=(e=>(e[e.Mutation=0]=`Mutation`,e[e.MouseMove=1]=`MouseMove`,e[e.MouseInteraction=2]=`MouseInteraction`,e[e.Scroll=3]=`Scroll`,e[e.ViewportResize=4]=`ViewportResize`,e[e.Input=5]=`Input`,e[e.TouchMove=6]=`TouchMove`,e[e.MediaInteraction=7]=`MediaInteraction`,e[e.StyleSheetRule=8]=`StyleSheetRule`,e[e.CanvasMutation=9]=`CanvasMutation`,e[e.Font=10]=`Font`,e[e.Log=11]=`Log`,e[e.Drag=12]=`Drag`,e[e.StyleDeclaration=13]=`StyleDeclaration`,e[e.Selection=14]=`Selection`,e[e.AdoptedStyleSheet=15]=`AdoptedStyleSheet`,e[e.CustomElement=16]=`CustomElement`,e))($||{}),rb=(e=>(e[e.MouseUp=0]=`MouseUp`,e[e.MouseDown=1]=`MouseDown`,e[e.Click=2]=`Click`,e[e.ContextMenu=3]=`ContextMenu`,e[e.DblClick=4]=`DblClick`,e[e.Focus=5]=`Focus`,e[e.Blur=6]=`Blur`,e[e.TouchStart=7]=`TouchStart`,e[e.TouchMove_Departed=8]=`TouchMove_Departed`,e[e.TouchEnd=9]=`TouchEnd`,e[e.TouchCancel=10]=`TouchCancel`,e))(rb||{}),ib=(e=>(e[e.Mouse=0]=`Mouse`,e[e.Pen=1]=`Pen`,e[e.Touch=2]=`Touch`,e))(ib||{}),ab=(e=>(e[e[`2D`]=0]=`2D`,e[e.WebGL=1]=`WebGL`,e[e.WebGL2=2]=`WebGL2`,e))(ab||{}),ob=(e=>(e[e.Play=0]=`Play`,e[e.Pause=1]=`Pause`,e[e.Seeked=2]=`Seeked`,e[e.VolumeChange=3]=`VolumeChange`,e[e.RateChange=4]=`RateChange`,e))(ob||{}),sb=(e=>(e.Start=`start`,e.Pause=`pause`,e.Resume=`resume`,e.Resize=`resize`,e.Finish=`finish`,e.FullsnapshotRebuilded=`fullsnapshot-rebuilded`,e.LoadStylesheetStart=`load-stylesheet-start`,e.LoadStylesheetEnd=`load-stylesheet-end`,e.SkipStart=`skip-start`,e.SkipEnd=`skip-end`,e.MouseInteraction=`mouse-interaction`,e.EventCast=`event-cast`,e.CustomEvent=`custom-event`,e.Flush=`flush`,e.StateChange=`state-change`,e.PlayBack=`play-back`,e.Destroy=`destroy`,e))(sb||{}),cb=(e=>(e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e))(cb||{}),lb=(e,t)=>`${e}@${t}`,ub=class{constructor(){Y(this,`frozen`,!1),Y(this,`locked`,!1),Y(this,`texts`,[]),Y(this,`attributes`,[]),Y(this,`attributeMap`,new WeakMap),Y(this,`removes`,[]),Y(this,`mapRemoves`,[]),Y(this,`movedMap`,{}),Y(this,`addedSet`,new Set),Y(this,`movedSet`,new Set),Y(this,`droppedSet`,new Set),Y(this,`removesSubTreeCache`,new Set),Y(this,`mutationCb`),Y(this,`blockClass`),Y(this,`blockSelector`),Y(this,`maskTextClass`),Y(this,`maskTextSelector`),Y(this,`inlineStylesheet`),Y(this,`maskInputOptions`),Y(this,`maskTextFn`),Y(this,`maskInputFn`),Y(this,`keepIframeSrcFn`),Y(this,`recordCanvas`),Y(this,`inlineImages`),Y(this,`slimDOMOptions`),Y(this,`dataURLOptions`),Y(this,`doc`),Y(this,`mirror`),Y(this,`iframeManager`),Y(this,`stylesheetManager`),Y(this,`shadowDomManager`),Y(this,`canvasManager`),Y(this,`processedNodeManager`),Y(this,`unattachedDoc`),Y(this,`processMutations`,e=>{e.forEach(this.processMutation),this.emit()}),Y(this,`emit`,()=>{if(this.frozen||this.locked)return;let e=[],t=new Set;for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet){let t=Dy.parentNode(e);(!this.removesSubTreeCache.has(t)||this.movedSet.has(t))&&this.addedSet.add(e)}let n=null,r=null,i=-1,a=null,o=!1,s=new Set,c=this.addedSet.values(),l=c.next();for(;this.addedSet.size;){if(n!==null&&this.addedSet.has(Dy.previousSibling(n)))a=n,n=Dy.previousSibling(n);else{for(this.addedSet.has(l.value)||(l=c.next()),n=l.value;r=Dy.parentNode(n),this.addedSet.has(r);)n=r;if(s.has(r))r=null;else if(r){if(nb(r)?(o=pb(this.droppedSet,r)||this.removesSubTreeCache.has(r),o&&pb(this.movedSet,n)&&(o=!1)):o=!0,this.addedSet.has(Dy.lastChild(r)))n=Dy.lastChild(r),a=null;else for(;a=Dy.nextSibling(n),this.addedSet.has(a);)n=a;if(i=rp(r)?this.mirror.getId($y(n)):this.mirror.getId(r),i===-1&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let e=Dy.host(r);i=this.mirror.getId(e)}}}if(this.addedSet.delete(n),!r||i===-1){s.add(n);continue}if(o){this.droppedSet.add(n);continue}let u=!1;if(n.nodeType===Node.TEXT_NODE){let e=r.tagName;if(e===`TEXTAREA`)continue;e===`STYLE`&&t.has(i)&&(u=!0)}let d=a?this.mirror.getId(a):null;for(;d===Fp;)a&&=Dy.nextSibling(a),d=a&&this.mirror.getId(a);if(d===-1){console.warn(`Couldn't record new node. Couldn't find mirror id for nextSibling:`,a),n=null;continue}let f=sm(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Gy(e,this.mirror)&&this.iframeManager.addIframe(e),Ky(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Jy(n)&&this.shadowDomManager.addShadowRoot(Dy.shadowRoot(n),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:u});f&&(e.push({parentId:i,nextId:d,node:f}),t.add(f.id))}let u={texts:this.texts.map(e=>{let t=e.node,n=Dy.parentNode(t);return n&&n.tagName===`TEXTAREA`&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if(typeof t.style==`string`){let n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split(`var(`).length===t.style.split(`var(`).length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(u.texts.length||u.attributes.length||u.removes.length||u.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(u))}),Y(this,`genTextAreaValueMutation`,e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));let n=Array.from(Dy.childNodes(e),e=>Dy.textContent(e)||``).join(``);t.attributes.value=mp({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:yp(e),value:n,maskInputFn:this.maskInputFn})}),Y(this,`processMutation`,e=>{if(!zy(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case`characterData`:{let t=Dy.textContent(e.target);!Ly(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Zp(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Iy(e.target)):t.replace(/[\S]/g,`*`):t,node:e.target});break}case`attributes`:{let t=e.target,n=hp(t.tagName),r=e.attributeName,i=e.target.getAttribute(r);if(r===`value`){let e=yp(t);i=mp({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:i,maskInputFn:this.maskInputFn})}if(Ly(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let a=this.attributeMap.get(e.target);if(n===`iframe`&&r===`src`&&!this.keepIframeSrcFn(i)){if(!t.contentDocument)r=`rr_src`;else return}if(a||(a={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(e.target,a)),r===`type`&&n===`input`&&(e.oldValue||``).toLowerCase()===`password`&&t.setAttribute(`data-rr-is-password`,`true`),!Jp(n,r)){if(a.attributes[r]=qp(this.doc,n,hp(r),i),r===`style`){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let n=this.unattachedDoc.createElement(`span`);e.oldValue&&n.setAttribute(`style`,e.oldValue);for(let e of Array.from(t.style)){let r=t.style.getPropertyValue(e),i=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||i!==n.style.getPropertyPriority(e)?i===``?a.styleDiff[e]=r:a.styleDiff[e]=[r,i]:a._unchangedStyles[e]=[r,i]}for(let e of Array.from(n.style))t.style.getPropertyValue(e)===``&&(a.styleDiff[e]=!1)}else r===`open`&&t.tagName===`DIALOG`&&(t.matches(`dialog:modal`)?a.attributes.rr_open_mode=`modal`:a.attributes.rr_open_mode=`non-modal`)}break}case`childList`:if(Ly(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName===`TEXTAREA`){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let n=this.mirror.getId(t),r=rp(e.target)?this.mirror.getId(Dy.host(e.target)):this.mirror.getId(e.target);Ly(e.target,this.blockClass,this.blockSelector,!1)||zy(t,this.mirror,this.slimDOMOptions)||!Ry(t,this.mirror)||(this.addedSet.has(t)?(db(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||By(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[lb(n,r)]?db(this.movedSet,t):(this.removes.push({parentId:r,id:n,isShadow:rp(e.target)&&ip(e.target)?!0:void 0}),fb(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),Y(this,`genAdds`,(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(zy(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[lb(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Ly(e,this.blockClass,this.blockSelector,!1)||(Dy.childNodes(e).forEach(e=>this.genAdds(e)),Jy(e)&&Dy.childNodes(Dy.shadowRoot(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){[`mutationCb`,`blockClass`,`blockSelector`,`maskTextClass`,`maskTextSelector`,`inlineStylesheet`,`maskInputOptions`,`maskTextFn`,`maskInputFn`,`keepIframeSrcFn`,`recordCanvas`,`inlineImages`,`slimDOMOptions`,`dataURLOptions`,`doc`,`mirror`,`iframeManager`,`stylesheetManager`,`shadowDomManager`,`canvasManager`,`processedNodeManager`].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function db(e,t){e.delete(t),Dy.childNodes(t).forEach(t=>db(e,t))}function fb(e,t){let n=[e];for(;n.length;){let e=n.pop();t.has(e)||(t.add(e),Dy.childNodes(e).forEach(e=>n.push(e)))}}function pb(e,t){return e.size!==0&&mb(e,t)}function mb(e,t){if(e.has(t))return!0;let n=Dy.parentNode(t);return n?mb(e,n):!1}var hb;function gb(e){hb=e}function _b(){hb=void 0}var vb=e=>hb?(...t)=>{try{return e(...t)}catch(e){if(hb&&hb(e)===!0)return;throw e}}:e,yb=[];function bb(e){try{if(`composedPath`in e){let t=e.composedPath();if(t.length)return t[0]}else if(`path`in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function xb(e,t){let n=new ub;yb.push(n),n.init(e);let[r,i]=wy(),a=new r(vb(n.processMutations.bind(n)));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[a,i]}function Sb({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let i=typeof t.mousemove==`number`?t.mousemove:50,a=typeof t.mousemoveCallback==`number`?t.mousemoveCallback:500,o=[],s,c=jy(vb(t=>{let n=Date.now()-s;e(o.map(e=>(e.timeOffset-=n,e)),t),o=[],s=null}),a),l=vb(jy(vb(e=>{let t=bb(e),{clientX:n,clientY:i}=Vy(e)?e.changedTouches[0]:e;s||=Ty(),o.push({x:n,y:i,id:r.getId(t),timeOffset:Ty()-s}),c(typeof DragEvent<`u`&&e instanceof DragEvent?$.Drag:e instanceof MouseEvent?$.MouseMove:$.TouchMove)}),i,{trailing:!1})),u=[Oy(`mousemove`,l,n),Oy(`touchmove`,l,n),Oy(`drag`,l,n)];return vb(()=>{u.forEach(e=>e())})}function Cb({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,sampling:a}){if(a.mouseInteraction===!1)return()=>{};let o=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,s=[],c=null,l=t=>a=>{let o=bb(a);if(Ly(o,r,i,!0))return;let s=null,l=t;if(`pointerType`in a){switch(a.pointerType){case`mouse`:s=ib.Mouse;break;case`touch`:s=ib.Touch;break;case`pen`:s=ib.Pen}s===ib.Touch?rb[t]===rb.MouseDown?l=`TouchStart`:rb[t]===rb.MouseUp&&(l=`TouchEnd`):ib.Pen}else Vy(a)&&(s=ib.Touch);s===null?rb[t]===rb.Click&&(s=c,c=null):(c=s,(l.startsWith(`Touch`)&&s===ib.Touch||l.startsWith(`Mouse`)&&s===ib.Mouse)&&(s=null));let u=Vy(a)?a.changedTouches[0]:a;if(!u)return;let d=n.getId(o),{clientX:f,clientY:p}=u;vb(e)({type:rb[l],id:d,x:f,y:p,...s!==null&&{pointerType:s}})};return Object.keys(rb).filter(e=>Number.isNaN(Number(e))&&!e.endsWith(`_Departed`)&&o[e]!==!1).forEach(e=>{let n=hp(e),r=l(e);if(window.PointerEvent)switch(rb[e]){case rb.MouseDown:case rb.MouseUp:n=n.replace(`mouse`,`pointer`);break;case rb.TouchStart:case rb.TouchEnd:return}s.push(Oy(n,r,t))}),vb(()=>{s.forEach(e=>e())})}function wb({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,sampling:a}){return Oy(`scroll`,vb(jy(vb(a=>{let o=bb(a);if(!o||Ly(o,r,i,!0))return;let s=n.getId(o);if(o===t&&t.defaultView){let n=Ny(t.defaultView);e({id:s,x:n.left,y:n.top})}else e({id:s,x:o.scrollLeft,y:o.scrollTop})}),a.scroll||100)),t)}function Tb({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return Oy(`resize`,vb(jy(vb(()=>{let t=Py(),i=Fy();(n!==t||r!==i)&&(e({width:Number(i),height:Number(t)}),n=t,r=i)}),200)),t)}var Eb=[`INPUT`,`TEXTAREA`,`SELECT`],Db=new WeakMap;function Ob({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,ignoreClass:a,ignoreSelector:o,maskInputOptions:s,maskInputFn:c,sampling:l,userTriggeredOnInput:u}){function d(e){let n=bb(e),l=e.isTrusted,d=n&&n.tagName;if(n&&d===`OPTION`&&(n=Dy.parentElement(n)),!n||!d||Eb.indexOf(d)<0||Ly(n,r,i,!0)||n.classList.contains(a)||o&&n.matches(o))return;let p=n.value,m=!1,h=yp(n)||``;h===`radio`||h===`checkbox`?m=n.checked:(s[d.toLowerCase()]||s[h])&&(p=mp({element:n,maskInputOptions:s,tagName:d,type:h,value:p,maskInputFn:c})),f(n,u?{text:p,isChecked:m,userTriggered:l}:{text:p,isChecked:m});let g=n.name;h===`radio`&&g&&m&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(e=>{if(e!==n){let t=e.value;f(e,u?{text:t,isChecked:!m,userTriggered:!1}:{text:t,isChecked:!m})}})}function f(t,r){let i=Db.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){Db.set(t,r);let i=n.getId(t);vb(e)({...r,id:i})}}let p=(l.input===`last`?[`change`]:[`input`,`change`]).map(e=>Oy(e,vb(d),t)),m=t.defaultView;if(!m)return()=>{p.forEach(e=>e())};let h=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,`value`),g=[[m.HTMLInputElement.prototype,`value`],[m.HTMLInputElement.prototype,`checked`],[m.HTMLSelectElement.prototype,`value`],[m.HTMLTextAreaElement.prototype,`value`],[m.HTMLSelectElement.prototype,`selectedIndex`],[m.HTMLOptionElement.prototype,`selected`]];return h&&h.set&&p.push(...g.map(e=>My(e[0],e[1],{set(){vb(d)({target:this,isTrusted:!1})}},!1,m))),vb(()=>{p.forEach(e=>e())})}function kb(e){let t=[];function n(e,t){if(Bb(`CSSGroupingRule`)&&e.parentRule instanceof CSSGroupingRule||Bb(`CSSMediaRule`)&&e.parentRule instanceof CSSMediaRule||Bb(`CSSSupportsRule`)&&e.parentRule instanceof CSSSupportsRule||Bb(`CSSConditionRule`)&&e.parentRule instanceof CSSConditionRule){let r=Array.from(e.parentRule.cssRules).indexOf(e);return t.unshift(r),n(e.parentRule,t)}if(e.parentStyleSheet){let n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}return n(e,t)}function Ab(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function jb({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:vb((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=Ab(i,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:s}]}),r.apply(i,a)})}),r.CSSStyleSheet.prototype.addRule=function(e,t,n=this.cssRules.length){let i=`${e} { ${t} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[i,n])};let a=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:vb((r,i,a)=>{let[o]=a,{id:s,styleId:c}=Ab(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:o}]}),r.apply(i,a)})}),r.CSSStyleSheet.prototype.removeRule=function(e){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[e])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:vb((r,i,a)=>{let[o]=a,{id:s,styleId:c}=Ab(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replace:o}),r.apply(i,a)})}));let s;r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:vb((r,i,a)=>{let[o]=a,{id:s,styleId:c}=Ab(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replaceSync:o}),r.apply(i,a)})}));let c={};Vb(`CSSGroupingRule`)?c.CSSGroupingRule=r.CSSGroupingRule:(Vb(`CSSMediaRule`)&&(c.CSSMediaRule=r.CSSMediaRule),Vb(`CSSConditionRule`)&&(c.CSSConditionRule=r.CSSConditionRule),Vb(`CSSSupportsRule`)&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([r,i])=>{l[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(l[r].insertRule,{apply:vb((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=Ab(i.parentStyleSheet,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:[...kb(i),s||0]}]}),r.apply(i,a)})}),i.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:vb((r,i,a)=>{let[o]=a,{id:s,styleId:c}=Ab(i.parentStyleSheet,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:[...kb(i),o]}]}),r.apply(i,a)})})}),vb(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=a,o&&(r.CSSStyleSheet.prototype.replace=o),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})})}function Mb({mirror:e,stylesheetManager:t},n){let r=null;r=n.nodeName===`#document`?e.getId(n):e.getId(Dy.host(n));let i=n.nodeName===`#document`?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,a=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,`adoptedStyleSheets`):void 0;return r===null||r===-1||!i||!a?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){return a.get?.call(this)},set(e){let n=a.set?.call(this,e);if(r!==null&&r!==-1)try{t.adoptStyleSheets(e,r)}catch{}return n}}),vb(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Nb({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:vb((i,o,s)=>{let[c,l,u]=s;if(n.has(c))return a.apply(o,[c,l,u]);let{id:d,styleId:f}=Ab(o.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,set:{property:c,value:l,priority:u},index:kb(o.parentRule)}),i.apply(o,s)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:vb((i,a,s)=>{let[c]=s;if(n.has(c))return o.apply(a,[c]);let{id:l,styleId:u}=Ab(a.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||u&&u!==-1)&&e({id:l,styleId:u,remove:{property:c},index:kb(a.parentRule)}),i.apply(a,s)})}),vb(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Pb({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:r,sampling:i,doc:a}){let o=vb(a=>jy(vb(i=>{let o=bb(i);if(!o||Ly(o,t,n,!0))return;let{currentTime:s,volume:c,muted:l,playbackRate:u,loop:d}=o;e({type:a,id:r.getId(o),currentTime:s,volume:c,muted:l,playbackRate:u,loop:d})}),i.media||500)),s=[Oy(`play`,o(ob.Play),a),Oy(`pause`,o(ob.Pause),a),Oy(`seeked`,o(ob.Seeked),a),Oy(`volumechange`,o(ob.VolumeChange),a),Oy(`ratechange`,o(ob.RateChange),a)];return vb(()=>{s.forEach(e=>e())})}function Fb({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,n){let r=new a(e,t,n);return i.set(r,{family:e,buffer:typeof t!=`string`,descriptors:n,fontSource:typeof t==`string`?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};let o=Ey(t.fonts,`add`,function(t){return function(n){return setTimeout(vb(()=>{let t=i.get(n);t&&(e(t),i.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=a}),r.push(o),vb(()=>{r.forEach(e=>e())})}function Ib(e){let{doc:t,mirror:n,blockClass:r,blockSelector:i,selectionCb:a}=e,o=!0,s=vb(()=>{let e=t.getSelection();if(!e||o&&e?.isCollapsed)return;o=e.isCollapsed||!1;let s=[],c=e.rangeCount||0;for(let t=0;t<c;t++){let{startContainer:a,startOffset:o,endContainer:c,endOffset:l}=e.getRangeAt(t);Ly(a,r,i,!0)||Ly(c,r,i,!0)||s.push({start:n.getId(a),startOffset:o,end:n.getId(c),endOffset:l})}a({ranges:s})});return s(),Oy(`selectionchange`,s)}function Lb({doc:e,customElementCb:t}){let n=e.defaultView;return!n||!n.customElements?()=>{}:Ey(n.customElements,`define`,function(e){return function(n,r,i){try{t({define:{name:n}})}catch{console.warn(`Custom element callback failed for ${n}`)}return e.apply(this,[n,r,i])}})}function Rb(e,t){let{mutationCb:n,mousemoveCb:r,mouseInteractionCb:i,scrollCb:a,viewportResizeCb:o,inputCb:s,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:d,fontCb:f,selectionCb:p,customElementCb:m}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),n(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),r(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),i(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),a(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),o(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),s(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),c(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),l(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),u(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),d(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),f(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),p(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),m(...e)}}function zb(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};Rb(e,t);let r,i=()=>{};e.recordDOM&&([r,i]=xb(e,e.doc));let a=Sb(e),o=Cb(e),s=wb(e),c=Tb(e,{win:n}),l=Ob(e),u=Pb(e),d=()=>{},f=()=>{},p=()=>{},m=()=>{};e.recordDOM&&(d=jb(e,{win:n}),f=Mb(e,e.doc),p=Nb(e,{win:n}),e.collectFonts&&(m=Fb(e)));let h=Ib(e),g=Lb(e),_=[];for(let t of e.plugins)_.push(t.observer(t.callback,n,t.options));return vb(()=>{yb.forEach(e=>e.reset()),r?.disconnect(),i(),a(),o(),s(),c(),l(),u(),d(),f(),p(),m(),h(),g(),_.forEach(e=>e())})}function Bb(e){return window[e]!==void 0}function Vb(e){return!!(window[e]!==void 0&&window[e].prototype&&`insertRule`in window[e].prototype&&`deleteRule`in window[e].prototype)}for(var Hb=class{constructor(e){Y(this,`iframeIdToRemoteIdMap`,new WeakMap),Y(this,`iframeRemoteIdToIdMap`,new WeakMap),this.generateIdFn=e}getId(e,t,n,r){let i=n||this.getIdToRemoteIdMap(e),a=r||this.getRemoteIdToIdMap(e),o=i.get(t);return o||(o=this.generateIdFn(),i.set(t,o),a.set(o,t)),o}getIds(e,t){let n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}getRemoteId(e,t,n){let r=n||this.getRemoteIdToIdMap(e);return typeof t==`number`?r.get(t)||-1:t}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){e?(this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)):(this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},Ub=class{constructor(e){Y(this,`iframes`,new WeakMap),Y(this,`crossOriginIframeMap`,new WeakMap),Y(this,`crossOriginIframeMirror`,new Hb(Ip)),Y(this,`crossOriginIframeStyleMirror`),Y(this,`crossOriginIframeRootIdMap`,new WeakMap),Y(this,`mirror`),Y(this,`mutationCb`),Y(this,`wrappedEmit`),Y(this,`loadListener`),Y(this,`stylesheetManager`),Y(this,`recordCrossOriginIframes`),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Hb(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener(`message`,this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((n=e.contentWindow)==null||n.addEventListener(`message`,this.handleMessage.bind(this))),(r=this.loadListener)==null||r.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let t=e;if(t.data.type!==`rrweb`||t.origin!==t.data.origin||!e.source)return;let n=this.crossOriginIframeMap.get(e.source);if(!n)return;let r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){var n;switch(t.type){case Q.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Q.IncrementalSnapshot,data:{source:$.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Q.Meta:case Q.Load:case Q.DomContentLoaded:return!1;case Q.Plugin:return t;case Q.Custom:return this.replaceIds(t.data.payload,e,[`id`,`parentId`,`previousId`,`nextId`]),t;case Q.IncrementalSnapshot:switch(t.data.source){case $.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,[`parentId`,`nextId`,`previousId`]),this.replaceIdOnNode(t.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,[`parentId`,`id`])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,[`id`])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case $.Drag:case $.TouchMove:case $.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case $.ViewportResize:return!1;case $.MediaInteraction:case $.MouseInteraction:case $.Scroll:case $.CanvasMutation:case $.Input:return this.replaceIds(t.data,e,[`id`]),t;case $.StyleSheetRule:case $.StyleDeclaration:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleId`]),t;case $.Font:return t;case $.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,[`start`,`end`])}),t;case $.AdoptedStyleSheet:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleIds`]),(n=t.data.styles)==null||n.forEach(t=>{this.replaceStyleIds(t,e,[`styleId`])}),t}}return!1}replace(e,t,n,r){for(let i of r)(Array.isArray(t[i])||typeof t[i]==`number`)&&(t[i]=Array.isArray(t[i])?e.getIds(n,t[i]):e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,[`id`,`rootId`]),`childNodes`in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type!==cb.Document&&!e.rootId&&(e.rootId=t),`childNodes`in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}},Wb=class{constructor(e){Y(this,`shadowDoms`,new WeakSet),Y(this,`mutationCb`),Y(this,`scrollCb`),Y(this,`bypassOptions`),Y(this,`mirror`),Y(this,`restoreHandlers`,[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!ip(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let[n]=xb({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(wb({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(Dy.host(e))),this.restoreHandlers.push(Mb({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let n=this;this.restoreHandlers.push(Ey(e.prototype,`attachShadow`,function(e){return function(r){let i=e.call(this,r),a=Dy.shadowRoot(this);return a&&nb(this)&&n.addShadowRoot(a,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Gb=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Kb=typeof Uint8Array>`u`?[]:new Uint8Array(256),qb=0;qb<Gb.length;qb++)Kb[Gb.charCodeAt(qb)]=qb;var Jb=function(e){var t=new Uint8Array(e),n,r=t.length,i=``;for(n=0;n<r;n+=3)i+=Gb[t[n]>>2],i+=Gb[(t[n]&3)<<4|t[n+1]>>4],i+=Gb[(t[n+1]&15)<<2|t[n+2]>>6],i+=Gb[t[n+2]&63];return r%3==2?i=i.substring(0,i.length-1)+`=`:r%3==1&&(i=i.substring(0,i.length-2)+`==`),i},Yb=function(e){var t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);var l=new ArrayBuffer(t),u=new Uint8Array(l);for(r=0;r<n;r+=4)a=Kb[e.charCodeAt(r)],o=Kb[e.charCodeAt(r+1)],s=Kb[e.charCodeAt(r+2)],c=Kb[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},Xb=new Map;function Zb(e,t){let n=Xb.get(e);return n||(n=new Map,Xb.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var Qb=(e,t,n)=>{if(!e||!(tx(e,t)||typeof e==`object`))return;let r=e.constructor.name,i=Zb(n,r),a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function $b(e,t,n){if(e instanceof Array)return e.map(e=>$b(e,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:Jb(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[$b(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}return e instanceof HTMLCanvasElement?{rr_type:`HTMLImageElement`,src:e.toDataURL()}:e instanceof ImageData?{rr_type:e.constructor.name,args:[$b(e.data,t,n),e.width,e.height]}:tx(e,t)||typeof e==`object`?{rr_type:e.constructor.name,index:Qb(e,t,n)}:e}var ex=(e,t,n)=>e.map(e=>$b(e,t,n)),tx=(e,t)=>!![`WebGLActiveInfo`,`WebGLBuffer`,`WebGLFramebuffer`,`WebGLProgram`,`WebGLRenderbuffer`,`WebGLShader`,`WebGLShaderPrecisionFormat`,`WebGLTexture`,`WebGLUniformLocation`,`WebGLVertexArrayObject`,`WebGLVertexArrayObjectOES`].filter(e=>typeof t[e]==`function`).find(n=>e instanceof t[n]);function nx(e,t,n,r){let i=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let o of a)try{if(typeof t.CanvasRenderingContext2D.prototype[o]!=`function`)continue;let a=Ey(t.CanvasRenderingContext2D.prototype,o,function(i){return function(...a){return Ly(this.canvas,n,r,!0)||setTimeout(()=>{let n=ex(a,t,this);e(this.canvas,{type:ab[`2D`],property:o,args:n})},0),i.apply(this,a)}});i.push(a)}catch{let n=My(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:ab[`2D`],property:o,args:[t],setter:!0})}});i.push(n)}return()=>{i.forEach(e=>e())}}function rx(e){return e===`experimental-webgl`?`webgl`:e}function ix(e,t,n,r){let i=[];try{let a=Ey(e.HTMLCanvasElement.prototype,`getContext`,function(e){return function(i,...a){if(!Ly(this,t,n,!0)){let e=rx(i);if(`__context`in this||(this.__context=e),r&&[`webgl`,`webgl2`].includes(e)){if(a[0]&&typeof a[0]==`object`){let e=a[0];e.preserveDrawingBuffer||=!0}else a.splice(0,1,{preserveDrawingBuffer:!0})}}return e.apply(this,[i,...a])}});i.push(a)}catch{console.error(`failed to patch HTMLCanvasElement.prototype.getContext`)}return()=>{i.forEach(e=>e())}}function ax(e,t,n,r,i,a){let o=[],s=Object.getOwnPropertyNames(e);for(let c of s)if(![`isContextLost`,`canvas`,`drawingBufferWidth`,`drawingBufferHeight`].includes(c))try{if(typeof e[c]!=`function`)continue;let s=Ey(e,c,function(e){return function(...o){let s=e.apply(this,o);if(Qb(s,a,this),`tagName`in this.canvas&&!Ly(this.canvas,r,i,!0)){let e=ex(o,a,this),r={type:t,property:c,args:e};n(this.canvas,r)}return s}});o.push(s)}catch{let r=My(e,c,{set(e){n(this.canvas,{type:t,property:c,args:[e],setter:!0})}});o.push(r)}return o}function ox(e,t,n,r){let i=[];return t.WebGLRenderingContext!==void 0&&i.push(...ax(t.WebGLRenderingContext.prototype,ab.WebGL,e,n,r,t)),t.WebGL2RenderingContext!==void 0&&i.push(...ax(t.WebGL2RenderingContext.prototype,ab.WebGL2,e,n,r,t)),()=>{i.forEach(e=>e())}}var sx=`(function() {
|
|
117
|
+
"use strict";
|
|
118
|
+
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
119
|
+
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
120
|
+
for (var i = 0; i < chars.length; i++) {
|
|
121
|
+
lookup[chars.charCodeAt(i)] = i;
|
|
122
|
+
}
|
|
123
|
+
var encode = function(arraybuffer) {
|
|
124
|
+
var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";
|
|
125
|
+
for (i2 = 0; i2 < len; i2 += 3) {
|
|
126
|
+
base64 += chars[bytes[i2] >> 2];
|
|
127
|
+
base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];
|
|
128
|
+
base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];
|
|
129
|
+
base64 += chars[bytes[i2 + 2] & 63];
|
|
130
|
+
}
|
|
131
|
+
if (len % 3 === 2) {
|
|
132
|
+
base64 = base64.substring(0, base64.length - 1) + "=";
|
|
133
|
+
} else if (len % 3 === 1) {
|
|
134
|
+
base64 = base64.substring(0, base64.length - 2) + "==";
|
|
135
|
+
}
|
|
136
|
+
return base64;
|
|
137
|
+
};
|
|
138
|
+
const lastBlobMap = /* @__PURE__ */ new Map();
|
|
139
|
+
const transparentBlobMap = /* @__PURE__ */ new Map();
|
|
140
|
+
async function getTransparentBlobFor(width, height, dataURLOptions) {
|
|
141
|
+
const id = \`\${width}-\${height}\`;
|
|
142
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
143
|
+
if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);
|
|
144
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
145
|
+
offscreen.getContext("2d");
|
|
146
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
147
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
148
|
+
const base64 = encode(arrayBuffer);
|
|
149
|
+
transparentBlobMap.set(id, base64);
|
|
150
|
+
return base64;
|
|
151
|
+
} else {
|
|
152
|
+
return "";
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
const worker = self;
|
|
156
|
+
worker.onmessage = async function(e) {
|
|
157
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
158
|
+
const { id, bitmap, width, height, dataURLOptions } = e.data;
|
|
159
|
+
const transparentBase64 = getTransparentBlobFor(
|
|
160
|
+
width,
|
|
161
|
+
height,
|
|
162
|
+
dataURLOptions
|
|
163
|
+
);
|
|
164
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
165
|
+
const ctx = offscreen.getContext("2d");
|
|
166
|
+
ctx.drawImage(bitmap, 0, 0);
|
|
167
|
+
bitmap.close();
|
|
168
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
169
|
+
const type = blob.type;
|
|
170
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
171
|
+
const base64 = encode(arrayBuffer);
|
|
172
|
+
if (!lastBlobMap.has(id) && await transparentBase64 === base64) {
|
|
173
|
+
lastBlobMap.set(id, base64);
|
|
174
|
+
return worker.postMessage({ id });
|
|
175
|
+
}
|
|
176
|
+
if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });
|
|
177
|
+
worker.postMessage({
|
|
178
|
+
id,
|
|
179
|
+
type,
|
|
180
|
+
base64,
|
|
181
|
+
width,
|
|
182
|
+
height
|
|
183
|
+
});
|
|
184
|
+
lastBlobMap.set(id, base64);
|
|
185
|
+
} else {
|
|
186
|
+
return worker.postMessage({ id: e.data.id });
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
})();
|
|
190
|
+
//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
|
|
191
|
+
`,cx=typeof self<`u`&&self.Blob&&new Blob([sx],{type:`text/javascript;charset=utf-8`});function lx(e){let t;try{if(t=cx&&(self.URL||self.webkitURL).createObjectURL(cx),!t)throw``;let n=new Worker(t,{name:e?.name});return n.addEventListener(`error`,()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker(`data:text/javascript;charset=utf-8,`+encodeURIComponent(sx),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var ux=class{constructor(e){Y(this,`pendingCanvasMutations`,new Map),Y(this,`rafStamps`,{latestId:0,invokeId:null}),Y(this,`mirror`),Y(this,`mutationCb`),Y(this,`resetObservers`),Y(this,`frozen`,!1),Y(this,`locked`,!1),Y(this,`processMutation`,(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});let{sampling:t=`all`,win:n,blockClass:r,blockSelector:i,recordCanvas:a,dataURLOptions:o}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&t===`all`&&this.initCanvasMutationObserver(n,r,i),a&&typeof t==`number`&&this.initCanvasFPSObserver(t,n,r,i,{dataURLOptions:o})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,n,r,i){let a=ix(t,n,r,!0),o=new Map,s=new lx;s.onmessage=e=>{let{id:t}=e.data;if(o.set(t,!1),!(`base64`in e.data))return;let{base64:n,type:r,width:i,height:a}=e.data;this.mutationCb({id:t,type:ab[`2D`],commands:[{property:`clearRect`,args:[0,0,i,a]},{property:`drawImage`,args:[{rr_type:`ImageBitmap`,args:[{rr_type:`Blob`,data:[{rr_type:`ArrayBuffer`,base64:n}],type:r}]},0,0]}]})};let c=1e3/e,l=0,u,d=()=>{let e=[];return t.document.querySelectorAll(`canvas`).forEach(t=>{Ly(t,n,r,!0)||e.push(t)}),e},f=e=>{l&&e-l<c||(l=e,d().forEach(async e=>{let t=this.mirror.getId(e);if(o.get(t)||e.width===0||e.height===0)return;if(o.set(t,!0),[`webgl`,`webgl2`].includes(e.__context)){let t=e.getContext(e.__context);t?.getContextAttributes()?.preserveDrawingBuffer===!1&&t.clear(t.COLOR_BUFFER_BIT)}let n=await createImageBitmap(e);s.postMessage({id:t,bitmap:n,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[n])})),u=requestAnimationFrame(f)};u=requestAnimationFrame(f),this.resetObservers=()=>{a(),cancelAnimationFrame(u)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let r=ix(e,t,n,!1),i=nx(this.processMutation.bind(this),e,t,n),a=ox(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{r(),i(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;let r=n.map(e=>{let{type:t,...n}=e;return n}),{type:i}=n[0];this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}},dx=class{constructor(e){Y(this,`trackedLinkElements`,new WeakSet),Y(this,`mutationCb`),Y(this,`adoptedStyleSheetCb`),Y(this,`styleMirror`,new Qy),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){`_cssText`in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let n={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,n)=>({rule:cp(e,t.href),index:n}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},fx=class{constructor(){Y(this,`nodeMap`,new WeakMap),Y(this,`active`,!1)}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},px,mx,hx,gx=!1;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement(`iframe`);document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug(`Unable to override Array.from`,e)}var _x=pp();function vx(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i=`rr-block`,blockSelector:a=null,ignoreClass:o=`rr-ignore`,ignoreSelector:s=null,maskTextClass:c=`rr-mask`,maskTextSelector:l=null,inlineStylesheet:u=!0,maskAllInputs:d,maskInputOptions:f,slimDOMOptions:p,maskInputFn:m,maskTextFn:h,hooks:g,packFn:_,sampling:v={},dataURLOptions:y={},mousemoveWait:b,recordDOM:x=!0,recordCanvas:S=!1,recordCrossOriginIframes:C=!1,recordAfter:w=e.recordAfter===`DOMContentLoaded`?e.recordAfter:`load`,userTriggeredOnInput:T=!1,collectFonts:E=!1,inlineImages:D=!1,plugins:O,keepIframeSrcFn:k=()=>!1,ignoreCSSAttributes:A=new Set([]),errorHandler:j}=e;gb(j);let M=!C||window.parent===window,N=!1;if(!M)try{window.parent.document&&(N=!1)}catch{N=!0}if(M&&!t)throw Error(`emit function is required`);if(!M&&!N)return()=>{};b!==void 0&&v.mousemove===void 0&&(v.mousemove=b),_x.reset();let ee=d===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:f===void 0?{password:!0}:f,te=am(p);Hy();let ne,re=0,ie=e=>{for(let t of O||[])t.eventProcessor&&(e=t.eventProcessor(e));return _&&!N&&(e=_(e)),e};px=(e,i)=>{let a=e;if(a.timestamp=Ty(),yb[0]?.isFrozen()&&a.type!==Q.FullSnapshot&&(a.type!==Q.IncrementalSnapshot||a.data.source!==$.Mutation)&&yb.forEach(e=>e.unfreeze()),M)t?.(ie(a),i);else if(N){let e={type:`rrweb`,event:ie(a),origin:window.location.origin,isCheckout:i};window.parent.postMessage(e,`*`)}if(a.type===Q.FullSnapshot)ne=a,re=0;else if(a.type===Q.IncrementalSnapshot){if(a.data.source===$.Mutation&&a.data.isAttachIframe)return;re++;let e=r&&re>=r,t=n&&a.timestamp-ne.timestamp>n;(e||t)&&mx(!0)}};let ae=e=>{px({type:Q.IncrementalSnapshot,data:{source:$.Mutation,...e}})},oe=e=>px({type:Q.IncrementalSnapshot,data:{source:$.Scroll,...e}}),se=e=>px({type:Q.IncrementalSnapshot,data:{source:$.CanvasMutation,...e}}),ce=new dx({mutationCb:ae,adoptedStyleSheetCb:e=>px({type:Q.IncrementalSnapshot,data:{source:$.AdoptedStyleSheet,...e}})}),le=new Ub({mirror:_x,mutationCb:ae,stylesheetManager:ce,recordCrossOriginIframes:C,wrappedEmit:px});for(let e of O||[])e.getMirror&&e.getMirror({nodeMirror:_x,crossOriginIframeMirror:le.crossOriginIframeMirror,crossOriginIframeStyleMirror:le.crossOriginIframeStyleMirror});let ue=new fx;hx=new ux({recordCanvas:S,mutationCb:se,win:window,blockClass:i,blockSelector:a,mirror:_x,sampling:v.canvas,dataURLOptions:y});let de=new Wb({mutationCb:ae,scrollCb:oe,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:l,inlineStylesheet:u,maskInputOptions:ee,dataURLOptions:y,maskTextFn:h,maskInputFn:m,recordCanvas:S,inlineImages:D,sampling:v,slimDOMOptions:te,iframeManager:le,stylesheetManager:ce,canvasManager:hx,keepIframeSrcFn:k,processedNodeManager:ue},mirror:_x});mx=(e=!1)=>{if(!x)return;px({type:Q.Meta,data:{href:window.location.href,width:Fy(),height:Py()}},e),ce.reset(),de.init(),yb.forEach(e=>e.lock());let t=cm(document,{mirror:_x,blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:l,inlineStylesheet:u,maskAllInputs:ee,maskTextFn:h,maskInputFn:m,slimDOM:te,dataURLOptions:y,recordCanvas:S,inlineImages:D,onSerialize:e=>{Gy(e,_x)&&le.addIframe(e),Ky(e,_x)&&ce.trackLinkElement(e),Jy(e)&&de.addShadowRoot(Dy.shadowRoot(e),document)},onIframeLoad:(e,t)=>{le.attachIframe(e,t),de.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{ce.attachLinkElement(e,t)},keepIframeSrcFn:k});if(!t)return console.warn(`Failed to snapshot the document`);px({type:Q.FullSnapshot,data:{node:t,initialOffset:Ny(window)}},e),yb.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ce.adoptStyleSheets(document.adoptedStyleSheets,_x.getId(document))};try{let e=[],t=e=>vb(zb)({mutationCb:ae,mousemoveCb:(e,t)=>px({type:Q.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>px({type:Q.IncrementalSnapshot,data:{source:$.MouseInteraction,...e}}),scrollCb:oe,viewportResizeCb:e=>px({type:Q.IncrementalSnapshot,data:{source:$.ViewportResize,...e}}),inputCb:e=>px({type:Q.IncrementalSnapshot,data:{source:$.Input,...e}}),mediaInteractionCb:e=>px({type:Q.IncrementalSnapshot,data:{source:$.MediaInteraction,...e}}),styleSheetRuleCb:e=>px({type:Q.IncrementalSnapshot,data:{source:$.StyleSheetRule,...e}}),styleDeclarationCb:e=>px({type:Q.IncrementalSnapshot,data:{source:$.StyleDeclaration,...e}}),canvasMutationCb:se,fontCb:e=>px({type:Q.IncrementalSnapshot,data:{source:$.Font,...e}}),selectionCb:e=>{px({type:Q.IncrementalSnapshot,data:{source:$.Selection,...e}})},customElementCb:e=>{px({type:Q.IncrementalSnapshot,data:{source:$.CustomElement,...e}})},blockClass:i,ignoreClass:o,ignoreSelector:s,maskTextClass:c,maskTextSelector:l,maskInputOptions:ee,inlineStylesheet:u,sampling:v,recordDOM:x,recordCanvas:S,inlineImages:D,userTriggeredOnInput:T,collectFonts:E,doc:e,maskInputFn:m,maskTextFn:h,keepIframeSrcFn:k,blockSelector:a,slimDOMOptions:te,dataURLOptions:y,mirror:_x,iframeManager:le,stylesheetManager:ce,shadowDomManager:de,processedNodeManager:ue,canvasManager:hx,ignoreCSSAttributes:A,plugins:(O?.filter(e=>e.observer))?.map(e=>({observer:e.observer,options:e.options,callback:t=>px({type:Q.Plugin,data:{plugin:e.name,payload:t}})}))||[]},g);le.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});let n=()=>{mx(),e.push(t(document)),gx=!0};return[`interactive`,`complete`].includes(document.readyState)?n():(e.push(Oy(`DOMContentLoaded`,()=>{px({type:Q.DomContentLoaded,data:{}}),w===`DOMContentLoaded`&&n()})),e.push(Oy(`load`,()=>{px({type:Q.Load,data:{}}),w===`load`&&n()},window))),()=>{e.forEach(e=>{try{e()}catch(e){String(e).toLowerCase().includes(`cross-origin`)||console.warn(e)}}),ue.destroy(),gx=!1,_b()}}catch(e){console.warn(e)}}vx.addCustomEvent=(e,t)=>{if(!gx)throw Error(`please add custom event after start recording`);px({type:Q.Custom,data:{tag:e,payload:t}})},vx.freezePage=()=>{yb.forEach(e=>e.freeze())},vx.takeFullSnapshot=e=>{if(!gx)throw Error(`please take full snapshot after start recording`);mx(e)},vx.mirror=_x;function yx(e){return{all:e||=new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(e){e(n)}),(r=e.get(`*`))&&r.slice().map(function(e){e(t,n)})}}}function bx(e=window,t=document){if(`scrollBehavior`in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;let n=e.HTMLElement||e.Element,r={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||s,scrollIntoView:n.prototype.scrollIntoView},i=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function a(e){return RegExp(`MSIE |Trident/|Edge/`).test(e)}let o=+!!a(e.navigator.userAgent);function s(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){return .5*(1-Math.cos(Math.PI*e))}function l(e){if(typeof e!=`object`||!e||e.behavior===void 0||e.behavior===`auto`||e.behavior===`instant`)return!0;if(typeof e==`object`&&e.behavior===`smooth`)return!1;throw TypeError(`behavior member of ScrollOptions `+e.behavior+` is not a valid value for enumeration ScrollBehavior.`)}function u(e,t){if(t===`Y`)return e.clientHeight+o<e.scrollHeight;if(t===`X`)return e.clientWidth+o<e.scrollWidth}function d(t,n){let r=e.getComputedStyle(t,null)[`overflow`+n];return r===`auto`||r===`scroll`}function f(e){let t=u(e,`Y`)&&d(e,`Y`),n=u(e,`X`)&&d(e,`X`);return t||n}function p(e){for(;e!==t.body&&f(e)===!1;)e=e.parentNode||e.host;return e}function m(t){let n=i(),r,a,o,s=(n-t.startTime)/468;s=s>1?1:s,r=c(s),a=t.startX+(t.x-t.startX)*r,o=t.startY+(t.y-t.startY)*r,t.method.call(t.scrollable,a,o),(a!==t.x||o!==t.y)&&e.requestAnimationFrame(m.bind(e,t))}function h(n,a,o){let c,l,u,d,f=i();n===t.body?(c=e,l=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=r.scroll):(c=n,l=n.scrollLeft,u=n.scrollTop,d=s),m({scrollable:c,method:d,startTime:f,startX:l,startY:u,x:a,y:o})}e.scroll=e.scrollTo=function(){arguments[0]!==void 0&&(l(arguments[0])===!0?r.scroll.call(e,arguments[0].left===void 0?typeof arguments[0]==`object`?e.scrollX||e.pageXOffset:arguments[0]:arguments[0].left,arguments[0].top===void 0?arguments[1]===void 0?e.scrollY||e.pageYOffset:arguments[1]:arguments[0].top):h.call(e,t.body,arguments[0].left===void 0?e.scrollX||e.pageXOffset:~~arguments[0].left,arguments[0].top===void 0?e.scrollY||e.pageYOffset:~~arguments[0].top))},e.scrollBy=function(){arguments[0]!==void 0&&(l(arguments[0])?r.scrollBy.call(e,arguments[0].left===void 0?typeof arguments[0]==`object`?0:arguments[0]:arguments[0].left,arguments[0].top===void 0?arguments[1]===void 0?0:arguments[1]:arguments[0].top):h.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},n.prototype.scroll=n.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(l(arguments[0])===!0){if(typeof arguments[0]==`number`&&arguments[1]===void 0)throw SyntaxError(`Value could not be converted`);r.elementScroll.call(this,arguments[0].left===void 0?typeof arguments[0]==`object`?this.scrollLeft:~~arguments[0]:~~arguments[0].left,arguments[0].top===void 0?arguments[1]===void 0?this.scrollTop:~~arguments[1]:~~arguments[0].top);return}let e=arguments[0].left,t=arguments[0].top;h.call(this,this,e===void 0?this.scrollLeft:~~e,t===void 0?this.scrollTop:~~t)},n.prototype.scrollBy=function(){arguments[0]!==void 0&&(l(arguments[0])===!0?r.elementScroll.call(this,arguments[0].left===void 0?~~arguments[0]+this.scrollLeft:~~arguments[0].left+this.scrollLeft,arguments[0].top===void 0?~~arguments[1]+this.scrollTop:~~arguments[0].top+this.scrollTop):this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}))},n.prototype.scrollIntoView=function(){if(l(arguments[0])===!0){r.scrollIntoView.call(this,arguments[0]===void 0||arguments[0]);return}let n=p(this),i=n.getBoundingClientRect(),a=this.getBoundingClientRect();n===t.body?e.scrollBy({left:a.left,top:a.top,behavior:`smooth`}):(h.call(this,n,n.scrollLeft+a.left-i.left,n.scrollTop+a.top-i.top),e.getComputedStyle(n).position!==`fixed`&&e.scrollBy({left:i.left,top:i.top,behavior:`smooth`}))}}var xx=class{constructor(e=[],t){Y(this,`timeOffset`,0),Y(this,`speed`),Y(this,`actions`),Y(this,`raf`,null),Y(this,`lastTimestamp`),this.actions=e,this.speed=t.speed}addAction(e){let t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{let t=this.findActionIndex(e);this.actions.splice(t,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}updateLiveTime(){this.raf===!0&&this.rafCheck()}rafCheck(){let e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){let e=this.actions[0];if(this.timeOffset>=e.delay)this.actions.shift(),e.doAction();else break}this.raf=this.actions.length>0?requestAnimationFrame(this.rafCheck.bind(this)):!0}clear(){this.raf&&=(this.raf!==!0&&cancelAnimationFrame(this.raf),null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,n=this.actions.length-1;for(;t<=n;){let r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else if(this.actions[r].delay>e.delay)n=r-1;else return r+1}return t}};function Sx(e,t){if(e.type===Q.IncrementalSnapshot&&e.data.source===$.MouseMove&&e.data.positions&&e.data.positions.length){let n=e.data.positions[0].timeOffset,r=e.timestamp+n;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.delay}function Cx(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(t===void 0||t-->0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}var wx;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(wx||={});var Tx={type:`xstate.init`};function Ex(e){return e===void 0?[]:[].concat(e)}function Dx(e){return{type:`xstate.assign`,assignment:e}}function Ox(e,t){return typeof(e=typeof e==`string`&&t&&t[e]?t[e]:e)==`string`?{type:e}:typeof e==`function`?{type:e.name,exec:e}:e}function kx(e){return function(t){return e===t}}function Ax(e){return typeof e==`string`?{type:e}:e}function jx(e,t){return{value:e,context:t,actions:[],changed:!1,matches:kx(e)}}function Mx(e,t,n){var r=t,i=!1;return[e.filter(function(e){if(e.type===`xstate.assign`){i=!0;var t=Object.assign({},r);return typeof e.assignment==`function`?t=e.assignment(r,n):Object.keys(e.assignment).forEach(function(i){t[i]=typeof e.assignment[i]==`function`?e.assignment[i](r,n):e.assignment[i]}),r=t,!1}return!0}),r,i]}function Nx(e,t){t===void 0&&(t={});var n=Cx(Mx(Ex(e.states[e.initial].entry).map(function(e){return Ox(e,t.actions)}),e.context,Tx),2),r=n[0],i=n[1],a={config:e,_options:t,initialState:{value:e.initial,actions:r,context:i,matches:kx(e.initial)},transition:function(t,n){var r,i,o=typeof t==`string`?{value:t,context:e.context}:t,s=o.value,c=o.context,l=Ax(n),u=e.states[s];if(u.on){var d=Ex(u.on[l.type]);try{for(var f=function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}(d),p=f.next();!p.done;p=f.next()){var m=p.value;if(m===void 0)return jx(s,c);var h=typeof m==`string`?{target:m}:m,g=h.target,_=h.actions,v=_===void 0?[]:_,y=h.cond,b=y===void 0?function(){return!0}:y,x=g===void 0,S=g??s,C=e.states[S];if(b(c,l)){var w=Cx(Mx((x?Ex(v):[].concat(u.exit,v,C.entry).filter(function(e){return e})).map(function(e){return Ox(e,a._options.actions)}),c,l),3),T=w[0],E=w[1],D=w[2],O=g??s;return{value:O,context:E,actions:T,changed:g!==s||T.length>0||D,matches:kx(O)}}}}catch(e){r={error:e}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}return jx(s,c)}};return a}var Px=function(e,t){return e.actions.forEach(function(n){var r=n.exec;return r&&r(e.context,t)})};function Fx(e){var t=e.initialState,n=wx.NotStarted,r=new Set,i={_machine:e,send:function(i){n===wx.Running&&(t=e.transition(t,i),Px(t,Ax(i)),r.forEach(function(e){return e(t)}))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(r){if(r){var a=typeof r==`object`?r:{context:e.config.context,value:r};t={value:a.value,actions:[],context:a.context,matches:kx(a.value)}}return n=wx.Running,Px(t,Tx),i},stop:function(){return n=wx.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}function Ix(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.type===Q.Meta&&r.timestamp<=t)return e.slice(n)}return e}function Lx(e,{getCastFn:t,applyEventsSynchronously:n,emitter:r}){return Fx(Nx({id:`player`,context:e,initial:`paused`,states:{playing:{on:{PAUSE:{target:`paused`,actions:[`pause`]},CAST_EVENT:{target:`playing`,actions:`castEvent`},END:{target:`paused`,actions:[`resetLastPlayedEvent`,`pause`]},ADD_EVENT:{target:`playing`,actions:[`addEvent`]}}},paused:{on:{PLAY:{target:`playing`,actions:[`recordTimeOffset`,`play`]},CAST_EVENT:{target:`paused`,actions:`castEvent`},TO_LIVE:{target:`live`,actions:[`startLive`]},ADD_EVENT:{target:`paused`,actions:[`addEvent`]}}},live:{on:{ADD_EVENT:{target:`live`,actions:[`addEvent`]},CAST_EVENT:{target:`live`,actions:[`castEvent`]}}}}},{actions:{castEvent:Dx({lastPlayedEvent:(e,t)=>t.type===`CAST_EVENT`?t.payload.event:e.lastPlayedEvent}),recordTimeOffset:Dx((e,t)=>{let n=e.timeOffset;return`payload`in t&&`timeOffset`in t.payload&&(n=t.payload.timeOffset),{...e,timeOffset:n,baselineTime:e.events[0].timestamp+n}}),play(e){let{timer:i,events:a,baselineTime:o,lastPlayedEvent:s}=e;i.clear();for(let e of a)Sx(e,o);let c=Ix(a,o),l=s?.timestamp;s?.type===Q.IncrementalSnapshot&&s.data.source===$.MouseMove&&(l=s.timestamp+s.data.positions[0]?.timeOffset),o<(l||0)&&r.emit(sb.PlayBack);let u=[];for(let e of c)if(!(l&&l<o&&(e.timestamp<=l||e===s))){if(e.timestamp<o)u.push(e);else{let n=t(e,!1);i.addAction({doAction:()=>{n()},delay:e.delay})}}n(u),r.emit(sb.Flush),i.start()},pause(e){e.timer.clear()},resetLastPlayedEvent:Dx(e=>({...e,lastPlayedEvent:null})),startLive:Dx({baselineTime:(e,t)=>(e.timer.start(),t.type===`TO_LIVE`&&t.payload.baselineTime?t.payload.baselineTime:Date.now())}),addEvent:Dx((e,n)=>{let{baselineTime:r,timer:i,events:a}=e;if(n.type===`ADD_EVENT`){let{event:e}=n.payload;Sx(e,r);let o=a.length-1;if(!a[o]||a[o].timestamp<=e.timestamp)a.push(e);else{let t=-1,n=0;for(;n<=o;){let t=Math.floor((n+o)/2);a[t].timestamp<=e.timestamp?n=t+1:o=t-1}t===-1&&(t=n),a.splice(t,0,e)}let s=e.timestamp<r,c=t(e,s);s?c():i.isActive()&&i.addAction({doAction:()=>{c()},delay:e.delay})}return{...e,events:a}})}}))}function Rx(e){return Fx(Nx({id:`speed`,context:e,initial:`normal`,states:{normal:{on:{FAST_FORWARD:{target:`skipping`,actions:[`recordSpeed`,`setSpeed`]},SET_SPEED:{target:`normal`,actions:[`setSpeed`]}}},skipping:{on:{BACK_TO_NORMAL:{target:`normal`,actions:[`restoreSpeed`]},SET_SPEED:{target:`normal`,actions:[`setSpeed`]}}}}},{actions:{setSpeed:(e,t)=>{`payload`in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:Dx({normalSpeed:e=>e.timer.speed}),restoreSpeed:e=>{e.timer.setSpeed(e.normalSpeed)}}}))}var zx=e=>[`.${e} { background: currentColor }`,`noscript { display: none !important; }`],Bx=new Map;function Vx(e,t){let n=Bx.get(e);return n||(n=new Map,Bx.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}function Hx(e,t,n){return async r=>{if(r&&typeof r==`object`&&`rr_type`in r){if(n&&(n.isUnchanged=!1),r.rr_type===`ImageBitmap`&&`args`in r){let i=await Hx(e,t,n)(r.args);return await createImageBitmap.apply(null,i)}if(`index`in r){if(n||t===null)return r;let{rr_type:e,index:i}=r;return Vx(t,e)[i]}if(`args`in r){let{rr_type:i,args:a}=r,o=window[i];return new o(...await Promise.all(a.map(Hx(e,t,n))))}if(`base64`in r)return Yb(r.base64);if(`src`in r){let t=e.get(r.src);if(t)return t;{let t=new Image;return t.src=r.src,e.set(r.src,t),t}}if(`data`in r&&r.rr_type===`Blob`){let i=await Promise.all(r.data.map(Hx(e,t,n)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(Hx(e,t,n)));return r}}function Ux(e,t){try{return t===ab.WebGL?e.getContext(`webgl`)||e.getContext(`experimental-webgl`):e.getContext(`webgl2`)}catch{return null}}var Wx=[`WebGLActiveInfo`,`WebGLBuffer`,`WebGLFramebuffer`,`WebGLProgram`,`WebGLRenderbuffer`,`WebGLShader`,`WebGLShaderPrecisionFormat`,`WebGLTexture`,`WebGLUniformLocation`,`WebGLVertexArrayObject`];function Gx(e,t){if(!t?.constructor)return;let{name:n}=t.constructor;if(!Wx.includes(n))return;let r=Vx(e,n);r.includes(t)||r.push(t)}async function Kx({mutation:e,target:t,type:n,imageMap:r,errorHandler:i}){try{let i=Ux(t,n);if(!i)return;if(e.setter){i[e.property]=e.args[0];return}let a=i[e.property],o=await Promise.all(e.args.map(Hx(r,i)));Gx(i,a.apply(i,o))}catch(t){i(e,t)}}async function qx({event:e,mutations:t,target:n,imageMap:r,errorHandler:i}){let a=n.getContext(`2d`);if(!a){i(t[0],Error(`Canvas context is null`));return}let o=t.map(async e=>Promise.all(e.args.map(Hx(r,a))));(await Promise.all(o)).forEach((n,o)=>{let s=t[o];try{if(s.setter){a[s.property]=s.args[0];return}let t=a[s.property];s.property===`drawImage`&&typeof s.args[0]==`string`?(r.get(e),t.apply(a,s.args)):t.apply(a,n)}catch(e){i(s,e)}})}async function Jx({event:e,mutation:t,target:n,imageMap:r,canvasEventMap:i,errorHandler:a}){try{let o=i.get(e)||t,s=`commands`in o?o.commands:[o];if([ab.WebGL,ab.WebGL2].includes(t.type)){for(let e=0;e<s.length;e++){let i=s[e];await Kx({mutation:i,type:t.type,target:n,imageMap:r,errorHandler:a})}return}await qx({event:e,mutations:s,target:n,imageMap:r,errorHandler:a})}catch(e){a(t,e)}}var Yx=class{constructor(e){Y(this,`mediaMap`,new Map),Y(this,`warn`),Y(this,`service`),Y(this,`speedService`),Y(this,`emitter`),Y(this,`getCurrentTime`),Y(this,`metadataCallbackMap`,new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(sb.Start,this.start.bind(this)),this.emitter.on(sb.SkipStart,this.start.bind(this)),this.emitter.on(sb.Pause,this.pause.bind(this)),this.emitter.on(sb.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,n)=>{this.syncTargetWithState(n),e.pause&&n.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:n}){if(n.isPlaying){let r=(e-n.lastInteractionTimeOffset)/1e3*n.playbackRate,i=`duration`in t&&t.duration;if(Number.isNaN(i)){this.waitForMetadata(t);return}let a=n.currentTimeAtLastInteraction+r;t.loop&&i!==!1&&(a%=i),t.currentTime=a}else t.pause(),t.currentTime=n.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!(`addEventListener`in e))return;let t=()=>{this.metadataCallbackMap.delete(e);let t=this.mediaMap.get(e);t&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t})};this.metadataCallbackMap.set(e,t),e.addEventListener(`loadedmetadata`,t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:n}){let r=this.mediaMap.get(e),{type:i,playbackRate:a,currentTime:o,muted:s,volume:c,loop:l}=n;return{isPlaying:i===ob.Play||i!==ob.Pause&&(r?.isPlaying||e.getAttribute(`autoplay`)!==null),currentTimeAtLastInteraction:o??r?.currentTimeAtLastInteraction??0,lastInteractionTimeOffset:t,playbackRate:a??r?.playbackRate??1,volume:c??r?.volume??1,muted:s??r?.muted??e.getAttribute(`muted`)===null,loop:l??r?.loop??e.getAttribute(`loop`)===null}}syncTargetWithState(e){let t=this.mediaMap.get(e);if(!t)return;let{muted:n,loop:r,volume:i,isPlaying:a}=t,o=this.service.state.matches(`paused`),s=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==i&&(e.volume=i),e.muted=n,e.loop=r,e.playbackRate!==s&&(e.playbackRate=s),a&&!o?e.play():e.pause()}catch(e){this.warn(`Failed to replay media interactions: ${e.message||e}`)}}addMediaElements(e,t,n){if(![`AUDIO`,`VIDEO`].includes(e.nodeName))return;let r=e,i=n.getMeta(r);if(!i||!(`attributes`in i))return;let a=this.service.state.matches(`paused`),o=i.attributes,s=!1;s=o.rr_mediaState?o.rr_mediaState===`played`:r.getAttribute(`autoplay`)!==null,s&&a&&r.pause();let c=1;typeof o.rr_mediaPlaybackRate==`number`&&(c=o.rr_mediaPlaybackRate);let l=!1;l=typeof o.rr_mediaMuted==`boolean`?o.rr_mediaMuted:r.getAttribute(`muted`)!==null;let u=!1;u=typeof o.rr_mediaLoop==`boolean`?o.rr_mediaLoop:r.getAttribute(`loop`)!==null;let d=1;typeof o.rr_mediaVolume==`number`&&(d=o.rr_mediaVolume);let f=0;typeof o.rr_mediaCurrentTime==`number`&&(f=o.rr_mediaCurrentTime),this.mediaMap.set(r,{isPlaying:s,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:t,playbackRate:c,volume:d,muted:l,loop:u}),this.syncTargetWithState(r)}mediaMutation({target:e,timeOffset:t,mutation:n}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:n})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return[`AUDIO`,`VIDEO`].includes(e.nodeName)}reset(){this.mediaMap.clear()}};function Xx(e,t){if(e.nodeName!==`DIALOG`||e instanceof uv)return;let n=e,r=n.open,i=r&&n.matches(`dialog:modal`),a=n.getAttribute(`rr_open_mode`),o=typeof t?.attributes.open==`string`||typeof n.getAttribute(`open`)==`string`,s=a===`modal`;(!r||i&&a===`non-modal`||!i&&s)&&(n.isConnected?(r&&n.close(),o&&(s?n.showModal():n.show())):console.warn(`dialog is not attached to the dom`,n))}function Zx(e,t){if(e.nodeName!==`DIALOG`||e instanceof uv)return;let n=e;n.isConnected?t.attributes.open===null&&(n.removeAttribute(`open`),n.removeAttribute(`rr_open_mode`)):console.warn(`dialog is not attached to the dom`,n)}var Qx=5e3,$x=yx,eS=`[replayer]`,tS={duration:500,lineCap:`round`,lineWidth:3,strokeStyle:`red`};function nS(e){return e.type==Q.IncrementalSnapshot&&(e.data.source==$.TouchMove||e.data.source==$.MouseInteraction&&e.data.type==rb.TouchStart)}var rS=class{constructor(e,t){if(Y(this,`wrapper`),Y(this,`iframe`),Y(this,`UNSAFE_replayCanvas`,!1),Y(this,`service`),Y(this,`speedService`),Y(this,`config`),Y(this,`usingVirtualDom`,!1),Y(this,`virtualDom`,new Fv),Y(this,`mouse`),Y(this,`mouseTail`,null),Y(this,`tailPositions`,[]),Y(this,`emitter`,$x()),Y(this,`nextUserInteractionEvent`),Y(this,`legacy_missingNodeRetryMap`,{}),Y(this,`cache`,Qh()),Y(this,`imageMap`,new Map),Y(this,`canvasEventMap`,new Map),Y(this,`mirror`,pp()),Y(this,`styleMirror`,new Qy),Y(this,`mediaManager`),Y(this,`firstFullSnapshot`,null),Y(this,`newDocumentQueue`,[]),Y(this,`mousePos`,null),Y(this,`touchActive`,null),Y(this,`lastMouseDownEvent`,null),Y(this,`lastHoveredRootNode`),Y(this,`lastSelectionData`,null),Y(this,`constructedStyleMutations`,[]),Y(this,`adoptedStyleSheets`,[]),Y(this,`handleResize`,e=>{this.iframe.style.display=`inherit`;for(let t of[this.mouseTail,this.iframe])t&&(t.setAttribute(`width`,String(e.width)),t.setAttribute(`height`,String(e.height)))}),Y(this,`applyEventsSynchronously`,e=>{for(let t of e){switch(t.type){case Q.DomContentLoaded:case Q.Load:continue;case Q.FullSnapshot:case Q.Meta:case Q.Plugin:case Q.IncrementalSnapshot:}this.getCastFn(t,!0)()}}),Y(this,`getCastFn`,(e,t=!1)=>{let n;switch(e.type){case Q.DomContentLoaded:case Q.Load:break;case Q.Custom:n=()=>{this.emitter.emit(sb.CustomEvent,e)};break;case Q.Meta:n=()=>this.emitter.emit(sb.Resize,{width:e.data.width,height:e.data.height});break;case Q.FullSnapshot:n=()=>{var n;if(this.firstFullSnapshot){if(this.firstFullSnapshot===e){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(e,t),(n=this.iframe.contentWindow)==null||n.scrollTo(e.data.initialOffset)};break;case Q.IncrementalSnapshot:n=()=>{if(this.applyIncremental(e,t),!t&&(e===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(let t of this.service.state.context.events)if(!(t.timestamp<=e.timestamp)&&this.isUserInteraction(t)){t.delay-e.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=t);break}if(this.nextUserInteractionEvent){let t=this.nextUserInteractionEvent.delay-e.delay,n={speed:Math.min(Math.round(t/Qx),this.config.maxSpeed)};this.speedService.send({type:`FAST_FORWARD`,payload:n}),this.emitter.emit(sb.SkipStart,n)}}}}return()=>{n&&n();for(let n of this.config.plugins||[])n.handler&&n.handler(e,t,{replayer:this});this.service.send({type:`CAST_EVENT`,payload:{event:e}});let r=this.service.state.context.events.length-1;if(!this.config.liveMode&&e===this.service.state.context.events[r]){let t=()=>{r<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send(`END`),this.emitter.emit(sb.Finish))},n=50;e.type===Q.IncrementalSnapshot&&e.data.source===$.MouseMove&&e.data.positions.length&&(n+=Math.max(0,-e.data.positions[0].timeOffset)),setTimeout(t,n)}this.emitter.emit(sb.EventCast,e)}}),!t?.liveMode&&e.length<2)throw Error(`Replayer need at least 2 events.`);let n={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:1e4,showWarning:!0,showDebug:!1,blockClass:`rr-block`,liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:tS,useVirtualDom:!0,logger:console};this.config=Object.assign({},n,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(sb.Resize,this.handleResize),this.setupDom();for(let e of this.config.plugins||[])e.getMirror&&e.getMirror({nodeMirror:this.mirror});this.emitter.on(sb.Flush,()=>{if(this.usingVirtualDom){let e={mirror:this.mirror,applyCanvas:(e,t,n)=>{Jx({event:e,mutation:t,target:n,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(e,t)=>{e.source===$.StyleSheetRule?this.applyStyleSheetRule(e,t):e.source===$.StyleDeclaration&&this.applyStyleDeclaration(e,t)},afterAppend:(e,t)=>{for(let n of this.config.plugins||[])n.onBuild&&n.onBuild(e,{id:t,replayer:this})}};if(this.iframe.contentDocument)try{Dv(this.iframe.contentDocument,this.virtualDom,e,this.virtualDom.mirror)}catch(e){this.warn(e)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(let t in this.legacy_missingNodeRetryMap)try{let n=this.legacy_missingNodeRetryMap[t],r=Mv(n.node,this.mirror,this.virtualDom.mirror);Dv(r,n.node,e,this.virtualDom.mirror),n.node=r}catch(e){this.warn(e)}this.constructedStyleMutations.forEach(e=>{this.applyStyleSheetMutation(e)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(e=>{this.applyAdoptedStyleSheet(e)}),this.adoptedStyleSheets=[]}if(this.mousePos&&=(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),null),this.touchActive===!0?this.mouse.classList.add(`touch-active`):this.touchActive===!1&&this.mouse.classList.remove(`touch-active`),this.touchActive=null,this.lastMouseDownEvent){let[e,t]=this.lastMouseDownEvent;e.dispatchEvent(t)}this.lastMouseDownEvent=null,this.lastSelectionData&&=(this.applySelection(this.lastSelectionData),null)}),this.emitter.on(sb.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});let r=new xx([],{speed:this.config.speed});this.service=Lx({events:e.map(e=>t&&t.unpackFn?t.unpackFn(e):e).sort((e,t)=>e.timestamp-t.timestamp),timer:r,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(e=>{this.emitter.emit(sb.StateChange,{player:e})}),this.speedService=Rx({normalSpeed:-1,timer:r}),this.speedService.start(),this.speedService.subscribe(e=>{this.emitter.emit(sb.StateChange,{speed:e})}),this.mediaManager=new Yx({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});let i=this.service.state.context.events.find(e=>e.type===Q.Meta),a=this.service.state.context.events.find(e=>e.type===Q.FullSnapshot);if(i){let{width:e,height:t}=i.data;setTimeout(()=>{this.emitter.emit(sb.Resize,{width:e,height:t})},0)}a&&setTimeout(()=>{var e;this.firstFullSnapshot||(this.firstFullSnapshot=a,this.rebuildFullSnapshot(a),(e=this.iframe.contentWindow)==null||e.scrollTo(a.data.initialOffset))},1),this.service.state.context.events.find(nS)&&this.mouse.classList.add(`touch-device`)}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),e.speed!==void 0&&this.speedService.send({type:`SET_SPEED`,payload:{speed:e.speed}}),e.mouseTail!==void 0&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display=`none`):(this.mouseTail||(this.mouseTail=document.createElement(`canvas`),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add(`replayer-mouse-tail`),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display=`inherit`))}getMetaData(){let e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.config.liveMode&&this.timer.updateLiveTime(),this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){let{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t;this.service.state.matches(`paused`)||this.service.send({type:`PAUSE`}),this.service.send({type:`PLAY`,payload:{timeOffset:e}}),(t=this.iframe.contentDocument?.getElementsByTagName(`html`)[0])==null||t.classList.remove(`rrweb-paused`),this.emitter.emit(sb.Start)}pause(e){var t;e===void 0&&this.service.state.matches(`playing`)&&this.service.send({type:`PAUSE`}),typeof e==`number`&&(this.play(e),this.service.send({type:`PAUSE`})),(t=this.iframe.contentDocument?.getElementsByTagName(`html`)[0])==null||t.classList.add(`rrweb-paused`),this.emitter.emit(sb.Pause)}resume(e=0){this.warn(`The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface.`),this.play(e),this.emitter.emit(sb.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(sb.Destroy)}startLive(e){this.service.send({type:`TO_LIVE`,payload:{baselineTime:e}})}addEvent(e){let t=this.config.unpackFn?this.config.unpackFn(e):e;nS(t)&&this.mouse.classList.add(`touch-device`),Promise.resolve().then(()=>this.service.send({type:`ADD_EVENT`,payload:{event:t}}))}enableInteract(){this.iframe.setAttribute(`scrolling`,`auto`),this.iframe.style.pointerEvents=`auto`}disableInteract(){this.iframe.setAttribute(`scrolling`,`no`),this.iframe.style.pointerEvents=`none`}resetCache(){this.cache=Qh()}setupDom(){this.wrapper=document.createElement(`div`),this.wrapper.classList.add(`replayer-wrapper`),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement(`div`),this.mouse.classList.add(`replayer-mouse`),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement(`canvas`),this.mouseTail.classList.add(`replayer-mouse-tail`),this.mouseTail.style.display=`inherit`,this.wrapper.appendChild(this.mouseTail)),this.config.UNSAFE_replayCanvas?(this.iframe=document.createElement(`iframe`),this.iframe.setAttribute(`sandbox`,`allow-same-origin allow-scripts`),this.wrapper.appendChild(this.iframe),this.UNSAFE_replayCanvas=!0):(this.iframe=dg({root:this.wrapper}),this.UNSAFE_replayCanvas=!1),this.iframe.style.display=`none`,this.disableInteract(),this.iframe.contentWindow&&this.iframe.contentDocument&&(bx(this.iframe.contentWindow,this.iframe.contentDocument),Hy(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){if(!this.iframe.contentDocument)return this.warn(`Looks like your replayer has been destroyed.`);Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn(`Found unresolved missing node map`,this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};let n=[],r=new Set,i=(t,i)=>{if(t.nodeName===`DIALOG`&&r.add(t),this.collectIframeAndAttachDocument(n,t),this.mediaManager.isSupportedMediaElement(t)){let{events:n}=this.service.state.context;this.mediaManager.addMediaElements(t,e.timestamp-n[0].timestamp,this.mirror)}for(let e of this.config.plugins||[])e.onBuild&&e.onBuild(t,{id:i,replayer:this})};this.usingVirtualDom&&=(this.virtualDom.destroyTree(),!1),this.mirror.reset(),ug(e.data.node,{doc:this.iframe.contentDocument,afterAppend:i,cache:this.cache,mirror:this.mirror,UNSAFE_allowUnprotectedRebuild:this.UNSAFE_replayCanvas}),i(this.iframe.contentDocument,e.data.node.id);for(let{mutationInQueue:e,builtNode:t}of n)this.attachDocumentToIframe(e,t),this.newDocumentQueue=this.newDocumentQueue.filter(t=>t!==e);let{documentElement:a,head:o}=this.iframe.contentDocument;this.insertStyleRules(a,o),r.forEach(e=>Xx(e)),this.service.state.matches(`playing`)||this.iframe.contentDocument.getElementsByTagName(`html`)[0].classList.add(`rrweb-paused`),this.emitter.emit(sb.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var n;let r=zx(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&r.push(`html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }`),r.length){if(this.usingVirtualDom){let n=this.virtualDom.createElement(`style`);this.virtualDom.mirror.add(n,Zv(n,this.virtualDom.unserializedId)),e.insertBefore(n,t),n.rules.push({source:$.StyleSheetRule,adds:r.map((e,t)=>({rule:e,index:t}))})}else{let i=document.createElement(`style`);e.insertBefore(i,t);for(let e=0;e<r.length;e++)(n=i.sheet)==null||n.insertRule(r[e],e)}}}attachDocumentToIframe(e,t){let n=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,r=[],i=new Set,a=(e,a)=>{e.nodeName===`DIALOG`&&i.add(e),this.collectIframeAndAttachDocument(r,e);let o=n.getMeta(e);if(o?.type===cb.Element&&o?.tagName.toUpperCase()===`HTML`){let{documentElement:e,head:n}=t.contentDocument;this.insertStyleRules(e,n)}if(!this.usingVirtualDom)for(let t of this.config.plugins||[])t.onBuild&&t.onBuild(e,{id:a,replayer:this})};sg(e.node,{doc:t.contentDocument,mirror:n,hackCss:!0,skipChild:!1,afterAppend:a,cache:this.cache}),a(t.contentDocument,e.node.id);for(let{mutationInQueue:e,builtNode:t}of r)this.attachDocumentToIframe(e,t),this.newDocumentQueue=this.newDocumentQueue.filter(t=>t!==e);i.forEach(e=>Xx(e))}collectIframeAndAttachDocument(e,t){if(Gy(t,this.mirror)){let n=this.newDocumentQueue.find(e=>e.parentId===this.mirror.getId(t));n&&e.push({mutationInQueue:n,builtNode:t})}}waitForStylesheetLoad(){let e=this.iframe.contentDocument?.head;if(e){let t=new Set,n,r=this.service.state,i=()=>{r=this.service.state};this.emitter.on(sb.Start,i),this.emitter.on(sb.Pause,i);let a=()=>{this.emitter.off(sb.Start,i),this.emitter.off(sb.Pause,i)};e.querySelectorAll(`link[rel="stylesheet"]`).forEach(e=>{e.sheet||(t.add(e),e.addEventListener(`load`,()=>{t.delete(e),t.size===0&&n!==-1&&(r.matches(`playing`)&&this.play(this.getCurrentTime()),this.emitter.emit(sb.LoadStylesheetEnd),n&&clearTimeout(n),a())}))}),t.size>0&&(this.service.send({type:`PAUSE`}),this.emitter.emit(sb.LoadStylesheetStart),n=setTimeout(()=>{r.matches(`playing`)&&this.play(this.getCurrentTime()),n=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){let e=[];for(let t of this.service.state.context.events)t.type===Q.IncrementalSnapshot&&t.data.source===$.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),(`commands`in t.data?t.data.commands:[t.data]).forEach(e=>{this.preloadImages(e,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property===`drawImage`&&typeof e.args[0]==`string`&&!this.imageMap.has(t)){let e=document.createElement(`canvas`),t=e.getContext(`2d`),n=t?.createImageData(e.width,e.height);t?.putImageData(n,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){let n={isUnchanged:!0};if(`commands`in e){let r=await Promise.all(e.commands.map(async e=>{let t=await Promise.all(e.args.map(Hx(this.imageMap,null,n)));return{...e,args:t}}));n.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,commands:r})}else{let r=await Promise.all(e.args.map(Hx(this.imageMap,null,n)));n.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,args:r})}}}applyIncremental(e,t){var n,r;let{data:i}=e;switch(i.source){case $.Mutation:try{this.applyMutation(i,t)}catch(e){this.warn(`Exception in mutation ${e.message||e}`,i)}break;case $.Drag:case $.TouchMove:case $.MouseMove:if(t){let e=i.positions[i.positions.length-1];this.mousePos={x:e.x,y:e.y,id:e.id,debugData:i}}else i.positions.forEach(n=>{let r={doAction:()=>{this.moveAndHover(n.x,n.y,n.id,t,i)},delay:n.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(r)}),this.timer.addAction({doAction(){},delay:e.delay-i.positions[0]?.timeOffset});break;case $.MouseInteraction:{if(i.id===-1)break;let e=new Event(hp(rb[i.type])),n=this.mirror.getNode(i.id);if(!n)return this.debugNodeNotFound(i,i.id);this.emitter.emit(sb.MouseInteraction,{type:i.type,target:n});let{triggerFocus:r}=this.config;switch(i.type){case rb.Blur:`blur`in n&&n.blur();break;case rb.Focus:r&&n.focus&&n.focus({preventScroll:!0});break;case rb.Click:case rb.TouchStart:case rb.TouchEnd:case rb.MouseDown:case rb.MouseUp:t?(i.type===rb.TouchStart?this.touchActive=!0:i.type===rb.TouchEnd&&(this.touchActive=!1),i.type===rb.MouseDown?this.lastMouseDownEvent=[n,e]:i.type===rb.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:i.x||0,y:i.y||0,id:i.id,debugData:i}):(i.type===rb.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(i.x||0,i.y||0,i.id,t,i),i.type===rb.Click?(this.mouse.classList.remove(`active`),this.mouse.offsetWidth,this.mouse.classList.add(`active`)):i.type===rb.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add(`touch-active`)):i.type===rb.TouchEnd?this.mouse.classList.remove(`touch-active`):n.dispatchEvent(e));break;case rb.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove(`touch-active`);break;default:n.dispatchEvent(e)}break}case $.Scroll:if(i.id===-1)break;if(this.usingVirtualDom){let e=this.virtualDom.mirror.getNode(i.id);if(!e)return this.debugNodeNotFound(i,i.id);e.scrollData=i;break}this.applyScroll(i,t);break;case $.ViewportResize:this.emitter.emit(sb.Resize,{width:i.width,height:i.height});break;case $.Input:if(i.id===-1)break;if(this.usingVirtualDom){let e=this.virtualDom.mirror.getNode(i.id);if(!e)return this.debugNodeNotFound(i,i.id);e.inputData=i;break}this.applyInput(i);break;case $.MediaInteraction:{let t=this.usingVirtualDom?this.virtualDom.mirror.getNode(i.id):this.mirror.getNode(i.id);if(!t)return this.debugNodeNotFound(i,i.id);let n=t,{events:r}=this.service.state.context;this.mediaManager.mediaMutation({target:n,timeOffset:e.timestamp-r[0].timestamp,mutation:i});break}case $.StyleSheetRule:case $.StyleDeclaration:this.usingVirtualDom?i.styleId?this.constructedStyleMutations.push(i):i.id&&((n=this.virtualDom.mirror.getNode(i.id))==null||n.rules.push(i)):this.applyStyleSheetMutation(i);break;case $.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let t=this.virtualDom.mirror.getNode(i.id);if(!t)return this.debugNodeNotFound(i,i.id);t.canvasMutations.push({event:e,mutation:i})}else{let t=this.mirror.getNode(i.id);if(!t)return this.debugNodeNotFound(i,i.id);Jx({event:e,mutation:i,target:t,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case $.Font:try{let e=new FontFace(i.family,i.buffer?new Uint8Array(JSON.parse(i.fontSource)):i.fontSource,i.descriptors);(r=this.iframe.contentDocument)==null||r.fonts.add(e)}catch(e){this.warn(e)}break;case $.Selection:if(t){this.lastSelectionData=i;break}this.applySelection(i);break;case $.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(i):this.applyAdoptedStyleSheet(i)}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,Jv(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(let e in this.legacy_missingNodeRetryMap)try{let t=this.legacy_missingNodeRetryMap[e],n=qv(t.node,this.virtualDom,this.mirror);n&&(t.node=n)}catch(e){this.warn(e)}let n=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(t=>n.getNode(t.id)?!0:(this.warnNodeNotFound(e,t.id),!1)),e.removes.forEach(t=>{let r=n.getNode(t.id);if(!r)return;let i=n.getNode(t.parentId);if(!i)return this.warnNodeNotFound(e,t.parentId);if(t.isShadow&&Jy(i)&&(i=i.shadowRoot),n.removeNodeFromMap(r),i)try{i.removeChild(r),this.usingVirtualDom&&r.nodeName===`#text`&&i.nodeName===`STYLE`&&i.rules?.length>0&&(i.rules=[])}catch(t){if(t instanceof DOMException)this.warn(`parent could not remove child in mutation`,i,r,e);else throw t}});let r={...this.legacy_missingNodeRetryMap},i=[],a=e=>{let t=null;return e.nextId&&(t=n.getNode(e.nextId)),e.nextId!==null&&e.nextId!==void 0&&e.nextId!==-1&&!t},o=e=>{if(!this.iframe.contentDocument)return this.warn(`Looks like your replayer has been destroyed.`);let t=n.getNode(e.parentId);if(!t)return e.node.type===cb.Document?this.newDocumentQueue.push(e):i.push(e);e.node.isShadow&&(Jy(t)||t.attachShadow({mode:`open`}),t=t.shadowRoot);let o=null,s=null;if(e.previousId&&(o=n.getNode(e.previousId)),e.nextId&&(s=n.getNode(e.nextId)),a(e))return i.push(e);if(e.node.rootId&&!n.getNode(e.node.rootId))return;let c=e.node.rootId?n.getNode(e.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Gy(t,n)){this.attachDocumentToIframe(e,t);return}let l=(e,t)=>{if(!this.usingVirtualDom){Xx(e);for(let n of this.config.plugins||[])n.onBuild&&n.onBuild(e,{id:t,replayer:this})}},u=sg(e.node,{doc:c,mirror:n,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:l});if(e.previousId===-1||e.nextId===-1){r[e.node.id]={node:u,mutation:e};return}let d=n.getMeta(t);if(d&&d.type===cb.Element&&e.node.type===cb.Text){let e=Array.isArray(t.childNodes)?t.childNodes:Array.from(t.childNodes);if(d.tagName===`textarea`)for(let n of e)n.nodeType===t.TEXT_NODE&&t.removeChild(n);else if(d.tagName===`style`&&e.length===1)for(let r of e)r.nodeType===t.TEXT_NODE&&!n.hasNode(r)&&(u.textContent=r.textContent,t.removeChild(r))}else if(d?.type===cb.Document){let n=t;e.node.type===cb.DocumentType&&n.childNodes[0]?.nodeType===Node.DOCUMENT_TYPE_NODE&&n.removeChild(n.childNodes[0]),u.nodeName===`HTML`&&n.documentElement&&n.removeChild(n.documentElement)}if(o&&o.nextSibling&&o.nextSibling.parentNode?t.insertBefore(u,o.nextSibling):s&&s.parentNode?t.contains(s)?t.insertBefore(u,s):t.insertBefore(u,null):t.appendChild(u),l(u,e.node.id),this.usingVirtualDom&&u.nodeName===`#text`&&t.nodeName===`STYLE`&&t.rules?.length>0&&(t.rules=[]),Gy(u,this.mirror)){let e=this.mirror.getId(u),t=this.newDocumentQueue.find(t=>t.parentId===e);t&&(this.attachDocumentToIframe(t,u),this.newDocumentQueue=this.newDocumentQueue.filter(e=>e!==t))}(e.previousId||e.nextId)&&this.legacy_resolveMissingNode(r,t,u,e)};e.adds.forEach(e=>{o(e)});let s=Date.now();for(;i.length;){let e=Uy(i);if(i.length=0,Date.now()-s>500){this.warn(`Timeout in the loop, please check the resolve tree data:`,e);break}for(let t of e)n.getNode(t.value.parentId)?Wy(t,e=>{o(e)}):this.debug(`Drop resolve tree since there is no parent for the root node.`,t)}Object.keys(r).length&&Object.assign(this.legacy_missingNodeRetryMap,r),Zy(e.texts).forEach(t=>{let r=n.getNode(t.id);if(!r)return e.removes.find(e=>e.id===t.id)?void 0:this.warnNodeNotFound(e,t.id);let i=r.parentElement;if(r.textContent=t.value&&i&&i.tagName===`STYLE`?Zh(t.value,this.cache):t.value,this.usingVirtualDom){let e=r.parentNode;e?.rules?.length>0&&(e.rules=[])}}),e.attributes.forEach(t=>{let r=n.getNode(t.id);if(!r)return e.removes.find(e=>e.id===t.id)?void 0:this.warnNodeNotFound(e,t.id);for(let e in t.attributes)if(typeof e==`string`){let i=t.attributes[e];if(i===null)r.removeAttribute(e),e===`open`&&Zx(r,t);else if(typeof i==`string`)try{if(e===`_cssText`&&(r.nodeName===`LINK`||r.nodeName===`STYLE`))try{let e=n.getMeta(r),i=sg({...e,attributes:{...e.attributes,...t.attributes}},{doc:r.ownerDocument,mirror:n,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(e.attributes,t.attributes);let a=r.nextSibling,o=r.parentNode;if(i&&o){o.removeChild(r),o.insertBefore(i,a),n.replace(t.id,i);break}}catch{}if(e===`value`&&r.nodeName===`TEXTAREA`){let e=r;e.childNodes.forEach(t=>e.removeChild(t));let t=r.ownerDocument?.createTextNode(i);t&&e.appendChild(t)}else r.setAttribute(e,i);e===`rr_open_mode`&&r.nodeName===`DIALOG`&&Xx(r,t)}catch(e){this.warn(`An error occurred may due to the checkout feature.`,e)}else if(e===`style`){let e=i,t=r;for(let n in e)if(e[n]===!1)t.style.removeProperty(n);else if(e[n]instanceof Array){let r=e[n];t.style.setProperty(n,r[0],r[1])}else{let r=e[n];t.style.setProperty(n,r)}}}})}applyScroll(e,t){var n,r;let i=this.mirror.getNode(e.id);if(!i)return this.debugNodeNotFound(e,e.id);let a=this.mirror.getMeta(i);if(i===this.iframe.contentDocument)(n=this.iframe.contentWindow)==null||n.scrollTo({top:e.y,left:e.x,behavior:t?`auto`:`smooth`});else if(a?.type===cb.Document)(r=i.defaultView)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?`auto`:`smooth`});else try{i.scrollTo({top:e.y,left:e.x,behavior:t?`auto`:`smooth`})}catch{}}applyInput(e){let t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch{}}applySelection(e){try{let t=new Set,n=e.ranges.map(({start:e,startOffset:n,end:r,endOffset:i})=>{let a=this.mirror.getNode(e),o=this.mirror.getNode(r);if(!a||!o)return;let s=new Range;s.setStart(a,n),s.setEnd(o,i);let c=a.ownerDocument?.getSelection();return c&&t.add(c),{range:s,selection:c}});t.forEach(e=>e.removeAllRanges()),n.forEach(e=>e&&e.selection?.addRange(e.range))}catch{}}applyStyleSheetMutation(e){let t=null;e.styleId?t=this.styleMirror.getStyle(e.styleId):e.id&&(t=this.mirror.getNode(e.id)?.sheet||null),t&&(e.source===$.StyleSheetRule?this.applyStyleSheetRule(e,t):e.source===$.StyleDeclaration&&this.applyStyleDeclaration(e,t))}applyStyleSheetRule(e,t){var n,r,i,a;if((n=e.adds)==null||n.forEach(({rule:e,index:n})=>{try{if(Array.isArray(n)){let{positions:r,index:i}=Xy(n);Yy(t.cssRules,r)?.insertRule(e,i)}else{let r=n===void 0?void 0:Math.min(n,t.cssRules.length);t?.insertRule(e,r)}}catch{}}),(r=e.removes)==null||r.forEach(({index:e})=>{try{if(Array.isArray(e)){let{positions:n,index:r}=Xy(e);Yy(t.cssRules,n)?.deleteRule(r||0)}else t?.deleteRule(e)}catch{}}),typeof e.replace==`string`)try{(i=t.replace)==null||i.call(t,e.replace)}catch{}if(typeof e.replaceSync==`string`)try{(a=t.replaceSync)==null||a.call(t,e.replaceSync)}catch{}}applyStyleDeclaration(e,t){if(e.set){let n=Yy(t.rules,e.index);n?.style&&n.style.setProperty(e.set.property,e.set.value,e.set.priority)}if(e.remove){let n=Yy(t.rules,e.index);n?.style&&n.style.removeProperty(e.remove.property)}}applyAdoptedStyleSheet(e){var t;let n=this.mirror.getNode(e.id);if(!n)return;(t=e.styles)==null||t.forEach(e=>{let t=null,r=null;if(Jy(n)?r=n.ownerDocument?.defaultView||null:n.nodeName===`#document`&&(r=n.defaultView),r)try{t=new r.CSSStyleSheet,this.styleMirror.add(t,e.styleId),this.applyStyleSheetRule({source:$.StyleSheetRule,adds:e.rules},t)}catch{}});let r=0,i=(e,t)=>{let n=t.map(e=>this.styleMirror.getStyle(e)).filter(e=>e!==null);Jy(e)?e.shadowRoot.adoptedStyleSheets=n:e.nodeName===`#document`&&(e.adoptedStyleSheets=n),n.length!==t.length&&r<10&&(setTimeout(()=>i(e,t),0+100*r),r++)};i(n,e.styleIds)}legacy_resolveMissingNode(e,t,n,r){let{previousId:i,nextId:a}=r,o=i&&e[i],s=a&&e[a];if(o){let{node:r,mutation:i}=o;t.insertBefore(r,n),delete e[i.node.id],delete this.legacy_missingNodeRetryMap[i.node.id],(i.previousId||i.nextId)&&this.legacy_resolveMissingNode(e,t,r,i)}if(s){let{node:r,mutation:i}=s;t.insertBefore(r,n.nextSibling),delete e[i.node.id],delete this.legacy_missingNodeRetryMap[i.node.id],(i.previousId||i.nextId)&&this.legacy_resolveMissingNode(e,t,r,i)}}moveAndHover(e,t,n,r,i){let a=this.mirror.getNode(n);if(!a)return this.debugNodeNotFound(i,n);let o=qy(a,this.iframe),s=e*o.absoluteScale+o.x,c=t*o.absoluteScale+o.y;this.mouse.style.left=`${s}px`,this.mouse.style.top=`${c}px`,r||this.drawMouseTail({x:s,y:c}),this.hoverElements(a)}drawMouseTail(e){if(!this.mouseTail)return;let{lineCap:t,lineWidth:n,strokeStyle:r,duration:i}=this.config.mouseTail===!0?tS:Object.assign({},tS,this.config.mouseTail),a=()=>{if(!this.mouseTail)return;let e=this.mouseTail.getContext(`2d`);e&&this.tailPositions.length&&(e.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),e.beginPath(),e.lineWidth=n,e.lineCap=t,e.strokeStyle=r,e.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(t=>e.lineTo(t.x,t.y)),e.stroke())};this.tailPositions.push(e),a(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(t=>t!==e),a()},i/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(`.\\:hover`).forEach(e=>{e.classList.remove(`:hover`)}),this.lastHoveredRootNode=e.getRootNode();let n=e;for(;n;)n.classList&&n.classList.add(`:hover`),n=n.parentElement}isUserInteraction(e){return e.type===Q.IncrementalSnapshot&&e.data.source>$.Mutation&&e.data.source<=$.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches(`normal`)&&(this.speedService.send({type:`BACK_TO_NORMAL`}),this.emitter.emit(sb.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn(`Has error on canvas update`,t,`canvas mutation:`,e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(eS,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(eS,...e)}},{addCustomEvent:iS}=vx,{freezePage:aS}=vx,{takeFullSnapshot:oS}=vx;function sS(e){let t=e[0]?.timestamp??0,n=e=>(e-t)/1e3,r={shapes:[],loads:[],pointer:[],away:[],clicks:[],changes:[],acted:[],dialogs:[]},i=``;for(let t of e){if(t.type===Q.Custom){let{tag:e,payload:a}=t.data;e===`dialog`&&r.dialogs.push({from:n(t.timestamp),until:1/0,host:i,...a});let o=r.dialogs.at(-1);e===`dialog answered`&&o?.until===1/0&&Object.assign(o,{until:n(t.timestamp),yes:a.yes,...a.value!==void 0&&{value:a.value}})}if(t.type===Q.Meta){r.loads.push(n(t.timestamp)),i=URL.parse(t.data.href)?.host??i;let{width:e,height:a}=t.data,o=r.shapes.at(-1);o&&o.width===e&&o.height===a||r.shapes.push({from:o?n(t.timestamp):0,width:e,height:a,touch:!1})}if(t.type!==Q.IncrementalSnapshot)continue;let e=t.data;if(e.source===$.MouseMove)for(let i of e.positions)r.pointer.push([n(t.timestamp+i.timeOffset),i.x,i.y]);else if(e.source===$.MouseInteraction&&e.x!==void 0&&e.y!==void 0){r.pointer.push([n(t.timestamp),e.x,e.y]),e.type===rb.Click&&r.clicks.push(n(t.timestamp));let i=r.shapes.at(-1);e.type===rb.TouchStart&&i&&(i.touch=!0),e.type===rb.Click&&r.acted.push([n(t.timestamp),e.id])}else e.source===$.Input&&r.acted.push([n(t.timestamp),e.id]);([$.Mutation,$.Scroll,$.Input].includes(e.source)||e.source===$.MouseInteraction&&e.type===rb.Click)&&r.changes.push(n(t.timestamp)+.01)}return r.shapes.length||r.shapes.push({from:0,width:1280,height:800,touch:!1}),r.pointer.sort((e,t)=>e[0]-t[0]),r.away=mS(r),r}var cS=(e,t)=>e.findLast(e=>e.from<=t)??e[0];function lS(e,t){let n=e[0]?.timestamp??0,r=new Set,i=(e,n)=>{let a=n||e.id===t;a?r.add(e.id):r.delete(e.id);for(let t of e.childNodes??[])i(t,a)},a=[];for(let t of e){if(t.type===Q.FullSnapshot&&i(t.data.node,!1),t.type!==Q.IncrementalSnapshot||t.data.source!==$.Mutation)continue;let{adds:e,removes:o,texts:s,attributes:c}=t.data;for(let t of e)i(t.node,r.has(t.parentId));[...e.map(e=>e.parentId),...o.map(e=>e.parentId),...s.map(e=>e.id),...c.map(e=>e.id)].some(e=>r.has(e))&&a.push((t.timestamp-n)/1e3)}return a}var uS=2,dS=24,fS=.4,pS=1500;function mS({pointer:e,shapes:t}){let n=n=>{let[r,i,a]=e[n],{width:o,height:s}=cS(t,r);return Math.min(i,a,o-1-i,s-1-a)},r=t=>{let[n,r]=[e[t],e[t+1]];return Math.hypot(r[1]-n[1],r[2]-n[2])/Math.max(.016,r[0]-n[0])>pS},i=e=>n(e)<=dS,a=[];for(let t=0;t<e.length;t++){let o=n(t)<=uS,s=t+1<e.length&&e[t+1][0]-e[t][0]>fS&&i(t+1);if(!o&&!s)continue;let c=t;for(;c>0&&(r(c-1)||i(c-1));)c--;let l=s?t+1:t;for(;l+1<e.length&&(r(l)||i(l+1));)l++;let u=[e[c][0],e[l][0]],d=a.at(-1);d&&u[0]<=d[1]?d[1]=Math.max(d[1],u[1]):a.push(u),t=Math.max(t,l)}return a}var hS=class{host=document.createElement(`div`);shapes;loads;pointer;away;clicks;dialogs;#e;#t;#n;#r=-1;#i=-1/0;#a=new WeakSet;#o=new WeakMap;constructor(e,t){let n=e[0]?.timestamp??0;for(let t of e){if(t.type!==Q.IncrementalSnapshot||t.data.source!==$.Mutation)continue;let e=t.data.removes;Object.defineProperty(t.data,"removes",{get:()=>e,set(){},enumerable:!0,configurable:!0})}({shapes:this.shapes,loads:this.loads,pointer:this.pointer,away:this.away,clicks:this.clicks,dialogs:this.dialogs}=sS(e)),this.#n=Math.max(0,(e.find(e=>e.type===Q.FullSnapshot)?.timestamp??n)-n+1),this.host.className=`absolute top-0 left-0 origin-top-left [&_.replayer-mouse]:hidden [&_iframe]:pointer-events-none [&_iframe]:block [&_iframe]:border-0`,this.#t=this.shapes[0],Object.assign(this.host.style,{width:`${this.#t.width}px`,height:`${this.#t.height}px`}),t.append(this.host),this.#e=new rS(e,{root:this.host,mouseTail:!1,triggerFocus:!1,pauseAnimation:!1,showWarning:!1}),this.#s(),this.#e.pause(this.#n)}show(e,t,n){let r=Math.max(Math.round(Math.max(0,e)*1e3),this.#n),i=r!==this.#r;if(i){let e=this.#r<0||r<this.#r||r-this.#r>300;e&&(this.#o=new WeakMap),this.#e.pause(r),this.#r=r,e&&this.#c();let t=this.shapeAt(r/1e3);t!==this.#t&&(this.#t=t,Object.assign(this.host.style,{width:`${t.width}px`,height:`${t.height}px`}))}let a=r-this.#i<150;for(let e of this.#u()){try{a?gS(e):this.#l(e)||(t?(e.playbackRate!==n&&(e.playbackRate=n),e.playState===`paused`&&e.play()):i||!this.#a.has(e)||Number(e.currentTime)<20?gS(e):e.playState===`running`&&e.pause())}catch{}this.#a.add(e)}}rest(){this.#c();for(let e of this.#u())gS(e)}shapeAt(e){return cS(this.shapes,e)}pointerAt(e,t=0){let n=this.pointer;if(!n.length||e<0||this.away.some(([t,n])=>e>=t&&e<=n))return;let r=0,i=n.length-1;for(;r<i;){let t=r+i+1>>1;n[t][0]<=e?r=t:i=t-1}let[a,o]=[n[r],n[r+1]];if(a[0]<t)return o&&[o[1],o[2]];if(!o||e<=a[0]||o[0]-a[0]>.25)return[a[1],a[2]];let s=(e-a[0])/(o[0]-a[0]);return[a[1]+(o[1]-a[1])*s,a[2]+(o[2]-a[2])*s]}boxOf(e){let t=this.#e.getMirror().getNode(e)?.getBoundingClientRect?.();return t&&(t.width||t.height)?{left:t.left,top:t.top,width:t.width,height:t.height}:void 0}outwards(e,t){let n=this.#e.iframe.contentDocument,r=this.#e.getMirror(),i=[...n?.querySelectorAll(`[inert]`)??[]];for(let e of i)e.removeAttribute(`inert`);let a=[];for(let i=n?.elementFromPoint(e,t)??null;i&&i!==n?.body;i=i.parentElement)a.push(r.getId(i));for(let e of i)e.setAttribute(`inert`,``);return a}destroy(){this.#e.destroy(),this.host.remove()}#s(){let e=this.#e.iframe.contentWindow?.HTMLDialogElement.prototype;if(!e)return;let t=e.showModal;e.showModal=function(){this.inert=!0,t.call(this)}}#c(){this.#i=this.#r;let e=performance.now()+400,t=()=>{if(!(this.#r-this.#i>=150)){for(let e of this.#u())e.playState!==`finished`&&gS(e);performance.now()<e&&requestAnimationFrame(t)}};requestAnimationFrame(t)}#l(e){if(this.#a.has(e)||!(`animationName`in e))return!1;let t=e.effect,n=t?.target;if(!n||t.getTiming().iterations===1/0)return!1;let r=String(e.animationName),i=this.#o.get(n)??new Map;this.#o.set(n,i);let a=i.get(r);if(a===void 0)return i.set(r,this.#r),!1;let o=Number(t.getComputedTiming().endTime);return this.#r-a>=o?gS(e):e.currentTime=this.#r-a,!0}#u(){try{return this.#e.iframe.contentDocument?.getAnimations()??[]}catch{return[]}}};function gS(e){try{e.finish()}catch{}}function _S({shot:e}){let{src:t,frame:n}=e,[r,i]=(0,l.useState)();if(r===t)return null;let a=()=>i(t);return n?(0,J.jsx)(`img`,{src:t,alt:``,draggable:!1,onError:a,className:`pointer-events-none absolute max-w-none`,style:{width:`${100/n.width}%`,height:`${100/n.height}%`,left:`${-n.x/n.width*100}%`,top:`${-n.y/n.height*100}%`}}):(0,J.jsx)(`img`,{src:t,alt:``,draggable:!1,className:`pointer-events-none absolute inset-0 size-full object-contain`,onError:a})}function vS(e,t,n){let r=b(e.id,t.number,n.recording,Math.max(0,n.steps.length-2)),[i,a]=(0,l.useState)();return(0,l.useEffect)(()=>{let i=!0,o=n.steps.at(-1);return n.steps.length>1&&o&&h(e.id,t.number,n.recording).then(e=>{let{shapes:t,clicks:n,pointer:s}=sS(e),c=n.find(e=>e>=o.at),{width:l,height:u}=cS(t,c??o.at),d=c===void 0?void 0:s.findLast(([e])=>e<=c+.01)?.slice(1);i&&d&&Math.abs(l/u-1.6)<.05&&a({src:r,frame:{x:ju(d[0]/l-.2,0,.6),y:ju(d[1]/u-.2,0,.6),width:.4,height:.4}})}),()=>void(i=!1)},[e.id,t.number,n,r]),i?.src===r?i:{src:r}}var yS=()=>matchMedia(`(max-width: 820px)`).matches;function bS(e,t){let[n,r]=(0,l.useState)(()=>new Map),i=t.flatMap(e=>e.flows.map(t=>({round:e.number,flow:t}))),a=i.map(({round:e,flow:t})=>`${e}/${t.name}/${t.recording}`).join(`
|
|
192
|
+
`);return(0,l.useEffect)(()=>{let t=!0;for(let{round:n,flow:a}of i)Promise.all([v(e.id,n,a.recording),y(e.id,n,a.recording)]).then(([e,i])=>{let o=[...e,...i].sort((e,t)=>e.at-t.at);t&&r(t=>t.has(`${n}/${a.recording}`)?t:new Map(t).set(`${n}/${a.recording}`,{readings:e,seen:o}))});return()=>void(t=!1)},[e.id,a]),((e,t,r)=>{let a=i.find(n=>n.round===e&&n.flow.name===t)?.flow,o=a&&n.get(`${e}/${a.recording}`);return r?o?.seen:o?.readings})}var xS=new WeakMap;function SS(e,t,n){let r=xS.get(e);if(!r){r=new Map;for(let t of e)for(let e of t.things)e.node!==void 0&&(r.get(e.node)??r.set(e.node,[]).get(e.node)).push({at:t.at,thing:e});xS.set(e,r)}return r.get(t)?.reduce((e,t)=>Math.abs(t.at-n)<Math.abs(e.at-n)?t:e).thing}var CS=/^(dialog|alertdialog|group|radiogroup|table|grid|treegrid|listbox|menu)$/,wS=e=>e.role===`text`||e.role===`box`;function TS(e,t,n){let r,i=e=>CS.test(e.role)||t.some(t=>t.things.includes(e)&&P(t,e));for(let a of e){let e=SS(t,a,n);if(e?.name){if(!wS(e))return r&&i(e)?r:e;r??=e}}return r}function ES(e,t,n,r,i,a){let o=(e,t)=>Math.abs(e.left-t.left)<=2&&Math.abs(e.top-t.top)<=2&&Math.abs(e.width-t.width)<=2&&Math.abs(e.height-t.height)<=2,s=[],c=i(r.node);for(let l of e.slice(e.indexOf(r.node)+1)){let e=SS(t,l,n),r=e?.name?i(l):void 0;if(!(!e||!r||c&&o(r,c))){if(r.width*r.height>.9*a.width*a.height)break;s.push(e),c=r}}return s}function DS(e,t,n){let r=e.reduce((e,n)=>!e||Math.abs(n.at-t)<Math.abs(e.at-t)?n:e,void 0);if(!r)return;let i=n.x*r.screen.width,a=n.y*r.screen.height,o=e=>i>=e.box.x&&i<=e.box.x+e.box.width&&a>=e.box.y&&a<=e.box.y+e.box.height,s=e=>e.box.width*e.box.height,c=r.things.filter(e=>(e.role===`box`||CS.test(e.role)&&!/^(table|grid|treegrid)$/.test(e.role))&&o(e)).sort((e,t)=>s(e)-s(t))[0],l=e=>{for(let t=e.holder;t!==void 0;t=r.things[t]?.holder)if(r.things[t]===c)return!0;return!1},u=e=>Math.hypot(Math.max(e.box.x-i,0,i-e.box.x-e.box.width),Math.max(e.box.y-a,0,a-e.box.y-e.box.height));return r.things.filter(e=>e.name&&e.role!==`box`&&!CS.test(e.role)&&(!c||l(e))&&u(e)<=80).sort((e,t)=>u(e)-u(t)||s(e)-s(t))[0]}function OS(e,t,n){if(!e)return`New note`;if(e.at===void 0)return`The whole flow`;let r=t(n,e.flow,!0);if(e.element)return kS(e.element,r,e.at);let i=e.point&&r&&DS(r,e.at,e.point);return i?`Near ${A(i)}`:`This moment`}var kS=(e,t,n)=>A(e.node!==void 0&&t&&SS(t,e.node,n)||{...e,words:e.name});function AS(e,t,n,r,i,a){return i.number===r?n:i.replies.find(e=>e.note===t)?.on??PS(e,n,r,i,a)}var jS=1;function MS(e,t,n=[]){let r=e.replies.find(e=>e.note===t),i=r?.watch?e.flows.find(e=>e.name===r.on?.flow):void 0,a=i?.steps.findIndex(e=>e.title===r.watch)??-1;if(!i||a<0)return;let o=i.steps[a],s=i.steps[a+1]?.at??i.length,c=Math.min(r.on?.at??s,s),l=o.actions?.filter(e=>e<=c)??[],u=l.find((e,t)=>n.some(n=>n>e&&n<=(l[t+1]??c)))??l.at(-1)??o.at;return{flow:i.name,at:Math.max(0,Math.round((u-jS)*100)/100),until:s}}var NS=new Map;function PS(e,t,n,r,i){let a=e.rounds.find(e=>e.number===n)?.flows.find(e=>e.name===t.flow),o=r.flows.find(e=>e.name===t.flow),s=i(n,t.flow),c=i(r.number,t.flow);if(!a||!o||!s||!c)return;let l=JSON.stringify([e.id,n,r.number,t]);return NS.has(l)||NS.set(l,Ml(t,{flow:a,readings:s},{flow:o,readings:c})),NS.get(l)}function FS(e,t){let n=Math.min(e.width/t.width,e.height/t.height);return{k:n,x:-(e.width-t.width*n)/2/n,y:0,fit:n}}function IS(e,t,n,r=1){let i=Math.min(e.width/t.width,e.height/t.height);r=Math.max(i,r);let a=(e,t,n,r)=>t>=n?r?-(t-n)/2:0:ju(e-t/2,0,n-t);return{k:r,x:a(n[0],e.width/r,t.width,!0),y:a(n[1],e.height/r,t.height,!1),fit:i}}var LS=(e,t)=>[e.x+t.width/2/e.k,e.y+t.height/2/e.k];function RS(e,t,n){let r=[0,0],i=0;for(let a=-.3;a<=.9;a+=.1){let o=e.pointerAt(ju(t+a,0,n));o&&(r=[r[0]+o[0],r[1]+o[1]],i++)}return i?[r[0]/i,r[1]/i]:[e.shapeAt(t).width/2,0]}function zS(e,t,n,r){let i=t.width/r,a=t.height/r;return[ju(e[0],i/2,Math.max(i/2,n.width-i/2)),ju(e[1],a/2,Math.max(a/2,n.height-a/2))]}function BS(e,t,n,r){let i=Mu(ju(n)),a=e.k*(t.k/e.k)**+i,[o,s]=LS(e,r),[c,l]=LS(t,r),u=[o+(c-o)*i,s+(l-s)*i];return{k:a,x:u[0]-r.width/2/a,y:u[1]-r.height/2/a,fit:t.fit}}var VS=(e,t)=>e.left<=t.left+1&&e.top<=t.top+1&&e.right>=t.right-1&&e.bottom>=t.bottom-1,HS=26,US=1.5;function WS(e){let t=(0,l.useRef)(e);t.current=e;let n=(0,l.useRef)(null),r=(0,l.useRef)(new Map),i=(0,l.useRef)(new Map),a=(0,l.useRef)(null),o=(0,l.useRef)(new Map),s=(0,l.useRef)(new Map),c=(0,l.useRef)(void 0),u=(0,l.useRef)(new Map),d=(0,l.useRef)(void 0),f=(0,l.useRef)(void 0),p=(0,l.useRef)(!1),[m,g]=(0,l.useState)([]),[_,v]=(0,l.useState)(),[y,b]=(0,l.useState)(),x=(0,l.useRef)(void 0),S=(0,l.useRef)(void 0),C=(0,l.useRef)(new Map),w=(0,l.useRef)(``),T=(0,l.useRef)(new Map),E=(0,l.useRef)(void 0),D=zu(e.playhead,e=>e.playing),{review:O,round:k,earlier:A,zoomed:j}=e,M=A?void 0:e.then,N=A?[A,k]:M?[M,k]:[k];N.some(e=>!m.includes(e.number))&&g([...new Set([...m,...N.map(e=>e.number)])].sort((e,t)=>e-t));let ee=(e,t)=>`${e.number}/${t.name}`,te=(e,t)=>{let n=o.current.get(ee(e,t));return n instanceof hS?n.shapes:s.current.get(ee(e,t))??[uC]},ne=(e,t,n=0)=>cS(te(e,t),n),re=(e,n)=>{let i=o.current.get(ee(e,n));if(i)return i instanceof hS?i:void 0;o.current.set(ee(e,n),`loading`),h(t.current.review.id,e.number,n.recording).then(t=>{o.current.set(ee(e,n),new hS(t,pC(r.current.get(e.number)).stack)),oe()})},ie=(e,t,n)=>{let r=ne(e,t,n),i=te(e,t),a=i.findLast(e=>e.from>0&&e.from<=n);if(a&&n-a.from<.3){let e=cS(i,a.from-.001),t=Mu(ju((n-a.from)/Ou));return{width:e.width+(r.width-e.width)*t,height:e.height+(r.height-e.height)*t}}let o=e.flows[e.flows.indexOf(t)-1],s=Mu(ju((n+Du)/Ou));if(!o||s>=1)return r;let c=ne(e,o);return{width:c.width+(r.width-c.width)*s,height:c.height+(r.height-c.height)*s}},ae=(e,n,r)=>{let{round:i,earlier:a,zoomed:o}=t.current,s=Math.max(160,Math.round(innerHeight*.58));if(!n||a&&o)return s;let c=(a?[a,i]:[i]).map(e=>{let t=e.flows.find(e=>e.name===n.name);return e===i||!t?ie(i,n,r):ne(e,t)}),l=e=>HS+Math.max(...c.map(t=>QS(e,t).height));return a?e>700?l({width:(e-20)/2,height:s-HS}):2*l({width:e,height:(s-12)/2-HS})+12:l({width:e,height:s-HS})},oe=()=>{let{playhead:e,round:o,earlier:s,zoomed:l,peeking:f}=t.current,m=fe.current,h=ju((performance.now()-m.since)/240),g=m.from+(m.to-m.from)*Mu(h);m.now=g,h<1&&requestAnimationFrame(oe);let _=s?void 0:t.current.then,v=n.current;if(!v)return;let{moment:y,playing:b,speed:x,stopped:S}=e.now,C=o.flows.find(e=>e.name===y.flow),w=v.clientWidth,T=yS()?ae(w,C,y.at):v.clientHeight;v.style.height=yS()?`${T}px`:``;let E=C?ie(o,C,y.at):uC,D=e=>{let t=QS({width:e.width,height:e.height-HS},E);return t.width*t.height},O=!s||D({width:(w-20)/2,height:T})>=D({width:w,height:(T-12)/2}),k=O?(w-20)/2:w,A=O?T:(T-12)/2,j=new Map(s?[[s.number,{left:0,top:0,width:k,height:A}],[o.number,{left:O?k+20:0,top:O?0:A+12,width:k,height:A}]]:[[o.number,{left:0,top:0,width:w,height:T}]]);_&&j.set(_.number,j.get(o.number));for(let[e,t]of r.current){t.hidden=!j.has(e);let n=e===_?.number,r=n&&!t.hasAttribute(`data-over`);t.toggleAttribute(`data-over`,n),t.style.transition=r?`none`:``,t.style.opacity=n&&!f?`0`:``,r&&t.offsetWidth,t.style.transition=``}let M=j.get(o.number),N=Math.max(...o.flows.map(e=>QS({width:M.width,height:M.height-HS},ne(o,e)).width));if(a.current&&(a.current.style.left=`${Math.round(M.left+(M.width-N)/2)}px`),!C)return;let ee=d.current&&performance.now()-d.current.started<320?d.current:void 0,te;for(let e of s?[o,s]:_?[o,_]:[o]){let n=r.current.get(e.number),a=j.get(e.number);if(!n)continue;let d=e===o?C:e.flows.find(e=>e.name===C.name),f=d&&d!==C&&{from:re(o,C)?.clicks??[],to:re(e,d)?.clicks??[]},m=!d||d===C?y.at:xl(y.at,C,d,f||void 0),h=d?ie(e,d,m):ie(o,C,y.at),_={width:a.width,height:a.height-HS},v=l&&s?{width:Math.floor(Math.min(_.width,h.width)),height:Math.floor(Math.min(_.height,h.height))}:QS(_,h),w=Math.round(a.left+(a.width-v.width)/2);Object.assign(n.style,{left:`${w}px`,top:`${a.top+HS}px`,width:`${v.width}px`,height:`${v.height}px`});let T=i.current.get(e.number);T&&Object.assign(T.style,{left:`${w}px`,top:`${a.top}px`,width:`${v.width}px`});let E=pC(n),D=d&&re(e,d);for(let e of E.stack.children)e.hidden=e!==D?.host;if(n.toggleAttribute(`data-absent`,!d),!d){E.name.textContent=`Not in ${Id(e.number)}`,E.line.hidden=!0,E.card.style.opacity=`1`,E.card.style.setProperty(`--n`,`1`),E.app.style.filter=``,E.cursor.style.opacity=E.ring.style.opacity=`0`,E.dialog.hidden=!0;continue}let O=ne(e,d,m),k=D?Nu(m):{soft:1,name:1},A=e===o&&g>.002?{soft:Math.max(k?.soft??0,g),name:k?.name??0}:k,M;if(!l||FS(v,O).fit>=.995)M=FS(v,O);else if(te){let[t,n]=LS(te.view,te.box),[r,i]=[te.chosen,D&&ue(e.number,D,O)?.centre];M=IS(v,O,r&&i?[t+i[0]-r[0],n+i[1]-r[1]]:[t,n],te.view.k)}else{let e=c.current?.flow===C.name?c.current:void 0,t=e||!D?void 0:le(D,O,v);M=IS(v,O,e?.centre??t?.centre??(D?RS(D,m,d.length):[O.width/2,0]),e?.k??t?.k??1)}e===o&&(te={view:M,box:v,chosen:D&&ue(o.number,D,O)?.centre},de({fit:M.fit,k:M.k}));let N=ee?.from.get(e.number);ee&&N&&N.width===v.width&&N.height===v.height&&(M=BS(N,M,(performance.now()-ee.started)/320,v)),u.current.set(e.number,{...M,...v,page:O});let ae=`translate(${(-M.x*M.k).toFixed(2)}px,${(-M.y*M.k).toFixed(2)}px)`;D&&(D.host.style.transform=`${ae} scale(${M.k.toFixed(5)})`,D.show(m<0?t.current.read(e.number,d.name)?.[0]?.at??m:m,b,x),S&&p.current&&D.rest()),Object.assign(E.marks.style,{transform:ae,width:`${O.width*M.k}px`,height:`${O.height*M.k}px`});let oe=n.querySelector(`[data-live] iframe`);oe&&Object.assign(oe.style,lC(M,O)),se(E.marks,D,O,M,v,m,b,e===o),E.name.textContent=d.fork??d.name;let ce=gf(t.current.review)&&!d.fork?_f(d):``;E.as.textContent!==ce&&(E.as.textContent=ce),E.as.hidden=!ce;let fe=e===o?d.line??``:``,[pe,me]=E.line.children;E.line.hidden=!fe,me.textContent!==fe&&([pe.textContent,me.textContent]=[e.by,fe]),E.card.style.opacity=A?`1`:`0`,E.card.style.setProperty(`--k`,(A?.soft??0).toFixed(3)),E.card.style.setProperty(`--n`,(A?.name??0).toFixed(3)),E.app.style.filter=A&&A.soft>.002?`blur(${(A.soft*6).toFixed(2)}px)`:``;let P=D?.shapeAt(m),he=D?.pointerAt(m,P?.touch?P.from:0),F=he&&[(he[0]-M.x)*M.k,(he[1]-M.y)*M.k];E.cursor.toggleAttribute(`data-touch`,!!P?.touch);let I=e===o&&Se.current;I||(E.cursor.style.opacity=F?String(1-(A?.soft??0)):`0`),F&&!I&&(E.cursor.style.transform=`translate(${F[0]-3}px,${F[1]-2}px)`);let L=E.cursor.querySelector(`[data-tag]`);if(!I&&!Te.current){let e=hf(d,m,D?.loads)??``,t=L.querySelector(`[data-words]`);t.textContent!==e&&eC(L,t,e,!1,b&&!!t.textContent&&!!e&&!L.hidden),L.hidden=!e}let R=D&&F&&!A?D.clicks.find(e=>m>=e&&m<e+.5):void 0;if(R!==void 0&&F){let e=(m-R)/.5;Object.assign(E.ring.style,{opacity:String(1-e),transform:`translate(${F[0]}px,${F[1]}px) scale(${.4+e*1.1})`})}else E.ring.style.opacity=`0`;let ge=D&&(A?.soft??0)<.5?D.dialogs.find(e=>m>=e.from&&m<e.until):void 0;if(E.dialog.hidden=!ge,ge){let e=Math.min(dC,O.width-16);Object.assign(E.dialog.style,{width:`${e}px`,transform:`translate(${(((O.width-e)/2-M.x)*M.k).toFixed(2)}px,${((8-M.y)*M.k).toFixed(2)}px) scale(${M.k.toFixed(5)})`});let[t,n,r,i,a]=[`where`,`says`,`typed`,`no`,`yes`].map(e=>E.dialog.querySelector(`[data-${e}]`));E.dialog.dataset.from!==String(ge.from)&&(E.dialog.dataset.from=String(ge.from),t.textContent=`${ge.host||`This page`} says`,n.textContent=ge.message,r.textContent=ge.value??``,r.hidden=ge.type!==`prompt`,i.hidden=ge.type===`alert`);let o=ge.yes!==void 0&&m>ge.until-.25;a.toggleAttribute(`data-pressed`,o&&(ge.yes||ge.type===`alert`)),i.toggleAttribute(`data-pressed`,o&&!ge.yes&&ge.type!==`alert`)}}p.current=b,ee&&!b&&requestAnimationFrame(oe)},se=(e,n,r,i,a,o,s,c)=>{let l=[],u=new Map;for(let t of e.querySelectorAll(`[data-mark-id]`)){let{node:e,from:i,until:a,paused:d,markId:f}=t.dataset,p=t.dataset.box?.split(` `).map(Number),m=e===void 0?p&&{left:p[0]*r.width,top:p[1]*r.height,width:p[2]*r.width,height:p[3]*r.height}:n?.boxOf(Number(e)),h=Math.max(0,m?.left??0),g=Math.max(0,m?.top??0),_=Math.min(r.width,(m?.left??0)+(m?.width??0)),v=Math.min(r.height,(m?.top??0)+(m?.height??0)),y=e===void 0&&!p||_-h>=1&&v-g>=1,b=i===void 0||o>=Number(i)-.05&&o<=Number(a??i)+US;t.hidden=!y||!b||d!==void 0&&s,t.toggleAttribute(`data-playing`,s),c&&e!==void 0&&t.dataset.kind===`note`&&(m?C.current.set(f,o):(!s||Math.abs(o-(C.current.get(f)??-1/0))>.3)&&l.push(f)),m&&!t.hidden&&u.set(t,{left:h,top:g,right:_,bottom:v})}c&&T.current.clear();for(let[e,t]of u){if(e.dataset.answers===void 0)continue;let n=[...u].find(([t])=>t.dataset.kind===`note`&&t.dataset.markId===e.dataset.answers)?.[1],r=T.current.get(e.dataset.markId),i=c?!!n&&(VS(t,n)||VS(n,t)):!!r;c&&i&&T.current.set(e.dataset.markId,{left:t.left-n.left,top:t.top-n.top,right:t.right-n.right,bottom:t.bottom-n.bottom}),!c&&r&&(n?u.set(e,{left:n.left+r.left,top:n.top+r.top,right:n.right+r.right,bottom:n.bottom+r.bottom}):e.hidden=!0),e.toggleAttribute(`data-one`,i&&e.dataset.pointed===void 0)}for(let[e,{left:t,top:n,right:o,bottom:s}]of u){Object.assign(e.style,{left:ZS(t/r.width),top:ZS(n/r.height),width:ZS((o-t)/r.width),height:ZS((s-n)/r.height)});let c=e.querySelector(`[data-pin]`);c&&ce(c,{left:t,top:n,right:o,bottom:s},i,a)}if(!c)return;let d=l.sort().join(` `);d!==w.current&&(w.current=d,t.current.onGone(l))},ce=(e,t,n,r)=>{let i=Math.min(14,r.width-(t.right-n.x)*n.k-11),a=(t.top-n.y)*n.k-14>=11,o=Math.min(14,r.height-(t.bottom-n.y)*n.k-11);Object.assign(e.style,{left:`calc(100% + ${i-9}px)`,top:a?`-23px`:`calc(100% + ${o-9}px)`})},le=(e,n,r)=>{let i=ue(t.current.round.number,e,n);if(!i)return;let a=E.current?.id===i.id?E.current:E.current={id:i.id};return a.k??=Math.min(1,r.width/(i.width+48),r.height/(i.height+48)),{centre:i.centre,k:a.k}},ue=(e,n,r)=>{let i=(t.current.marks.get(e)??[]).filter(e=>e.chosen&&e.kind!==`writing`),a=i.flatMap(({on:e})=>`node`in e?n.boxOf(e.node)??[]:`box`in e?[{left:e.box.x*r.width,top:e.box.y*r.height,width:e.box.width*r.width,height:e.box.height*r.height}]:[]);if(!a.length)return;let o=Math.min(...a.map(e=>e.left)),s=Math.min(...a.map(e=>e.top)),c=Math.max(...a.map(e=>e.left+e.width))-o,l=Math.max(...a.map(e=>e.top+e.height))-s;return{id:i[0].id,width:c,height:l,centre:[o+c/2,s+l/2]}},de=e=>{(f.current?.fit!==e.fit||f.current.k!==e.k)&&(f.current=e,t.current.onShown(e))};(0,l.useLayoutEffect)(oe),(0,l.useEffect)(()=>e.playhead.subscribe(oe),[e.playhead]);let fe=(0,l.useRef)({from:0,to:0,since:0,now:0});(0,l.useEffect)(()=>{let t=+!!e.ending;fe.current.to!==t&&(fe.current={from:fe.current.now,to:t,since:performance.now(),now:fe.current.now},oe())},[e.ending]),(0,l.useEffect)(()=>{let e=new ResizeObserver(()=>oe());return n.current&&e.observe(n.current),()=>e.disconnect()},[]),(0,l.useEffect)(()=>()=>o.current.forEach(e=>e instanceof hS&&e.destroy()),[]),(0,l.useEffect)(()=>{for(let e of N)for(let t of e.flows)s.current.has(ee(e,t))||(s.current.set(ee(e,t),[uC]),h(O.id,e.number,t.recording).then(n=>{s.current.set(ee(e,t),sS(n).shapes),oe()}))});let pe=(0,l.useRef)(j);pe.current!==j&&(pe.current=j,c.current=void 0,d.current=matchMedia(`(prefers-reduced-motion: reduce)`).matches?void 0:{started:performance.now(),from:new Map(u.current)});let me=(e.marks.get(k.number)??[]).find(e=>e.chosen&&e.kind!==`writing`)?.id,P=(0,l.useRef)(me);P.current!==me&&(P.current=me,c.current=void 0,j&&!matchMedia(`(prefers-reduced-motion: reduce)`).matches&&(d.current={started:performance.now(),from:new Map(u.current)}));let he=!!A,F=(0,l.useRef)(he),I=(0,l.useRef)(void 0);F.current!==he&&!I.current&&(I.current=new Map([...r.current].filter(([,e])=>!e.hidden).map(([e,t])=>[e,t.getBoundingClientRect()]))),(0,l.useLayoutEffect)(()=>{if(F.current===he)return;F.current=he;let e=I.current??new Map;I.current=void 0;let t=matchMedia(`(prefers-reduced-motion: reduce)`).matches;for(let r of n.current?.querySelectorAll(`:scope > :not([hidden], [data-over])`)??[]){let n=r.dataset.frame===void 0?void 0:Number(r.dataset.frame),i=n===void 0?void 0:e.get(n)??e.get(k.number),a=r.getBoundingClientRect();if(i&&a.width&&a.height&&!t){let e=`translate(${i.left-a.left}px,${i.top-a.top}px) scale(${i.width/a.width},${i.height/a.height})`;r.animate([{transformOrigin:`0 0`,transform:e},{transformOrigin:`0 0`,transform:`none`}],{duration:320,easing:`cubic-bezier(0.22, 0.8, 0.24, 1)`})}else getComputedStyle(r).opacity!==`0`&&r.animate([{opacity:0},{opacity:1}],{duration:250,easing:`cubic-bezier(0.2, 0.8, 0.2, 1)`})}},[he]);let L=e=>{let n=e instanceof Element?e.closest(`[data-frame]`):null,r=n&&!n.hasAttribute(`data-absent`)?Number(n.dataset.frame):void 0,i=r===void 0?void 0:u.current.get(r);return t.current.zoomed&&i&&i.k>i.fit+.001?r:void 0},R=(e,n)=>{let r=u.current.get(e);if(!r)return;let i=c.current?.centre??LS(r,r);d.current=void 0,c.current={centre:zS(n(i,r.k),r,r.page,r.k),k:r.k,flow:t.current.playhead.now.moment.flow},t.current.playhead.now.playing||oe()},ge=(0,l.useRef)(0);(0,l.useEffect)(()=>{let e=n.current,t=e=>{if(e.altKey&&ye(e.target))return e.preventDefault(),ge.current+=e.deltaY,Math.abs(ge.current)<40&&Math.abs(e.deltaY)<40?void 0:(ve(e,-Math.sign(ge.current)),ge.current=0,b(_e(e)?.node));let t=L(e.target);t!==void 0&&(e.preventDefault(),R(t,(t,n)=>[t[0]+e.deltaX/n,t[1]+e.deltaY/n]))},r=e=>void(e.key===`Alt`&&x.current&&e.preventDefault());return e?.addEventListener(`wheel`,t,{passive:!1}),addEventListener(`keyup`,r),()=>{e?.removeEventListener(`wheel`,t),removeEventListener(`keyup`,r)}},[]);let z=(e,t)=>{let n=r.current.get(t),i=u.current.get(t);if(!n||!i)return;let a=n.getBoundingClientRect();return[ju((e.clientX-a.left)/i.k+i.x,0,i.page.width),ju((e.clientY-a.top)/i.k+i.y,0,i.page.height)]},B=(e,t)=>{let n=z(e,t),r=u.current.get(t)?.page;return n&&r&&{x:n[0]/r.width,y:n[1]/r.height}},V=e=>{let{round:n,playhead:r,read:i}=t.current,{moment:a}=r.now,s=n.flows.find(e=>e.name===a.flow),c=s&&o.current.get(ee(n,s)),l=s&&i(n.number,s.name,!0),u=z(e,n.number);if(!(!(c instanceof hS)||!l||!u||a.at<0))return{replay:c,things:l,at:a.at,outwards:c.outwards(u[0],u[1]),here:`${n.number}/${a.flow}/${a.at}`}},_e=e=>{let t=V(e);if(!t)return;let n=x.current;return n&&n.here===t.here&&t.outwards.includes(n.pick.node)?n.pick:(x.current=void 0,TS(t.outwards,t.things,t.at))},ve=(e,t)=>{let n=V(e),r=n&&TS(n.outwards,n.things,n.at);if(!n||!r)return;let i=ES(n.outwards,n.things,n.at,r,e=>n.replay.boxOf(e),n.replay.shapeAt(n.at)),a=x.current,o=ju((a&&a.here===n.here?i.indexOf(a.pick)+1:0)+t,0,i.length);x.current=o?{here:n.here,pick:i[o-1]}:void 0},ye=e=>{let n=e instanceof Element?e.closest(`[data-frame]`):null,{playhead:r,onPlace:i,writing:a,round:o,live:s}=t.current;return!!n&&Number(n.dataset.frame)===o.number&&!n.hasAttribute(`data-absent`)&&!r.now.playing&&!!i&&!a&&!s?.shown&&!e.closest(`[data-pin]`)},be=(0,l.useRef)(void 0);(0,l.useEffect)(()=>{let e=e=>{be.current={x:e.clientX,y:e.clientY};let n=Se.current&&r.current.get(t.current.round.number)?.getBoundingClientRect();if(!n)return;let i={x:e.clientX-n.left,y:e.clientY-n.top};De(i,i.x>=0&&i.y>=0&&i.x<=n.width&&i.y<=n.height,!1)};return addEventListener(`pointermove`,e,!0),addEventListener(`pointerdown`,e,!0),()=>{removeEventListener(`pointermove`,e,!0),removeEventListener(`pointerdown`,e,!0)}},[]);let xe=!!e.live?.shown&&!!e.live.settled&&!!e.live.address,Se=(0,l.useRef)(!1),Ce=(0,l.useRef)(void 0);(0,l.useLayoutEffect)(()=>{let t=r.current.get(k.number),n=t?.querySelector(`[data-live]`),i=t?.querySelector(`[data-sheen]`),a=t?.querySelector(`[data-portal]`),o=t?.querySelector(`[data-edge]`),s=t?.querySelector(`[data-cursor]`),c=s?.querySelector(`[data-tag]`),l=c?.querySelector(`[data-words]`);if(!t||!n||!i||!a||!o||!s||!c||!l||xe===Se.current)return;Oe.current.forEach(clearTimeout),Oe.current=[];let d={opacity:getComputedStyle(o).opacity,boxShadow:getComputedStyle(o).boxShadow},f=Te.current;for(let e of[n,i,a,o,s,c,l])e.getAnimations().forEach(e=>e.cancel());let p=t.getBoundingClientRect(),m=u.current.get(k.number),h=hf(e.playhead.flow,e.playhead.now.moment.at),g=e=>`translate(${(e.x-3).toFixed(1)}px,${(e.y-2).toFixed(1)}px)`,_=e=>{let t=e.getBoundingClientRect();return{x:t.left-p.left+3,y:t.top-p.top+2}},v=be.current&&{x:be.current.x-p.left,y:be.current.y-p.top},y=v&&v.x>=0&&v.y>=0&&v.x<=p.width&&v.y<=p.height?v:void 0,b=e.live?.at&&m?{x:(e.live.at.x-m.x)*m.k,y:(e.live.at.y-m.y)*m.k}:void 0,x=xe&&s.style.opacity!==`0`?_(s):void 0,S=(xe?y??x:Ce.current??b??y)??{x:p.width/2,y:p.height/2},C=Math.max(...[[0,0],[p.width,0],[0,p.height],[p.width,p.height]].map(([e,t])=>Math.hypot(e-S.x,t-S.y))),w=e=>`circle(${e.toFixed(1)}px at ${S.x.toFixed(1)}px ${S.y.toFixed(1)}px)`;Object.assign(a.style,{left:`${S.x-C}px`,top:`${S.y-C}px`,width:`${C*2}px`,height:`${C*2}px`}),i.style.setProperty(`--x`,`${S.x}px`),i.style.setProperty(`--y`,`${S.y}px`);let T=matchMedia(`(prefers-reduced-motion: reduce)`).matches;Se.current=xe;let E=e=>{t.style.cursor=e?`default`:``,s.toggleAttribute(`data-yours`,e),n.querySelector(`iframe`)?.contentWindow?.postMessage({playthrough:`yours`,yours:e},`*`)};if(xe){if(Object.assign(n.style,{opacity:`1`,pointerEvents:`auto`}),n.querySelector(`iframe`)?.focus(),o.style.opacity=`1`,Ce.current=S,Object.assign(s.style,{transform:g(S),opacity:`1`,zIndex:`11`}),c.hidden=!1,T)return void(E(!0),eC(c,l,h?`You, as ${h}`:`You`,!0,!1));f?l.textContent!==`Taking over…`&&eC(c,l,`Taking over…`,!1):eC(c,l,h??`You are in control`,!h,!1);let e=x&&y&&Math.hypot(y.x-x.x,y.y-x.y)>4?rC:0;e?s.animate([{translate:`${x.x-S.x}px ${x.y-S.y}px`},{translate:`0px 0px`}],{duration:e,easing:sC}):x||s.animate([{opacity:0},{opacity:1}],{duration:200}),ke(()=>E(!0),e);let t=e+(h||f?240:0);(h||f)&&ke(()=>eC(c,l,`You are in control`),t),ke(()=>eC(c,l,h?`You, as ${h}`:`You`),t+1700);let r={delay:e,easing:sC,fill:`backwards`};n.animate([{clipPath:w(0)},{clipPath:w(C)}],{...r,duration:aC}),i.animate([{opacity:1},{opacity:0}],{...r,duration:aC+240}),a.animate([{transform:`scale(0)`,opacity:0},{opacity:1,offset:.1},{opacity:.85,offset:.7},{transform:`scale(1)`,opacity:0}],{...r,duration:aC}),o.animate([d,{...d,offset:.5},{opacity:1,boxShadow:`inset 0 0 0 2px rgba(236,178,72,0.95), inset 0 0 40px rgba(255,214,150,0.45)`,offset:.75},{opacity:1}],{...r,duration:aC+500});return}o.style.opacity=`0`,E(!1),$S(s,!1);let D=s.style.opacity!==`0`&&!!Ce.current;Ce.current=void 0,n.style.pointerEvents=`none`;let O={clientX:p.left+S.x,clientY:p.top+S.y};D&&document.elementFromPoint(O.clientX,O.clientY)?.dispatchEvent(new PointerEvent(`pointermove`,{...O,bubbles:!0})),oe();let A=()=>void(n.style.opacity=`0`),j=()=>void(s.style.zIndex=``);if(T)return void(A(),j());let M=s.style.transform;s.animate([{transform:g(S),opacity:1},{transform:g(S),opacity:1,offset:.3},{transform:M,opacity:Number(s.style.opacity||1)}],{duration:oC+rC,easing:sC}).finished.then(j,()=>{}),h&&(l.textContent=`You`,c.dataset.mine=``,eC(c,l,h,!1));let N={duration:oC,easing:`cubic-bezier(0.55, 0, 0.7, 0.2)`};o.animate([{opacity:1},{opacity:0}],{duration:220,easing:`ease-in`}),a.animate([{transform:`scale(1)`,opacity:0},{opacity:.9,offset:.65},{transform:`scale(0)`,opacity:0}],N),i.animate([{opacity:0},{opacity:.8}],N),n.animate([{clipPath:w(C)},{clipPath:w(0)}],N).finished.then(A,()=>{})},[xe]);let we=!!e.live?.shown&&!xe,Te=(0,l.useRef)(!1);(0,l.useLayoutEffect)(()=>{let t=r.current.get(k.number)?.querySelector(`[data-edge]`),n=r.current.get(k.number)?.querySelector(`[data-cursor] [data-tag]`),i=n?.querySelector(`[data-words]`);if(!t||!n||!i||we===Te.current)return;Te.current=we;let a=hf(e.playhead.flow,e.playhead.now.moment.at);if(we){if(n.hidden=!1,eC(n,i,`Taking over…`,!1),matchMedia(`(prefers-reduced-motion: reduce)`).matches)return void(t.style.opacity=`1`);t.animate([{opacity:.25},{opacity:1,boxShadow:iC}],{duration:1e3,easing:`ease-in-out`,direction:`alternate`,iterations:1/0})}else xe||(t.getAnimations().forEach(e=>e.cancel()),t.style.opacity=`0`,eC(n,i,a??``,!1),n.hidden=!a)},[we]);let Ee=we?e.live?.due:void 0;(0,l.useLayoutEffect)(()=>{let e=r.current.get(k.number)?.querySelector(`[data-cursor] [data-tag]`),t=e?.querySelector(`[data-words]`);if(!Ee||!e||!t||Ee-Date.now()<cC)return;let n=matchMedia(`(prefers-reduced-motion: reduce)`).matches,i=0,a=()=>{let r=(Ee-Date.now())/1e3,a=i?Math.min(i,Math.ceil(r)):Math.ceil(r-.5);if(a===i)return;if(a<1)return void(clearInterval(o),eC(e,t,`Taking over…`,!1));let s=!i&&e.getBoundingClientRect().width,c=document.createElement(`span`);c.className=`inline-block`,c.textContent=String(i=a),t.replaceChildren(`Taking over in `,c,`…`),!n&&(s&&e.animate([{width:`${s}px`},{width:`${e.getBoundingClientRect().width}px`}],{duration:380,easing:sC}),c.animate([{opacity:0,transform:`translateY(3px)`},{opacity:1,transform:`none`}],{duration:280,easing:sC}))},o=setInterval(a,100);return a(),()=>clearInterval(o)},[Ee]),(0,l.useEffect)(()=>{let e=()=>setTimeout(()=>{let e=document.activeElement;e instanceof HTMLIFrameElement&&e.closest(`[data-live]`)&&!Se.current&&e.blur()});return addEventListener(`blur`,e),()=>removeEventListener(`blur`,e)},[]);let De=(e,n,i)=>{let a=r.current.get(t.current.round.number)?.querySelector(`[data-cursor]`);a&&(Ce.current=e,Object.assign(a.style,{transform:`translate(${(e.x-3).toFixed(1)}px,${(e.y-2).toFixed(1)}px)`,opacity:n?`1`:`0`}),$S(a,i))},Oe=(0,l.useRef)([]),ke=(e,t)=>void Oe.current.push(window.setTimeout(e,t));(0,l.useEffect)(()=>{let e=({data:e})=>{if(e?.playthrough!==`pointer`||!Se.current)return;let n=u.current.get(t.current.round.number);n&&De({x:(e.x-n.x)*n.k,y:(e.y-n.y)*n.k},e.inside,!!e.text)};return addEventListener(`message`,e),()=>removeEventListener(`message`,e)},[]);let Ae=(e,t)=>{S.current=e;let n=t===k.number&&ye(e.target)&&!je.current,r=n?_e(e):void 0;b(r?.node),v(n&&!r?B(e,t):void 0)},je=(0,l.useRef)(!1),Me=(e,t)=>{if(je.current=!1,e.button!==0||e.target.closest(`[data-pin]`)||L(e.target)===void 0)return;let n={x:e.clientX,y:e.clientY},r=u.current.get(t),i=c.current?.centre??LS(r,r),a=e.currentTarget,o=e.pointerId,s=e=>{e.pointerId!==o||!je.current&&Math.hypot(e.clientX-n.x,e.clientY-n.y)<4||(je.current||a.setPointerCapture(o),je.current=!0,R(t,()=>[i[0]-(e.clientX-n.x)/r.k,i[1]-(e.clientY-n.y)/r.k]))},l=e=>{e.pointerId===o&&(removeEventListener(`pointermove`,s),removeEventListener(`pointerup`,l),removeEventListener(`pointercancel`,l))};addEventListener(`pointermove`,s),addEventListener(`pointerup`,l),addEventListener(`pointercancel`,l)},Ne=(t,n)=>{if(je.current||n!==k.number||e.live?.shown)return;if(e.playhead.now.playing)return e.playhead.pause();if(!e.onPlace)return void(!e.writing&&e.playhead.play());let r=_e(t);if(x.current=void 0,b(void 0),r)return e.onPlace?.({element:Il(r,r.name)});let i=B(t,n);i&&e.onPlace?.({point:i})},Pe=!D&&!!e.onPlace&&!e.writing&&!e.live?.shown,Fe=(0,l.useRef)(null),Ie=(0,l.useRef)(0);(0,l.useEffect)(()=>{let e=()=>void(Ie.current=performance.now());return addEventListener(`pointerdown`,e,!0),addEventListener(`keydown`,e,!0),()=>{removeEventListener(`pointerdown`,e,!0),removeEventListener(`keydown`,e,!0)}},[]);let H=(0,l.useRef)(D);(0,l.useEffect)(()=>{if(H.current===D)return;H.current=D;let e=Fe.current,t=r.current.get(k.number)?.getBoundingClientRect(),i=n.current?.getBoundingClientRect();if(!e||!t||!i||performance.now()-Ie.current>300)return;e.querySelector(`[data-play]`).style.display=D?``:`none`,e.querySelector(`[data-pause]`).style.display=D?`none`:``,Object.assign(e.style,{left:`${t.left-i.left+t.width/2}px`,top:`${t.top-i.top+t.height/2}px`});let a=matchMedia(`(prefers-reduced-motion: reduce)`).matches;e.getAnimations().forEach(e=>e.cancel()),e.animate([{opacity:.95,transform:`translate(-50%,-50%) scale(${a?1:.85})`},{opacity:.95,transform:`translate(-50%,-50%) scale(1)`,offset:.3},{opacity:0,transform:`translate(-50%,-50%) scale(${a?1:1.25})`}],{duration:480,easing:`ease-out`})},[D]);let Le=e.onAllFlows&&(0,J.jsxs)(`button`,{className:`-my-0.5 mr-1 -ml-1 inline-flex flex-none items-baseline gap-0.5 rounded-md py-0.5 pr-2 pl-0.5 text-xs leading-4 text-soft transition-colors duration-150 ease-calm hover:bg-hover hover:text-fg`,onClick:e.onAllFlows,children:[(0,J.jsx)(`svg`,{viewBox:`0 0 12 12`,className:`size-3.5 self-center`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.3`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:(0,J.jsx)(`path`,{d:`M7.5 3L4.5 6l3 3`})}),`All flows`]}),Re=t=>(0,J.jsxs)(`button`,{className:`z-20 inline-flex items-center gap-1.5 rounded-md py-0.5 pr-1 pl-2 text-xs leading-4 text-soft transition-colors duration-150 ease-calm hover:bg-hover hover:text-fg ${t}`,onClick:e.onBareOff,children:[`Marks hidden`,(0,J.jsx)(`kbd`,{className:`rounded-[3px] px-1 font-ui text-[11px] text-soft shadow-[0_0_0_1px_var(--line)]`,children:`H`})]});return(0,J.jsxs)(`div`,{ref:n,className:`group/stage relative min-h-0 select-none`,"data-bare":e.bare?``:void 0,children:[(0,J.jsxs)(`div`,{ref:Fe,"aria-hidden":!0,className:`pointer-events-none absolute z-20 grid size-16 place-items-center rounded-full bg-[rgba(30,34,44,0.62)] text-white opacity-0`,children:[(0,J.jsx)(`svg`,{"data-play":!0,viewBox:`0 0 24 24`,className:`ml-1 size-7`,fill:`currentColor`,children:(0,J.jsx)(`path`,{d:`M7 4.5l13 7.5-13 7.5z`})}),(0,J.jsxs)(`svg`,{"data-pause":!0,viewBox:`0 0 24 24`,className:`size-7`,fill:`currentColor`,children:[(0,J.jsx)(`rect`,{x:`6`,y:`5`,width:`4`,height:`14`,rx:`1`}),(0,J.jsx)(`rect`,{x:`14`,y:`5`,width:`4`,height:`14`,rx:`1`})]})]}),m.map(t=>(0,J.jsxs)(`div`,{ref:e=>void(e?r.current.set(t,e):r.current.delete(t)),"data-frame":t,"data-watched":t===k.number||void 0,className:`absolute touch-none overflow-hidden rounded-lg bg-paper shadow-frame transition-opacity duration-160 ease-calm data-flying:invisible data-over:pointer-events-none data-over:z-10 ${t===k.number&&Pe?y===void 0?`cursor-none`:`cursor-pointer`:``}`,onPointerDown:e=>Me(e,t),onPointerMove:e=>Ae(e,t),onPointerLeave:()=>{v(void 0),b(void 0)},onClick:e=>Ne(e,t),children:[t===k.number&&e.live?.address&&(0,J.jsxs)(`div`,{"data-live":!0,className:`pointer-events-none absolute inset-0 z-10 overflow-hidden opacity-0`,children:[(0,J.jsx)(`div`,{"data-sheen":!0,className:`pointer-events-none absolute inset-0 z-1 opacity-0 [background:radial-gradient(circle_at_var(--x)_var(--y),rgba(255,232,190,0.15),rgba(255,214,150,0.5))]`}),(0,J.jsx)(`iframe`,{src:e.live.address,title:`The app, taken over`,className:`absolute top-0 left-0 origin-top-left border-0 bg-paper`,style:u.current.get(t)&&lC(u.current.get(t),u.current.get(t).page)},e.live.address)]}),t===k.number&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{"data-portal":!0,className:`pointer-events-none absolute top-0 left-0 z-10 rounded-full opacity-0 [border:2.5px_solid_rgba(236,178,72,0.95)] [box-shadow:0_0_40px_14px_rgba(226,170,70,0.38),inset_0_0_36px_10px_rgba(255,214,150,0.4)]`}),(0,J.jsx)(`div`,{"data-edge":!0,className:`pointer-events-none absolute inset-0 z-10 rounded-lg opacity-0 [box-shadow:inset_0_0_0_1.5px_rgba(217,162,58,0.75),inset_0_0_22px_rgba(217,162,58,0.16)]`})]}),(0,J.jsxs)(`div`,{"data-app":!0,className:`absolute inset-0 overflow-hidden`,children:[(0,J.jsx)(`div`,{"data-stack":!0,className:`absolute inset-0`}),(0,J.jsxs)(`div`,{"data-marks":!0,inert:!!e.live?.shown,className:`absolute top-0 left-0 z-3 ${GS} group-data-bare/stage:[&_*]:pointer-events-none`,children:[(e.marks.get(t)??[]).map((t,n)=>(0,J.jsx)(KS,{mark:t,onMark:e.onMark},`${t.id}:${n}`)),t===k.number&&Pe&&y!==void 0&&(0,J.jsx)(`div`,{"data-mark-id":`hover`,"data-node":y,hidden:!0,className:`pointer-events-none absolute rounded-[4px] outline-1 outline-offset-4 outline-[rgba(217,162,58,0.55)] outline-solid`}),t===k.number&&(0,J.jsx)(qS,{placing:e.placing,aim:Pe?_:void 0})]})]}),(0,J.jsx)(`div`,{"data-ring":!0,className:`pointer-events-none absolute top-0 left-0 z-7 -mt-[17px] -ml-[17px] size-[34px] rounded-full border-[1.5px] border-[rgba(40,44,54,0.5)] bg-[rgba(40,44,54,0.06)] opacity-0 ${GS}`}),(0,J.jsxs)(`div`,{"data-dialog":!0,hidden:!0,className:`pointer-events-none absolute top-0 left-0 z-7 origin-top-left rounded-xl bg-white px-6 pt-5 pb-4 font-[system-ui,sans-serif] text-[13px] leading-[18px] text-[#1f1f1f] shadow-[0_1px_3px_rgba(0,0,0,.2),0_6px_24px_rgba(0,0,0,.24)] ${GS}`,children:[(0,J.jsx)(`p`,{"data-where":!0,className:`mb-2.5 text-[15px] leading-5 font-medium`}),(0,J.jsx)(`p`,{"data-says":!0,className:`mb-4 break-words whitespace-pre-wrap`}),(0,J.jsx)(`p`,{"data-typed":!0,className:`mb-4 h-8 truncate rounded-md border border-[#747775] px-2.5 leading-[30px]`}),(0,J.jsxs)(`p`,{className:`flex justify-end gap-2 text-[13px] leading-8 font-medium`,children:[(0,J.jsx)(`span`,{"data-no":!0,className:`rounded-full border border-[#747775] px-4 text-[#0b57d0] data-pressed:bg-[#e8eef8]`,children:`Cancel`}),(0,J.jsx)(`span`,{"data-yes":!0,className:`rounded-full bg-[#0b57d0] px-4 text-white data-pressed:bg-[#0842a0]`,children:`OK`})]})]}),(0,J.jsxs)(`div`,{"data-cursor":!0,className:`pointer-events-none absolute top-0 left-0 z-8 size-5 opacity-0 transition-[filter] duration-180 ease-calm will-change-transform [&:not([data-touch])>[data-finger]]:hidden [&[data-touch]>svg]:invisible [&[data-touch]:not([data-yours])>[data-tag]]:top-[19px] [&[data-touch]:not([data-yours])>[data-tag]]:left-[16px] [&[data-yours]>[data-finger]]:invisible [&[data-yours]>svg]:invisible [filter:drop-shadow(0_1px_1px_rgba(0,0,0,.3))] group-data-bare/stage:[filter:drop-shadow(0_1px_1px_rgba(0,0,0,.3))_opacity(0)]`,children:[(0,J.jsx)(`svg`,{"data-arrow":!0,viewBox:`0 0 20 20`,width:`20`,height:`20`,"aria-hidden":!0,children:(0,J.jsx)(`path`,{d:`M3 2l13 7.5-5.6 1.3L7.6 16z`,fill:`#FFFFFF`,stroke:`#1E2330`,strokeWidth:`1.3`,strokeLinejoin:`round`})}),(0,J.jsxs)(`svg`,{"data-beam":!0,viewBox:`0 0 20 20`,style:{display:`none`},width:`20`,height:`20`,className:`absolute -top-2 -left-[7px]`,"aria-hidden":!0,children:[(0,J.jsx)(`path`,{d:`M7 3.5h6M10 3.5v13M7 16.5h6`,fill:`none`,stroke:`#FFFFFF`,strokeWidth:`3.2`,strokeLinecap:`round`}),(0,J.jsx)(`path`,{d:`M7 3.5h6M10 3.5v13M7 16.5h6`,fill:`none`,stroke:`#1E2330`,strokeWidth:`1.4`,strokeLinecap:`round`})]}),(0,J.jsx)(`span`,{"data-finger":!0,className:`absolute -top-3 -left-[11px] size-7 rounded-full border-[1.5px] border-[rgba(30,35,48,0.6)] bg-[rgba(255,255,255,0.5)]`}),(0,J.jsx)(`span`,{"data-tag":!0,hidden:!0,className:`${nC} transition-[background-color,color] duration-300 ease-calm data-mine:bg-[#EDB654] data-mine:text-[#3B2A07]`,children:(0,J.jsx)(`span`,{"data-words":!0})})]}),(0,J.jsx)(`div`,{"data-card":!0,className:`pointer-events-none absolute inset-0 z-9 grid place-items-center rounded-lg bg-[rgba(247,247,245,calc(var(--k,0)*.45))] p-4 text-center font-recorded text-[20px] leading-[1.2] font-medium tracking-[-0.01em] text-[#222222] opacity-0 in-data-absent:bg-surface in-data-absent:font-ui in-data-absent:text-[13px] in-data-absent:leading-normal in-data-absent:font-normal in-data-absent:tracking-normal in-data-absent:text-faint`,children:(0,J.jsxs)(`span`,{className:`grid max-w-[min(30rem,100%)] justify-items-center gap-4 opacity-[var(--n,0)] ${tC} in-data-absent:before:hidden`,children:[(0,J.jsxs)(`span`,{className:`grid justify-items-center gap-1.5`,children:[(0,J.jsx)(`span`,{"data-name":!0}),(0,J.jsx)(`span`,{"data-as":!0,hidden:!0,className:`font-ui text-[14px] leading-[1.4] font-normal tracking-normal text-[#6c707a]`})]}),(0,J.jsxs)(`span`,{"data-line":!0,hidden:!0,className:`grid gap-1 font-ui text-[15px] leading-[1.45] font-normal tracking-normal text-[#3b3e46]`,children:[(0,J.jsx)(`span`,{className:`text-xs leading-4 text-[#8a8e97]`}),(0,J.jsx)(`span`,{className:`line-clamp-4`})]})]})})]},t)),A&&[A,k].map(t=>(0,J.jsxs)(`div`,{ref:e=>void(e?i.current.set(t.number,e):i.current.delete(t.number)),className:`absolute flex h-[26px] items-baseline gap-2 px-0.5 pt-0.5 pb-1.5 text-xs text-faint`,children:[t===A&&Le,(0,J.jsx)(`b`,{className:`flex-none font-medium text-soft`,children:Id(t.number)}),e.about&&(0,J.jsxs)(`span`,{className:`truncate`,children:[(0,J.jsx)(`span`,{className:`mr-1.5 -ml-0.5`,children:`·`}),t===A?e.about.earlier:e.about.now]}),t===k&&e.bare===`kept`&&Re(`-mt-px ml-auto flex-none self-start`)]},t.number)),!A&&e.bare!==`kept`&&(0,J.jsx)(`div`,{ref:e=>void(e?i.current.set(k.number,e):i.current.delete(k.number)),className:`pointer-events-none absolute top-0 left-0 flex h-[26px] items-baseline justify-center px-0.5 pt-0.5 pb-1.5 text-xs transition-opacity duration-160 ease-calm ${M&&e.peeking?`opacity-0`:`opacity-100`}`,children:e.over?.take?(0,J.jsx)(`button`,{className:`pointer-events-auto flex-none animate-arrive font-medium text-fg before:mr-1.5 before:mb-px before:inline-block before:size-1.5 before:rounded-full before:bg-amber before:align-middle before:content-[''] hover:underline`,onClick:e.over.take,children:e.over.words}):e.over&&(0,J.jsx)(`b`,{className:`flex-none animate-arrive font-medium text-soft`,children:e.over.words})}),M&&(0,J.jsxs)(`div`,{className:`pointer-events-none absolute top-0 left-0 flex h-[26px] items-baseline justify-center gap-2 px-0.5 pt-0.5 pb-1.5 text-xs text-faint transition-opacity duration-160 ease-calm ${e.peeking?`opacity-100`:`opacity-0`}`,ref:e=>void(e?i.current.set(M.number,e):i.current.delete(M.number)),children:[(0,J.jsx)(`b`,{className:`flex-none font-medium text-soft`,children:Id(M.number)}),e.about&&(0,J.jsxs)(`span`,{className:`truncate`,children:[(0,J.jsx)(`span`,{className:`mr-1.5 -ml-0.5`,children:`·`}),e.about.earlier]})]}),!A&&Le&&(0,J.jsx)(`div`,{ref:a,inert:!!e.live?.shown,className:`absolute top-0 z-20 flex h-[26px] items-baseline px-0.5 pt-0.5 pb-1.5 text-xs`,style:{opacity:xe?.32:void 0,transition:`opacity 520ms ${sC}`},children:Le}),!A&&e.bare===`kept`&&!(M&&e.peeking)&&Re(`absolute -top-px left-1/2 -translate-x-1/2`)]})}var GS=`transition-[filter] duration-180 ease-calm group-data-bare/stage:[filter:opacity(0)]`;function KS({mark:e,onMark:t}){let{on:n,pin:r,chosen:i}=e,a=e.shows&&{"data-from":e.shows.at,"data-until":e.shows.until},o=n=>{n.stopPropagation(),t(e.id)},s=r===`diamond`?(0,J.jsxs)(`button`,{"data-pin":e.id,"aria-label":`What changed here`,className:`absolute grid size-[18px] place-items-center ${JS}`,onClick:o,children:[(0,J.jsx)(`i`,{className:`size-[9px] rotate-45 bg-[#2b2e35] shadow-pin`}),e.dot&&(0,J.jsx)(`b`,{className:`absolute top-px left-[11px] size-1.5 rounded-full shadow-[0_0_0_1.5px_#fff]`,style:{background:e.dot}})]}):r&&(0,J.jsx)(`button`,{"data-pin":e.id,className:`absolute ${XS} ${r.fill}`,onClick:o,children:r.number});if(`point`in n)return(0,J.jsx)(`div`,{"data-mark-id":e.id,"data-kind":e.kind,...a,className:`absolute size-0`,style:{left:ZS(n.point.x),top:ZS(n.point.y)},children:r&&r!==`diamond`&&(0,J.jsx)(`button`,{"data-pin":e.id,className:`${XS} ${r.fill} absolute -top-[9px] -left-[9px]`,onClick:o,children:r.number})});let c=e.kind===`writing`?`outline-[1.5px] outline-dashed outline-amber`:e.kind===`change`?e.ink?`${e.pointed?`outline-[1.5px]`:`outline-1`} outline-(--c) outline-solid`:i?`outline-[1.5px] outline-[#2b2e35] outline-solid`:`outline-1 outline-[rgba(43,46,53,0.4)] outline-solid`:i?`outline-[1.5px] outline-(--c) outline-solid`:`outline-1 outline-[color-mix(in_srgb,var(--c)_50%,transparent)] outline-solid`;return(0,J.jsx)(`div`,{"data-mark-id":e.id,"data-kind":e.kind,"data-paused":e.kind===`change`?``:void 0,"data-answers":e.answers,"data-pointed":e.pointed?``:void 0,"data-node":`node`in n?n.node:void 0,"data-box":`box`in n?`${n.box.x} ${n.box.y} ${n.box.width} ${n.box.height}`:void 0,...a,hidden:!0,className:`pointer-events-none absolute rounded-[4px] outline-offset-4 [transition:opacity_250ms_var(--ease-calm),outline-color_150ms_var(--ease-calm),outline-width_150ms_var(--ease-calm)] data-playing:opacity-0 ${c} data-one:outline-transparent`,style:e.ink?{"--c":e.ink}:void 0,children:s})}function qS({placing:e,aim:t}){return(0,J.jsxs)(J.Fragment,{children:[e&&(0,J.jsx)(`span`,{className:`${YS} absolute -translate-x-1/2 -translate-y-1/2 animate-drop bg-amber`,style:{left:ZS(e.x),top:ZS(e.y)}}),t&&(0,J.jsx)(`span`,{className:`pointer-events-none absolute size-[18px] -translate-x-1/2 -translate-y-1/2 animate-arrive rounded-full border-[1.5px] border-amber/70`,style:{left:ZS(t.x),top:ZS(t.y)}})]})}var JS=`pointer-events-auto cursor-pointer opacity-90 transition duration-150 ease-calm hover:scale-112 hover:opacity-100`,YS=`size-[18px] rounded-full text-[10px] leading-[18px] font-semibold text-white shadow-pin`,XS=`${YS} ${JS}`,ZS=e=>`${(e*100).toFixed(3)}%`,QS=(e,t)=>{let n=Math.floor(Math.max(0,Math.min(e.width,e.height*t.width/t.height,t.width)));return{width:n,height:Math.floor(n*t.height/t.width)}};function $S(e,t){e.querySelector(`[data-arrow]`).style.display=t?`none`:``,e.querySelector(`[data-beam]`).style.display=t?``:`none`}function eC(e,t,n,r=!0,i=!0){let a=e.getBoundingClientRect().width;if(t.textContent=n,r?e.dataset.mine=``:delete e.dataset.mine,!i||!a)return;let o=e.getBoundingClientRect().width;e.animate([{width:`${a}px`},{width:`${o}px`}],{duration:380,easing:sC}),t.animate([{opacity:0,transform:`translateY(3px)`},{opacity:1,transform:`none`}],{delay:90,duration:280,easing:sC,fill:`backwards`})}var tC=`relative isolate before:pointer-events-none before:absolute before:-inset-x-20 before:-inset-y-12 before:-z-1 before:bg-[radial-gradient(closest-side,rgba(255,255,255,.92)_40%,rgba(255,255,255,0))] before:content-['']`,nC=`absolute top-[17px] left-[13px] overflow-hidden rounded-full bg-[#2B2E35] px-[7px] font-ui text-[11px] leading-[17px] whitespace-nowrap text-white tabular-nums shadow-[0_1px_3px_rgba(0,0,0,0.25)]`,rC=420,iC=`inset 0 0 0 3px rgba(236,170,50,1), inset 0 0 70px 6px rgba(226,160,50,0.55)`,aC=1050,oC=560,sC=`cubic-bezier(0.22, 0.8, 0.24, 1)`,cC=1500,lC=(e,t)=>({width:`${t.width}px`,height:`${t.height}px`,transform:`translate(${(-e.x*e.k).toFixed(2)}px,${(-e.y*e.k).toFixed(2)}px) scale(${e.k.toFixed(5)})`}),uC={from:0,width:1280,height:800,touch:!1},dC=448,fC=new WeakMap;function pC(e){if(!fC.has(e)){let t=t=>e.querySelector(`[data-${t}]`);fC.set(e,{app:t(`app`),stack:t(`stack`),marks:t(`marks`),ring:t(`ring`),dialog:t(`dialog`),cursor:t(`cursor`),card:t(`card`),name:t(`name`),as:t(`as`),line:t(`line`)})}return fC.get(e)}function mC(e){let{review:t,round:n,up:r,step:i}=e,[a,o]=(0,l.useState)(),s=(0,l.useRef)(void 0);i?.kind===`go`&&i.flow&&(s.current=i.flow);let c=n.flows.filter(t=>e.needs(t.name)).length,u=n.flows.find(t=>t.name===(a??e.back))??n.flows.find(e=>e.name===s.current)??n.flows[0],d=r=>(0,J.jsx)(hC,{review:t,round:n,flow:r,standing:e.standing(r.name),on:r===u,onPoint:o,onFlow:e.onFlow},r.name),f=t.accepted?null:c?(0,J.jsxs)(J.Fragment,{children:[` `,(0,J.jsxs)(`span`,{className:`ml-1.5 whitespace-nowrap text-fg before:mr-[5px] before:mb-px before:ml-px before:inline-block before:size-1.5 before:rounded-full before:bg-amber before:align-middle before:content-['']`,children:[c,` `,c===1?`flow`:`flows`,` to check`]})]}):n.flows.every(t=>e.standing(t.name)?.is===`good`)?` · All good`:null;return(0,J.jsx)(`div`,{ref:e.room,inert:!r,className:`absolute inset-0 z-20 flex overflow-y-auto bg-ground transition-[opacity,visibility] duration-240 ease-calm ${r?`visible opacity-100`:`invisible opacity-0`}`,children:(0,J.jsxs)(`div`,{className:`m-auto grid w-full max-w-[1240px] grid-cols-[320px_minmax(0,1fr)] gap-10 px-8 py-6 phone:grid-cols-1 phone:gap-5 phone:px-0`,onPointerLeave:()=>o(void 0),children:[(0,J.jsxs)(`div`,{className:`flex max-h-[calc(100dvh-140px)] min-h-0 flex-col phone:max-h-none`,children:[(0,J.jsxs)(`div`,{className:`px-2.5`,children:[(0,J.jsx)(`h2`,{className:`line-clamp-2 text-[15px] leading-[21px] font-semibold`,children:t.title}),t.asked&&(0,J.jsx)(`p`,{className:`mt-1 line-clamp-6 text-[13px] leading-5 text-soft`,children:t.asked}),(0,J.jsxs)(`div`,{className:`${t.asked?`mt-2`:`mt-1`} -ml-2.5 flex items-center gap-1 text-[13px] leading-5 text-soft`,children:[(0,J.jsx)(Rd,{quiet:!0,rounds:t.rounds,watching:n.number,arrived:e.arrived,working:e.working,onRound:e.onRound,onEarlier:()=>{}}),(0,J.jsx)(`span`,{className:`min-w-0 truncate`,children:e.accepted?(0,J.jsxs)(`span`,{className:`text-green`,children:[`· `,e.accepted]}):f})]})]}),(0,J.jsx)(`div`,{className:`-mx-1 mt-5 min-h-0 overflow-y-auto px-1`,children:n.flows.map(d)})]}),(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-col justify-center`,children:[(0,J.jsx)(_C,{review:t,round:n,flow:u,onFlow:e.onFlow}),(0,J.jsx)(`div`,{className:`mt-3 flex min-h-8 items-start justify-end gap-2`,children:(0,J.jsxs)(`div`,{className:`w-[300px] max-w-full`,children:[i?.kind===`go`&&(0,J.jsx)(vf,{step:i,className:`w-full gap-3`}),i?.kind===`agent`&&!e.working&&(0,J.jsx)(yf,{step:i,className:`justify-end`}),e.trouble.length>0&&(0,J.jsx)(`p`,{className:`mt-2 text-xs leading-[18px] text-amber-ink`,children:e.trouble.join(` `)})]})})]})]})})}function hC({review:e,round:t,flow:n,standing:r,on:i,onPoint:a,onFlow:o}){return(0,J.jsxs)(`button`,{"data-on":i?``:void 0,className:`group/row grid w-full grid-cols-[64px_minmax(0,1fr)_auto] items-center gap-x-3 rounded-lg p-2 text-left transition-colors duration-150 ease-calm hover:bg-hover data-on:bg-hover`,"aria-label":`Play ${n.name}${r?`. ${bf(r)}`:``}`,onPointerEnter:()=>a(n.name),onFocus:()=>a(n.name),onClick:()=>o(n.name),children:[(0,J.jsx)(`span`,{className:`relative block aspect-[1.6] overflow-hidden rounded-[5px] bg-paper shadow-frame`,children:(0,J.jsx)(_S,{shot:vS(e,t,n)})}),(0,J.jsxs)(`span`,{className:`grid min-w-0`,children:[(0,J.jsxs)(`span`,{className:`line-clamp-2 text-[13px] leading-[18px] text-fg`,children:[n.name,gf(e)&&(0,J.jsxs)(`span`,{className:`text-soft`,children:[` `,_f(n)]})]}),(0,J.jsxs)(`span`,{className:`mt-0.5 flex min-w-0 items-center gap-1 text-xs leading-4`,children:[r&&(0,J.jsx)(hd,{end:md(r),ahead:r.is===`to watch`,just:!1,className:`size-3 flex-none`}),r&&(0,J.jsx)(`span`,{className:`truncate ${gC[r.is]}`,children:bf(r)})]})]}),(0,J.jsx)(`span`,{className:`self-start text-xs leading-[18px] text-faint tabular-nums`,children:fl(n.length)})]})}var gC={good:`text-green`,"looked good":`text-amber-ink`,"to watch":`text-faint`,"not saved":`text-amber-ink`,"needs you":`text-amber-ink`,"is it good":`text-amber-ink`,"to send":`text-amber-ink`,"with the agent":`text-slate`};function _C({review:e,round:t,flow:n,onFlow:r}){return(0,J.jsxs)(`button`,{"data-picture":n.name,className:`relative aspect-[1.6] w-full max-w-[calc((100dvh-200px)*1.6)] self-center overflow-hidden rounded-lg bg-paper shadow-frame data-flying:invisible`,"aria-label":`Play ${n.name}`,onClick:()=>r(n.name),children:[(0,J.jsx)(_S,{shot:{src:b(e.id,t.number,n.recording,0)}},n.name),(0,J.jsx)(`span`,{className:`absolute inset-0 grid place-content-center bg-[rgba(247,247,245,.45)] p-4 text-center font-recorded text-[20px] leading-[1.2] font-medium tracking-[-0.01em] text-[#222222]`,children:(0,J.jsxs)(`span`,{className:`grid justify-items-center gap-1.5 ${tC}`,children:[n.name,gf(e)&&_f(n)&&(0,J.jsx)(`span`,{className:`font-ui text-[14px] leading-[1.4] font-normal tracking-normal text-[#6c707a]`,children:_f(n)})]})})]})}var vC=(e,t)=>e?.step===t?.step&&e?.actions===t?.actions,yC=new Map,bC=(e,t,n)=>JSON.stringify([e,t,n.step,n.actions]),xC=(e,t,n)=>void yC.delete(bC(e,t,n));function SC(e,t,n,{did:r,ahead:i}={}){if(r)return yC.clear(),EC(e,t,n,{did:r});let a=bC(e,t,n),o=yC.get(a);if(o&&(i||!CC.has(o)))return o;let s=o?o.then(r=>typeof r==`string`?r:EC(e,t,n,{})):EC(e,t,n,{ahead:i});return o||yC.clear(),i&&CC.add(s),yC.set(a,s),s.then(e=>typeof e==`string`||yC.get(a)===s&&yC.delete(a)),s}var CC=new WeakSet,wC=(e,t,n)=>void fetch(`/api/reviews/${encodeURIComponent(e)}/follow`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({flow:t,...n})}).catch(()=>{}),TC=(e,t,n)=>fetch(`/api/reviews/${encodeURIComponent(e)}/ready-in`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({flow:t,...n})}).then(e=>e.json()).then(e=>e.in??void 0,()=>void 0);async function EC(e,t,n,{did:r,ahead:i}){try{let a=await fetch(`/api/reviews/${encodeURIComponent(e)}/take-over`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({flow:t,...n,did:r,ahead:i})}),o=await a.json();return a.ok?`${location.protocol}//${location.hostname}:${o.port}/take-over/${o.moment}`:o.problems??[`It couldn't be made ready (${a.status}).`]}catch{return[`Playthrough isn't running here any more. Start it again with playthrough open, then try again.`]}}function DC({id:e,colour:t,hidden:n,faded:r}){let i=(0,l.useRef)(null),a=()=>{let t=i.current;if(!t)return;let r=t.getAnimations()[0];if(!e&&!n&&t.getAttribute(`d`)&&!matchMedia(`(prefers-reduced-motion: reduce)`).matches){r||(t.animate([{},{opacity:0}],{duration:140,easing:`cubic-bezier(0.4, 0, 1, 1)`,fill:`forwards`}).onfinish=()=>t.setAttribute(`d`,``));return}r?.cancel();let a=e&&document.querySelector(`aside:not([aria-hidden]) [data-open] [data-mark]`),o=e&&document.querySelector(`[data-frame][data-watched] [data-pin="${CSS.escape(e)}"]`),s=a&&a.closest(`aside`);s&&(t.style.opacity=s.style.visibility===`hidden`?`0`:getComputedStyle(s).opacity);let c=a&&a.closest(`[data-card]`)?.getBoundingClientRect(),l=a&&a.getBoundingClientRect(),u=o&&o.getBoundingClientRect(),d=o&&o.closest(`[data-frame]`)?.getBoundingClientRect();if(n||!l||!u||!c||!d||!u.width||!((e,t)=>t[0]>=e.left&&t[0]<=e.right&&t[1]>=e.top&&t[1]<=e.bottom)(d,[u.left+u.width/2,u.top+u.height/2]))return t.setAttribute(`d`,``);let f=u.left+u.width/2;if(c.left>=u.right||c.right<=u.left){let e=c.left>=u.right,n=[e?l.left-1:c.right+1,l.top+l.height/2],r=[e?u.right+1:u.left-1,u.top+u.height/2],i=Math.max(40,Math.abs(n[0]-r[0])*.5)*(e?1:-1);return t.setAttribute(`d`,`M${n[0]},${n[1]} C${n[0]-i},${n[1]} ${r[0]+i},${r[1]} ${r[0]},${r[1]}`)}if(c.top>=u.bottom||c.bottom<=u.top){let e=c.top>=u.bottom,n=Math.min(Math.max(f,c.left+12),c.right-12);return t.setAttribute(`d`,`M${n},${e?c.top-1:c.bottom+1} L${f},${e?u.bottom+1:u.top-1}`)}t.setAttribute(`d`,``)};return(0,l.useLayoutEffect)(a),(0,l.useEffect)(()=>{if(!e)return;let t=requestAnimationFrame(function e(){a(),t=requestAnimationFrame(e)});return()=>cancelAnimationFrame(t)}),(0,J.jsx)(`svg`,{className:`pointer-events-none fixed inset-0 z-20 size-full transition-opacity duration-250 ease-calm phone:hidden ${r?`opacity-0`:``}`,"aria-hidden":!0,children:(0,J.jsx)(`path`,{ref:i,fill:`none`,stroke:t,strokeWidth:`1.5`,strokeLinecap:`round`})})}var OC=400,kC=.05;function AC({id:e,flow:t}){let n=u(e),r=f(),i=Array.isArray(n)?void 0:n?.title;return(0,l.useEffect)(()=>void(document.title=i?`${i} · Playthrough`:`Playthrough`),[i]),Array.isArray(n)?(0,J.jsx)(jC,{children:(0,J.jsx)(`p`,{className:`m-auto text-soft`,children:n[0]})}):!n||!r?(0,J.jsx)(jC,{}):(0,J.jsx)(MC,{review:mu(n),you:r,flow:t})}function jC({title:e,children:t}){return(0,J.jsxs)(`div`,{className:`grid h-dvh grid-rows-[auto_minmax(0,1fr)] overflow-hidden px-5 phone:px-4`,children:[(0,J.jsxs)(`header`,{className:`flex min-h-[46px] min-w-0 items-center gap-2 py-2.5 text-soft`,children:[(0,J.jsx)(`a`,{href:`/`,className:`font-semibold text-fg`,children:`Playthrough`}),e&&(0,J.jsx)(`span`,{className:`text-faint`,children:`/`}),e&&(0,J.jsx)(`span`,{className:`truncate`,children:e})]}),t]})}function MC({review:e,you:t,flow:n}){let r=e.rounds.at(-1),[i,a]=(0,l.useState)(r?.number),[o,s]=(0,l.useState)(r?.number);i===void 0&&r&&(a(r.number),s(r.number));let c=e.rounds.find(e=>e.number===i);if(!c||!r)return(0,J.jsx)(jC,{title:e.title,children:(0,J.jsx)(`p`,{className:`m-auto text-soft`,children:`Nothing’s been recorded yet. The first round shows here once the agent finishes it.`})});let u=e=>{a(e),e===r.number&&s(e)},d=i===o&&r.number!==o;return(0,J.jsx)(NC,{review:e,round:c,latest:r,newer:d?r:void 0,arrived:r.number!==o&&!d,you:t,flow:n,onRound:u})}function NC({review:e,round:t,latest:n,newer:r,arrived:i,you:a,flow:o,onRound:s}){let[c,u]=(0,l.useState)([]),d=c.filter(t=>!e.sends.some(e=>e.id===t.id)),f=d.length?{...e,sends:[...e.sends,...d]}:e,[p,m]=tf(f.id),g=ou(p,t.number),_=e=>m(t=>su(t,e)),v=e=>m(n=>cu(n,t.number,e));(0,l.useEffect)(()=>{let e=e=>e.on?.app&&e.on.flow!==e.on.app.from.flow?{...e,on:{...e.on,flow:e.on.app.from.flow}}:e;[...g.notes,...g.unsaved].some(t=>e(t)!==t)&&_(t=>({...t,notes:t.notes.map(e),unsaved:t.unsaved.map(e)}))});let y=p[t.number]??au,C=[...f.sends.filter(e=>e.round===t.number).flatMap(e=>e.notes),...y.notes,...y.unsaved],w=JSON.stringify([...LC(C),...zC(t)]),E=(0,l.useMemo)(()=>JSON.parse(w),[w]),D=(0,l.useMemo)(()=>BC(t,E),[t,E]),[O,k]=nf(f.id),A=lu(f,t.number,O),[j,M]=(0,l.useState)(),N=t===n||!!r,ee=(0,l.useRef)(!1),[te,ne]=(0,l.useState)();te&&!(j&&`note`in j&&j.note===te)&&ne(void 0);let[re,ie]=(0,l.useState)(),[ae,oe]=(0,l.useState)([]),[se,ce]=(0,l.useState)(t.number),le=t.flows.length>0,[ue]=(0,l.useState)(()=>t.flows.find(e=>HC(e.name)===o)?.name),[de,fe]=(0,l.useState)(le&&!ue),pe=de&&le,me=(0,l.useRef)([t.number]);se!==t.number&&(ce(t.number),M(void 0),fe(de||le&&!ee.current&&!me.current.includes(t.number)),me.current.push(t.number));let[P]=(0,l.useState)(()=>new Iu(D.flows,{flow:ue??t.flows[0]?.name??``,at:Au}));(0,l.useEffect)(()=>()=>P.destroy(),[P]);let he=(0,l.useRef)(t.number);(0,l.useLayoutEffect)(()=>{if(he.current===t.number)return P.keep(D.flows);he.current=t.number;let e=P.flow,n=D.flows.find(t=>t.name===e.name),r=ee.current&&P.now.playing;ee.current=!1,P.pause(),P.watch(D.flows,n?{flow:n.name,at:xl(P.now.moment.at,e,n)}:{flow:t.flows[0]?.name??``,at:-Du}),r&&P.play()},[t,D,P]);let F=zu(P,e=>e.moment.flow),I=E.find(e=>e.name===F),L=I?.from.flow??F,R=t.flows.find(e=>e.name===L)??t.flows[0];(0,l.useEffect)(()=>{let e=`/${encodeURIComponent(f.id)}${pe||!L?``:`/${HC(L)}`}`;location.pathname!==e&&history.replaceState(null,``,e)},[f.id,pe,L]);let ge=zu(P,({moment:e,playing:t})=>{let n=P.flows.find(t=>t.name===e.flow)?.length??0,r=E.some(t=>t.name===e.flow);return t?`playing`:e.at>=n-.06&&!r?`end`:e.at<=0?`start`:`partway`}),[z,B]=(0,l.useState)(),V=(0,l.useRef)({});(0,l.useEffect)(()=>void(z?.address&&!z.settled&&(V.current.since=Date.now())),[z?.address]);let _e=zu(P,({moment:e,playing:n})=>{let r=t.flows.find(t=>t.name===e.flow),i=!n&&N&&!pe&&r&&e.at>=0?wl(r,e.at):void 0;return i&&JSON.stringify({flow:r.name,paused:i})});(0,l.useEffect)(()=>{if(!_e||z?.shown)return;let{flow:e,paused:t}=JSON.parse(_e),n=setTimeout(()=>void SC(f.id,e,t,{ahead:!0}).then(n=>typeof n==`string`&&B(r=>r?.shown?r:{flow:e,paused:t,address:n,shown:!1})),200);return()=>clearTimeout(n)},[_e,f.id]);let ve=zu(P,({moment:e,playing:n})=>{let r=t.flows.find(t=>t.name===e.flow),i=n&&N&&!pe&&r&&e.at>=0?wl(r,e.at):void 0;return i&&JSON.stringify({flow:r.name,paused:i})});(0,l.useEffect)(()=>{if(!ve)return;let{flow:e,paused:t}=JSON.parse(ve);wC(f.id,e,t)},[ve,f.id]);let ye=zu(P,e=>e.playing),be=e=>{B(t=>t&&{...t,shown:!1,at:e}),window.focus()};z?.shown&&(ye||se!==t.number)&&B({...z,shown:!1});let xe=(0,l.useRef)(void 0),Se=e=>{let t=z?.shown&<.current.address===z.address&&E.find(e=>e.session===lt.current.id);t&&P.go({flow:t.name,at:t.length}),xe.current=void 0,be(e)},Ce=(0,l.useRef)(Se);Ce.current=Se;let we=()=>{if(z?.shown)return Se();if(G&&Ot.get(G.id)?.at!==void 0&&G.on?.flow===L)return Te(G);xe.current=void 0;let e=I&&t.flows.find(e=>e.name===I.from.flow);if(I&&e)return ut.current={from:I.from,carry:lt.current.id===I.session?lt.current:void 0},Ee(e,I.from.at,I.did);ut.current={from:{flow:P.flow.name,at:Math.round(Math.max(0,P.now.moment.at)*100)/100}},Ee(P.flow,Math.max(0,P.now.moment.at))},Te=e=>{let n=Ot.get(e.id),r=t.flows.find(t=>t.name===e.on?.flow);r&&n?.at!==void 0&&N&&(xe.current=e.id,M({note:e.id}),ut.current={from:{flow:r.name,at:n.at}},Ee(r,n.at,n.did))},Ee=(e,t,n)=>{let r=wl(e,t);if(!N||t<0||!r)return;if(P.pause(),Xe(!1),Be(`one`),!n&&z&&z.flow===e.name&&vC(z.paused,r)&&z.address){xC(f.id,e.name,r);let{since:t,took:n}=V.current;return B({...z,shown:!0,at:void 0,due:!z.settled&&t&&n?t+n:void 0})}B({flow:e.name,paused:r,shown:!0});let i=t=>t?.flow===e.name&&vC(t.paused,r);SC(f.id,e.name,r,{did:n}).then(t=>{xC(f.id,e.name,r),B(e=>i(e)?typeof t==`string`?{...e,address:t}:{...e,problems:t,shown:!1}:e)}),n||TC(f.id,e.name,r).then(e=>e!==void 0&&B(t=>i(t)&&t.shown&&!t.address?{...t,due:Date.now()+e+(V.current.took??0)}:t))};(0,l.useEffect)(()=>{let e=({data:e,source:t})=>{let n=document.querySelector(`[data-live] iframe`)?.contentWindow;e?.playthrough===`settled`&&t===n&&(V.current.since&&(V.current={took:Math.min(Date.now()-V.current.since,V.current.took??1/0)}),B(e=>e&&{...e,settled:!0})),e?.playthrough===`recorded`&&t===n&&pt.current(e.events),e?.playthrough===`did`&&t===n&&(lt.current.did=e.did),e?.playthrough===`pinned`&>(e.at),e?.playthrough===`escape`&&(ot.current?at(!1):Ce.current({x:e.x,y:e.y})),e?.playthrough===`note`&&st.current(),e?.playthrough===`noted`&&ct.current(e)};return addEventListener(`message`,e),()=>removeEventListener(`message`,e)},[]);let De=e=>{O.some(n=>n.flow===e&&n.round===t.number)||k(n=>[...n,{flow:e,round:t.number}])},Oe=(0,l.useRef)(De);Oe.current=De,(0,l.useEffect)(()=>P.subscribe(()=>{let{moment:e}=P.now;e.at>=P.flow.length-.06&&!P.flow.fork&&Oe.current(e.flow)}),[P]);let[ke,Ae]=(0,l.useState)(`one`),[je,Me]=(0,l.useState)(!1),[Ne,Pe]=(0,l.useState)(!1),Fe=(0,l.useRef)(void 0),[Ie,H]=(0,l.useState)(),[Le,Re]=(0,l.useState)(),ze=f.rounds[0].number,Be=e=>{e!==ke&&(Ae(e),e===`side`&&Pe(!1))},Ve=e=>{s(e)},He=vu(f,t.number,a,p),Ue=e=>e.on?.at!==void 0&&e.turns.some(e=>e.agent),We=j&&`note`in j?He.find(e=>e.id===j.note):void 0,Ge=We&&Ue(We)?We.turns.filter(e=>!e.agent&&e.round<t.number).map(e=>e.round):[],Ke=Ge.length?Math.max(...Ge):void 0,qe=R?Tl(f,a,R.name,t.number):void 0,Je=t.number>ze?Ke??qe??ze:void 0,[Ye,Xe]=(0,l.useState)(!1),Ze=(0,l.useRef)(void 0),Qe=()=>{Ze.current===void 0&&(Ze.current=window.setTimeout(()=>{Xe(!0),yr&&Pe(!1)},160))},$e=()=>{if(Ze.current!==void 0){if(clearTimeout(Ze.current),Ze.current=void 0,Ye)return Xe(!1);Be(ke===`side`?`one`:`side`)}},[et,tt]=(0,l.useState)(!1),[nt,rt]=(0,l.useState)(),[it,at]=(0,l.useState)(!1),ot=(0,l.useRef)(it);ot.current=it;let st=(0,l.useRef)(()=>{}),ct=(0,l.useRef)(()=>{}),lt=(0,l.useRef)({id:``,events:[],did:[],kept:0,shift:0,from:{flow:``,at:0}}),ut=(0,l.useRef)(void 0),[dt,ft]=(0,l.useState)(),pt=(0,l.useRef)(()=>{});pt.current=e=>{if(!z||!e.length)return;if(lt.current.address!==z.address){let{from:t,carry:n}=ut.current??{from:{flow:z.flow,at:0}},r=n?.events.at(-1);lt.current=n&&r?{...n,address:z.address,shift:r.timestamp+400-e[0].timestamp}:{address:z.address,id:ul(),events:[],did:[],kept:0,shift:0,from:t}}let t=lt.current;t.events.push(...e.map(e=>({...e,timestamp:e.timestamp+t.shift}))),t.heard=Date.now();let n=z.address??``;ft(e=>e?.address===n?e:{address:n,name:`fork:${t.id}`,at:t.from.at,length:t.from.at})};let mt=async e=>{let n=`${e.id}-${++e.kept}.json`,r={type:5,data:{tag:`now`,payload:{}},timestamp:e.events.at(-1).timestamp+Date.now()-(e.heard??Date.now())},i=await T(f.id,t.number,e.from,[...e.events,r],n);if(!i)return;let a=`branches/${n}`,o=t=>t.on?.app&&PC(t.on.app.recording)===e.id?{...t,on:{...t.on,app:{...t.on.app,recording:a,length:i}}}:t;return _(e=>({...e,notes:e.notes.map(o),unsaved:e.unsaved.map(o)})),{name:`fork:${e.id}`,session:e.id,from:e.from,did:e.did,recording:a,length:i}},ht=(0,l.useRef)(new Map),gt=e=>{let t=document.querySelector(`[data-live] iframe`),n=t?.getBoundingClientRect();if(!t||!n)return;let r=n.width/t.offsetWidth;ht.current=new Map(Object.entries(e).map(([e,t])=>[e,{x:n.left+t.x*r,y:n.top+t.y*r}]))},U=!!z?.shown&&!!z.settled&&!!z.address,_t=z?.shown?U?`shown`:`waiting`:void 0;(0,l.useEffect)(()=>{document.querySelector(`[data-live] iframe`)?.contentWindow?.postMessage({playthrough:`noting`,on:it&&U},`*`)},[it,U]);let vt=zu(P,e=>e.playing);(0,l.useEffect)(()=>void(vt&&at(!1)),[vt]);let yt=f.accepted?void 0:f.taken.find(e=>e.round>n.number)?.at,[bt,xt]=(0,l.useState)();(0,l.useEffect)(()=>{if(!R)return;let e=!0;return h(f.id,t.number,R.recording).then(n=>{let{changes:r,clicks:i,acted:a}=sS(n),o=new Map(t.replies.flatMap(e=>e.watch&&e.on?.flow===R.name&&e.on.element?.node!==void 0?[[e.note,lS(n,e.on.element.node)]]:[]));e&&xt({flow:R.name,at:r,clicks:i,acted:a,moved:o})}),()=>void(e=!1)},[f.id,t.number,R]);let St=E.filter(e=>e.from.flow===L).map(e=>({name:e.name,at:e.from.at,length:e.length})),Ct=(e,t)=>{let n=P.flows,r=Pu(n,P.now.moment),i=n.map(e=>Pu(n,{flow:e.name,at:0})),a=bt?.flow===R?.name?(bt?.at??[]).map(e=>Pu(n,{flow:R.name,at:Math.min(e,R.length-.02)})):[],o=[...i,...a].sort((e,t)=>e-t),s=e>0?o.find(e=>e>r+.02):o.findLast(e=>e<r-.02);P.go(Fu(n,t?r+e*.1:s!==void 0&&Math.abs(s-r)<1?s:r+e))},W=!!f.accepted||t.number===0||!N&&!i,wt=[t.number,...Je===void 0?[]:[Je],...He.map(e=>e.written)],Tt=bS(f,f.rounds.filter(e=>wt.includes(e.number)).map(e=>e.number===t.number?D:e)),Et=e=>e.on?.app&&e.written!==t.number?t.replies.find(t=>t.note===e.id&&t.on?.app)?.on:void 0,Dt=new Map(He.flatMap(e=>{let t=Et(e)?.app?.did.length??1/0,n=e.on?.app?.did[t];return n?[[e.id,RC(n)]]:[]})),Ot=new Map(He.flatMap(e=>e.on?.app&&e.written!==t.number&&!Et(e)?[[e.id,{...VC(f,e.on,e.written,t,Tt),did:e.on.app.did}]]:[])),kt=He.map(e=>{let n=Et(e);if(n)return{...e,on:n};let r=Ot.get(e.id);return r?{...e,on:{flow:e.on.app.from.flow,...r.at!==void 0&&{at:r.at,...r.element&&{element:r.element}}}}:e.on&&!e.on.app?{...e,on:AS(f,e.id,e.on,e.written,t,Tt)??e.on}:e}),At=He.filter((e,t)=>e.on?.element&&!e.on.app&&kt[t].on!==e.on&&!kt[t].on?.element).map(e=>e.id),[jt,Mt]=(0,l.useState)([]),Nt=yu(f,t.number,a),Pt=kt.filter(e=>!e.on||!t.flows.some(t=>t.name===e.on?.flow)),Ft=R?kt.filter(e=>e.on?.flow===R.name&&e.on.at!==void 0):[],It=!W||!!f.accepted&&t===n,Lt=(0,l.useMemo)(()=>It?xu(f,t.number,a,p,A):void 0,[It,f,t.number,a,p,O]),Rt=e=>![`good`,`with the agent`,void 0].includes(Lt?.get(e)?.is),zt=!!j&&`end`in j&&j.end===L;j&&`end`in j&&(ge!==`end`||L!==j.end)&&M(void 0);let[Bt,Vt]=(0,l.useState)(),Ht=R&&Lt?.get(R.name),Ut=R&&ge===`end`?kt.filter(e=>e.on?.flow===R.name&&e.on.at===void 0):[],Wt=R&&ge===`end`&&(Ht||W)&&(zt||!j)?R.name:void 0,Gt=!!j&&`writing`in j&&ge===`end`&&g.unsaved.some(e=>e.id===j.writing&&e.on?.flow===L&&e.on.at===void 0),Kt=Gt||(!j||zt)&&(!!Wt||Ut.length>0),qt=Kt&&!ye,Jt=Ht&&md(Ht),Yt=R&&!W&&Jt?{end:Jt,words:Ht?.is===`not saved`?`Finish your note`:{asks:`Looks good?`,"to send":`Send`,good:`Looks good`,"with the agent":`With the agent`}[Jt],just:ed(Bt,R.name),go:()=>Hn(R.name)}:void 0,Xt=(0,l.useRef)(void 0);(0,l.useEffect)(()=>{if(!r)return void(Xt.current=void 0);Xt.current?.round!==r.number&&(Xt.current={round:r.number,flow:L}),(pe||L!==Xt.current.flow)&&(ee.current=!0,s(r.number))});let Zt=(e,t=ku)=>{P.pause(),P.go({flow:e,at:t})},Qt=$l(f,t.number,a),$t=bt?.flow===R?.name?bt?.clicks??[]:[],en=zu(P,e=>iu(Qt,e.moment,$t)?.id),tn=j&&`change`in j?Qt.find(e=>e.id===j.change):void 0,nn=new Map([...kt.filter(e=>e.yours),...g.unsaved].flatMap(e=>{let t=nu(Qt,e.on);return t?[[e.id,t]]:[]})),rn=j&&(`note`in j||`writing`in j)?nn.get(`note`in j?j.note:j.writing):void 0,an=tn??rn,on=tn?.id??en,[sn,cn]=(0,l.useState)();(0,l.useEffect)(()=>cn(void 0),[an?.id]);let[ln,un]=(0,l.useState)(),dn=ln&&Qt.find(e=>e.id===ln.diamond),fn=zu(P,({moment:e})=>!!dn&&(e.flow!==dn.flow||Math.abs(e.at-dn.at)>kC));(0,l.useEffect)(()=>{fn&&un(void 0)},[fn]);let pn=(e,t)=>{let n=Qt.find(e=>e.changes.includes(t));n&&(M(void 0),Zt(n.flow,n.at),un({note:e.id,diamond:n.id}))},mn=an?.flow===L?an:!j&&!dn?Qt.find(e=>e.id===en):void 0,hn=(0,l.useRef)(void 0),gn=(e,t,n)=>{hn.current=e,P.run(t,n)},_n=e=>{M({change:e.id}),Zt(e.flow,e.at)},vn=e=>{M(e.on&&e.on.at===void 0?{end:e.on.flow}:{note:e.id}),oe(t=>t.includes(e.id)?t:[...t,e.id]),e.on&&Zt(IC(e.on),e.on.at??D.flows.find(t=>t.name===IC(e.on))?.length)},yn=e=>{let n=MS(t,e.id,bt?.flow===R?.name?bt?.moved.get(e.id):void 0);return n&&e.on&&IC(e.on)===n.flow?n:void 0},bn=e=>yn(e)??{at:e.on?.at??0,until:e.on?.until},xn=e=>{let t=e.on,n=t&&D.flows.find(e=>e.name===IC(t)),{at:r,until:i}=bn(e);if(!n||i===void 0)return vn(e);M({note:e.id}),oe(t=>t.includes(e.id)?t:[...t,e.id]),gn(e.id,{flow:n.name,at:r},Math.min(n.length,i))},[Sn,Cn]=(0,l.useState)([]),wn=zu(P,e=>e.moment.at>=0?e.moment.flow:void 0);wn&&!Sn.includes(wn)&&Cn([...Sn,wn]);let Tn=E.filter(e=>e.walked),En=e=>Ft.some(t=>t.on&&IC(t.on)===e.name&&t.state===`needs you`&&!t.unsent&&!ae.includes(t.id)),Dn=(e,t)=>()=>{P.go({flow:e,at:t}),P.play()};(0,l.useEffect)(()=>P.stopAt([...Tn.filter(En).map(e=>({id:e.name,flow:e.from.flow,at:e.from.at,reached:Dn(e.name,e.from.at)})),...t.flows.filter(e=>e.line&&!Sn.includes(e.name)).map(e=>({id:`card:${e.name}`,flow:e.name,at:Au,reached:()=>{}})),...Ft.flatMap(e=>e.on&&e.state===`needs you`&&!e.unsent&&!ae.includes(e.id)?[{id:e.id,flow:IC(e.on),at:bn(e).at,reached:()=>xn(e)}]:[])]));let On=e=>{if(W)return;let t=ul();v(n=>({...n,unsaved:[...n.unsaved,{id:t,on:e,words:``}]})),M({writing:t})},kn=j&&`writing`in j?j.writing:void 0,An=()=>{W||(P.pause(),at(!it))};st.current=An,ct.current=async({element:e,point:t,did:n,x:r,y:i})=>{at(!1);let a=document.querySelector(`[data-live] iframe`),o=a?.getBoundingClientRect();a&&o&&yd(o.left+r*o.width/a.offsetWidth,o.top+i*o.height/a.offsetHeight);let s=lt.current;if(!z||W||s.address!==z.address||!s.events.length)return;s.did=n;let c=await mt(s);if(!c)return;let l={from:c.from,did:n,recording:c.recording,length:c.length};On({flow:c.from.flow,at:Math.floor(c.length*100)/100,...e?{element:e}:t&&{point:t},app:l})};let jn=(e,t)=>document.querySelector(`[data-live] iframe`)?.contentWindow?.postMessage({playthrough:`pin`,id:e,number:kt.find(t=>t.id===e)?.number??kt.length+1,css:t.element?.css,point:t.point},`*`);(0,l.useEffect)(()=>{let e=xe.current??G?.id,t=U?He.find(t=>t.id===e&&t.on?.app):void 0;t?.on&&jn(t.id,t.on)},[U]),(0,l.useEffect)(()=>{g.unsaved.some(e=>!e.words.trim()&&e.id!==kn)&&_(e=>({...e,unsaved:e.unsaved.filter(e=>e.words.trim()||e.id===kn)}))});let Mn=e=>{ie(e),setTimeout(()=>ie(t=>t===e?void 0:t),1200)},Nn=(e,t)=>{_(n=>({...e.on?Cu(n,e.on.flow,kt):n,notes:n.unsaved.some(t=>t.id===e.id)?[...n.notes,{id:e.id,...e.on&&{on:e.on},words:t}]:n.notes,unsaved:n.unsaved.filter(t=>t.id!==e.id)})),M(e.on&&e.on.at===void 0?{end:e.on.flow}:{note:e.id}),Mn(e.id),e.on?.app&&U&&jn(e.id,e.on)},Pn=(e,t)=>_(n=>({...n,unsaved:n.unsaved.map(n=>n.id===e?{...n,words:t}:n)})),Fn=e=>{_(t=>({...t,unsaved:t.unsaved.filter(t=>t.id!==e)})),M(void 0)},In=(e,t)=>{_(n=>({...n,notes:n.notes.flatMap(n=>n.id===e?t?[{...n,words:t}]:[]:[n])})),t||M(void 0)},Ln=(e,n)=>m(r=>{let i=su(r,t=>{let r=n?.verdict===`not quite`&&e.on?Cu(t,e.on.flow,kt):t;return{...r,verdicts:r.verdicts.filter(t=>t.note!==e.id),withTheFlow:r.withTheFlow.filter(t=>t!==e.id)}});return n?cu(i,t.number,e=>({...e,verdicts:[...e.verdicts,n]})):i}),Rn=e=>kt.filter(t=>t.on?.flow===e&&t.on.at!==void 0&&t.state===`needs you`&&!t.unsent&&!ae.includes(t.id)),zn=async e=>{let t=Lt?.get(e)?.is===`good`;if(t&&g.looksGood.includes(e))return _(t=>Cu(t,e,kt));if(t)return void Br(e,t=>({...t,takenBack:[...t.takenBack,e]}));let n=Rn(e)[0];if(n)return xn(n);await Br(e,t=>Su(t,e,kt))&&Vn(e)},Bn=async e=>{await Br(e)&&Vn(e)},Vn=e=>{M({end:e}),Vt({flow:e,at:performance.now()})},Hn=e=>{let t=D.flows.find(t=>t.name===e);if(!t)return;let n=g.unsaved.find(t=>t.on?.flow===e);if(Zt(e,n?.on?.at??t.length),n)return M({writing:n.id});M({end:e})},Un=e=>{M(void 0),P.go({flow:e,at:Au}),P.play()},Wn=e=>{M(void 0),P.go({flow:e,at:ku}),P.play()},Gn=(0,l.useRef)(null),Kn=!!z?.shown,qn=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=qn.current;e&&(e.inert=Kn,e.style.transition=`opacity 520ms cubic-bezier(0.22, 0.8, 0.24, 1)`,e.style.opacity=U?`0.32`:``)},[U,Kn]);let Jn=(0,l.useRef)(void 0),Yn=(0,l.useRef)(void 0);(0,l.useEffect)(()=>()=>clearTimeout(Yn.current),[]);let Xn=(e,t)=>{Jn.current={taking:lf(Gn.current),playing:t},fe(!1),e&&Zt(e)},Zn=e=>{let t=Ur(e);return t.kind===`go`?t:{kind:`go`,words:`All flows`,take:nr}},Qn=e=>e.kind===`go`?void 0:`what`in e&&e.what?`${e.words} ${e.what}`:e.words,[$n,er]=(0,l.useState)(),tr=(0,l.useRef)(void 0),nr=()=>{let e=P.flow,n=document.querySelector(`[data-frame][data-watched]`),r=e.fork,i=Math.max(0,e.steps.findLastIndex(e=>e.at<=P.now.moment.at));n&&(tr.current={frame:n,box:n.getBoundingClientRect(),showing:r?void 0:b(f.id,t.number,e.recording,i)}),er(r??e.name),P.pause(),P.go({flow:t.flows[0].name,at:Au}),j&&!(`writing`in j)&&M(void 0),fe(!0)};(0,l.useLayoutEffect)(()=>{let e=tr.current;tr.current=void 0;let t=$n&&Gn.current?.querySelector(`[data-picture="${CSS.escape($n)}"]`);e&&t&&pe&&df(e.frame,e.box,e.showing,t)}),(0,l.useLayoutEffect)(()=>{let e=Jn.current;if(Jn.current=void 0,!e)return;let n=document.querySelector(`[data-frame="${t.number}"]`),r=n?uf(e.taking.filter(e=>e.flow===P.flow.name),n):0;if(!e.playing)return;let i=P.now.moment;clearTimeout(Yn.current),Yn.current=window.setTimeout(()=>{let{moment:e,playing:t}=P.now;!t&&e.flow===i.flow&&e.at===i.at&&P.play()},r+OC)});let rr=[...t.flows.flatMap(e=>[{flow:e},...td(e.name,kt,Qt,nd(Lt?.get(e.name),e.name===L)),...W?[]:[{end:e.name}]]),...Pt.map(e=>({note:e,at:1/0}))],ir=e=>{let t=rr.findIndex(e=>`note`in e?j&&`note`in j&&j.note===e.note.id:`diamond`in e?tn===e.diamond:`end`in e?e.end===L&&(zt||!j&&!!Wt):!j&&!Wt&&e.flow.name===L),n=rr[t<0?0:ju(t+e,0,rr.length-1)];!n||t>=0&&rr[t]===n||(`note`in n?xn(n.note):`diamond`in n?_n(n.diamond):`end`in n?Hn(n.end):(M(void 0),Zt(n.flow.name)))},ar=Math.max(0,...kt.map(e=>e.number))+1,or=g.unsaved.find(e=>e.id===kn),sr=e=>OS(e&&{...e,flow:IC(e)},Tt,t.number),cr=e=>(0,J.jsxs)(`div`,{"data-open":!0,className:`grid gap-2.5 px-4 py-2`,children:[(0,J.jsxs)(`div`,{className:`grid grid-cols-[18px_minmax(0,1fr)_auto] items-start gap-x-2`,children:[(0,J.jsx)(`span`,{"data-mark":!0,className:`${Bu} relative z-1 mt-px bg-amber text-white`,children:ar+g.unsaved.indexOf(e)}),(0,J.jsx)(`span`,{className:`truncate`,children:sr(e.on)}),(0,J.jsx)(`span`,{className:`min-w-[78px] text-right text-xs leading-5 text-amber-ink tabular-nums`,children:e.on?.at===void 0?``:fl(e.on.at)})]}),(0,J.jsx)($u,{words:e.words,placeholder:e.on&&e.on.at===void 0?`What isn’t good about it?`:`What do you think?`,question:e.on?.app?`Your new note, on what’s in the app`:`Your new note`,onWords:t=>Pn(e.id,t),onSave:t=>Nn(e,t),onCancel:()=>Fn(e.id)})]},e.id),lr=e=>{let t=[...nn].find(([,t])=>t===e)?.[0],n=kt.find(e=>e.id===t);if(n)return xn(n);if(t)return M({writing:t});let r=e.changes.find(e=>!e.answers)?.on;Zt(e.flow,e.at),On({flow:e.flow,at:e.at,...e.until===void 0&&(r?.element?{element:r.element}:r?.box&&{box:r.box})})},ur=()=>{M(void 0),ge!==`end`&&P.play()},dr=(e,n)=>{let r=!!j&&`note`in j&&j.note===e.id,i=!!e.on&&t.flows.some(t=>t.name===e.on.flow)&&e.on.flow!==L||(jt.includes(e.id)||At.includes(e.id))&&(ge!==`playing`||hn.current!==e.id),o=Ot.get(e.id),s=N&&!W,c=Dt.has(e.id)?{round:t.number,stopped:Dt.get(e.id)}:o&&(o.at===void 0||s)?{round:t.number,live:xe.current===e.id?_t:void 0,...o.at!==void 0&&{onTakeOver:()=>Te(e)}}:void 0;return(0,J.jsx)(Yu,{note:e,playhead:P,you:a,readOnly:W,open:r,fresh:re===e.id,answers:tu(Qt,e.id),compare:r&&!o&&!Dt.has(e.id)&&(Ue(e)||n)?kr:void 0,whereYouWere:c,asking:te===e.id,away:i,grown:n,whole:e.on?.at===void 0,onOpen:()=>xn(e),onClose:()=>M(void 0),onAsking:t=>ne(t?e.id:void 0),onJudge:t=>Ln(e,t),onEdit:t=>In(e.id,t),onPoint:cn,seen:e=>Qt.find(t=>t.changes.includes(e))?.at,onVisit:e.on?.at===void 0?t=>pn(e,t):void 0,onPlayOn:U&&xe.current===e.id?()=>{}:ur,onShow:()=>vn(e)},e.id)},fr=(0,l.useRef)({down:0,up:0,kept:!1}),pr=e=>{let t=fr.current,n=performance.now();if(e)return t.kept?(t.kept=!1,t.down=-1,Re(void 0)):(t.kept=n-t.up<350,t.down=n,Re(t.kept?`kept`:`held`));if(t.down===-1)return void(t.down=0);t.kept||(Re(void 0),t.up=n-t.down<300?n:0)},G=j&&`note`in j?kt.find(e=>e.id===j.note):void 0,mr=!!G&&!W&&G.on?.at!==void 0&&G.toJudge&&!g.verdicts.some(e=>e.note===G.id)&&G.on?.flow===L,hr=U&&!!G&&xe.current===G.id,gr=G?.on?.at!==void 0&&!G.on.app?{flow:G.on.flow,...bn(G)}:tn&&{flow:tn.flow,at:tn.at,until:void 0},_r=zu(P,({moment:e})=>!!gr&&!z?.shown&&(e.flow!==gr.flow||e.at<gr.at-kC||e.at>(gr.until??gr.at)+kC));(0,l.useEffect)(()=>{_r&&M(void 0)},[_r]);let vr=Je===void 0?void 0:f.rounds.find(e=>e.number===Je),yr=G&&yn(G),br=ke===`side`||Ye&&!!yr,xr=(G&&Et(G)?Tn.find(e=>e.notes?.some(e=>e.id===G.id)):void 0)??(I?.walked?I:void 0)??(br?Tn.find(e=>e.name===Fe.current):void 0);Fe.current=br?xr?.name:void 0;let Sr=(xr?.notes??[]).flatMap(({id:e})=>{let t=He.find(t=>t.id===e)?.on;return t?.app&&t.at!==void 0?[{id:e,at:t.at,app:t.app}]:[]}),Cr=Sr.toSorted((e,t)=>t.app.length-e.app.length)[0]?.app,wr=xr&&D.flows.find(e=>e.name===xr.name),Tr=wr?.steps.findLast(e=>e.title.startsWith(`Note `)),Er=wr&&Tr?wr.length-Tr.at:void 0,Dr=Math.max(...Sr.map(e=>e.at)),Or=vr&&Cr?BC(vr,[{name:FC(Cr.recording),session:PC(Cr.recording),...Cr,length:Er===void 0?Cr.length:Math.min(Cr.length,Dr+Er),notes:Sr.map(({id:e,at:t})=>({id:e,at:t}))}]):vr,kr=Or?.flows.some(e=>e.name===F)?{on:Ye||br,off:!!z?.shown,onPress:Qe,onRelease:$e}:void 0,Ar=br&&!!Or,jr=Ar?Or:void 0,Mr=Ar?!Ne:je,Nr=Ye&&!yr&&!!vr,Pr=Ar&&yr?`${G.id} ${yr.flow} ${yr.at} ${yr.until}`:void 0;(0,l.useEffect)(()=>{if(Pr&&yr)return hn.current=G.id,P.repeat({flow:yr.flow,at:yr.at},yr.until),()=>{P.pause(),P.go({flow:yr.flow,at:yr.until})}},[Pr]);let[Fr,Ir]=(0,l.useState)([]),[Lr,Rr]=(0,l.useState)(!1),zr=(0,l.useRef)(!1),Br=async(e,n)=>{let r=t=>e?fu(t,e,kt).sending:t,i=n?cu(p,t.number,n):p,o=Object.entries(i).filter(([e,n])=>Number(e)<=t.number&&du(r(n)));if(!o.length||zr.current)return!1;zr.current=!0;for(let[i,s]of o){let o={id:ul(),round:Number(i),by:a,sent:new Date().toISOString(),...uu(r(s))},c=await x(f.id,o);if(Ir(c),c.length)return zr.current=!1,!1;u(e=>[...e,o]),m(r=>cu(r,Number(i),r=>{let a=n&&Number(i)===t.number?n(r):r;return e?fu(a,e,kt).left:{...au,unsaved:a.unsaved}}))}return zr.current=!1,!0},Vr=async()=>{if(du(g)&&!await Br())return;let e=await S(f.id,a);Ir(e),!e.length&&(Rr(!0),le&&setTimeout(nr,900))},Hr=e=>[`to send`,`not saved`].includes(Lt?.get(e)?.is??``),Ur=e=>{let n=t.flows.slice(e+1).find(e=>Rt(e.name)),r=g.unsaved.find(e=>!e.on)??Pt.find(e=>e.state===`needs you`),i=n??(r?void 0:t.flows.slice(0,Math.max(0,e)).find(e=>Rt(e.name)));return i?{kind:`go`,words:`Next`,what:i.name,flow:i.name,take:()=>Hr(i.name)?Hn(i.name):Un(i.name)}:r&&`turns`in r?{kind:`go`,words:`Next to check`,what:r.turns[0]?.words,take:()=>xn(r)}:r?{kind:`go`,words:`Finish your note`,what:sr(r.on),take:()=>M({writing:r.id})}:jl(gu(f,a,p),a)?{kind:`go`,words:`All good`,what:`Accept the work`,take:Vr,final:!0}:hl(f).length?yt?{kind:`agent`,words:`The agent is working`,what:`since ${new Date(yt).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}`,busy:!0}:{kind:`agent`,words:`Sent, waiting for the agent`,busy:!1}:{kind:`say`,words:`All good`}},Wr=(()=>{if(f.accepted||Lr)return{kind:`done`,words:!f.accepted||f.accepted.by===a?`Accepted`:`Accepted by ${f.accepted.by}`,just:Lr};if(t!==n&&i)return{kind:`go`,words:`${Id(n.number)} is in`,what:`See it`,take:()=>Ve(n.number)};if(!N)return{kind:`go`,words:`Back to now`,what:Id(n.number),take:()=>Ve(n.number)};if(t.number===0)return{kind:`agent`,words:`The agent is working`,what:`on round 1`,busy:!0};if(!R)return Ur(-1);if(ge===`playing`)return{kind:`say`,words:`Playing`,what:R.name};if(ge!==`end`)return{kind:`go`,words:ge===`start`?`Play`:`Play on`,what:R.name,take:()=>P.play()};let e=g.unsaved.find(e=>e.on?.flow===R.name);return e&&Rt(R.name)?{kind:`go`,words:`Finish your note`,what:sr(e.on),take:()=>M({writing:e.id})}:Wt?Ht?.is===`good`||Ht?.is===`with the agent`?Zn(t.flows.indexOf(R)):{kind:`say`,words:`End of`,what:R.name}:Rt(R.name)?{kind:`go`,words:`Watch it`,what:`from the start`,take:()=>Wn(R.name)}:Ur(t.flows.indexOf(R))})(),Gr=A.length>0||du(g)>0||g.unsaved.length>0,Kr=(()=>{if(f.accepted||Lr)return;if(!N)return i?void 0:Wr;if(W)return;let e=Ur(-1);if(e.kind===`agent`)return e;if(e.kind===`go`)return e.flow?{...e,words:Gr?`Carry on checking`:`Start checking`,what:void 0,take:()=>{let t=Hr(e.flow);Xn(e.flow,!t),t&&Hn(e.flow)}}:e.final?e:{...e,take:()=>{Xn(void 0,!1),e.take()}}})(),qr=pe?Kr:Wr,Jr=[...Nt,...kt].filter(e=>e.state===`settled`).length,Yr=`Accepted${Jr?` · ${Jr} ${Jr===1?`note`:`notes`} settled`:``}`,Xr=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=e=>e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLInputElement,t=(e,t)=>{let n=e.target.closest?.(t);return!!n&&n!==Xr.current},r=e=>Xr.current=e.target.closest?.(`button, [role=button], [role=slider]`)??null,i=r=>{if(r.key===`Tab`&&(Xr.current=null),r.key===`Enter`&&(r.ctrlKey||r.metaKey)&&!e(r)&&!z?.shown&&qr?.kind===`go`&&qr.final)return r.preventDefault(),qr.take();if(!(e(r)||r.metaKey||r.ctrlKey||r.altKey||r.defaultPrevented)&&(!z?.shown||/^(n|t|escape)$/i.test(r.key))){if(pe)r.key===` `?(r.preventDefault(),Xn(Gn.current?.querySelector(`[data-picture]`)?.dataset.picture??P.flow.name,!0)):r.key===`Enter`&&!t(r,`button`)&&Kr?.kind===`go`&&!Kr.final&&(r.preventDefault(),Kr.take());else if(r.key===` `)r.preventDefault(),P.toggle();else if(r.key===`ArrowRight`||r.key===`ArrowLeft`){if(r.target.closest?.(`[role=slider][aria-label=Rounds]`))return;r.preventDefault(),Ct(r.key===`ArrowRight`?1:-1,r.shiftKey)}else r.key===`ArrowDown`||r.key===`ArrowUp`?(r.preventDefault(),ir(r.key===`ArrowDown`?1:-1)):r.key.toLowerCase()===`h`?r.repeat||pr(!0):r.key===`Enter`&&!t(r,`button, [role=button], [role=slider]`)?mr?(r.preventDefault(),Ln(G,{note:G.id,verdict:`looks good`}),ur()):G||tn?(r.preventDefault(),ur()):Wt&&Ht?.is===`to send`?(r.preventDefault(),Bn(Wt)):Wt&&Ht?.is!==`good`&&Ht?.is!==`with the agent`&&Ht?.is!==`not saved`?(r.preventDefault(),zn(Wt)):j&&!zt||Wr.kind!==`go`||Wr.final||(r.preventDefault(),Wr.take()):r.key.toLowerCase()===`x`&&!r.repeat?(r.preventDefault(),mr?ne(G.id):tn&&!W?lr(tn):Wt&&Ht?.is!==`not saved`&&On({flow:Wt})):r.key.toLowerCase()===`c`&&!r.repeat&&kr&&!z?.shown?Qe():r.key.toLowerCase()===`n`&&!r.repeat?(r.preventDefault(),An()):r.key===`Escape`&&it?at(!1):r.key.toLowerCase()===`t`&&!r.repeat?(r.preventDefault(),we()):r.key===`Escape`&&z?.shown?Se():r.key===`Escape`&&(Ye||Ar)?(Xe(!1),Be(`one`)):r.key===`Escape`&&(j&&!zt?M(void 0):le?nr():N||Ve(n.number))}},a=t=>{t.key===` `&&!e(t)&&t.preventDefault(),t.key.toLowerCase()===`h`&&pr(!1),t.key.toLowerCase()===`c`&&$e()},o=()=>fr.current.kept||Re(void 0);return addEventListener(`keydown`,i),addEventListener(`keyup`,a),addEventListener(`blur`,o),addEventListener(`pointerdown`,r,!0),()=>{removeEventListener(`pointerdown`,r,!0),removeEventListener(`keydown`,i),removeEventListener(`keyup`,a),removeEventListener(`blur`,o)}});let Zr=e=>{let t=[...nn].find(([,t])=>t===e)?.[0],n=kt.find(e=>e.id===t);return t===void 0?void 0:n?Eu(n):`var(--amber)`},Qr=e=>e?.element?.node===void 0?e?.point?{point:e.point}:e?.box?{box:e.box}:void 0:{node:e.element.node},$r=e=>[Qr(e),...(e?.alike??[]).map(e=>e.node!==void 0&&{node:e.node})].filter(e=>!!e),ei=e=>{let t=e.filter(e=>e.change.id===sn);return t.length?t:e},ti=dn&&kt.find(e=>e.id===ln?.note),ni=e=>{let[t,n]=G&&G.on?.at!==void 0?[G,ei(tu(Qt,G.id).filter(e=>e.on.flow===L))]:ti&&dn.flow===L?[ti,tu(Qt,ti.id).filter(e=>dn.changes.includes(e))]:[void 0,[]];return t?n.flatMap(n=>$r(e(n)).map(e=>({id:n.change.id,kind:`change`,on:e,ink:Eu(t),answers:t.id,pointed:n.change.id===sn,chosen:t===ti}))):[]},ri=e=>ei(e.changes),ii=e=>e.until===void 0||bt?.flow!==e.flow?[]:[...new Set(bt.acted.filter(([t])=>t>=e.at&&t<=e.until).map(([,e])=>e))].map(e=>({node:e})),ai=(mn?ri(mn):[]).flatMap(e=>Qr(e.on)?$r(e.on):ii(mn)),oi=new Map([[t.number,[...Ft.flatMap(e=>{let t=!nn.has(e.id)&&IC(e.on)===F&&Qr(e.on),n=G?.id===e.id;return t?[{id:e.id,kind:`note`,on:t,pin:{number:e.number,fill:Tu(e)},ink:Eu(e),chosen:n,shows:n?void 0:bn(e)}]:[]}),...or?.on&&IC(or.on)===F&&or.on.element?.node!==void 0&&!nn.has(or.id)?[{id:or.id,kind:`writing`,on:{node:or.on.element.node},chosen:!0}]:[],...ai.map((e,t)=>({id:mn.id,kind:`change`,on:e,pin:t===0?`diamond`:void 0,dot:Zr(mn),chosen:mn===tn||mn===rn})),...ni(e=>e.on)]]]),si=jr??vr;if(si){let e=G&&He.find(e=>e.id===G.id),n=e?.on&&Qr(AS(f,e.id,e.on,e.written,si,Tt));oi.set(si.number,[...n?[{id:e.id,kind:`note`,on:n,ink:Eu(e),chosen:!0}]:[],...tn?.flow===L?ri(tn).flatMap(e=>$r(PS(f,e.on,t.number,si,Tt)).map(e=>({id:tn.id,kind:`change`,on:e,chosen:!0}))):[],...ni(e=>PS(f,e.on,t.number,si,Tt))])}let ci={round:t,playhead:P,notes:kt,diamonds:Qt,chosen:tn?.id,standing:e=>Lt?.get(e),unseen:Rn,asked:Wt,landed:Bt,note:dr,grown:new Map([...nn].map(([e,t])=>[e,t.id])),compare:an?.flow===L?kr:void 0,onDiamond:_n,onClose:()=>M(void 0),onPoint:cn,onPlayOn:ur,onNoteOn:lr,onNote:xn,onGood:zn,onNotQuite:e=>On({flow:e}),onSend:e=>void Bn(e),onward:Ht&&Ht.is!==`not saved`?Zn(R?t.flows.indexOf(R):-1):Wr,waiting:Qn(Ur(R?t.flows.indexOf(R):-1)),onAgain:e=>Wn(e.name)};return(0,J.jsxs)(jC,{title:f.title,children:[(0,J.jsx)(DC,{id:rn?.id??G?.id??tn?.id,colour:G?Eu(G):rn?`var(--amber)`:`var(--soft)`,hidden:!!Le||Nr||U,faded:ye}),(0,J.jsxs)(`main`,{className:`relative grid min-h-0 grid-cols-[minmax(0,1fr)] phone:flex phone:flex-col`,children:[(0,J.jsxs)(`section`,{inert:pe,className:`grid min-h-0 min-w-0 grid-rows-[minmax(0,1fr)_auto] pb-4 phone:flex-none phone:grid-rows-[auto_auto] phone:pr-0 phone:pb-3 ${pe?`invisible`:``}`,children:[(0,J.jsxs)(`div`,{className:`relative grid min-h-0 grid-rows-[minmax(0,1fr)] pb-6`,children:[(0,J.jsx)(WS,{ending:qt,review:f,playhead:P,round:D,earlier:jr,about:xr&&Cr?{earlier:`what you did`,now:`your steps again`}:void 0,then:!Ar&&(Nr||!ye)?Or:void 0,peeking:Nr,zoomed:Mr,bare:Le,onShown:H,onBareOff:()=>{fr.current.kept=!1,Re(void 0)},marks:oi,placing:or?.on?.point,writing:!!or,onPlace:W||!it?void 0:e=>{at(!1);let t=I&&{from:I.from,did:I.did,recording:I.recording,length:I.length};R&&On({flow:R.name,at:Math.round(Math.max(0,P.now.moment.at)*100)/100,...e,...t&&{app:t}})},onMark:e=>{let t=kt.find(t=>t.id===e),n=Qt.find(t=>t.id===e);t?xn(t):n&&_n(n)},read:Tt,onGone:Mt,onAllFlows:le?()=>nr():void 0,over:i?{words:`${Id(n.number)} is in`,take:()=>Ve(n.number)}:N?void 0:{words:Id(t.number)},live:z}),(0,J.jsx)(`div`,{className:`absolute bottom-6 left-1/2 z-20 -translate-x-1/2 translate-y-1/2`,children:(0,J.jsx)(_d,{live:_t,latest:N,compare:_t===`shown`?void 0:kr,noting:it,onNote:W?void 0:An,onTakeOver:we,onBack:()=>Se(),flow:L??``,notes:kt.filter(e=>e.on?.flow===L&&e.on.at!==void 0&&e.turns[0]?.words).sort((e,t)=>e.on.at-t.on.at).map(e=>({id:e.id,ink:Eu(e),words:e.turns[0].words,at:fl(e.on.at),app:!!e.on.app||Ot.has(e.id)})),whole:Yt&&{end:Yt.end,words:Yt.words,notes:kt.filter(e=>e.on?.flow===L&&e.on.at===void 0&&e.turns[0]?.words).length},onWhole:()=>{tt(!1),z?.shown&&Se(),Yt?.go()},listed:et,onList:e=>(tt(e),e||rt(void 0)),onLight:rt,onSaid:e=>{tt(!1),rt(void 0);let t=kt.find(t=>t.id===e);z?.shown&&Se(),t&&xn(t)}})})]}),z?.problems&&(0,J.jsxs)(`div`,{role:`alert`,className:`fixed right-4 bottom-4 z-30 max-w-[28rem] animate-arrive rounded-lg bg-surface px-3 py-2 text-sm whitespace-pre-wrap shadow-tip [overflow-wrap:anywhere]`,children:[z.problems.join(`
|
|
193
|
+
`),(0,J.jsx)(`button`,{className:`ml-3 text-soft hover:text-fg`,onClick:()=>B(void 0),children:`Close`})]}),(0,J.jsx)(`div`,{ref:qn,className:`flex items-end gap-5 phone:flex-col phone:items-stretch phone:gap-0`,children:(0,J.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,J.jsx)(Qd,{stage:!0,end:Yt,forks:St,lit:nt,growing:U?dt:void 0,live:_t,onTakeOver:we,playhead:P,dots:Ft.filter(e=>!nn.has(e.id)).map(e=>({id:e.id,...bn(e),ink:Eu(e),number:e.number,words:e.turns[0]?.words??``,...e.on?.app&&{fork:IC(e.on)}})),onDot:e=>{let t=kt.find(t=>t.id===e);t&&xn(t)},marks:Qt.filter(e=>e.flow===L&&(e.row||e===dn)).map(e=>{let t=e===dn?ti:kt.find(t=>nn.get(t.id)===e);return{...e,note:t&&{number:t.number,ink:Eu(t)},lit:e.id===on||!!t&&(t===G||e===dn)}}),onMark:e=>{let t=Qt.find(t=>t.id===e);t&&_n(t)},shown:Ie,zoomed:Mr,onSize:()=>Ar?Pe(!Ne):Me(!je),rounds:f.rounds,watching:t.number,earlier:jr?.number,arrived:i?n:void 0,working:yt,onRound:Ve,onEarlier:()=>{},look:ke,onLook:Be})})})]}),(0,J.jsx)(Ed,{id:G?.id??kn??tn?.id,standing:qt,still:ye,resting:(or?or.on?.app:G&&(G.on?.app||xe.current===G.id))?void 0:_t,over:(!kn||Gt)&&!tn&&(Kt||!!G&&Ot.has(G.id)&&!G.on?.element&&!hr),pinned:G&&U&&(G.on?.app||hr)?()=>ht.current.get(G.id):void 0,onAway:G&&!hr||tn?()=>M(void 0):void 0,children:et||pe?void 0:G?dr(G):or&&!Gt?cr(or):tn||Kt?(0,J.jsx)(rd,{...ci,writing:Gt&&or?cr(or):void 0}):void 0}),le&&(0,J.jsx)(mC,{room:Gn,review:f,round:t,up:pe,standing:e=>Lt?.get(e),needs:Rt,accepted:f.accepted||Lr?Yr:void 0,step:Kr,trouble:Fr,onFlow:e=>Xn(e,!0),back:$n,arrived:i?n:void 0,working:yt,onRound:Ve})]})]})}var PC=e=>e.match(/^(?:branches\/(.+)-\d+|walks\/(.+))\.json$/)?.slice(1).find(Boolean)??e,FC=e=>`fork:${PC(e)}`,IC=e=>e.app?FC(e.app.recording):e.flow;function LC(e){let t=new Map,n=e=>void((t.get(e.name)?.length??0)<e.length&&t.set(e.name,e));for(let{on:t}of e)t?.app&&n({name:FC(t.app.recording),session:PC(t.app.recording),...t.app});return[...t.values()]}function RC({does:e,what:t}){let n=t?`“${t}”`:`What you did next`;return e===`fill`||e===`type`?`${n} isn’t there to type into any more.`:e===`selectOption`?`${n} isn’t there to choose from any more.`:`${n} isn’t there to click any more.`}function zC(e){let t=new Map;for(let{note:n,on:r}of e.replies){if(!r?.app||r.at===void 0)continue;let e=FC(r.app.recording);(t.get(e)??t.set(e,{name:e,session:PC(r.app.recording),...r.app,walked:!0,notes:[]}).get(e)).notes.push({id:n,at:r.at})}return[...t.values()]}function BC(e,t){if(!t.length)return e;let n=e=>t.filter(t=>t.from.flow===e.name).map(t=>({name:t.name,length:t.length,steps:[...e.steps.filter(e=>e.at<t.from.at),{title:`In the app`,at:t.from.at},...(t.notes??[]).toSorted((e,t)=>e.at-t.at).map(e=>({title:`Note ${e.id}`,at:e.at}))],recording:t.recording,person:`You`,fork:e.name}));return{...e,flows:e.flows.flatMap(e=>[e,...n(e)])}}function VC(e,t,n,r,i){let a=t.app.from,o=e.rounds.find(e=>e.number===n)?.flows.find(e=>e.name===a.flow),s=r.flows.find(e=>e.name===a.flow),c=o&&wl(o,a.at),l=c&&s?.steps.find(e=>e.title===c.step);if(!o||!s||!c||!l||(l.actions?.length??0)<(c.actions??0))return{};let u=xl(a.at,o,s),d=Math.round((vC(wl(s,u),c)?u:(c.actions?l.actions[c.actions-1]:l.actions?.at(-1)??l.at)+.05)*100)/100,f=i(r.number,s.name)??[],p=f.findLast(e=>e.at<=d+.05)??f[0],m=t.element&&p?.things.find(e=>e.role===t.element.role&&e.name===t.element.name);return{at:d,...m&&{element:Il(m,t.element.name)}}}var HC=e=>e.normalize(`NFKD`).replace(/[\u0300-\u036f]/g,``).toLowerCase().replace(/['’]/g,``).replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``);function UC(){let e=d();return e?(0,J.jsx)(jC,{children:(0,J.jsxs)(`ul`,{className:`mx-auto w-full max-w-xl self-start pt-10`,children:[e.length===0&&(0,J.jsx)(`li`,{className:`text-soft`,children:`There are no reviews here yet. An agent starts one with playthrough start.`}),e.map(e=>(0,J.jsx)(`li`,{children:(0,J.jsxs)(`a`,{href:`/${e.id}`,className:`flex items-baseline gap-4 rounded-lg px-3 py-2.5 transition-colors duration-150 ease-calm hover:bg-hover`,children:[(0,J.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium`,children:e.title}),(0,J.jsx)(`span`,{className:`text-xs text-faint`,children:e.accepted?`Accepted`:e.rounds===0?`No rounds yet`:e.rounds===1?`1 round`:`${e.rounds} rounds`})]})},e.id))]})}):(0,J.jsx)(jC,{})}var[WC,GC]=location.pathname.slice(1).split(`/`).map(decodeURIComponent);(0,c.createRoot)(document.getElementById(`root`)).render(WC?(0,J.jsx)(AC,{id:WC,flow:GC}):(0,J.jsx)(UC,{}));
|