reactive-md 0.4.1 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/CHANGELOG-ch.md +144 -113
  2. package/CHANGELOG.md +144 -113
  3. package/LICENSE +21 -21
  4. package/README-ch.md +154 -123
  5. package/README-en.md +179 -147
  6. package/README.md +179 -147
  7. package/SECURITY-ch.md +4 -3
  8. package/SECURITY.md +4 -3
  9. package/THIRD_PARTY_NOTICES.md +138 -1
  10. package/bin/reactive-md.mjs +1 -1
  11. package/dist-library/reactive-md-editor.css +2 -0
  12. package/dist-library/reactive-md-editor.js +3834 -0
  13. package/dist-library/reactive-md-react.js +9324 -1670
  14. package/dist-library/reactive-md.css +1 -1
  15. package/dist-library/reactive-md.js +426 -305
  16. package/dist-library/{runtime-D3QTVYaz.js → runtime-CXBdLQ3A.js} +8950 -2895
  17. package/dist-library/types/editor/ReactiveMarkdownEditor.d.ts +7 -0
  18. package/dist-library/types/editor/editor-commands.d.ts +50 -0
  19. package/dist-library/types/editor/editor-i18n.d.ts +109 -0
  20. package/dist-library/types/editor/editor-toolbar.d.ts +24 -0
  21. package/dist-library/types/editor/editor-view-bar.d.ts +11 -0
  22. package/dist-library/types/editor/extended-native-components.d.ts +58 -0
  23. package/dist-library/types/editor/index.d.ts +9 -0
  24. package/dist-library/types/editor/locale.d.ts +13 -0
  25. package/dist-library/types/editor/native-components.d.ts +47 -0
  26. package/dist-library/types/editor/source-authoring.d.ts +57 -0
  27. package/dist-library/types/editor/types.d.ts +51 -0
  28. package/dist-library/types/editor/use-gutter-metrics.d.ts +5 -0
  29. package/dist-library/types/editor/use-source-history.d.ts +16 -0
  30. package/dist-library/types/local/LocalDocumentView.d.ts +10 -3
  31. package/dist-library/types/local/code-block.d.ts +26 -0
  32. package/dist-library/types/local/diagnostics.d.ts +25 -0
  33. package/dist-library/types/local/footnotes.d.ts +51 -0
  34. package/dist-library/types/local/heading-anchors.d.ts +2 -0
  35. package/dist-library/types/local/html.d.ts +16 -0
  36. package/dist-library/types/local/image-view.d.ts +23 -0
  37. package/dist-library/types/local/index.d.ts +1 -1
  38. package/dist-library/types/local/options.d.ts +29 -0
  39. package/dist-library/types/local/types.d.ts +42 -1
  40. package/dist-library/types/local/worker.d.ts +18 -6
  41. package/dist-library/types/shareable.d.ts +9 -1
  42. package/dist-standalone/reactive-md-standalone.css +1 -1
  43. package/dist-standalone/reactive-md-standalone.js +49 -38
  44. package/docs/compatibility-ch.md +12 -8
  45. package/docs/compatibility-en.md +12 -8
  46. package/docs/component-protocol-ch.md +2 -2
  47. package/docs/component-protocol-en.md +2 -2
  48. package/docs/editor-ch.md +235 -0
  49. package/docs/editor-en.md +235 -0
  50. package/docs/html-compatibility-ch.md +98 -0
  51. package/docs/html-compatibility-en.md +98 -0
  52. package/docs/local-guide-ch.md +11 -5
  53. package/docs/local-guide-en.md +11 -5
  54. package/docs/local-integration-ch.md +4 -1
  55. package/docs/local-integration-en.md +4 -1
  56. package/docs/local-interaction-syntax-ch.md +9 -2
  57. package/docs/local-interaction-syntax-en.md +7 -2
  58. package/docs/release-0.4.1-ch.md +23 -23
  59. package/docs/release-0.4.1-en.md +23 -23
  60. package/docs/release-0.5.0-ch.md +41 -0
  61. package/docs/release-0.5.0-en.md +41 -0
  62. package/docs/release-0.5.1-ch.md +39 -0
  63. package/docs/release-0.5.1-en.md +39 -0
  64. package/docs/releasing-ch.md +108 -101
  65. package/docs/releasing-en.md +108 -101
  66. package/docs/shareable-export-ch.md +6 -2
  67. package/docs/shareable-export-en.md +6 -2
  68. package/examples/integration/core/package.json +7 -7
  69. package/examples/integration/react/index.html +12 -12
  70. package/examples/integration/react/main.jsx +21 -21
  71. package/examples/integration/react/package.json +9 -9
  72. package/examples/integration/react-editor.tsx +74 -0
  73. package/examples/local/README.md +2 -0
  74. package/examples/local/catalog.reactive.md +20 -20
  75. package/examples/local/checklist.reactive.md +32 -32
  76. package/examples/local/comparison.reactive.md +47 -47
  77. package/examples/local/components.reactive.md +44 -44
  78. package/examples/local/counter.reactive.md +7 -7
  79. package/examples/local/diagnostics.reactive.md +54 -54
  80. package/examples/local/diagram.reactive.md +44 -44
  81. package/examples/local/gallery.reactive.md +61 -61
  82. package/examples/local/html-compat.reactive.md +24 -0
  83. package/examples/local/parameters.reactive.md +36 -36
  84. package/examples/local/planning.reactive.md +24 -24
  85. package/examples/local/pricing.reactive.md +20 -20
  86. package/examples/local/zh/catalog.reactive.md +20 -20
  87. package/examples/local/zh/charts.reactive.md +73 -73
  88. package/examples/local/zh/checklist.reactive.md +32 -32
  89. package/examples/local/zh/comparison.reactive.md +47 -47
  90. package/examples/local/zh/components.reactive.md +44 -44
  91. package/examples/local/zh/counter.reactive.md +7 -7
  92. package/examples/local/zh/diagnostics.reactive.md +54 -54
  93. package/examples/local/zh/diagram.reactive.md +44 -44
  94. package/examples/local/zh/gallery.reactive.md +61 -61
  95. package/examples/local/zh/parameters.reactive.md +36 -36
  96. package/examples/local/zh/planning.reactive.md +24 -24
  97. package/examples/local/zh/pricing.reactive.md +20 -20
  98. package/package.json +135 -91
@@ -1,57 +1,68 @@
1
- var ReactiveMD=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),c=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},u=(e,r,i)=>(i=e==null?{}:t(a(e)),l(r||!e||!e.__esModule||!o.call(e,`default`)?n(i,`default`,{value:e,enumerable:!0}):i,e)),d=s((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}}}})),f=s(((e,t)=>{t.exports=d()})),p=s((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 P(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 te(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 F=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 ne(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,F)}catch(e){F(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function re(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 ne(re.bind(null,e))}var ie={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(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=ie,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=re,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:te}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ne,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`})),m=s(((e,t)=>{t.exports=p()})),h=s((e=>{var t=m();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 i={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},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(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=i,e.browser=function(e){return{$$typeof:o,_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 c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.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,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,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=u(t.as,t.crossOrigin);i.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??i.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=u(n,t.crossOrigin);i.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=u(t.as,t.crossOrigin);i.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 i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),g=s(((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=h()})),_=s((e=>{var t=f(),n=m(),r=g();function i(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 a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(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 s(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 c(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 l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}function p(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)&&p(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function h(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=h(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(i(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`),P=Symbol.for(`react.context`),te=Symbol.for(`react.forward_ref`),F=Symbol.for(`react.suspense`),ne=Symbol.for(`react.suspense_list`),re=Symbol.for(`react.memo`),ie=Symbol.for(`react.lazy`),ae=Symbol.for(`react.activity`),oe=Symbol.for(`react.legacy_hidden`),se=Symbol.for(`react.memo_cache_sentinel`),ce=Symbol.for(`react.view_transition`),le=Symbol.for(`react.recoverable`),ue=Symbol.iterator;function de(e){return typeof e!=`object`||!e?null:(e=ue&&e[ue]||e[`@@iterator`],typeof e==`function`?e:null)}var fe=Symbol.for(`react.client.reference`);function pe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===fe?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 F:return`Suspense`;case ne:return`SuspenseList`;case ae:return`Activity`;case ce:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case A:return`Portal`;case P:return e.displayName||`Context`;case ee:return(e._context.displayName||`Context`)+`.Consumer`;case te:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case re:return t=e.displayName||null,t===null?pe(e.type)||`Memo`:t;case ie:t=e._payload,e=e._init;try{return pe(e(t))}catch{}}return null}var me=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},ge=[],_e=-1;function ve(e){return{current:e}}function ye(e){0>_e||(e.current=ge[_e],ge[_e]=null,_e--)}function be(e,t){_e++,ge[_e]=e.current,e.current=t}var xe=ve(null),Se=ve(null),Ce=ve(null),we=ve(null);function Te(e,t){switch(be(Ce,t),be(Se,e),be(xe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?fp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=fp(t),e=pp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ye(xe),be(xe,e)}function Ee(){ye(xe),ye(Se),ye(Ce)}function De(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,be(we,e)),t=xe.current;var n=pp(t,e.type);t!==n&&(be(Se,e),be(xe,n))}function Oe(e){Se.current===e&&(ye(xe),ye(Se)),we.current===e&&(ye(we),sh._currentValue=he)}var ke,Ae;function je(e){if(ke===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ke=t&&t[1]||``,Ae=-1<e.stack.indexOf(`
1
+ var ReactiveMD=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),c=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},u=(e,r,i)=>(i=e==null?{}:t(a(e)),l(r||!e||!e.__esModule||!o.call(e,`default`)?n(i,`default`,{value:e,enumerable:!0}):i,e)),d=s((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}}}})),f=s(((e,t)=>{t.exports=d()})),p=s((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 P(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,P(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,`$&/`)+`/`),P(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+=P(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+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(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 F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ee(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 I=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 te(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,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ne(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 te(ne.bind(null,e))}var re={map:F,forEach:function(e,t,n){F(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return F(e,function(){t++}),t},toArray:function(e){return F(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=re,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=ne,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:ee}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=te,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`})),m=s(((e,t)=>{t.exports=p()})),h=s((e=>{var t=m();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 i={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},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(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=i,e.browser=function(e){return{$$typeof:o,_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 c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.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,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,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=u(t.as,t.crossOrigin);i.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??i.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=u(n,t.crossOrigin);i.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=u(t.as,t.crossOrigin);i.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 i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),g=s(((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=h()})),_=s((e=>{var t=f(),n=m(),r=g();function i(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 a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(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 s(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 c(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 l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}function p(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)&&p(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function h(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=h(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(i(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`),P=Symbol.for(`react.consumer`),F=Symbol.for(`react.context`),ee=Symbol.for(`react.forward_ref`),I=Symbol.for(`react.suspense`),te=Symbol.for(`react.suspense_list`),ne=Symbol.for(`react.memo`),re=Symbol.for(`react.lazy`),ie=Symbol.for(`react.activity`),ae=Symbol.for(`react.legacy_hidden`),oe=Symbol.for(`react.memo_cache_sentinel`),se=Symbol.for(`react.view_transition`),ce=Symbol.for(`react.recoverable`),le=Symbol.iterator;function ue(e){return typeof e!=`object`||!e?null:(e=le&&e[le]||e[`@@iterator`],typeof e==`function`?e:null)}var de=Symbol.for(`react.client.reference`);function fe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===de?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 I:return`Suspense`;case te:return`SuspenseList`;case ie:return`Activity`;case se:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case A:return`Portal`;case F:return e.displayName||`Context`;case P:return(e._context.displayName||`Context`)+`.Consumer`;case ee:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ne:return t=e.displayName||null,t===null?fe(e.type)||`Memo`:t;case re:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var pe=Array.isArray,L=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},he=[],ge=-1;function _e(e){return{current:e}}function ve(e){0>ge||(e.current=he[ge],he[ge]=null,ge--)}function ye(e,t){ge++,he[ge]=e.current,e.current=t}var be=_e(null),xe=_e(null),Se=_e(null),Ce=_e(null);function we(e,t){switch(ye(Se,t),ye(xe,e),ye(be,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?fp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=fp(t),e=pp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ve(be),ye(be,e)}function Te(){ve(be),ve(xe),ve(Se)}function Ee(e){var t=e.memoizedState;t!==null&&(lh._currentValue=t.memoizedState,ye(Ce,e)),t=be.current;var n=pp(t,e.type);t!==n&&(ye(xe,e),ye(be,n))}function De(e){xe.current===e&&(ve(be),ve(xe)),Ce.current===e&&(ve(Ce),lh._currentValue=me)}var Oe,ke;function Ae(e){if(Oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Oe=t&&t[1]||``,ke=-1<e.stack.indexOf(`
2
2
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
- `+ke+e+Ae}var Me=!1;function Ne(e,t){if(!e||Me)return``;Me=!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(`
3
+ `+Oe+e+ke}var je=!1;function Me(e,t){if(!e||je)return``;je=!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
4
  `),l=s.split(`
5
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{Me=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?je(n):``}function Pe(e,t){switch(e.tag){case 26:case 27:case 5:return je(e.type);case 16:return je(`Lazy`);case 13:return e.child!==t&&t!==null?je(`Suspense Fallback`):je(`Suspense`);case 19:return je(`SuspenseList`);case 0:case 15:return Ne(e.type,!1);case 11:return Ne(e.type.render,!1);case 1:return Ne(e.type,!0);case 31:return je(`Activity`);case 30:return je(`ViewTransition`);default:return``}}function Fe(e){try{var t=``,n=null;do t+=Pe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
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{je=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ae(n):``}function Ne(e,t){switch(e.tag){case 26:case 27:case 5:return Ae(e.type);case 16:return Ae(`Lazy`);case 13:return e.child!==t&&t!==null?Ae(`Suspense Fallback`):Ae(`Suspense`);case 19:return Ae(`SuspenseList`);case 0:case 15:return Me(e.type,!1);case 11:return Me(e.type.render,!1);case 1:return Me(e.type,!0);case 31:return Ae(`Activity`);case 30:return Ae(`ViewTransition`);default:return``}}function Pe(e){try{var t=``,n=null;do t+=Ne(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
7
  Error generating stack: `+e.message+`
8
- `+e.stack}}var Ie=Object.prototype.hasOwnProperty,Le=t.unstable_scheduleCallback,Re=t.unstable_cancelCallback,ze=t.unstable_shouldYield,Be=t.unstable_requestPaint,Ve=t.unstable_now,He=t.unstable_getCurrentPriorityLevel,Ue=t.unstable_ImmediatePriority,We=t.unstable_UserBlockingPriority,Ge=t.unstable_NormalPriority,Ke=t.unstable_LowPriority,qe=t.unstable_IdlePriority,Je=t.log,Ye=t.unstable_setDisableYieldValue,Xe=null,Ze=null;function Qe(e){if(typeof Je==`function`&&Ye(e),Ze&&typeof Ze.setStrictMode==`function`)try{Ze.setStrictMode(Xe,e)}catch{}}var $e=Math.clz32?Math.clz32:nt,et=Math.log,tt=Math.LN2;function nt(e){return e>>>=0,e===0?32:31-(et(e)/tt|0)|0}var R=256,rt=262144,it=4194304;function at(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 ot(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=at(n))):i=at(o):i=at(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=at(n))):i=at(o)):i=at(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 st(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ct(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-$e(n),i=1<<r;t|=e[r],n&=~i}return t}function lt(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 ut(){var e=it;return it<<=1,!(it&62914560)&&(it=4194304),e}function dt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ft(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function pt(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-$e(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&&mt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function mt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-$e(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ht(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-$e(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function gt(e,t){var n=t&-t;return n=n&42?1:_t(n),(n&(e.suspendedLanes|t))===0?n:0}function _t(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 vt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function yt(){var e=L.p;return e===0?(e=window.event,e===void 0?32:Ch(e.type)):e}function bt(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var xt=Math.random().toString(36).slice(2),St=`__reactFiber$`+xt,Ct=`__reactProps$`+xt,wt=`__reactContainer$`+xt,Tt=`__reactEvents$`+xt,Et=`__reactListeners$`+xt,Dt=`__reactHandles$`+xt,Ot=`__reactResources$`+xt,kt=`__reactMarker$`+xt,At=`__reactLoad$`+xt;function z(e){delete e[St],delete e[Ct],delete e[Et],delete e[Dt]}function jt(e){var t;if(t=e[St])return t;for(var n=e.parentNode;n;){if(t=n[wt]||n[St]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pm(e);e!==null;){if(n=e[St])return n;e=pm(e)}return t}e=n,n=e.parentNode}return null}function Mt(e){if(e=e[St]||e[wt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Nt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Pt(e){var t=e[Ot];return t||=e[Ot]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Ft(e){e[kt]=!0}function It(e){e[At]=void 0}var Lt=new Set,Rt={};function zt(e,t){Bt(e,t),Bt(e+`Capture`,t)}function Bt(e,t){for(Rt[e]=t,e=0;e<t.length;e++)Lt.add(t[e])}var Vt=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]*$`),Ht={},Ut={};function Wt(e){return Ie.call(Ut,e)?!0:Ie.call(Ht,e)?!1:Vt.test(e)?Ut[e]=!0:(Ht[e]=!0,!1)}var Gt=!1;function Kt(){var e=Gt;return Gt=!1,e}function qt(e,t,n){if(Wt(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 Jt(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 Yt(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 Xt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Zt(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 $t(e){if(!e._valueTracker){var t=Zt(e)?`checked`:`value`;e._valueTracker=Qt(e,t,``+e[t])}}function en(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Zt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var tn=/[\n"\\]/g;function nn(e){return e.replace(tn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function B(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=``+Xt(t)):e.value!==``+Xt(t)&&(e.value=``+Xt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):an(e,Xt(n)):o===`number`&&e.value==t?an(e,Xt(e.value)):an(e,Xt(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=``+Xt(s):e.removeAttribute(`name`)}function rn(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)){$t(e);return}n=n==null?``:``+Xt(n),t=t==null?n:``+Xt(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),$t(e)}function an(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function on(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=``+Xt(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 sn(e,t,n){t!=null&&(t=``+Xt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Xt(n)}function cn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(me(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Xt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),$t(e)}function ln(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var un=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 dn(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||un.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function fn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(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]=``,Gt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(dn(e,a,r),Gt=!0)}else for(var o in t)t.hasOwnProperty(o)&&dn(e,o,t[o])}function pn(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 mn=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`]]),hn=/^[\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 gn(e){return hn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function _n(){}var vn=null;function yn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bn=null,xn=null;function Sn(e){var t=Mt(e);if(t&&(e=t.stateNode)){var n=e[Ct]||null;a:switch(e=t.stateNode,t.type){case`input`:if(B(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="`+nn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Ct]||null;if(!a)throw Error(i(90));B(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&en(r)}break a;case`textarea`:sn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&on(e,!!n.multiple,t,!1)}}}var Cn=!1;function wn(e,t,n){if(Cn)return e(t,n);Cn=!0;try{return e(t)}finally{if(Cn=!1,(bn!==null||xn!==null)&&(Vd(),bn&&(t=bn,e=xn,xn=bn=null,Sn(t),e)))for(t=0;t<e.length;t++)Sn(e[t])}}function Tn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Ct]||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(i(231,t,typeof n));return n}var En=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Dn=!1;if(En)try{var On={};Object.defineProperty(On,"passive",{get:function(){Dn=!0}}),window.addEventListener(`test`,On,On),window.removeEventListener(`test`,On,On)}catch{Dn=!1}var kn=null,An=null,jn=null;function Mn(){if(jn)return jn;var e,t=An,n=t.length,r,i=`value`in kn?kn.value:kn.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 jn=i.slice(e,1<r?1-r:void 0)}function Nn(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 Pn(){return!0}function Fn(){return!1}function In(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)?Pn:Fn,this.isPropagationStopped=Fn,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=Pn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Pn)},persist:function(){},isPersistent:Pn}),t}var Ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rn=In(Ln),zn=D({},Ln,{view:0,detail:0}),Bn=In(zn),Vn,Hn,Un,Wn=D({},zn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tr,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!==Un&&(Un&&e.type===`mousemove`?(Vn=e.screenX-Un.screenX,Hn=e.screenY-Un.screenY):Hn=Vn=0,Un=e),Vn)},movementY:function(e){return`movementY`in e?e.movementY:Hn}}),Gn=In(Wn),Kn=In(D({},Wn,{dataTransfer:0})),qn=In(D({},zn,{relatedTarget:0})),Jn=In(D({},Ln,{animationName:0,elapsedTime:0,pseudoElement:0})),Yn=In(D({},Ln,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Xn=In(D({},Ln,{data:0})),Zn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Qn={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`},$n={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function er(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$n[e])?!!t[e]:!1}function tr(){return er}var nr=In(D({},zn,{key:function(e){if(e.key){var t=Zn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Nn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Qn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tr,charCode:function(e){return e.type===`keypress`?Nn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Nn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),rr=In(D({},Wn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),ir=In(D({},Ln,{submitter:0})),ar=In(D({},zn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tr})),or=In(D({},Ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),sr=In(D({},Wn,{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})),cr=In(D({},Ln,{newState:0,oldState:0,source:0})),lr=[9,13,27,32],ur=En&&`CompositionEvent`in window,dr=null;En&&`documentMode`in document&&(dr=document.documentMode);var fr=En&&`TextEvent`in window&&!dr,pr=En&&(!ur||dr&&8<dr&&11>=dr),mr=` `,hr=!1;function gr(e,t){switch(e){case`keyup`:return lr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function _r(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var vr=!1;function yr(e,t){switch(e){case`compositionend`:return _r(t);case`keypress`:return t.which===32?(hr=!0,mr):null;case`textInput`:return e=t.data,e===mr&&hr?null:e;default:return null}}function br(e,t){if(vr)return e===`compositionend`||!ur&&gr(e,t)?(e=Mn(),jn=An=kn=null,vr=!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 pr&&t.locale!==`ko`?null:t.data;default:return null}}var xr={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 Sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!xr[e.type]:t===`textarea`}function Cr(e,t,n,r){bn?xn?xn.push(r):xn=[r]:bn=r,t=Xf(t,`onChange`),0<t.length&&(n=new Rn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var wr=null,Tr=null;function Er(e){Wf(e,0)}function Dr(e){if(en(Nt(e)))return e}function Or(e,t){if(e===`change`)return t}var kr=!1;if(En){var Ar;if(En){var jr=`oninput`in document;if(!jr){var Mr=document.createElement(`div`);Mr.setAttribute(`oninput`,`return;`),jr=typeof Mr.oninput==`function`}Ar=jr}else Ar=!1;kr=Ar&&(!document.documentMode||9<document.documentMode)}function Nr(){wr&&(wr.detachEvent(`onpropertychange`,Pr),Tr=wr=null)}function Pr(e){if(e.propertyName===`value`&&Dr(Tr)){var t=[];Cr(t,Tr,e,yn(e)),wn(Er,t)}}function Fr(e,t,n){e===`focusin`?(Nr(),wr=t,Tr=n,wr.attachEvent(`onpropertychange`,Pr)):e===`focusout`&&Nr()}function Ir(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Dr(Tr)}function Lr(e,t){if(e===`click`)return Dr(t)}function Rr(e,t){if(e===`input`||e===`change`)return Dr(t)}function zr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Br=typeof Object.is==`function`?Object.is:zr;function Vr(e,t){if(Br(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(!Ie.call(t,i)||!Br(e[i],t[i]))return!1}return!0}function Hr(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 Ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wr(e,t){var n=Ur(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=Ur(n)}}function Gr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Hr(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=Hr(e.document)}return t}function qr(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 Jr=En&&`documentMode`in document&&11>=document.documentMode,Yr=null,Xr=null,Zr=null,Qr=!1;function $r(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qr||Yr==null||Yr!==Hr(r)||(r=Yr,`selectionStart`in r&&qr(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}),Zr&&Vr(Zr,r)||(Zr=r,r=Xf(Xr,`onSelect`),0<r.length&&(t=new Rn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Yr)))}function ei(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ti={animationend:ei(`Animation`,`AnimationEnd`),animationiteration:ei(`Animation`,`AnimationIteration`),animationstart:ei(`Animation`,`AnimationStart`),transitionrun:ei(`Transition`,`TransitionRun`),transitionstart:ei(`Transition`,`TransitionStart`),transitioncancel:ei(`Transition`,`TransitionCancel`),transitionend:ei(`Transition`,`TransitionEnd`)},ni={},ri={};En&&(ri=document.createElement(`div`).style,`AnimationEvent`in window||(delete ti.animationend.animation,delete ti.animationiteration.animation,delete ti.animationstart.animation),`TransitionEvent`in window||delete ti.transitionend.transition);function ii(e){if(ni[e])return ni[e];if(!ti[e])return e;var t=ti[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ri)return ni[e]=t[n];return e}var ai=ii(`animationend`),oi=ii(`animationiteration`),si=ii(`animationstart`),ci=ii(`transitionrun`),li=ii(`transitionstart`),ui=ii(`transitioncancel`),di=ii(`transitionend`),fi=new Map,pi=`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(` `);pi.push(`scrollEnd`);function mi(e,t){fi.set(e,t),zt(t,[e])}var V=0;function hi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Sd.identifierPrefix;var n=V++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function H(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 gi(e,t){return e=H(e),t=H(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var _i=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)},vi=[],U=0,yi=0;function bi(){for(var e=U,t=yi=U=0;t<e;){var n=vi[t];vi[t++]=null;var r=vi[t];vi[t++]=null;var i=vi[t];vi[t++]=null;var a=vi[t];if(vi[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&&wi(n,i,a)}}function xi(e,t,n,r){vi[U++]=e,vi[U++]=t,vi[U++]=n,vi[U++]=r,yi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Si(e,t,n,r){return xi(e,t,n,r),Ti(e)}function Ci(e,t){return xi(e,null,null,t),Ti(e)}function wi(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-$e(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Ti(e){if(50<jd)throw jd=0,Md=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ei={};function Di(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 Oi(e,t,n,r){return new Di(e,t,n,r)}function ki(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ai(e,t){var n=e.alternate;return n===null?(n=Oi(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 ji(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 Mi(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)ki(r)&&(s=1);else if(typeof r==`string`)s=$(e,n,xe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ae:return e=Oi(31,n,t,a),e.elementType=ae,e.lanes=o,e;case j:return Ni(n.children,a,o,t);case M:s=8,a|=24;break;case N:return e=Oi(12,n,t,a|2),e.elementType=N,e.lanes=o,e;case F:return e=Oi(13,n,t,a),e.elementType=F,e.lanes=o,e;case ne:return e=Oi(19,n,t,a),e.elementType=ne,e.lanes=o,e;case oe:case ce:return e=a|32,e=Oi(30,n,t,e),e.elementType=ce,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case P:s=10;break a;case ee:s=9;break a;case te:s=11;break a;case re:s=14;break a;case ie:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Oi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ni(e,t,n,r){return e=Oi(7,e,r,t),e.lanes=n,e}function Pi(e,t,n){return e=Oi(6,e,null,t),e.lanes=n,e}function Fi(e){var t=Oi(18,null,null,0);return t.stateNode=e,t}function Ii(e,t,n){return t=Oi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Li=new WeakMap;function Ri(e,t){if(typeof e==`object`&&e){var n=Li.get(e);return n===void 0?(t={value:e,source:t,stack:Fe(t)},Li.set(e,t),t):n}return{value:e,source:t,stack:Fe(t)}}var zi=[],Bi=0,Vi=null,Hi=0,Ui=[],Wi=0,Gi=null,Ki=1,qi=``;function Ji(e,t){zi[Bi++]=Hi,zi[Bi++]=Vi,Vi=e,Hi=t}function Yi(e,t,n){Ui[Wi++]=Ki,Ui[Wi++]=qi,Ui[Wi++]=Gi,Gi=e;var r=Ki;e=qi;var i=32-$e(r)-1;r&=~(1<<i),n+=1;var a=32-$e(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ki=1<<32-$e(t)+i|n<<i|r,qi=a+e}else Ki=1<<a|n<<i|r,qi=e}function Xi(e){e.return!==null&&(Ji(e,1),Yi(e,1,0))}function Zi(e){for(;e===Vi;)Vi=zi[--Bi],zi[Bi]=null,Hi=zi[--Bi],zi[Bi]=null;for(;e===Gi;)Gi=Ui[--Wi],Ui[Wi]=null,qi=Ui[--Wi],Ui[Wi]=null,Ki=Ui[--Wi],Ui[Wi]=null}function Qi(e,t){Ui[Wi++]=Ki,Ui[Wi++]=qi,Ui[Wi++]=Gi,Ki=t.id,qi=t.overflow,Gi=e}var $i=null,ea=null,W=!1,ta=null,na=!1,ra=Error(i(519));function ia(e){throw ua(Ri(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ra}function aa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[St]=e,t[Ct]=r,n){case`dialog`:Y(`cancel`,t),Y(`close`,t);break;case`iframe`:case`object`:case`embed`:Y(`load`,t);break;case`video`:case`audio`:for(n=0;n<Hf.length;n++)Y(Hf[n],t);break;case`source`:Y(`error`,t);break;case`img`:case`image`:case`link`:Y(`error`,t),Y(`load`,t);break;case`details`:Y(`toggle`,t);break;case`input`:Y(`invalid`,t),rn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Y(`invalid`,t);break;case`textarea`:Y(`invalid`,t),cn(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&&(Y(`beforetoggle`,t),Y(`toggle`,t)),r.onScroll!=null&&Y(`scroll`,t),r.onScrollEnd!=null&&Y(`scrollend`,t),r.onClick!=null&&(t.onclick=_n),t=!0):t=!1,t||ia(e,!0)}function oa(e){for($i=e.return;$i;)switch($i.tag){case 5:case 31:case 13:na=!1;return;case 27:case 3:na=!0;return;default:$i=$i.return}}function sa(e){if(e!==$i)return!1;if(!W)return oa(e),W=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||mp(e.type,e.memoizedProps)),n=!n),n&&ea&&ia(e),oa(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ea=fm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ea=fm(e)}else t===27?(t=ea,Cp(e.type)?(e=dm,dm=null,ea=e):ea=t):ea=$i?um(e.stateNode.nextSibling):null;return!0}function ca(){ea=$i=null,W=!1}function la(){var e=ta;return e!==null&&(hd===null?hd=e:hd.push.apply(hd,e),ta=null),e}function ua(e){ta===null?ta=[e]:ta.push(e)}var da=ve(null),fa=null,pa=null;function ma(e,t,n){be(da,t._currentValue),t._currentValue=n}function ha(e){e._currentValue=da.current,ye(da)}function ga(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 _a(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ga(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ga(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),ga(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function va(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Br(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===we.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sh]:e.push(sh))}a=a.return}return e!==null&&_a(t,e,n,r),t.flags|=262144,e!==null}function ya(e){for(e=e.firstContext;e!==null;){if(!Br(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ba(e){fa=e,pa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xa(e){return Ca(fa,e)}function Sa(e,t){return fa===null&&ba(e),Ca(e,t)}function Ca(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},pa===null){if(e===null)throw Error(i(308));pa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else pa=pa.next=t;return n}var wa=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()})}},Ta=t.unstable_scheduleCallback,Ea=t.unstable_NormalPriority,Da={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Oa(){return{controller:new wa,data:new Map,refCount:0}}function ka(e){e.refCount--,e.refCount===0&&Ta(Ea,function(){e.controller.abort()})}function Aa(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 ja=null;function Ma(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Na=null,Pa=0,Fa=0,Ia=null;function La(e,t){if(Na===null){var n=Na=[];Pa=0,Fa=Lf(),Ia={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Pa++,t.then(Ra,Ra),t}function Ra(){if(--Pa===0&&(ja=null,Na!==null)){Ia!==null&&(Ia.status=`fulfilled`);var e=Na;Na=null,Fa=0,Ia=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function za(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 Ba=I.S;I.S=function(e,t){if(vd=Ve(),typeof t==`object`&&t&&typeof t.then==`function`&&La(e,t),ja!==null)for(var n=Cf;n!==null;)Aa(n,ja),n=n.next;if(n=e.types,n!==null){for(var r=Cf;r!==null;)Aa(r,n),r=r.next;if(Fa!==0){r=ja,r===null&&(r=ja=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ba!==null&&Ba(e,t)};var Va=ve(null);function Ha(){var e=Va.current;return e===null?td.pooledCache:e}function Ua(e,t){t===null?be(Va,Va.current):be(Va,t.pool)}function Wa(){var e=Ha();return e===null?null:{parent:Da._currentValue,pool:e}}var Ga=Error(i(460)),Ka=Error(i(474)),qa=Error(i(542)),Ja={then:function(){}};function Ya(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Xa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(_n,_n),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,eo(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(_n,_n);else{if(e=td,e!==null&&100<e.shellSuspendCounter)throw Error(i(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,eo(e),e}throw Qa=t,Ga}}function Za(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Qa=e,Ga):e}}var Qa=null;function $a(){if(Qa===null)throw Error(i(459));var e=Qa;return Qa=null,e}function eo(e){if(e===Ga||e===qa)throw Error(i(483))}var to=null,no=0;function ro(e){var t=no;return no+=1,to===null&&(to=[]),Xa(to,e,t)}function io(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ao(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function oo(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 a(e,t){return e=Ai(e,t),e.index=0,e.sibling=null,e}function o(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 s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Pi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===j?(e=d(e,t,n.props.children,r,n.key),io(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ie&&Za(i)===t.type)?(t=a(t,n.props),io(t,n),t.return=e,t):(t=Mi(n.type,n.key,n.props,null,e.mode,r),io(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=Ii(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Ni(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Pi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case k:return n=Mi(t.type,t.key,t.props,null,e.mode,n),io(n,t),n.return=e,n;case A:return t=Ii(t,e.mode,n),t.return=e,t;case ie:return t=Za(t),f(e,t,n)}if(me(t)||de(t))return t=Ni(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ro(t),n);if(t.$$typeof===P)return f(e,Sa(e,t),n);ao(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 ie:return n=Za(n),p(e,t,n,r)}if(me(n)||de(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ro(n),r);if(n.$$typeof===P)return p(e,t,Sa(e,n),r);ao(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 ie:return r=Za(r),m(e,t,n,r,i)}if(me(r)||de(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ro(r),i);if(r.$$typeof===P)return m(e,t,n,Sa(t,r),i);ao(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=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),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),W&&Ji(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return W&&Ji(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)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),W&&Ji(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),W&&Ji(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return W&&Ji(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),W&&Ji(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===j&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===j){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),io(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ie&&Za(l)===r.type){n(e,r.sibling),c=a(r,o.props),io(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===j?(c=Ni(o.props.children,e.mode,c,o.key),io(c,o),c.return=e,e=c):(c=Mi(o.type,o.key,o.props,null,e.mode,c),io(c,o),c.return=e,e=c)}return s(e);case A:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Ii(o,e.mode,c),c.return=e,e=c}return s(e);case ie:return o=Za(o),_(e,r,o,c)}if(me(o))return h(e,r,o,c);if(de(o)){if(l=de(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,ro(o),c);if(o.$$typeof===P)return _(e,r,Sa(e,o),c);ao(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Pi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{no=0;var i=_(e,t,n,r);return to=null,i}catch(t){if(t===Ga||t===qa)throw t;var a=Oi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var so=oo(!0),co=oo(!1),lo=!1;function uo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fo(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 po(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function mo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ed&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ti(e),wi(e,null,n),t}return xi(e,r,t,n),Ti(e)}function ho(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,ht(e,n)}}function go(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 _o=!1;function vo(){if(_o){var e=Ia;if(e!==null)throw e}}function yo(e,t,n,r){_o=!1;var i=e.updateQueue;lo=!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?(q&f)===f:(r&f)===f){f!==0&&f===Fa&&(_o=!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:lo=!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),ld|=o,e.lanes=o,e.memoizedState=d}}function bo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function xo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)bo(n[e],t)}var So=ve(null),Co=ve(0);function wo(e,t){e=sd,be(Co,e),be(So,t),sd=e|t.baseLanes}function To(){be(Co,sd),be(So,So.current)}function Eo(){sd=Co.current,ye(So),ye(Co)}var Do=ve(null),Oo=null;function ko(e){var t=e.alternate;be(Po,Po.current&1),be(Do,e),Oo===null&&(t===null||So.current!==null||t.memoizedState!==null)&&(Oo=e)}function Ao(e){be(Po,Po.current),be(Do,e),Oo===null&&(Oo=e)}function jo(e){e.tag===22?(be(Po,Po.current),be(Do,e),Oo===null&&(Oo=e)):Mo()}function Mo(){be(Po,Po.current),be(Do,Do.current)}function No(e){ye(Do),Oo===e&&(Oo=null),ye(Po)}var Po=ve(0);function Fo(e,t){be(Do,Do.current),be(Po,t)}function Io(e){ye(Po),ye(Do),Oo===e&&(Oo=null)}function Lo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||sm(n)||cm(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 Ro=0,G=null,zo=null,Bo=null,Vo=!1,Ho=!1,Uo=!1,Wo=0,Go=0,Ko=null,qo=0;function Jo(){throw Error(i(321))}function Yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Br(e[n],t[n]))return!1;return!0}function Xo(e,t,n,r,i,a){return Ro=a,G=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?pc:mc,Uo=!1,a=n(r,i),Uo=!1,Ho&&(a=Qo(t,n,r,i)),Zo(e),a}function Zo(e){I.H=fc;var t=zo!==null&&zo.next!==null;if(Ro=0,Bo=zo=G=null,Vo=!1,Go=0,Ko=null,t)throw Error(i(300));e===null||jc||(e=e.dependencies,e!==null&&ya(e)&&(jc=!0))}function Qo(e,t,n,r){G=e;var a=0;do{if(Ho&&(Ko=null),Go=0,Ho=!1,25<=a)throw Error(i(301));if(a+=1,Bo=zo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}I.H=hc,o=t(n,r)}while(Ho);return o}function $o(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?os(t):t,e=e.useState()[0],(zo===null?null:zo.memoizedState)!==e&&(G.flags|=1024),t}function es(){var e=Wo!==0;return Wo=0,e}function ts(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ns(e){if(Vo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Vo=!1}Ro=0,Bo=zo=G=null,Ho=!1,Go=Wo=0,Ko=null}function rs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bo===null?G.memoizedState=Bo=e:Bo=Bo.next=e,Bo}function is(){if(zo===null){var e=G.alternate;e=e===null?null:e.memoizedState}else e=zo.next;var t=Bo===null?G.memoizedState:Bo.next;if(t!==null)Bo=t,zo=e;else{if(e===null)throw G.alternate===null?Error(i(467)):Error(i(310));zo=e,e={memoizedState:zo.memoizedState,baseState:zo.baseState,baseQueue:zo.baseQueue,queue:zo.queue,next:null},Bo===null?G.memoizedState=Bo=e:Bo=Bo.next=e}return Bo}function as(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function os(e){var t=Go;return Go+=1,Ko===null&&(Ko=[]),e=Xa(Ko,e,t),t=G,(Bo===null?t.memoizedState:Bo.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?pc:mc),e}function ss(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return os(e);if(e.$$typeof===le)return;if(e.$$typeof===P)return xa(e)}throw Error(i(438,String(e)))}function cs(e){var t=null,n=G.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=G.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=as(),G.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]=se;return t.index++,n}function ls(e,t){return typeof t==`function`?t(e):t}function us(e){return ds(is(),zo,e)}function ds(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Ro&f)===f:(q&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===Fa&&(d=!0);else if((Ro&p)===p){u=u.next,p===Fa&&(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,s=o):l=l.next=f,G.lanes|=p,ld|=p;f=u.action,Uo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,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,s=o):l=l.next=p,G.lanes|=f,ld|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Br(o,e.memoizedState)&&(jc=!0,d&&(n=Ia,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function fs(e){var t=is(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Br(o,t.memoizedState)||(jc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ps(e,t,n){var r=G,a=is(),o=W;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Br((zo||a).memoizedState,n);if(s&&(a.memoizedState=n,jc=!0),a=a.queue,Rs(gs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Bo!==null&&!!(Bo.memoizedState.tag&1),Ns(e?9:8,{destroy:void 0},hs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,td===null)throw Error(i(349));o||Ro&127||ms(r,t,n)}return n}function ms(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=G.updateQueue,t===null?(t=as(),G.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hs(e,t,n,r){t.value=n,t.getSnapshot=r,_s(t)&&vs(e)}function gs(e,t,n){return n(function(){_s(t)&&vs(e)})}function _s(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Br(e,n)}catch{return!0}}function vs(e){var t=Ci(e,2);t!==null&&Id(t,e,2)}function ys(e){var t=rs();if(typeof e==`function`){var n=e;if(e=n(),Uo){Qe(!0);try{n()}finally{Qe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:e},t}function bs(e,t,n,r){return e.baseState=n,ds(e,zo,typeof r==`function`?r:ls)}function xs(e,t,n,r,a){if(lc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};I.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ss(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ss(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=I.T,o={};o.types=a===null?null:a.types,I.T=o;try{var s=n(i,r),c=I.S;c!==null&&c(o,s),Cs(e,t,s)}catch(n){Ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),I.T=a}}else try{a=n(i,r),Cs(e,t,a)}catch(n){Ts(e,t,n)}}function Cs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ws(e,t,n)},function(n){return Ts(e,t,n)}):ws(e,t,n)}function ws(e,t,n){t.status=`fulfilled`,t.value=n,Es(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ss(e,n)))}function Ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Es(t),t=t.next;while(t!==r)}e.action=null}function Es(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ds(e,t){return t}function Os(e,t){if(W){var n=td.formState;if(n!==null){a:{var r=G;if(W){if(ea){b:{for(var i=ea,a=na;i.nodeType!==8;)if(!a||(i=um(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ea=um(i.nextSibling),r=i.data===`F!`;break a}}ia(r)}r=!1}r&&(t=n[0])}}return n=rs(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ds,lastRenderedState:t},n.queue=r,n=oc.bind(null,G,r),r.dispatch=n,r=ys(!1),a=cc.bind(null,G,!1,r.queue),r=rs(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=xs.bind(null,G,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ks(e){return As(is(),zo,e)}function As(e,t,n){if(t=ds(e,t,Ds)[0],e=us(ls)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=os(t)}catch(e){throw e===Ga?qa:e}else r=t;t=is();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(G.flags|=2048,Ns(9,{destroy:void 0},js.bind(null,i,n),null)),[r,a,e]}function js(e,t){e.action=t}function Ms(e){var t=is(),n=zo;if(n!==null)return As(t,n,e);is(),t=t.memoizedState,n=is();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ns(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=G.updateQueue,t===null&&(t=as(),G.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 Ps(){return is().memoizedState}function Fs(e,t,n,r){var i=rs();G.flags|=e,i.memoizedState=Ns(1|t,{destroy:void 0},n,r===void 0?null:r)}function Is(e,t,n,r){var i=is();r=r===void 0?null:r;var a=i.memoizedState.inst;zo!==null&&r!==null&&Yo(r,zo.memoizedState.deps)?i.memoizedState=Ns(t,a,n,r):(G.flags|=e,i.memoizedState=Ns(1|t,a,n,r))}function Ls(e,t){Fs(8390656,8,e,t)}function Rs(e,t){Is(2048,8,e,t)}function zs(e){G.flags|=4;var t=G.updateQueue;if(t===null)t=as(),G.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Bs(e){var t=is().memoizedState;return zs({ref:t,nextImpl:e}),function(){if(ed&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Vs(e,t){return Is(4,2,e,t)}function Hs(e,t){return Is(4,4,e,t)}function Us(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 Ws(e,t,n){n=n==null?null:n.concat([e]),Is(4,4,Us.bind(null,t,e),n)}function Gs(){}function Ks(e,t){var n=is();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qs(e,t){var n=is();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Yo(t,r[1]))return r[0];if(r=e(),Uo){Qe(!0);try{e()}finally{Qe(!1)}}return n.memoizedState=[r,t],r}function Js(e,t,n){return n===void 0||Ro&1073741824&&!(q&261930)?e.memoizedState=t:(e.memoizedState=n,e=Pd(),G.lanes|=e,ld|=e,n)}function Ys(e,t,n,r){return Br(n,t)?n:So.current===null?!(Ro&106)||Ro&1073741824&&!(q&261930)?(jc=!0,e.memoizedState=n):(e=Pd(),G.lanes|=e,ld|=e,t):(e=Js(e,n,r),Br(e,t)||(jc=!0),e)}function Xs(e,t,n,r,i){var a=L.p;L.p=a!==0&&8>a?a:8;var o=I.T,s={};s.types=o===null?null:o.types,I.T=s,cc(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?sc(e,t,za(c,r),Nd(e)):sc(e,t,r,Nd(e))}catch(n){sc(e,t,{then:function(){},status:`rejected`,reason:n},Nd())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function Zs(){}function Qs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=$s(e).queue;Xs(e,a,t,he,n===null?Zs:function(){return ec(e),n(r)})}function $s(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:he},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ec(e){var t=$s(e);t.next===null&&(t=e.alternate.memoizedState),sc(e,t.next.queue,{},Nd())}function tc(){return xa(sh)}function nc(){return is().memoizedState}function rc(){return is().memoizedState}function ic(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Nd();e=po(n);var r=mo(t,e,n);r!==null&&(Id(r,t,n),ho(r,t,n)),t={cache:Oa()},e.payload=t;return}t=t.return}}function ac(e,t,n){var r=Nd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},lc(e)?uc(t,n):(n=Si(e,t,n,r),n!==null&&(Id(n,e,r),dc(n,t,r)))}function oc(e,t,n){sc(e,t,n,Nd())}function sc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(lc(e))uc(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,Br(s,o))return xi(e,t,i,0),td===null&&bi(),!1}catch{}if(n=Si(e,t,i,r),n!==null)return Id(n,e,r),dc(n,t,r),!0}return!1}function cc(e,t,n,r){if(r={lane:2,revertLane:Lf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},lc(e)){if(t)throw Error(i(479))}else t=Si(e,n,r,2),t!==null&&Id(t,e,2)}function lc(e){var t=e.alternate;return e===G||t!==null&&t===G}function uc(e,t){Ho=Vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function dc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ht(e,n)}}var fc={readContext:xa,use:ss,useCallback:Jo,useContext:Jo,useEffect:Jo,useImperativeHandle:Jo,useLayoutEffect:Jo,useInsertionEffect:Jo,useMemo:Jo,useReducer:Jo,useRef:Jo,useState:Jo,useDebugValue:Jo,useDeferredValue:Jo,useTransition:Jo,useSyncExternalStore:Jo,useId:Jo,useHostTransitionStatus:Jo,useFormState:Jo,useActionState:Jo,useOptimistic:Jo,useMemoCache:Jo,useCacheRefresh:Jo,useEffectEvent:Jo},pc={readContext:xa,use:ss,useCallback:function(e,t){return rs().memoizedState=[e,t===void 0?null:t],e},useContext:xa,useEffect:Ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Fs(4194308,4,Us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fs(4194308,4,e,t)},useInsertionEffect:function(e,t){Fs(4,2,e,t)},useMemo:function(e,t){var n=rs();t=t===void 0?null:t;var r=e();if(Uo){Qe(!0);try{e()}finally{Qe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=rs();if(n!==void 0){var i=n(t);if(Uo){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=ac.bind(null,G,e),[r.memoizedState,e]},useRef:function(e){var t=rs();return e={current:e},t.memoizedState=e},useState:function(e){e=ys(e);var t=e.queue,n=oc.bind(null,G,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Gs,useDeferredValue:function(e,t){return Js(rs(),e,t)},useTransition:function(){var e=ys(!1);return e=Xs.bind(null,G,e.queue,!0,!1),rs().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=G,a=rs();if(W){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),td===null)throw Error(i(349));q&127||ms(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ls(gs.bind(null,r,o,e),[e]),r.flags|=2048,Ns(9,{destroy:void 0},hs.bind(null,r,o,n,t),null),n},useId:function(){var e=rs(),t=td.identifierPrefix;if(W){var n=qi,r=Ki;n=(r&~(1<<32-$e(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Wo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=qo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:tc,useFormState:Os,useActionState:Os,useOptimistic:function(e){var t=rs();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=cc.bind(null,G,!0,n),n.dispatch=t,[e,t]},useMemoCache:cs,useCacheRefresh:function(){return rs().memoizedState=ic.bind(null,G)},useEffectEvent:function(e){var t=rs(),n={impl:e};return t.memoizedState=n,function(){if(ed&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},mc={readContext:xa,use:ss,useCallback:Ks,useContext:xa,useEffect:Rs,useImperativeHandle:Ws,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:qs,useReducer:us,useRef:Ps,useState:function(){return us(ls)},useDebugValue:Gs,useDeferredValue:function(e,t){return Ys(is(),zo.memoizedState,e,t)},useTransition:function(){var e=us(ls)[0],t=is().memoizedState;return[typeof e==`boolean`?e:os(e),t]},useSyncExternalStore:ps,useId:nc,useHostTransitionStatus:tc,useFormState:ks,useActionState:ks,useOptimistic:function(e,t){return bs(is(),zo,e,t)},useMemoCache:cs,useCacheRefresh:rc,useEffectEvent:Bs},hc={readContext:xa,use:ss,useCallback:Ks,useContext:xa,useEffect:Rs,useImperativeHandle:Ws,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:qs,useReducer:fs,useRef:Ps,useState:function(){return fs(ls)},useDebugValue:Gs,useDeferredValue:function(e,t){var n=is();return zo===null?Js(n,e,t):Ys(n,zo.memoizedState,e,t)},useTransition:function(){var e=fs(ls)[0],t=is().memoizedState;return[typeof e==`boolean`?e:os(e),t]},useSyncExternalStore:ps,useId:nc,useHostTransitionStatus:tc,useFormState:Ms,useActionState:Ms,useOptimistic:function(e,t){var n=is();return zo===null?(n.baseState=e,[e,n.queue.dispatch]):bs(n,zo,e,t)},useMemoCache:cs,useCacheRefresh:rc,useEffectEvent:Bs};function gc(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 _c={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Nd(),i=po(r);i.payload=t,n!=null&&(i.callback=n),t=mo(e,i,r),t!==null&&(Id(t,e,r),ho(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Nd(),i=po(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=mo(e,i,r),t!==null&&(Id(t,e,r),ho(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Nd(),r=po(n);r.tag=2,t!=null&&(r.callback=t),t=mo(e,r,n),t!==null&&(Id(t,e,n),ho(t,e,n))}};function vc(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?!Vr(n,r)||!Vr(i,a):!0}function yc(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&&_c.enqueueReplaceState(t,t.state,null)}function bc(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 xc(e){_i(e)}function Sc(e){console.error(e)}function Cc(e){_i(e)}function wc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Tc(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 Ec(e,t,n){return n=po(n),n.tag=3,n.payload={element:null},n.callback=function(){wc(e,t)},n}function Dc(e){return e=po(e),e.tag=3,e}function Oc(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(){Tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Tc(t,n,r),typeof i!=`function`&&(xd===null?xd=new Set([this]):xd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function kc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&va(t,n,a,!0),n=Do.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Oo===null?Jd():n.alternate===null&&cd===0&&(cd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ja?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),_f(e,r,a)),!1;case 22:return n.flags|=65536,r===Ja?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,a)),!1}throw Error(i(435,n.tag))}return _f(e,r,a),Jd(),!1}if(W)return t=Do.current,t===null?(r!==ra&&(t=Error(i(423),{cause:r}),ua(Ri(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ri(r,n),a=Ec(e.stateNode,r,a),go(e,a),cd!==4&&(cd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ra&&(e=Error(i(422),{cause:r}),ua(Ri(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ri(o,n),md===null?md=[o]:md.push(o),cd!==4&&(cd=2),t===null)return!0;r=Ri(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ec(n.stateNode,r,e),go(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(xd===null||!xd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Dc(a),Oc(a,e,n,r),go(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Ac=Error(i(461)),jc=!1;function Mc(e,t,n,r){t.child=e===null?co(t,null,n,r):so(t,e.child,n,r)}function Nc(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 ba(t),r=Xo(e,t,n,o,a,i),s=es(),e!==null&&!jc?(ts(e,t,i),sl(e,t,i)):(W&&s&&Xi(t),t.flags|=1,Mc(e,t,r,i),t.child)}function Pc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ki(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Fc(e,t,a,r,i)):(e=Mi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!cl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Vr:n,n(o,r)&&e.ref===t.ref)return sl(e,t,i)}return t.flags|=1,e=Ai(a,r),e.ref=t.ref,e.return=t,t.child=e}function Fc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Vr(a,r)&&e.ref===t.ref){if(jc=!1,t.pendingProps=r=a,cl(e,i))e.flags&131072&&(jc=!0);else return t.lanes=e.lanes,sl(e,t,i)}}return Uc(e,t,n,r,i)}function Ic(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 Rc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ua(t,a===null?null:a.cachePool),a===null?To():wo(t,a),jo(t);else return r=t.lanes=536870912,Rc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ua(t,null),To(),Mo()):(Ua(t,a.cachePool),wo(t,a),Mo(),t.memoizedState=null);return Mc(e,t,i,n),t.child}function Lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Rc(e,t,n,r,i){var a=Ha();return a=a===null?null:{parent:Da._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ua(t,null),To(),jo(t),e!==null&&va(e,t,r,!0),t.childLanes=i,null}function zc(e,t){return t=Qc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Bc(e,t,n){return so(t,e.child,null,n),e=zc(t,t.pendingProps),e.flags|=2,No(t),t.memoizedState=null,e}function Vc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(W){if(r.mode===`hidden`)return e=zc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Lc(null,e);if(Ao(t),(e=ea)?(e=om(e,na),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Gi===null?null:{id:Ki,overflow:qi},retryLane:536870912,hydrationErrors:null},n=Fi(e),n.return=t,t.child=n,$i=t,ea=null)):e=null,e===null)throw ia(t);return t.lanes=536870912,null}return zc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Ao(t),a){if(t.flags&256)t.flags&=-257,t=Bc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(jc||va(e,t,n,!1),a=(n&e.childLanes)!==0,jc||a){if(So.current===null){if(r=td,r!==null&&(s=gt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Ci(e,s),Id(r,e,s),Ac;Jd()}t=Bc(e,t,n)}else e=o.treeContext,ea=um(s.nextSibling),$i=t,W=!0,ta=null,na=!1,e!==null&&Qi(t,e),t=zc(t,r),t.flags|=134221824;return t}return e=Ai(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Hc(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(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Uc(e,t,n,r,i){return ba(t),n=Xo(e,t,n,r,void 0,i),r=es(),e!==null&&!jc?(ts(e,t,i),sl(e,t,i)):(W&&r&&Xi(t),t.flags|=1,Mc(e,t,n,i),t.child)}function Wc(e,t,n,r,i,a){return ba(t),t.updateQueue=null,n=Qo(t,r,n,i),Zo(e),r=es(),e!==null&&!jc?(ts(e,t,a),sl(e,t,a)):(W&&r&&Xi(t),t.flags|=1,Mc(e,t,n,a),t.child)}function Gc(e,t,n,r,i){if(ba(t),t.stateNode===null){var a=Ei,o=n.contextType;typeof o==`object`&&o&&(a=xa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=_c,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},uo(t),o=n.contextType,a.context=typeof o==`object`&&o?xa(o):Ei,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(gc(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&&_c.enqueueReplaceState(a,a.state,null),yo(t,r,a,i),vo(),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=bc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Ei,typeof u==`object`&&u&&(o=xa(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)&&yc(t,a,r,o),lo=!1;var f=t.memoizedState;a.state=f,yo(t,r,a,i),vo(),l=t.memoizedState,s||f!==l||lo?(typeof d==`function`&&(gc(t,n,d,r),l=t.memoizedState),(c=lo||vc(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,fo(e,t),o=t.memoizedProps,u=bc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Ei,typeof l==`object`&&l&&(c=xa(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)&&yc(t,a,r,c),lo=!1,f=t.memoizedState,a.state=f,yo(t,r,a,i),vo();var p=t.memoizedState;o!==d||f!==p||lo||e!==null&&e.dependencies!==null&&ya(e.dependencies)?(typeof s==`function`&&(gc(t,n,s,r),p=t.memoizedState),(u=lo||vc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ya(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,Hc(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=so(t,e.child,null,i),t.child=so(t,null,n,i)):Mc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=sl(e,t,i),e}function Kc(e,t,n,r){return ca(),t.flags|=256,Mc(e,t,n,r),t.child}var qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jc(e){return{baseLanes:e,cachePool:Wa()}}function Yc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=fd),e}function Xc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Po.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(W){if(i?ko(t):Mo(),(e=ea)?(e=om(e,na),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Gi===null?null:{id:Ki,overflow:qi},retryLane:536870912,hydrationErrors:null},n=Fi(e),n.return=t,t.child=n,$i=t,ea=null)):e=null,e===null)throw ia(t);return t.lanes=cm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Mo(),i=t.mode,a=Qc({mode:`hidden`,children:a},i),r=Ni(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Jc(n),r.childLanes=Yc(e,o,n),t.memoizedState=qc,Lc(null,r)):(ko(t),Zc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return el(e,t,a,o,r,c,s,n)}return i?(Mo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Ai(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Ni(i,a,n,null),i.flags|=2):i=Ai(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Lc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Jc(n):(a=i.cachePool,a===null?a=Wa():(s=Da._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Yc(e,o,n),t.memoizedState=qc,Lc(e.child,r)):(ko(t),n=e.child,e=n.sibling,n=Ai(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 Zc(e,t){return t=Qc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Qc(e,t){return e=Oi(22,e,null,t),e.lanes=0,e}function $c(e,t,n){return so(t,e.child,null,n),e=Zc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function el(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(ko(t),t.flags&=-257,$c(e,t,c)):t.memoizedState===null?(Mo(),o=a.fallback,s=t.mode,a=Qc({mode:`visible`,children:a.children},s),o=Ni(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,so(t,e.child,null,c),a=t.child,a.memoizedState=Jc(c),a.childLanes=Yc(e,r,c),t.memoizedState=qc,Lc(null,a)):(Mo(),t.child=e.child,t.flags|=128,null);if(ko(t),cm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ua({value:a,source:null,stack:null})),$c(e,t,c)}if(jc||va(e,t,c,!1),r=(c&e.childLanes)!==0,jc||r){if(So.current!==null)return $c(e,t,c);if(r=td,r!==null&&(a=gt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Ci(e,a),Id(r,e,a),Ac;return sm(o)||Jd(),$c(e,t,c)}return sm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,ea=um(o.nextSibling),$i=t,W=!0,ta=null,na=!1,e!==null&&Qi(t,e),t=Zc(t,a.children),t.flags|=134221824,t)}function tl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ga(e.return,t,n)}function nl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Lo(n)===null&&(t=e),e=e.sibling}return t}function rl(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 il(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 al(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Po.current;if(t.flags&128)return Fo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Fo(t,o),i===`backwards`&&e!==null?(il(e),Mc(e,t,r,n),il(e)):Mc(e,t,r,n),r=W?Hi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&tl(e,n,t);else if(e.tag===19)tl(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=nl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,il(t)),rl(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&&Lo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}rl(t,!0,n,null,a,r);break;case`together`:rl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=nl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),rl(t,!1,i,n,a,r)}return t.child}function ol(e,t,n){var r=t.pendingProps;return ma(t,t.type,r.value),Mc(e,t,r.children,n),t.child}function sl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ld|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(va(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Ai(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ai(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function cl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&ya(e)))}function ll(e,t,n){switch(t.tag){case 3:Te(t,t.stateNode.containerInfo),ma(t,Da,e.memoizedState.cache),ca();break;case 27:case 5:De(t);break;case 4:Te(t,t.stateNode.containerInfo);break;case 10:ma(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ao(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return ko(t),t.flags|=128,null;r=va(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Xc(e,t,n):(ko(t),e=sl(e,t,n),e===null?null:e.sibling)}ko(t);break;case 19:if(t.flags&128)return al(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(va(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return al(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Fo(t,Po.current),r)break;return null;case 22:return t.lanes=0,Ic(e,t,n,t.pendingProps);case 24:ma(t,Da,e.memoizedState.cache)}return sl(e,t,n)}function ul(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)jc=!0;else{if(!cl(e,n)&&!(t.flags&128))return jc=!1,ll(e,t,n);jc=!!(e.flags&131072)}}else jc=!1,W&&t.flags&1048576&&Yi(t,Hi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Za(t.elementType),t.type=e,typeof e==`function`)ki(e)?(r=bc(e,r),t.tag=1,t=Gc(null,t,e,r,n)):(t.tag=0,t=Uc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===te){t.tag=11,t=Nc(null,t,e,r,n);break a}if(a===re){t.tag=14,t=Pc(null,t,e,r,n);break a}if(a===P){t.tag=10,t.type=e,t=ol(null,t,n);break a}}throw t=pe(e)||e,Error(i(306,t,``))}}return t;case 0:return Uc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=bc(r,t.pendingProps),Gc(e,t,r,a,n);case 3:a:{if(Te(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,fo(e,t),yo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ma(t,Da,r),r!==o.cache&&_a(t,[Da],n,!0),vo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Kc(e,t,r,n);break a}if(r!==a){a=Ri(Error(i(424)),t),ua(a),t=Kc(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(ea=um(e.firstChild),$i=t,W=!0,ta=null,na=!0,n=co(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ca(),r===a){t=sl(e,t,n);break a}Mc(e,t,r,n)}t=t.child}return t;case 26:return Hc(e,t),e===null?(n=Pm(t.type,null,t.pendingProps,null))?t.memoizedState=n:W||(t.stateNode=Q(t.type,t.pendingProps,Ce.current,t)):t.memoizedState=Pm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return De(t),e===null&&W&&(r=t.stateNode=gm(t.type,t.pendingProps,Ce.current),$i=t,na=!0,a=ea,Cp(t.type)?(dm=a,ea=um(r.firstChild)):ea=a),Mc(e,t,t.pendingProps.children,n),Hc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&W&&((a=r=ea)&&(r=im(r,t.type,t.pendingProps,na),r===null?a=!1:(t.stateNode=r,$i=t,ea=um(r.firstChild),na=!1,a=!0)),a||ia(t)),De(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,mp(a,o)?r=null:s!==null&&mp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Xo(e,t,$o,null,null,n),sh._currentValue=a),Hc(e,t),Mc(e,t,r,n),t.child;case 6:return e===null&&W&&((e=n=ea)&&(n=am(n,t.pendingProps,na),n===null?e=!1:(t.stateNode=n,$i=t,ea=null,e=!0)),e||ia(t)),null;case 13:return Xc(e,t,n);case 4:return Te(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=so(t,null,r,n):Mc(e,t,r,n),t.child;case 11:return Nc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Hc(e,t),Mc(e,t,r,n),t.child;case 8:return Mc(e,t,t.pendingProps.children,n),t.child;case 12:return Mc(e,t,t.pendingProps.children,n),t.child;case 10:return ol(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,ba(t),a=xa(a),r=r(a),t.flags|=1,Mc(e,t,r,n),t.child;case 14:return Pc(e,t,t.type,t.pendingProps,n);case 15:return Fc(e,t,t.type,t.pendingProps,n);case 19:return al(e,t,n);case 31:return Vc(e,t,n);case 22:return Ic(e,t,n,t.pendingProps);case 24:return ba(t),r=xa(Da),e===null?(a=Ha(),a===null&&(a=td,o=Oa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},uo(t),ma(t,Da,a)):((e.lanes&n)!==0&&(fo(e,t),yo(t,null,null,n),vo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ma(t,Da,r),r!==a.cache&&_a(t,[Da],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ma(t,Da,r))),Mc(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:W&&Xi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Hc(e,t),Mc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function dl(e){e.flags|=4}function fl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Jm(t,r):Jm(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 Qa=Ja,Ka}}else e.flags&=-16777217}function pl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Ym(t)){if(Gd())e.flags|=8192;else throw Qa=Ja,Ka}}function ml(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ut(),e.lanes|=t,pd|=t)}function hl(e,t){if(!W)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 gl(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 _l(e,t,n){var r=t.pendingProps;switch(Zi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gl(t),null;case 1:return gl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ha(Da),Ee(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(sa(t)?dl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,la())),gl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(dl(t),o===null?(gl(t),fl(t,a,null,r,n)):(gl(t),pl(t,o))):o?o===e.memoizedState?(gl(t),t.flags&=-16777217):(dl(t),gl(t),pl(t,o)):(e=e.memoizedProps,e!==r&&dl(t),gl(t),fl(t,a,e,r,n)),null;case 27:if(Oe(t),n=Ce.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return gl(t),t.subtreeFlags&=-33554433,null}e=xe.current,sa(t)?aa(t,e):(e=gm(a,r,n),t.stateNode=e,dl(t))}return gl(t),t.subtreeFlags&=-33554433,null;case 5:if(Oe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return gl(t),t.subtreeFlags&=-33554433,null}if(o=xe.current,sa(t))aa(t,o);else{var s=dp(Ce.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[St]=t,o[Ct]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(ap(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&dl(t)}}return gl(t),t.subtreeFlags&=-33554433,fl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Ce.current,sa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=$i,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[St]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||np(e.nodeValue,n)),e||ia(t,!0)}else e=dp(e).createTextNode(r),e[St]=t,t.stateNode=e}return gl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=sa(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[St]=t}else ca(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;gl(t),e=!1}else n=la(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(No(t),t):(No(t),null);if(t.flags&128)throw Error(i(558))}return gl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=sa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[St]=t}else ca(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;gl(t),a=!1}else a=la(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(No(t),t):(No(t),null)}return No(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ml(t,t.updateQueue),gl(t),null);case 4:return Ee(),e===null&&qf(t.stateNode.containerInfo),t.flags|=67108864,gl(t),null;case 10:return ha(t.type),gl(t),null;case 19:if(Io(t),r=t.memoizedState,r===null)return gl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)hl(r,!1);else{if(cd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Lo(e),o!==null){for(t.flags|=128,hl(r,!1),e=o.updateQueue,t.updateQueue=e,ml(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ji(n,e),n=n.sibling;return Fo(t,Po.current&1|2),W&&Ji(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ve()>yd&&(t.flags|=128,a=!0,hl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Lo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ml(t,e),hl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!W)return gl(t),null}else 2*Ve()-r.renderingStartTime>yd&&n!==536870912&&(t.flags|=128,a=!0,hl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}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=Ve(),e.sibling=null,o=Po.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||W?Fo(t,o):(n=o,be(Do,t),be(Po,n),Oo===null&&(Oo=t)),W&&Ji(t,r.treeForkCount),e}return gl(t),null;case 22:case 23:return No(t),Eo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(gl(t),t.subtreeFlags&6&&(t.flags|=8192)):gl(t),n=t.updateQueue,n!==null&&ml(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&&ye(Va),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ha(Da),gl(t),null;case 25:return null;case 30:return t.flags|=33554432,gl(t),null}throw Error(i(156,t.tag))}function vl(e,t){switch(Zi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ha(Da),Ee(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Oe(t),null;case 31:if(t.memoizedState!==null){if(No(t),t.alternate===null)throw Error(i(340));ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(No(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Io(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 Ee(),null;case 10:return ha(t.type),null;case 22:case 23:return No(t),Eo(),e!==null&&ye(Va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ha(Da),null;case 25:return null;default:return null}}function yl(e,t){switch(Zi(t),t.tag){case 3:ha(Da),Ee();break;case 26:case 27:case 5:Oe(t);break;case 4:Ee();break;case 31:t.memoizedState!==null&&No(t);break;case 13:No(t);break;case 19:Io(t);break;case 10:ha(t.type);break;case 22:case 23:No(t),Eo(),e!==null&&ye(Va);break;case 24:ha(Da)}}function bl(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 xl(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 Sl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{xo(t,n)}catch(t){gf(e,e.return,t)}}}function Cl(e,t,n){n.props=bc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){gf(e,t,n)}}function wl(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=hi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Fp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Ip(e);p(e.child,!1,$p,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 Tl(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 El(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++)tm(e.stateNode,t[n])}function Dl(e){for(var t=e.return;t!==null&&(Al(t)&&tm(e.stateNode,t.stateNode),!kl(t));)t=t.return}function Ol(e){for(var t=e.return;t!==null&&(Al(t)&&nm(e.stateNode,t.stateNode),!kl(t));)t=t.return}function kl(e){return e.tag===5||e.tag===3||e.tag===27}function Al(e){return e&&e.tag===7&&e.stateNode!==null}function jl(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 Ml(e,t,n){try{var r=e.stateNode;sp(r,e.type,n,t),r[Ct]=t}catch(t){gf(e,e.return,t)}}function Nl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Cp(e.type)||e.tag===4}function Pl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Nl(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&&Cp(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 Fl(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=_n)),El(e,r),Gt=!0;else if(i!==4&&(i===27&&(El(e,r),r=null,Cp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Fl(e,t,n,r),e=e.sibling;e!==null;)Fl(e,t,n,r),e=e.sibling}function Il(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),El(e,r),Gt=!0;else if(i!==4&&(i===27&&(El(e,r),r=null,Cp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Il(e,t,n,r),e=e.sibling;e!==null;)Il(e,t,n,r),e=e.sibling}function Ll(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[St]=e,t[Ct]=n}catch(t){gf(e,e.return,t)}}var Rl=!1,zl=null;function Bl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Rl=!0)}var Vl=null;function Hl(){var e=Vl;return Vl=null,e}var Ul=0;function Wl(e,t,n,r,i){return Ul=0,Gl(e.child,t,n,r,i)}function Gl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=kp(o);r.push(s),s.view&&(a=!0)}else a||kp(o).view&&(a=!0);Rl=!0,Ep(o,Ul===0?t:t+`_`+Ul,n),Ul++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||Gl(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Kl(e,t){for(;e!==null;)e.tag===5?Dp(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Kl(e.child,t),e=e.sibling}function ql(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(ql(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=gi(t.default,t.share),t!==`none`&&(Wl(e,n,t,null,!1)||Kl(e.child,!1))}e=e.sibling}}function Jl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=hi(r,n),a=gi(r.default,n.paired?r.share:r.enter);a===`none`?ql(e):Wl(e,i,a,null,!1)?(ql(e),n.paired||t||Fd(e,r.onEnter)):Kl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Jl(e,t),e=e.sibling;else ql(e)}function Yl(e){if(zl!==null&&zl.size!==0){var t=zl;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=gi(n.default,n.share);if(a!==`none`&&(Wl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Fd(e,n.onShare)):Kl(e.child,!1)),t.delete(r),t.size===0)break}}}Yl(e)}e=e.sibling}}}function Xl(e){if(e.tag===30){var t=e.memoizedProps,n=hi(t,e.stateNode),r=zl===null?void 0:zl.get(n),i=gi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Wl(e,n,i,null,!1)?r===void 0?Fd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,zl.delete(n),Fd(e,t.onShare)):Kl(e.child,!1)),zl!==null&&Yl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Xl(e),e=e.sibling;else zl!==null&&Yl(e)}function Zl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=hi(t,e.stateNode);t=gi(t.default,t.update),e.flags&=-5,t!==`none`&&Wl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Zl(e);e=e.sibling}}function Ql(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,Kl(e.child,!1))}Ql(e)}e=e.sibling}}function $l(e){if(e.tag===30)e.stateNode.paired=null,Kl(e.child,!1),Ql(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)$l(e),e=e.sibling;else Ql(e)}function eu(e){for(e=e.child;e!==null;)e.tag===30?Kl(e.child,!1):e.subtreeFlags&33554432&&eu(e),e=e.sibling}function tu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Ul<a.length){var l=a[Ul],u=kp(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&&Ep(c,Ul===0?n:n+`_`+Ul,i),s&&e.flags&4||(Vl===null&&(Vl=[]),Vl.push(c,Ul===0?r:r+`_`+Ul,t.memoizedProps)),Ul++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:tu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function nu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=hi(n,r),a=gi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Ap)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Ul=0,i=tu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Fd(e,n.onUpdate))}else e.subtreeFlags&33554432&&nu(e,t);e=e.sibling}}var ru=!1,iu=!1,au=!1,ou=!1,su=typeof WeakSet==`function`?WeakSet:Set,cu=null,lu=!1,uu=!1,du=!1,fu=!1;function pu(e,t,n){if(e=e.containerInfo,lp=gh,e=Kr(e),qr(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(up={focusedElem:e,selectionRange:r},gh=!1,n=(n&335544064)===n,cu=t,t=n?9270:1024;cu!==null;){if(e=cu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Xl(r[a]);if(e.alternate===null&&e.flags&2)n&&Bl(e),mu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Xl(r),mu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Bl(e),mu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,cu=r):(n&&Zl(e),mu(n))}}zl=null}function mu(e){for(;cu!==null;){var t=cu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=bc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){gf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)rm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:rm(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=hi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=gi(a.default,a.update),a!==`none`&&Wl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,cu=r;break}cu=t.return}}function hu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Fu(e,n),r&4&&bl(5,n);break;case 1:if(Fu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){gf(n,n.return,e)}else{var i=bc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){gf(n,n.return,e)}}}r&64&&Sl(n),r&512&&wl(n,n.return);break;case 3:if(Fu(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{xo(e,t)}catch(e){gf(n,n.return,e)}}break;case 27:t===null&&r&4&&Ll(n);case 26:case 5:Fu(e,n),t===null&&r&4&&jl(n),r&512&&wl(n,n.return);break;case 12:Fu(e,n);break;case 31:Fu(e,n),r&4&&wu(e,n);break;case 13:Fu(e,n),r&4&&Tu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=bf.bind(null,n),lm(e,n))));break;case 22:if(r=n.memoizedState!==null||ru,!r){var a=t!==null&&t.memoizedState!==null||iu;t=ru,i=iu,ru=r,(iu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Lu(e,n,r)):Fu(e,n),ru=t,iu=i}break;case 30:Fu(e,n),r&512&&wl(n,n.return);break;case 7:r&512&&wl(n,n.return);default:Fu(e,n)}}function gu(e,t){for(e=e.child;e!==null;)_u(e,t),e=e.sibling}function _u(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)}vu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Gt=!0}catch(t){gf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Tp(s,!0):Tp(e.stateNode,!1)}catch(t){gf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&gu(e,t);break;default:gu(e,t)}}function vu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:_u(n,r);break a;case 22:n.memoizedState===null&&vu(n,r);break a;default:vu(n,r)}}e=e.sibling}}function yu(e){var t=e.alternate;t!==null&&(e.alternate=null,yu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&z(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 bu=null,xu=!1;function Su(e,t,n){for(n=n.child;n!==null;)Cu(e,t,n),n=n.sibling}function Cu(e,t,n){if(Ze&&typeof Ze.onCommitFiberUnmount==`function`)try{Ze.onCommitFiberUnmount(Xe,n)}catch{}switch(n.tag){case 26:iu||Tl(n,t),Su(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!iu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:iu||Tl(n,t),Ol(n);var r=bu,i=xu;Cp(n.type)&&(bu=n.stateNode,xu=!1),Su(e,t,n),_m(n.stateNode,n.type,n.memoizedProps),bu=r,xu=i;break;case 5:iu||Tl(n,t),Ol(n);case 6:if(n.tag===6&&Ol(n),r=bu,i=xu,bu=null,Su(e,t,n),bu=r,xu=i,bu!==null){if(xu)try{(bu.nodeType===9?bu.body:bu.nodeName===`HTML`?bu.ownerDocument.body:bu).removeChild(n.stateNode),Gt=!0}catch(e){gf(n,t,e)}else try{bu.removeChild(n.stateNode),Gt=!0}catch(e){gf(n,t,e)}}break;case 18:bu!==null&&(xu?(e=bu,wp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hh(e)):wp(bu,n.stateNode));break;case 4:r=bu,i=xu,bu=n.stateNode.containerInfo,xu=!0,Su(e,t,n),bu=r,xu=i;break;case 0:case 11:case 14:case 15:xl(2,n,t),iu||xl(4,n,t),Su(e,t,n);break;case 1:iu||(Tl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Cl(n,t,r)),Su(e,t,n);break;case 21:Su(e,t,n);break;case 22:iu=(r=iu)||n.memoizedState!==null,Su(e,t,n),iu=r;break;case 30:Tl(n,t),Su(e,t,n);break;case 7:iu||Tl(n,t),Su(e,t,n);break;default:Su(e,t,n)}}function wu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hh(e)}catch(e){gf(t,t.return,e)}}}function Tu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hh(e)}catch(e){gf(t,t.return,e)}}function Eu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new su),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new su),t;default:throw Error(i(435,e.tag))}}function Du(e,t){var n=Eu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=xf.bind(null,e,t);t.then(r,r)}})}function Ou(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Cp(l.type)){bu=l.stateNode,xu=!1;break a}break;case 5:bu=l.stateNode,xu=!1;break a;case 3:case 4:bu=l.stateNode.containerInfo,xu=!0;break a}l=l.return}if(bu===null)throw Error(i(160));Cu(s,c,o),bu=null,xu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Au(t,e,n),t=t.sibling}var ku=null;function Au(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Ou(t,e,n),ju(e),a&4&&(xl(3,e,e.return),bl(3,e),xl(5,e,e.return));break;case 1:Ou(t,e,n),ju(e),a&512&&(iu||r===null||Tl(r,r.return)),a&64&&ru&&(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(o=ku,Ou(t,e,n),ju(e),a&512&&(iu||r===null||Tl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(ru)e.stateNode=Q(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[kt]||r[St]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),ap(r,t,n),r[St]=e,Ft(r),t=r;break a;case`link`:if(o=Km(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],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)){o.splice(s,1);break b}}r=a.createElement(t),ap(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Km(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],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)){o.splice(s,1);break b}}r=a.createElement(t),ap(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[St]=e,Ft(r),t=r}e.stateNode=t}}else ru||qm(o,e.type,e.stateNode)}else e.stateNode=Vm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Ml(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||iu||t.parentNode.removeChild(t)):a.count--,n===null?ru||qm(o,e.type,e.stateNode):Vm(o,n,e.memoizedProps))}break;case 27:Ou(t,e,n),ju(e),a&512&&(iu||r===null||Tl(r,r.return)),r!==null&&a&4&&Ml(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=au,au=!1,Ou(t,e,n),au=o,ju(e),a&512&&(iu||r===null||Tl(r,r.return)),e.flags&32){t=e.stateNode;try{ln(t,``),Gt=!0}catch(t){gf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Ml(e,t,r===null?t:r.memoizedProps)),a&1024&&(ou=!0);break;case 6:if(Ou(t,e,n),ju(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Gt=!0}catch(t){gf(e,e.return,t)}}break;case 3:if(Gt=!1,Gm=null,o=ku,ku=xm(t.containerInfo),Ou(t,e,n),ku=o,ju(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Hh(t.containerInfo)}catch(t){gf(e,e.return,t)}ou&&(ou=!1,Mu(e)),Gt=!1;break;case 4:a=au,au=ru,r=Kt(),o=ku,ku=xm(e.stateNode.containerInfo),Ou(t,e,n),ju(e),ku=o,Gt&&uu&&(du=!0),Gt=r,au=a;break;case 12:Ou(t,e,n),ju(e);break;case 31:Ou(t,e,n),ju(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 13:Ou(t,e,n),ju(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(_d=Ve()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=ru,l=iu,u=au;ru=c||o,au=u||o,iu=l||s,Ou(t,e,n),iu=l,au=u,ru=c,ju(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||ru||iu||(t=s||iu,n=ru,r=iu,ru=o||ru,iu=t,Iu(e,2),ru=n,iu=r),!o&&au||gu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Du(e,n))));break;case 19:Ou(t,e,n),ju(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 30:a&512&&(iu||r===null||Tl(r,r.return)),a=Kt(),o=uu,s=(n&335544064)===n,c=e.memoizedProps,uu=s&&gi(c.default,c.update)!==`none`,Ou(t,e,n),ju(e),s&&r!==null&&Gt&&(e.flags|=4),uu=o,Gt=a;break;case 21:break;case 7:a&512&&(iu||r===null||Tl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Ou(t,e,n),ju(e)}}function ju(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Nl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Al(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(kl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Il(e,Pl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(ln(l,``),n.flags&=-33),Il(e,Pl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Fl(e,Pl(e),u,s);break;default:throw Error(i(161))}}catch(t){gf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,gh=!0,t.reset(),gh=!1),e=e.sibling}}function Nu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Pu(t,e),t=t.sibling;else nu(t,!1)}function Pu(e,t){var n=e.alternate;if(n===null)Jl(e,!1);else switch(e.tag){case 3:if(fu=lu=!1,Hl(),Nu(t,e),!lu&&!du){if(e=Vl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Dp(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`})),fu=!0}Vl=null;break;case 5:Nu(t,e);break;case 4:r=lu,lu=!1,Nu(t,e),lu&&(du=!0),lu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Nu(t,e):Jl(e,!1));break;case 30:r=lu,i=Hl(),lu=!1,Nu(t,e),lu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=hi(a,o),o=hi(n.memoizedProps,o);var s=gi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Ul=0,t=tu(e,n,t,o,s,a,!0),Ul!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Fd(e,e.memoizedProps.onUpdate),Vl=i):i!==null&&(i.push.apply(i,Vl),Vl=i),lu=e.flags&32?!0:r;break;default:Nu(t,e)}}function Fu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hu(e,t.alternate,t),t=t.sibling}function Iu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:xl(4,n,n.return),Iu(n,r);break;case 1:Tl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Cl(n,n.return,i),Iu(n,r);break;case 27:r&2&&_m(n.stateNode,n.type,n.memoizedProps);case 5:Tl(n,n.return),n.tag!==5&&n.tag!==27||Ol(n),Iu(n,r);break;case 6:Ol(n);break;case 26:Tl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||iu||i.parentNode.removeChild(i),Iu(n,r);break;case 22:n.memoizedState===null&&Iu(n,r);break;case 30:Tl(n,n.return),Iu(n,r);break;case 7:Tl(n,n.return);default:Iu(n,r)}e=e.sibling}}function Lu(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:Lu(i,a,n),bl(4,a);break;case 1:if(Lu(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++)bo(l[i],c)}catch(e){gf(r,r.return,e)}}s&&o&64&&Sl(a),wl(a,a.return);break;case 27:n&2&&Ll(a);case 5:a.tag!==5&&a.tag!==27||Dl(a),Lu(i,a,n),s&&r===null&&o&4&&jl(a),wl(a,a.return);break;case 6:Dl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||ru||qm(xm(c.ownerDocument),a.type,c),Lu(i,a,n),s&&r===null&&o&4&&jl(a),wl(a,a.return);break;case 12:Lu(i,a,n);break;case 31:Lu(i,a,n),s&&o&4&&wu(i,a);break;case 13:Lu(i,a,n),s&&o&4&&Tu(i,a);break;case 22:a.memoizedState===null&&Lu(i,a,n),wl(a,a.return);break;case 30:Lu(i,a,n),wl(a,a.return);break;case 7:wl(a,a.return);default:Lu(i,a,n)}t=t.sibling}}function Ru(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&&ka(n))}function zu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ka(e))}function Bu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Vu(e,t,n,r),t=t.sibling;else i&&eu(t)}function Vu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&$l(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Bu(e,t,n,r),a&2048&&bl(9,t);break;case 1:Bu(e,t,n,r);break;case 3:Bu(e,t,n,r),i&&fu&&(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&&ka(a)));break;case 12:if(a&2048){Bu(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 Bu(e,t,n,r);break;case 31:Bu(e,t,n,r);break;case 13:Bu(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&&$l(t),o._visibility&2?Bu(e,t,n,r):(o._visibility|=2,Hu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&$l(s),o._visibility&2?Bu(e,t,n,r):Uu(e,t)),a&2048&&Ru(s,t);break;case 24:Bu(e,t,n,r),a&2048&&zu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Kl(a.child,!0),Kl(t.child,!0))),Bu(e,t,n,r);break;default:Bu(e,t,n,r)}}function Hu(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:Hu(a,o,s,c,i),bl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Hu(a,o,s,c,i)):u._visibility&2?Hu(a,o,s,c,i):Uu(a,o),i&&l&2048&&Ru(o.alternate,o);break;case 24:Hu(a,o,s,c,i),i&&l&2048&&zu(o.alternate,o);break;default:Hu(a,o,s,c,i)}t=t.sibling}}function Uu(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:Uu(n,r),i&2048&&Ru(r.alternate,r);break;case 24:Uu(n,r),i&2048&&zu(r.alternate,r);break;default:Uu(n,r)}t=t.sibling}}var Wu=8192;function Gu(e,t,n){if(e.subtreeFlags&Wu)for(e=e.child;e!==null;)Ku(e,t,n),e=e.sibling}function Ku(e,t,n){switch(e.tag){case 26:Gu(e,t,n),e.flags&Wu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Zm(n,e)):Qm(n,ku,e.memoizedState,e.memoizedProps));break;case 5:Gu(e,t,n),e.flags&Wu&&(e=e.stateNode,(t&335544128)===t&&Zm(n,e));break;case 3:case 4:var r=ku;ku=xm(e.stateNode.containerInfo),Gu(e,t,n),ku=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Wu,Wu=16777216,Gu(e,t,n),Wu=r):Gu(e,t,n));break;case 30:if((e.flags&Wu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,zl===null&&(zl=new Map),zl.set(r,i)}Gu(e,t,n);break;default:Gu(e,t,n)}}function qu(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 Ju(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cu=r,Zu(r,e)}qu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Yu(e),e=e.sibling}function Yu(e){switch(e.tag){case 0:case 11:case 15:Ju(e),e.flags&2048&&xl(9,e,e.return);break;case 3:Ju(e);break;case 12:Ju(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Xu(e)):Ju(e);break;default:Ju(e)}}function Xu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cu=r,Zu(r,e)}qu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:xl(8,t,t.return),Xu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Xu(t));break;default:Xu(t)}e=e.sibling}}function Zu(e,t){for(;cu!==null;){var n=cu;switch(n.tag){case 0:case 11:case 15:xl(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:ka(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,cu=r;else a:for(n=e;cu!==null;){r=cu;var i=r.sibling,a=r.return;if(yu(r),r===n){cu=null;break a}if(i!==null){i.return=a,cu=i;break a}cu=a}}}var Qu={getCacheForType:function(e){var t=xa(Da),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return xa(Da).controller.signal}},$u=typeof WeakMap==`function`?WeakMap:Map,ed=0,td=null,K=null,q=0,nd=0,rd=null,id=!1,ad=!1,od=!1,sd=0,cd=0,ld=0,ud=0,dd=0,fd=0,pd=0,md=null,hd=null,gd=!1,_d=0,vd=0,yd=1/0,bd=null,xd=null,J=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 ed&2&&q!==0?q&-q:I.T===null?yt():Lf()}function Pd(){if(fd===0){if(!(q&536870912)||W){var e=rt;rt<<=1,!(rt&3932160)&&(rt=262144),fd=e}else fd=536870912}return e=Do.current,e!==null&&(e.flags|=32),fd}function Fd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Fp(hi(e.memoizedProps,n))),kd===null&&(kd=[]),kd.push(t.bind(null,r))}}function Id(e,t,n){(e===td&&(nd===2||nd===9)||e.cancelPendingCommit!==null)&&(Ud(e,0),Bd(e,q,fd,!1)),ft(e,n),ed&2&&e===td||(e===td&&(!(ed&2)&&(ud|=n),cd===4&&Bd(e,q,fd,!1)),kf(e))}function Ld(e,t,n){if(ed&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||st(e,t),a=r?Zd(e,t):Yd(e,t,!0),o=r;do{if(a===0){ad&&!r&&Bd(e,t,0,!1);break}if(n=e.current.alternate,o&&!zd(n))a=Yd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=md;var l=c.current.memoizedState.isDehydrated;if(l&&(Ud(c,s).flags|=256),s=Yd(c,s,!1),s!==2&&s!==6){if(od&&!l){c.errorRecoveryDisabledLanes|=o,ud|=o,a=4;break a}o=hd,hd=a,o!==null&&(hd===null?hd=o:hd.push.apply(hd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Ud(e,0),Bd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Bd(r,t,fd,!id);break a;case 2:hd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=_d+300-Ve(),10<a)){if(Bd(r,t,fd,!id),ot(r,0,!0)!==0)break a;wd=t,r.timeoutHandle=_p(Rd.bind(null,r,n,hd,bd,gd,t,fd,ud,pd,id,o,`Throttled`,-0,0),a);break a}Rd(r,n,hd,bd,gd,t,fd,ud,pd,id,o,null,-0,0)}break}}while(1);kf(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:_n},zl=null,Ku(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=nh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?_d-Ve():(a&4194048)===a?vd-Ve():0,m=eh(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(!Br(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=ct(e,t),t&=~dd,t&=~ud,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-$e(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&mt(e,n,t)}function Vd(){return ed&6?!0:(Af(0,!1),!1)}function Hd(){if(K!==null){if(nd===0)var e=K.return;else e=K,pa=fa=null,ns(e),to=null,no=0,e=K;for(;e!==null;)yl(e.alternate,e),e=e.return;K=null}}function Ud(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,vp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),wd=0,Hd(),td=e,K=n=Ai(e.current,null),q=t,nd=0,rd=null,id=!1,ad=st(e,t),od=!1,pd=fd=dd=ud=ld=cd=0,hd=md=null,gd=!1,sd=ct(e,t),bi(),n}function Wd(e,t){G=null,I.H=fc,t===Ga||t===qa?(t=$a(),nd=3):t===Ka?(t=$a(),nd=4):nd=t===Ac?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,rd=t,K===null&&(cd=1,wc(e,Ri(t,e.current)))}function Gd(){var e=Do.current;return e===null?!0:(q&4194048)===q?Oo===null:(q&62914560)===q||q&536870912?e===Oo:!1}function Kd(){var e=I.H;return I.H=fc,e===null?fc:e}function qd(){var e=I.A;return I.A=Qu,e}function Jd(){cd=4,id||(q&4194048)!==q&&Do.current!==null||(ad=!0),!(ld&134217727)&&!(ud&134217727)||td===null||Bd(td,q,fd,!1)}function Yd(e,t,n){var r=ed;ed|=2;var i=Kd(),a=qd();(td!==e||q!==t)&&(bd=null,Ud(e,t)),t=!1;var o=cd;a:do try{if(nd!==0&&K!==null){var s=K,c=rd;switch(nd){case 8:Hd(),o=6;break a;case 3:case 2:case 9:case 6:Do.current===null&&(t=!0);var l=nd;if(nd=0,rd=null,tf(e,s,c,l),n&&ad){o=0;break a}break;default:l=nd,nd=0,rd=null,tf(e,s,c,l)}}Xd(),o=cd;break}catch(t){Wd(e,t)}while(1);return t&&e.shellSuspendCounter++,pa=fa=null,ed=r,I.H=i,I.A=a,K===null&&(td=null,q=0,bi()),o}function Xd(){for(;K!==null;)$d(K)}function Zd(e,t){var n=ed;ed|=2;var r=Kd(),a=qd();td!==e||q!==t?(bd=null,yd=Ve()+500,Ud(e,t)):ad=st(e,t);a:do try{if(nd!==0&&K!==null){t=K;var o=rd;b:switch(nd){case 1:nd=0,rd=null,tf(e,t,o,1);break;case 2:case 9:if(Ya(o)){nd=0,rd=null,ef(t);break}t=function(){nd!==2&&nd!==9||td!==e||(nd=7),kf(e)},o.then(t,t);break a;case 3:nd=7;break a;case 4:nd=5;break a;case 7:Ya(o)?(nd=0,rd=null,ef(t)):(nd=0,rd=null,tf(e,t,o,7));break;case 5:var s=null;switch(K.tag){case 26:s=K.memoizedState;case 5:case 27:var c=K;if(s?Ym(s):c.stateNode.complete){nd=0,rd=null;var l=c.sibling;if(l!==null)K=l;else{var u=c.return;u===null?K=null:(K=u,nf(u))}break b}}nd=0,rd=null,tf(e,t,o,5);break;case 6:nd=0,rd=null,tf(e,t,o,6);break;case 8:Hd(),cd=6;break a;default:throw Error(i(462))}}Qd();break}catch(t){Wd(e,t)}while(1);return pa=fa=null,I.H=r,I.A=a,ed=n,K===null?(td=null,q=0,bi(),cd):0}function Qd(){for(;K!==null&&!ze();)$d(K)}function $d(e){var t=ul(e.alternate,e,sd);e.memoizedProps=e.pendingProps,t===null?nf(e):K=t}function ef(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Wc(n,t,t.pendingProps,t.type,void 0,q);break;case 11:t=Wc(n,t,t.pendingProps,t.type.render,t.ref,q);break;case 5:ns(t);var r=t;r===$i&&(W?(oa(r),r.tag===5&&r.stateNode!=null&&(ea=r.stateNode)):(oa(r),W=!0));default:yl(n,t),t=K=ji(t,sd),t=ul(n,t,sd)}e.memoizedProps=e.pendingProps,t===null?nf(e):K=t}function tf(e,t,n,r){pa=fa=null,ns(t),to=null,no=0;var i=t.return;try{if(kc(e,i,t,n,q)){cd=1,wc(e,Ri(n,e.current)),K=null;return}}catch(t){if(i!==null)throw K=i,t;cd=1,wc(e,Ri(n,e.current)),K=null;return}t.flags&32768?(W||r===1?e=!0:ad||q&536870912?e=!1:(id=e=!0,(r===2||r===9||r===3||r===6)&&(r=Do.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,id);return}e=t.return;var n=_l(t.alternate,t,sd);if(n!==null){K=n;return}if(t=t.sibling,t!==null){K=t;return}K=t=e}while(t!==null);cd===0&&(cd=5)}function rf(e,t){do{var n=vl(e.alternate,e);if(n!==null){n.flags&=32767,K=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){K=e;return}K=e=n}while(e!==null);cd=6,K=null}function af(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do pf();while(J!==0);if(ed&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===td&&(K=td=null,q=0),Cd=t,Sd=e,wd=n,Ed=a,Dd=r,of(e,t,n,s,c,l,f)}}function of(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Td=s,s|=yi,pt(e,n,s,r,i,a),kd=null,(n&335544064)===n?(Ad=Ma(e),r=10262):(Ad=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Sf(Ge,function(){return mf(),null})):(e.callbackNode=null,e.callbackPriority=0),Rl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=I.T,I.T=null,i=L.p,L.p=2,a=ed,ed|=4;try{pu(e,t,n)}finally{ed=a,L.p=i,I.T=r}}J=1,Rl?Od=Np(o,e.containerInfo,Ad,lf,uf,cf,df,mf,sf,null,null):(lf(),uf(),df())}function sf(e){if(J!==0){var t=Sd.onRecoverableError;t(e,{componentStack:null})}}function cf(){J===3&&(J=0,Pu(Cd,Sd),J=4)}function lf(){if(J===1){J=0;var e=Sd,t=Cd,n=wd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=I.T,I.T=null;var i=L.p;L.p=2;var a=ed;ed|=4;try{uu=du=!1,Au(t,e,n),n=up;var o=Kr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Gr(s.ownerDocument.documentElement,s)){if(c!==null&&qr(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 _=Wr(s,h),v=Wr(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}}gh=!!lp,up=lp=null}finally{ed=a,L.p=i,I.T=r}}e.current=t,J=2}}function uf(){if(J===2){J=0;var e=Sd,t=Cd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=ed;ed|=4;try{hu(e,t.alternate,t)}finally{ed=i,L.p=r,I.T=n}}J=3}}function df(){if(J===4||J===3){J=0;var e=Od;Od=null,Be();var t=Sd,n=Cd,r=wd,i=Dd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?J=5:(J=0,Cd=Sd=null,ff(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(xd=null),vt(r),n=n.stateNode,Ze&&typeof Ze.onCommitFiberRoot==`function`)try{Ze.onCommitFiberRoot(Xe,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=I.T,a=L.p,L.p=2,I.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{I.T=n,L.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(),kf(t),a=t.pendingLanes,r&261930&&a&42?t===Md?jd++:(jd=0,Md=t):(jd=0,Md=null),Af(0,!1)}}function ff(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ka(t)))}function pf(){return Od!==null&&(Od.skipTransition(),Od=null),lf(),uf(),df(),mf()}function mf(){if(J!==5)return!1;var e=Sd,t=Td;Td=0;var n=vt(wd),r=I.T,a=L.p;try{L.p=32>n?32:n,I.T=null,n=Ed,Ed=null;var o=Sd,s=wd;if(J=0,Cd=Sd=null,wd=0,ed&6)throw Error(i(331));var c=ed;if(ed|=4,Yu(o.current),Vu(o,o.current,s,n),ed=c,Af(0,!1),Ze&&typeof Ze.onPostCommitFiberRoot==`function`)try{Ze.onPostCommitFiberRoot(Xe,o)}catch{}return!0}finally{L.p=a,I.T=r,ff(e,t)}}function hf(e,t,n){t=Ri(n,t),t=Ec(e.stateNode,t,2),e=mo(e,t,2),e!==null&&(ft(e,2),kf(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`&&(xd===null||!xd.has(r))){e=Ri(n,e),n=Dc(2),r=mo(t,n,2),r!==null&&(Oc(n,r,t,e),ft(r,2),kf(r));break}}t=t.return}}function _f(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $u;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)||(od=!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,td===e&&(q&n)===n&&(cd===4||cd===3&&(q&62914560)===q&&300>Ve()-_d?ed&2?dd|=n:Ud(e,0):dd|=n,pd===q&&(pd=0)),kf(e)}function yf(e,t){t===0&&(t=ut()),e=Ci(e,t),e!==null&&(ft(e,t),kf(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,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),yf(e,n)}function Sf(e,t){return Le(e,t)}var Cf=null,wf=null,Tf=!1,Ef=!1,Df=!1,Of=0;function kf(e){e!==wf&&e.next===null&&(wf===null?Cf=wf=e:wf=wf.next=e),Ef=!0,Tf||(Tf=!0,If())}function Af(e,t){if(!Df&&Ef){Df=!0;do for(var n=!1,r=Cf;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-$e(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Ff(r,a))}else a=q,a=ot(r,r===td?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||st(r,a)||(n=!0,Ff(r,a))}r=r.next}while(n);Df=!1}}function jf(){Mf()}function Mf(){Ef=Tf=!1;var e=0;Of!==0&&gp()&&(e=Of);for(var t=Ve(),n=null,r=Cf;r!==null;){var i=r.next,a=Nf(r,t);a===0?(r.next=null,n===null?Cf=i:n.next=i,i===null&&(wf=n)):(n=r,(e!==0||a&3)&&(Ef=!0)),r=i}J!==0&&J!==5||Af(e,!1),Of!==0&&(Of=0)}function Nf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-$e(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=lt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=td,n=q,n=ot(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(nd===2||nd===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Re(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||st(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Re(r),vt(n)){case 2:case 8:n=We;break;case 32:n=Ge;break;case 268435456:n=qe;break;default:n=Ge}return r=Pf.bind(null,e),n=Le(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Re(r),e.callbackPriority=2,e.callbackNode=null,2}function Pf(e,t){if(J!==0&&J!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(pf()&&e.callbackNode!==n)return null;var r=q;return r=ot(e,e===td?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Ld(e,r,t),Nf(e,Ve()),e.callbackNode!=null&&e.callbackNode===n?Pf.bind(null,e):null)}function Ff(e,t){if(pf())return null;Ld(e,t,!0)}function If(){xp(function(){ed&6?Le(Ue,jf):Mf()})}function Lf(){if(Of===0){var e=Fa;e===0&&(e=R,R<<=1,!(R&261888)&&(R=256)),Of=e}return Of}function Rf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:gn(e)}function zf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Rf((i[Ct]||null).action),o=r.submitter;o&&(t=(t=o[Ct]||null)?Rf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Rn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Of!==0){var e=new FormData(i,o);Qs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Qs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Bf=0;Bf<pi.length;Bf++){var Vf=pi[Bf];mi(Vf.toLowerCase(),`on`+(Vf[0].toUpperCase()+Vf.slice(1)))}mi(ai,`onAnimationEnd`),mi(oi,`onAnimationIteration`),mi(si,`onAnimationStart`),mi(`dblclick`,`onDoubleClick`),mi(`focusin`,`onFocus`),mi(`focusout`,`onBlur`),mi(ci,`onTransitionRun`),mi(li,`onTransitionStart`),mi(ui,`onTransitionCancel`),mi(di,`onTransitionEnd`),Bt(`onMouseEnter`,[`mouseout`,`mouseover`]),Bt(`onMouseLeave`,[`mouseout`,`mouseover`]),Bt(`onPointerEnter`,[`pointerout`,`pointerover`]),Bt(`onPointerLeave`,[`pointerout`,`pointerover`]),zt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),zt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),zt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),zt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),zt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),zt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Hf=`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(` `),Uf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Hf));function Wf(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){_i(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){_i(e)}i.currentTarget=null,a=c}}}}function Y(e,t){var n=t[Tt];n===void 0&&(n=t[Tt]=new Set);var r=e+`__bubble`;n.has(r)||(X(t,e,2,!1),n.add(r))}function Gf(e,t,n){var r=0;t&&(r|=4),X(n,e,r,t)}var Kf=`_reactListening`+Math.random().toString(36).slice(2);function qf(e){if(!e[Kf]){e[Kf]=!0,Lt.forEach(function(t){t!==`selectionchange`&&(Uf.has(t)||Gf(t,!1,e),Gf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Kf]||(t[Kf]=!0,Gf(`selectionchange`,!1,t))}}function X(e,t,n,r){switch(Ch(t)){case 2:var i=_h;break;case 8:i=vh;break;default:i=yh}n=i.bind(null,t,n,e),i=void 0,!Dn||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 s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=jt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}wn(function(){var r=a,i=yn(n),s=[];a:{var c=fi.get(e);if(c!==void 0){var l=Rn,u=e;switch(e){case`keypress`:if(Nn(n)===0)break a;case`keydown`:case`keyup`:l=nr;break;case`focusin`:u=`focus`,l=qn;break;case`focusout`:u=`blur`,l=qn;break;case`beforeblur`:case`afterblur`:l=qn;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`:l=Gn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=ar;break;case ai:case oi:case si:l=Jn;break;case di:l=or;break;case`scroll`:case`scrollend`:l=Bn;break;case`wheel`:l=sr;break;case`copy`:case`cut`:case`paste`:l=Yn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=rr;break;case`submit`:l=ir;break;case`toggle`:case`beforetoggle`:l=cr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;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=Tn(m,p),g!=null&&d.push(Yf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==vn&&(u=n.relatedTarget||n.fromElement)&&(jt(u)||u[wt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?jt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Gn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=rr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Nt(c),h=l==null?u:Nt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,jt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,Zf):null,c!==null&&Qf(s,u,c,d,!1),l!==null&&f!==null&&Qf(s,f,l,d,!0)))}a:{if(c=r?Nt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Or;else if(Sr(c)){if(kr)_=Rr;else{_=Ir;var v=Fr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&pn(r.elementType)&&(_=Or):_=Lr;if(_&&=_(e,r)){Cr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Nt(r):window,e){case`focusin`:(Sr(v)||v.contentEditable===`true`)&&(Yr=v,Xr=r,Zr=null);break;case`focusout`:Zr=Xr=Yr=null;break;case`mousedown`:Qr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Qr=!1,$r(s,n,i);break;case`selectionchange`:if(Jr)break;case`keydown`:case`keyup`:$r(s,n,i)}var y;if(ur)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 vr?gr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(pr&&n.locale!==`ko`&&(vr||b!==`onCompositionStart`?b===`onCompositionEnd`&&vr&&(y=Mn()):(kn=i,An=`value`in kn?kn.value:kn.textContent,vr=!0)),v=Xf(r,b),0<v.length&&(b=new Xn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=_r(n),y!==null&&(b.data=y)))),(y=fr?yr(e,n):br(e,n))&&(b=Xf(r,`onBeforeInput`),0<b.length&&(v=new Xn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),zf(s,e,r,n,i)}Wf(s,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=Tn(e,n),i!=null&&r.unshift(Yf(e,i,a)),i=Tn(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=Tn(n,a),l!=null&&o.unshift(Yf(n,l,c))):i||(l=Tn(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,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||ln(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&ln(e,``+r);else return;break;case`className`:Jt(e,`class`,r);break;case`tabIndex`:Jt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Jt(e,n,r);break;case`style`:fn(e,r,o);return;case`data`:if(t!==`object`){Jt(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=gn(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 o==`function`&&(n===`formAction`?(t!==`input`&&rp(e,t,`name`,a.name,a,null),rp(e,t,`formEncType`,a.formEncType,a,null),rp(e,t,`formMethod`,a.formMethod,a,null),rp(e,t,`formTarget`,a.formTarget,a,null)):(rp(e,t,`encType`,a.encType,a,null),rp(e,t,`method`,a.method,a,null),rp(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=gn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=_n);return;case`onScroll`:r!=null&&Y(`scroll`,e);return;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__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=gn(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`:Y(`beforetoggle`,e),Y(`toggle`,e),qt(e,`popover`,r);break;case`xlinkActuate`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:qt(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=mn.get(n)||n,qt(e,n,r);else return}Gt=!0}function ip(e,t,n,r,a,o){switch(n){case`style`:fn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)ln(e,r);else if(typeof r==`number`||typeof r==`bigint`)ln(e,``+r);else return;break;case`onScroll`:r!=null&&Y(`scroll`,e);return;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=_n);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Rt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[Ct]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Gt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):qt(e,n,r)}return}Gt=!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`:Y(`error`,e),Y(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:rp(e,t,o,s,n,null)}}a&&rp(e,t,`srcSet`,n.srcSet,n,null),r&&rp(e,t,`src`,n.src,n,null);return;case`input`:Y(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:rp(e,t,r,d,n,null)}}rn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Y(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:rp(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&on(e,!!r,n,!0):on(e,!!r,t,!1);return;case`textarea`:for(s in Y(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:rp(e,t,s,c,n,null)}cn(e,r,a,o);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`:Y(`beforetoggle`,e),Y(`toggle`,e),Y(`cancel`,e),Y(`close`,e);break;case`iframe`:case`object`:Y(`load`,e);break;case`video`:case`audio`:for(r=0;r<Hf.length;r++)Y(Hf[r],e);break;case`image`:Y(`error`,e),Y(`load`,e);break;case`details`:Y(`toggle`,e);break;case`embed`:case`source`:case`link`:Y(`error`,e),Y(`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(i(137,t));default:rp(e,t,u,r,n,null)}return;default:if(pn(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 a=null,o=null,s=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&&(Gt=!0),o=m;break;case`name`:m!==f&&(Gt=!0),a=m;break;case`checked`:m!==f&&(Gt=!0),u=m;break;case`defaultChecked`:m!==f&&(Gt=!0),d=m;break;case`value`:m!==f&&(Gt=!0),s=m;break;case`defaultValue`:m!==f&&(Gt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&rp(e,t,p,m,r,f)}}B(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||rp(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Gt=!0),p=o;break;case`defaultValue`:o!==l&&(Gt=!0),c=o;break;case`multiple`:o!==l&&(Gt=!0),s=o;default:o!==l&&rp(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?on(e,!!n,n?[]:``,!1):on(e,!!n,t,!0)):on(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:rp(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Gt=!0),p=a;break;case`defaultValue`:a!==o&&(Gt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&rp(e,t,s,a,r,o)}sn(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&&(Gt=!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(i(137,t));break;default:rp(e,t,u,p,r,m)}return;default:if(pn(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 Z(){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 lp=null,up=null;function dp(e){return e.nodeType===9?e:e.ownerDocument}function fp(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 pp(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 Q(e,t,n,r){return n=dp(n).createElement(e),n[St]=r,n[Ct]=t,ap(n,e,t),Ft(n),n}function mp(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 hp=null;function gp(){var e=window.event;return e&&e.type===`popstate`?e!==hp&&(hp=e,!0):(hp=null,!1)}var _p=typeof setTimeout==`function`?setTimeout:void 0,vp=typeof clearTimeout==`function`?clearTimeout:void 0,yp=typeof Promise==`function`?Promise:void 0,bp=typeof requestAnimationFrame==`function`?requestAnimationFrame:_p,xp=typeof queueMicrotask==`function`?queueMicrotask:yp===void 0?_p:function(e){return yp.resolve(null).then(e).catch(Sp)};function Sp(e){setTimeout(function(){throw e})}function Cp(e){return e===`head`}function wp(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),Hh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)vm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,vm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[kt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&vm(e.ownerDocument.body)}n=i}while(n);Hh(t)}function Tp(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 Ep(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 Dp(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 Op(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 kp(e){return Op(e.getBoundingClientRect(),getComputedStyle(e),e)}function Ap(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Op(t,n,e)}function jp(e){return e.documentElement.clientHeight}function Mp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Np(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`&&(jp(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+=Xm(f),u>$m){s.length=o;break}f=new Promise(Mp.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 Pp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Pp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Pp.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},Pp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Fp(e){return{name:e,group:new Pp(`group`,e),imagePair:new Pp(`image-pair`,e),old:new Pp(`old`,e),new:new Pp(`new`,e)}}function Ip(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Ip.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(Vp(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=zp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),p(this._fragmentFiber.child,!1,Lp,e,s,r)}this._eventListeners=a}};function Lp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Ip.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Vp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=zp(i.optionsOrUseCapture),p(this._fragmentFiber.child,!1,Rp,e,n,i),r.splice(t,1),a!==null&&a()}};function Rp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function zp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Bp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Vp(e,t,n,r){if(e.length===0)return-1;r=Bp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Bp(a.optionsOrUseCapture)===r)return i}return-1}Ip.prototype.dispatchEvent=function(e){var t=h(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,zp(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,zp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Ip.prototype.focus=function(e){p(this._fragmentFiber.child,!0,Hp,e,void 0,void 0)};function Hp(e,t){return e.tag!==6&&(e=b(e),mm(e,t))}Ip.prototype.focusLast=function(e){var t=[];p(this._fragmentFiber.child,!0,Up,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Hp(t[n],e);n--);};function Up(e,t){return t.push(e),!1}Ip.prototype.blur=function(){var e=h(this._fragmentFiber);e!==null&&(e=b(e),e=dp(e).activeElement,e!==null&&p(this._fragmentFiber.child,!1,Wp,e,void 0,void 0))};function Wp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Ip.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),p(this._fragmentFiber.child,!1,Gp,e,void 0,void 0)};function Gp(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}Ip.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),p(this._fragmentFiber.child,!1,Kp,e,void 0,void 0);for(var n=t=0;n<qp.length;n++){var r=qp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):qp[t++]=r}qp.length=t}};function Kp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var qp=[],Jp=!1;function Yp(e,t,n){qp.push({fragmentInstance:e,observer:t,instance:n}),Jp||(Jp=!0,hm(function(){Jp=!1;var e=qp;qp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Ip.prototype.getClientRects=function(){var e=[];return p(this._fragmentFiber.child,!1,Xp,e,void 0,void 0),e};function Xp(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}Ip.prototype.getRootNode=function(e){var t=h(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Ip.prototype.compareDocumentPosition=function(e){var t=h(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];p(this._fragmentFiber.child,!1,Up,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||Zp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Zp(e,t,n,r,i){var a=jt(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=h(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:(p(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:(p(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function Qp(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)}Ip.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];p(this._fragmentFiber.child,!1,Up,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]||h(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),Qp(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 a=t[r];a.tag===6?(a=b(a),Qp(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function $p(e,t){return e=b(e),em(e,t),!1}function em(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function tm(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,zp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<qp.length;i++){var a=qp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(qp[r++]=a)}qp.length=r,n.observe(e)}),em(e,t))}function nm(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,zp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Yp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function rm(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`:rm(n),z(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function im(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[kt])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=um(e.nextSibling),e===null)break}return null}function am(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=um(e.nextSibling),e===null))return null;return e}function om(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=um(e.nextSibling),e===null))return null;return e}function sm(e){return e.data===`$?`||e.data===`$~`}function cm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function lm(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 um(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 dm=null;function fm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return um(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function pm(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 mm(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 hm(e){bp(function(){bp(function(t){return e(t)})})}function gm(e,t,n){switch(t=dp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function _m(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===_n&&(e.onclick=null),z(e)}function vm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);z(e)}var ym=new Map,bm=new Set;function xm(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 Sm=L.d;L.d={f:Cm,r:wm,D:Dm,C:Om,L:km,m:Am,X:Mm,S:jm,M:Nm};function Cm(){var e=Sm.f(),t=Vd();return e||t}function wm(e){var t=Mt(e);t!==null&&t.tag===5&&t.type===`form`?ec(t):Sm.r(e)}var Tm=typeof document>`u`?null:document;function Em(e,t,n){var r=Tm;if(r&&typeof t==`string`&&t){var i=nn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),bm.has(i)||(bm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),ap(t,`link`,e),Ft(t),r.head.appendChild(t)))}}function Dm(e){Sm.D(e),Em(`dns-prefetch`,e,null)}function Om(e,t){Sm.C(e,t),Em(`preconnect`,e,t)}function km(e,t,n){Sm.L(e,t,n);var r=Tm;if(r&&e&&t){var i=`link[rel="preload"][as="`+nn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+nn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+nn(n.imageSizes)+`"]`)):i+=`[href="`+nn(e)+`"]`;var a=i;switch(t){case`style`:a=Fm(e);break;case`script`:a=zm(e)}if(!(ym.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),ym.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Im(a))||t===`script`&&r.querySelector(Bm(a))))){var o=r.createElement(`link`);ap(o,`link`,e),t===`style`&&(o[At]=!0,o.onload=o.onerror=function(){It(o)}),Ft(o),r.head.appendChild(o)}}}function Am(e,t){Sm.m(e,t);var n=Tm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+nn(r)+`"][href="`+nn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=zm(e)}if(!ym.has(a)&&(e=D({rel:`modulepreload`,href:e},t),ym.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Bm(a)))return}r=n.createElement(`link`),ap(r,`link`,e),Ft(r),n.head.appendChild(r)}}}function jm(e,t,n){Sm.S(e,t,n);var r=Tm;if(r&&e){var i=Pt(r).hoistableStyles,a=Fm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Im(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=ym.get(a))&&Um(e,n);var c=o=r.createElement(`link`);Ft(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,Hm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Mm(e,t){Sm.X(e,t);var n=Tm;if(n&&e){var r=Pt(n).hoistableScripts,i=zm(e),a=r.get(i);a||(a=n.querySelector(Bm(i)),a||(e=D({src:e,async:!0},t),(t=ym.get(i))&&Wm(e,t),a=n.createElement(`script`),Ft(a),ap(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t){Sm.M(e,t);var n=Tm;if(n&&e){var r=Pt(n).hoistableScripts,i=zm(e),a=r.get(i);a||(a=n.querySelector(Bm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=ym.get(i))&&Wm(e,t),a=n.createElement(`script`),Ft(a),ap(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pm(e,t,n,r){var a=(a=Ce.current)?xm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Fm(n.href),t=Pt(a).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=Fm(n.href);var o=Pt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Im(e)))?o._p||(s.instance=o,s.state.loading=5):(o=ym.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},ym.set(e,o)),Rm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=zm(n),t=Pt(a).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(i(444,e))}}function Fm(e){return`href="`+nn(e)+`"`}function Im(e){return`link[rel="stylesheet"][`+e+`]`}function Lm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Rm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[At]){r.loading=1;return}}else t=e.createElement(`link`),t[At]=!0,t.onload=t.onerror=It.bind(null,t),ap(t,`link`,n),Ft(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 zm(e){return`[src="`+nn(e)+`"]`}function Bm(e){return`script[async]`+e}function Vm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+nn(n.href)+`"]`);if(r)return t.instance=r,Ft(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ft(r),ap(r,`style`,a),Hm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Fm(n.href);var o=e.querySelector(Im(a));if(o)return t.state.loading|=4,t.instance=o,Ft(o),o;r=Lm(n),(a=ym.get(a))&&Um(r,a),o=(e.ownerDocument||e).createElement(`link`),Ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),ap(o,`link`,r),t.state.loading|=4,Hm(o,n.precedence,e),t.instance=o;case`script`:return o=zm(n.src),(a=e.querySelector(Bm(o)))?(t.instance=a,Ft(a),a):(r=n,(a=ym.get(o))&&(r=D({},n),Wm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ft(a),ap(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Hm(r,n.precedence,e));return t.instance}function Hm(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 Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Wm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Gm=null;function Km(e,t,n){if(Gm===null){var r=new Map,i=Gm=new Map;i.set(n,r)}else i=Gm,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[kt]||a[St]||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 qm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function $(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 Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(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=Fm(r.href),a=t.querySelector(Im(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ft(a);return}a=t.ownerDocument||t,r=Lm(r),(i=ym.get(i))&&Um(r,i),a=a.createElement(`link`),Ft(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=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$m===0&&($m=62500*Z());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.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=nh.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 sh={$$typeof:P,Provider:null,Consumer:null,_currentValue:he,_currentValue2:he,_threadCount:0};function ch(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=dt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dt(0),this.hiddenUpdates=dt(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 lh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ch(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Oi(3,null,null,t),e.current=a,a.stateNode=e,t=Oa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},uo(a),e}function uh(e){return e?(e=Ei,e):Ei}function dh(e,t,n,r,i,a){i=uh(i),r.context===null?r.context=i:r.pendingContext=i,r=po(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=mo(e,r,t),n!==null&&(Id(n,e,t),ho(n,e,t))}function fh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ph(e,t){fh(e,t),(e=e.alternate)&&fh(e,t)}function mh(e){if(e.tag===13||e.tag===31){var t=Ci(e,67108864);t!==null&&Id(t,e,67108864),ph(e,67108864)}}function hh(e){if(e.tag===13||e.tag===31){var t=Nd();t=_t(t);var n=Ci(e,t);n!==null&&Id(n,e,t),ph(e,t)}}var gh=!0;function _h(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,yh(e,t,n,r)}finally{L.p=a,I.T=i}}function vh(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,yh(e,t,n,r)}finally{L.p=a,I.T=i}}function yh(e,t,n,r){if(gh){var i=bh(r);if(i===null)Jf(e,t,r,xh,n),Mh(e,r);else if(Ph(i,e,t,n,r))r.stopPropagation();else if(Mh(e,r),t&4&&-1<jh.indexOf(e)){for(;i!==null;){var a=Mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=at(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-$e(o);s.entanglements[1]|=c,o&=~c}kf(a),!(ed&6)&&(yd=Ve()+500,Af(0,!1))}}break;case 31:case 13:s=Ci(a,2),s!==null&&Id(s,a,2),Vd(),ph(a,2)}if(a=bh(r),a===null&&Jf(e,t,r,xh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Jf(e,t,r,null,n)}}function bh(e){return e=yn(e),Sh(e)}var xh=null;function Sh(e){if(xh=null,e=jt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(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 xh=e,null}function Ch(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(He()){case Ue:return 2;case We:return 8;case Ge:case Ke:return 32;case qe:return 268435456;default:return 32}default:return 32}}var wh=!1,Th=null,Eh=null,Dh=null,Oh=new Map,kh=new Map,Ah=[],jh=`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 Mh(e,t){switch(e){case`focusin`:case`focusout`:Th=null;break;case`dragenter`:case`dragleave`:Eh=null;break;case`mouseover`:case`mouseout`:Dh=null;break;case`pointerover`:case`pointerout`:Oh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kh.delete(t.pointerId)}}function Nh(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=Mt(t),t!==null&&mh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ph(e,t,n,r,i){switch(t){case`focusin`:return Th=Nh(Th,e,t,n,r,i),!0;case`dragenter`:return Eh=Nh(Eh,e,t,n,r,i),!0;case`mouseover`:return Dh=Nh(Dh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Oh.set(a,Nh(Oh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kh.set(a,Nh(kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Fh(e){var t=jt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,bt(e.priority,function(){hh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,bt(e.priority,function(){hh(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 Ih(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);vn=r,n.target.dispatchEvent(r),vn=null}else return t=Mt(n),t!==null&&mh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lh(e,t,n){Ih(e)&&n.delete(t)}function Rh(){wh=!1,Th!==null&&Ih(Th)&&(Th=null),Eh!==null&&Ih(Eh)&&(Eh=null),Dh!==null&&Ih(Dh)&&(Dh=null),Oh.forEach(Lh),kh.forEach(Lh)}function zh(e,n){e.blockedOn===n&&(e.blockedOn=null,wh||(wh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rh)))}var Bh=null;function Vh(e){Bh!==e&&(Bh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bh===e&&(Bh=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(Sh(r||n)===null)continue;break}var a=Mt(n);a!==null&&(e.splice(t,3),t-=3,Qs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}Th!==null&&zh(Th,e),Eh!==null&&zh(Eh,e),Dh!==null&&zh(Dh,e),Oh.forEach(t),kh.forEach(t);for(var n=0;n<Ah.length;n++){var r=Ah[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ah.length&&(n=Ah[0],n.blockedOn===null);)Fh(n),n.blockedOn===null&&Ah.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[Ct]||null;if(typeof a==`function`)o||Vh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Ct]||null)s=o.formAction;else if(Sh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vh(n)}}}function Uh(){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 Wh(e){this._internalRoot=e}Gh.prototype.render=Wh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dh(n,Nd(),e,t,null,null)},Gh.prototype.unmount=Wh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dh(e.current,2,null,e,null,null),Vd(),t[wt]=null}};function Gh(e){this._internalRoot=e}Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=yt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ah.length&&t!==0&&t<Ah[n].priority;n++);Ah.splice(n,0,e),n===0&&Fh(e)}};var Kh=n.version;if(Kh!==`19.3.1`)throw Error(i(527,Kh,`19.3.1`));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var qh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{Xe=Jh.inject(qh),Ze=Jh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=xc,s=Sc,c=Cc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=lh(e,1,!1,null,null,n,r,null,o,s,c,Uh),e[wt]=t.current,qf(e),new Wh(t)},e.hydrateRoot=function(e,t,n){if(!a(e))throw Error(i(299));var r=!1,o=``,s=xc,c=Sc,l=Cc,u=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=lh(e,1,!0,t,n??null,r,o,u,s,c,l,Uh),t.context=uh(null),n=t.current,r=Nd(),r=_t(r),o=po(r),o.callback=null,mo(n,o,r),n=r,t.current.lanes=n,ft(t,n),kf(t),e[wt]=t.current,qf(e),new Gh(t)}})),v=s(((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=_()})),y=m(),b=v(),x=e=>e.attrs?.bind??`@${e.id}`,S=1e6,C=1e4,w=1e5,T=1e4,E=1e5,D=2e3,O=2e4,k=2e6,A=1e3,j=2e3,M=1e4;function N(e){if(e.length>254||/\s/.test(e))return!1;let t=e.indexOf(`@`);if(t<1||t!==e.lastIndexOf(`@`))return!1;let n=e.lastIndexOf(`.`);return n>t+1&&n<e.length-1}var ee=class extends Error{code;constructor(e,t){super(t),this.name=`LocalFunctionError`,this.code=e}},P=[`en-US`,`zh-CN`,`de-DE`,`fr-FR`,`ja-JP`],te=new Set(P),F=/^[A-Z]{3}$/,ne=20;function re(e){throw new ee(`expression-domain`,e)}function ie(e,t){if(e.length>1e5)throw new ee(`expression-budget`,`${t} exceeds the ${w}-character limit.`);return e}function ae(e){return te.has(e)||re(`Unsupported locale "${e}"; expected one of ${P.join(`, `)}.`),e}function oe(e,t){return(!Number.isInteger(e)||e<0||e>ne)&&re(`${t} digits must be an integer from 0 to ${ne}.`),e}function se(e){if(!Number.isFinite(e))throw new ee(`expression-number`,`Value must be a finite number.`);return e}function ce(e){return e===0?0:e}function le(e,t){let n=se(e);return n===0||Math.abs(n)<.5*10**-t?0:n}function ue(e,t){let n=se(e);return n===0||Math.abs(n)<.5*10**-(t+2)?0:n}function de(e,t,n,r,i){let a;try{a=new Intl.NumberFormat(e,t)}catch{a=void 0}return a===void 0&&re(i),ie(a.format(n),r)}function fe(e,t=2,n=`en-US`,r=!0){let i=ae(n),a=oe(t,`formatNumber`);return typeof r!=`boolean`&&re(`formatNumber grouping must be a boolean.`),e===null?``:de(i,{useGrouping:r,minimumFractionDigits:a,maximumFractionDigits:a,roundingMode:`halfExpand`},le(e,a),`Formatted number`,`Cannot format a number for locale "${i}".`)}function pe(e,t=0,n=`en-US`){let r=ae(n),i=oe(t,`formatPercent`);return e===null?``:de(r,{style:`percent`,minimumFractionDigits:i,maximumFractionDigits:i,roundingMode:`halfExpand`},ue(e,i),`Formatted percentage`,`Cannot format a percentage for locale "${r}".`)}function me(e,t=2,n=`en-US`){let r=ae(n),i=oe(t,`formatScientific`);return e===null?``:de(r,{notation:`scientific`,minimumFractionDigits:i,maximumFractionDigits:i,roundingMode:`halfExpand`},ce(se(e)),`Formatted number`,`Cannot format a number for locale "${r}".`)}function I(e,t=`USD`,n=2,r=`en-US`){let i=ae(r);F.test(t)||re(`Currency "${t}" must be a three-letter uppercase code such as "USD".`);let a=oe(n,`formatCurrency`);return e===null?``:de(i,{style:`currency`,currency:t,minimumFractionDigits:a,maximumFractionDigits:a,roundingMode:`halfExpand`},le(e,a),`Formatted currency`,`Currency code "${t}" is not accepted by Intl.`)}function L(){throw new ee(`expression-number`,`The result is not a finite number.`)}function he(e){if(!Number.isFinite(e))throw new ee(`expression-value`,`Numeric array members must be finite numbers.`);return e}function ge(e){let t=0;for(let n of e)t+=he(n);return Number.isFinite(t)||L(),t}function _e(e){if(e.length===0)return null;let t=ge(e)/e.length;return Number.isFinite(t)||L(),t}function ve(e){if(e.length===0)return null;let t=he(e[0]);for(let n=1;n<e.length;n+=1){let r=he(e[n]);r<t&&(t=r)}return t}function ye(e){if(e.length===0)return null;let t=he(e[0]);for(let n=1;n<e.length;n+=1){let r=he(e[n]);r>t&&(t=r)}return t}function be(e){let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2]),i=Number(t[3]);if(n<1||r<1||r>12||i<1||i>31)return null;let a=new Date(0);return a.setUTCFullYear(n,r-1,i),a.getUTCFullYear()===n&&a.getUTCMonth()===r-1&&a.getUTCDate()===i?a.getTime():null}function xe(e){throw new ee(`expression-domain`,e)}function Se(e){return ie(e.trim(),`trim result`)}function Ce(e){return ie(e.toLowerCase(),`lower result`)}function we(e){return ie(e.toUpperCase(),`upper result`)}function Te(e,t){return e.startsWith(t)}function Ee(e,t){return e.endsWith(t)}function De(e,t,n){t.length===0&&xe(`replace search text must not be empty.`);let r=n.length-t.length;if(r>0){let n=0,i=0;for(;;){let r=e.indexOf(t,i);if(r<0)break;n+=1,i=r+t.length}if(e.length+n*r>1e5)throw new ee(`expression-budget`,`replace result would exceed the ${w}-character limit.`)}let i=``,a=0;for(;;){let r=e.indexOf(t,a);if(r<0)break;i+=e.slice(a,r),i+=n,a=r+t.length}return i+=e.slice(a),ie(i,`replace result`)}function Oe(e,t){return e<0?Math.max(t+e,0):Math.min(e,t)}function ke(e,t,n){Number.isInteger(t)||xe(`slice start must be an integer.`),n!==void 0&&!Number.isInteger(n)&&xe(`slice end must be an integer.`);let r=Array.from(e),i=r.length,a=Oe(t,i),o=n===void 0?i:Oe(n,i);return o<=a?``:ie(r.slice(a,o).join(``),`slice result`)}var Ae=new Map([[`days`,864e5],[`hours`,36e5],[`minutes`,6e4],[`seconds`,1e3],[`milliseconds`,1]]),je=`days, hours, minutes, seconds or milliseconds`;function Me(e){let t=be(e);if(t===null)throw new ee(`expression-domain`,`Date "${e}" must be a valid YYYY-MM-DD calendar date in years 0001-9999.`);return t}function Ne(e,t){let n=Me(e),r=Me(t);return n===r?0:n<r?-1:1}function Pe(e,t,n=`days`){let r=Ae.get(n);return r===void 0&&xe(`dateDiff unit must be ${je}.`),(Me(e)-Me(t))/r}var Fe=16,Ie=256,Le=2e3;function Re(e){if(typeof e==`string`)return e.length>Ie?`${e.slice(0,255)}…`:e;if(typeof e==`number`)return Number.isFinite(e)?e:String(e);if(typeof e==`boolean`||e===null)return e;if(e===void 0)return``;try{let t=JSON.stringify(e)??String(e);return t.length>Ie?`${t.slice(0,255)}…`:t}catch{return String(e).slice(0,Ie)}}function ze(e){let t=Object.entries(e);if(t.length===0)return;let n={},r=0,i=0;for(let[e,a]of t){if(i>=Fe)break;if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(e))continue;let t;try{t=Re(a)}catch{t=``}let o=typeof t==`string`?t.length:String(t).length;if(r+o>Le)break;n[e]=t,r+=o,i+=1}return i>0?n:void 0}function Be(e,t){let n=t?ze(t):void 0;return n?{key:e,params:n}:{key:e}}var Ve={"local.version.unsupported":{en:`This reader accepts {supported}; migrate {declared} or use a compatible reader.`,zh:`此阅读器支持 {supported};请迁移 {declared} 或使用兼容的阅读器。`},"local.version.malformed":{en:`Use <!-- reactive-md: local-draft-2 --> on one line.`,zh:`请在单独一行使用 <!-- reactive-md: local-draft-2 -->。`},"local.version.duplicate":{en:`Only one source syntax declaration is allowed.`,zh:`源码只能声明一次语法版本。`},"local.version.placement":{en:`The syntax declaration must be on its own line before the theme and document body.`,zh:`语法版本声明必须独占一行,位于主题声明和正文之前。`},"local.upgrade.from-version":{en:`Cannot migrate from {from}: {detail}.`,zh:`无法从 {from} 迁移:{detail}。`},"local.upgrade.reserved-binding":{en:`Binding {name} becomes reserved in local-draft-2; rename it with a compatible old editor before migration.`,zh:`绑定 {name} 在 local-draft-2 中成为保留名;迁移前请用兼容旧版本的编辑器重命名。`},"local.upgrade.tag":{en:`Tag {name} was inert in local-draft-1 and becomes active in local-draft-2; preserve it as literal code before migration.`,zh:`标签 {name} 在 local-draft-1 中不执行,在 local-draft-2 中会激活;迁移前请将其保留为代码原文。`},"local.upgrade.text-length":{en:`Text length constraints change from UTF-16 units to Unicode code points; explicitly accept this semantic change before migration.`,zh:`文本长度约束从 UTF-16 单元改为 Unicode 码点计数;迁移前须明确接受这一语义变化。`},"local.upgrade.expression":{en:`This expression uses array syntax or a function introduced in local-draft-2; it is outside automatic draft-1 migration.`,zh:`此表达式使用了 local-draft-2 新增的数组语法或函数,不属于 draft-1 自动迁移范围。`},"local.upgrade.version-missing":{en:`The source has no syntax declaration; migration will pin {version}.`,zh:`源码尚未声明语法版本;迁移将固定为 {version}。`},"parse.sourceType":{en:`Document source must be a string.`,zh:`文档源必须是字符串。`},"parse.markdownFailed":{en:`Cannot parse the Markdown document.`,zh:`无法解析 Markdown 文档。`},"parse.failed":{en:`Cannot parse document: {detail}`,zh:`无法解析文档:{detail}`},"budget.document":{en:`Document exceeds the {limit}-character limit.`,zh:`文档超过 {limit} 个字符的上限。`},"budget.syntaxNodes":{en:`Syntax nodes exceed the limit of {limit}.`,zh:`语法节点数量超过上限 {limit}。`},"budget.nesting":{en:`Component nesting exceeds the {limit}-level limit.`,zh:`组件嵌套超过 {limit} 层上限。`},"options.notObject":{en:`Compile options must be an object.`,zh:`编译选项必须是对象。`},"options.limitsNotObject":{en:`Compile option limits must be an object.`,zh:`编译选项 limits 必须是对象。`},"options.maxSyntaxNodes":{en:`Compile option limits.maxSyntaxNodes must be a positive safe integer.`,zh:`编译选项 limits.maxSyntaxNodes 必须是正安全整数。`},"theme.expression":{en:`Theme names must be static text, not expressions.`,zh:`主题名称必须是静态文本,不能是表达式。`},"theme.nameRequired":{en:`A theme declaration requires a quoted name attribute.`,zh:`主题声明需要一个带引号的 name 属性。`},"theme.attributeOnly":{en:`Theme declarations only accept a quoted name attribute.`,zh:`主题声明只接受带引号的 name 属性。`},"theme.nameInvalid":{en:`Theme name "{name}" must use lowercase letters, digits and single hyphens (maximum {limit} characters).`,zh:`主题名称“{name}”只能使用小写字母、数字和单个连字符(最多 {limit} 个字符)。`},"theme.malformedMissingClose":{en:`Theme declaration is missing >.`,zh:`主题声明缺少 >。`},"theme.malformedClosing":{en:`A theme declaration cannot be a closing tag.`,zh:`主题声明不能是结束标签。`},"theme.malformedStandalone":{en:`A theme declaration must be on its own line before the document content.`,zh:`主题声明必须单独占一行并位于文档内容之前。`},"theme.duplicateDeclaration":{en:`Only one theme declaration is allowed before the document content; this declaration is ignored.`,zh:`文档内容之前只允许一个主题声明;此声明将被忽略。`},"theme.late":{en:`Theme declarations after document content are ignored.`,zh:`文档内容之后的主题声明将被忽略。`},"theme.nested":{en:`Theme declarations inside document content are ignored.`,zh:`文档内容内部的主题声明将被忽略。`},"theme.invalidDeclaration":{en:`Invalid theme declaration.`,zh:`无效的主题声明。`},"attribute.lowercase":{en:`Attribute names must use lowercase kebab-case.`,zh:`属性名必须使用小写 kebab-case。`},"budget.attributeName":{en:`Attribute name exceeds the {limit}-character limit.`,zh:`属性名超过 {limit} 个字符的上限。`},"attribute.nameInvalid":{en:`Attribute name {name} must use lowercase kebab-case.`,zh:`属性名 {name} 必须使用小写 kebab-case。`},"attribute.valueQuoted":{en:`Attribute {name} value must be quoted.`,zh:`属性 {name} 的值必须加引号。`},"attribute.valueUnclosed":{en:`Attribute {name} is missing a closing quote.`,zh:`属性 {name} 缺少结束引号。`},"attribute.duplicate":{en:`Duplicate attribute {name}.`,zh:`重复的属性 {name}。`},"attribute.separator":{en:`Attributes must be separated by whitespace.`,zh:`属性之间必须用空白分隔。`},"budget.tagName":{en:`Tag name exceeds the {limit}-character limit.`,zh:`标签名超过 {limit} 个字符的上限。`},"tag.missingClose":{en:`Tag {name} is missing >.`,zh:`标签 {name} 缺少 >。`},"tag.closingAttributes":{en:`Closing tag </{name}> cannot have attributes.`,zh:`结束标签 </{name}> 不能带属性。`},"tag.nameInvalid":{en:`Tag name {name} must use lowercase kebab-case.`,zh:`标签名 {name} 必须使用小写 kebab-case。`},"tag.unclosedPaired":{en:`<{name}> is missing </{name}>.`,zh:`<{name}> 缺少 </{name}>。`},"tag.mismatchRoot":{en:`Closing tag </{name}> does not match the document root.`,zh:`结束标签 </{name}> 与文档根不匹配。`},"tag.mismatchParent":{en:`Closing tag </{name}> does not match <{parent}>.`,zh:`结束标签 </{name}> 与 <{parent}> 不匹配。`},"tag.requiresClose":{en:`<{name}> requires a closing tag.`,zh:`<{name}> 需要结束标签。`},"footnote.unsupported":{en:`Footnotes are not part of the local interaction syntax and are shown as source.`,zh:`脚注不属于本地交互语法,将按源文本显示。`},"interpolation.unclosed":{en:`Interpolation is missing }}.`,zh:`插值缺少 }}。`},"math.unclosed":{en:`Formula is missing its closing delimiter.`,zh:`公式缺少结束定界符。`},"math.whitespace":{en:`Inline math cannot start or end with whitespace.`,zh:`行内公式不能以空白开头或结尾。`},"budget.math":{en:`Formula exceeds the {limit}-character limit.`,zh:`公式超过 {limit} 个字符的上限。`},"html.raw":{en:`Raw HTML is not part of the local interaction syntax.`,zh:`原始 HTML 不属于本地交互语法。`},"component.unknownSuggestion":{en:`Unknown component <{name}>. Did you mean <{suggestion}>?`,zh:`未知组件 <{name}>。是否想使用 <{suggestion}>?`},"component.unknownPlain":{en:`Unknown component <{name}>. This mode only accepts local interaction components.`,zh:`未知组件 <{name}>。此模式只接受本地交互组件。`},"legacy.fence":{en:`Legacy reactive-md configuration fences (state/data/computed/actions, etc.) are not part of the local interaction syntax; select legacy mode explicitly in the host.`,zh:`旧版 reactive-md 配置围栏(state/data/computed/actions 等)不属于本地交互语法;请在宿主中显式选择旧版模式。`},"attribute.unknownSuggestion":{en:`Component <{component}> does not support attribute {name}. Did you mean {suggestion}?`,zh:`组件 <{component}> 不支持属性 {name}。是否想使用 {suggestion}?`},"attribute.unknownPlain":{en:`Component <{component}> does not support attribute {name}.`,zh:`组件 <{component}> 不支持属性 {name}。`},"budget.attribute":{en:`Attribute {name} on component <{component}> exceeds the {limit}-character limit.`,zh:`组件 <{component}> 的属性 {name} 超过 {limit} 个字符的上限。`},"attribute.color":{en:`Attribute {name} on component <{component}> must be a standard CSS named color or #RGB/#RRGGBB, got "{value}".`,zh:`组件 <{component}> 的属性 {name} 必须是标准 CSS 命名颜色或 #RGB/#RRGGBB,当前为“{value}”。`},"attribute.required":{en:`Component <{component}> is missing required attribute {name}.`,zh:`组件 <{component}> 缺少必需属性 {name}。`},"label.requiredMissing":{en:`Component <{name}> requires a label.`,zh:`组件 <{name}> 需要 label。`},"label.requiredEmpty":{en:`Component <{name}> label cannot be empty.`,zh:`组件 <{name}> 的 label 不能为空。`},"attribute.static":{en:`Attribute {name} is static and cannot contain interpolations.`,zh:`属性 {name} 是静态的,不能包含插值。`},"expression.emptyAttribute":{en:`Attribute {name} interpolation cannot be empty.`,zh:`属性 {name} 的插值不能为空。`},"expression.emptyInterpolation":{en:`Interpolation expression cannot be empty.`,zh:`插值表达式不能为空。`},"attribute.numberInvalid":{en:`Attribute {name} requires a number, got "{value}".`,zh:`属性 {name} 需要数字,当前为“{value}”。`},"attribute.numberInterpolationInvalid":{en:`Attribute {name} requires a number or a full number interpolation, got "{value}".`,zh:`属性 {name} 需要数字或完整的数字插值,当前为“{value}”。`},"attribute.integer":{en:`Attribute {name} requires an integer.`,zh:`属性 {name} 需要整数。`},"attribute.positive":{en:`Attribute {name} requires a positive number.`,zh:`属性 {name} 需要正数。`},"attribute.rangeMin":{en:`Attribute {name} must be at least {min}.`,zh:`属性 {name} 必须至少为 {min}。`},"attribute.rangeMax":{en:`Attribute {name} must be at most {max}.`,zh:`属性 {name} 必须至多为 {max}。`},"attribute.booleanInvalid":{en:`Attribute {name} requires true or false.`,zh:`属性 {name} 需要 true 或 false。`},"attribute.booleanInterpolationInvalid":{en:`Attribute {name} requires true or false, or a full boolean interpolation.`,zh:`属性 {name} 需要 true 或 false,或完整的布尔插值。`},"attribute.enumInvalid":{en:`Attribute {name} must be one of {values}, got "{value}".`,zh:`属性 {name} 必须是 {values} 之一,当前为“{value}”。`},"attribute.dateLower":{en:`Date lower bound {value} is not a valid YYYY-MM-DD.`,zh:`日期下界 {value} 不是有效的 YYYY-MM-DD。`},"attribute.dateUpper":{en:`Date upper bound {value} is not a valid YYYY-MM-DD.`,zh:`日期上界 {value} 不是有效的 YYYY-MM-DD。`},"constraint.componentMinMax":{en:`Component <{name}> min cannot exceed max.`,zh:`组件 <{name}> 的 min 不能大于 max。`},"constraint.componentStep":{en:`Component <{name}> step must be greater than 0.`,zh:`组件 <{name}> 的 step 必须大于 0。`},"constraint.lengthRange":{en:`max-length cannot be less than min-length.`,zh:`max-length 不能小于 min-length。`},"constraint.dateOrder":{en:`Date min cannot be later than max.`,zh:`日期 min 不能晚于 max。`},"constraint.progressRange":{en:`progress value must be between 0 and {max}, got {value}.`,zh:`progress 的 value 必须在 0 到 {max} 之间,当前为 {value}。`},"constraint.plotRange":{en:`plot min must be less than max.`,zh:`plot 的 min 必须小于 max。`},"constraint.timerDuration":{en:`timer duration must be a positive whole number of seconds.`,zh:`timer 的 duration 必须是正整数秒。`},"constraint.rangeSliderOrder":{en:`range-slider min cannot exceed max.`,zh:`range-slider 的 min 不能大于 max。`},"constraint.rangeSliderStep":{en:`range-slider step must be a finite positive number.`,zh:`range-slider 的 step 必须是有限正数。`},"constraint.coordinateOrder":{en:`coordinate {axis}-min cannot exceed {axis}-max.`,zh:`coordinate 的 {axis}-min 不能大于 {axis}-max。`},"constraint.coordinateStep":{en:`coordinate step must be a finite positive number.`,zh:`coordinate 的 step 必须是有限正数。`},"constraint.multiSelectMax":{en:`multi-select max-selected must be a nonnegative whole number.`,zh:`multi-select 的 max-selected 必须是非负整数。`},"constraint.quizTolerance":{en:`<quiz> tolerance must be a nonnegative finite number.`,zh:`<quiz> 的 tolerance 必须是非负有限数。`},"selection.keyNeedsKey":{en:`<{component}> {name} requires a key attribute naming the selection column.`,zh:`<{component}> 的 {name} 需要 key 属性来指定选择列。`},"structure.parent":{en:`<{name}> can only appear directly inside {parents}.`,zh:`<{name}> 只能直接位于 {parents} 内。`},"structure.noBody":{en:`<{name}> does not accept body content.`,zh:`<{name}> 不接受正文内容。`},"structure.inlineOnly":{en:`<{name}> only accepts inline Markdown.`,zh:`<{name}> 只接受行内 Markdown。`},"structure.noNestedComponents":{en:`The body of <{name}> cannot contain other interactive components.`,zh:`<{name}> 的正文不能包含其他交互组件。`},"structure.accordionNeedsDisclosure":{en:`<accordion> requires at least one <disclosure>.`,zh:`<accordion> 至少需要一个 <disclosure>。`},"structure.accordionOnly":{en:`<accordion> can only contain <disclosure>.`,zh:`<accordion> 只能包含 <disclosure>。`},"structure.gridNeedsCard":{en:`<grid> requires at least one <card>.`,zh:`<grid> 至少需要一个 <card>。`},"structure.gridOnlyCard":{en:`Direct children of <grid> must be <card>.`,zh:`<grid> 的直接子元素必须是 <card>。`},"structure.exactlyOneTable":{en:`The body of <{name}> must be exactly one Markdown table.`,zh:`<{name}> 的正文必须恰好是一个 Markdown 表格。`},"structure.plotNeedsFormula":{en:`<plot> requires at least one $$...$$ formula block.`,zh:`<plot> 至少需要一个 $$...$$ 公式块。`},"structure.plotOnlyFormulas":{en:`The body of <plot> can only contain blank lines and $$...$$ formula blocks.`,zh:`<plot> 的正文只能包含空行和 $$...$$ 公式块。`},"structure.nodeNoComponents":{en:`The description of <node> cannot contain interactive components.`,zh:`<node> 的描述不能包含交互组件。`},"structure.optionsNeeded":{en:`<{name}> requires at least one <option value="...">.`,zh:`<{name}> 至少需要一个 <option value="...">。`},"structure.optionsOnly":{en:`<{name}> can only contain <option>.`,zh:`<{name}> 只能包含 <option>。`},"budget.options":{en:`<{name}> options exceed the limit of {limit}.`,zh:`<{name}> 的选项数量超过上限 {limit}。`},"option.valueRequired":{en:`<option> requires a non-empty value.`,zh:`<option> 需要非空 value。`},"option.valueComma":{en:`<multi-select> option values cannot contain commas: "{value}".`,zh:`<multi-select> 的选项值不能包含逗号:“{value}”。`},"option.valueDuplicate":{en:`Option values in <{name}> must be unique; duplicate value "{value}".`,zh:`<{name}> 的选项值必须唯一;重复值“{value}”。`},"structure.optionNoComponents":{en:`The body of <option> cannot contain interactive components.`,zh:`<option> 的正文不能包含交互组件。`},"structure.tabsNeedsTab":{en:`<tabs> requires at least one <tab>.`,zh:`<tabs> 至少需要一个 <tab>。`},"structure.tabsOnly":{en:`<tabs> can only contain <tab>.`,zh:`<tabs> 只能包含 <tab>。`},"tab.valueDuplicate":{en:`Tab values in <tabs> must be unique; duplicate value "{value}".`,zh:`<tabs> 的标签值必须唯一;重复值“{value}”。`},"structure.stepsNeedsStep":{en:`<steps> requires at least one <step>.`,zh:`<steps> 至少需要一个 <step>。`},"structure.stepsOnly":{en:`<steps> can only contain <step>.`,zh:`<steps> 只能包含 <step>。`},"step.valueDuplicate":{en:`Step values in <steps> must be unique; duplicate value "{value}".`,zh:`<steps> 的步骤值必须唯一;重复值“{value}”。`},"quiz.answerRequired":{en:`<quiz> requires a non-empty answer.`,zh:`<quiz> 需要非空 answer。`},"structure.quizNumericNoBody":{en:`A numeric <quiz> cannot have body content; use type="choice" for option-based quizzes.`,zh:`数值型 <quiz> 不能有正文内容;基于选项的测验请使用 type="choice"。`},"quiz.answerNumeric":{en:`A numeric <quiz> answer must be a finite number.`,zh:`数值型 <quiz> 的 answer 必须是有限数字。`},"quiz.answerNotOption":{en:`<quiz> answer "{answer}" is not one of the option values: {options}.`,zh:`<quiz> 的 answer“{answer}”不在选项值中:{options}。`},"diagram.needsNode":{en:`<diagram> requires at least one <node>.`,zh:`<diagram> 至少需要一个 <node>。`},"structure.diagramOnly":{en:`<diagram> can only contain <node> and <edge>.`,zh:`<diagram> 只能包含 <node> 和 <edge>。`},"diagram.nodeInvalid":{en:`Node ID "{id}" may only contain letters, digits, underscores and hyphens, and cannot start with a digit.`,zh:`节点 ID“{id}”只能包含字母、数字、下划线和连字符,且不能以数字开头。`},"diagram.nodeDuplicate":{en:`Duplicate node ID "{id}".`,zh:`重复的节点 ID“{id}”。`},"diagram.edgeFromUnknown":{en:`Edge from references unknown node "{id}".`,zh:`连线起点引用了未知节点“{id}”。`},"diagram.edgeToUnknown":{en:`Edge to references unknown node "{id}".`,zh:`连线终点引用了未知节点“{id}”。`},"diagram.edgeDuplicate":{en:`Duplicate edge: {from} → {to}{label}.`,zh:`重复的连线:{from} → {to}{label}。`},"checklist.bodySingle":{en:`The body of <checklist> must be exactly one single-level Markdown task list.`,zh:`<checklist> 的正文必须恰好是一个单层 Markdown 任务列表。`},"checklist.needsItem":{en:`<checklist> requires at least one task list item.`,zh:`<checklist> 至少需要一个任务列表项。`},"budget.checklistItems":{en:`<checklist> items exceed the limit of {limit}.`,zh:`<checklist> 的任务项数量超过上限 {limit}。`},"checklist.taskOnly":{en:`<checklist> can only contain task list items (- [ ] / - [x]).`,zh:`<checklist> 只能包含任务列表项(- [ ] / - [x])。`},"checklist.noNested":{en:`<checklist> does not support nested lists.`,zh:`<checklist> 不支持嵌套列表。`},"checklist.noComponents":{en:`<checklist> items cannot contain interactive components.`,zh:`<checklist> 的任务项不能包含交互组件。`},"budget.identifier":{en:`Parameter name exceeds the {limit}-character limit.`,zh:`参数名超过 {limit} 个字符的上限。`},"binding.nameInvalid":{en:`Parameter name "{name}" must match [A-Za-z_][A-Za-z0-9_]*.`,zh:`参数名“{name}”必须匹配 [A-Za-z_][A-Za-z0-9_]*。`},"binding.reserved":{en:`Parameter name "{name}" is reserved; choose another name.`,zh:`参数名“{name}”是保留名称;请换一个名称。`},"binding.typeConflict":{en:`Parameter "{key}" is already declared as {kind} by <{first}> and cannot also bind <{second}>.`,zh:`参数“{key}”已由 <{first}> 声明为 {kind},不能再绑定 <{second}>。`},"binding.exclusive":{en:`Parameter "{key}" of <{first}> can only be owned by one component and cannot be shared with <{second}>.`,zh:`<{first}> 的参数“{key}”只能由一个组件拥有,不能与 <{second}> 共享。`},"binding.slotExclusive":{en:`Parameter "{key}" of the {slot} slot of <{name}> is exclusive and cannot be shared with another control.`,zh:`<{name}> 的 {slot} 槽参数“{key}”是独占的,不能与另一个控件共享。`},"binding.constraintConflict":{en:`Parameter "{key}" must use the same numeric range and step: <{first}> has {firstConstraints}, <{second}> has {secondConstraints}.`,zh:`参数“{key}”必须使用相同的数值范围和步长:<{first}> 为 {firstConstraints},<{second}> 为 {secondConstraints}。`},"binding.optionConflict":{en:`Parameter "{key}" must use the same option set in the same order.`,zh:`参数“{key}”必须使用相同顺序的同一组选项。`},"initial.duplicate":{en:`Parameter "{key}" has multiple explicit initial values ({count} in total).`,zh:`参数“{key}”有多个显式初值(共 {count} 个)。`},"initial.duplicatePeers":{en:`Parameter "{key}" has multiple explicit initial values ({count} in total; see also line {lines}).`,zh:`参数“{key}”有多个显式初值(共 {count} 个;另见第 {lines} 行)。`},"initial.rangeNoStep":{en:`Parameter "{key}" has no valid step value within range [{min}, {max}].`,zh:`参数“{key}”在范围 [{min}, {max}] 内没有有效的步长值。`},"initial.cannotDerive":{en:`Cannot derive a default initial value for <{name}> parameter "{key}".`,zh:`无法为 <{name}> 的参数“{key}”推导默认初值。`},"initial.typeFiniteNumber":{en:`Initial value of parameter "{key}" must be a finite number.`,zh:`参数“{key}”的初值必须是有限数字。`},"initial.belowMin":{en:`Initial value {value} of parameter "{key}" is below the minimum {min}.`,zh:`参数“{key}”的初值 {value} 小于最小值 {min}。`},"initial.aboveMax":{en:`Initial value {value} of parameter "{key}" exceeds the maximum {max}.`,zh:`参数“{key}”的初值 {value} 超过最大值 {max}。`},"initial.offStep":{en:`Initial value {value} of parameter "{key}" is not on step {step} (based at {base}).`,zh:`参数“{key}”的初值 {value} 不在步长 {step} 上(基准 {base})。`},"initial.typeBoolean":{en:`Initial value of parameter "{key}" must be a boolean.`,zh:`参数“{key}”的初值必须是布尔值。`},"initial.notAmongOptions":{en:`Initial value "{value}" of parameter "{key}" is not among the available values {options}.`,zh:`参数“{key}”的初值“{value}”不在可用值 {options} 中。`},"initial.typeWrong":{en:`Initial value of parameter "{name}" has the wrong type.`,zh:`参数“{name}”的初值类型不正确。`},"initial.dateInvalid":{en:`Initial date "{value}" is not a valid YYYY-MM-DD.`,zh:`初值日期“{value}”不是有效的 YYYY-MM-DD。`},"initial.notAvailableOption":{en:`Initial value "{value}" is not an available option: {options}.`,zh:`初值“{value}”不是可用选项:{options}。`},"initial.multiSelectOption":{en:`Initial value "{value}" of parameter "{key}" is not an option of <multi-select>.`,zh:`参数“{key}”的初值“{value}”不是 <multi-select> 的选项。`},"initial.rangeSliderOrder":{en:`<range-slider> start {start} cannot be greater than end {end}.`,zh:`<range-slider> 的 start {start} 不能大于 end {end}。`},"initial.slotBelowMin":{en:`Initial value {value} of <{name}> {slot} is below the minimum {min}.`,zh:`<{name}> 的 {slot} 初值 {value} 小于最小值 {min}。`},"initial.slotAboveMax":{en:`Initial value {value} of <{name}> {slot} exceeds the maximum {max}.`,zh:`<{name}> 的 {slot} 初值 {value} 超过最大值 {max}。`},"initial.slotOffStep":{en:`Initial value {value} of <{name}> {slot} is not on step {step} (based at {base}).`,zh:`<{name}> 的 {slot} 初值 {value} 不在步长 {step} 上(基准 {base})。`},"initial.lengthBelow":{en:`Initial value of parameter "{key}" has length {length}, below the minimum length {min} required by <{name}>.`,zh:`参数“{key}”的初值长度为 {length},小于 <{name}> 要求的最小长度 {min}。`},"initial.lengthAbove":{en:`Initial value of parameter "{key}" has length {length}, exceeding the maximum length {max} allowed by <{name}>.`,zh:`参数“{key}”的初值长度为 {length},超过 <{name}> 允许的最大长度 {max}。`},"initial.email":{en:`Initial value of parameter "{key}" is not a valid email address.`,zh:`参数“{key}”的初值不是有效的电子邮件地址。`},"initial.dateBelow":{en:`Initial value {value} of parameter "{key}" is earlier than the minimum date {min} of <date>.`,zh:`参数“{key}”的初值 {value} 早于 <date> 的最小日期 {min}。`},"initial.dateAbove":{en:`Initial value {value} of parameter "{key}" is later than the maximum date {max} of <date>.`,zh:`参数“{key}”的初值 {value} 晚于 <date> 的最大日期 {max}。`},"initial.multiSelectExceeds":{en:`Initial values of <multi-select> exceed max-selected {max}.`,zh:`<multi-select> 的初值数量超过 max-selected {max}。`},"expression.error":{en:`Expression error: {detail}`,zh:`表达式错误:{detail}`},"binding.unknownSuggestion":{en:`Reference to undeclared parameter {name}. Did you mean {suggestion}?`,zh:`引用了未声明的参数 {name}。是否想使用 {suggestion}?`},"binding.unknownPlain":{en:`Reference to undeclared parameter {name}.`,zh:`引用了未声明的参数 {name}。`},"type.number":{en:`Expected a number here, but the expression evaluates to {kind}.`,zh:`此处需要数字,但表达式结果为 {kind}。`},"type.boolean":{en:`Expected a boolean here, but the expression evaluates to {kind}.`,zh:`此处需要布尔值,但表达式结果为 {kind}。`},"type.string":{en:`Expected a string here, but the expression evaluates to {kind}.`,zh:`此处需要字符串,但表达式结果为 {kind}。`},"type.arrayNoDisplay":{en:`Arrays cannot be displayed directly; convert them first with a function such as len.`,zh:`数组不能直接显示;请先用 len 等函数转换。`},"attribute.whenInterpolation":{en:`The when attribute of if must be a full boolean interpolation, e.g. when="{{ seats >= 5 }}".`,zh:`if 的 when 属性必须是完整的布尔插值,例如 when="{{ seats >= 5 }}"。`},"anchor.idInvalid":{en:`Anchor id "{id}" must match [A-Za-z_][A-Za-z0-9_-]*.`,zh:`锚点 id“{id}”必须匹配 [A-Za-z_][A-Za-z0-9_-]*。`},"anchor.duplicate":{en:`Duplicate anchor id "{id}".`,zh:`重复的锚点 id“{id}”。`},"anchor.headingCollision":{en:`Anchor id "{id}" collides with an automatic heading target.`,zh:`锚点 id“{id}”与自动标题目标冲突。`},"jump.empty":{en:`<jump> target cannot be empty.`,zh:`<jump> 的目标不能为空。`},"jump.badTarget":{en:`<jump> target "{target}" must be a bare heading slug or anchor id without "#" or whitespace.`,zh:`<jump> 的目标“{target}”必须是不含“#”或空白的标题 slug 或锚点 id。`},"jump.unresolved":{en:`<jump> target "{target}" does not resolve to a heading or explicit anchor in this document.`,zh:`<jump> 的目标“{target}”无法解析到本文档中的标题或显式锚点。`},"budget.plotCurves":{en:`<plot> supports at most {limit} curves, but has {count}.`,zh:`<plot> 最多支持 {limit} 条曲线,当前有 {count} 条。`},"budget.plotPoints":{en:`The document's total plot sample count exceeds the limit of {limit}.`,zh:`文档的绘图采样点总数超过上限 {limit}。`},"math.formulaShape":{en:`<plot> formulas must be written explicitly as y = expression.`,zh:`<plot> 的公式必须显式写成 y = expression。`},"math.computeFailed":{en:`Cannot compute plot formula: {detail}`,zh:`无法计算绘图公式(错误代码 {code}):{detail}`},"math.bindingUnknown":{en:`Plot formula references undeclared parameter "{name}".`,zh:`绘图公式引用了未声明的参数“{name}”。`},"math.bindingType":{en:`Plot parameter "{name}" must be a number, but is {kind}.`,zh:`绘图参数“{name}”必须是数字,但当前为 {kind}。`},"table.missingHeader":{en:`The table for <{name}> is missing a header.`,zh:`<{name}> 的表格缺少表头。`},"table.headerInterpolation":{en:`Table headers cannot contain interpolations.`,zh:`表格表头不能包含插值。`},"table.headerEmpty":{en:`Table headers cannot be empty.`,zh:`表格表头不能为空。`},"table.headerDuplicate":{en:`Duplicate table header "{name}".`,zh:`重复的表格表头“{name}”。`},"table.rowColumnMismatch":{en:`Table row has a different column count: header has {header} columns, this row has {row}.`,zh:`表格行的列数不一致:表头有 {header} 列,此行有 {row} 列。`},"chart.numericExpression":{en:`Chart column "{name}" requires a number in row {row}, but the expression evaluates to {kind}.`,zh:`图表列“{name}”第 {row} 行需要数字,但表达式结果为 {kind}。`},"timeline.numericExpression":{en:`Timeline column "{name}" requires a number in row {row}, but the expression evaluates to {kind}.`,zh:`时间线列“{name}”第 {row} 行需要数字,但表达式结果为 {kind}。`},"chart.numericPlain":{en:`Chart column "{name}" requires a plain number in row {row}, got "{value}".`,zh:`图表列“{name}”第 {row} 行需要普通数字,当前为“{value}”。`},"timeline.numericPlain":{en:`Timeline column "{name}" requires a plain number in row {row}, got "{value}".`,zh:`时间线列“{name}”第 {row} 行需要普通数字,当前为“{value}”。`},"selection.keyEmpty":{en:`<{component}> key cannot be empty.`,zh:`<{component}> 的 key 不能为空。`},"selection.keyMissingColumn":{en:`<{component}> key column "{name}" does not exist in its table.`,zh:`<{component}> 的 key 列“{name}”在表格中不存在。`},"selection.keyInterpolation":{en:`<{component}> key column "{name}" must contain static text; row {row} contains an interpolation.`,zh:`<{component}> 的 key 列“{name}”必须包含静态文本;第 {row} 行包含插值。`},"selection.keyEmptyCell":{en:`<{component}> key column "{name}" cannot be empty in row {row}.`,zh:`<{component}> 的 key 列“{name}”在第 {row} 行不能为空。`},"selection.keyDuplicate":{en:`<{component}> key column "{name}" must be unique; duplicate value "{value}".`,zh:`<{component}> 的 key 列“{name}”必须唯一;重复值“{value}”。`},"initial.selectionNotValue":{en:`Initial selection "{value}" of <{component}> is not a value of key column "{name}".`,zh:`<{component}> 的初始选择“{value}”不是 key 列“{name}”中的值。`},"chart.columnComma":{en:`Chart column names cannot contain commas: "{name}".`,zh:`图表列名不能包含逗号:“{name}”。`},"chart.xMissing":{en:`Chart x column "{name}" does not exist.`,zh:`图表 x 列“{name}”不存在。`},"chart.yRequired":{en:`Chart y requires a column name.`,zh:`图表 y 需要列名。`},"chart.yMissing":{en:`Chart y column "{name}" does not exist.`,zh:`图表 y 列“{name}”不存在。`},"chart.needsNumeric":{en:`Chart requires at least one numeric column.`,zh:`图表至少需要一个数值列。`},"chart.scatterXMissing":{en:`Scatter chart x column "{name}" does not exist.`,zh:`散点图的 x 列“{name}”不存在。`},"chart.scatterNeedsNumeric":{en:`Scatter chart requires at least one numeric column.`,zh:`散点图至少需要一个数值列。`},"chart.donutNeedsColumns":{en:`Donut chart requires a label column and a value column.`,zh:`环形图需要一个标签列和一个数值列。`},"chart.donutYOne":{en:`Donut chart y can only specify one numeric column.`,zh:`环形图的 y 只能指定一个数值列。`},"chart.donutNeedY":{en:`A donut chart with more than two columns must use y to specify the single numeric column.`,zh:`超过两列的环形图必须用 y 指定唯一的数值列。`},"chart.negative":{en:`Donut chart values cannot be negative; row {row} is {value}.`,zh:`环形图的数值不能为负;第 {row} 行为 {value}。`},"timeline.headerMissing":{en:`Timeline requires either Task, Start and Duration columns or 事项, 开始 and 时长 columns, with optional Notes or 说明.`,zh:`时间线需要 Task、Start、Duration 列,或 事项、开始、时长 列,并可选 Notes 或 说明。`},"timeline.columnUnsupported":{en:`Timeline does not support column "{name}".`,zh:`时间线不支持列“{name}”。`},"timeline.negative":{en:`Timeline column "{name}" cannot be negative in row {row}.`,zh:`时间线列“{name}”在第 {row} 行不能为负。`},"runtime.bindingNoWritable":{en:`This component has no writable binding state.`,zh:`此组件没有可写的绑定状态。`},"runtime.bindingNeedsSlot":{en:`This multi-slot component requires a slot such as start/end or x/y.`,zh:`此多槽组件需要 start/end 或 x/y 之类的槽位。`},"runtime.bindingUnknownSlot":{en:`This component has no writable slot "{slot}".`,zh:`此组件没有可写的槽位“{slot}”。`},"runtime.bindingNoMultiSlot":{en:`This component does not support multiple slots.`,zh:`此组件不支持多个槽位。`},"runtime.dateInvalid":{en:`Date must be a valid YYYY-MM-DD or an empty string.`,zh:`日期必须是有效的 YYYY-MM-DD 或空字符串。`},"runtime.dateRequired":{en:`This date is required.`,zh:`此日期为必填项。`},"runtime.dateEarlier":{en:`Date cannot be earlier than {min}.`,zh:`日期不能早于 {min}。`},"runtime.dateLater":{en:`Date cannot be later than {max}.`,zh:`日期不能晚于 {max}。`},"runtime.fieldRequired":{en:`This field is required.`,zh:`此字段为必填项。`},"runtime.minLength":{en:`At least {min} characters.`,zh:`至少 {min} 个字符。`},"runtime.maxLength":{en:`At most {max} characters.`,zh:`至多 {max} 个字符。`},"runtime.emailLength":{en:`Email address cannot exceed {limit} characters.`,zh:`电子邮件地址不能超过 {limit} 个字符。`},"runtime.emailInvalid":{en:`Enter a valid email address.`,zh:`请输入有效的电子邮件地址。`},"runtime.finiteNumber":{en:`Parameter "{name}" requires a finite number.`,zh:`参数“{name}”需要有限数字。`},"runtime.min":{en:`Parameter "{name}" must be at least {min}.`,zh:`参数“{name}”必须至少为 {min}。`},"runtime.max":{en:`Parameter "{name}" must be at most {max}.`,zh:`参数“{name}”必须至多为 {max}。`},"runtime.step":{en:`Parameter "{name}" must be a multiple of step {step} (base {base}).`,zh:`参数“{name}”必须是步长 {step} 的倍数(基准 {base})。`},"runtime.boolean":{en:`Parameter "{name}" requires a boolean.`,zh:`参数“{name}”需要布尔值。`},"runtime.string":{en:`Parameter "{name}" requires a string.`,zh:`参数“{name}”需要字符串。`},"runtime.array":{en:`Parameter "{name}" requires an array of strings.`,zh:`参数“{name}”需要字符串数组。`},"runtime.arrayMembers":{en:`Parameter "{name}" members must be strings.`,zh:`参数“{name}”的成员必须是字符串。`},"runtime.checklistOption":{en:`Checklist item "{value}" does not exist.`,zh:`清单项“{value}”不存在。`},"runtime.maxItems":{en:`Parameter "{name}" allows at most {max} selected values.`,zh:`参数“{name}”最多允许选择 {max} 个值。`},"runtime.unsupportedType":{en:`Parameter "{name}" has an unsupported value type.`,zh:`参数“{name}”的值类型不受支持。`},"runtime.option":{en:`Value "{value}" is not among the options: {options}.`,zh:`值“{value}”不在选项中:{options}。`},"runtime.budget":{en:`Parameter "{name}": {detail}`,zh:`参数“{name}”:{detail}`},"runtime.rangeOrder":{en:`The range start cannot be greater than its end.`,zh:`范围起点不能大于终点。`},"budget.string":{en:`String exceeds the {limit}-character limit.`,zh:`字符串超过 {limit} 个字符的上限。`},"budget.array":{en:`Array exceeds the {limit}-item limit.`,zh:`数组超过 {limit} 个项的上限。`},"budget.arrayMember":{en:`Array member exceeds the {limit}-character limit.`,zh:`数组成员超过 {limit} 个字符的上限。`},"budget.arrayContents":{en:`Array contents exceed the {limit}-character limit.`,zh:`数组内容超过 {limit} 个字符的上限。`},"theme.missing":{en:`Theme "{name}" is not registered by the host; using the default theme.`,zh:`宿主未注册主题“{name}”;将使用默认主题。`},"theme.registryUnreadable":{en:`The host theme registry could not be read; using the default theme.`,zh:`无法读取宿主主题注册表;将使用默认主题。`},"theme.invalidDefinition":{en:`The selected theme "{name}" is not a valid definition; using the default theme.`,zh:`所选主题“{name}”不是有效定义;将使用默认主题。`},"theme.duplicateRegistration":{en:`Theme "{name}" is registered more than once; using the default theme.`,zh:`主题“{name}”被多次注册;将使用默认主题。`},"theme.protocol":{en:`Theme "{name}" does not support the {protocol} protocol; using the default theme.`,zh:`主题“{name}”不支持 {protocol} 协议;将使用默认主题。`},"theme.modes":{en:`Theme "{name}" must supply both light and dark color schemes; using the default theme.`,zh:`主题“{name}”必须同时提供浅色和深色配色;将使用默认主题。`},"theme.selectedUnreadable":{en:`The selected theme "{name}" could not be read; using the default theme.`,zh:`所选主题“{name}”无法读取;将使用默认主题。`},"error.expression-syntax":{en:`Check expression operators, parentheses and arguments.`,zh:`表达式语法不正确,请检查运算符、括号或参数是否完整。`},"error.expression-index":{en:`An array index must be a finite safe integer.`,zh:`数组索引必须为有限的安全整数。`},"error.expression-cycle":{en:`Named calculations contain a dependency cycle.`,zh:`命名计算中存在循环依赖。`},"error.array.homogeneous":{en:`Array elements must all be strings or all be numbers.`,zh:`数组元素必须全部为字符串或全部为数字。`},"error.array.finite":{en:`Array members must be finite numbers.`,zh:`数字数组元素必须为有限数值。`},"error.array.members":{en:`Array members must be strings or finite numbers.`,zh:`数组元素必须为字符串或有限数值。`},"error.expression-number":{en:`A numeric literal must be finite and valid.`,zh:`数字字面量无效,必须是有限数值。`},"error.expression-string":{en:`Check the string quotes and escape sequences.`,zh:`字符串格式不正确,请检查引号和转义。`},"error.expression-budget":{en:`The expression exceeded a resource budget.`,zh:`表达式超过长度、节点、深度或求值步数预算,请简化表达式。`},"error.expression-assignment":{en:`Assignment is not allowed in expressions.`,zh:`表达式不能执行赋值,请使用比较运算符。`},"error.expression-property":{en:`Property access is not allowed.`,zh:`表达式不支持属性访问,请直接引用绑定名称。`},"error.expression-empty":{en:`An expression is required.`,zh:`此处需要非空表达式。`},"error.expression-unknown-function":{en:`Use a supported built-in function.`,zh:`函数不受支持,请使用语言内置函数。`},"error.expression-arity":{en:`Check the function argument count.`,zh:`函数参数数量不正确。`},"error.expression-forbidden-name":{en:`The name is forbidden.`,zh:`此名称属于禁止访问的名称,请使用已声明的绑定。`},"error.expression-type":{en:`Operand or argument types do not match.`,zh:`操作数或函数参数的类型不匹配,请检查绑定类型。`},"error.expression-unknown-name":{en:`The binding is not declared.`,zh:`引用了未声明的绑定。`},"error.expression-value":{en:`The binding value is not supported.`,zh:`绑定值不符合表达式支持的类型或数值范围。`},"error.expression-eval":{en:`The expression cannot be evaluated.`,zh:`表达式无法求值,请检查输入和运算条件。`},"error.expression-domain":{en:`A value lies outside the function domain.`,zh:`参数超出函数定义域。`},"error.expression-divide-by-zero":{en:`Division by zero is undefined.`,zh:`除数不能为零。`},"error.expression-interpolation":{en:`Check interpolation delimiters and content.`,zh:`插值格式不正确,请检查分隔符和表达式内容。`},"error.latex-budget":{en:`The formula exceeded a resource budget.`,zh:`公式超过长度、记号、节点、深度或计算步数预算,请简化公式。`},"error.latex-syntax":{en:`Check formula syntax and delimiters.`,zh:`公式语法不正确,请检查命令、括号和分隔符。`},"error.latex-empty":{en:`A formula is required.`,zh:`公式不能为空。`},"error.latex-relation":{en:`Check the formula relation.`,zh:`公式中的关系式不符合计算语法。`},"error.latex-number":{en:`A formula number must be finite.`,zh:`公式中的数字必须是有限数值。`},"error.latex-name":{en:`Use a valid formula parameter name.`,zh:`公式参数名称无效,请使用合法绑定名。`},"error.latex-unsupported":{en:`The LaTeX structure is not computable.`,zh:`此 LaTeX 结构不支持计算,请改用支持的函数和运算。`},"error.latex-variable":{en:`A numeric formula parameter is missing or invalid.`,zh:`公式引用的参数缺失或不是有限数字。`},"error.latex-type":{en:`A formula parameter has the wrong type.`,zh:`公式参数类型不正确,计算参数必须为数字。`},"error.latex-divide-by-zero":{en:`Division by zero is undefined.`,zh:`公式中的除数不能为零。`},"error.latex-domain":{en:`A formula value lies outside the function domain.`,zh:`公式参数超出函数定义域。`},"error.latex-undefined":{en:`The formula is undefined at this point.`,zh:`公式在此点没有有限定义值。`},"error.latex-plot-range":{en:`Plot bounds must be finite and increasing.`,zh:`绘图区间必须由有限数值构成,且最小值小于最大值。`},"error.latex-plot-samples":{en:`The sample count must be an integer from 2 to 2000.`,zh:`采样点数必须为 2 至 2000 的整数。`}},He=`local.parse,local.budget,local.options.invalid,local.theme.expression,local.theme.name,local.theme.attribute,local.theme.malformed,local.theme.duplicate,local.theme.late,local.theme.nested,local.attribute,local.attribute.name,local.attribute.duplicate,local.budget.name,local.budget.math,local.tag.unclosed,local.tag.closing,local.tag.name,local.tag.mismatch,local.tag.shape,local.footnote.unsupported,local.interpolation,local.math.unclosed,local.math.whitespace,local.component.unknown,local.html`.split(`,`),Ue=`local.budget.data-table.cells,local.budget.data-table.columns,local.budget.data-table.rows,local.computation.budget,local.computation.const,local.computation.cycle,local.computation.duplicate,local.computation.expression,local.computation.name,local.computation.placement,local.computation.reserved,local.computation.unknown,local.computation.value,local.data-table.column,local.data-table.key,local.data-table.rows,local.data-table.value,local.validation.budget,local.validation.expression,local.validation.failed,local.validation.fields,local.validation.placement,local.validation.when,local.parse,local.legacy,local.component.unknown,local.attribute.unknown,local.budget.attribute,local.attribute.color,local.attribute.required,local.label.required,local.attribute.static,local.expression.empty,local.expression.invalid,local.attribute.type,local.attribute.range,local.constraint,local.selection.key,local.structure.parent,local.structure.children,local.budget.array,local.option.value,local.tab.value,local.step.value,local.quiz.answer,local.diagram.node,local.diagram.edge,local.checklist.body,local.budget.identifier,local.binding.name,local.binding.reserved,local.binding.type,local.binding.exclusive,local.binding.constraint,local.binding.option,local.initial.duplicate,local.initial.length,local.initial.email,local.initial.range,local.initial.option,local.initial.type,local.initial.date,local.initial,local.initial.step,local.binding.unknown,local.type,local.interpolation,local.attribute.interpolation,local.anchor.id,local.anchor.duplicate,local.jump.target,local.budget.plot.curves,local.budget.plot.points,local.math.formula,local.math,local.math.binding,local.table.header,local.table.row,local.chart.numeric,local.chart.column,local.chart.negative,local.timeline.header,local.timeline.value`.split(`,`),We=[`local.runtime.binding`,`local.runtime.value`],Ge=[`local.theme.name`,`local.theme.missing`,`local.theme.manifest`,`local.theme.duplicate`,`local.theme.protocol`,`local.theme.modes`],Ke=[`expression-index`,`expression-cycle`,`expression-syntax`,`expression-number`,`expression-string`,`expression-budget`,`expression-assignment`,`expression-property`,`expression-empty`,`expression-unknown-function`,`expression-arity`,`expression-forbidden-name`,`expression-type`,`expression-unknown-name`,`expression-value`,`expression-eval`,`expression-domain`,`expression-divide-by-zero`,`expression-interpolation`],qe=[`latex-budget`,`latex-syntax`,`latex-empty`,`latex-relation`,`latex-number`,`latex-name`,`latex-unsupported`,`latex-variable`,`latex-type`,`latex-divide-by-zero`,`latex-domain`,`latex-undefined`,`latex-plot-range`,`latex-plot-samples`],Je=[`local.version.unsupported`,`local.version.malformed`,`local.version.duplicate`,`local.version.placement`,`local.upgrade.from-version`,`local.upgrade.reserved-binding`,`local.upgrade.tag`,`local.upgrade.text-length`,`local.upgrade.expression`,`local.upgrade.version-missing`,...He,...Ue,...We,...Ge];Object.freeze(Array.from(new Set([...Je,...Ke,...Ke.map(e=>`local.expression.${e}`),...qe])));var Ye={"local.options.invalid.object":`options.notObject`,"local.options.invalid.limits":`options.limitsNotObject`,"local.options.invalid.max-syntax-nodes":`options.maxSyntaxNodes`,"local.budget.document":`budget.document`,"local.budget.nodes":`budget.syntaxNodes`,"local.budget.nesting":`budget.nesting`,"local.budget.name.attribute":`budget.attributeName`,"local.budget.name.tag":`budget.tagName`,"local.budget.math":`budget.math`,"local.budget.attribute":`budget.attribute`,"local.budget.array.options":`budget.options`,"local.budget.array.checklist":`budget.checklistItems`,"local.budget.identifier":`budget.identifier`,"local.budget.plot.curves":`budget.plotCurves`,"local.budget.plot.points":`budget.plotPoints`,"local.budget.value.string":`budget.string`,"local.budget.value.array":`budget.array`,"local.budget.value.array-member":`budget.arrayMember`,"local.budget.value.array-contents":`budget.arrayContents`,"local.parse.source":`parse.sourceType`,"local.parse.markdown":`parse.markdownFailed`,"local.parse.document":`parse.failed`,"local.legacy":`legacy.fence`,"local.theme.expression":`theme.expression`,"local.theme.name.missing":`theme.nameRequired`,"local.theme.attribute":`theme.attributeOnly`,"local.theme.name.invalid":`theme.nameInvalid`,"local.theme.name":`theme.nameInvalid`,"local.theme.malformed.unclosed":`theme.malformedMissingClose`,"local.theme.malformed.closing":`theme.malformedClosing`,"local.theme.malformed.placement":`theme.malformedStandalone`,"local.theme.duplicate.declaration":`theme.duplicateDeclaration`,"local.theme.duplicate":`theme.duplicateRegistration`,"local.theme.late":`theme.late`,"local.theme.nested":`theme.nested`,"local.theme.invalid":`theme.invalidDeclaration`,"local.theme.missing":`theme.missing`,"local.theme.manifest.unreadable":`theme.registryUnreadable`,"local.theme.manifest.definition":`theme.invalidDefinition`,"local.theme.manifest.selected":`theme.selectedUnreadable`,"local.theme.protocol":`theme.protocol`,"local.theme.modes":`theme.modes`,"local.tag.missing-close":`tag.missingClose`,"local.tag.unclosed.open":`tag.missingClose`,"local.tag.unclosed.pair":`tag.unclosedPaired`,"local.tag.closing":`tag.closingAttributes`,"local.tag.name":`tag.nameInvalid`,"local.tag.mismatch.root":`tag.mismatchRoot`,"local.tag.mismatch.parent":`tag.mismatchParent`,"local.tag.shape":`tag.requiresClose`,"local.interpolation.unclosed":`interpolation.unclosed`,"local.math.unclosed":`math.unclosed`,"local.math.whitespace":`math.whitespace`,"local.footnote.unsupported":`footnote.unsupported`,"local.html":`html.raw`,"local.component.unknown.suggestion":`component.unknownSuggestion`,"local.component.unknown":`component.unknownPlain`,"local.attribute.format":`attribute.lowercase`,"local.attribute.name":`attribute.nameInvalid`,"local.attribute.value-quoted":`attribute.valueQuoted`,"local.attribute.closing-quote":`attribute.valueUnclosed`,"local.attribute.duplicate":`attribute.duplicate`,"local.attribute.separator":`attribute.separator`,"local.attribute.unknown.suggestion":`attribute.unknownSuggestion`,"local.attribute.unknown":`attribute.unknownPlain`,"local.attribute.color":`attribute.color`,"local.attribute.required":`attribute.required`,"local.attribute.static":`attribute.static`,"local.attribute.type.number":`attribute.numberInvalid`,"local.attribute.type.number-interpolation":`attribute.numberInterpolationInvalid`,"local.attribute.type.integer":`attribute.integer`,"local.attribute.type.positive":`attribute.positive`,"local.attribute.type.boolean":`attribute.booleanInvalid`,"local.attribute.type.boolean-interpolation":`attribute.booleanInterpolationInvalid`,"local.attribute.type.enum":`attribute.enumInvalid`,"local.attribute.type.date-lower":`attribute.dateLower`,"local.attribute.type.date-upper":`attribute.dateUpper`,"local.attribute.range.min":`attribute.rangeMin`,"local.attribute.range.max":`attribute.rangeMax`,"local.attribute.interpolation":`attribute.whenInterpolation`,"local.label.required.missing":`label.requiredMissing`,"local.label.required.empty":`label.requiredEmpty`,"local.expression.empty.attribute":`expression.emptyAttribute`,"local.expression.empty":`expression.emptyInterpolation`,"local.expression.error":`expression.error`,"local.constraint.number-min-max":`constraint.componentMinMax`,"local.constraint.number-step":`constraint.componentStep`,"local.constraint.length-order":`constraint.lengthRange`,"local.constraint.date-order":`constraint.dateOrder`,"local.constraint.progress-range":`constraint.progressRange`,"local.constraint.plot-range":`constraint.plotRange`,"local.constraint.timer-duration":`constraint.timerDuration`,"local.constraint.range-slider-min-max":`constraint.rangeSliderOrder`,"local.constraint.range-slider-step":`constraint.rangeSliderStep`,"local.constraint.coordinate-axis":`constraint.coordinateOrder`,"local.constraint.coordinate-step":`constraint.coordinateStep`,"local.constraint.multi-select":`constraint.multiSelectMax`,"local.constraint.quiz-tolerance":`constraint.quizTolerance`,"local.selection.key.required":`selection.keyNeedsKey`,"local.selection.key.empty":`selection.keyEmpty`,"local.selection.key.missing-column":`selection.keyMissingColumn`,"local.selection.key.interpolation":`selection.keyInterpolation`,"local.selection.key.empty-cell":`selection.keyEmptyCell`,"local.selection.key.duplicate":`selection.keyDuplicate`,"local.selection.key.initial":`initial.selectionNotValue`,"local.structure.parent":`structure.parent`,"local.structure.no-body":`structure.noBody`,"local.structure.inline-only":`structure.inlineOnly`,"local.structure.no-nested-components":`structure.noNestedComponents`,"local.structure.accordion.needs-disclosure":`structure.accordionNeedsDisclosure`,"local.structure.accordion.only-disclosure":`structure.accordionOnly`,"local.structure.grid.needs-card":`structure.gridNeedsCard`,"local.structure.grid.only-card":`structure.gridOnlyCard`,"local.structure.table.single":`structure.exactlyOneTable`,"local.structure.plot.needs-formula":`structure.plotNeedsFormula`,"local.structure.plot.only-formulas":`structure.plotOnlyFormulas`,"local.structure.node.no-components":`structure.nodeNoComponents`,"local.structure.options.needed":`structure.optionsNeeded`,"local.structure.options.only":`structure.optionsOnly`,"local.structure.option.no-components":`structure.optionNoComponents`,"local.structure.tabs.needs-tab":`structure.tabsNeedsTab`,"local.structure.tabs.only-tab":`structure.tabsOnly`,"local.structure.steps.needs-step":`structure.stepsNeedsStep`,"local.structure.steps.only-step":`structure.stepsOnly`,"local.structure.quiz.numeric-no-body":`structure.quizNumericNoBody`,"local.structure.diagram.only":`structure.diagramOnly`,"local.option.value.required":`option.valueRequired`,"local.option.value.comma":`option.valueComma`,"local.option.value.duplicate":`option.valueDuplicate`,"local.tab.value.duplicate":`tab.valueDuplicate`,"local.step.value.duplicate":`step.valueDuplicate`,"local.quiz.answer.required":`quiz.answerRequired`,"local.quiz.answer.numeric":`quiz.answerNumeric`,"local.quiz.answer.not-option":`quiz.answerNotOption`,"local.diagram.node.required":`diagram.needsNode`,"local.diagram.node.invalid":`diagram.nodeInvalid`,"local.diagram.node.duplicate":`diagram.nodeDuplicate`,"local.diagram.edge.from":`diagram.edgeFromUnknown`,"local.diagram.edge.to":`diagram.edgeToUnknown`,"local.diagram.edge.duplicate":`diagram.edgeDuplicate`,"local.checklist.body.single":`checklist.bodySingle`,"local.checklist.body.item-required":`checklist.needsItem`,"local.checklist.body.items-limit":`budget.checklistItems`,"local.checklist.body.task-only":`checklist.taskOnly`,"local.checklist.body.no-nested":`checklist.noNested`,"local.checklist.body.no-components":`checklist.noComponents`,"local.binding.name":`binding.nameInvalid`,"local.binding.reserved":`binding.reserved`,"local.binding.type":`binding.typeConflict`,"local.binding.exclusive":`binding.exclusive`,"local.binding.exclusive.slot":`binding.slotExclusive`,"local.binding.constraint":`binding.constraintConflict`,"local.binding.option":`binding.optionConflict`,"local.binding.unknown.suggestion":`binding.unknownSuggestion`,"local.binding.unknown":`binding.unknownPlain`,"local.initial.duplicate":`initial.duplicate`,"local.initial.duplicate-peers":`initial.duplicatePeers`,"local.initial.no-step":`initial.rangeNoStep`,"local.initial.cannot-derive":`initial.cannotDerive`,"local.initial.type.number":`initial.typeFiniteNumber`,"local.initial.type.boolean":`initial.typeBoolean`,"local.initial.type":`initial.typeWrong`,"local.initial.range.min":`initial.belowMin`,"local.initial.range.max":`initial.aboveMax`,"local.initial.range.step":`initial.offStep`,"local.initial.value.options":`initial.notAmongOptions`,"local.initial.date":`initial.dateInvalid`,"local.initial.value.option":`initial.notAvailableOption`,"local.initial.option.multi-select":`initial.multiSelectOption`,"local.initial.range-slider":`initial.rangeSliderOrder`,"local.initial.slot.min":`initial.slotBelowMin`,"local.initial.slot.max":`initial.slotAboveMax`,"local.initial.slot.step":`initial.slotOffStep`,"local.initial.length.min":`initial.lengthBelow`,"local.initial.length.max":`initial.lengthAbove`,"local.initial.email":`initial.email`,"local.initial.date.min":`initial.dateBelow`,"local.initial.date.max":`initial.dateAbove`,"local.initial.multi-select":`initial.multiSelectExceeds`,"local.type.number":`type.number`,"local.type.boolean":`type.boolean`,"local.type.string":`type.string`,"local.type.array":`type.arrayNoDisplay`,"local.anchor.id":`anchor.idInvalid`,"local.anchor.duplicate":`anchor.duplicate`,"local.anchor.heading-collision":`anchor.headingCollision`,"local.jump.empty":`jump.empty`,"local.jump.bad-target":`jump.badTarget`,"local.jump.unresolved":`jump.unresolved`,"local.math.formula.shape":`math.formulaShape`,"local.math.compute":`math.computeFailed`,"local.math.binding.unknown":`math.bindingUnknown`,"local.math.binding.type":`math.bindingType`,"local.table.header.missing":`table.missingHeader`,"local.table.header.interpolation":`table.headerInterpolation`,"local.table.header.empty":`table.headerEmpty`,"local.table.header.duplicate":`table.headerDuplicate`,"local.table.row.mismatch":`table.rowColumnMismatch`,"local.chart.numeric.expression":`chart.numericExpression`,"local.timeline.numeric.expression":`timeline.numericExpression`,"local.chart.numeric.plain":`chart.numericPlain`,"local.timeline.numeric.plain":`timeline.numericPlain`,"local.chart.column.comma":`chart.columnComma`,"local.chart.column.x-missing":`chart.xMissing`,"local.chart.column.y-required":`chart.yRequired`,"local.chart.column.y-missing":`chart.yMissing`,"local.chart.column.needs-numeric":`chart.needsNumeric`,"local.chart.column.scatter-x-missing":`chart.scatterXMissing`,"local.chart.column.scatter-needs-numeric":`chart.scatterNeedsNumeric`,"local.chart.column.donut-columns":`chart.donutNeedsColumns`,"local.chart.column.donut-y":`chart.donutYOne`,"local.chart.column.donut-need-y":`chart.donutNeedY`,"local.chart.negative":`chart.negative`,"local.timeline.header.missing":`timeline.headerMissing`,"local.timeline.header.column":`timeline.columnUnsupported`,"local.timeline.value.negative":`timeline.negative`,"local.runtime.binding.no-writable":`runtime.bindingNoWritable`,"local.runtime.binding.needs-slot":`runtime.bindingNeedsSlot`,"local.runtime.binding.unknown-slot":`runtime.bindingUnknownSlot`,"local.runtime.binding.no-multi-slot":`runtime.bindingNoMultiSlot`,"local.runtime.value.date-invalid":`runtime.dateInvalid`,"local.runtime.value.date-required":`runtime.dateRequired`,"local.runtime.value.date-earlier":`runtime.dateEarlier`,"local.runtime.value.date-later":`runtime.dateLater`,"local.runtime.value.field-required":`runtime.fieldRequired`,"local.runtime.value.min-length":`runtime.minLength`,"local.runtime.value.max-length":`runtime.maxLength`,"local.runtime.value.email-length":`runtime.emailLength`,"local.runtime.value.email-invalid":`runtime.emailInvalid`,"local.runtime.value.finite-number":`runtime.finiteNumber`,"local.runtime.value.min":`runtime.min`,"local.runtime.value.max":`runtime.max`,"local.runtime.value.step":`runtime.step`,"local.runtime.value.boolean":`runtime.boolean`,"local.runtime.value.string":`runtime.string`,"local.runtime.value.array":`runtime.array`,"local.runtime.value.array-members":`runtime.arrayMembers`,"local.runtime.value.checklist-option":`runtime.checklistOption`,"local.runtime.value.max-items":`runtime.maxItems`,"local.runtime.value.unsupported-type":`runtime.unsupportedType`,"local.runtime.value.option":`runtime.option`,"local.runtime.value.budget":`runtime.budget`,"local.runtime.value.range-order":`runtime.rangeOrder`};Object.freeze([...Object.keys(Ye),...Object.keys(Ve).filter(e=>e.startsWith(`error.`))].sort());function Xe(e){if(Object.hasOwn(Ye,e))return Ye[e];if(Object.hasOwn(Ve,e))return e}function Ze(e,t=`en`){let n=Xe(e);if(n)return Ve[n][t===`zh`?`zh`:`en`]}function Qe(e,t){return t?e.replace(/\{([A-Za-z_][A-Za-z0-9_]*)\}/g,(e,n)=>{let r=t[n];return r===void 0?``:String(r)}):e}function $e(e,t=`en`,n){let r=Ze(e,t);return r===void 0?``:Qe(r,n)}function et(e){return $e(e.key,`en`,e.params)}function tt(e,t=`en`){let n=typeof e.messageKey==`string`?e.messageKey:void 0,r=n===void 0?void 0:Ze(n,t),i=e.params;if(t===`zh`&&i){let e=n===void 0?void 0:Xe(n);if(e===`expression.error`||e===`math.computeFailed`){let e=typeof i.code==`string`?Ze(`error.${i.code}`,`zh`):void 0;if(e){let t=typeof i.near==`string`&&i.near?` 相关源码:${i.near}`:``;i={...i,detail:e+t}}}else if(e===`runtime.budget`&&typeof i.detailKey==`string`){let e=Ze(i.detailKey,`zh`);e&&(i={...i,detail:Qe(e,i)})}}let a=r===void 0?typeof e.message==`string`?e.message:String(e.message??``):Qe(r,i),o=typeof a==`string`?a:String(a??``);return o.length>2e3?`${o.slice(0,D-1)}…`:o}function nt(e){if(typeof e!=`string`)return 0;let t=0;for(let n of e)t+=1;return t}var R=class extends Error{offset;code;constructor(e,t,n=0){super(t),this.name=`LocalExpressionError`,this.code=e,this.offset=n}},rt=`abs.sqrt.floor.ceil.round.min.max.pow.sin.cos.tan.asin.acos.atan.exp.log.len.contains.clamp.sum.average.minOf.maxOf.formatNumber.formatPercent.formatScientific.formatCurrency.trim.lower.upper.startsWith.endsWith.replace.slice.dateCompare.dateDiff`.split(`.`),it=new Set(rt),at=new Map([[`pi`,Math.PI],[`e`,Math.E]]),ot=new Set([`__proto__`,`prototype`,`constructor`]),st=new Set([`string`,`number`,`boolean`,`null`,`array`,`number-array`]),ct=new Set([...rt,`x`,`y`,`pi`,`e`,`true`,`false`,`null`,...ot]),lt=4e3,ut=2e3,dt=100,ft=200,pt=1e4,mt=250,ht=w,gt=w,_t=500;function vt(e){if(e.length>1e4)return{code:`expression-budget`,...Be(`local.budget.value.array`,{limit:T}),message:`Array exceeds the ${T}-item limit.`};let t=null,n=0;for(let r of e)if(typeof r==`string`){if(t===`number`)return{code:`expression-value`,key:`error.array.homogeneous`,message:`Array elements must all be strings or all be numbers.`};if(t=`string`,r.length>1e5)return{code:`expression-budget`,...Be(`local.budget.value.array-member`,{limit:w}),message:`Array member exceeds the ${w}-character limit.`};if(n+=r.length,n>1e5)return{code:`expression-budget`,...Be(`local.budget.value.array-contents`,{limit:E}),message:`Array contents exceed the ${E}-character limit.`}}else if(typeof r==`number`){if(t===`string`)return{code:`expression-value`,key:`error.array.homogeneous`,message:`Array elements must all be strings or all be numbers.`};if(t=`number`,!Number.isFinite(r))return{code:`expression-value`,key:`error.array.finite`,message:`Array members must be finite numbers.`}}else return{code:`expression-value`,key:`error.array.members`,message:`Array members must be strings or finite numbers.`};return null}function yt(e){if(typeof e==`string`)return e.length>1e5?Be(`local.budget.value.string`,{limit:w}):null;if(Array.isArray(e)){let t=vt(e);return t?Be(t.key,t.params):null}return null}function bt(e){let t=yt(e);return t?et(t):null}var xt=/^(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?/,St=/[A-Za-z_]/,Ct=/[A-Za-z0-9_]/;function wt(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(/\s/.test(r)){n+=1;continue}if(r>=`0`&&r<=`9`||r===`.`&&/[0-9]/.test(e[n+1]??``)){let r=xt.exec(e.slice(n));if(!r)throw new R(`expression-syntax`,`Invalid number.`,n);let i=r[0],a=Number(i);if(!Number.isFinite(a))throw new R(`expression-number`,`Number must be finite: ${i}.`,n);t.push({kind:`number`,value:i,start:n,number:a}),n+=i.length;continue}if(r===`"`||r===`'`){let i=n,a=r,o=``,s=n+1,c=!1;for(;s<e.length;){let t=e[s];if(t===a){c=!0,s+=1;break}if(t===`
10
- `||t===`\r`)throw new R(`expression-string`,`String literals cannot span lines.`,i);if(t===`\\`){let t=e[s+1];if(t===void 0)break;switch(t){case`\\`:o+=`\\`;break;case`'`:o+=`'`;break;case`"`:o+=`"`;break;case`n`:o+=`
11
- `;break;case`t`:o+=` `;break;default:throw new R(`expression-string`,`Unsupported escape \\${t}.`,s)}s+=2}else o+=t,s+=1}if(!c)throw new R(`expression-string`,`Unterminated string literal.`,i);if(o.length>ht)throw new R(`expression-budget`,`String literal exceeds the length limit.`,i);t.push({kind:`string`,value:o,start:i}),n=s;continue}if(St.test(r)){let r=n+1;for(;r<e.length&&Ct.test(e[r]);)r+=1;t.push({kind:`ident`,value:e.slice(n,r),start:n}),n=r;continue}let i=e.slice(n,n+2);if(e.startsWith(`!==`,n)||e.startsWith(`===`,n))throw new R(`expression-syntax`,`Unsupported operator ${e.slice(n,n+3)}.`,n);if(i===`==`||i===`!=`||i===`<=`||i===`>=`||i===`&&`||i===`||`)t.push({kind:`punct`,value:i,start:n}),n+=2;else if(`+-*/%()!<>?:,[]`.includes(r))t.push({kind:`punct`,value:r,start:n}),n+=1;else throw r===`=`?new R(`expression-assignment`,`Assignments are not supported.`,n):r===`.`?new R(`expression-property`,`Property access is not supported.`,n):r===`&`||r===`|`?new R(`expression-syntax`,`Use ${r}${r} for logical operations.`,n):new R(`expression-syntax`,`Unrecognized character "${r}".`,n)}return t.push({kind:`eof`,value:``,start:e.length}),t}var Tt={abs:[1,1],sqrt:[1,1],floor:[1,1],ceil:[1,1],round:[1,1],min:[1,2**53-1],max:[1,2**53-1],pow:[2,2],sin:[1,1],cos:[1,1],tan:[1,1],asin:[1,1],acos:[1,1],atan:[1,1],exp:[1,1],log:[1,1],len:[1,1],contains:[2,2],clamp:[3,3],sum:[1,1],average:[1,1],minOf:[1,1],maxOf:[1,1],formatNumber:[1,4],formatPercent:[1,3],formatScientific:[1,3],formatCurrency:[1,4],trim:[1,1],lower:[1,1],upper:[1,1],startsWith:[2,2],endsWith:[2,2],replace:[3,3],slice:[2,3],dateCompare:[2,2],dateDiff:[2,3]};function Et(e){let t=0,n=[{node:e,depth:1}];for(;n.length>0;){let{node:e,depth:r}=n.pop();switch(r>t&&(t=r),e.kind){case`unary`:n.push({node:e.operand,depth:r+1});break;case`binary`:n.push({node:e.left,depth:r+1}),n.push({node:e.right,depth:r+1});break;case`conditional`:n.push({node:e.test,depth:r+1}),n.push({node:e.consequent,depth:r+1}),n.push({node:e.alternate,depth:r+1});break;case`call`:for(let t of e.args)n.push({node:t,depth:r+1});break;case`array`:for(let t of e.elements)n.push({node:t,depth:r+1});break;case`index`:n.push({node:e.target,depth:r+1}),n.push({node:e.index,depth:r+1})}}return t}var Dt=class{tokens;position=0;nodeCount=0;dependencyNames=[];dependencySet=new Set;constructor(e){this.tokens=wt(e)}get dependencies(){return this.dependencyNames}parse(){if(this.peek().kind===`eof`)throw new R(`expression-empty`,`Expression is empty.`,0);let e=this.parseConditional(0),t=this.peek();if(t.kind!==`eof`)throw new R(`expression-syntax`,`Unexpected content "${t.value}".`,t.start);if(Et(e)>ft)throw new R(`expression-budget`,`Expression is nested too deeply.`,e.start);return e}peek(){return this.tokens[this.position]}next(){let e=this.tokens[this.position];return this.position+=1,e}isPunct(e){let t=this.peek();return t.kind===`punct`&&t.value===e}expect(e){let t=this.peek();if(t.kind!==`punct`||t.value!==e)throw new R(`expression-syntax`,`Missing "${e}".`,t.start);return this.next()}node(e,t,n){if(this.nodeCount+=1,this.nodeCount>ut)throw new R(`expression-budget`,`Expression is too complex.`,n);if(t>dt)throw new R(`expression-budget`,`Expression is nested too deeply.`,n);return e}parseConditional(e){let t=this.parseOr(e);if(!this.isPunct(`?`))return t;let n=t.start;this.next();let r=this.parseConditional(e+1);this.expect(`:`);let i=this.parseConditional(e+1);return this.node({kind:`conditional`,test:t,consequent:r,alternate:i,start:n},e,n)}parseOr(e){let t=this.parseAnd(e);for(;this.isPunct(`||`);){let n=t.start;this.next();let r=this.parseAnd(e);t=this.node({kind:`binary`,operator:`||`,left:t,right:r,start:n},e,n)}return t}parseAnd(e){let t=this.parseEquality(e);for(;this.isPunct(`&&`);){let n=t.start;this.next();let r=this.parseEquality(e);t=this.node({kind:`binary`,operator:`&&`,left:t,right:r,start:n},e,n)}return t}parseEquality(e){let t=this.parseRelational(e);for(;this.isPunct(`==`)||this.isPunct(`!=`);){let n=t.start,r=this.next().value,i=this.parseRelational(e);t=this.node({kind:`binary`,operator:r,left:t,right:i,start:n},e,n)}return t}parseRelational(e){let t=this.parseAdditive(e);for(;this.isPunct(`<`)||this.isPunct(`<=`)||this.isPunct(`>`)||this.isPunct(`>=`);){let n=t.start,r=this.next().value,i=this.parseAdditive(e);t=this.node({kind:`binary`,operator:r,left:t,right:i,start:n},e,n)}return t}parseAdditive(e){let t=this.parseMultiplicative(e);for(;this.isPunct(`+`)||this.isPunct(`-`);){let n=t.start,r=this.next().value,i=this.parseMultiplicative(e);t=this.node({kind:`binary`,operator:r,left:t,right:i,start:n},e,n)}return t}parseMultiplicative(e){let t=this.parseUnary(e);for(;this.isPunct(`*`)||this.isPunct(`/`)||this.isPunct(`%`);){let n=t.start,r=this.next().value,i=this.parseUnary(e);t=this.node({kind:`binary`,operator:r,left:t,right:i,start:n},e,n)}return t}parseUnary(e){let t=this.peek();if(t.kind===`punct`&&(t.value===`-`||t.value===`+`||t.value===`!`)){this.next();let n=this.parseUnary(e+1);return this.node({kind:`unary`,operator:t.value,operand:n,start:t.start},e,t.start)}return this.parsePrimary(e)}parsePrimary(e){let t=this.parseAtom(e);for(;this.isPunct(`[`);){let n=t.start;this.next();let r=this.parseConditional(e+1);this.expect(`]`),t=this.node({kind:`index`,target:t,index:r,start:n},e,n)}return t}parseAtom(e){let t=this.peek();if(t.kind===`number`)return this.next(),this.node({kind:`literal`,value:t.number,start:t.start},e,t.start);if(t.kind===`string`)return this.next(),this.node({kind:`literal`,value:t.value,start:t.start},e,t.start);if(t.kind===`ident`){this.next();let n=t.value;if(this.isPunct(`(`)){if(!it.has(n))throw new R(`expression-unknown-function`,`Unknown function "${n}".`,t.start);this.next();let r=[];if(!this.isPunct(`)`))for(r.push(this.parseConditional(e+1));this.isPunct(`,`);)this.next(),r.push(this.parseConditional(e+1));this.expect(`)`);let[i,a]=Tt[n];if(r.length<i||r.length>a)throw new R(`expression-arity`,`Function ${n} expects ${i===a?`${i} ${i===1?`argument`:`arguments`}`:i===1?`at least one argument`:`${i}–${a} arguments`}.`,t.start);return this.node({kind:`call`,name:n,args:r,start:t.start},e,t.start)}if(n===`true`||n===`false`)return this.node({kind:`literal`,value:n===`true`,start:t.start},e,t.start);if(n===`null`)return this.node({kind:`literal`,value:null,start:t.start},e,t.start);let r=at.get(n);if(r!==void 0)return this.node({kind:`literal`,value:r,start:t.start},e,t.start);if(ot.has(n))throw new R(`expression-forbidden-name`,`Name "${n}" is not allowed.`,t.start);if(it.has(n))throw new R(`expression-syntax`,`Function ${n} must be called with parentheses.`,t.start);return this.dependencySet.has(n)||(this.dependencySet.add(n),this.dependencyNames.push(n)),this.node({kind:`reference`,name:n,start:t.start},e,t.start)}if(t.kind===`punct`&&t.value===`(`){this.next();let t=this.parseConditional(e+1);return this.expect(`)`),t}if(t.kind===`punct`&&t.value===`[`){this.next();let n=[];if(!this.isPunct(`]`))for(n.push(this.parseConditional(e+1));this.isPunct(`,`);)this.next(),n.push(this.parseConditional(e+1));return this.expect(`]`),this.node({kind:`array`,elements:n,start:t.start},e,t.start)}throw new R(`expression-syntax`,`Expected an expression.`,t.start)}};function Ot(e){switch(e){case`string`:return`string`;case`number`:return`number`;case`boolean`:return`boolean`;case`null`:return`null`;case`array`:return`array`;case`number-array`:return`number array`}}function kt(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e==`boolean`?`boolean`:typeof e==`number`?`number`:`string`}function At(e,t){throw new R(`expression-type`,e,t)}function z(e,t,n,r){e!==t&&At(`${r}, got ${Ot(e)}.`,n)}function jt(e,t){return e===t?e:e===`null`?t:t===`null`?e:null}function Mt(e,t){switch(e.kind){case`literal`:return kt(e.value);case`reference`:{if(typeof t!=`object`||!t||!Object.prototype.hasOwnProperty.call(t,e.name))throw new R(`expression-unknown-name`,`Variable "${e.name}" is not declared.`,e.start);let n=t[e.name];if(typeof n!=`string`||!st.has(n))throw new R(`expression-value`,`Variable "${e.name}" has an invalid type.`,e.start);return n}case`unary`:{let n=Mt(e.operand,t);return e.operator===`!`?(z(n,`boolean`,e.start,`Logical not requires a boolean`),`boolean`):(z(n,`number`,e.start,`Unary ${e.operator} requires a number`),`number`)}case`binary`:{let n=Mt(e.left,t),r=Mt(e.right,t);switch(e.operator){case`+`:return n===`number`&&r===`number`?`number`:n===`string`&&r===`string`?`string`:At(`Operator "+" requires two numbers or two strings, got ${Ot(n)} and ${Ot(r)}.`,e.start);case`-`:case`*`:case`/`:case`%`:return z(n,`number`,e.start,`Operator "${e.operator}" requires a number`),z(r,`number`,e.start,`Operator "${e.operator}" requires a number`),`number`;case`<`:case`<=`:case`>`:case`>=`:return n===`number`&&r===`number`||n===`string`&&r===`string`?`boolean`:At(`Comparison operator "${e.operator}" requires two numbers or two strings, got ${Ot(n)} and ${Ot(r)}.`,e.start);case`==`:case`!=`:return n!==r&&n!==`null`&&r!==`null`?At(`Equality comparison requires matching types, got ${Ot(n)} and ${Ot(r)}.`,e.start):`boolean`;case`&&`:case`||`:return z(n,`boolean`,e.start,`Logical operators require booleans`),z(r,`boolean`,e.start,`Logical operators require booleans`),`boolean`}break}case`array`:{if(e.elements.length===0)return`number-array`;let n=null;for(let r of e.elements){let e=Mt(r,t);if(e!==`string`&&e!==`number`)return At(`Array literals require string or number elements, got ${Ot(e)}.`,r.start);if(n===null)n=e;else if(n!==e)return At(`Array literals require elements of one type, got ${Ot(n)} and ${Ot(e)}.`,r.start)}return n===`string`?`array`:`number-array`}case`index`:{let n=Mt(e.target,t);return z(Mt(e.index,t),`number`,e.start,`Array index must be a number`),n===`array`?`string`:n===`number-array`?`number`:At(`Index access requires an array, got ${Ot(n)}.`,e.start)}case`conditional`:{z(Mt(e.test,t),`boolean`,e.start,`Conditional test must be a boolean`);let n=Mt(e.consequent,t),r=Mt(e.alternate,t);if(n===`array`&&e.alternate.kind===`array`&&e.alternate.elements.length===0||r===`array`&&e.consequent.kind===`array`&&e.consequent.elements.length===0)return`array`;let i=jt(n,r);return i===null?At(`Conditional branches must have matching types or one null, got ${Ot(n)} and ${Ot(r)}.`,e.start):i}case`call`:{let n=e.args.map(e=>Mt(e,t));switch(e.name){case`abs`:case`sqrt`:case`floor`:case`ceil`:case`round`:case`sin`:case`cos`:case`tan`:case`asin`:case`acos`:case`atan`:case`exp`:case`log`:return z(n[0],`number`,e.start,`Function ${e.name} requires a number`),`number`;case`min`:case`max`:case`pow`:case`clamp`:for(let t of n)z(t,`number`,e.start,`Function ${e.name} requires a number`);return`number`;case`len`:return n[0]!==`string`&&n[0]!==`array`&&n[0]!==`number-array`&&At(`Function len requires a string or array, got ${Ot(n[0])}.`,e.start),`number`;case`contains`:if(n[0]===`number-array`)return z(n[1],`number`,e.start,`Function contains requires a numeric member`),`boolean`;if(n[0]===`string`||n[0]===`array`)return z(n[1],`string`,e.start,`Function contains requires a string member`),`boolean`;At(`Function contains requires a string or array, got ${Ot(n[0])}.`,e.start);break;case`sum`:case`average`:case`minOf`:case`maxOf`:return z(n[0],`number-array`,e.start,`Function ${e.name} requires a numeric array`),`number`;case`formatNumber`:case`formatPercent`:case`formatScientific`:return n[0]!==`number`&&n[0]!==`null`&&At(`Function ${e.name} requires a number or null, got ${Ot(n[0])}.`,e.start),n[1]!==void 0&&z(n[1],`number`,e.start,`Function ${e.name} requires numeric fraction digits`),n[2]!==void 0&&z(n[2],`string`,e.start,`Function ${e.name} requires a string locale`),e.name===`formatNumber`&&n[3]!==void 0&&z(n[3],`boolean`,e.start,`Function formatNumber requires a boolean grouping flag`),`string`;case`formatCurrency`:return n[0]!==`number`&&n[0]!==`null`&&At(`Function formatCurrency requires a number or null, got ${Ot(n[0])}.`,e.start),n[1]!==void 0&&z(n[1],`string`,e.start,`Function formatCurrency requires a string currency code`),n[2]!==void 0&&z(n[2],`number`,e.start,`Function formatCurrency requires numeric fraction digits`),n[3]!==void 0&&z(n[3],`string`,e.start,`Function formatCurrency requires a string locale`),`string`;case`trim`:case`lower`:case`upper`:return z(n[0],`string`,e.start,`Function ${e.name} requires a string`),`string`;case`startsWith`:case`endsWith`:return z(n[0],`string`,e.start,`Function ${e.name} requires a string`),z(n[1],`string`,e.start,`Function ${e.name} requires a string search value`),`boolean`;case`replace`:return z(n[0],`string`,e.start,`Function replace requires a string`),z(n[1],`string`,e.start,`Function replace requires a string search value`),z(n[2],`string`,e.start,`Function replace requires a string replacement`),`string`;case`slice`:return z(n[0],`string`,e.start,`Function slice requires a string`),z(n[1],`number`,e.start,`Function slice requires a numeric start index`),n[2]!==void 0&&z(n[2],`number`,e.start,`Function slice requires a numeric end index`),`string`;case`dateCompare`:return z(n[0],`string`,e.start,`Function dateCompare requires a date string`),z(n[1],`string`,e.start,`Function dateCompare requires a date string`),`number`;case`dateDiff`:return z(n[0],`string`,e.start,`Function dateDiff requires a date string`),z(n[1],`string`,e.start,`Function dateDiff requires a date string`),n[2]!==void 0&&z(n[2],`string`,e.start,`Function dateDiff requires a string unit`),`number`}break}}throw new R(`expression-type`,`Unsupported expression.`,0)}function Nt(e,t,n=`expression-eval`){throw new R(n,e,t)}function Pt(e){if(typeof e!=`object`||!e||Array.isArray(e))throw new R(`expression-value`,`Expression environment must be an object.`,0)}function Ft(e,t,n){if(e===null)return null;if(typeof e==`string`){let r=bt(e);if(r)throw new R(`expression-budget`,`Variable "${t}": ${r}`,n);return e}if(typeof e==`boolean`)return e;if(typeof e==`number`){if(!Number.isFinite(e))throw new R(`expression-value`,`Variable "${t}" must be a finite number.`,n);return e}if(Array.isArray(e)){let r=vt(e);if(r)throw new R(r.code,`Variable "${t}": ${r.message}`,n);return e}throw new R(`expression-value`,`Variable "${t}" has an invalid value type.`,n)}function It(e,t,n){return Pt(e),Object.prototype.hasOwnProperty.call(e,t)||Nt(`Variable "${t}" is not declared.`,n,`expression-unknown-name`),Ft(e[t],t,n)}function Lt(e,t,n=`Expected a number`){return typeof e==`number`&&Number.isFinite(e)||Nt(`${n}.`,t,`expression-type`),e}function Rt(e,t,n=`Expected a boolean`){return typeof e!=`boolean`&&Nt(`${n}.`,t,`expression-type`),e}function zt(e,t,n=`Expected a string`){return typeof e!=`string`&&Nt(`${n}.`,t,`expression-type`),e}function Bt(e,t,n){Array.isArray(e)||Nt(`${n}.`,t,`expression-type`);for(let r of e)typeof r==`number`&&Number.isFinite(r)||Nt(`${n}.`,t,`expression-type`);return e}function Vt(e,t){let n=vt(e);return n&&Nt(n.message,t,n.code),e}function Ht(e,t){try{return t()}catch(t){throw t instanceof ee?new R(t.code,t.message,e):t}}function Ut(e,t){return Number.isNaN(e)&&Nt(`The result is undefined.`,t,`expression-domain`),Number.isFinite(e)||Nt(`The result is not a finite number.`,t,`expression-number`),e}function Wt(e,t){let n=Array.from(e),r=Array.from(t),i=Math.min(n.length,r.length);for(let e=0;e<i;e+=1){let t=n[e].codePointAt(0),i=r[e].codePointAt(0);if(t!==i)return t<i?-1:1}return n.length===r.length?0:n.length<r.length?-1:1}function Gt(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}return!1}function Kt(e,t){return qt(e,t,{steps:0},1)}function qt(e,t,n,r){switch(n.steps+=1,n.steps>pt&&Nt(`Expression evaluation exceeded the step limit.`,e.start,`expression-budget`),r>mt&&Nt(`Expression evaluation is nested too deeply.`,e.start,`expression-budget`),e.kind){case`literal`:return e.value;case`reference`:return It(t,e.name,e.start);case`unary`:{let i=qt(e.operand,t,n,r+1);if(e.operator===`!`)return!Rt(i,e.start,`Logical not requires a boolean`);let a=Lt(i,e.start,`Unary ${e.operator} requires a number`);return Ut(e.operator===`-`?-a:a,e.start)}case`binary`:{if(e.operator===`&&`||e.operator===`||`){let i=Rt(qt(e.left,t,n,r+1),e.start,`Logical operators require booleans`);return e.operator===`&&`&&!i?!1:e.operator===`||`&&i?!0:Rt(qt(e.right,t,n,r+1),e.start,`Logical operators require booleans`)}let i=qt(e.left,t,n,r+1),a=qt(e.right,t,n,r+1);switch(e.operator){case`+`:if(typeof i==`number`&&typeof a==`number`)return Ut(i+a,e.start);if(typeof i==`string`&&typeof a==`string`){let t=i+a;return t.length>ht&&Nt(`String result exceeds the length limit.`,e.start,`expression-budget`),t}Nt(`Operator "+" requires two numbers or two strings.`,e.start,`expression-type`);case`-`:case`*`:case`/`:case`%`:{let t=Lt(i,e.start,`Operator "${e.operator}" requires a number`),n=Lt(a,e.start,`Operator "${e.operator}" requires a number`);return(e.operator===`/`||e.operator===`%`)&&n===0&&Nt(`Division by zero.`,e.start,`expression-divide-by-zero`),Ut(e.operator===`-`?t-n:e.operator===`*`?t*n:e.operator===`/`?t/n:t%n,e.start)}case`==`:case`!=`:{let t=kt(i),n=kt(a);t!==n&&t!==`null`&&n!==`null`&&Nt(`Equality comparison requires matching types.`,e.start,`expression-type`);let r=Gt(i,a);return e.operator===`==`?r:!r}case`<`:case`<=`:case`>`:case`>=`:{let t;return typeof i==`number`&&typeof a==`number`?t=i===a?0:i<a?-1:1:typeof i==`string`&&typeof a==`string`?t=Wt(i,a):Nt(`Comparison operator "${e.operator}" requires two numbers or two strings.`,e.start,`expression-type`),e.operator===`<`?t<0:e.operator===`<=`?t<=0:e.operator===`>`?t>0:t>=0}}break}case`conditional`:return qt(Rt(qt(e.test,t,n,r+1),e.start,`Conditional test must be a boolean`)?e.consequent:e.alternate,t,n,r+1);case`array`:{let i=[];for(let a of e.elements)i.push(qt(a,t,n,r+1));return Vt(i,e.start)}case`index`:{let i=qt(e.target,t,n,r+1),a=Lt(qt(e.index,t,n,r+1),e.start,`Array index must be a number`);return Number.isSafeInteger(a)||Nt(`Array index must be a finite integer.`,e.start,`expression-index`),Array.isArray(i)||Nt(`Index access requires an array.`,e.start,`expression-type`),a<0||a>=i.length?null:i[a]}case`call`:{let i=e.args.map(e=>qt(e,t,n,r+1));switch(e.name){case`abs`:case`sqrt`:case`floor`:case`ceil`:case`round`:case`sin`:case`cos`:case`tan`:case`asin`:case`acos`:case`atan`:case`exp`:case`log`:{let t=Lt(i[0],e.start,`Function ${e.name} requires a number`);e.name===`sqrt`&&t<0&&Nt(`sqrt requires a non-negative argument.`,e.start,`expression-domain`),e.name===`log`&&t<=0&&Nt(`log requires a positive argument.`,e.start,`expression-domain`),(e.name===`asin`||e.name===`acos`)&&(t<-1||t>1)&&Nt(`${e.name} requires an argument between -1 and 1.`,e.start,`expression-domain`);let n;switch(e.name){case`abs`:n=Math.abs(t);break;case`sqrt`:n=Math.sqrt(t);break;case`floor`:n=Math.floor(t);break;case`ceil`:n=Math.ceil(t);break;case`round`:n=Math.round(t);break;case`sin`:n=Math.sin(t);break;case`cos`:n=Math.cos(t);break;case`tan`:n=Math.tan(t);break;case`asin`:n=Math.asin(t);break;case`acos`:n=Math.acos(t);break;case`atan`:n=Math.atan(t);break;case`exp`:n=Math.exp(t);break;default:n=Math.log(t)}return Ut(n,e.start)}case`min`:case`max`:{let t=Lt(i[0],e.start,`Function ${e.name} requires a number`);for(let n=1;n<i.length;n+=1){let r=Lt(i[n],e.start,`Function ${e.name} requires a number`);t=e.name===`min`?Math.min(t,r):Math.max(t,r)}return Ut(t,e.start)}case`pow`:return Ut(Lt(i[0],e.start,`Function pow requires a number`)**+Lt(i[1],e.start,`Function pow requires a number`),e.start);case`clamp`:{let t=Lt(i[0],e.start,`Function clamp requires a number`),n=Lt(i[1],e.start,`Function clamp requires a number`),r=Lt(i[2],e.start,`Function clamp requires a number`);return n>r&&Nt(`clamp lower bound cannot exceed upper bound.`,e.start,`expression-domain`),Ut(Math.min(r,Math.max(n,t)),e.start)}case`len`:{let t=i[0];if(typeof t==`string`)return nt(t);if(Array.isArray(t))return t.length;Nt(`Function len requires a string or array.`,e.start,`expression-type`)}case`contains`:{let t=i[0],n=i[1];if(typeof t==`string`)return t.includes(zt(n,e.start,`Function contains requires a string member`));if(Array.isArray(t)){if(typeof n==`string`){for(let n of t)typeof n!=`string`&&Nt(`Function contains requires a string member for a string array.`,e.start,`expression-type`);return t.includes(n)}if(typeof n==`number`&&Number.isFinite(n)){for(let n of t)typeof n!=`number`&&Nt(`Function contains requires a numeric member for a numeric array.`,e.start,`expression-type`);return t.includes(n)}Nt(`Function contains requires a string or numeric member.`,e.start,`expression-type`)}Nt(`Function contains requires a string or array.`,e.start,`expression-type`)}case`sum`:{let t=Bt(i[0],e.start,`Function sum requires a numeric array`);return Ht(e.start,()=>ge(t))}case`average`:{let t=Bt(i[0],e.start,`Function average requires a numeric array`);return Ht(e.start,()=>_e(t))}case`minOf`:{let t=Bt(i[0],e.start,`Function minOf requires a numeric array`);return Ht(e.start,()=>ve(t))}case`maxOf`:{let t=Bt(i[0],e.start,`Function maxOf requires a numeric array`);return Ht(e.start,()=>ye(t))}case`formatNumber`:{let t=i[0]===null?null:Lt(i[0],e.start,`Function formatNumber requires a number or null`),n=i[1]===void 0?2:Lt(i[1],e.start,`Function formatNumber requires numeric fraction digits`),r=i[2]===void 0?`en-US`:zt(i[2],e.start,`Function formatNumber requires a string locale`),a=i[3]===void 0||Rt(i[3],e.start,`Function formatNumber requires a boolean grouping flag`);return Ht(e.start,()=>fe(t,n,r,a))}case`formatPercent`:{let t=i[0]===null?null:Lt(i[0],e.start,`Function formatPercent requires a number or null`),n=i[1]===void 0?0:Lt(i[1],e.start,`Function formatPercent requires numeric fraction digits`),r=i[2]===void 0?`en-US`:zt(i[2],e.start,`Function formatPercent requires a string locale`);return Ht(e.start,()=>pe(t,n,r))}case`formatScientific`:{let t=i[0]===null?null:Lt(i[0],e.start,`Function formatScientific requires a number or null`),n=i[1]===void 0?2:Lt(i[1],e.start,`Function formatScientific requires numeric fraction digits`),r=i[2]===void 0?`en-US`:zt(i[2],e.start,`Function formatScientific requires a string locale`);return Ht(e.start,()=>me(t,n,r))}case`formatCurrency`:{let t=i[0]===null?null:Lt(i[0],e.start,`Function formatCurrency requires a number or null`),n=i[1]===void 0?`USD`:zt(i[1],e.start,`Function formatCurrency requires a string currency code`),r=i[2]===void 0?2:Lt(i[2],e.start,`Function formatCurrency requires numeric fraction digits`),a=i[3]===void 0?`en-US`:zt(i[3],e.start,`Function formatCurrency requires a string locale`);return Ht(e.start,()=>I(t,n,r,a))}case`trim`:return Ht(e.start,()=>Se(zt(i[0],e.start,`Function trim requires a string`)));case`lower`:return Ht(e.start,()=>Ce(zt(i[0],e.start,`Function lower requires a string`)));case`upper`:return Ht(e.start,()=>we(zt(i[0],e.start,`Function upper requires a string`)));case`startsWith`:return Ht(e.start,()=>Te(zt(i[0],e.start,`Function startsWith requires a string`),zt(i[1],e.start,`Function startsWith requires a string search value`)));case`endsWith`:return Ht(e.start,()=>Ee(zt(i[0],e.start,`Function endsWith requires a string`),zt(i[1],e.start,`Function endsWith requires a string search value`)));case`replace`:{let t=zt(i[0],e.start,`Function replace requires a string`),n=zt(i[1],e.start,`Function replace requires a string search value`),r=zt(i[2],e.start,`Function replace requires a string replacement`);return Ht(e.start,()=>De(t,n,r))}case`slice`:{let t=zt(i[0],e.start,`Function slice requires a string`),n=Lt(i[1],e.start,`Function slice requires a numeric start index`),r=i[2]===void 0?void 0:Lt(i[2],e.start,`Function slice requires a numeric end index`);return Ht(e.start,()=>ke(t,n,r))}case`dateCompare`:{let t=zt(i[0],e.start,`Function dateCompare requires a date string`),n=zt(i[1],e.start,`Function dateCompare requires a date string`);return Ht(e.start,()=>Ne(t,n))}case`dateDiff`:{let t=zt(i[0],e.start,`Function dateDiff requires a date string`),n=zt(i[1],e.start,`Function dateDiff requires a date string`),r=i[2]===void 0?`days`:zt(i[2],e.start,`Function dateDiff requires a string unit`);return Ht(e.start,()=>Pe(t,n,r))}}break}}throw new R(`expression-eval`,`Unsupported expression.`,0)}var Jt=new Map;function Yt(e){if(typeof e!=`string`)throw new R(`expression-syntax`,`Expression must be a string.`,0);if(e.length>lt)throw new R(`expression-budget`,`Expression exceeds the ${lt}-character limit.`,0);let t=Jt.get(e);if(t)return t;let n=new Dt(e),r=n.parse(),i=[...n.dependencies],a=Object.freeze({source:e,dependencies:i,evaluate(e){return Kt(r,e)},inferType(e){return Mt(r,e)}});if(Jt.size>=_t){let e=Jt.keys().next().value;e!==void 0&&Jt.delete(e)}return Jt.set(e,a),a}function Xt(e){if(e.length>gt)throw new R(`expression-budget`,`Interpolation template exceeds the length limit.`,0);let t=[],n=0;for(;;){let r=e.indexOf(`{{`,n);if(r<0){n<e.length&&t.push({kind:`text`,value:e.slice(n)});break}r>n&&t.push({kind:`text`,value:e.slice(n,r)});let i=r+2,a=``,o=!1;for(;i<e.length;){let t=e[i];if(a!==``){if(t===`\\`){i+=2;continue}t===a&&(a=``),i+=1}else if(t===`"`||t===`'`)a=t,i+=1;else{if(t===`{`&&e[i+1]===`{`)throw new R(`expression-interpolation`,`Interpolations cannot be nested.`,i);if(t===`}`&&e[i+1]===`}`){o=!0;break}i+=1}}if(!o)throw new R(`expression-interpolation`,`Interpolation is missing }}.`,r);let s=e.slice(r+2,i);if(s.trim()===``)throw new R(`expression-empty`,`Interpolation expression is empty.`,r+2);t.push({kind:`expression`,source:s,start:r+2}),n=i+2}return t}function Zt(e){try{return Yt(e.source)}catch(t){throw t instanceof R?new R(t.code,t.message,e.start+t.offset):t}}function Qt(e,t,n){try{return e.evaluate(t)}catch(e){throw e instanceof R?new R(e.code,e.message,n+e.offset):e}}function $t(e,t){if(e===null)return``;if(typeof e==`string`)return e;if(typeof e==`number`){if(!Number.isFinite(e))throw new R(`expression-value`,`Cannot display a non-finite number.`,t);return String(e)}if(typeof e==`boolean`)return e?`true`:`false`;throw Array.isArray(e)?new R(`expression-type`,`Cannot insert an array as text; convert it with a function such as len first.`,t):new R(`expression-type`,`Cannot display this value as text.`,t)}function en(e,t){let n=[],r=0;for(let i of e){let e;if(e=i.kind===`text`?i.value:$t(Qt(Zt(i),t,i.start),i.start),r+=e.length,r>ht)throw new R(`expression-budget`,`Interpolation result exceeds the length limit.`,0);n.push(e)}return n.join(``)}function tn(e,t){if(typeof e!=`string`)throw new R(`expression-interpolation`,`Interpolation template must be a string.`,0);if(e.length>gt)throw new R(`expression-budget`,`Interpolation template exceeds the ${gt}-character limit.`,0);return e.includes(`{{`)?en(Xt(e),t):e}function nn(e){if(typeof e!=`string`)throw new R(`expression-interpolation`,`Interpolation template must be a string.`,0);let t=new Set;for(let n of Xt(e))if(n.kind===`expression`)for(let e of Zt(n).dependencies)t.add(e);return[...t]}var B=class extends Error{code;offset;constructor(e,t,n=0){super(t),this.name=`LatexError`,this.code=e,this.offset=n}},rn=5e4,an=2e4,on=5e3,sn=120,cn=2e4,ln=1e3,un=2e3,dn=5,fn=1e6,pn=new Set([`quad`,`qquad`,`enspace`,`thinspace`,`medspace`,`thickspace`,`negthinspace`,`displaystyle`,`textstyle`,`scriptstyle`,`scriptscriptstyle`,`limits`,`nolimits`]),mn={alpha:`alpha`,beta:`beta`,gamma:`gamma`,theta:`theta`,omega:`omega`,lambda:`lambda`,mu:`mu`,sigma:`sigma`},hn=new Set([`sin`,`cos`,`tan`,`arcsin`,`arccos`,`arctan`,`exp`,`ln`,`log`,`min`,`max`]),gn={"{":`lbrace`,"}":`rbrace`,"|":`vert`,"%":`percent`,"&":`amp`,"#":`hash`,_:`underscore`,$:`dollar`};function _n(e){let t=[],n=0,r=(e,n,r)=>{if(t.length>=an)throw new B(`latex-budget`,`Math input contains too many tokens.`,r);t.push({kind:e,value:n,offset:r})};for(;n<e.length;){let t=e[n];if(t===` `||t===` `||t===`\r`||t===`
8
+ `+e.stack}}var Fe=Object.prototype.hasOwnProperty,Ie=t.unstable_scheduleCallback,Le=t.unstable_cancelCallback,Re=t.unstable_shouldYield,ze=t.unstable_requestPaint,Be=t.unstable_now,Ve=t.unstable_getCurrentPriorityLevel,He=t.unstable_ImmediatePriority,Ue=t.unstable_UserBlockingPriority,We=t.unstable_NormalPriority,Ge=t.unstable_LowPriority,Ke=t.unstable_IdlePriority,qe=t.log,Je=t.unstable_setDisableYieldValue,Ye=null,Xe=null;function Ze(e){if(typeof qe==`function`&&Je(e),Xe&&typeof Xe.setStrictMode==`function`)try{Xe.setStrictMode(Ye,e)}catch{}}var Qe=Math.clz32?Math.clz32:tt,$e=Math.log,et=Math.LN2;function tt(e){return e>>>=0,e===0?32:31-($e(e)/et|0)|0}var z=256,nt=262144,rt=4194304;function it(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 at(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=it(n))):i=it(o):i=it(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=it(n))):i=it(o)):i=it(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 ot(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function st(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-Qe(n),i=1<<r;t|=e[r],n&=~i}return t}function ct(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 lt(){var e=rt;return rt<<=1,!(rt&62914560)&&(rt=4194304),e}function ut(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function dt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ft(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-Qe(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&&pt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function pt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Qe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function mt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Qe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ht(e,t){var n=t&-t;return n=n&42?1:gt(n),(n&(e.suspendedLanes|t))===0?n:0}function gt(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 _t(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function vt(){var e=R.p;return e===0?(e=window.event,e===void 0?32:Th(e.type)):e}function yt(e,t){var n=R.p;try{return R.p=e,t()}finally{R.p=n}}var bt=Math.random().toString(36).slice(2),xt=`__reactFiber$`+bt,St=`__reactProps$`+bt,Ct=`__reactContainer$`+bt,wt=`__reactEvents$`+bt,Tt=`__reactListeners$`+bt,Et=`__reactHandles$`+bt,Dt=`__reactResources$`+bt,Ot=`__reactMarker$`+bt,kt=`__reactLoad$`+bt;function At(e){delete e[xt],delete e[St],delete e[Tt],delete e[Et]}function jt(e){var t;if(t=e[xt])return t;for(var n=e.parentNode;n;){if(t=n[Ct]||n[xt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mm(e);e!==null;){if(n=e[xt])return n;e=mm(e)}return t}e=n,n=e.parentNode}return null}function Mt(e){if(e=e[xt]||e[Ct]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Nt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Pt(e){var t=e[Dt];return t||=e[Dt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Ft(e){e[Ot]=!0}function It(e){e[kt]=void 0}var Lt=new Set,Rt={};function zt(e,t){Bt(e,t),Bt(e+`Capture`,t)}function Bt(e,t){for(Rt[e]=t,e=0;e<t.length;e++)Lt.add(t[e])}var Vt=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]*$`),Ht={},Ut={};function Wt(e){return Fe.call(Ut,e)?!0:Fe.call(Ht,e)?!1:Vt.test(e)?Ut[e]=!0:(Ht[e]=!0,!1)}var Gt=!1;function Kt(){var e=Gt;return Gt=!1,e}function qt(e,t,n){if(Wt(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 Jt(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 Yt(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 Xt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Zt(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 $t(e){if(!e._valueTracker){var t=Zt(e)?`checked`:`value`;e._valueTracker=Qt(e,t,``+e[t])}}function en(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Zt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var tn=/[\n"\\]/g;function nn(e){return e.replace(tn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function B(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=``+Xt(t)):e.value!==``+Xt(t)&&(e.value=``+Xt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):an(e,Xt(n)):o===`number`&&e.value==t?an(e,Xt(e.value)):an(e,Xt(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=``+Xt(s):e.removeAttribute(`name`)}function rn(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)){$t(e);return}n=n==null?``:``+Xt(n),t=t==null?n:``+Xt(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),$t(e)}function an(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function on(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=``+Xt(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 sn(e,t,n){t!=null&&(t=``+Xt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Xt(n)}function cn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(pe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Xt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),$t(e)}function ln(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var un=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 dn(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||un.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function fn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(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]=``,Gt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(dn(e,a,r),Gt=!0)}else for(var o in t)t.hasOwnProperty(o)&&dn(e,o,t[o])}function pn(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 mn=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`]]),hn=/^[\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 gn(e){return hn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function _n(){}var vn=null;function yn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bn=null,xn=null;function Sn(e){var t=Mt(e);if(t&&(e=t.stateNode)){var n=e[St]||null;a:switch(e=t.stateNode,t.type){case`input`:if(B(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="`+nn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[St]||null;if(!a)throw Error(i(90));B(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&en(r)}break a;case`textarea`:sn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&on(e,!!n.multiple,t,!1)}}}var Cn=!1;function wn(e,t,n){if(Cn)return e(t,n);Cn=!0;try{return e(t)}finally{if(Cn=!1,(bn!==null||xn!==null)&&(zd(),bn&&(t=bn,e=xn,xn=bn=null,Sn(t),e)))for(t=0;t<e.length;t++)Sn(e[t])}}function Tn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[St]||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(i(231,t,typeof n));return n}var En=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Dn=!1;if(En)try{var On={};Object.defineProperty(On,"passive",{get:function(){Dn=!0}}),window.addEventListener(`test`,On,On),window.removeEventListener(`test`,On,On)}catch{Dn=!1}var kn=null,An=null,jn=null;function Mn(){if(jn)return jn;var e,t=An,n=t.length,r,i=`value`in kn?kn.value:kn.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 jn=i.slice(e,1<r?1-r:void 0)}function Nn(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 Pn(){return!0}function Fn(){return!1}function In(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)?Pn:Fn,this.isPropagationStopped=Fn,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=Pn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Pn)},persist:function(){},isPersistent:Pn}),t}var Ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rn=In(Ln),zn=D({},Ln,{view:0,detail:0}),Bn=In(zn),Vn,Hn,Un,Wn=D({},zn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tr,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!==Un&&(Un&&e.type===`mousemove`?(Vn=e.screenX-Un.screenX,Hn=e.screenY-Un.screenY):Hn=Vn=0,Un=e),Vn)},movementY:function(e){return`movementY`in e?e.movementY:Hn}}),Gn=In(Wn),Kn=In(D({},Wn,{dataTransfer:0})),qn=In(D({},zn,{relatedTarget:0})),Jn=In(D({},Ln,{animationName:0,elapsedTime:0,pseudoElement:0})),Yn=In(D({},Ln,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Xn=In(D({},Ln,{data:0})),Zn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Qn={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`},$n={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function er(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$n[e])?!!t[e]:!1}function tr(){return er}var nr=In(D({},zn,{key:function(e){if(e.key){var t=Zn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Nn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Qn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tr,charCode:function(e){return e.type===`keypress`?Nn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Nn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),rr=In(D({},Wn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),ir=In(D({},Ln,{submitter:0})),ar=In(D({},zn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tr})),or=In(D({},Ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),sr=In(D({},Wn,{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})),cr=In(D({},Ln,{newState:0,oldState:0,source:0})),lr=[9,13,27,32],ur=En&&`CompositionEvent`in window,dr=null;En&&`documentMode`in document&&(dr=document.documentMode);var fr=En&&`TextEvent`in window&&!dr,pr=En&&(!ur||dr&&8<dr&&11>=dr),mr=` `,hr=!1;function gr(e,t){switch(e){case`keyup`:return lr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function _r(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var vr=!1;function yr(e,t){switch(e){case`compositionend`:return _r(t);case`keypress`:return t.which===32?(hr=!0,mr):null;case`textInput`:return e=t.data,e===mr&&hr?null:e;default:return null}}function br(e,t){if(vr)return e===`compositionend`||!ur&&gr(e,t)?(e=Mn(),jn=An=kn=null,vr=!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 pr&&t.locale!==`ko`?null:t.data;default:return null}}var xr={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 Sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!xr[e.type]:t===`textarea`}function Cr(e,t,n,r){bn?xn?xn.push(r):xn=[r]:bn=r,t=Yf(t,`onChange`),0<t.length&&(n=new Rn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var wr=null,Tr=null;function Er(e){Vf(e,0)}function Dr(e){if(en(Nt(e)))return e}function Or(e,t){if(e===`change`)return t}var kr=!1;if(En){var Ar;if(En){var jr=`oninput`in document;if(!jr){var Mr=document.createElement(`div`);Mr.setAttribute(`oninput`,`return;`),jr=typeof Mr.oninput==`function`}Ar=jr}else Ar=!1;kr=Ar&&(!document.documentMode||9<document.documentMode)}function Nr(){wr&&(wr.detachEvent(`onpropertychange`,Pr),Tr=wr=null)}function Pr(e){if(e.propertyName===`value`&&Dr(Tr)){var t=[];Cr(t,Tr,e,yn(e)),wn(Er,t)}}function Fr(e,t,n){e===`focusin`?(Nr(),wr=t,Tr=n,wr.attachEvent(`onpropertychange`,Pr)):e===`focusout`&&Nr()}function Ir(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Dr(Tr)}function Lr(e,t){if(e===`click`)return Dr(t)}function Rr(e,t){if(e===`input`||e===`change`)return Dr(t)}function zr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Br=typeof Object.is==`function`?Object.is:zr;function Vr(e,t){if(Br(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(!Fe.call(t,i)||!Br(e[i],t[i]))return!1}return!0}function Hr(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 Ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wr(e,t){var n=Ur(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=Ur(n)}}function Gr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Hr(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=Hr(e.document)}return t}function qr(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 Jr=En&&`documentMode`in document&&11>=document.documentMode,Yr=null,Xr=null,Zr=null,Qr=!1;function $r(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qr||Yr==null||Yr!==Hr(r)||(r=Yr,`selectionStart`in r&&qr(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}),Zr&&Vr(Zr,r)||(Zr=r,r=Yf(Xr,`onSelect`),0<r.length&&(t=new Rn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Yr)))}function ei(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ti={animationend:ei(`Animation`,`AnimationEnd`),animationiteration:ei(`Animation`,`AnimationIteration`),animationstart:ei(`Animation`,`AnimationStart`),transitionrun:ei(`Transition`,`TransitionRun`),transitionstart:ei(`Transition`,`TransitionStart`),transitioncancel:ei(`Transition`,`TransitionCancel`),transitionend:ei(`Transition`,`TransitionEnd`)},ni={},ri={};En&&(ri=document.createElement(`div`).style,`AnimationEvent`in window||(delete ti.animationend.animation,delete ti.animationiteration.animation,delete ti.animationstart.animation),`TransitionEvent`in window||delete ti.transitionend.transition);function ii(e){if(ni[e])return ni[e];if(!ti[e])return e;var t=ti[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ri)return ni[e]=t[n];return e}var ai=ii(`animationend`),oi=ii(`animationiteration`),si=ii(`animationstart`),ci=ii(`transitionrun`),li=ii(`transitionstart`),ui=ii(`transitioncancel`),di=ii(`transitionend`),fi=new Map,pi=`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(` `);pi.push(`scrollEnd`);function mi(e,t){fi.set(e,t),zt(t,[e])}var hi=0;function V(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=bd.identifierPrefix;var n=hi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function gi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Od;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 H(e,t){return e=gi(e),t=gi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var _i=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)},vi=[],yi=0,bi=0;function xi(){for(var e=yi,t=bi=yi=0;t<e;){var n=vi[t];vi[t++]=null;var r=vi[t];vi[t++]=null;var i=vi[t];vi[t++]=null;var a=vi[t];if(vi[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&&Ti(n,i,a)}}function Si(e,t,n,r){vi[yi++]=e,vi[yi++]=t,vi[yi++]=n,vi[yi++]=r,bi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Ci(e,t,n,r){return Si(e,t,n,r),Ei(e)}function wi(e,t){return Si(e,null,null,t),Ei(e)}function Ti(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-Qe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Ei(e){if(50<kd)throw kd=0,Ad=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Di={};function Oi(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 ki(e,t,n,r){return new Oi(e,t,n,r)}function Ai(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ji(e,t){var n=e.alternate;return n===null?(n=ki(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 Mi(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 Ni(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Ai(r)&&(s=1);else if(typeof r==`string`)s=Ym(e,n,be.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ie:return e=ki(31,n,t,a),e.elementType=ie,e.lanes=o,e;case j:return Pi(n.children,a,o,t);case M:s=8,a|=24;break;case N:return e=ki(12,n,t,a|2),e.elementType=N,e.lanes=o,e;case I:return e=ki(13,n,t,a),e.elementType=I,e.lanes=o,e;case te:return e=ki(19,n,t,a),e.elementType=te,e.lanes=o,e;case ae:case se:return e=a|32,e=ki(30,n,t,e),e.elementType=se,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case F:s=10;break a;case P:s=9;break a;case ee:s=11;break a;case ne:s=14;break a;case re:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ki(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Pi(e,t,n,r){return e=ki(7,e,r,t),e.lanes=n,e}function Fi(e,t,n){return e=ki(6,e,null,t),e.lanes=n,e}function Ii(e){var t=ki(18,null,null,0);return t.stateNode=e,t}function Li(e,t,n){return t=ki(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ri=new WeakMap;function zi(e,t){if(typeof e==`object`&&e){var n=Ri.get(e);return n===void 0?(t={value:e,source:t,stack:Pe(t)},Ri.set(e,t),t):n}return{value:e,source:t,stack:Pe(t)}}var Bi=[],Vi=0,Hi=null,Ui=0,Wi=[],Gi=0,Ki=null,qi=1,Ji=``;function Yi(e,t){Bi[Vi++]=Ui,Bi[Vi++]=Hi,Hi=e,Ui=t}function Xi(e,t,n){Wi[Gi++]=qi,Wi[Gi++]=Ji,Wi[Gi++]=Ki,Ki=e;var r=qi;e=Ji;var i=32-Qe(r)-1;r&=~(1<<i),n+=1;var a=32-Qe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,qi=1<<32-Qe(t)+i|n<<i|r,Ji=a+e}else qi=1<<a|n<<i|r,Ji=e}function Zi(e){e.return!==null&&(Yi(e,1),Xi(e,1,0))}function Qi(e){for(;e===Hi;)Hi=Bi[--Vi],Bi[Vi]=null,Ui=Bi[--Vi],Bi[Vi]=null;for(;e===Ki;)Ki=Wi[--Gi],Wi[Gi]=null,Ji=Wi[--Gi],Wi[Gi]=null,qi=Wi[--Gi],Wi[Gi]=null}function $i(e,t){Wi[Gi++]=qi,Wi[Gi++]=Ji,Wi[Gi++]=Ki,qi=t.id,Ji=t.overflow,Ki=e}var ea=null,ta=null,na=!1,ra=null,ia=!1,aa=Error(i(519));function oa(e){throw fa(zi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),aa}function sa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[xt]=e,t[St]=r,n){case`dialog`:Hf(`cancel`,t),Hf(`close`,t);break;case`iframe`:case`object`:case`embed`:Hf(`load`,t);break;case`video`:case`audio`:for(n=0;n<zf.length;n++)Hf(zf[n],t);break;case`source`:Hf(`error`,t);break;case`img`:case`image`:case`link`:Hf(`error`,t),Hf(`load`,t);break;case`details`:Hf(`toggle`,t);break;case`input`:Hf(`invalid`,t),rn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Hf(`invalid`,t);break;case`textarea`:Hf(`invalid`,t),cn(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||tp(t.textContent,n)?(r.popover!=null&&(Hf(`beforetoggle`,t),Hf(`toggle`,t)),r.onScroll!=null&&Hf(`scroll`,t),r.onScrollEnd!=null&&Hf(`scrollend`,t),r.onClick!=null&&(t.onclick=_n),t=!0):t=!1,t||oa(e,!0)}function ca(e){for(ea=e.return;ea;)switch(ea.tag){case 5:case 31:case 13:ia=!1;return;case 27:case 3:ia=!0;return;default:ea=ea.return}}function la(e){if(e!==ea)return!1;if(!na)return ca(e),na=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||hp(e.type,e.memoizedProps)),n=!n),n&&ta&&oa(e),ca(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ta=pm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ta=pm(e)}else t===27?(t=ta,wp(e.type)?(e=fm,fm=null,ta=e):ta=t):ta=ea?dm(e.stateNode.nextSibling):null;return!0}function ua(){ta=ea=null,na=!1}function da(){var e=ra;return e!==null&&(fd===null?fd=e:fd.push.apply(fd,e),ra=null),e}function fa(e){ra===null?ra=[e]:ra.push(e)}var pa=_e(null),ma=null,ha=null;function ga(e,t,n){ye(pa,t._currentValue),t._currentValue=n}function _a(e){e._currentValue=pa.current,ve(pa)}function va(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 ya(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),va(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),va(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),va(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ba(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Br(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Ce.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[lh]:e.push(lh))}a=a.return}return e!==null&&ya(t,e,n,r),t.flags|=262144,e!==null}function xa(e){for(e=e.firstContext;e!==null;){if(!Br(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Sa(e){ma=e,ha=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ca(e){return Ta(ma,e)}function wa(e,t){return ma===null&&Sa(e),Ta(e,t)}function Ta(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ha===null){if(e===null)throw Error(i(308));ha=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ha=ha.next=t;return n}var Ea=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()})}},Da=t.unstable_scheduleCallback,Oa=t.unstable_NormalPriority,ka={$$typeof:F,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Aa(){return{controller:new Ea,data:new Map,refCount:0}}function ja(e){e.refCount--,e.refCount===0&&Da(Oa,function(){e.controller.abort()})}function Ma(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 Na=null;function Pa(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Fa=null,Ia=0,La=0,Ra=null;function za(e,t){if(Fa===null){var n=Fa=[];Ia=0,La=Pf(),Ra={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ia++,t.then(Ba,Ba),t}function Ba(){if(--Ia===0&&(Na=null,Fa!==null)){Ra!==null&&(Ra.status=`fulfilled`);var e=Fa;Fa=null,La=0,Ra=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Va(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 Ha=L.S;L.S=function(e,t){if(hd=Be(),typeof t==`object`&&t&&typeof t.then==`function`&&za(e,t),Na!==null)for(var n=bf;n!==null;)Ma(n,Na),n=n.next;if(n=e.types,n!==null){for(var r=bf;r!==null;)Ma(r,n),r=r.next;if(La!==0){r=Na,r===null&&(r=Na=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ha!==null&&Ha(e,t)};var Ua=_e(null);function Wa(){var e=Ua.current;return e===null?Xu.pooledCache:e}function Ga(e,t){t===null?ye(Ua,Ua.current):ye(Ua,t.pool)}function Ka(){var e=Wa();return e===null?null:{parent:ka._currentValue,pool:e}}var qa=Error(i(460)),Ja=Error(i(474)),Ya=Error(i(542)),Xa={then:function(){}};function Za(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Qa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(_n,_n),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,no(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(_n,_n);else{if(e=Xu,e!==null&&100<e.shellSuspendCounter)throw Error(i(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,no(e),e}throw eo=t,qa}}function $a(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(eo=e,qa):e}}var eo=null;function to(){if(eo===null)throw Error(i(459));var e=eo;return eo=null,e}function no(e){if(e===qa||e===Ya)throw Error(i(483))}var ro=null,io=0;function ao(e){var t=io;return io+=1,ro===null&&(ro=[]),Qa(ro,e,t)}function oo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function so(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function co(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 a(e,t){return e=ji(e,t),e.index=0,e.sibling=null,e}function o(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 s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Fi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===j?(e=d(e,t,n.props.children,r,n.key),oo(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===re&&$a(i)===t.type)?(t=a(t,n.props),oo(t,n),t.return=e,t):(t=Ni(n.type,n.key,n.props,null,e.mode,r),oo(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=Li(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Pi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Fi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case k:return n=Ni(t.type,t.key,t.props,null,e.mode,n),oo(n,t),n.return=e,n;case A:return t=Li(t,e.mode,n),t.return=e,t;case re:return t=$a(t),f(e,t,n)}if(pe(t)||ue(t))return t=Pi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ao(t),n);if(t.$$typeof===F)return f(e,wa(e,t),n);so(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 re:return n=$a(n),p(e,t,n,r)}if(pe(n)||ue(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ao(n),r);if(n.$$typeof===F)return p(e,t,wa(e,n),r);so(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 re:return r=$a(r),m(e,t,n,r,i)}if(pe(r)||ue(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ao(r),i);if(r.$$typeof===F)return m(e,t,n,wa(t,r),i);so(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=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),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),na&&Yi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return na&&Yi(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)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),na&&Yi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),na&&Yi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return na&&Yi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),na&&Yi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===j&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===j){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),oo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===re&&$a(l)===r.type){n(e,r.sibling),c=a(r,o.props),oo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===j?(c=Pi(o.props.children,e.mode,c,o.key),oo(c,o),c.return=e,e=c):(c=Ni(o.type,o.key,o.props,null,e.mode,c),oo(c,o),c.return=e,e=c)}return s(e);case A:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Li(o,e.mode,c),c.return=e,e=c}return s(e);case re:return o=$a(o),_(e,r,o,c)}if(pe(o))return h(e,r,o,c);if(ue(o)){if(l=ue(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,ao(o),c);if(o.$$typeof===F)return _(e,r,wa(e,o),c);so(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Fi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{io=0;var i=_(e,t,n,r);return ro=null,i}catch(t){if(t===qa||t===Ya)throw t;var a=ki(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var lo=co(!0),uo=co(!1),fo=!1;function po(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mo(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 ho(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function go(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Yu&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ei(e),Ti(e,null,n),t}return Si(e,r,t,n),Ei(e)}function _o(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,mt(e,n)}}function vo(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 yo=!1;function bo(){if(yo){var e=Ra;if(e!==null)throw e}}function xo(e,t,n,r){yo=!1;var i=e.updateQueue;fo=!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?(Qu&f)===f:(r&f)===f){f!==0&&f===La&&(yo=!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:fo=!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),od|=o,e.lanes=o,e.memoizedState=d}}function So(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Co(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)So(n[e],t)}var wo=_e(null),To=_e(0);function Eo(e,t){e=id,ye(To,e),ye(wo,t),id=e|t.baseLanes}function Do(){ye(To,id),ye(wo,wo.current)}function Oo(){id=To.current,ve(wo),ve(To)}var ko=_e(null),Ao=null;function jo(e){var t=e.alternate;ye(Io,Io.current&1),ye(ko,e),Ao===null&&(t===null||wo.current!==null||t.memoizedState!==null)&&(Ao=e)}function Mo(e){ye(Io,Io.current),ye(ko,e),Ao===null&&(Ao=e)}function No(e){e.tag===22?(ye(Io,Io.current),ye(ko,e),Ao===null&&(Ao=e)):Po()}function Po(){ye(Io,Io.current),ye(ko,ko.current)}function Fo(e){ve(ko),Ao===e&&(Ao=null),ve(Io)}var Io=_e(0);function Lo(e,t){ye(ko,ko.current),ye(Io,t)}function Ro(e){ve(Io),ve(ko),Ao===e&&(Ao=null)}function zo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||cm(n)||lm(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 Bo=0,U=null,Vo=null,Ho=null,Uo=!1,Wo=!1,Go=!1,Ko=0,qo=0,Jo=null,Yo=0;function Xo(){throw Error(i(321))}function Zo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Br(e[n],t[n]))return!1;return!0}function Qo(e,t,n,r,i,a){return Bo=a,U=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?hc:gc,Go=!1,a=n(r,i),Go=!1,Wo&&(a=es(t,n,r,i)),$o(e),a}function $o(e){L.H=mc;var t=Vo!==null&&Vo.next!==null;if(Bo=0,Ho=Vo=U=null,Uo=!1,qo=0,Jo=null,t)throw Error(i(300));e===null||Nc||(e=e.dependencies,e!==null&&xa(e)&&(Nc=!0))}function es(e,t,n,r){U=e;var a=0;do{if(Wo&&(Jo=null),qo=0,Wo=!1,25<=a)throw Error(i(301));if(a+=1,Ho=Vo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}L.H=_c,o=t(n,r)}while(Wo);return o}function ts(){var e=L.H,t=e.useState()[0];return t=typeof t.then==`function`?cs(t):t,e=e.useState()[0],(Vo===null?null:Vo.memoizedState)!==e&&(U.flags|=1024),t}function ns(){var e=Ko!==0;return Ko=0,e}function rs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function is(e){if(Uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Uo=!1}Bo=0,Ho=Vo=U=null,Wo=!1,qo=Ko=0,Jo=null}function as(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ho===null?U.memoizedState=Ho=e:Ho=Ho.next=e,Ho}function os(){if(Vo===null){var e=U.alternate;e=e===null?null:e.memoizedState}else e=Vo.next;var t=Ho===null?U.memoizedState:Ho.next;if(t!==null)Ho=t,Vo=e;else{if(e===null)throw U.alternate===null?Error(i(467)):Error(i(310));Vo=e,e={memoizedState:Vo.memoizedState,baseState:Vo.baseState,baseQueue:Vo.baseQueue,queue:Vo.queue,next:null},Ho===null?U.memoizedState=Ho=e:Ho=Ho.next=e}return Ho}function ss(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cs(e){var t=qo;return qo+=1,Jo===null&&(Jo=[]),e=Qa(Jo,e,t),t=U,(Ho===null?t.memoizedState:Ho.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?hc:gc),e}function ls(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return cs(e);if(e.$$typeof===ce)return;if(e.$$typeof===F)return Ca(e)}throw Error(i(438,String(e)))}function us(e){var t=null,n=U.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=U.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=ss(),U.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]=oe;return t.index++,n}function ds(e,t){return typeof t==`function`?t(e):t}function fs(e){return ps(os(),Vo,e)}function ps(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Bo&f)===f:(Qu&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===La&&(d=!0);else if((Bo&p)===p){u=u.next,p===La&&(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,s=o):l=l.next=f,U.lanes|=p,od|=p;f=u.action,Go&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,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,s=o):l=l.next=p,U.lanes|=f,od|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Br(o,e.memoizedState)&&(Nc=!0,d&&(n=Ra,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ms(e){var t=os(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Br(o,t.memoizedState)||(Nc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function hs(e,t,n){var r=U,a=os(),o=na;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Br((Vo||a).memoizedState,n);if(s&&(a.memoizedState=n,Nc=!0),a=a.queue,Bs(vs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Ho!==null&&!!(Ho.memoizedState.tag&1),Fs(e?9:8,{destroy:void 0},_s.bind(null,r,a,n,t),null),e){if(r.flags|=2048,Xu===null)throw Error(i(349));o||Bo&127||gs(r,t,n)}return n}function gs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=U.updateQueue,t===null?(t=ss(),U.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function _s(e,t,n,r){t.value=n,t.getSnapshot=r,ys(t)&&bs(e)}function vs(e,t,n){return n(function(){ys(t)&&bs(e)})}function ys(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Br(e,n)}catch{return!0}}function bs(e){var t=wi(e,2);t!==null&&Pd(t,e,2)}function xs(e){var t=as();if(typeof e==`function`){var n=e;if(e=n(),Go){Ze(!0);try{n()}finally{Ze(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:e},t}function Ss(e,t,n,r){return e.baseState=n,ps(e,Vo,typeof r==`function`?r:ds)}function Cs(e,t,n,r,a){if(dc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};L.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,ws(t,o)):(o.next=n.next,t.pending=n.next=o)}}function ws(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=L.T,o={};o.types=a===null?null:a.types,L.T=o;try{var s=n(i,r),c=L.S;c!==null&&c(o,s),Ts(e,t,s)}catch(n){Ds(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),L.T=a}}else try{a=n(i,r),Ts(e,t,a)}catch(n){Ds(e,t,n)}}function Ts(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Es(e,t,n)},function(n){return Ds(e,t,n)}):Es(e,t,n)}function Es(e,t,n){t.status=`fulfilled`,t.value=n,Os(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ws(e,n)))}function Ds(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Os(t),t=t.next;while(t!==r)}e.action=null}function Os(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ks(e,t){return t}function As(e,t){if(na){var n=Xu.formState;if(n!==null){a:{var r=U;if(na){if(ta){b:{for(var i=ta,a=ia;i.nodeType!==8;)if(!a||(i=dm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ta=dm(i.nextSibling),r=i.data===`F!`;break a}}oa(r)}r=!1}r&&(t=n[0])}}return n=as(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ks,lastRenderedState:t},n.queue=r,n=cc.bind(null,U,r),r.dispatch=n,r=xs(!1),a=uc.bind(null,U,!1,r.queue),r=as(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Cs.bind(null,U,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function js(e){return Ms(os(),Vo,e)}function Ms(e,t,n){if(t=ps(e,t,ks)[0],e=fs(ds)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=cs(t)}catch(e){throw e===qa?Ya:e}else r=t;t=os();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(U.flags|=2048,Fs(9,{destroy:void 0},Ns.bind(null,i,n),null)),[r,a,e]}function Ns(e,t){e.action=t}function Ps(e){var t=os(),n=Vo;if(n!==null)return Ms(t,n,e);os(),t=t.memoizedState,n=os();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Fs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=U.updateQueue,t===null&&(t=ss(),U.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 Is(){return os().memoizedState}function Ls(e,t,n,r){var i=as();U.flags|=e,i.memoizedState=Fs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Rs(e,t,n,r){var i=os();r=r===void 0?null:r;var a=i.memoizedState.inst;Vo!==null&&r!==null&&Zo(r,Vo.memoizedState.deps)?i.memoizedState=Fs(t,a,n,r):(U.flags|=e,i.memoizedState=Fs(1|t,a,n,r))}function zs(e,t){Ls(8390656,8,e,t)}function Bs(e,t){Rs(2048,8,e,t)}function Vs(e){U.flags|=4;var t=U.updateQueue;if(t===null)t=ss(),U.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Hs(e){var t=os().memoizedState;return Vs({ref:t,nextImpl:e}),function(){if(Yu&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Us(e,t){return Rs(4,2,e,t)}function Ws(e,t){return Rs(4,4,e,t)}function Gs(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 Ks(e,t,n){n=n==null?null:n.concat([e]),Rs(4,4,Gs.bind(null,t,e),n)}function qs(){}function Js(e,t){var n=os();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Zo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ys(e,t){var n=os();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Zo(t,r[1]))return r[0];if(r=e(),Go){Ze(!0);try{e()}finally{Ze(!1)}}return n.memoizedState=[r,t],r}function Xs(e,t,n){return n===void 0||Bo&1073741824&&!(Qu&261930)?e.memoizedState=t:(e.memoizedState=n,e=Md(),U.lanes|=e,od|=e,n)}function Zs(e,t,n,r){return Br(n,t)?n:wo.current===null?!(Bo&106)||Bo&1073741824&&!(Qu&261930)?(Nc=!0,e.memoizedState=n):(e=Md(),U.lanes|=e,od|=e,t):(e=Xs(e,n,r),Br(e,t)||(Nc=!0),e)}function Qs(e,t,n,r,i){var a=R.p;R.p=a!==0&&8>a?a:8;var o=L.T,s={};s.types=o===null?null:o.types,L.T=s,uc(e,!1,t,n);try{var c=i(),l=L.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?lc(e,t,Va(c,r),jd(e)):lc(e,t,r,jd(e))}catch(n){lc(e,t,{then:function(){},status:`rejected`,reason:n},jd())}finally{R.p=a,o!==null&&s.types!==null&&(o.types=s.types),L.T=o}}function $s(){}function ec(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=tc(e).queue;Qs(e,a,t,me,n===null?$s:function(){return nc(e),n(r)})}function tc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:me,baseState:me,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:me},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function nc(e){var t=tc(e);t.next===null&&(t=e.alternate.memoizedState),lc(e,t.next.queue,{},jd())}function rc(){return Ca(lh)}function ic(){return os().memoizedState}function ac(){return os().memoizedState}function oc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=jd();e=ho(n);var r=go(t,e,n);r!==null&&(Pd(r,t,n),_o(r,t,n)),t={cache:Aa()},e.payload=t;return}t=t.return}}function sc(e,t,n){var r=jd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},dc(e)?fc(t,n):(n=Ci(e,t,n,r),n!==null&&(Pd(n,e,r),pc(n,t,r)))}function cc(e,t,n){lc(e,t,n,jd())}function lc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(dc(e))fc(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,Br(s,o))return Si(e,t,i,0),Xu===null&&xi(),!1}catch{}if(n=Ci(e,t,i,r),n!==null)return Pd(n,e,r),pc(n,t,r),!0}return!1}function uc(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},dc(e)){if(t)throw Error(i(479))}else t=Ci(e,n,r,2),t!==null&&Pd(t,e,2)}function dc(e){var t=e.alternate;return e===U||t!==null&&t===U}function fc(e,t){Wo=Uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function pc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,mt(e,n)}}var mc={readContext:Ca,use:ls,useCallback:Xo,useContext:Xo,useEffect:Xo,useImperativeHandle:Xo,useLayoutEffect:Xo,useInsertionEffect:Xo,useMemo:Xo,useReducer:Xo,useRef:Xo,useState:Xo,useDebugValue:Xo,useDeferredValue:Xo,useTransition:Xo,useSyncExternalStore:Xo,useId:Xo,useHostTransitionStatus:Xo,useFormState:Xo,useActionState:Xo,useOptimistic:Xo,useMemoCache:Xo,useCacheRefresh:Xo,useEffectEvent:Xo},hc={readContext:Ca,use:ls,useCallback:function(e,t){return as().memoizedState=[e,t===void 0?null:t],e},useContext:Ca,useEffect:zs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ls(4194308,4,Gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ls(4194308,4,e,t)},useInsertionEffect:function(e,t){Ls(4,2,e,t)},useMemo:function(e,t){var n=as();t=t===void 0?null:t;var r=e();if(Go){Ze(!0);try{e()}finally{Ze(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=as();if(n!==void 0){var i=n(t);if(Go){Ze(!0);try{n(t)}finally{Ze(!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=sc.bind(null,U,e),[r.memoizedState,e]},useRef:function(e){var t=as();return e={current:e},t.memoizedState=e},useState:function(e){e=xs(e);var t=e.queue,n=cc.bind(null,U,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:qs,useDeferredValue:function(e,t){return Xs(as(),e,t)},useTransition:function(){var e=xs(!1);return e=Qs.bind(null,U,e.queue,!0,!1),as().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=U,a=as();if(na){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Xu===null)throw Error(i(349));Qu&127||gs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,zs(vs.bind(null,r,o,e),[e]),r.flags|=2048,Fs(9,{destroy:void 0},_s.bind(null,r,o,n,t),null),n},useId:function(){var e=as(),t=Xu.identifierPrefix;if(na){var n=Ji,r=qi;n=(r&~(1<<32-Qe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Ko++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Yo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:rc,useFormState:As,useActionState:As,useOptimistic:function(e){var t=as();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=uc.bind(null,U,!0,n),n.dispatch=t,[e,t]},useMemoCache:us,useCacheRefresh:function(){return as().memoizedState=oc.bind(null,U)},useEffectEvent:function(e){var t=as(),n={impl:e};return t.memoizedState=n,function(){if(Yu&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},gc={readContext:Ca,use:ls,useCallback:Js,useContext:Ca,useEffect:Bs,useImperativeHandle:Ks,useInsertionEffect:Us,useLayoutEffect:Ws,useMemo:Ys,useReducer:fs,useRef:Is,useState:function(){return fs(ds)},useDebugValue:qs,useDeferredValue:function(e,t){return Zs(os(),Vo.memoizedState,e,t)},useTransition:function(){var e=fs(ds)[0],t=os().memoizedState;return[typeof e==`boolean`?e:cs(e),t]},useSyncExternalStore:hs,useId:ic,useHostTransitionStatus:rc,useFormState:js,useActionState:js,useOptimistic:function(e,t){return Ss(os(),Vo,e,t)},useMemoCache:us,useCacheRefresh:ac,useEffectEvent:Hs},_c={readContext:Ca,use:ls,useCallback:Js,useContext:Ca,useEffect:Bs,useImperativeHandle:Ks,useInsertionEffect:Us,useLayoutEffect:Ws,useMemo:Ys,useReducer:ms,useRef:Is,useState:function(){return ms(ds)},useDebugValue:qs,useDeferredValue:function(e,t){var n=os();return Vo===null?Xs(n,e,t):Zs(n,Vo.memoizedState,e,t)},useTransition:function(){var e=ms(ds)[0],t=os().memoizedState;return[typeof e==`boolean`?e:cs(e),t]},useSyncExternalStore:hs,useId:ic,useHostTransitionStatus:rc,useFormState:Ps,useActionState:Ps,useOptimistic:function(e,t){var n=os();return Vo===null?(n.baseState=e,[e,n.queue.dispatch]):Ss(n,Vo,e,t)},useMemoCache:us,useCacheRefresh:ac,useEffectEvent:Hs};function vc(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 yc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=jd(),i=ho(r);i.payload=t,n!=null&&(i.callback=n),t=go(e,i,r),t!==null&&(Pd(t,e,r),_o(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=jd(),i=ho(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=go(e,i,r),t!==null&&(Pd(t,e,r),_o(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=jd(),r=ho(n);r.tag=2,t!=null&&(r.callback=t),t=go(e,r,n),t!==null&&(Pd(t,e,n),_o(t,e,n))}};function bc(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?!Vr(n,r)||!Vr(i,a):!0}function xc(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&&yc.enqueueReplaceState(t,t.state,null)}function Sc(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 Cc(e){_i(e)}function wc(e){console.error(e)}function Tc(e){_i(e)}function Ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Dc(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 Oc(e,t,n){return n=ho(n),n.tag=3,n.payload={element:null},n.callback=function(){Ec(e,t)},n}function kc(e){return e=ho(e),e.tag=3,e}function Ac(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(){Dc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Dc(t,n,r),typeof i!=`function`&&(vd===null?vd=new Set([this]):vd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function jc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ba(t,n,a,!0),n=ko.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Ao===null?Kd():n.alternate===null&&ad===0&&(ad=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Xa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),mf(e,r,a)),!1;case 22:return n.flags|=65536,r===Xa?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)),mf(e,r,a)),!1}throw Error(i(435,n.tag))}return mf(e,r,a),Kd(),!1}if(na)return t=ko.current,t===null?(r!==aa&&(t=Error(i(423),{cause:r}),fa(zi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=zi(r,n),a=Oc(e.stateNode,r,a),vo(e,a),ad!==4&&(ad=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==aa&&(e=Error(i(422),{cause:r}),fa(zi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=zi(o,n),dd===null?dd=[o]:dd.push(o),ad!==4&&(ad=2),t===null)return!0;r=zi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Oc(n.stateNode,r,e),vo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(vd===null||!vd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=kc(a),Ac(a,e,n,r),vo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Mc=Error(i(461)),Nc=!1;function Pc(e,t,n,r){t.child=e===null?uo(t,null,n,r):lo(t,e.child,n,r)}function Fc(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 Sa(t),r=Qo(e,t,n,o,a,i),s=ns(),e!==null&&!Nc?(rs(e,t,i),ll(e,t,i)):(na&&s&&Zi(t),t.flags|=1,Pc(e,t,r,i),t.child)}function Ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Ai(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Lc(e,t,a,r,i)):(e=Ni(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ul(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Vr:n,n(o,r)&&e.ref===t.ref)return ll(e,t,i)}return t.flags|=1,e=ji(a,r),e.ref=t.ref,e.return=t,t.child=e}function Lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Vr(a,r)&&e.ref===t.ref){if(Nc=!1,t.pendingProps=r=a,ul(e,i))e.flags&131072&&(Nc=!0);else return t.lanes=e.lanes,ll(e,t,i)}}return Gc(e,t,n,r,i)}function Rc(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 Bc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ga(t,a===null?null:a.cachePool),a===null?Do():Eo(t,a),No(t);else return r=t.lanes=536870912,Bc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ga(t,null),Do(),Po()):(Ga(t,a.cachePool),Eo(t,a),Po(),t.memoizedState=null);return Pc(e,t,i,n),t.child}function zc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Bc(e,t,n,r,i){var a=Wa();return a=a===null?null:{parent:ka._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ga(t,null),Do(),No(t),e!==null&&ba(e,t,r,!0),t.childLanes=i,null}function Vc(e,t){return t=el({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Hc(e,t,n){return lo(t,e.child,null,n),e=Vc(t,t.pendingProps),e.flags|=2,Fo(t),t.memoizedState=null,e}function Uc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(na){if(r.mode===`hidden`)return e=Vc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},zc(null,e);if(Mo(t),(e=ta)?(e=sm(e,ia),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ki===null?null:{id:qi,overflow:Ji},retryLane:536870912,hydrationErrors:null},n=Ii(e),n.return=t,t.child=n,ea=t,ta=null)):e=null,e===null)throw oa(t);return t.lanes=536870912,null}return Vc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Mo(t),a){if(t.flags&256)t.flags&=-257,t=Hc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Nc||ba(e,t,n,!1),a=(n&e.childLanes)!==0,Nc||a){if(wo.current===null){if(r=Xu,r!==null&&(s=ht(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,wi(e,s),Pd(r,e,s),Mc;Kd()}t=Hc(e,t,n)}else e=o.treeContext,ta=dm(s.nextSibling),ea=t,na=!0,ra=null,ia=!1,e!==null&&$i(t,e),t=Vc(t,r),t.flags|=134221824;return t}return e=ji(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Wc(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(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Gc(e,t,n,r,i){return Sa(t),n=Qo(e,t,n,r,void 0,i),r=ns(),e!==null&&!Nc?(rs(e,t,i),ll(e,t,i)):(na&&r&&Zi(t),t.flags|=1,Pc(e,t,n,i),t.child)}function Kc(e,t,n,r,i,a){return Sa(t),t.updateQueue=null,n=es(t,r,n,i),$o(e),r=ns(),e!==null&&!Nc?(rs(e,t,a),ll(e,t,a)):(na&&r&&Zi(t),t.flags|=1,Pc(e,t,n,a),t.child)}function qc(e,t,n,r,i){if(Sa(t),t.stateNode===null){var a=Di,o=n.contextType;typeof o==`object`&&o&&(a=Ca(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=yc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},po(t),o=n.contextType,a.context=typeof o==`object`&&o?Ca(o):Di,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(vc(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&&yc.enqueueReplaceState(a,a.state,null),xo(t,r,a,i),bo(),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=Sc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Di,typeof u==`object`&&u&&(o=Ca(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)&&xc(t,a,r,o),fo=!1;var f=t.memoizedState;a.state=f,xo(t,r,a,i),bo(),l=t.memoizedState,s||f!==l||fo?(typeof d==`function`&&(vc(t,n,d,r),l=t.memoizedState),(c=fo||bc(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,mo(e,t),o=t.memoizedProps,u=Sc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Di,typeof l==`object`&&l&&(c=Ca(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)&&xc(t,a,r,c),fo=!1,f=t.memoizedState,a.state=f,xo(t,r,a,i),bo();var p=t.memoizedState;o!==d||f!==p||fo||e!==null&&e.dependencies!==null&&xa(e.dependencies)?(typeof s==`function`&&(vc(t,n,s,r),p=t.memoizedState),(u=fo||bc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&xa(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,Wc(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=lo(t,e.child,null,i),t.child=lo(t,null,n,i)):Pc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=ll(e,t,i),e}function Jc(e,t,n,r){return ua(),t.flags|=256,Pc(e,t,n,r),t.child}var Yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xc(e){return{baseLanes:e,cachePool:Ka()}}function Zc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ld),e}function Qc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Io.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(na){if(i?jo(t):Po(),(e=ta)?(e=sm(e,ia),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ki===null?null:{id:qi,overflow:Ji},retryLane:536870912,hydrationErrors:null},n=Ii(e),n.return=t,t.child=n,ea=t,ta=null)):e=null,e===null)throw oa(t);return t.lanes=lm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Po(),i=t.mode,a=el({mode:`hidden`,children:a},i),r=Pi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Xc(n),r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(null,r)):(jo(t),$c(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return nl(e,t,a,o,r,c,s,n)}return i?(Po(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=ji(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Pi(i,a,n,null),i.flags|=2):i=ji(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,zc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Xc(n):(a=i.cachePool,a===null?a=Ka():(s=ka._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(e.child,r)):(jo(t),n=e.child,e=n.sibling,n=ji(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 $c(e,t){return t=el({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function el(e,t){return e=ki(22,e,null,t),e.lanes=0,e}function tl(e,t,n){return lo(t,e.child,null,n),e=$c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nl(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(jo(t),t.flags&=-257,tl(e,t,c)):t.memoizedState===null?(Po(),o=a.fallback,s=t.mode,a=el({mode:`visible`,children:a.children},s),o=Pi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,lo(t,e.child,null,c),a=t.child,a.memoizedState=Xc(c),a.childLanes=Zc(e,r,c),t.memoizedState=Yc,zc(null,a)):(Po(),t.child=e.child,t.flags|=128,null);if(jo(t),lm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,fa({value:a,source:null,stack:null})),tl(e,t,c)}if(Nc||ba(e,t,c,!1),r=(c&e.childLanes)!==0,Nc||r){if(wo.current!==null)return tl(e,t,c);if(r=Xu,r!==null&&(a=ht(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,wi(e,a),Pd(r,e,a),Mc;return cm(o)||Kd(),tl(e,t,c)}return cm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,ta=dm(o.nextSibling),ea=t,na=!0,ra=null,ia=!1,e!==null&&$i(t,e),t=$c(t,a.children),t.flags|=134221824,t)}function rl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),va(e.return,t,n)}function il(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&zo(n)===null&&(t=e),e=e.sibling}return t}function al(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 ol(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 sl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Io.current;if(t.flags&128)return Lo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Lo(t,o),i===`backwards`&&e!==null?(ol(e),Pc(e,t,r,n),ol(e)):Pc(e,t,r,n),r=na?Ui:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rl(e,n,t);else if(e.tag===19)rl(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=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,ol(t)),al(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&&zo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}al(t,!0,n,null,a,r);break;case`together`:al(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),al(t,!1,i,n,a,r)}return t.child}function cl(e,t,n){var r=t.pendingProps;return ga(t,t.type,r.value),Pc(e,t,r.children,n),t.child}function ll(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),od|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ba(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ji(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ji(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ul(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&xa(e)))}function dl(e,t,n){switch(t.tag){case 3:we(t,t.stateNode.containerInfo),ga(t,ka,e.memoizedState.cache),ua();break;case 27:case 5:Ee(t);break;case 4:we(t,t.stateNode.containerInfo);break;case 10:ga(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Mo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return jo(t),t.flags|=128,null;r=ba(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Qc(e,t,n):(jo(t),e=ll(e,t,n),e===null?null:e.sibling)}jo(t);break;case 19:if(t.flags&128)return sl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(ba(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return sl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Lo(t,Io.current),r)break;return null;case 22:return t.lanes=0,Rc(e,t,n,t.pendingProps);case 24:ga(t,ka,e.memoizedState.cache)}return ll(e,t,n)}function fl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Nc=!0;else{if(!ul(e,n)&&!(t.flags&128))return Nc=!1,dl(e,t,n);Nc=!!(e.flags&131072)}}else Nc=!1,na&&t.flags&1048576&&Xi(t,Ui,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=$a(t.elementType),t.type=e,typeof e==`function`)Ai(e)?(r=Sc(e,r),t.tag=1,t=qc(null,t,e,r,n)):(t.tag=0,t=Gc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ee){t.tag=11,t=Fc(null,t,e,r,n);break a}if(a===ne){t.tag=14,t=Ic(null,t,e,r,n);break a}if(a===F){t.tag=10,t.type=e,t=cl(null,t,n);break a}}throw t=fe(e)||e,Error(i(306,t,``))}}return t;case 0:return Gc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Sc(r,t.pendingProps),qc(e,t,r,a,n);case 3:a:{if(we(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,mo(e,t),xo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ga(t,ka,r),r!==o.cache&&ya(t,[ka],n,!0),bo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Jc(e,t,r,n);break a}if(r!==a){a=zi(Error(i(424)),t),fa(a),t=Jc(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(ta=dm(e.firstChild),ea=t,na=!0,ra=null,ia=!0,n=uo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ua(),r===a){t=ll(e,t,n);break a}Pc(e,t,r,n)}t=t.child}return t;case 26:return Wc(e,t),e===null?(n=Fm(t.type,null,t.pendingProps,null))?t.memoizedState=n:na||(t.stateNode=mp(t.type,t.pendingProps,Se.current,t)):t.memoizedState=Fm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ee(t),e===null&&na&&(r=t.stateNode=_m(t.type,t.pendingProps,Se.current),ea=t,ia=!0,a=ta,wp(t.type)?(fm=a,ta=dm(r.firstChild)):ta=a),Pc(e,t,t.pendingProps.children,n),Wc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&na&&((a=r=ta)&&(r=am(r,t.type,t.pendingProps,ia),r===null?a=!1:(t.stateNode=r,ea=t,ta=dm(r.firstChild),ia=!1,a=!0)),a||oa(t)),Ee(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,hp(a,o)?r=null:s!==null&&hp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Qo(e,t,ts,null,null,n),lh._currentValue=a),Wc(e,t),Pc(e,t,r,n),t.child;case 6:return e===null&&na&&((e=n=ta)&&(n=om(n,t.pendingProps,ia),n===null?e=!1:(t.stateNode=n,ea=t,ta=null,e=!0)),e||oa(t)),null;case 13:return Qc(e,t,n);case 4:return we(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=lo(t,null,r,n):Pc(e,t,r,n),t.child;case 11:return Fc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Wc(e,t),Pc(e,t,r,n),t.child;case 8:return Pc(e,t,t.pendingProps.children,n),t.child;case 12:return Pc(e,t,t.pendingProps.children,n),t.child;case 10:return cl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Sa(t),a=Ca(a),r=r(a),t.flags|=1,Pc(e,t,r,n),t.child;case 14:return Ic(e,t,t.type,t.pendingProps,n);case 15:return Lc(e,t,t.type,t.pendingProps,n);case 19:return sl(e,t,n);case 31:return Uc(e,t,n);case 22:return Rc(e,t,n,t.pendingProps);case 24:return Sa(t),r=Ca(ka),e===null?(a=Wa(),a===null&&(a=Xu,o=Aa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},po(t),ga(t,ka,a)):((e.lanes&n)!==0&&(mo(e,t),xo(t,null,null,n),bo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ga(t,ka,r),r!==a.cache&&ya(t,[ka],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ga(t,ka,r))),Pc(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:na&&Zi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Wc(e,t),Pc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function pl(e){e.flags|=4}function ml(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Xm(t,r):Xm(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(Ud())e.flags|=8192;else throw eo=Xa,Ja}}else e.flags&=-16777217}function hl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Zm(t)){if(Ud())e.flags|=8192;else throw eo=Xa,Ja}}function gl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:lt(),e.lanes|=t,ud|=t)}function _l(e,t){if(!na)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 vl(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 yl(e,t,n){var r=t.pendingProps;switch(Qi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vl(t),null;case 1:return vl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),_a(ka),Te(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(la(t)?pl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,da())),vl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(pl(t),o===null?(vl(t),ml(t,a,null,r,n)):(vl(t),hl(t,o))):o?o===e.memoizedState?(vl(t),t.flags&=-16777217):(pl(t),vl(t),hl(t,o)):(e=e.memoizedProps,e!==r&&pl(t),vl(t),ml(t,a,e,r,n)),null;case 27:if(De(t),n=Se.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return vl(t),t.subtreeFlags&=-33554433,null}e=be.current,la(t)?sa(t,e):(e=_m(a,r,n),t.stateNode=e,pl(t))}return vl(t),t.subtreeFlags&=-33554433,null;case 5:if(De(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return vl(t),t.subtreeFlags&=-33554433,null}if(o=be.current,la(t))sa(t,o);else{var s=dp(Se.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[xt]=t,o[St]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(ip(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&pl(t)}}return vl(t),t.subtreeFlags&=-33554433,ml(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Se.current,la(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ea,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[xt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||tp(e.nodeValue,n)),e||oa(t,!0)}else e=dp(e).createTextNode(r),e[xt]=t,t.stateNode=e}return vl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=la(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[xt]=t}else ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vl(t),e=!1}else n=da(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Fo(t),t):(Fo(t),null);if(t.flags&128)throw Error(i(558))}return vl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=la(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[xt]=t}else ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vl(t),a=!1}else a=da(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Fo(t),t):(Fo(t),null)}return Fo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),gl(t,t.updateQueue),vl(t),null);case 4:return Te(),e===null&&Gf(t.stateNode.containerInfo),t.flags|=67108864,vl(t),null;case 10:return _a(t.type),vl(t),null;case 19:if(Ro(t),r=t.memoizedState,r===null)return vl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)_l(r,!1);else{if(ad!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=zo(e),o!==null){for(t.flags|=128,_l(r,!1),e=o.updateQueue,t.updateQueue=e,gl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Mi(n,e),n=n.sibling;return Lo(t,Io.current&1|2),na&&Yi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Be()>gd&&(t.flags|=128,a=!0,_l(r,!1),t.lanes=4194304)}}else{if(!a){if(e=zo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,gl(t,e),_l(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!na)return vl(t),null}else 2*Be()-r.renderingStartTime>gd&&n!==536870912&&(t.flags|=128,a=!0,_l(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}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=Be(),e.sibling=null,o=Io.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||na?Lo(t,o):(n=o,ye(ko,t),ye(Io,n),Ao===null&&(Ao=t)),na&&Yi(t,r.treeForkCount),e}return vl(t),null;case 22:case 23:return Fo(t),Oo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(vl(t),t.subtreeFlags&6&&(t.flags|=8192)):vl(t),n=t.updateQueue,n!==null&&gl(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&&ve(Ua),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),_a(ka),vl(t),null;case 25:return null;case 30:return t.flags|=33554432,vl(t),null}throw Error(i(156,t.tag))}function bl(e,t){switch(Qi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _a(ka),Te(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return De(t),null;case 31:if(t.memoizedState!==null){if(Fo(t),t.alternate===null)throw Error(i(340));ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Fo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ro(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 Te(),null;case 10:return _a(t.type),null;case 22:case 23:return Fo(t),Oo(),e!==null&&ve(Ua),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return _a(ka),null;case 25:return null;default:return null}}function xl(e,t){switch(Qi(t),t.tag){case 3:_a(ka),Te();break;case 26:case 27:case 5:De(t);break;case 4:Te();break;case 31:t.memoizedState!==null&&Fo(t);break;case 13:Fo(t);break;case 19:Ro(t);break;case 10:_a(t.type);break;case 22:case 23:Fo(t),Oo(),e!==null&&ve(Ua);break;case 24:_a(ka)}}function Sl(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){pf(t,t.return,e)}}function Cl(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){pf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){pf(t,t.return,e)}}function wl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Co(t,n)}catch(t){pf(e,e.return,t)}}}function Tl(e,t,n){n.props=Sc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){pf(e,t,n)}}function El(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=V(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Ip(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Lp(e);p(e.child,!1,em,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){pf(e,t,n)}}function Dl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){pf(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){pf(e,t,n)}else n.current=null}}function Ol(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++)nm(e.stateNode,t[n])}function kl(e){for(var t=e.return;t!==null&&(Ml(t)&&nm(e.stateNode,t.stateNode),!jl(t));)t=t.return}function Al(e){for(var t=e.return;t!==null&&(Ml(t)&&rm(e.stateNode,t.stateNode),!jl(t));)t=t.return}function jl(e){return e.tag===5||e.tag===3||e.tag===27}function Ml(e){return e&&e.tag===7&&e.stateNode!==null}function Nl(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){pf(e,e.return,t)}}function Pl(e,t,n){try{var r=e.stateNode;op(r,e.type,n,t),r[St]=t}catch(t){pf(e,e.return,t)}}function Fl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&wp(e.type)||e.tag===4}function Il(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Fl(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&&wp(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 Ll(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=_n)),Ol(e,r),Gt=!0;else if(i!==4&&(i===27&&(Ol(e,r),r=null,wp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Ll(e,t,n,r),e=e.sibling;e!==null;)Ll(e,t,n,r),e=e.sibling}function Rl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Ol(e,r),Gt=!0;else if(i!==4&&(i===27&&(Ol(e,r),r=null,wp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Rl(e,t,n,r),e=e.sibling;e!==null;)Rl(e,t,n,r),e=e.sibling}function zl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);ip(t,r,n),t[xt]=e,t[St]=n}catch(t){pf(e,e.return,t)}}var Bl=!1,Vl=null;function Hl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Bl=!0)}var Ul=null;function Wl(){var e=Ul;return Ul=null,e}var Gl=0;function Kl(e,t,n,r,i){return Gl=0,ql(e.child,t,n,r,i)}function ql(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Ap(o);r.push(s),s.view&&(a=!0)}else a||Ap(o).view&&(a=!0);Bl=!0,Dp(o,Gl===0?t:t+`_`+Gl,n),Gl++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||ql(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Jl(e,t){for(;e!==null;)e.tag===5?Op(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Jl(e.child,t),e=e.sibling}function Yl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Yl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=H(t.default,t.share),t!==`none`&&(Kl(e,n,t,null,!1)||Jl(e.child,!1))}e=e.sibling}}function Xl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=V(r,n),a=H(r.default,n.paired?r.share:r.enter);a===`none`?Yl(e):Kl(e,i,a,null,!1)?(Yl(e),n.paired||t||Nd(e,r.onEnter)):Jl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Xl(e,t),e=e.sibling;else Yl(e)}function Zl(e){if(Vl!==null&&Vl.size!==0){var t=Vl;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=H(n.default,n.share);if(a!==`none`&&(Kl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Nd(e,n.onShare)):Jl(e.child,!1)),t.delete(r),t.size===0)break}}}Zl(e)}e=e.sibling}}}function Ql(e){if(e.tag===30){var t=e.memoizedProps,n=V(t,e.stateNode),r=Vl===null?void 0:Vl.get(n),i=H(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Kl(e,n,i,null,!1)?r===void 0?Nd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Vl.delete(n),Nd(e,t.onShare)):Jl(e.child,!1)),Vl!==null&&Zl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Ql(e),e=e.sibling;else Vl!==null&&Zl(e)}function $l(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=V(t,e.stateNode);t=H(t.default,t.update),e.flags&=-5,t!==`none`&&Kl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&$l(e);e=e.sibling}}function eu(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,Jl(e.child,!1))}eu(e)}e=e.sibling}}function tu(e){if(e.tag===30)e.stateNode.paired=null,Jl(e.child,!1),eu(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)tu(e),e=e.sibling;else eu(e)}function nu(e){for(e=e.child;e!==null;)e.tag===30?Jl(e.child,!1):e.subtreeFlags&33554432&&nu(e),e=e.sibling}function ru(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Gl<a.length){var l=a[Gl],u=Ap(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&&Dp(c,Gl===0?n:n+`_`+Gl,i),s&&e.flags&4||(Ul===null&&(Ul=[]),Ul.push(c,Gl===0?r:r+`_`+Gl,t.memoizedProps)),Gl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:ru(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function iu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=V(n,r),a=H(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(jp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Gl=0,i=ru(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Nd(e,n.onUpdate))}else e.subtreeFlags&33554432&&iu(e,t);e=e.sibling}}var au=!1,ou=!1,su=!1,cu=!1,W=typeof WeakSet==`function`?WeakSet:Set,lu=null,uu=!1,du=!1,fu=!1,pu=!1;function mu(e,t,n){if(e=e.containerInfo,lp=vh,e=Kr(e),qr(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(up={focusedElem:e,selectionRange:r},vh=!1,n=(n&335544064)===n,lu=t,t=n?9270:1024;lu!==null;){if(e=lu,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&&Hl(e),G(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Ql(r),G(n);continue}if(r!==null&&r.memoizedState!==null){n&&Hl(e),G(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,lu=r):(n&&$l(e),G(n))}}Vl=null}function G(e){for(;lu!==null;){var t=lu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=Sc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){pf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)im(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:im(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=V(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=H(a.default,a.update),a!==`none`&&Kl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,lu=r;break}lu=t.return}}function hu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Fu(e,n),r&4&&Sl(5,n);break;case 1:if(Fu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){pf(n,n.return,e)}else{var i=Sc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){pf(n,n.return,e)}}}r&64&&wl(n),r&512&&El(n,n.return);break;case 3:if(Fu(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{Co(e,t)}catch(e){pf(n,n.return,e)}}break;case 27:t===null&&r&4&&zl(n);case 26:case 5:Fu(e,n),t===null&&r&4&&Nl(n),r&512&&El(n,n.return);break;case 12:Fu(e,n);break;case 31:Fu(e,n),r&4&&wu(e,n);break;case 13:Fu(e,n),r&4&&Tu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=_f.bind(null,n),um(e,n))));break;case 22:if(r=n.memoizedState!==null||au,!r){var a=t!==null&&t.memoizedState!==null||ou;t=au,i=ou,au=r,(ou=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Lu(e,n,r)):Fu(e,n),au=t,ou=i}break;case 30:Fu(e,n),r&512&&El(n,n.return);break;case 7:r&512&&El(n,n.return);default:Fu(e,n)}}function gu(e,t){for(e=e.child;e!==null;)_u(e,t),e=e.sibling}function _u(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){pf(e,e.return,t)}vu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Gt=!0}catch(t){pf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Ep(s,!0):Ep(e.stateNode,!1)}catch(t){pf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&gu(e,t);break;default:gu(e,t)}}function vu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:_u(n,r);break a;case 22:n.memoizedState===null&&vu(n,r);break a;default:vu(n,r)}}e=e.sibling}}function yu(e){var t=e.alternate;t!==null&&(e.alternate=null,yu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&At(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 bu=null,xu=!1;function Su(e,t,n){for(n=n.child;n!==null;)Cu(e,t,n),n=n.sibling}function Cu(e,t,n){if(Xe&&typeof Xe.onCommitFiberUnmount==`function`)try{Xe.onCommitFiberUnmount(Ye,n)}catch{}switch(n.tag){case 26:ou||Dl(n,t),Su(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!ou&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ou||Dl(n,t),Al(n);var r=bu,i=xu;wp(n.type)&&(bu=n.stateNode,xu=!1),Su(e,t,n),vm(n.stateNode,n.type,n.memoizedProps),bu=r,xu=i;break;case 5:ou||Dl(n,t),Al(n);case 6:if(n.tag===6&&Al(n),r=bu,i=xu,bu=null,Su(e,t,n),bu=r,xu=i,bu!==null){if(xu)try{(bu.nodeType===9?bu.body:bu.nodeName===`HTML`?bu.ownerDocument.body:bu).removeChild(n.stateNode),Gt=!0}catch(e){pf(n,t,e)}else try{bu.removeChild(n.stateNode),Gt=!0}catch(e){pf(n,t,e)}}break;case 18:bu!==null&&(xu?(e=bu,Tp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Wh(e)):Tp(bu,n.stateNode));break;case 4:r=bu,i=xu,bu=n.stateNode.containerInfo,xu=!0,Su(e,t,n),bu=r,xu=i;break;case 0:case 11:case 14:case 15:Cl(2,n,t),ou||Cl(4,n,t),Su(e,t,n);break;case 1:ou||(Dl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Tl(n,t,r)),Su(e,t,n);break;case 21:Su(e,t,n);break;case 22:ou=(r=ou)||n.memoizedState!==null,Su(e,t,n),ou=r;break;case 30:Dl(n,t),Su(e,t,n);break;case 7:ou||Dl(n,t),Su(e,t,n);break;default:Su(e,t,n)}}function wu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wh(e)}catch(e){pf(t,t.return,e)}}}function Tu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wh(e)}catch(e){pf(t,t.return,e)}}function Eu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new W),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new W),t;default:throw Error(i(435,e.tag))}}function Du(e,t){var n=Eu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=vf.bind(null,e,t);t.then(r,r)}})}function Ou(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(wp(l.type)){bu=l.stateNode,xu=!1;break a}break;case 5:bu=l.stateNode,xu=!1;break a;case 3:case 4:bu=l.stateNode.containerInfo,xu=!0;break a}l=l.return}if(bu===null)throw Error(i(160));Cu(s,c,o),bu=null,xu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Au(t,e,n),t=t.sibling}var ku=null;function Au(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Ou(t,e,n),ju(e),a&4&&(Cl(3,e,e.return),Sl(3,e),Cl(5,e,e.return));break;case 1:Ou(t,e,n),ju(e),a&512&&(ou||r===null||Dl(r,r.return)),a&64&&au&&(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(o=ku,Ou(t,e,n),ju(e),a&512&&(ou||r===null||Dl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(au)e.stateNode=mp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Ot]||r[xt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),ip(r,t,n),r[xt]=e,Ft(r),t=r;break a;case`link`:if(o=qm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],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)){o.splice(s,1);break b}}r=a.createElement(t),ip(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=qm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],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)){o.splice(s,1);break b}}r=a.createElement(t),ip(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[xt]=e,Ft(r),t=r}e.stateNode=t}}else au||Jm(o,e.type,e.stateNode)}else e.stateNode=Hm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Pl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||ou||t.parentNode.removeChild(t)):a.count--,n===null?au||Jm(o,e.type,e.stateNode):Hm(o,n,e.memoizedProps))}break;case 27:Ou(t,e,n),ju(e),a&512&&(ou||r===null||Dl(r,r.return)),r!==null&&a&4&&Pl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=su,su=!1,Ou(t,e,n),su=o,ju(e),a&512&&(ou||r===null||Dl(r,r.return)),e.flags&32){t=e.stateNode;try{ln(t,``),Gt=!0}catch(t){pf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Pl(e,t,r===null?t:r.memoizedProps)),a&1024&&(cu=!0);break;case 6:if(Ou(t,e,n),ju(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Gt=!0}catch(t){pf(e,e.return,t)}}break;case 3:if(Gt=!1,Km=null,o=ku,ku=Sm(t.containerInfo),Ou(t,e,n),ku=o,ju(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Wh(t.containerInfo)}catch(t){pf(e,e.return,t)}cu&&(cu=!1,Mu(e)),Gt=!1;break;case 4:a=su,su=au,r=Kt(),o=ku,ku=Sm(e.stateNode.containerInfo),Ou(t,e,n),ju(e),ku=o,Gt&&du&&(fu=!0),Gt=r,su=a;break;case 12:Ou(t,e,n),ju(e);break;case 31:Ou(t,e,n),ju(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 13:Ou(t,e,n),ju(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(md=Be()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=au,l=ou,u=su;au=c||o,su=u||o,ou=l||s,Ou(t,e,n),ou=l,su=u,au=c,ju(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||au||ou||(t=s||ou,n=au,r=ou,au=o||au,ou=t,Iu(e,2),au=n,ou=r),!o&&su||gu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Du(e,n))));break;case 19:Ou(t,e,n),ju(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 30:a&512&&(ou||r===null||Dl(r,r.return)),a=Kt(),o=du,s=(n&335544064)===n,c=e.memoizedProps,du=s&&H(c.default,c.update)!==`none`,Ou(t,e,n),ju(e),s&&r!==null&&Gt&&(e.flags|=4),du=o,Gt=a;break;case 21:break;case 7:a&512&&(ou||r===null||Dl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Ou(t,e,n),ju(e)}}function ju(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Fl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Ml(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(jl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Rl(e,Il(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(ln(l,``),n.flags&=-33),Rl(e,Il(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Ll(e,Il(e),u,s);break;default:throw Error(i(161))}}catch(t){pf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,vh=!0,t.reset(),vh=!1),e=e.sibling}}function Nu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Pu(t,e),t=t.sibling;else iu(t,!1)}function Pu(e,t){var n=e.alternate;if(n===null)Xl(e,!1);else switch(e.tag){case 3:if(pu=uu=!1,Wl(),Nu(t,e),!uu&&!fu){if(e=Ul,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Op(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`})),pu=!0}Ul=null;break;case 5:Nu(t,e);break;case 4:r=uu,uu=!1,Nu(t,e),uu&&(fu=!0),uu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Nu(t,e):Xl(e,!1));break;case 30:r=uu,i=Wl(),uu=!1,Nu(t,e),uu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=V(a,o),o=V(n.memoizedProps,o);var s=H(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Gl=0,t=ru(e,n,t,o,s,a,!0),Gl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Nd(e,e.memoizedProps.onUpdate),Ul=i):i!==null&&(i.push.apply(i,Ul),Ul=i),uu=e.flags&32?!0:r;break;default:Nu(t,e)}}function Fu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hu(e,t.alternate,t),t=t.sibling}function Iu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Cl(4,n,n.return),Iu(n,r);break;case 1:Dl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Tl(n,n.return,i),Iu(n,r);break;case 27:r&2&&vm(n.stateNode,n.type,n.memoizedProps);case 5:Dl(n,n.return),n.tag!==5&&n.tag!==27||Al(n),Iu(n,r);break;case 6:Al(n);break;case 26:Dl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||ou||i.parentNode.removeChild(i),Iu(n,r);break;case 22:n.memoizedState===null&&Iu(n,r);break;case 30:Dl(n,n.return),Iu(n,r);break;case 7:Dl(n,n.return);default:Iu(n,r)}e=e.sibling}}function Lu(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:Lu(i,a,n),Sl(4,a);break;case 1:if(Lu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){pf(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++)So(l[i],c)}catch(e){pf(r,r.return,e)}}s&&o&64&&wl(a),El(a,a.return);break;case 27:n&2&&zl(a);case 5:a.tag!==5&&a.tag!==27||kl(a),Lu(i,a,n),s&&r===null&&o&4&&Nl(a),El(a,a.return);break;case 6:kl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||au||Jm(Sm(c.ownerDocument),a.type,c),Lu(i,a,n),s&&r===null&&o&4&&Nl(a),El(a,a.return);break;case 12:Lu(i,a,n);break;case 31:Lu(i,a,n),s&&o&4&&wu(i,a);break;case 13:Lu(i,a,n),s&&o&4&&Tu(i,a);break;case 22:a.memoizedState===null&&Lu(i,a,n),El(a,a.return);break;case 30:Lu(i,a,n),El(a,a.return);break;case 7:El(a,a.return);default:Lu(i,a,n)}t=t.sibling}}function K(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&&ja(n))}function Ru(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ja(e))}function zu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)q(e,t,n,r),t=t.sibling;else i&&nu(t)}function q(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&tu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:zu(e,t,n,r),a&2048&&Sl(9,t);break;case 1:zu(e,t,n,r);break;case 3:zu(e,t,n,r),i&&pu&&(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&&ja(a)));break;case 12:if(a&2048){zu(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){pf(t,t.return,e)}}else zu(e,t,n,r);break;case 31:zu(e,t,n,r);break;case 13:zu(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&&tu(t),o._visibility&2?zu(e,t,n,r):(o._visibility|=2,J(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&tu(s),o._visibility&2?zu(e,t,n,r):Bu(e,t)),a&2048&&K(s,t);break;case 24:zu(e,t,n,r),a&2048&&Ru(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Jl(a.child,!0),Jl(t.child,!0))),zu(e,t,n,r);break;default:zu(e,t,n,r)}}function J(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:J(a,o,s,c,i),Sl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,J(a,o,s,c,i)):u._visibility&2?J(a,o,s,c,i):Bu(a,o),i&&l&2048&&K(o.alternate,o);break;case 24:J(a,o,s,c,i),i&&l&2048&&Ru(o.alternate,o);break;default:J(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&&K(r.alternate,r);break;case 24:Bu(n,r),i&2048&&Ru(r.alternate,r);break;default:Bu(n,r)}t=t.sibling}}var Vu=8192;function Y(e,t,n){if(e.subtreeFlags&Vu)for(e=e.child;e!==null;)Hu(e,t,n),e=e.sibling}function Hu(e,t,n){switch(e.tag){case 26:Y(e,t,n),e.flags&Vu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&$m(n,e)):eh(n,ku,e.memoizedState,e.memoizedProps));break;case 5:Y(e,t,n),e.flags&Vu&&(e=e.stateNode,(t&335544128)===t&&$m(n,e));break;case 3:case 4:var r=ku;ku=Sm(e.stateNode.containerInfo),Y(e,t,n),ku=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Vu,Vu=16777216,Y(e,t,n),Vu=r):Y(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,Vl===null&&(Vl=new Map),Vl.set(r,i)}Y(e,t,n);break;default:Y(e,t,n)}}function Uu(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 Wu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];lu=r,Ku(r,e)}Uu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Gu(e),e=e.sibling}function Gu(e){switch(e.tag){case 0:case 11:case 15:Wu(e),e.flags&2048&&Cl(9,e,e.return);break;case 3:Wu(e);break;case 12:Wu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,X(e)):Wu(e);break;default:Wu(e)}}function X(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];lu=r,Ku(r,e)}Uu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Cl(8,t,t.return),X(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,X(t));break;default:X(t)}e=e.sibling}}function Ku(e,t){for(;lu!==null;){var n=lu;switch(n.tag){case 0:case 11:case 15:Cl(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:ja(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,lu=r;else a:for(n=e;lu!==null;){r=lu;var i=r.sibling,a=r.return;if(yu(r),r===n){lu=null;break a}if(i!==null){i.return=a,lu=i;break a}lu=a}}}var qu={getCacheForType:function(e){var t=Ca(ka),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ca(ka).controller.signal}},Ju=typeof WeakMap==`function`?WeakMap:Map,Yu=0,Xu=null,Zu=null,Qu=0,$u=0,ed=null,td=!1,nd=!1,rd=!1,id=0,ad=0,od=0,sd=0,cd=0,ld=0,ud=0,dd=null,fd=null,pd=!1,md=0,hd=0,gd=1/0,_d=null,vd=null,yd=0,bd=null,xd=null,Sd=0,Cd=0,wd=null,Td=null,Ed=null,Dd=null,Od=null,kd=0,Ad=null;function jd(){return Yu&2&&Qu!==0?Qu&-Qu:L.T===null?vt():Pf()}function Md(){if(ld===0){if(!(Qu&536870912)||na){var e=nt;nt<<=1,!(nt&3932160)&&(nt=262144),ld=e}else ld=536870912}return e=ko.current,e!==null&&(e.flags|=32),ld}function Nd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Ip(V(e.memoizedProps,n))),Dd===null&&(Dd=[]),Dd.push(t.bind(null,r))}}function Pd(e,t,n){(e===Xu&&($u===2||$u===9)||e.cancelPendingCommit!==null)&&(Vd(e,0),Rd(e,Qu,ld,!1)),dt(e,n),Yu&2&&e===Xu||(e===Xu&&(!(Yu&2)&&(sd|=n),ad===4&&Rd(e,Qu,ld,!1)),Ef(e))}function Fd(e,t,n){if(Yu&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ot(e,t),a=r?Z(e,t):qd(e,t,!0),o=r;do{if(a===0){nd&&!r&&Rd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Ld(n))a=qd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=dd;var l=c.current.memoizedState.isDehydrated;if(l&&(Vd(c,s).flags|=256),s=qd(c,s,!1),s!==2&&s!==6){if(rd&&!l){c.errorRecoveryDisabledLanes|=o,sd|=o,a=4;break a}o=fd,fd=a,o!==null&&(fd===null?fd=o:fd.push.apply(fd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Vd(e,0),Rd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Rd(r,t,ld,!td);break a;case 2:fd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=md+300-Be(),10<a)){if(Rd(r,t,ld,!td),at(r,0,!0)!==0)break a;Sd=t,r.timeoutHandle=vp(Id.bind(null,r,n,fd,_d,pd,t,ld,sd,ud,td,o,`Throttled`,-0,0),a);break a}Id(r,n,fd,_d,pd,t,ld,sd,ud,td,o,null,-0,0)}break}}while(1);Ef(e)}function Id(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:_n},Vl=null,Hu(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=ih.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?md-Be():(a&4194048)===a?hd-Be():0,m=nh(d,m),m!==null)?(Sd=a,e.cancelPendingCommit=m(tf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Rd(e,a,o,!l)):tf(e,t,a,n,r,i,o,s,c,l,u,d)}function Ld(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(!Br(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 Rd(e,t,n,r){t=st(e,t),t&=~cd,t&=~sd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Qe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&pt(e,n,t)}function zd(){return Yu&6?!0:(Df(0,!1),!1)}function Bd(){if(Zu!==null){if($u===0)var e=Zu.return;else e=Zu,ha=ma=null,is(e),ro=null,io=0,e=Zu;for(;e!==null;)xl(e.alternate,e),e=e.return;Zu=null}}function Vd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,yp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Sd=0,Bd(),Xu=e,Zu=n=ji(e.current,null),Qu=t,$u=0,ed=null,td=!1,nd=ot(e,t),rd=!1,ud=ld=cd=sd=od=ad=0,fd=dd=null,pd=!1,id=st(e,t),xi(),n}function Hd(e,t){U=null,L.H=mc,t===qa||t===Ya?(t=to(),$u=3):t===Ja?(t=to(),$u=4):$u=t===Mc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ed=t,Zu===null&&(ad=1,Ec(e,zi(t,e.current)))}function Ud(){var e=ko.current;return e===null?!0:(Qu&4194048)===Qu?Ao===null:(Qu&62914560)===Qu||Qu&536870912?e===Ao:!1}function Wd(){var e=L.H;return L.H=mc,e===null?mc:e}function Gd(){var e=L.A;return L.A=qu,e}function Kd(){ad=4,td||(Qu&4194048)!==Qu&&ko.current!==null||(nd=!0),!(od&134217727)&&!(sd&134217727)||Xu===null||Rd(Xu,Qu,ld,!1)}function qd(e,t,n){var r=Yu;Yu|=2;var i=Wd(),a=Gd();(Xu!==e||Qu!==t)&&(_d=null,Vd(e,t)),t=!1;var o=ad;a:do try{if($u!==0&&Zu!==null){var s=Zu,c=ed;switch($u){case 8:Bd(),o=6;break a;case 3:case 2:case 9:case 6:ko.current===null&&(t=!0);var l=$u;if($u=0,ed=null,Qd(e,s,c,l),n&&nd){o=0;break a}break;default:l=$u,$u=0,ed=null,Qd(e,s,c,l)}}Jd(),o=ad;break}catch(t){Hd(e,t)}while(1);return t&&e.shellSuspendCounter++,ha=ma=null,Yu=r,L.H=i,L.A=a,Zu===null&&(Xu=null,Qu=0,xi()),o}function Jd(){for(;Zu!==null;)Xd(Zu)}function Z(e,t){var n=Yu;Yu|=2;var r=Wd(),a=Gd();Xu!==e||Qu!==t?(_d=null,gd=Be()+500,Vd(e,t)):nd=ot(e,t);a:do try{if($u!==0&&Zu!==null){t=Zu;var o=ed;b:switch($u){case 1:$u=0,ed=null,Qd(e,t,o,1);break;case 2:case 9:if(Za(o)){$u=0,ed=null,Zd(t);break}t=function(){$u!==2&&$u!==9||Xu!==e||($u=7),Ef(e)},o.then(t,t);break a;case 3:$u=7;break a;case 4:$u=5;break a;case 7:Za(o)?($u=0,ed=null,Zd(t)):($u=0,ed=null,Qd(e,t,o,7));break;case 5:var s=null;switch(Zu.tag){case 26:s=Zu.memoizedState;case 5:case 27:var c=Zu;if(s?Zm(s):c.stateNode.complete){$u=0,ed=null;var l=c.sibling;if(l!==null)Zu=l;else{var u=c.return;u===null?Zu=null:(Zu=u,$d(u))}break b}}$u=0,ed=null,Qd(e,t,o,5);break;case 6:$u=0,ed=null,Qd(e,t,o,6);break;case 8:Bd(),ad=6;break a;default:throw Error(i(462))}}Yd();break}catch(t){Hd(e,t)}while(1);return ha=ma=null,L.H=r,L.A=a,Yu=n,Zu===null?(Xu=null,Qu=0,xi(),ad):0}function Yd(){for(;Zu!==null&&!Re();)Xd(Zu)}function Xd(e){var t=fl(e.alternate,e,id);e.memoizedProps=e.pendingProps,t===null?$d(e):Zu=t}function Zd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Kc(n,t,t.pendingProps,t.type,void 0,Qu);break;case 11:t=Kc(n,t,t.pendingProps,t.type.render,t.ref,Qu);break;case 5:is(t);var r=t;r===ea&&(na?(ca(r),r.tag===5&&r.stateNode!=null&&(ta=r.stateNode)):(ca(r),na=!0));default:xl(n,t),t=Zu=Mi(t,id),t=fl(n,t,id)}e.memoizedProps=e.pendingProps,t===null?$d(e):Zu=t}function Qd(e,t,n,r){ha=ma=null,is(t),ro=null,io=0;var i=t.return;try{if(jc(e,i,t,n,Qu)){ad=1,Ec(e,zi(n,e.current)),Zu=null;return}}catch(t){if(i!==null)throw Zu=i,t;ad=1,Ec(e,zi(n,e.current)),Zu=null;return}t.flags&32768?(na||r===1?e=!0:nd||Qu&536870912?e=!1:(td=e=!0,(r===2||r===9||r===3||r===6)&&(r=ko.current,r!==null&&r.tag===13&&(r.flags|=16384))),ef(t,e)):$d(t)}function $d(e){var t=e;do{if(t.flags&32768){ef(t,td);return}e=t.return;var n=yl(t.alternate,t,id);if(n!==null){Zu=n;return}if(t=t.sibling,t!==null){Zu=t;return}Zu=t=e}while(t!==null);ad===0&&(ad=5)}function ef(e,t){do{var n=bl(e.alternate,e);if(n!==null){n.flags&=32767,Zu=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Zu=e;return}Zu=e=n}while(e!==null);ad=6,Zu=null}function tf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do uf();while(yd!==0);if(Yu&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===Xu&&(Zu=Xu=null,Qu=0),xd=t,bd=e,Sd=n,wd=a,Td=r,nf(e,t,n,s,c,l,f)}}function nf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Cd=s,s|=bi,ft(e,n,s,r,i,a),Dd=null,(n&335544064)===n?(Od=Pa(e),r=10262):(Od=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,yf(We,function(){return df(),null})):(e.callbackNode=null,e.callbackPriority=0),Bl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=L.T,L.T=null,i=R.p,R.p=2,a=Yu,Yu|=4;try{mu(e,t,n)}finally{Yu=a,R.p=i,L.T=r}}yd=1,Bl?Ed=Pp(o,e.containerInfo,Od,of,sf,af,cf,df,rf,null,null):(of(),sf(),cf())}function rf(e){if(yd!==0){var t=bd.onRecoverableError;t(e,{componentStack:null})}}function af(){yd===3&&(yd=0,Pu(xd,bd),yd=4)}function of(){if(yd===1){yd=0;var e=bd,t=xd,n=Sd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=L.T,L.T=null;var i=R.p;R.p=2;var a=Yu;Yu|=4;try{du=fu=!1,Au(t,e,n),n=up;var o=Kr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Gr(s.ownerDocument.documentElement,s)){if(c!==null&&qr(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 _=Wr(s,h),v=Wr(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}}vh=!!lp,up=lp=null}finally{Yu=a,R.p=i,L.T=r}}e.current=t,yd=2}}function sf(){if(yd===2){yd=0;var e=bd,t=xd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=L.T,L.T=null;var r=R.p;R.p=2;var i=Yu;Yu|=4;try{hu(e,t.alternate,t)}finally{Yu=i,R.p=r,L.T=n}}yd=3}}function cf(){if(yd===4||yd===3){yd=0;var e=Ed;Ed=null,ze();var t=bd,n=xd,r=Sd,i=Td,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?yd=5:(yd=0,xd=bd=null,lf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(vd=null),_t(r),n=n.stateNode,Xe&&typeof Xe.onCommitFiberRoot==`function`)try{Xe.onCommitFiberRoot(Ye,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=L.T,a=R.p,R.p=2,L.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{L.T=n,R.p=a}}if(i=Dd,o=Od,Od=null,i!==null&&(Dd=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);Sd&3&&uf(),Ef(t),a=t.pendingLanes,r&261930&&a&42?t===Ad?kd++:(kd=0,Ad=t):(kd=0,Ad=null),Df(0,!1)}}function lf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ja(t)))}function uf(){return Ed!==null&&(Ed.skipTransition(),Ed=null),of(),sf(),cf(),df()}function df(){if(yd!==5)return!1;var e=bd,t=Cd;Cd=0;var n=_t(Sd),r=L.T,a=R.p;try{R.p=32>n?32:n,L.T=null,n=wd,wd=null;var o=bd,s=Sd;if(yd=0,xd=bd=null,Sd=0,Yu&6)throw Error(i(331));var c=Yu;if(Yu|=4,Gu(o.current),q(o,o.current,s,n),Yu=c,Df(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot==`function`)try{Xe.onPostCommitFiberRoot(Ye,o)}catch{}return!0}finally{R.p=a,L.T=r,lf(e,t)}}function ff(e,t,n){t=zi(n,t),t=Oc(e.stateNode,t,2),e=go(e,t,2),e!==null&&(dt(e,2),Ef(e))}function pf(e,t,n){if(e.tag===3)ff(e,e,n);else for(;t!==null;){if(t.tag===3){ff(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(vd===null||!vd.has(r))){e=zi(n,e),n=kc(2),r=go(t,n,2),r!==null&&(Ac(n,r,t,e),dt(r,2),Ef(r));break}}t=t.return}}function mf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ju;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)||(rd=!0,i.add(n),e=hf.bind(null,e,t,n),t.then(e,e))}function hf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Xu===e&&(Qu&n)===n&&(ad===4||ad===3&&(Qu&62914560)===Qu&&300>Be()-md?Yu&2?cd|=n:Vd(e,0):cd|=n,ud===Qu&&(ud=0)),Ef(e)}function gf(e,t){t===0&&(t=lt()),e=wi(e,t),e!==null&&(dt(e,t),Ef(e))}function _f(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gf(e,n)}function vf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),gf(e,n)}function yf(e,t){return Ie(e,t)}var bf=null,xf=null,Sf=!1,Cf=!1,wf=!1,Tf=0;function Ef(e){e!==xf&&e.next===null&&(xf===null?bf=xf=e:xf=xf.next=e),Cf=!0,Sf||(Sf=!0,Nf())}function Df(e,t){if(!wf&&Cf){wf=!0;do for(var n=!1,r=bf;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-Qe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Mf(r,a))}else a=Qu,a=at(r,r===Xu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ot(r,a)||(n=!0,Mf(r,a))}r=r.next}while(n);wf=!1}}function Of(){kf()}function kf(){Cf=Sf=!1;var e=0;Tf!==0&&_p()&&(e=Tf);for(var t=Be(),n=null,r=bf;r!==null;){var i=r.next,a=Af(r,t);a===0?(r.next=null,n===null?bf=i:n.next=i,i===null&&(xf=n)):(n=r,(e!==0||a&3)&&(Cf=!0)),r=i}yd!==0&&yd!==5||Df(e,!1),Tf!==0&&(Tf=0)}function Af(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Qe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ct(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Xu,n=Qu,n=at(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&($u===2||$u===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Le(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ot(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Le(r),_t(n)){case 2:case 8:n=Ue;break;case 32:n=We;break;case 268435456:n=Ke;break;default:n=We}return r=jf.bind(null,e),n=Ie(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Le(r),e.callbackPriority=2,e.callbackNode=null,2}function jf(e,t){if(yd!==0&&yd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(uf()&&e.callbackNode!==n)return null;var r=Qu;return r=at(e,e===Xu?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Fd(e,r,t),Af(e,Be()),e.callbackNode!=null&&e.callbackNode===n?jf.bind(null,e):null)}function Mf(e,t){if(uf())return null;Fd(e,t,!0)}function Nf(){Sp(function(){Yu&6?Ie(He,Of):kf()})}function Pf(){if(Tf===0){var e=La;e===0&&(e=z,z<<=1,!(z&261888)&&(z=256)),Tf=e}return Tf}function Ff(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:gn(e)}function If(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Ff((i[St]||null).action),o=r.submitter;o&&(t=(t=o[St]||null)?Ff(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Rn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Tf!==0){var e=new FormData(i,o);ec(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),ec(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Lf=0;Lf<pi.length;Lf++){var Rf=pi[Lf];mi(Rf.toLowerCase(),`on`+(Rf[0].toUpperCase()+Rf.slice(1)))}mi(ai,`onAnimationEnd`),mi(oi,`onAnimationIteration`),mi(si,`onAnimationStart`),mi(`dblclick`,`onDoubleClick`),mi(`focusin`,`onFocus`),mi(`focusout`,`onBlur`),mi(ci,`onTransitionRun`),mi(li,`onTransitionStart`),mi(ui,`onTransitionCancel`),mi(di,`onTransitionEnd`),Bt(`onMouseEnter`,[`mouseout`,`mouseover`]),Bt(`onMouseLeave`,[`mouseout`,`mouseover`]),Bt(`onPointerEnter`,[`pointerout`,`pointerover`]),Bt(`onPointerLeave`,[`pointerout`,`pointerover`]),zt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),zt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),zt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),zt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),zt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),zt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var zf=`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(` `),Bf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(zf));function Vf(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){_i(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){_i(e)}i.currentTarget=null,a=c}}}}function Hf(e,t){var n=t[wt];n===void 0&&(n=t[wt]=new Set);var r=e+`__bubble`;n.has(r)||(Kf(t,e,2,!1),n.add(r))}function Uf(e,t,n){var r=0;t&&(r|=4),Kf(n,e,r,t)}var Wf=`_reactListening`+Math.random().toString(36).slice(2);function Gf(e){if(!e[Wf]){e[Wf]=!0,Lt.forEach(function(t){t!==`selectionchange`&&(Bf.has(t)||Uf(t,!1,e),Uf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wf]||(t[Wf]=!0,Uf(`selectionchange`,!1,t))}}function Kf(e,t,n,r){switch(Th(t)){case 2:var i=yh;break;case 8:i=bh;break;default:i=xh}n=i.bind(null,t,n,e),i=void 0,!Dn||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 qf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=jt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}wn(function(){var r=a,i=yn(n),s=[];a:{var c=fi.get(e);if(c!==void 0){var l=Rn,u=e;switch(e){case`keypress`:if(Nn(n)===0)break a;case`keydown`:case`keyup`:l=nr;break;case`focusin`:u=`focus`,l=qn;break;case`focusout`:u=`blur`,l=qn;break;case`beforeblur`:case`afterblur`:l=qn;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`:l=Gn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=ar;break;case ai:case oi:case si:l=Jn;break;case di:l=or;break;case`scroll`:case`scrollend`:l=Bn;break;case`wheel`:l=sr;break;case`copy`:case`cut`:case`paste`:l=Yn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=rr;break;case`submit`:l=ir;break;case`toggle`:case`beforetoggle`:l=cr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;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=Tn(m,p),g!=null&&d.push(Jf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==vn&&(u=n.relatedTarget||n.fromElement)&&(jt(u)||u[Ct]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?jt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Gn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=rr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Nt(c),h=l==null?u:Nt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,jt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,Xf):null,c!==null&&Zf(s,u,c,d,!1),l!==null&&f!==null&&Zf(s,f,l,d,!0)))}a:{if(c=r?Nt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Or;else if(Sr(c)){if(kr)_=Rr;else{_=Ir;var v=Fr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&pn(r.elementType)&&(_=Or):_=Lr;if(_&&=_(e,r)){Cr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Nt(r):window,e){case`focusin`:(Sr(v)||v.contentEditable===`true`)&&(Yr=v,Xr=r,Zr=null);break;case`focusout`:Zr=Xr=Yr=null;break;case`mousedown`:Qr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Qr=!1,$r(s,n,i);break;case`selectionchange`:if(Jr)break;case`keydown`:case`keyup`:$r(s,n,i)}var y;if(ur)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 vr?gr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(pr&&n.locale!==`ko`&&(vr||b!==`onCompositionStart`?b===`onCompositionEnd`&&vr&&(y=Mn()):(kn=i,An=`value`in kn?kn.value:kn.textContent,vr=!0)),v=Yf(r,b),0<v.length&&(b=new Xn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=_r(n),y!==null&&(b.data=y)))),(y=fr?yr(e,n):br(e,n))&&(b=Yf(r,`onBeforeInput`),0<b.length&&(v=new Xn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),If(s,e,r,n,i)}Vf(s,t)})}function Jf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yf(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=Tn(e,n),i!=null&&r.unshift(Jf(e,i,a)),i=Tn(e,t),i!=null&&r.push(Jf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Xf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Zf(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=Tn(n,a),l!=null&&o.unshift(Jf(n,l,c))):i||(l=Tn(n,a),l!=null&&o.push(Jf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Qf=/\r\n?/g,$f=/\u0000|\uFFFD/g;function ep(e){return(typeof e==`string`?e:``+e).replace(Qf,`
9
+ `).replace($f,``)}function tp(e,t){return t=ep(t),ep(e)===t}function np(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||ln(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&ln(e,``+r);else return;break;case`className`:Jt(e,`class`,r);break;case`tabIndex`:Jt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Jt(e,n,r);break;case`style`:fn(e,r,o);return;case`data`:if(t!==`object`){Jt(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=gn(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 o==`function`&&(n===`formAction`?(t!==`input`&&np(e,t,`name`,a.name,a,null),np(e,t,`formEncType`,a.formEncType,a,null),np(e,t,`formMethod`,a.formMethod,a,null),np(e,t,`formTarget`,a.formTarget,a,null)):(np(e,t,`encType`,a.encType,a,null),np(e,t,`method`,a.method,a,null),np(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=gn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=_n);return;case`onScroll`:r!=null&&Hf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Hf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__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=gn(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`:Hf(`beforetoggle`,e),Hf(`toggle`,e),qt(e,`popover`,r);break;case`xlinkActuate`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:qt(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=mn.get(n)||n,qt(e,n,r);else return}Gt=!0}function rp(e,t,n,r,a,o){switch(n){case`style`:fn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)ln(e,r);else if(typeof r==`number`||typeof r==`bigint`)ln(e,``+r);else return;break;case`onScroll`:r!=null&&Hf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Hf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=_n);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Rt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[St]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Gt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):qt(e,n,r)}return}Gt=!0}function ip(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Hf(`error`,e),Hf(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:np(e,t,o,s,n,null)}}a&&np(e,t,`srcSet`,n.srcSet,n,null),r&&np(e,t,`src`,n.src,n,null);return;case`input`:Hf(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:np(e,t,r,d,n,null)}}rn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Hf(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:np(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&on(e,!!r,n,!0):on(e,!!r,t,!1);return;case`textarea`:for(s in Hf(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:np(e,t,s,c,n,null)}cn(e,r,a,o);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:np(e,t,l,r,n,null)}return;case`dialog`:Hf(`beforetoggle`,e),Hf(`toggle`,e),Hf(`cancel`,e),Hf(`close`,e);break;case`iframe`:case`object`:Hf(`load`,e);break;case`video`:case`audio`:for(r=0;r<zf.length;r++)Hf(zf[r],e);break;case`image`:Hf(`error`,e),Hf(`load`,e);break;case`details`:Hf(`toggle`,e);break;case`embed`:case`source`:case`link`:Hf(`error`,e),Hf(`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(i(137,t));default:np(e,t,u,r,n,null)}return;default:if(pn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&rp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&np(e,t,c,r,n,null))}var ap={};function op(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 a=null,o=null,s=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)||np(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&&(Gt=!0),o=m;break;case`name`:m!==f&&(Gt=!0),a=m;break;case`checked`:m!==f&&(Gt=!0),u=m;break;case`defaultChecked`:m!==f&&(Gt=!0),d=m;break;case`value`:m!==f&&(Gt=!0),s=m;break;case`defaultValue`:m!==f&&(Gt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&np(e,t,p,m,r,f)}}B(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||np(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Gt=!0),p=o;break;case`defaultValue`:o!==l&&(Gt=!0),c=o;break;case`multiple`:o!==l&&(Gt=!0),s=o;default:o!==l&&np(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?on(e,!!n,n?[]:``,!1):on(e,!!n,t,!0)):on(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:np(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Gt=!0),p=a;break;case`defaultValue`:a!==o&&(Gt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&np(e,t,s,a,r,o)}sn(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:np(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&&(Gt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:np(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)&&np(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(i(137,t));break;default:np(e,t,u,p,r,m)}return;default:if(pn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&rp(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||rp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&np(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||np(e,t,f,p,r,m)}function sp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function cp(){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&&sp(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&&sp(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 lp=null,up=null;function dp(e){return e.nodeType===9?e:e.ownerDocument}function fp(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 pp(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 mp(e,t,n,r){return n=dp(n).createElement(e),n[xt]=r,n[St]=t,ip(n,e,t),Ft(n),n}function hp(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 gp=null;function _p(){var e=window.event;return e&&e.type===`popstate`?e!==gp&&(gp=e,!0):(gp=null,!1)}var vp=typeof setTimeout==`function`?setTimeout:void 0,yp=typeof clearTimeout==`function`?clearTimeout:void 0,bp=typeof Promise==`function`?Promise:void 0,xp=typeof requestAnimationFrame==`function`?requestAnimationFrame:vp,Sp=typeof queueMicrotask==`function`?queueMicrotask:bp===void 0?vp:function(e){return bp.resolve(null).then(e).catch(Cp)};function Cp(e){setTimeout(function(){throw e})}function wp(e){return e===`head`}function Tp(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),Wh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)ym(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,ym(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Ot]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&ym(e.ownerDocument.body)}n=i}while(n);Wh(t)}function Ep(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 Dp(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 Op(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 kp(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 Ap(e){return kp(e.getBoundingClientRect(),getComputedStyle(e),e)}function jp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return kp(t,n,e)}function Mp(e){return e.documentElement.clientHeight}function Np(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Pp(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`&&(Mp(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+=Qm(f),u>th){s.length=o;break}f=new Promise(Np.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 Fp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Fp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Fp.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},Fp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Ip(e){return{name:e,group:new Fp(`group`,e),imagePair:new Fp(`image-pair`,e),old:new Fp(`old`,e),new:new Fp(`new`,e)}}function Lp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Lp.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(Hp(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=Bp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),p(this._fragmentFiber.child,!1,Rp,e,s,r)}this._eventListeners=a}};function Rp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Lp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Hp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Bp(i.optionsOrUseCapture),p(this._fragmentFiber.child,!1,zp,e,n,i),r.splice(t,1),a!==null&&a()}};function zp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Bp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Vp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Hp(e,t,n,r){if(e.length===0)return-1;r=Vp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Vp(a.optionsOrUseCapture)===r)return i}return-1}Lp.prototype.dispatchEvent=function(e){var t=h(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,Bp(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,Bp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Lp.prototype.focus=function(e){p(this._fragmentFiber.child,!0,Up,e,void 0,void 0)};function Up(e,t){return e.tag!==6&&(e=b(e),hm(e,t))}Lp.prototype.focusLast=function(e){var t=[];p(this._fragmentFiber.child,!0,Wp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Up(t[n],e);n--);};function Wp(e,t){return t.push(e),!1}Lp.prototype.blur=function(){var e=h(this._fragmentFiber);e!==null&&(e=b(e),e=dp(e).activeElement,e!==null&&p(this._fragmentFiber.child,!1,Gp,e,void 0,void 0))};function Gp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Lp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),p(this._fragmentFiber.child,!1,Kp,e,void 0,void 0)};function Kp(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}Lp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),p(this._fragmentFiber.child,!1,qp,e,void 0,void 0);for(var n=t=0;n<Jp.length;n++){var r=Jp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Jp[t++]=r}Jp.length=t}};function qp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var Jp=[],Yp=!1;function Xp(e,t,n){Jp.push({fragmentInstance:e,observer:t,instance:n}),Yp||(Yp=!0,gm(function(){Yp=!1;var e=Jp;Jp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Lp.prototype.getClientRects=function(){var e=[];return p(this._fragmentFiber.child,!1,Zp,e,void 0,void 0),e};function Zp(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}Lp.prototype.getRootNode=function(e){var t=h(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Lp.prototype.compareDocumentPosition=function(e){var t=h(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];p(this._fragmentFiber.child,!1,Wp,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||Qp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Qp(e,t,n,r,i){var a=jt(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=h(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:(p(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:(p(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function $p(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)}Lp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];p(this._fragmentFiber.child,!1,Wp,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]||h(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),$p(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 a=t[r];a.tag===6?(a=b(a),$p(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function em(e,t){return e=b(e),tm(e,t),!1}function tm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function nm(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,Bp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Jp.length;i++){var a=Jp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Jp[r++]=a)}Jp.length=r,n.observe(e)}),tm(e,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.removeEventListener(i.type,i.attachedListener,Bp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Xp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function im(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`:im(n),At(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function am(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[Ot])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=dm(e.nextSibling),e===null)break}return null}function om(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=dm(e.nextSibling),e===null))return null;return e}function sm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=dm(e.nextSibling),e===null))return null;return e}function cm(e){return e.data===`$?`||e.data===`$~`}function lm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function um(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 dm(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 fm=null;function pm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return dm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mm(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 hm(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 gm(e){xp(function(){xp(function(t){return e(t)})})}function _m(e,t,n){switch(t=dp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function vm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&np(e,t,r,null,ap,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===_n&&(e.onclick=null),At(e)}function ym(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);At(e)}var bm=new Map,xm=new Set;function Sm(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 Cm=R.d;R.d={f:wm,r:Tm,D:Om,C:km,L:Am,m:jm,X:Nm,S:Mm,M:Pm};function wm(){var e=Cm.f(),t=zd();return e||t}function Tm(e){var t=Mt(e);t!==null&&t.tag===5&&t.type===`form`?nc(t):Cm.r(e)}var Em=typeof document>`u`?null:document;function Dm(e,t,n){var r=Em;if(r&&typeof t==`string`&&t){var i=nn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),xm.has(i)||(xm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),ip(t,`link`,e),Ft(t),r.head.appendChild(t)))}}function Om(e){Cm.D(e),Dm(`dns-prefetch`,e,null)}function km(e,t){Cm.C(e,t),Dm(`preconnect`,e,t)}function Am(e,t,n){Cm.L(e,t,n);var r=Em;if(r&&e&&t){var i=`link[rel="preload"][as="`+nn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+nn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+nn(n.imageSizes)+`"]`)):i+=`[href="`+nn(e)+`"]`;var a=i;switch(t){case`style`:a=Im(e);break;case`script`:a=Bm(e)}if(!(bm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),bm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Lm(a))||t===`script`&&r.querySelector(Vm(a))))){var o=r.createElement(`link`);ip(o,`link`,e),t===`style`&&(o[kt]=!0,o.onload=o.onerror=function(){It(o)}),Ft(o),r.head.appendChild(o)}}}function jm(e,t){Cm.m(e,t);var n=Em;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+nn(r)+`"][href="`+nn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Bm(e)}if(!bm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),bm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Vm(a)))return}r=n.createElement(`link`),ip(r,`link`,e),Ft(r),n.head.appendChild(r)}}}function Mm(e,t,n){Cm.S(e,t,n);var r=Em;if(r&&e){var i=Pt(r).hoistableStyles,a=Im(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Lm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=bm.get(a))&&Wm(e,n);var c=o=r.createElement(`link`);Ft(c),ip(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,Um(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Nm(e,t){Cm.X(e,t);var n=Em;if(n&&e){var r=Pt(n).hoistableScripts,i=Bm(e),a=r.get(i);a||(a=n.querySelector(Vm(i)),a||(e=D({src:e,async:!0},t),(t=bm.get(i))&&Gm(e,t),a=n.createElement(`script`),Ft(a),ip(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pm(e,t){Cm.M(e,t);var n=Em;if(n&&e){var r=Pt(n).hoistableScripts,i=Bm(e),a=r.get(i);a||(a=n.querySelector(Vm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=bm.get(i))&&Gm(e,t),a=n.createElement(`script`),Ft(a),ip(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Fm(e,t,n,r){var a=(a=Se.current)?Sm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Im(n.href),t=Pt(a).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=Im(n.href);var o=Pt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Lm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=bm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},bm.set(e,o)),zm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Bm(n),t=Pt(a).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(i(444,e))}}function Im(e){return`href="`+nn(e)+`"`}function Lm(e){return`link[rel="stylesheet"][`+e+`]`}function Rm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function zm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[kt]){r.loading=1;return}}else t=e.createElement(`link`),t[kt]=!0,t.onload=t.onerror=It.bind(null,t),ip(t,`link`,n),Ft(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 Bm(e){return`[src="`+nn(e)+`"]`}function Vm(e){return`script[async]`+e}function Hm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+nn(n.href)+`"]`);if(r)return t.instance=r,Ft(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ft(r),ip(r,`style`,a),Um(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Im(n.href);var o=e.querySelector(Lm(a));if(o)return t.state.loading|=4,t.instance=o,Ft(o),o;r=Rm(n),(a=bm.get(a))&&Wm(r,a),o=(e.ownerDocument||e).createElement(`link`),Ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),ip(o,`link`,r),t.state.loading|=4,Um(o,n.precedence,e),t.instance=o;case`script`:return o=Bm(n.src),(a=e.querySelector(Vm(o)))?(t.instance=a,Ft(a),a):(r=n,(a=bm.get(o))&&(r=D({},n),Gm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ft(a),ip(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Um(r,n.precedence,e));return t.instance}function Um(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 Wm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Gm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Km=null;function qm(e,t,n){if(Km===null){var r=new Map,i=Km=new Map;i.set(n,r)}else i=Km,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[Ot]||a[xt]||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 Jm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Ym(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 Xm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Zm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Qm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function $m(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Qm(t),e.suspenseyImages.push(t)),e=ah.bind(e),t.decode().then(e,e))}function eh(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=Im(r.href),a=t.querySelector(Lm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ih.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ft(a);return}a=t.ownerDocument||t,r=Rm(r),(i=bm.get(i))&&Wm(r,i),a=a.createElement(`link`),Ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),ip(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=ih.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var th=0;function nh(e,t){return e.stylesheets&&e.count===0&&sh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&sh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&th===0&&(th=62500*cp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>th?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)sh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ih(){this.count--,rh(this)}function ah(){this.imgCount--,rh(this)}var oh=null;function sh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,oh=new Map,t.forEach(ch,e),oh=null,ih.call(e))}function ch(e,t){if(!(t.state.loading&4)){var n=oh.get(e);if(n)var r=n.get(null);else{n=new Map,oh.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=ih.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 lh={$$typeof:F,Provider:null,Consumer:null,_currentValue:me,_currentValue2:me,_threadCount:0};function uh(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=ut(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ut(0),this.hiddenUpdates=ut(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 dh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new uh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ki(3,null,null,t),e.current=a,a.stateNode=e,t=Aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},po(a),e}function fh(e){return e?(e=Di,e):Di}function ph(e,t,n,r,i,a){i=fh(i),r.context===null?r.context=i:r.pendingContext=i,r=ho(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=go(e,r,t),n!==null&&(Pd(n,e,t),_o(n,e,t))}function mh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hh(e,t){mh(e,t),(e=e.alternate)&&mh(e,t)}function gh(e){if(e.tag===13||e.tag===31){var t=wi(e,67108864);t!==null&&Pd(t,e,67108864),hh(e,67108864)}}function _h(e){if(e.tag===13||e.tag===31){var t=jd();t=gt(t);var n=wi(e,t);n!==null&&Pd(n,e,t),hh(e,t)}}var vh=!0;function yh(e,t,n,r){var i=L.T;L.T=null;var a=R.p;try{R.p=2,xh(e,t,n,r)}finally{R.p=a,L.T=i}}function bh(e,t,n,r){var i=L.T;L.T=null;var a=R.p;try{R.p=8,xh(e,t,n,r)}finally{R.p=a,L.T=i}}function xh(e,t,n,r){if(vh){var i=Sh(r);if(i===null)qf(e,t,r,Ch,n),Ph(e,r);else if(Ih(i,e,t,n,r))r.stopPropagation();else if(Ph(e,r),t&4&&-1<Nh.indexOf(e)){for(;i!==null;){var a=Mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=it(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Qe(o);s.entanglements[1]|=c,o&=~c}Ef(a),!(Yu&6)&&(gd=Be()+500,Df(0,!1))}}break;case 31:case 13:s=wi(a,2),s!==null&&Pd(s,a,2),zd(),hh(a,2)}if(a=Sh(r),a===null&&qf(e,t,r,Ch,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else qf(e,t,r,null,n)}}function Sh(e){return e=yn(e),wh(e)}var Ch=null;function wh(e){if(Ch=null,e=jt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(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 Ch=e,null}function Th(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(Ve()){case He:return 2;case Ue:return 8;case We:case Ge:return 32;case Ke:return 268435456;default:return 32}default:return 32}}var Eh=!1,Dh=null,Oh=null,kh=null,Ah=new Map,jh=new Map,Mh=[],Nh=`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 Ph(e,t){switch(e){case`focusin`:case`focusout`:Dh=null;break;case`dragenter`:case`dragleave`:Oh=null;break;case`mouseover`:case`mouseout`:kh=null;break;case`pointerover`:case`pointerout`:Ah.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:jh.delete(t.pointerId)}}function Fh(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=Mt(t),t!==null&&gh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ih(e,t,n,r,i){switch(t){case`focusin`:return Dh=Fh(Dh,e,t,n,r,i),!0;case`dragenter`:return Oh=Fh(Oh,e,t,n,r,i),!0;case`mouseover`:return kh=Fh(kh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ah.set(a,Fh(Ah.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,jh.set(a,Fh(jh.get(a)||null,e,t,n,r,i)),!0}return!1}function Lh(e){var t=jt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,yt(e.priority,function(){_h(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,yt(e.priority,function(){_h(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 Rh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);vn=r,n.target.dispatchEvent(r),vn=null}else return t=Mt(n),t!==null&&gh(t),e.blockedOn=n,!1;t.shift()}return!0}function zh(e,t,n){Rh(e)&&n.delete(t)}function Bh(){Eh=!1,Dh!==null&&Rh(Dh)&&(Dh=null),Oh!==null&&Rh(Oh)&&(Oh=null),kh!==null&&Rh(kh)&&(kh=null),Ah.forEach(zh),jh.forEach(zh)}function Vh(e,n){e.blockedOn===n&&(e.blockedOn=null,Eh||(Eh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bh)))}var Hh=null;function Uh(e){Hh!==e&&(Hh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Hh===e&&(Hh=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(wh(r||n)===null)continue;break}var a=Mt(n);a!==null&&(e.splice(t,3),t-=3,ec(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Wh(e){function t(t){return Vh(t,e)}Dh!==null&&Vh(Dh,e),Oh!==null&&Vh(Oh,e),kh!==null&&Vh(kh,e),Ah.forEach(t),jh.forEach(t);for(var n=0;n<Mh.length;n++){var r=Mh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Mh.length&&(n=Mh[0],n.blockedOn===null);)Lh(n),n.blockedOn===null&&Mh.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[St]||null;if(typeof a==`function`)o||Uh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[St]||null)s=o.formAction;else if(wh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Uh(n)}}}function Gh(){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 Kh(e){this._internalRoot=e}qh.prototype.render=Kh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ph(n,jd(),e,t,null,null)},qh.prototype.unmount=Kh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ph(e.current,2,null,e,null,null),zd(),t[Ct]=null}};function qh(e){this._internalRoot=e}qh.prototype.unstable_scheduleHydration=function(e){if(e){var t=vt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mh.length&&t!==0&&t<Mh[n].priority;n++);Mh.splice(n,0,e),n===0&&Lh(e)}};var Jh=n.version;if(Jh!==`19.3.1`)throw Error(i(527,Jh,`19.3.1`));R.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Yh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:L,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xh.isDisabled&&Xh.supportsFiber)try{Ye=Xh.inject(Yh),Xe=Xh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Cc,s=wc,c=Tc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=dh(e,1,!1,null,null,n,r,null,o,s,c,Gh),e[Ct]=t.current,Gf(e),new Kh(t)},e.hydrateRoot=function(e,t,n){if(!a(e))throw Error(i(299));var r=!1,o=``,s=Cc,c=wc,l=Tc,u=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=dh(e,1,!0,t,n??null,r,o,u,s,c,l,Gh),t.context=fh(null),n=t.current,r=jd(),r=gt(r),o=ho(r),o.callback=null,go(n,o,r),n=r,t.current.lanes=n,dt(t,n),Ef(t),e[Ct]=t.current,Gf(e),new qh(t)}})),v=s(((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=_()})),y=m(),b=v(),x=e=>e.attrs?.bind??`@${e.id}`,S=1e6,C=1e4,w=1e5,T=1e4,E=1e5,D=2e3,O=2e4,k=2e6,A=1e3,j=2e3,M=1e4;function N(e){if(e.length>254||/\s/.test(e))return!1;let t=e.indexOf(`@`);if(t<1||t!==e.lastIndexOf(`@`))return!1;let n=e.lastIndexOf(`.`);return n>t+1&&n<e.length-1}var P=class extends Error{code;constructor(e,t){super(t),this.name=`LocalFunctionError`,this.code=e}},F=[`en-US`,`zh-CN`,`de-DE`,`fr-FR`,`ja-JP`],ee=new Set(F),I=/^[A-Z]{3}$/,te=20;function ne(e){throw new P(`expression-domain`,e)}function re(e,t){if(e.length>1e5)throw new P(`expression-budget`,`${t} exceeds the ${w}-character limit.`);return e}function ie(e){return ee.has(e)||ne(`Unsupported locale "${e}"; expected one of ${F.join(`, `)}.`),e}function ae(e,t){return(!Number.isInteger(e)||e<0||e>te)&&ne(`${t} digits must be an integer from 0 to ${te}.`),e}function oe(e){if(!Number.isFinite(e))throw new P(`expression-number`,`Value must be a finite number.`);return e}function se(e){return e===0?0:e}function ce(e,t){let n=oe(e);return n===0||Math.abs(n)<.5*10**-t?0:n}function le(e,t){let n=oe(e);return n===0||Math.abs(n)<.5*10**-(t+2)?0:n}function ue(e,t,n,r,i){let a;try{a=new Intl.NumberFormat(e,t)}catch{a=void 0}return a===void 0&&ne(i),re(a.format(n),r)}function de(e,t=2,n=`en-US`,r=!0){let i=ie(n),a=ae(t,`formatNumber`);return typeof r!=`boolean`&&ne(`formatNumber grouping must be a boolean.`),e===null?``:ue(i,{useGrouping:r,minimumFractionDigits:a,maximumFractionDigits:a,roundingMode:`halfExpand`},ce(e,a),`Formatted number`,`Cannot format a number for locale "${i}".`)}function fe(e,t=0,n=`en-US`){let r=ie(n),i=ae(t,`formatPercent`);return e===null?``:ue(r,{style:`percent`,minimumFractionDigits:i,maximumFractionDigits:i,roundingMode:`halfExpand`},le(e,i),`Formatted percentage`,`Cannot format a percentage for locale "${r}".`)}function pe(e,t=2,n=`en-US`){let r=ie(n),i=ae(t,`formatScientific`);return e===null?``:ue(r,{notation:`scientific`,minimumFractionDigits:i,maximumFractionDigits:i,roundingMode:`halfExpand`},se(oe(e)),`Formatted number`,`Cannot format a number for locale "${r}".`)}function L(e,t=`USD`,n=2,r=`en-US`){let i=ie(r);I.test(t)||ne(`Currency "${t}" must be a three-letter uppercase code such as "USD".`);let a=ae(n,`formatCurrency`);return e===null?``:ue(i,{style:`currency`,currency:t,minimumFractionDigits:a,maximumFractionDigits:a,roundingMode:`halfExpand`},ce(e,a),`Formatted currency`,`Currency code "${t}" is not accepted by Intl.`)}function R(){throw new P(`expression-number`,`The result is not a finite number.`)}function me(e){if(!Number.isFinite(e))throw new P(`expression-value`,`Numeric array members must be finite numbers.`);return e}function he(e){let t=0;for(let n of e)t+=me(n);return Number.isFinite(t)||R(),t}function ge(e){if(e.length===0)return null;let t=he(e)/e.length;return Number.isFinite(t)||R(),t}function _e(e){if(e.length===0)return null;let t=me(e[0]);for(let n=1;n<e.length;n+=1){let r=me(e[n]);r<t&&(t=r)}return t}function ve(e){if(e.length===0)return null;let t=me(e[0]);for(let n=1;n<e.length;n+=1){let r=me(e[n]);r>t&&(t=r)}return t}function ye(e){let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2]),i=Number(t[3]);if(n<1||r<1||r>12||i<1||i>31)return null;let a=new Date(0);return a.setUTCFullYear(n,r-1,i),a.getUTCFullYear()===n&&a.getUTCMonth()===r-1&&a.getUTCDate()===i?a.getTime():null}function be(e){throw new P(`expression-domain`,e)}function xe(e){return re(e.trim(),`trim result`)}function Se(e){return re(e.toLowerCase(),`lower result`)}function Ce(e){return re(e.toUpperCase(),`upper result`)}function we(e,t){return e.startsWith(t)}function Te(e,t){return e.endsWith(t)}function Ee(e,t,n){t.length===0&&be(`replace search text must not be empty.`);let r=n.length-t.length;if(r>0){let n=0,i=0;for(;;){let r=e.indexOf(t,i);if(r<0)break;n+=1,i=r+t.length}if(e.length+n*r>1e5)throw new P(`expression-budget`,`replace result would exceed the ${w}-character limit.`)}let i=``,a=0;for(;;){let r=e.indexOf(t,a);if(r<0)break;i+=e.slice(a,r),i+=n,a=r+t.length}return i+=e.slice(a),re(i,`replace result`)}function De(e,t){return e<0?Math.max(t+e,0):Math.min(e,t)}function Oe(e,t,n){Number.isInteger(t)||be(`slice start must be an integer.`),n!==void 0&&!Number.isInteger(n)&&be(`slice end must be an integer.`);let r=Array.from(e),i=r.length,a=De(t,i),o=n===void 0?i:De(n,i);return o<=a?``:re(r.slice(a,o).join(``),`slice result`)}var ke=new Map([[`days`,864e5],[`hours`,36e5],[`minutes`,6e4],[`seconds`,1e3],[`milliseconds`,1]]),Ae=`days, hours, minutes, seconds or milliseconds`;function je(e){let t=ye(e);if(t===null)throw new P(`expression-domain`,`Date "${e}" must be a valid YYYY-MM-DD calendar date in years 0001-9999.`);return t}function Me(e,t){let n=je(e),r=je(t);return n===r?0:n<r?-1:1}function Ne(e,t,n=`days`){let r=ke.get(n);return r===void 0&&be(`dateDiff unit must be ${Ae}.`),(je(e)-je(t))/r}var Pe=16,Fe=256,Ie=2e3;function Le(e){if(typeof e==`string`)return e.length>Fe?`${e.slice(0,255)}…`:e;if(typeof e==`number`)return Number.isFinite(e)?e:String(e);if(typeof e==`boolean`||e===null)return e;if(e===void 0)return``;try{let t=JSON.stringify(e)??String(e);return t.length>Fe?`${t.slice(0,255)}…`:t}catch{return String(e).slice(0,Fe)}}function Re(e){let t=Object.entries(e);if(t.length===0)return;let n={},r=0,i=0;for(let[e,a]of t){if(i>=Pe)break;if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(e))continue;let t;try{t=Le(a)}catch{t=``}let o=typeof t==`string`?t.length:String(t).length;if(r+o>Ie)break;n[e]=t,r+=o,i+=1}return i>0?n:void 0}function ze(e,t){let n=t?Re(t):void 0;return n?{key:e,params:n}:{key:e}}var Be={"local.version.unsupported":{en:`This reader accepts {supported}; migrate {declared} or use a compatible reader.`,zh:`此阅读器支持 {supported};请迁移 {declared} 或使用兼容的阅读器。`},"local.version.malformed":{en:`Use <!-- reactive-md: local-draft-2 --> on one line.`,zh:`请在单独一行使用 <!-- reactive-md: local-draft-2 -->。`},"local.version.duplicate":{en:`Only one source syntax declaration is allowed.`,zh:`源码只能声明一次语法版本。`},"local.version.placement":{en:`The syntax declaration must be on its own line before the theme and document body.`,zh:`语法版本声明必须独占一行,位于主题声明和正文之前。`},"local.upgrade.from-version":{en:`Cannot migrate from {from}: {detail}.`,zh:`无法从 {from} 迁移:{detail}。`},"local.upgrade.reserved-binding":{en:`Binding {name} becomes reserved in local-draft-2; rename it with a compatible old editor before migration.`,zh:`绑定 {name} 在 local-draft-2 中成为保留名;迁移前请用兼容旧版本的编辑器重命名。`},"local.upgrade.tag":{en:`Tag {name} was inert in local-draft-1 and becomes active in local-draft-2; preserve it as literal code before migration.`,zh:`标签 {name} 在 local-draft-1 中不执行,在 local-draft-2 中会激活;迁移前请将其保留为代码原文。`},"local.upgrade.text-length":{en:`Text length constraints change from UTF-16 units to Unicode code points; explicitly accept this semantic change before migration.`,zh:`文本长度约束从 UTF-16 单元改为 Unicode 码点计数;迁移前须明确接受这一语义变化。`},"local.upgrade.expression":{en:`This expression uses array syntax or a function introduced in local-draft-2; it is outside automatic draft-1 migration.`,zh:`此表达式使用了 local-draft-2 新增的数组语法或函数,不属于 draft-1 自动迁移范围。`},"local.upgrade.version-missing":{en:`The source has no syntax declaration; migration will pin {version}.`,zh:`源码尚未声明语法版本;迁移将固定为 {version}。`},"parse.sourceType":{en:`Document source must be a string.`,zh:`文档源必须是字符串。`},"parse.markdownFailed":{en:`Cannot parse the Markdown document.`,zh:`无法解析 Markdown 文档。`},"parse.failed":{en:`Cannot parse document: {detail}`,zh:`无法解析文档:{detail}`},"budget.document":{en:`Document exceeds the {limit}-character limit.`,zh:`文档超过 {limit} 个字符的上限。`},"budget.syntaxNodes":{en:`Syntax nodes exceed the limit of {limit}.`,zh:`语法节点数量超过上限 {limit}。`},"budget.nesting":{en:`Component nesting exceeds the {limit}-level limit.`,zh:`组件嵌套超过 {limit} 层上限。`},"options.notObject":{en:`Compile options must be an object.`,zh:`编译选项必须是对象。`},"options.limitsNotObject":{en:`Compile option limits must be an object.`,zh:`编译选项 limits 必须是对象。`},"options.maxSyntaxNodes":{en:`Compile option limits.maxSyntaxNodes must be a positive safe integer.`,zh:`编译选项 limits.maxSyntaxNodes 必须是正安全整数。`},"theme.expression":{en:`Theme names must be static text, not expressions.`,zh:`主题名称必须是静态文本,不能是表达式。`},"theme.nameRequired":{en:`A theme declaration requires a quoted name attribute.`,zh:`主题声明需要一个带引号的 name 属性。`},"theme.attributeOnly":{en:`Theme declarations only accept a quoted name attribute.`,zh:`主题声明只接受带引号的 name 属性。`},"theme.nameInvalid":{en:`Theme name "{name}" must use lowercase letters, digits and single hyphens (maximum {limit} characters).`,zh:`主题名称“{name}”只能使用小写字母、数字和单个连字符(最多 {limit} 个字符)。`},"theme.malformedMissingClose":{en:`Theme declaration is missing >.`,zh:`主题声明缺少 >。`},"theme.malformedClosing":{en:`A theme declaration cannot be a closing tag.`,zh:`主题声明不能是结束标签。`},"theme.malformedStandalone":{en:`A theme declaration must be on its own line before the document content.`,zh:`主题声明必须单独占一行并位于文档内容之前。`},"theme.duplicateDeclaration":{en:`Only one theme declaration is allowed before the document content; this declaration is ignored.`,zh:`文档内容之前只允许一个主题声明;此声明将被忽略。`},"theme.late":{en:`Theme declarations after document content are ignored.`,zh:`文档内容之后的主题声明将被忽略。`},"theme.nested":{en:`Theme declarations inside document content are ignored.`,zh:`文档内容内部的主题声明将被忽略。`},"theme.invalidDeclaration":{en:`Invalid theme declaration.`,zh:`无效的主题声明。`},"attribute.lowercase":{en:`Attribute names must use lowercase kebab-case.`,zh:`属性名必须使用小写 kebab-case。`},"budget.attributeName":{en:`Attribute name exceeds the {limit}-character limit.`,zh:`属性名超过 {limit} 个字符的上限。`},"attribute.nameInvalid":{en:`Attribute name {name} must use lowercase kebab-case.`,zh:`属性名 {name} 必须使用小写 kebab-case。`},"attribute.valueQuoted":{en:`Attribute {name} value must be quoted.`,zh:`属性 {name} 的值必须加引号。`},"attribute.valueUnclosed":{en:`Attribute {name} is missing a closing quote.`,zh:`属性 {name} 缺少结束引号。`},"attribute.duplicate":{en:`Duplicate attribute {name}.`,zh:`重复的属性 {name}。`},"attribute.separator":{en:`Attributes must be separated by whitespace.`,zh:`属性之间必须用空白分隔。`},"budget.tagName":{en:`Tag name exceeds the {limit}-character limit.`,zh:`标签名超过 {limit} 个字符的上限。`},"tag.missingClose":{en:`Tag {name} is missing >.`,zh:`标签 {name} 缺少 >。`},"tag.closingAttributes":{en:`Closing tag </{name}> cannot have attributes.`,zh:`结束标签 </{name}> 不能带属性。`},"tag.nameInvalid":{en:`Tag name {name} must use lowercase kebab-case.`,zh:`标签名 {name} 必须使用小写 kebab-case。`},"tag.unclosedPaired":{en:`<{name}> is missing </{name}>.`,zh:`<{name}> 缺少 </{name}>。`},"tag.mismatchRoot":{en:`Closing tag </{name}> does not match the document root.`,zh:`结束标签 </{name}> 与文档根不匹配。`},"tag.mismatchParent":{en:`Closing tag </{name}> does not match <{parent}>.`,zh:`结束标签 </{name}> 与 <{parent}> 不匹配。`},"tag.requiresClose":{en:`<{name}> requires a closing tag.`,zh:`<{name}> 需要结束标签。`},"footnote.unsupported":{en:`Footnotes are not part of the local interaction syntax and are shown as source.`,zh:`脚注不属于本地交互语法,将按源文本显示。`},"interpolation.unclosed":{en:`Interpolation is missing }}.`,zh:`插值缺少 }}。`},"math.unclosed":{en:`Formula is missing its closing delimiter.`,zh:`公式缺少结束定界符。`},"math.whitespace":{en:`Inline math cannot start or end with whitespace.`,zh:`行内公式不能以空白开头或结尾。`},"budget.math":{en:`Formula exceeds the {limit}-character limit.`,zh:`公式超过 {limit} 个字符的上限。`},"html.raw":{en:`Raw HTML is not part of the local interaction syntax.`,zh:`原始 HTML 不属于本地交互语法。`},"html.extended":{en:`HTML element <{name}> requires enableExtendedHtml in this mode; it is shown as source.`,zh:`此模式下 HTML 元素 <{name}> 需要启用 enableExtendedHtml;已按源码显示。`},"html.attribute":{en:`HTML attribute {name} on <{tag}> is not supported; the element is shown as source.`,zh:`<{tag}> 上的 HTML 属性 {name} 不受支持;该元素已按源码显示。`},"html.unsafeUrl":{en:`Unsafe URL in attribute {name} was removed.`,zh:`属性 {name} 中的不安全 URL 已移除。`},"html.capability":{en:`Author {feature} was disabled by the compile options.`,zh:`编译选项已禁用作者提供的{feature}。`},"options.htmlFlag":{en:`Compile option {name} must be a boolean.`,zh:`编译选项 {name} 必须是布尔值。`},"component.unknownSuggestion":{en:`Unknown component <{name}>. Did you mean <{suggestion}>?`,zh:`未知组件 <{name}>。是否想使用 <{suggestion}>?`},"component.unknownPlain":{en:`Unknown component <{name}>. This mode only accepts local interaction components.`,zh:`未知组件 <{name}>。此模式只接受本地交互组件。`},"legacy.fence":{en:`Legacy reactive-md configuration fences (state/data/computed/actions, etc.) are not part of the local interaction syntax; select legacy mode explicitly in the host.`,zh:`旧版 reactive-md 配置围栏(state/data/computed/actions 等)不属于本地交互语法;请在宿主中显式选择旧版模式。`},"attribute.unknownSuggestion":{en:`Component <{component}> does not support attribute {name}. Did you mean {suggestion}?`,zh:`组件 <{component}> 不支持属性 {name}。是否想使用 {suggestion}?`},"attribute.unknownPlain":{en:`Component <{component}> does not support attribute {name}.`,zh:`组件 <{component}> 不支持属性 {name}。`},"budget.attribute":{en:`Attribute {name} on component <{component}> exceeds the {limit}-character limit.`,zh:`组件 <{component}> 的属性 {name} 超过 {limit} 个字符的上限。`},"attribute.color":{en:`Attribute {name} on component <{component}> must be a standard CSS named color or #RGB/#RRGGBB, got "{value}".`,zh:`组件 <{component}> 的属性 {name} 必须是标准 CSS 命名颜色或 #RGB/#RRGGBB,当前为“{value}”。`},"attribute.required":{en:`Component <{component}> is missing required attribute {name}.`,zh:`组件 <{component}> 缺少必需属性 {name}。`},"label.requiredMissing":{en:`Component <{name}> requires a label.`,zh:`组件 <{name}> 需要 label。`},"label.requiredEmpty":{en:`Component <{name}> label cannot be empty.`,zh:`组件 <{name}> 的 label 不能为空。`},"attribute.static":{en:`Attribute {name} is static and cannot contain interpolations.`,zh:`属性 {name} 是静态的,不能包含插值。`},"expression.emptyAttribute":{en:`Attribute {name} interpolation cannot be empty.`,zh:`属性 {name} 的插值不能为空。`},"expression.emptyInterpolation":{en:`Interpolation expression cannot be empty.`,zh:`插值表达式不能为空。`},"attribute.numberInvalid":{en:`Attribute {name} requires a number, got "{value}".`,zh:`属性 {name} 需要数字,当前为“{value}”。`},"attribute.numberInterpolationInvalid":{en:`Attribute {name} requires a number or a full number interpolation, got "{value}".`,zh:`属性 {name} 需要数字或完整的数字插值,当前为“{value}”。`},"attribute.integer":{en:`Attribute {name} requires an integer.`,zh:`属性 {name} 需要整数。`},"attribute.positive":{en:`Attribute {name} requires a positive number.`,zh:`属性 {name} 需要正数。`},"attribute.rangeMin":{en:`Attribute {name} must be at least {min}.`,zh:`属性 {name} 必须至少为 {min}。`},"attribute.rangeMax":{en:`Attribute {name} must be at most {max}.`,zh:`属性 {name} 必须至多为 {max}。`},"attribute.booleanInvalid":{en:`Attribute {name} requires true or false.`,zh:`属性 {name} 需要 true 或 false。`},"attribute.booleanInterpolationInvalid":{en:`Attribute {name} requires true or false, or a full boolean interpolation.`,zh:`属性 {name} 需要 true 或 false,或完整的布尔插值。`},"attribute.enumInvalid":{en:`Attribute {name} must be one of {values}, got "{value}".`,zh:`属性 {name} 必须是 {values} 之一,当前为“{value}”。`},"attribute.dateLower":{en:`Date lower bound {value} is not a valid YYYY-MM-DD.`,zh:`日期下界 {value} 不是有效的 YYYY-MM-DD。`},"attribute.dateUpper":{en:`Date upper bound {value} is not a valid YYYY-MM-DD.`,zh:`日期上界 {value} 不是有效的 YYYY-MM-DD。`},"constraint.componentMinMax":{en:`Component <{name}> min cannot exceed max.`,zh:`组件 <{name}> 的 min 不能大于 max。`},"constraint.componentStep":{en:`Component <{name}> step must be greater than 0.`,zh:`组件 <{name}> 的 step 必须大于 0。`},"constraint.lengthRange":{en:`max-length cannot be less than min-length.`,zh:`max-length 不能小于 min-length。`},"constraint.dateOrder":{en:`Date min cannot be later than max.`,zh:`日期 min 不能晚于 max。`},"constraint.progressRange":{en:`progress value must be between 0 and {max}, got {value}.`,zh:`progress 的 value 必须在 0 到 {max} 之间,当前为 {value}。`},"constraint.plotRange":{en:`plot min must be less than max.`,zh:`plot 的 min 必须小于 max。`},"constraint.timerDuration":{en:`timer duration must be a positive whole number of seconds.`,zh:`timer 的 duration 必须是正整数秒。`},"constraint.rangeSliderOrder":{en:`range-slider min cannot exceed max.`,zh:`range-slider 的 min 不能大于 max。`},"constraint.rangeSliderStep":{en:`range-slider step must be a finite positive number.`,zh:`range-slider 的 step 必须是有限正数。`},"constraint.coordinateOrder":{en:`coordinate {axis}-min cannot exceed {axis}-max.`,zh:`coordinate 的 {axis}-min 不能大于 {axis}-max。`},"constraint.coordinateStep":{en:`coordinate step must be a finite positive number.`,zh:`coordinate 的 step 必须是有限正数。`},"constraint.multiSelectMax":{en:`multi-select max-selected must be a nonnegative whole number.`,zh:`multi-select 的 max-selected 必须是非负整数。`},"constraint.quizTolerance":{en:`<quiz> tolerance must be a nonnegative finite number.`,zh:`<quiz> 的 tolerance 必须是非负有限数。`},"selection.keyNeedsKey":{en:`<{component}> {name} requires a key attribute naming the selection column.`,zh:`<{component}> 的 {name} 需要 key 属性来指定选择列。`},"structure.parent":{en:`<{name}> can only appear directly inside {parents}.`,zh:`<{name}> 只能直接位于 {parents} 内。`},"structure.noBody":{en:`<{name}> does not accept body content.`,zh:`<{name}> 不接受正文内容。`},"structure.inlineOnly":{en:`<{name}> only accepts inline Markdown.`,zh:`<{name}> 只接受行内 Markdown。`},"structure.noNestedComponents":{en:`The body of <{name}> cannot contain other interactive components.`,zh:`<{name}> 的正文不能包含其他交互组件。`},"structure.accordionNeedsDisclosure":{en:`<accordion> requires at least one <disclosure>.`,zh:`<accordion> 至少需要一个 <disclosure>。`},"structure.accordionOnly":{en:`<accordion> can only contain <disclosure>.`,zh:`<accordion> 只能包含 <disclosure>。`},"structure.gridNeedsCard":{en:`<grid> requires at least one <card>.`,zh:`<grid> 至少需要一个 <card>。`},"structure.gridOnlyCard":{en:`Direct children of <grid> must be <card>.`,zh:`<grid> 的直接子元素必须是 <card>。`},"structure.exactlyOneTable":{en:`The body of <{name}> must be exactly one Markdown table.`,zh:`<{name}> 的正文必须恰好是一个 Markdown 表格。`},"structure.plotNeedsFormula":{en:`<plot> requires at least one $$...$$ formula block.`,zh:`<plot> 至少需要一个 $$...$$ 公式块。`},"structure.plotOnlyFormulas":{en:`The body of <plot> can only contain blank lines and $$...$$ formula blocks.`,zh:`<plot> 的正文只能包含空行和 $$...$$ 公式块。`},"structure.nodeNoComponents":{en:`The description of <node> cannot contain interactive components.`,zh:`<node> 的描述不能包含交互组件。`},"structure.optionsNeeded":{en:`<{name}> requires at least one <option value="...">.`,zh:`<{name}> 至少需要一个 <option value="...">。`},"structure.optionsOnly":{en:`<{name}> can only contain <option>.`,zh:`<{name}> 只能包含 <option>。`},"budget.options":{en:`<{name}> options exceed the limit of {limit}.`,zh:`<{name}> 的选项数量超过上限 {limit}。`},"option.valueRequired":{en:`<option> requires a non-empty value.`,zh:`<option> 需要非空 value。`},"option.valueComma":{en:`<multi-select> option values cannot contain commas: "{value}".`,zh:`<multi-select> 的选项值不能包含逗号:“{value}”。`},"option.valueDuplicate":{en:`Option values in <{name}> must be unique; duplicate value "{value}".`,zh:`<{name}> 的选项值必须唯一;重复值“{value}”。`},"structure.optionNoComponents":{en:`The body of <option> cannot contain interactive components.`,zh:`<option> 的正文不能包含交互组件。`},"structure.tabsNeedsTab":{en:`<tabs> requires at least one <tab>.`,zh:`<tabs> 至少需要一个 <tab>。`},"structure.tabsOnly":{en:`<tabs> can only contain <tab>.`,zh:`<tabs> 只能包含 <tab>。`},"tab.valueDuplicate":{en:`Tab values in <tabs> must be unique; duplicate value "{value}".`,zh:`<tabs> 的标签值必须唯一;重复值“{value}”。`},"structure.stepsNeedsStep":{en:`<steps> requires at least one <step>.`,zh:`<steps> 至少需要一个 <step>。`},"structure.stepsOnly":{en:`<steps> can only contain <step>.`,zh:`<steps> 只能包含 <step>。`},"step.valueDuplicate":{en:`Step values in <steps> must be unique; duplicate value "{value}".`,zh:`<steps> 的步骤值必须唯一;重复值“{value}”。`},"quiz.answerRequired":{en:`<quiz> requires a non-empty answer.`,zh:`<quiz> 需要非空 answer。`},"structure.quizNumericNoBody":{en:`A numeric <quiz> cannot have body content; use type="choice" for option-based quizzes.`,zh:`数值型 <quiz> 不能有正文内容;基于选项的测验请使用 type="choice"。`},"quiz.answerNumeric":{en:`A numeric <quiz> answer must be a finite number.`,zh:`数值型 <quiz> 的 answer 必须是有限数字。`},"quiz.answerNotOption":{en:`<quiz> answer "{answer}" is not one of the option values: {options}.`,zh:`<quiz> 的 answer“{answer}”不在选项值中:{options}。`},"diagram.needsNode":{en:`<diagram> requires at least one <node>.`,zh:`<diagram> 至少需要一个 <node>。`},"structure.diagramOnly":{en:`<diagram> can only contain <node> and <edge>.`,zh:`<diagram> 只能包含 <node> 和 <edge>。`},"diagram.nodeInvalid":{en:`Node ID "{id}" may only contain letters, digits, underscores and hyphens, and cannot start with a digit.`,zh:`节点 ID“{id}”只能包含字母、数字、下划线和连字符,且不能以数字开头。`},"diagram.nodeDuplicate":{en:`Duplicate node ID "{id}".`,zh:`重复的节点 ID“{id}”。`},"diagram.edgeFromUnknown":{en:`Edge from references unknown node "{id}".`,zh:`连线起点引用了未知节点“{id}”。`},"diagram.edgeToUnknown":{en:`Edge to references unknown node "{id}".`,zh:`连线终点引用了未知节点“{id}”。`},"diagram.edgeDuplicate":{en:`Duplicate edge: {from} → {to}{label}.`,zh:`重复的连线:{from} → {to}{label}。`},"checklist.bodySingle":{en:`The body of <checklist> must be exactly one single-level Markdown task list.`,zh:`<checklist> 的正文必须恰好是一个单层 Markdown 任务列表。`},"checklist.needsItem":{en:`<checklist> requires at least one task list item.`,zh:`<checklist> 至少需要一个任务列表项。`},"budget.checklistItems":{en:`<checklist> items exceed the limit of {limit}.`,zh:`<checklist> 的任务项数量超过上限 {limit}。`},"checklist.taskOnly":{en:`<checklist> can only contain task list items (- [ ] / - [x]).`,zh:`<checklist> 只能包含任务列表项(- [ ] / - [x])。`},"checklist.noNested":{en:`<checklist> does not support nested lists.`,zh:`<checklist> 不支持嵌套列表。`},"checklist.noComponents":{en:`<checklist> items cannot contain interactive components.`,zh:`<checklist> 的任务项不能包含交互组件。`},"budget.identifier":{en:`Parameter name exceeds the {limit}-character limit.`,zh:`参数名超过 {limit} 个字符的上限。`},"binding.nameInvalid":{en:`Parameter name "{name}" must match [A-Za-z_][A-Za-z0-9_]*.`,zh:`参数名“{name}”必须匹配 [A-Za-z_][A-Za-z0-9_]*。`},"binding.reserved":{en:`Parameter name "{name}" is reserved; choose another name.`,zh:`参数名“{name}”是保留名称;请换一个名称。`},"binding.typeConflict":{en:`Parameter "{key}" is already declared as {kind} by <{first}> and cannot also bind <{second}>.`,zh:`参数“{key}”已由 <{first}> 声明为 {kind},不能再绑定 <{second}>。`},"binding.exclusive":{en:`Parameter "{key}" of <{first}> can only be owned by one component and cannot be shared with <{second}>.`,zh:`<{first}> 的参数“{key}”只能由一个组件拥有,不能与 <{second}> 共享。`},"binding.slotExclusive":{en:`Parameter "{key}" of the {slot} slot of <{name}> is exclusive and cannot be shared with another control.`,zh:`<{name}> 的 {slot} 槽参数“{key}”是独占的,不能与另一个控件共享。`},"binding.constraintConflict":{en:`Parameter "{key}" must use the same numeric range and step: <{first}> has {firstConstraints}, <{second}> has {secondConstraints}.`,zh:`参数“{key}”必须使用相同的数值范围和步长:<{first}> 为 {firstConstraints},<{second}> 为 {secondConstraints}。`},"binding.optionConflict":{en:`Parameter "{key}" must use the same option set in the same order.`,zh:`参数“{key}”必须使用相同顺序的同一组选项。`},"initial.duplicate":{en:`Parameter "{key}" has multiple explicit initial values ({count} in total).`,zh:`参数“{key}”有多个显式初值(共 {count} 个)。`},"initial.duplicatePeers":{en:`Parameter "{key}" has multiple explicit initial values ({count} in total; see also line {lines}).`,zh:`参数“{key}”有多个显式初值(共 {count} 个;另见第 {lines} 行)。`},"initial.rangeNoStep":{en:`Parameter "{key}" has no valid step value within range [{min}, {max}].`,zh:`参数“{key}”在范围 [{min}, {max}] 内没有有效的步长值。`},"initial.cannotDerive":{en:`Cannot derive a default initial value for <{name}> parameter "{key}".`,zh:`无法为 <{name}> 的参数“{key}”推导默认初值。`},"initial.typeFiniteNumber":{en:`Initial value of parameter "{key}" must be a finite number.`,zh:`参数“{key}”的初值必须是有限数字。`},"initial.belowMin":{en:`Initial value {value} of parameter "{key}" is below the minimum {min}.`,zh:`参数“{key}”的初值 {value} 小于最小值 {min}。`},"initial.aboveMax":{en:`Initial value {value} of parameter "{key}" exceeds the maximum {max}.`,zh:`参数“{key}”的初值 {value} 超过最大值 {max}。`},"initial.offStep":{en:`Initial value {value} of parameter "{key}" is not on step {step} (based at {base}).`,zh:`参数“{key}”的初值 {value} 不在步长 {step} 上(基准 {base})。`},"initial.typeBoolean":{en:`Initial value of parameter "{key}" must be a boolean.`,zh:`参数“{key}”的初值必须是布尔值。`},"initial.notAmongOptions":{en:`Initial value "{value}" of parameter "{key}" is not among the available values {options}.`,zh:`参数“{key}”的初值“{value}”不在可用值 {options} 中。`},"initial.typeWrong":{en:`Initial value of parameter "{name}" has the wrong type.`,zh:`参数“{name}”的初值类型不正确。`},"initial.dateInvalid":{en:`Initial date "{value}" is not a valid YYYY-MM-DD.`,zh:`初值日期“{value}”不是有效的 YYYY-MM-DD。`},"initial.notAvailableOption":{en:`Initial value "{value}" is not an available option: {options}.`,zh:`初值“{value}”不是可用选项:{options}。`},"initial.multiSelectOption":{en:`Initial value "{value}" of parameter "{key}" is not an option of <multi-select>.`,zh:`参数“{key}”的初值“{value}”不是 <multi-select> 的选项。`},"initial.rangeSliderOrder":{en:`<range-slider> start {start} cannot be greater than end {end}.`,zh:`<range-slider> 的 start {start} 不能大于 end {end}。`},"initial.slotBelowMin":{en:`Initial value {value} of <{name}> {slot} is below the minimum {min}.`,zh:`<{name}> 的 {slot} 初值 {value} 小于最小值 {min}。`},"initial.slotAboveMax":{en:`Initial value {value} of <{name}> {slot} exceeds the maximum {max}.`,zh:`<{name}> 的 {slot} 初值 {value} 超过最大值 {max}。`},"initial.slotOffStep":{en:`Initial value {value} of <{name}> {slot} is not on step {step} (based at {base}).`,zh:`<{name}> 的 {slot} 初值 {value} 不在步长 {step} 上(基准 {base})。`},"initial.lengthBelow":{en:`Initial value of parameter "{key}" has length {length}, below the minimum length {min} required by <{name}>.`,zh:`参数“{key}”的初值长度为 {length},小于 <{name}> 要求的最小长度 {min}。`},"initial.lengthAbove":{en:`Initial value of parameter "{key}" has length {length}, exceeding the maximum length {max} allowed by <{name}>.`,zh:`参数“{key}”的初值长度为 {length},超过 <{name}> 允许的最大长度 {max}。`},"initial.email":{en:`Initial value of parameter "{key}" is not a valid email address.`,zh:`参数“{key}”的初值不是有效的电子邮件地址。`},"initial.dateBelow":{en:`Initial value {value} of parameter "{key}" is earlier than the minimum date {min} of <date>.`,zh:`参数“{key}”的初值 {value} 早于 <date> 的最小日期 {min}。`},"initial.dateAbove":{en:`Initial value {value} of parameter "{key}" is later than the maximum date {max} of <date>.`,zh:`参数“{key}”的初值 {value} 晚于 <date> 的最大日期 {max}。`},"initial.multiSelectExceeds":{en:`Initial values of <multi-select> exceed max-selected {max}.`,zh:`<multi-select> 的初值数量超过 max-selected {max}。`},"expression.error":{en:`Expression error: {detail}`,zh:`表达式错误:{detail}`},"binding.unknownSuggestion":{en:`Reference to undeclared parameter {name}. Did you mean {suggestion}?`,zh:`引用了未声明的参数 {name}。是否想使用 {suggestion}?`},"binding.unknownPlain":{en:`Reference to undeclared parameter {name}.`,zh:`引用了未声明的参数 {name}。`},"type.number":{en:`Expected a number here, but the expression evaluates to {kind}.`,zh:`此处需要数字,但表达式结果为 {kind}。`},"type.boolean":{en:`Expected a boolean here, but the expression evaluates to {kind}.`,zh:`此处需要布尔值,但表达式结果为 {kind}。`},"type.string":{en:`Expected a string here, but the expression evaluates to {kind}.`,zh:`此处需要字符串,但表达式结果为 {kind}。`},"type.arrayNoDisplay":{en:`Arrays cannot be displayed directly; convert them first with a function such as len.`,zh:`数组不能直接显示;请先用 len 等函数转换。`},"attribute.whenInterpolation":{en:`The when attribute of if must be a full boolean interpolation, e.g. when="{{ seats >= 5 }}".`,zh:`if 的 when 属性必须是完整的布尔插值,例如 when="{{ seats >= 5 }}"。`},"anchor.idInvalid":{en:`Anchor id "{id}" must match [A-Za-z_][A-Za-z0-9_-]*.`,zh:`锚点 id“{id}”必须匹配 [A-Za-z_][A-Za-z0-9_-]*。`},"anchor.duplicate":{en:`Duplicate anchor id "{id}".`,zh:`重复的锚点 id“{id}”。`},"anchor.headingCollision":{en:`Anchor id "{id}" collides with an automatic heading target.`,zh:`锚点 id“{id}”与自动标题目标冲突。`},"jump.empty":{en:`<jump> target cannot be empty.`,zh:`<jump> 的目标不能为空。`},"jump.badTarget":{en:`<jump> target "{target}" must be a bare heading slug or anchor id without "#" or whitespace.`,zh:`<jump> 的目标“{target}”必须是不含“#”或空白的标题 slug 或锚点 id。`},"jump.unresolved":{en:`<jump> target "{target}" does not resolve to a heading or explicit anchor in this document.`,zh:`<jump> 的目标“{target}”无法解析到本文档中的标题或显式锚点。`},"budget.plotCurves":{en:`<plot> supports at most {limit} curves, but has {count}.`,zh:`<plot> 最多支持 {limit} 条曲线,当前有 {count} 条。`},"budget.plotPoints":{en:`The document's total plot sample count exceeds the limit of {limit}.`,zh:`文档的绘图采样点总数超过上限 {limit}。`},"math.formulaShape":{en:`<plot> formulas must be written explicitly as y = expression.`,zh:`<plot> 的公式必须显式写成 y = expression。`},"math.computeFailed":{en:`Cannot compute plot formula: {detail}`,zh:`无法计算绘图公式(错误代码 {code}):{detail}`},"math.bindingUnknown":{en:`Plot formula references undeclared parameter "{name}".`,zh:`绘图公式引用了未声明的参数“{name}”。`},"math.bindingType":{en:`Plot parameter "{name}" must be a number, but is {kind}.`,zh:`绘图参数“{name}”必须是数字,但当前为 {kind}。`},"table.missingHeader":{en:`The table for <{name}> is missing a header.`,zh:`<{name}> 的表格缺少表头。`},"table.headerInterpolation":{en:`Table headers cannot contain interpolations.`,zh:`表格表头不能包含插值。`},"table.headerEmpty":{en:`Table headers cannot be empty.`,zh:`表格表头不能为空。`},"table.headerDuplicate":{en:`Duplicate table header "{name}".`,zh:`重复的表格表头“{name}”。`},"table.rowColumnMismatch":{en:`Table row has a different column count: header has {header} columns, this row has {row}.`,zh:`表格行的列数不一致:表头有 {header} 列,此行有 {row} 列。`},"chart.numericExpression":{en:`Chart column "{name}" requires a number in row {row}, but the expression evaluates to {kind}.`,zh:`图表列“{name}”第 {row} 行需要数字,但表达式结果为 {kind}。`},"timeline.numericExpression":{en:`Timeline column "{name}" requires a number in row {row}, but the expression evaluates to {kind}.`,zh:`时间线列“{name}”第 {row} 行需要数字,但表达式结果为 {kind}。`},"chart.numericPlain":{en:`Chart column "{name}" requires a plain number in row {row}, got "{value}".`,zh:`图表列“{name}”第 {row} 行需要普通数字,当前为“{value}”。`},"timeline.numericPlain":{en:`Timeline column "{name}" requires a plain number in row {row}, got "{value}".`,zh:`时间线列“{name}”第 {row} 行需要普通数字,当前为“{value}”。`},"selection.keyEmpty":{en:`<{component}> key cannot be empty.`,zh:`<{component}> 的 key 不能为空。`},"selection.keyMissingColumn":{en:`<{component}> key column "{name}" does not exist in its table.`,zh:`<{component}> 的 key 列“{name}”在表格中不存在。`},"selection.keyInterpolation":{en:`<{component}> key column "{name}" must contain static text; row {row} contains an interpolation.`,zh:`<{component}> 的 key 列“{name}”必须包含静态文本;第 {row} 行包含插值。`},"selection.keyEmptyCell":{en:`<{component}> key column "{name}" cannot be empty in row {row}.`,zh:`<{component}> 的 key 列“{name}”在第 {row} 行不能为空。`},"selection.keyDuplicate":{en:`<{component}> key column "{name}" must be unique; duplicate value "{value}".`,zh:`<{component}> 的 key 列“{name}”必须唯一;重复值“{value}”。`},"initial.selectionNotValue":{en:`Initial selection "{value}" of <{component}> is not a value of key column "{name}".`,zh:`<{component}> 的初始选择“{value}”不是 key 列“{name}”中的值。`},"chart.columnComma":{en:`Chart column names cannot contain commas: "{name}".`,zh:`图表列名不能包含逗号:“{name}”。`},"chart.xMissing":{en:`Chart x column "{name}" does not exist.`,zh:`图表 x 列“{name}”不存在。`},"chart.yRequired":{en:`Chart y requires a column name.`,zh:`图表 y 需要列名。`},"chart.yMissing":{en:`Chart y column "{name}" does not exist.`,zh:`图表 y 列“{name}”不存在。`},"chart.needsNumeric":{en:`Chart requires at least one numeric column.`,zh:`图表至少需要一个数值列。`},"chart.scatterXMissing":{en:`Scatter chart x column "{name}" does not exist.`,zh:`散点图的 x 列“{name}”不存在。`},"chart.scatterNeedsNumeric":{en:`Scatter chart requires at least one numeric column.`,zh:`散点图至少需要一个数值列。`},"chart.donutNeedsColumns":{en:`Donut chart requires a label column and a value column.`,zh:`环形图需要一个标签列和一个数值列。`},"chart.donutYOne":{en:`Donut chart y can only specify one numeric column.`,zh:`环形图的 y 只能指定一个数值列。`},"chart.donutNeedY":{en:`A donut chart with more than two columns must use y to specify the single numeric column.`,zh:`超过两列的环形图必须用 y 指定唯一的数值列。`},"chart.negative":{en:`Donut chart values cannot be negative; row {row} is {value}.`,zh:`环形图的数值不能为负;第 {row} 行为 {value}。`},"timeline.headerMissing":{en:`Timeline requires either Task, Start and Duration columns or 事项, 开始 and 时长 columns, with optional Notes or 说明.`,zh:`时间线需要 Task、Start、Duration 列,或 事项、开始、时长 列,并可选 Notes 或 说明。`},"timeline.columnUnsupported":{en:`Timeline does not support column "{name}".`,zh:`时间线不支持列“{name}”。`},"timeline.negative":{en:`Timeline column "{name}" cannot be negative in row {row}.`,zh:`时间线列“{name}”在第 {row} 行不能为负。`},"runtime.bindingNoWritable":{en:`This component has no writable binding state.`,zh:`此组件没有可写的绑定状态。`},"runtime.bindingNeedsSlot":{en:`This multi-slot component requires a slot such as start/end or x/y.`,zh:`此多槽组件需要 start/end 或 x/y 之类的槽位。`},"runtime.bindingUnknownSlot":{en:`This component has no writable slot "{slot}".`,zh:`此组件没有可写的槽位“{slot}”。`},"runtime.bindingNoMultiSlot":{en:`This component does not support multiple slots.`,zh:`此组件不支持多个槽位。`},"runtime.dateInvalid":{en:`Date must be a valid YYYY-MM-DD or an empty string.`,zh:`日期必须是有效的 YYYY-MM-DD 或空字符串。`},"runtime.dateRequired":{en:`This date is required.`,zh:`此日期为必填项。`},"runtime.dateEarlier":{en:`Date cannot be earlier than {min}.`,zh:`日期不能早于 {min}。`},"runtime.dateLater":{en:`Date cannot be later than {max}.`,zh:`日期不能晚于 {max}。`},"runtime.fieldRequired":{en:`This field is required.`,zh:`此字段为必填项。`},"runtime.minLength":{en:`At least {min} characters.`,zh:`至少 {min} 个字符。`},"runtime.maxLength":{en:`At most {max} characters.`,zh:`至多 {max} 个字符。`},"runtime.emailLength":{en:`Email address cannot exceed {limit} characters.`,zh:`电子邮件地址不能超过 {limit} 个字符。`},"runtime.emailInvalid":{en:`Enter a valid email address.`,zh:`请输入有效的电子邮件地址。`},"runtime.finiteNumber":{en:`Parameter "{name}" requires a finite number.`,zh:`参数“{name}”需要有限数字。`},"runtime.min":{en:`Parameter "{name}" must be at least {min}.`,zh:`参数“{name}”必须至少为 {min}。`},"runtime.max":{en:`Parameter "{name}" must be at most {max}.`,zh:`参数“{name}”必须至多为 {max}。`},"runtime.step":{en:`Parameter "{name}" must be a multiple of step {step} (base {base}).`,zh:`参数“{name}”必须是步长 {step} 的倍数(基准 {base})。`},"runtime.boolean":{en:`Parameter "{name}" requires a boolean.`,zh:`参数“{name}”需要布尔值。`},"runtime.string":{en:`Parameter "{name}" requires a string.`,zh:`参数“{name}”需要字符串。`},"runtime.array":{en:`Parameter "{name}" requires an array of strings.`,zh:`参数“{name}”需要字符串数组。`},"runtime.arrayMembers":{en:`Parameter "{name}" members must be strings.`,zh:`参数“{name}”的成员必须是字符串。`},"runtime.checklistOption":{en:`Checklist item "{value}" does not exist.`,zh:`清单项“{value}”不存在。`},"runtime.maxItems":{en:`Parameter "{name}" allows at most {max} selected values.`,zh:`参数“{name}”最多允许选择 {max} 个值。`},"runtime.unsupportedType":{en:`Parameter "{name}" has an unsupported value type.`,zh:`参数“{name}”的值类型不受支持。`},"runtime.option":{en:`Value "{value}" is not among the options: {options}.`,zh:`值“{value}”不在选项中:{options}。`},"runtime.budget":{en:`Parameter "{name}": {detail}`,zh:`参数“{name}”:{detail}`},"runtime.rangeOrder":{en:`The range start cannot be greater than its end.`,zh:`范围起点不能大于终点。`},"budget.string":{en:`String exceeds the {limit}-character limit.`,zh:`字符串超过 {limit} 个字符的上限。`},"budget.array":{en:`Array exceeds the {limit}-item limit.`,zh:`数组超过 {limit} 个项的上限。`},"budget.arrayMember":{en:`Array member exceeds the {limit}-character limit.`,zh:`数组成员超过 {limit} 个字符的上限。`},"budget.arrayContents":{en:`Array contents exceed the {limit}-character limit.`,zh:`数组内容超过 {limit} 个字符的上限。`},"theme.missing":{en:`Theme "{name}" is not registered by the host; using the default theme.`,zh:`宿主未注册主题“{name}”;将使用默认主题。`},"theme.registryUnreadable":{en:`The host theme registry could not be read; using the default theme.`,zh:`无法读取宿主主题注册表;将使用默认主题。`},"theme.invalidDefinition":{en:`The selected theme "{name}" is not a valid definition; using the default theme.`,zh:`所选主题“{name}”不是有效定义;将使用默认主题。`},"theme.duplicateRegistration":{en:`Theme "{name}" is registered more than once; using the default theme.`,zh:`主题“{name}”被多次注册;将使用默认主题。`},"theme.protocol":{en:`Theme "{name}" does not support the {protocol} protocol; using the default theme.`,zh:`主题“{name}”不支持 {protocol} 协议;将使用默认主题。`},"theme.modes":{en:`Theme "{name}" must supply both light and dark color schemes; using the default theme.`,zh:`主题“{name}”必须同时提供浅色和深色配色;将使用默认主题。`},"theme.selectedUnreadable":{en:`The selected theme "{name}" could not be read; using the default theme.`,zh:`所选主题“{name}”无法读取;将使用默认主题。`},"error.expression-syntax":{en:`Check expression operators, parentheses and arguments.`,zh:`表达式语法不正确,请检查运算符、括号或参数是否完整。`},"error.expression-index":{en:`An array index must be a finite safe integer.`,zh:`数组索引必须为有限的安全整数。`},"error.expression-cycle":{en:`Named calculations contain a dependency cycle.`,zh:`命名计算中存在循环依赖。`},"error.array.homogeneous":{en:`Array elements must all be strings or all be numbers.`,zh:`数组元素必须全部为字符串或全部为数字。`},"error.array.finite":{en:`Array members must be finite numbers.`,zh:`数字数组元素必须为有限数值。`},"error.array.members":{en:`Array members must be strings or finite numbers.`,zh:`数组元素必须为字符串或有限数值。`},"error.expression-number":{en:`A numeric literal must be finite and valid.`,zh:`数字字面量无效,必须是有限数值。`},"error.expression-string":{en:`Check the string quotes and escape sequences.`,zh:`字符串格式不正确,请检查引号和转义。`},"error.expression-budget":{en:`The expression exceeded a resource budget.`,zh:`表达式超过长度、节点、深度或求值步数预算,请简化表达式。`},"error.expression-assignment":{en:`Assignment is not allowed in expressions.`,zh:`表达式不能执行赋值,请使用比较运算符。`},"error.expression-property":{en:`Property access is not allowed.`,zh:`表达式不支持属性访问,请直接引用绑定名称。`},"error.expression-empty":{en:`An expression is required.`,zh:`此处需要非空表达式。`},"error.expression-unknown-function":{en:`Use a supported built-in function.`,zh:`函数不受支持,请使用语言内置函数。`},"error.expression-arity":{en:`Check the function argument count.`,zh:`函数参数数量不正确。`},"error.expression-forbidden-name":{en:`The name is forbidden.`,zh:`此名称属于禁止访问的名称,请使用已声明的绑定。`},"error.expression-type":{en:`Operand or argument types do not match.`,zh:`操作数或函数参数的类型不匹配,请检查绑定类型。`},"error.expression-unknown-name":{en:`The binding is not declared.`,zh:`引用了未声明的绑定。`},"error.expression-value":{en:`The binding value is not supported.`,zh:`绑定值不符合表达式支持的类型或数值范围。`},"error.expression-eval":{en:`The expression cannot be evaluated.`,zh:`表达式无法求值,请检查输入和运算条件。`},"error.expression-domain":{en:`A value lies outside the function domain.`,zh:`参数超出函数定义域。`},"error.expression-divide-by-zero":{en:`Division by zero is undefined.`,zh:`除数不能为零。`},"error.expression-interpolation":{en:`Check interpolation delimiters and content.`,zh:`插值格式不正确,请检查分隔符和表达式内容。`},"error.latex-budget":{en:`The formula exceeded a resource budget.`,zh:`公式超过长度、记号、节点、深度或计算步数预算,请简化公式。`},"error.latex-syntax":{en:`Check formula syntax and delimiters.`,zh:`公式语法不正确,请检查命令、括号和分隔符。`},"error.latex-empty":{en:`A formula is required.`,zh:`公式不能为空。`},"error.latex-relation":{en:`Check the formula relation.`,zh:`公式中的关系式不符合计算语法。`},"error.latex-number":{en:`A formula number must be finite.`,zh:`公式中的数字必须是有限数值。`},"error.latex-name":{en:`Use a valid formula parameter name.`,zh:`公式参数名称无效,请使用合法绑定名。`},"error.latex-unsupported":{en:`The LaTeX structure is not computable.`,zh:`此 LaTeX 结构不支持计算,请改用支持的函数和运算。`},"error.latex-variable":{en:`A numeric formula parameter is missing or invalid.`,zh:`公式引用的参数缺失或不是有限数字。`},"error.latex-type":{en:`A formula parameter has the wrong type.`,zh:`公式参数类型不正确,计算参数必须为数字。`},"error.latex-divide-by-zero":{en:`Division by zero is undefined.`,zh:`公式中的除数不能为零。`},"error.latex-domain":{en:`A formula value lies outside the function domain.`,zh:`公式参数超出函数定义域。`},"error.latex-undefined":{en:`The formula is undefined at this point.`,zh:`公式在此点没有有限定义值。`},"error.latex-plot-range":{en:`Plot bounds must be finite and increasing.`,zh:`绘图区间必须由有限数值构成,且最小值小于最大值。`},"error.latex-plot-samples":{en:`The sample count must be an integer from 2 to 2000.`,zh:`采样点数必须为 2 至 2000 的整数。`}},Ve=`local.parse,local.budget,local.options.invalid,local.theme.expression,local.theme.name,local.theme.attribute,local.theme.malformed,local.theme.duplicate,local.theme.late,local.theme.nested,local.attribute,local.attribute.name,local.attribute.duplicate,local.budget.name,local.budget.math,local.tag.unclosed,local.tag.closing,local.tag.name,local.tag.mismatch,local.tag.shape,local.footnote.unsupported,local.interpolation,local.math.unclosed,local.math.whitespace,local.component.unknown,local.html`.split(`,`),He=`local.budget.data-table.cells,local.budget.data-table.columns,local.budget.data-table.rows,local.computation.budget,local.computation.const,local.computation.cycle,local.computation.duplicate,local.computation.expression,local.computation.name,local.computation.placement,local.computation.reserved,local.computation.unknown,local.computation.value,local.data-table.column,local.data-table.key,local.data-table.rows,local.data-table.value,local.validation.budget,local.validation.expression,local.validation.failed,local.validation.fields,local.validation.placement,local.validation.when,local.parse,local.legacy,local.component.unknown,local.attribute.unknown,local.budget.attribute,local.attribute.color,local.attribute.required,local.label.required,local.attribute.static,local.expression.empty,local.expression.invalid,local.attribute.type,local.attribute.range,local.constraint,local.selection.key,local.structure.parent,local.structure.children,local.budget.array,local.option.value,local.tab.value,local.step.value,local.quiz.answer,local.diagram.node,local.diagram.edge,local.checklist.body,local.budget.identifier,local.binding.name,local.binding.reserved,local.binding.type,local.binding.exclusive,local.binding.constraint,local.binding.option,local.initial.duplicate,local.initial.length,local.initial.email,local.initial.range,local.initial.option,local.initial.type,local.initial.date,local.initial,local.initial.step,local.binding.unknown,local.type,local.interpolation,local.attribute.interpolation,local.anchor.id,local.anchor.duplicate,local.jump.target,local.budget.plot.curves,local.budget.plot.points,local.math.formula,local.math,local.math.binding,local.table.header,local.table.row,local.chart.numeric,local.chart.column,local.chart.negative,local.timeline.header,local.timeline.value,local.html.extended,local.html.attribute,local.html.unsafe-url,local.html.capability`.split(`,`),Ue=[`local.runtime.binding`,`local.runtime.value`],We=[`local.theme.name`,`local.theme.missing`,`local.theme.manifest`,`local.theme.duplicate`,`local.theme.protocol`,`local.theme.modes`],Ge=[`expression-index`,`expression-cycle`,`expression-syntax`,`expression-number`,`expression-string`,`expression-budget`,`expression-assignment`,`expression-property`,`expression-empty`,`expression-unknown-function`,`expression-arity`,`expression-forbidden-name`,`expression-type`,`expression-unknown-name`,`expression-value`,`expression-eval`,`expression-domain`,`expression-divide-by-zero`,`expression-interpolation`],Ke=[`latex-budget`,`latex-syntax`,`latex-empty`,`latex-relation`,`latex-number`,`latex-name`,`latex-unsupported`,`latex-variable`,`latex-type`,`latex-divide-by-zero`,`latex-domain`,`latex-undefined`,`latex-plot-range`,`latex-plot-samples`],qe=[`local.version.unsupported`,`local.version.malformed`,`local.version.duplicate`,`local.version.placement`,`local.upgrade.from-version`,`local.upgrade.reserved-binding`,`local.upgrade.tag`,`local.upgrade.text-length`,`local.upgrade.expression`,`local.upgrade.version-missing`,...Ve,...He,...Ue,...We];Object.freeze(Array.from(new Set([...qe,...Ge,...Ge.map(e=>`local.expression.${e}`),...Ke])));var Je={"local.options.invalid.object":`options.notObject`,"local.options.invalid.limits":`options.limitsNotObject`,"local.options.invalid.max-syntax-nodes":`options.maxSyntaxNodes`,"local.budget.document":`budget.document`,"local.budget.nodes":`budget.syntaxNodes`,"local.budget.nesting":`budget.nesting`,"local.budget.name.attribute":`budget.attributeName`,"local.budget.name.tag":`budget.tagName`,"local.budget.math":`budget.math`,"local.budget.attribute":`budget.attribute`,"local.budget.array.options":`budget.options`,"local.budget.array.checklist":`budget.checklistItems`,"local.budget.identifier":`budget.identifier`,"local.budget.plot.curves":`budget.plotCurves`,"local.budget.plot.points":`budget.plotPoints`,"local.budget.value.string":`budget.string`,"local.budget.value.array":`budget.array`,"local.budget.value.array-member":`budget.arrayMember`,"local.budget.value.array-contents":`budget.arrayContents`,"local.parse.source":`parse.sourceType`,"local.parse.markdown":`parse.markdownFailed`,"local.parse.document":`parse.failed`,"local.legacy":`legacy.fence`,"local.theme.expression":`theme.expression`,"local.theme.name.missing":`theme.nameRequired`,"local.theme.attribute":`theme.attributeOnly`,"local.theme.name.invalid":`theme.nameInvalid`,"local.theme.name":`theme.nameInvalid`,"local.theme.malformed.unclosed":`theme.malformedMissingClose`,"local.theme.malformed.closing":`theme.malformedClosing`,"local.theme.malformed.placement":`theme.malformedStandalone`,"local.theme.duplicate.declaration":`theme.duplicateDeclaration`,"local.theme.duplicate":`theme.duplicateRegistration`,"local.theme.late":`theme.late`,"local.theme.nested":`theme.nested`,"local.theme.invalid":`theme.invalidDeclaration`,"local.theme.missing":`theme.missing`,"local.theme.manifest.unreadable":`theme.registryUnreadable`,"local.theme.manifest.definition":`theme.invalidDefinition`,"local.theme.manifest.selected":`theme.selectedUnreadable`,"local.theme.protocol":`theme.protocol`,"local.theme.modes":`theme.modes`,"local.tag.missing-close":`tag.missingClose`,"local.tag.unclosed.open":`tag.missingClose`,"local.tag.unclosed.pair":`tag.unclosedPaired`,"local.tag.closing":`tag.closingAttributes`,"local.tag.name":`tag.nameInvalid`,"local.tag.mismatch.root":`tag.mismatchRoot`,"local.tag.mismatch.parent":`tag.mismatchParent`,"local.tag.shape":`tag.requiresClose`,"local.interpolation.unclosed":`interpolation.unclosed`,"local.math.unclosed":`math.unclosed`,"local.math.whitespace":`math.whitespace`,"local.footnote.unsupported":`footnote.unsupported`,"local.html":`html.raw`,"local.html.extended":`html.extended`,"local.html.attribute":`html.attribute`,"local.html.unsafe-url":`html.unsafeUrl`,"local.html.capability":`html.capability`,"local.options.invalid.html-flag":`options.htmlFlag`,"local.component.unknown.suggestion":`component.unknownSuggestion`,"local.component.unknown":`component.unknownPlain`,"local.attribute.format":`attribute.lowercase`,"local.attribute.name":`attribute.nameInvalid`,"local.attribute.value-quoted":`attribute.valueQuoted`,"local.attribute.closing-quote":`attribute.valueUnclosed`,"local.attribute.duplicate":`attribute.duplicate`,"local.attribute.separator":`attribute.separator`,"local.attribute.unknown.suggestion":`attribute.unknownSuggestion`,"local.attribute.unknown":`attribute.unknownPlain`,"local.attribute.color":`attribute.color`,"local.attribute.required":`attribute.required`,"local.attribute.static":`attribute.static`,"local.attribute.type.number":`attribute.numberInvalid`,"local.attribute.type.number-interpolation":`attribute.numberInterpolationInvalid`,"local.attribute.type.integer":`attribute.integer`,"local.attribute.type.positive":`attribute.positive`,"local.attribute.type.boolean":`attribute.booleanInvalid`,"local.attribute.type.boolean-interpolation":`attribute.booleanInterpolationInvalid`,"local.attribute.type.enum":`attribute.enumInvalid`,"local.attribute.type.date-lower":`attribute.dateLower`,"local.attribute.type.date-upper":`attribute.dateUpper`,"local.attribute.range.min":`attribute.rangeMin`,"local.attribute.range.max":`attribute.rangeMax`,"local.attribute.interpolation":`attribute.whenInterpolation`,"local.label.required.missing":`label.requiredMissing`,"local.label.required.empty":`label.requiredEmpty`,"local.expression.empty.attribute":`expression.emptyAttribute`,"local.expression.empty":`expression.emptyInterpolation`,"local.expression.error":`expression.error`,"local.constraint.number-min-max":`constraint.componentMinMax`,"local.constraint.number-step":`constraint.componentStep`,"local.constraint.length-order":`constraint.lengthRange`,"local.constraint.date-order":`constraint.dateOrder`,"local.constraint.progress-range":`constraint.progressRange`,"local.constraint.plot-range":`constraint.plotRange`,"local.constraint.timer-duration":`constraint.timerDuration`,"local.constraint.range-slider-min-max":`constraint.rangeSliderOrder`,"local.constraint.range-slider-step":`constraint.rangeSliderStep`,"local.constraint.coordinate-axis":`constraint.coordinateOrder`,"local.constraint.coordinate-step":`constraint.coordinateStep`,"local.constraint.multi-select":`constraint.multiSelectMax`,"local.constraint.quiz-tolerance":`constraint.quizTolerance`,"local.selection.key.required":`selection.keyNeedsKey`,"local.selection.key.empty":`selection.keyEmpty`,"local.selection.key.missing-column":`selection.keyMissingColumn`,"local.selection.key.interpolation":`selection.keyInterpolation`,"local.selection.key.empty-cell":`selection.keyEmptyCell`,"local.selection.key.duplicate":`selection.keyDuplicate`,"local.selection.key.initial":`initial.selectionNotValue`,"local.structure.parent":`structure.parent`,"local.structure.no-body":`structure.noBody`,"local.structure.inline-only":`structure.inlineOnly`,"local.structure.no-nested-components":`structure.noNestedComponents`,"local.structure.accordion.needs-disclosure":`structure.accordionNeedsDisclosure`,"local.structure.accordion.only-disclosure":`structure.accordionOnly`,"local.structure.grid.needs-card":`structure.gridNeedsCard`,"local.structure.grid.only-card":`structure.gridOnlyCard`,"local.structure.table.single":`structure.exactlyOneTable`,"local.structure.plot.needs-formula":`structure.plotNeedsFormula`,"local.structure.plot.only-formulas":`structure.plotOnlyFormulas`,"local.structure.node.no-components":`structure.nodeNoComponents`,"local.structure.options.needed":`structure.optionsNeeded`,"local.structure.options.only":`structure.optionsOnly`,"local.structure.option.no-components":`structure.optionNoComponents`,"local.structure.tabs.needs-tab":`structure.tabsNeedsTab`,"local.structure.tabs.only-tab":`structure.tabsOnly`,"local.structure.steps.needs-step":`structure.stepsNeedsStep`,"local.structure.steps.only-step":`structure.stepsOnly`,"local.structure.quiz.numeric-no-body":`structure.quizNumericNoBody`,"local.structure.diagram.only":`structure.diagramOnly`,"local.option.value.required":`option.valueRequired`,"local.option.value.comma":`option.valueComma`,"local.option.value.duplicate":`option.valueDuplicate`,"local.tab.value.duplicate":`tab.valueDuplicate`,"local.step.value.duplicate":`step.valueDuplicate`,"local.quiz.answer.required":`quiz.answerRequired`,"local.quiz.answer.numeric":`quiz.answerNumeric`,"local.quiz.answer.not-option":`quiz.answerNotOption`,"local.diagram.node.required":`diagram.needsNode`,"local.diagram.node.invalid":`diagram.nodeInvalid`,"local.diagram.node.duplicate":`diagram.nodeDuplicate`,"local.diagram.edge.from":`diagram.edgeFromUnknown`,"local.diagram.edge.to":`diagram.edgeToUnknown`,"local.diagram.edge.duplicate":`diagram.edgeDuplicate`,"local.checklist.body.single":`checklist.bodySingle`,"local.checklist.body.item-required":`checklist.needsItem`,"local.checklist.body.items-limit":`budget.checklistItems`,"local.checklist.body.task-only":`checklist.taskOnly`,"local.checklist.body.no-nested":`checklist.noNested`,"local.checklist.body.no-components":`checklist.noComponents`,"local.binding.name":`binding.nameInvalid`,"local.binding.reserved":`binding.reserved`,"local.binding.type":`binding.typeConflict`,"local.binding.exclusive":`binding.exclusive`,"local.binding.exclusive.slot":`binding.slotExclusive`,"local.binding.constraint":`binding.constraintConflict`,"local.binding.option":`binding.optionConflict`,"local.binding.unknown.suggestion":`binding.unknownSuggestion`,"local.binding.unknown":`binding.unknownPlain`,"local.initial.duplicate":`initial.duplicate`,"local.initial.duplicate-peers":`initial.duplicatePeers`,"local.initial.no-step":`initial.rangeNoStep`,"local.initial.cannot-derive":`initial.cannotDerive`,"local.initial.type.number":`initial.typeFiniteNumber`,"local.initial.type.boolean":`initial.typeBoolean`,"local.initial.type":`initial.typeWrong`,"local.initial.range.min":`initial.belowMin`,"local.initial.range.max":`initial.aboveMax`,"local.initial.range.step":`initial.offStep`,"local.initial.value.options":`initial.notAmongOptions`,"local.initial.date":`initial.dateInvalid`,"local.initial.value.option":`initial.notAvailableOption`,"local.initial.option.multi-select":`initial.multiSelectOption`,"local.initial.range-slider":`initial.rangeSliderOrder`,"local.initial.slot.min":`initial.slotBelowMin`,"local.initial.slot.max":`initial.slotAboveMax`,"local.initial.slot.step":`initial.slotOffStep`,"local.initial.length.min":`initial.lengthBelow`,"local.initial.length.max":`initial.lengthAbove`,"local.initial.email":`initial.email`,"local.initial.date.min":`initial.dateBelow`,"local.initial.date.max":`initial.dateAbove`,"local.initial.multi-select":`initial.multiSelectExceeds`,"local.type.number":`type.number`,"local.type.boolean":`type.boolean`,"local.type.string":`type.string`,"local.type.array":`type.arrayNoDisplay`,"local.anchor.id":`anchor.idInvalid`,"local.anchor.duplicate":`anchor.duplicate`,"local.anchor.heading-collision":`anchor.headingCollision`,"local.jump.empty":`jump.empty`,"local.jump.bad-target":`jump.badTarget`,"local.jump.unresolved":`jump.unresolved`,"local.math.formula.shape":`math.formulaShape`,"local.math.compute":`math.computeFailed`,"local.math.binding.unknown":`math.bindingUnknown`,"local.math.binding.type":`math.bindingType`,"local.table.header.missing":`table.missingHeader`,"local.table.header.interpolation":`table.headerInterpolation`,"local.table.header.empty":`table.headerEmpty`,"local.table.header.duplicate":`table.headerDuplicate`,"local.table.row.mismatch":`table.rowColumnMismatch`,"local.chart.numeric.expression":`chart.numericExpression`,"local.timeline.numeric.expression":`timeline.numericExpression`,"local.chart.numeric.plain":`chart.numericPlain`,"local.timeline.numeric.plain":`timeline.numericPlain`,"local.chart.column.comma":`chart.columnComma`,"local.chart.column.x-missing":`chart.xMissing`,"local.chart.column.y-required":`chart.yRequired`,"local.chart.column.y-missing":`chart.yMissing`,"local.chart.column.needs-numeric":`chart.needsNumeric`,"local.chart.column.scatter-x-missing":`chart.scatterXMissing`,"local.chart.column.scatter-needs-numeric":`chart.scatterNeedsNumeric`,"local.chart.column.donut-columns":`chart.donutNeedsColumns`,"local.chart.column.donut-y":`chart.donutYOne`,"local.chart.column.donut-need-y":`chart.donutNeedY`,"local.chart.negative":`chart.negative`,"local.timeline.header.missing":`timeline.headerMissing`,"local.timeline.header.column":`timeline.columnUnsupported`,"local.timeline.value.negative":`timeline.negative`,"local.runtime.binding.no-writable":`runtime.bindingNoWritable`,"local.runtime.binding.needs-slot":`runtime.bindingNeedsSlot`,"local.runtime.binding.unknown-slot":`runtime.bindingUnknownSlot`,"local.runtime.binding.no-multi-slot":`runtime.bindingNoMultiSlot`,"local.runtime.value.date-invalid":`runtime.dateInvalid`,"local.runtime.value.date-required":`runtime.dateRequired`,"local.runtime.value.date-earlier":`runtime.dateEarlier`,"local.runtime.value.date-later":`runtime.dateLater`,"local.runtime.value.field-required":`runtime.fieldRequired`,"local.runtime.value.min-length":`runtime.minLength`,"local.runtime.value.max-length":`runtime.maxLength`,"local.runtime.value.email-length":`runtime.emailLength`,"local.runtime.value.email-invalid":`runtime.emailInvalid`,"local.runtime.value.finite-number":`runtime.finiteNumber`,"local.runtime.value.min":`runtime.min`,"local.runtime.value.max":`runtime.max`,"local.runtime.value.step":`runtime.step`,"local.runtime.value.boolean":`runtime.boolean`,"local.runtime.value.string":`runtime.string`,"local.runtime.value.array":`runtime.array`,"local.runtime.value.array-members":`runtime.arrayMembers`,"local.runtime.value.checklist-option":`runtime.checklistOption`,"local.runtime.value.max-items":`runtime.maxItems`,"local.runtime.value.unsupported-type":`runtime.unsupportedType`,"local.runtime.value.option":`runtime.option`,"local.runtime.value.budget":`runtime.budget`,"local.runtime.value.range-order":`runtime.rangeOrder`};Object.freeze([...Object.keys(Je),...Object.keys(Be).filter(e=>e.startsWith(`error.`))].sort());function Ye(e){if(Object.hasOwn(Je,e))return Je[e];if(Object.hasOwn(Be,e))return e}function Xe(e,t=`en`){let n=Ye(e);if(n)return Be[n][t===`zh`?`zh`:`en`]}function Ze(e,t){return t?e.replace(/\{([A-Za-z_][A-Za-z0-9_]*)\}/g,(e,n)=>{let r=t[n];return r===void 0?``:String(r)}):e}function Qe(e,t=`en`,n){let r=Xe(e,t);return r===void 0?``:Ze(r,n)}function $e(e){return Qe(e.key,`en`,e.params)}function et(e,t=`en`){let n=typeof e.messageKey==`string`?e.messageKey:void 0,r=n===void 0?void 0:Xe(n,t),i=e.params;if(t===`zh`&&i){let e=n===void 0?void 0:Ye(n);if(e===`expression.error`||e===`math.computeFailed`){let e=typeof i.code==`string`?Xe(`error.${i.code}`,`zh`):void 0;if(e){let t=typeof i.near==`string`&&i.near?` 相关源码:${i.near}`:``;i={...i,detail:e+t}}}else if(e===`runtime.budget`&&typeof i.detailKey==`string`){let e=Xe(i.detailKey,`zh`);e&&(i={...i,detail:Ze(e,i)})}}let a=r===void 0?typeof e.message==`string`?e.message:String(e.message??``):Ze(r,i),o=typeof a==`string`?a:String(a??``);return o.length>2e3?`${o.slice(0,D-1)}…`:o}function tt(e){if(typeof e!=`string`)return 0;let t=0;for(let n of e)t+=1;return t}var z=class extends Error{offset;code;constructor(e,t,n=0){super(t),this.name=`LocalExpressionError`,this.code=e,this.offset=n}},nt=`abs.sqrt.floor.ceil.round.min.max.pow.sin.cos.tan.asin.acos.atan.exp.log.len.contains.clamp.sum.average.minOf.maxOf.formatNumber.formatPercent.formatScientific.formatCurrency.trim.lower.upper.startsWith.endsWith.replace.slice.dateCompare.dateDiff`.split(`.`),rt=new Set(nt),it=new Map([[`pi`,Math.PI],[`e`,Math.E]]),at=new Set([`__proto__`,`prototype`,`constructor`]),ot=new Set([`string`,`number`,`boolean`,`null`,`array`,`number-array`]),st=new Set([...nt,`x`,`y`,`pi`,`e`,`true`,`false`,`null`,...at]),ct=4e3,lt=2e3,ut=100,dt=200,ft=1e4,pt=250,mt=w,ht=w,gt=500;function _t(e){if(e.length>1e4)return{code:`expression-budget`,...ze(`local.budget.value.array`,{limit:T}),message:`Array exceeds the ${T}-item limit.`};let t=null,n=0;for(let r of e)if(typeof r==`string`){if(t===`number`)return{code:`expression-value`,key:`error.array.homogeneous`,message:`Array elements must all be strings or all be numbers.`};if(t=`string`,r.length>1e5)return{code:`expression-budget`,...ze(`local.budget.value.array-member`,{limit:w}),message:`Array member exceeds the ${w}-character limit.`};if(n+=r.length,n>1e5)return{code:`expression-budget`,...ze(`local.budget.value.array-contents`,{limit:E}),message:`Array contents exceed the ${E}-character limit.`}}else if(typeof r==`number`){if(t===`string`)return{code:`expression-value`,key:`error.array.homogeneous`,message:`Array elements must all be strings or all be numbers.`};if(t=`number`,!Number.isFinite(r))return{code:`expression-value`,key:`error.array.finite`,message:`Array members must be finite numbers.`}}else return{code:`expression-value`,key:`error.array.members`,message:`Array members must be strings or finite numbers.`};return null}function vt(e){if(typeof e==`string`)return e.length>1e5?ze(`local.budget.value.string`,{limit:w}):null;if(Array.isArray(e)){let t=_t(e);return t?ze(t.key,t.params):null}return null}function yt(e){let t=vt(e);return t?$e(t):null}var bt=/^(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?/,xt=/[A-Za-z_]/,St=/[A-Za-z0-9_]/;function Ct(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(/\s/.test(r)){n+=1;continue}if(r>=`0`&&r<=`9`||r===`.`&&/[0-9]/.test(e[n+1]??``)){let r=bt.exec(e.slice(n));if(!r)throw new z(`expression-syntax`,`Invalid number.`,n);let i=r[0],a=Number(i);if(!Number.isFinite(a))throw new z(`expression-number`,`Number must be finite: ${i}.`,n);t.push({kind:`number`,value:i,start:n,number:a}),n+=i.length;continue}if(r===`"`||r===`'`){let i=n,a=r,o=``,s=n+1,c=!1;for(;s<e.length;){let t=e[s];if(t===a){c=!0,s+=1;break}if(t===`
10
+ `||t===`\r`)throw new z(`expression-string`,`String literals cannot span lines.`,i);if(t===`\\`){let t=e[s+1];if(t===void 0)break;switch(t){case`\\`:o+=`\\`;break;case`'`:o+=`'`;break;case`"`:o+=`"`;break;case`n`:o+=`
11
+ `;break;case`t`:o+=` `;break;default:throw new z(`expression-string`,`Unsupported escape \\${t}.`,s)}s+=2}else o+=t,s+=1}if(!c)throw new z(`expression-string`,`Unterminated string literal.`,i);if(o.length>mt)throw new z(`expression-budget`,`String literal exceeds the length limit.`,i);t.push({kind:`string`,value:o,start:i}),n=s;continue}if(xt.test(r)){let r=n+1;for(;r<e.length&&St.test(e[r]);)r+=1;t.push({kind:`ident`,value:e.slice(n,r),start:n}),n=r;continue}let i=e.slice(n,n+2);if(e.startsWith(`!==`,n)||e.startsWith(`===`,n))throw new z(`expression-syntax`,`Unsupported operator ${e.slice(n,n+3)}.`,n);if(i===`==`||i===`!=`||i===`<=`||i===`>=`||i===`&&`||i===`||`)t.push({kind:`punct`,value:i,start:n}),n+=2;else if(`+-*/%()!<>?:,[]`.includes(r))t.push({kind:`punct`,value:r,start:n}),n+=1;else throw r===`=`?new z(`expression-assignment`,`Assignments are not supported.`,n):r===`.`?new z(`expression-property`,`Property access is not supported.`,n):r===`&`||r===`|`?new z(`expression-syntax`,`Use ${r}${r} for logical operations.`,n):new z(`expression-syntax`,`Unrecognized character "${r}".`,n)}return t.push({kind:`eof`,value:``,start:e.length}),t}var wt={abs:[1,1],sqrt:[1,1],floor:[1,1],ceil:[1,1],round:[1,1],min:[1,2**53-1],max:[1,2**53-1],pow:[2,2],sin:[1,1],cos:[1,1],tan:[1,1],asin:[1,1],acos:[1,1],atan:[1,1],exp:[1,1],log:[1,1],len:[1,1],contains:[2,2],clamp:[3,3],sum:[1,1],average:[1,1],minOf:[1,1],maxOf:[1,1],formatNumber:[1,4],formatPercent:[1,3],formatScientific:[1,3],formatCurrency:[1,4],trim:[1,1],lower:[1,1],upper:[1,1],startsWith:[2,2],endsWith:[2,2],replace:[3,3],slice:[2,3],dateCompare:[2,2],dateDiff:[2,3]};function Tt(e){let t=0,n=[{node:e,depth:1}];for(;n.length>0;){let{node:e,depth:r}=n.pop();switch(r>t&&(t=r),e.kind){case`unary`:n.push({node:e.operand,depth:r+1});break;case`binary`:n.push({node:e.left,depth:r+1}),n.push({node:e.right,depth:r+1});break;case`conditional`:n.push({node:e.test,depth:r+1}),n.push({node:e.consequent,depth:r+1}),n.push({node:e.alternate,depth:r+1});break;case`call`:for(let t of e.args)n.push({node:t,depth:r+1});break;case`array`:for(let t of e.elements)n.push({node:t,depth:r+1});break;case`index`:n.push({node:e.target,depth:r+1}),n.push({node:e.index,depth:r+1})}}return t}var Et=class{tokens;position=0;nodeCount=0;dependencyNames=[];dependencySet=new Set;constructor(e){this.tokens=Ct(e)}get dependencies(){return this.dependencyNames}parse(){if(this.peek().kind===`eof`)throw new z(`expression-empty`,`Expression is empty.`,0);let e=this.parseConditional(0),t=this.peek();if(t.kind!==`eof`)throw new z(`expression-syntax`,`Unexpected content "${t.value}".`,t.start);if(Tt(e)>dt)throw new z(`expression-budget`,`Expression is nested too deeply.`,e.start);return e}peek(){return this.tokens[this.position]}next(){let e=this.tokens[this.position];return this.position+=1,e}isPunct(e){let t=this.peek();return t.kind===`punct`&&t.value===e}expect(e){let t=this.peek();if(t.kind!==`punct`||t.value!==e)throw new z(`expression-syntax`,`Missing "${e}".`,t.start);return this.next()}node(e,t,n){if(this.nodeCount+=1,this.nodeCount>lt)throw new z(`expression-budget`,`Expression is too complex.`,n);if(t>ut)throw new z(`expression-budget`,`Expression is nested too deeply.`,n);return e}parseConditional(e){let t=this.parseOr(e);if(!this.isPunct(`?`))return t;let n=t.start;this.next();let r=this.parseConditional(e+1);this.expect(`:`);let i=this.parseConditional(e+1);return this.node({kind:`conditional`,test:t,consequent:r,alternate:i,start:n},e,n)}parseOr(e){let t=this.parseAnd(e);for(;this.isPunct(`||`);){let n=t.start;this.next();let r=this.parseAnd(e);t=this.node({kind:`binary`,operator:`||`,left:t,right:r,start:n},e,n)}return t}parseAnd(e){let t=this.parseEquality(e);for(;this.isPunct(`&&`);){let n=t.start;this.next();let r=this.parseEquality(e);t=this.node({kind:`binary`,operator:`&&`,left:t,right:r,start:n},e,n)}return t}parseEquality(e){let t=this.parseRelational(e);for(;this.isPunct(`==`)||this.isPunct(`!=`);){let n=t.start,r=this.next().value,i=this.parseRelational(e);t=this.node({kind:`binary`,operator:r,left:t,right:i,start:n},e,n)}return t}parseRelational(e){let t=this.parseAdditive(e);for(;this.isPunct(`<`)||this.isPunct(`<=`)||this.isPunct(`>`)||this.isPunct(`>=`);){let n=t.start,r=this.next().value,i=this.parseAdditive(e);t=this.node({kind:`binary`,operator:r,left:t,right:i,start:n},e,n)}return t}parseAdditive(e){let t=this.parseMultiplicative(e);for(;this.isPunct(`+`)||this.isPunct(`-`);){let n=t.start,r=this.next().value,i=this.parseMultiplicative(e);t=this.node({kind:`binary`,operator:r,left:t,right:i,start:n},e,n)}return t}parseMultiplicative(e){let t=this.parseUnary(e);for(;this.isPunct(`*`)||this.isPunct(`/`)||this.isPunct(`%`);){let n=t.start,r=this.next().value,i=this.parseUnary(e);t=this.node({kind:`binary`,operator:r,left:t,right:i,start:n},e,n)}return t}parseUnary(e){let t=this.peek();if(t.kind===`punct`&&(t.value===`-`||t.value===`+`||t.value===`!`)){this.next();let n=this.parseUnary(e+1);return this.node({kind:`unary`,operator:t.value,operand:n,start:t.start},e,t.start)}return this.parsePrimary(e)}parsePrimary(e){let t=this.parseAtom(e);for(;this.isPunct(`[`);){let n=t.start;this.next();let r=this.parseConditional(e+1);this.expect(`]`),t=this.node({kind:`index`,target:t,index:r,start:n},e,n)}return t}parseAtom(e){let t=this.peek();if(t.kind===`number`)return this.next(),this.node({kind:`literal`,value:t.number,start:t.start},e,t.start);if(t.kind===`string`)return this.next(),this.node({kind:`literal`,value:t.value,start:t.start},e,t.start);if(t.kind===`ident`){this.next();let n=t.value;if(this.isPunct(`(`)){if(!rt.has(n))throw new z(`expression-unknown-function`,`Unknown function "${n}".`,t.start);this.next();let r=[];if(!this.isPunct(`)`))for(r.push(this.parseConditional(e+1));this.isPunct(`,`);)this.next(),r.push(this.parseConditional(e+1));this.expect(`)`);let[i,a]=wt[n];if(r.length<i||r.length>a)throw new z(`expression-arity`,`Function ${n} expects ${i===a?`${i} ${i===1?`argument`:`arguments`}`:i===1?`at least one argument`:`${i}–${a} arguments`}.`,t.start);return this.node({kind:`call`,name:n,args:r,start:t.start},e,t.start)}if(n===`true`||n===`false`)return this.node({kind:`literal`,value:n===`true`,start:t.start},e,t.start);if(n===`null`)return this.node({kind:`literal`,value:null,start:t.start},e,t.start);let r=it.get(n);if(r!==void 0)return this.node({kind:`literal`,value:r,start:t.start},e,t.start);if(at.has(n))throw new z(`expression-forbidden-name`,`Name "${n}" is not allowed.`,t.start);if(rt.has(n))throw new z(`expression-syntax`,`Function ${n} must be called with parentheses.`,t.start);return this.dependencySet.has(n)||(this.dependencySet.add(n),this.dependencyNames.push(n)),this.node({kind:`reference`,name:n,start:t.start},e,t.start)}if(t.kind===`punct`&&t.value===`(`){this.next();let t=this.parseConditional(e+1);return this.expect(`)`),t}if(t.kind===`punct`&&t.value===`[`){this.next();let n=[];if(!this.isPunct(`]`))for(n.push(this.parseConditional(e+1));this.isPunct(`,`);)this.next(),n.push(this.parseConditional(e+1));return this.expect(`]`),this.node({kind:`array`,elements:n,start:t.start},e,t.start)}throw new z(`expression-syntax`,`Expected an expression.`,t.start)}};function Dt(e){switch(e){case`string`:return`string`;case`number`:return`number`;case`boolean`:return`boolean`;case`null`:return`null`;case`array`:return`array`;case`number-array`:return`number array`}}function Ot(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e==`boolean`?`boolean`:typeof e==`number`?`number`:`string`}function kt(e,t){throw new z(`expression-type`,e,t)}function At(e,t,n,r){e!==t&&kt(`${r}, got ${Dt(e)}.`,n)}function jt(e,t){return e===t?e:e===`null`?t:t===`null`?e:null}function Mt(e,t){switch(e.kind){case`literal`:return Ot(e.value);case`reference`:{if(typeof t!=`object`||!t||!Object.prototype.hasOwnProperty.call(t,e.name))throw new z(`expression-unknown-name`,`Variable "${e.name}" is not declared.`,e.start);let n=t[e.name];if(typeof n!=`string`||!ot.has(n))throw new z(`expression-value`,`Variable "${e.name}" has an invalid type.`,e.start);return n}case`unary`:{let n=Mt(e.operand,t);return e.operator===`!`?(At(n,`boolean`,e.start,`Logical not requires a boolean`),`boolean`):(At(n,`number`,e.start,`Unary ${e.operator} requires a number`),`number`)}case`binary`:{let n=Mt(e.left,t),r=Mt(e.right,t);switch(e.operator){case`+`:return n===`number`&&r===`number`?`number`:n===`string`&&r===`string`?`string`:kt(`Operator "+" requires two numbers or two strings, got ${Dt(n)} and ${Dt(r)}.`,e.start);case`-`:case`*`:case`/`:case`%`:return At(n,`number`,e.start,`Operator "${e.operator}" requires a number`),At(r,`number`,e.start,`Operator "${e.operator}" requires a number`),`number`;case`<`:case`<=`:case`>`:case`>=`:return n===`number`&&r===`number`||n===`string`&&r===`string`?`boolean`:kt(`Comparison operator "${e.operator}" requires two numbers or two strings, got ${Dt(n)} and ${Dt(r)}.`,e.start);case`==`:case`!=`:return n!==r&&n!==`null`&&r!==`null`?kt(`Equality comparison requires matching types, got ${Dt(n)} and ${Dt(r)}.`,e.start):`boolean`;case`&&`:case`||`:return At(n,`boolean`,e.start,`Logical operators require booleans`),At(r,`boolean`,e.start,`Logical operators require booleans`),`boolean`}break}case`array`:{if(e.elements.length===0)return`number-array`;let n=null;for(let r of e.elements){let e=Mt(r,t);if(e!==`string`&&e!==`number`)return kt(`Array literals require string or number elements, got ${Dt(e)}.`,r.start);if(n===null)n=e;else if(n!==e)return kt(`Array literals require elements of one type, got ${Dt(n)} and ${Dt(e)}.`,r.start)}return n===`string`?`array`:`number-array`}case`index`:{let n=Mt(e.target,t);return At(Mt(e.index,t),`number`,e.start,`Array index must be a number`),n===`array`?`string`:n===`number-array`?`number`:kt(`Index access requires an array, got ${Dt(n)}.`,e.start)}case`conditional`:{At(Mt(e.test,t),`boolean`,e.start,`Conditional test must be a boolean`);let n=Mt(e.consequent,t),r=Mt(e.alternate,t);if(n===`array`&&e.alternate.kind===`array`&&e.alternate.elements.length===0||r===`array`&&e.consequent.kind===`array`&&e.consequent.elements.length===0)return`array`;let i=jt(n,r);return i===null?kt(`Conditional branches must have matching types or one null, got ${Dt(n)} and ${Dt(r)}.`,e.start):i}case`call`:{let n=e.args.map(e=>Mt(e,t));switch(e.name){case`abs`:case`sqrt`:case`floor`:case`ceil`:case`round`:case`sin`:case`cos`:case`tan`:case`asin`:case`acos`:case`atan`:case`exp`:case`log`:return At(n[0],`number`,e.start,`Function ${e.name} requires a number`),`number`;case`min`:case`max`:case`pow`:case`clamp`:for(let t of n)At(t,`number`,e.start,`Function ${e.name} requires a number`);return`number`;case`len`:return n[0]!==`string`&&n[0]!==`array`&&n[0]!==`number-array`&&kt(`Function len requires a string or array, got ${Dt(n[0])}.`,e.start),`number`;case`contains`:if(n[0]===`number-array`)return At(n[1],`number`,e.start,`Function contains requires a numeric member`),`boolean`;if(n[0]===`string`||n[0]===`array`)return At(n[1],`string`,e.start,`Function contains requires a string member`),`boolean`;kt(`Function contains requires a string or array, got ${Dt(n[0])}.`,e.start);break;case`sum`:case`average`:case`minOf`:case`maxOf`:return At(n[0],`number-array`,e.start,`Function ${e.name} requires a numeric array`),`number`;case`formatNumber`:case`formatPercent`:case`formatScientific`:return n[0]!==`number`&&n[0]!==`null`&&kt(`Function ${e.name} requires a number or null, got ${Dt(n[0])}.`,e.start),n[1]!==void 0&&At(n[1],`number`,e.start,`Function ${e.name} requires numeric fraction digits`),n[2]!==void 0&&At(n[2],`string`,e.start,`Function ${e.name} requires a string locale`),e.name===`formatNumber`&&n[3]!==void 0&&At(n[3],`boolean`,e.start,`Function formatNumber requires a boolean grouping flag`),`string`;case`formatCurrency`:return n[0]!==`number`&&n[0]!==`null`&&kt(`Function formatCurrency requires a number or null, got ${Dt(n[0])}.`,e.start),n[1]!==void 0&&At(n[1],`string`,e.start,`Function formatCurrency requires a string currency code`),n[2]!==void 0&&At(n[2],`number`,e.start,`Function formatCurrency requires numeric fraction digits`),n[3]!==void 0&&At(n[3],`string`,e.start,`Function formatCurrency requires a string locale`),`string`;case`trim`:case`lower`:case`upper`:return At(n[0],`string`,e.start,`Function ${e.name} requires a string`),`string`;case`startsWith`:case`endsWith`:return At(n[0],`string`,e.start,`Function ${e.name} requires a string`),At(n[1],`string`,e.start,`Function ${e.name} requires a string search value`),`boolean`;case`replace`:return At(n[0],`string`,e.start,`Function replace requires a string`),At(n[1],`string`,e.start,`Function replace requires a string search value`),At(n[2],`string`,e.start,`Function replace requires a string replacement`),`string`;case`slice`:return At(n[0],`string`,e.start,`Function slice requires a string`),At(n[1],`number`,e.start,`Function slice requires a numeric start index`),n[2]!==void 0&&At(n[2],`number`,e.start,`Function slice requires a numeric end index`),`string`;case`dateCompare`:return At(n[0],`string`,e.start,`Function dateCompare requires a date string`),At(n[1],`string`,e.start,`Function dateCompare requires a date string`),`number`;case`dateDiff`:return At(n[0],`string`,e.start,`Function dateDiff requires a date string`),At(n[1],`string`,e.start,`Function dateDiff requires a date string`),n[2]!==void 0&&At(n[2],`string`,e.start,`Function dateDiff requires a string unit`),`number`}break}}throw new z(`expression-type`,`Unsupported expression.`,0)}function Nt(e,t,n=`expression-eval`){throw new z(n,e,t)}function Pt(e){if(typeof e!=`object`||!e||Array.isArray(e))throw new z(`expression-value`,`Expression environment must be an object.`,0)}function Ft(e,t,n){if(e===null)return null;if(typeof e==`string`){let r=yt(e);if(r)throw new z(`expression-budget`,`Variable "${t}": ${r}`,n);return e}if(typeof e==`boolean`)return e;if(typeof e==`number`){if(!Number.isFinite(e))throw new z(`expression-value`,`Variable "${t}" must be a finite number.`,n);return e}if(Array.isArray(e)){let r=_t(e);if(r)throw new z(r.code,`Variable "${t}": ${r.message}`,n);return e}throw new z(`expression-value`,`Variable "${t}" has an invalid value type.`,n)}function It(e,t,n){return Pt(e),Object.prototype.hasOwnProperty.call(e,t)||Nt(`Variable "${t}" is not declared.`,n,`expression-unknown-name`),Ft(e[t],t,n)}function Lt(e,t,n=`Expected a number`){return typeof e==`number`&&Number.isFinite(e)||Nt(`${n}.`,t,`expression-type`),e}function Rt(e,t,n=`Expected a boolean`){return typeof e!=`boolean`&&Nt(`${n}.`,t,`expression-type`),e}function zt(e,t,n=`Expected a string`){return typeof e!=`string`&&Nt(`${n}.`,t,`expression-type`),e}function Bt(e,t,n){Array.isArray(e)||Nt(`${n}.`,t,`expression-type`);for(let r of e)typeof r==`number`&&Number.isFinite(r)||Nt(`${n}.`,t,`expression-type`);return e}function Vt(e,t){let n=_t(e);return n&&Nt(n.message,t,n.code),e}function Ht(e,t){try{return t()}catch(t){throw t instanceof P?new z(t.code,t.message,e):t}}function Ut(e,t){return Number.isNaN(e)&&Nt(`The result is undefined.`,t,`expression-domain`),Number.isFinite(e)||Nt(`The result is not a finite number.`,t,`expression-number`),e}function Wt(e,t){let n=Array.from(e),r=Array.from(t),i=Math.min(n.length,r.length);for(let e=0;e<i;e+=1){let t=n[e].codePointAt(0),i=r[e].codePointAt(0);if(t!==i)return t<i?-1:1}return n.length===r.length?0:n.length<r.length?-1:1}function Gt(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}return!1}function Kt(e,t){return qt(e,t,{steps:0},1)}function qt(e,t,n,r){switch(n.steps+=1,n.steps>ft&&Nt(`Expression evaluation exceeded the step limit.`,e.start,`expression-budget`),r>pt&&Nt(`Expression evaluation is nested too deeply.`,e.start,`expression-budget`),e.kind){case`literal`:return e.value;case`reference`:return It(t,e.name,e.start);case`unary`:{let i=qt(e.operand,t,n,r+1);if(e.operator===`!`)return!Rt(i,e.start,`Logical not requires a boolean`);let a=Lt(i,e.start,`Unary ${e.operator} requires a number`);return Ut(e.operator===`-`?-a:a,e.start)}case`binary`:{if(e.operator===`&&`||e.operator===`||`){let i=Rt(qt(e.left,t,n,r+1),e.start,`Logical operators require booleans`);return e.operator===`&&`&&!i?!1:e.operator===`||`&&i?!0:Rt(qt(e.right,t,n,r+1),e.start,`Logical operators require booleans`)}let i=qt(e.left,t,n,r+1),a=qt(e.right,t,n,r+1);switch(e.operator){case`+`:if(typeof i==`number`&&typeof a==`number`)return Ut(i+a,e.start);if(typeof i==`string`&&typeof a==`string`){let t=i+a;return t.length>mt&&Nt(`String result exceeds the length limit.`,e.start,`expression-budget`),t}Nt(`Operator "+" requires two numbers or two strings.`,e.start,`expression-type`);case`-`:case`*`:case`/`:case`%`:{let t=Lt(i,e.start,`Operator "${e.operator}" requires a number`),n=Lt(a,e.start,`Operator "${e.operator}" requires a number`);return(e.operator===`/`||e.operator===`%`)&&n===0&&Nt(`Division by zero.`,e.start,`expression-divide-by-zero`),Ut(e.operator===`-`?t-n:e.operator===`*`?t*n:e.operator===`/`?t/n:t%n,e.start)}case`==`:case`!=`:{let t=Ot(i),n=Ot(a);t!==n&&t!==`null`&&n!==`null`&&Nt(`Equality comparison requires matching types.`,e.start,`expression-type`);let r=Gt(i,a);return e.operator===`==`?r:!r}case`<`:case`<=`:case`>`:case`>=`:{let t;return typeof i==`number`&&typeof a==`number`?t=i===a?0:i<a?-1:1:typeof i==`string`&&typeof a==`string`?t=Wt(i,a):Nt(`Comparison operator "${e.operator}" requires two numbers or two strings.`,e.start,`expression-type`),e.operator===`<`?t<0:e.operator===`<=`?t<=0:e.operator===`>`?t>0:t>=0}}break}case`conditional`:return qt(Rt(qt(e.test,t,n,r+1),e.start,`Conditional test must be a boolean`)?e.consequent:e.alternate,t,n,r+1);case`array`:{let i=[];for(let a of e.elements)i.push(qt(a,t,n,r+1));return Vt(i,e.start)}case`index`:{let i=qt(e.target,t,n,r+1),a=Lt(qt(e.index,t,n,r+1),e.start,`Array index must be a number`);return Number.isSafeInteger(a)||Nt(`Array index must be a finite integer.`,e.start,`expression-index`),Array.isArray(i)||Nt(`Index access requires an array.`,e.start,`expression-type`),a<0||a>=i.length?null:i[a]}case`call`:{let i=e.args.map(e=>qt(e,t,n,r+1));switch(e.name){case`abs`:case`sqrt`:case`floor`:case`ceil`:case`round`:case`sin`:case`cos`:case`tan`:case`asin`:case`acos`:case`atan`:case`exp`:case`log`:{let t=Lt(i[0],e.start,`Function ${e.name} requires a number`);e.name===`sqrt`&&t<0&&Nt(`sqrt requires a non-negative argument.`,e.start,`expression-domain`),e.name===`log`&&t<=0&&Nt(`log requires a positive argument.`,e.start,`expression-domain`),(e.name===`asin`||e.name===`acos`)&&(t<-1||t>1)&&Nt(`${e.name} requires an argument between -1 and 1.`,e.start,`expression-domain`);let n;switch(e.name){case`abs`:n=Math.abs(t);break;case`sqrt`:n=Math.sqrt(t);break;case`floor`:n=Math.floor(t);break;case`ceil`:n=Math.ceil(t);break;case`round`:n=Math.round(t);break;case`sin`:n=Math.sin(t);break;case`cos`:n=Math.cos(t);break;case`tan`:n=Math.tan(t);break;case`asin`:n=Math.asin(t);break;case`acos`:n=Math.acos(t);break;case`atan`:n=Math.atan(t);break;case`exp`:n=Math.exp(t);break;default:n=Math.log(t)}return Ut(n,e.start)}case`min`:case`max`:{let t=Lt(i[0],e.start,`Function ${e.name} requires a number`);for(let n=1;n<i.length;n+=1){let r=Lt(i[n],e.start,`Function ${e.name} requires a number`);t=e.name===`min`?Math.min(t,r):Math.max(t,r)}return Ut(t,e.start)}case`pow`:return Ut(Lt(i[0],e.start,`Function pow requires a number`)**+Lt(i[1],e.start,`Function pow requires a number`),e.start);case`clamp`:{let t=Lt(i[0],e.start,`Function clamp requires a number`),n=Lt(i[1],e.start,`Function clamp requires a number`),r=Lt(i[2],e.start,`Function clamp requires a number`);return n>r&&Nt(`clamp lower bound cannot exceed upper bound.`,e.start,`expression-domain`),Ut(Math.min(r,Math.max(n,t)),e.start)}case`len`:{let t=i[0];if(typeof t==`string`)return tt(t);if(Array.isArray(t))return t.length;Nt(`Function len requires a string or array.`,e.start,`expression-type`)}case`contains`:{let t=i[0],n=i[1];if(typeof t==`string`)return t.includes(zt(n,e.start,`Function contains requires a string member`));if(Array.isArray(t)){if(typeof n==`string`){for(let n of t)typeof n!=`string`&&Nt(`Function contains requires a string member for a string array.`,e.start,`expression-type`);return t.includes(n)}if(typeof n==`number`&&Number.isFinite(n)){for(let n of t)typeof n!=`number`&&Nt(`Function contains requires a numeric member for a numeric array.`,e.start,`expression-type`);return t.includes(n)}Nt(`Function contains requires a string or numeric member.`,e.start,`expression-type`)}Nt(`Function contains requires a string or array.`,e.start,`expression-type`)}case`sum`:{let t=Bt(i[0],e.start,`Function sum requires a numeric array`);return Ht(e.start,()=>he(t))}case`average`:{let t=Bt(i[0],e.start,`Function average requires a numeric array`);return Ht(e.start,()=>ge(t))}case`minOf`:{let t=Bt(i[0],e.start,`Function minOf requires a numeric array`);return Ht(e.start,()=>_e(t))}case`maxOf`:{let t=Bt(i[0],e.start,`Function maxOf requires a numeric array`);return Ht(e.start,()=>ve(t))}case`formatNumber`:{let t=i[0]===null?null:Lt(i[0],e.start,`Function formatNumber requires a number or null`),n=i[1]===void 0?2:Lt(i[1],e.start,`Function formatNumber requires numeric fraction digits`),r=i[2]===void 0?`en-US`:zt(i[2],e.start,`Function formatNumber requires a string locale`),a=i[3]===void 0||Rt(i[3],e.start,`Function formatNumber requires a boolean grouping flag`);return Ht(e.start,()=>de(t,n,r,a))}case`formatPercent`:{let t=i[0]===null?null:Lt(i[0],e.start,`Function formatPercent requires a number or null`),n=i[1]===void 0?0:Lt(i[1],e.start,`Function formatPercent requires numeric fraction digits`),r=i[2]===void 0?`en-US`:zt(i[2],e.start,`Function formatPercent requires a string locale`);return Ht(e.start,()=>fe(t,n,r))}case`formatScientific`:{let t=i[0]===null?null:Lt(i[0],e.start,`Function formatScientific requires a number or null`),n=i[1]===void 0?2:Lt(i[1],e.start,`Function formatScientific requires numeric fraction digits`),r=i[2]===void 0?`en-US`:zt(i[2],e.start,`Function formatScientific requires a string locale`);return Ht(e.start,()=>pe(t,n,r))}case`formatCurrency`:{let t=i[0]===null?null:Lt(i[0],e.start,`Function formatCurrency requires a number or null`),n=i[1]===void 0?`USD`:zt(i[1],e.start,`Function formatCurrency requires a string currency code`),r=i[2]===void 0?2:Lt(i[2],e.start,`Function formatCurrency requires numeric fraction digits`),a=i[3]===void 0?`en-US`:zt(i[3],e.start,`Function formatCurrency requires a string locale`);return Ht(e.start,()=>L(t,n,r,a))}case`trim`:return Ht(e.start,()=>xe(zt(i[0],e.start,`Function trim requires a string`)));case`lower`:return Ht(e.start,()=>Se(zt(i[0],e.start,`Function lower requires a string`)));case`upper`:return Ht(e.start,()=>Ce(zt(i[0],e.start,`Function upper requires a string`)));case`startsWith`:return Ht(e.start,()=>we(zt(i[0],e.start,`Function startsWith requires a string`),zt(i[1],e.start,`Function startsWith requires a string search value`)));case`endsWith`:return Ht(e.start,()=>Te(zt(i[0],e.start,`Function endsWith requires a string`),zt(i[1],e.start,`Function endsWith requires a string search value`)));case`replace`:{let t=zt(i[0],e.start,`Function replace requires a string`),n=zt(i[1],e.start,`Function replace requires a string search value`),r=zt(i[2],e.start,`Function replace requires a string replacement`);return Ht(e.start,()=>Ee(t,n,r))}case`slice`:{let t=zt(i[0],e.start,`Function slice requires a string`),n=Lt(i[1],e.start,`Function slice requires a numeric start index`),r=i[2]===void 0?void 0:Lt(i[2],e.start,`Function slice requires a numeric end index`);return Ht(e.start,()=>Oe(t,n,r))}case`dateCompare`:{let t=zt(i[0],e.start,`Function dateCompare requires a date string`),n=zt(i[1],e.start,`Function dateCompare requires a date string`);return Ht(e.start,()=>Me(t,n))}case`dateDiff`:{let t=zt(i[0],e.start,`Function dateDiff requires a date string`),n=zt(i[1],e.start,`Function dateDiff requires a date string`),r=i[2]===void 0?`days`:zt(i[2],e.start,`Function dateDiff requires a string unit`);return Ht(e.start,()=>Ne(t,n,r))}}break}}throw new z(`expression-eval`,`Unsupported expression.`,0)}var Jt=new Map;function Yt(e){if(typeof e!=`string`)throw new z(`expression-syntax`,`Expression must be a string.`,0);if(e.length>ct)throw new z(`expression-budget`,`Expression exceeds the ${ct}-character limit.`,0);let t=Jt.get(e);if(t)return t;let n=new Et(e),r=n.parse(),i=[...n.dependencies],a=Object.freeze({source:e,dependencies:i,evaluate(e){return Kt(r,e)},inferType(e){return Mt(r,e)}});if(Jt.size>=gt){let e=Jt.keys().next().value;e!==void 0&&Jt.delete(e)}return Jt.set(e,a),a}function Xt(e){if(e.length>ht)throw new z(`expression-budget`,`Interpolation template exceeds the length limit.`,0);let t=[],n=0;for(;;){let r=e.indexOf(`{{`,n);if(r<0){n<e.length&&t.push({kind:`text`,value:e.slice(n)});break}r>n&&t.push({kind:`text`,value:e.slice(n,r)});let i=r+2,a=``,o=!1;for(;i<e.length;){let t=e[i];if(a!==``){if(t===`\\`){i+=2;continue}t===a&&(a=``),i+=1}else if(t===`"`||t===`'`)a=t,i+=1;else{if(t===`{`&&e[i+1]===`{`)throw new z(`expression-interpolation`,`Interpolations cannot be nested.`,i);if(t===`}`&&e[i+1]===`}`){o=!0;break}i+=1}}if(!o)throw new z(`expression-interpolation`,`Interpolation is missing }}.`,r);let s=e.slice(r+2,i);if(s.trim()===``)throw new z(`expression-empty`,`Interpolation expression is empty.`,r+2);t.push({kind:`expression`,source:s,start:r+2}),n=i+2}return t}function Zt(e){try{return Yt(e.source)}catch(t){throw t instanceof z?new z(t.code,t.message,e.start+t.offset):t}}function Qt(e,t,n){try{return e.evaluate(t)}catch(e){throw e instanceof z?new z(e.code,e.message,n+e.offset):e}}function $t(e,t){if(e===null)return``;if(typeof e==`string`)return e;if(typeof e==`number`){if(!Number.isFinite(e))throw new z(`expression-value`,`Cannot display a non-finite number.`,t);return String(e)}if(typeof e==`boolean`)return e?`true`:`false`;throw Array.isArray(e)?new z(`expression-type`,`Cannot insert an array as text; convert it with a function such as len first.`,t):new z(`expression-type`,`Cannot display this value as text.`,t)}function en(e,t){let n=[],r=0;for(let i of e){let e;if(e=i.kind===`text`?i.value:$t(Qt(Zt(i),t,i.start),i.start),r+=e.length,r>mt)throw new z(`expression-budget`,`Interpolation result exceeds the length limit.`,0);n.push(e)}return n.join(``)}function tn(e,t){if(typeof e!=`string`)throw new z(`expression-interpolation`,`Interpolation template must be a string.`,0);if(e.length>ht)throw new z(`expression-budget`,`Interpolation template exceeds the ${ht}-character limit.`,0);return e.includes(`{{`)?en(Xt(e),t):e}function nn(e){if(typeof e!=`string`)throw new z(`expression-interpolation`,`Interpolation template must be a string.`,0);let t=new Set;for(let n of Xt(e))if(n.kind===`expression`)for(let e of Zt(n).dependencies)t.add(e);return[...t]}var B=class extends Error{code;offset;constructor(e,t,n=0){super(t),this.name=`LatexError`,this.code=e,this.offset=n}},rn=5e4,an=2e4,on=5e3,sn=120,cn=2e4,ln=1e3,un=2e3,dn=5,fn=1e6,pn=new Set([`quad`,`qquad`,`enspace`,`thinspace`,`medspace`,`thickspace`,`negthinspace`,`displaystyle`,`textstyle`,`scriptstyle`,`scriptscriptstyle`,`limits`,`nolimits`]),mn={alpha:`alpha`,beta:`beta`,gamma:`gamma`,theta:`theta`,omega:`omega`,lambda:`lambda`,mu:`mu`,sigma:`sigma`},hn=new Set([`sin`,`cos`,`tan`,`arcsin`,`arccos`,`arctan`,`exp`,`ln`,`log`,`min`,`max`]),gn={"{":`lbrace`,"}":`rbrace`,"|":`vert`,"%":`percent`,"&":`amp`,"#":`hash`,_:`underscore`,$:`dollar`};function _n(e){let t=[],n=0,r=(e,n,r)=>{if(t.length>=an)throw new B(`latex-budget`,`Math input contains too many tokens.`,r);t.push({kind:e,value:n,offset:r})};for(;n<e.length;){let t=e[n];if(t===` `||t===` `||t===`\r`||t===`
12
12
  `)n+=1;else if(t===`%`)for(;n<e.length&&e[n]!==`
13
- `;)n+=1;else if(t===`\\`){if(n+1>=e.length)throw new B(`latex-syntax`,`Formula ends with a lone backslash.`,n);let t=e[n+1];if(t===`\\`){r(`command`,`newline`,n),n+=2;continue}if(/[A-Za-z]/.test(t)){let t=n+1;for(;t<e.length&&/[A-Za-z]/.test(e[t]);)t+=1;let i=e.slice(n+1,t);pn.has(i)||r(`command`,i,n),n=t;continue}if(t===` `||t===`,`||t===`;`||t===`:`||t===`!`){n+=2;continue}let i=gn[t];if(i){r(`command`,i,n),n+=2;continue}r(`command`,t,n),n+=2}else if(t>=`0`&&t<=`9`){let t=/^(?:\d+(?:\.\d*)?|\.\d+)/.exec(e.slice(n));r(`number`,t[0],n),n+=t[0].length}else if(t===`.`&&e[n+1]>=`0`&&e[n+1]<=`9`){let t=/^(?:\d+(?:\.\d*)?|\.\d+)/.exec(e.slice(n));r(`number`,t[0],n),n+=t[0].length}else/[A-Za-z]/.test(t)?(r(`letter`,t,n),n+=1):(r(`punct`,t,n),n+=1)}return r(`eof`,``,e.length),t}function vn(e){return Object.prototype.hasOwnProperty.call(mn,e)}function yn(e){switch(e.kind){case`number`:case`letter`:return!0;case`punct`:return e.value===`(`||e.value===`{`||e.value===`[`||e.value===`|`;case`command`:{let t=e.value;return hn.has(t)||vn(t)?!0:t===`frac`||t===`dfrac`||t===`tfrac`||t===`sqrt`||t===`left`||t===`pi`||t===`mathrm`||t===`begin`||t===`lvert`||t===`vert`||t===`lbrace`}default:return!1}}function bn(e){if(e.kind===`punct`)return e.value===`=`?`eq`:e.value===`<`?`lt`:e.value===`>`?`gt`:null;if(e.kind===`command`){if(e.value===`ne`||e.value===`neq`)return`ne`;if(e.value===`le`||e.value===`leq`)return`le`;if(e.value===`ge`||e.value===`geq`)return`ge`}return null}var xn=class{tokens;source;pos=0;nodes=0;constructor(e,t){this.source=e,this.tokens=t}parseDocument(){if(this.peek().kind===`eof`)throw new B(`latex-empty`,`Formula is empty.`,0);if(this.atLetter(`y`)&&this.atPunctAt(1,`=`)&&(this.pos+=2),this.peek().kind===`eof`)throw new B(`latex-empty`,`Missing expression after y.`,this.peek().offset);let e=this.parseAdditive(0),t=this.peek();if(t.kind!==`eof`)throw bn(t)||t.kind===`punct`&&t.value===`=`?new B(`latex-relation`,`Plots support only explicit y = f(x) equations.`,t.offset):new B(`latex-syntax`,`Unexpected token "${this.raw(t)}".`,t.offset);return e}peek(e=0){return this.tokens[Math.min(this.pos+e,this.tokens.length-1)]}take(){return this.tokens[this.pos++]}atPunct(e){let t=this.peek();return t.kind===`punct`&&t.value===e}atPunctAt(e,t){let n=this.peek(e);return n.kind===`punct`&&n.value===t}atCommand(e){let t=this.peek();return t.kind===`command`&&t.value===e}atLetter(e){let t=this.peek();return t.kind===`letter`&&t.value===e}expectPunct(e){let t=this.peek();if(t.kind!==`punct`||t.value!==e)throw new B(`latex-syntax`,`Missing "${e}".`,t.offset);return this.take()}raw(e){return e.kind===`eof`?`end of input`:e.kind===`command`?`\\${e.value}`:this.source.slice(e.offset,e.offset+Math.max(1,e.value.length))}make(e,t,n){if(this.nodes+=1,this.nodes>on)throw new B(`latex-budget`,`Formula is too complex.`,t);if(n>sn)throw new B(`latex-budget`,`Formula is nested too deeply.`,t);return e}parseAdditive(e){let t=this.parseMultiplicative(e+1,!1);for(;;){let n=this.peek();if(n.kind!==`punct`||n.value!==`+`&&n.value!==`-`)break;let r=this.take().value,i=this.parseMultiplicative(e+1,!1);t=this.make({kind:`binary`,op:r,left:t,right:i,offset:n.offset},n.offset,e)}return t}parseMultiplicative(e,t){let n=this.parseUnary(e+1,t);for(;;){let r=this.peek();if(r.kind===`punct`&&r.value===`/`){this.take();let i=this.parseUnary(e+1,t);n=this.make({kind:`binary`,op:`/`,left:n,right:i,offset:r.offset},r.offset,e);continue}if(r.kind===`punct`&&r.value===`*`||r.kind===`command`&&(r.value===`cdot`||r.value===`times`)){this.take();let i=this.parseUnary(e+1,t);n=this.make({kind:`binary`,op:`*`,left:n,right:i,offset:r.offset},r.offset,e);continue}if(t&&r.kind===`command`&&hn.has(r.value)||!yn(r))break;let i=this.parseUnary(e+1,t);n=this.make({kind:`binary`,op:`*`,left:n,right:i,offset:r.offset},r.offset,e)}return n}parseUnary(e,t){let n=this.peek();if(n.kind===`punct`&&(n.value===`+`||n.value===`-`)){this.take();let r=this.parseUnary(e+1,t);return n.value===`+`?r:this.make({kind:`unary`,op:`-`,operand:r,offset:n.offset},n.offset,e)}return this.parsePower(e,t)}parsePower(e,t){let n=this.parseAtom(e+1,t),r=this.peek();if(r.kind===`punct`&&r.value===`^`){this.take();let t=this.parseScriptArgument(e+1);return this.make({kind:`binary`,op:`^`,left:n,right:t,offset:r.offset},r.offset,e)}return n}parseScriptArgument(e){if(this.atPunct(`{`))return this.parseBraceGroup(e+1);if(this.atPunct(`+`)||this.atPunct(`-`)){let t=this.take(),n=this.parseUnary(e+1,!1);return t.value===`+`?n:this.make({kind:`unary`,op:`-`,operand:n,offset:t.offset},t.offset,e)}return this.parseUnary(e+1,!1)}parseAtom(e,t){let n=this.peek();if(n.kind===`number`){this.take();let t=Number(n.value);if(!Number.isFinite(t))throw new B(`latex-number`,`Number "${n.value}" is not finite.`,n.offset);return this.make({kind:`number`,value:t,offset:n.offset},n.offset,e)}if(n.kind===`letter`)return this.take(),this.variable(n.value,n.offset,e);if(n.kind===`punct`){if(n.value===`(`)return this.parseParenthesized(e);if(n.value===`{`)return this.parseBraceGroup(e);if(n.value===`[`)return this.parseBracketGroup(e);if(n.value===`|`)return this.parsePlainAbs(e,n.offset);throw new B(`latex-syntax`,`Cannot start an expression with "${n.value}".`,n.offset)}if(n.kind===`command`){let t=n.value;if(t===`frac`||t===`dfrac`||t===`tfrac`){this.take();let t=this.parseArgument(e+1),r=this.parseArgument(e+1);return this.make({kind:`binary`,op:`/`,left:t,right:r,offset:n.offset},n.offset,e)}if(t===`sqrt`){this.take();let t=null;this.atPunct(`[`)&&(this.take(),t=this.parseAdditive(e+1),this.expectPunct(`]`));let r=this.parseArgument(e+1);return this.make({kind:`call`,name:`sqrt`,args:[r],base:t,power:null,offset:n.offset},n.offset,e)}if(t===`left`)return this.parseLeft(e);if(hn.has(t))return this.parseFunction(t,e);if(t===`pi`)return this.take(),this.make({kind:`constant`,value:`pi`,offset:n.offset},n.offset,e);if(vn(t))return this.take(),this.variable(mn[t],n.offset,e);if(t===`mathrm`){this.take();let t=this.readRawGroup();if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(t.raw))throw new B(`latex-name`,`\\mathrm requires a valid parameter name.`,t.offset);return this.variable(t.raw,n.offset,e)}if(t===`begin`)return this.parseCases(e);if(t===`lvert`||t===`vert`)return this.parseCommandAbs(e,n.offset);throw t===`right`?new B(`latex-syntax`,`\\right has no matching \\left.`,n.offset):t===`text`?new B(`latex-unsupported`,`\\text is only allowed as the otherwise condition of a piecewise function.`,n.offset):new B(`latex-unsupported`,`Command \\${t} is not supported for computation.`,n.offset)}throw new B(`latex-syntax`,`Expression is incomplete.`,n.offset)}parseArgument(e){if(this.atPunct(`{`))return this.parseBraceGroup(e+1);if(this.peek().kind===`eof`)throw new B(`latex-syntax`,`Command is missing an argument.`,this.peek().offset);return this.parseUnary(e+1,!1)}parseParenthesized(e){let t=this.expectPunct(`(`);if(this.atPunct(`)`))throw new B(`latex-syntax`,`Missing expression inside parentheses.`,t.offset);let n=this.parseAdditive(e+1);return this.expectPunct(`)`),n}parseBraceGroup(e){let t=this.expectPunct(`{`);if(this.atPunct(`}`))throw new B(`latex-syntax`,`Missing expression inside braces.`,t.offset);let n=this.parseAdditive(e+1);return this.expectPunct(`}`),n}parseBracketGroup(e){let t=this.expectPunct(`[`);if(this.atPunct(`]`))throw new B(`latex-syntax`,`Missing expression inside brackets.`,t.offset);let n=this.parseAdditive(e+1);return this.expectPunct(`]`),n}parsePlainAbs(e,t){if(this.take(),this.atPunct(`|`))throw new B(`latex-syntax`,`Absolute value is missing its contents.`,t);let n=this.parseAdditive(e+1);if(this.atPunct(`|`))this.take();else if(this.atCommand(`rvert`))this.take();else throw new B(`latex-syntax`,`Unpaired absolute value bar.`,t);return this.make({kind:`abs`,value:n,offset:t},t,e)}parseCommandAbs(e,t){if(this.take(),this.atCommand(`rvert`)||this.atCommand(`vert`)||this.atPunct(`|`))throw new B(`latex-syntax`,`Absolute value is missing its contents.`,t);let n=this.parseAdditive(e+1);if(this.atCommand(`rvert`)||this.atCommand(`vert`)||this.atPunct(`|`))this.take();else throw new B(`latex-syntax`,`Unpaired absolute value bar.`,t);return this.make({kind:`abs`,value:n,offset:t},t,e)}parseLeft(e){let t=this.take(),n=this.readDelimiter(),r=this.parseAdditive(e+1);if(!this.atCommand(`right`))throw new B(`latex-syntax`,`\\left has no matching \\right.`,t.offset);this.take();let i=this.readDelimiter();if(n===`|`&&i!==`|`)throw new B(`latex-syntax`,`Unpaired absolute value bar.`,t.offset);return n===`|`?this.make({kind:`abs`,value:r,offset:t.offset},t.offset,e):r}readDelimiter(){let e=this.peek();if(e.kind===`punct`&&(e.value===`(`||e.value===`)`||e.value===`[`||e.value===`]`||e.value===`|`||e.value===`.`))return this.take(),e.value;if(e.kind===`command`&&(e.value===`lbrace`||e.value===`rbrace`||e.value===`lvert`||e.value===`rvert`||e.value===`vert`||e.value===`Vert`))return this.take(),e.value===`lbrace`||e.value===`rbrace`?`{`:e.value===`lvert`||e.value===`rvert`||e.value===`vert`?`|`:`Vert`;throw new B(`latex-syntax`,`Missing delimiter after \\left/\\right.`,e.offset)}variable(e,t,n){if(e===`y`)throw new B(`latex-name`,`y is the plot output marker and cannot appear in the expression.`,t);return e===`e`||e===`pi`?this.make({kind:`constant`,value:e,offset:t},t,n):this.make({kind:`variable`,name:e,offset:t},t,n)}parseFunction(e,t){let n=this.take().offset,r=null,i=null;e===`log`&&this.atPunct(`_`)&&(this.take(),r=this.parseScriptArgument(t+1)),this.atPunct(`^`)&&(this.take(),i=this.parseScriptArgument(t+1));let a=[];if((e===`min`||e===`max`)&&this.atPunct(`(`)){if(this.take(),this.atPunct(`)`))throw new B(`latex-syntax`,`\\${e} requires at least one argument.`,n);for(a.push(this.parseAdditive(t+1));this.atPunct(`,`);)this.take(),a.push(this.parseAdditive(t+1));this.expectPunct(`)`)}else a.push(this.parseFunctionArgument(t+1));return this.make({kind:`call`,name:e,args:a,base:r,power:i,offset:n},n,t)}parseFunctionArgument(e){if(this.atPunct(`(`)){this.take();let t=this.parseAdditive(e+1);return this.expectPunct(`)`),t}return this.parseMultiplicative(e+1,!0)}parseCases(e){let t=this.take(),n=this.readRawGroup();if(n.raw.trim()!==`cases`)throw new B(`latex-unsupported`,`Environment "${n.raw.trim()}" is not supported.`,n.offset);let r=[];for(;!this.atCommand(`end`);){if(this.peek().kind===`eof`)throw new B(`latex-syntax`,`cases environment is missing \\end{cases}.`,t.offset);if(this.atCommand(`newline`)){this.take();continue}let n=this.parseAdditive(e+1);this.atPunct(`,`)&&this.take();let i=null;if(this.atPunct(`&`)&&(this.take(),i=this.parseCaseCondition(e+1),this.atPunct(`,`)&&this.take()),r.push({value:n,when:i}),this.atCommand(`newline`)){this.take();continue}if(this.atCommand(`end`))break;let a=this.peek();throw new B(`latex-syntax`,`Unexpected "${this.raw(a)}" after a cases branch.`,a.offset)}let i=this.take();if(this.readRawGroup().raw.trim()!==`cases`)throw new B(`latex-syntax`,`\\begin{cases} must be closed with \\end{cases}.`,i.offset);if(r.length===0)throw new B(`latex-syntax`,`cases environment has no branches.`,t.offset);return this.make({kind:`cases`,branches:r,offset:t.offset},t.offset,e)}parseCaseCondition(e){if(this.atCommand(`text`)){let e=this.take(),t=this.readRawGroup();if(t.raw.trim()!==`otherwise`)throw new B(`latex-unsupported`,`Unsupported piecewise condition text "${t.raw.trim()}".`,e.offset);return null}let t=this.parseAdditive(e+1),n=this.peek(),r=bn(n);if(!r)throw new B(`latex-syntax`,`Piecewise condition requires one comparison.`,n.offset);return this.take(),{op:r,left:t,right:this.parseAdditive(e+1)}}readRawGroup(){let e=this.expectPunct(`{`),t=1,n=this.pos;for(;n<this.tokens.length;n+=1){let e=this.tokens[n];if(e.kind===`eof`)break;if(e.kind===`punct`){if(e.value===`{`)t+=1;else if(e.value===`}`&&(--t,t===0))break}}if(n>=this.tokens.length||this.tokens[n].kind===`eof`)throw new B(`latex-syntax`,`Unclosed brace.`,e.offset);let r=this.tokens[n];return this.pos=n+1,{raw:this.source.slice(e.offset+1,r.offset),offset:e.offset+1}}};function Sn(e,t){switch(e.kind){case`variable`:e.name!==`x`&&t.add(e.name);return;case`number`:case`constant`:return;case`unary`:Sn(e.operand,t);return;case`binary`:Sn(e.left,t),Sn(e.right,t);return;case`abs`:Sn(e.value,t);return;case`call`:e.base&&Sn(e.base,t),e.power&&Sn(e.power,t);for(let n of e.args)Sn(n,t);return;case`cases`:for(let n of e.branches)Sn(n.value,t),n.when&&(Sn(n.when.left,t),Sn(n.when.right,t));return}}function Cn(e,t,n){throw new B(e,t,n)}function wn(e,t){return Number.isFinite(e)||Cn(`latex-number`,`Result is not finite.`,t),e}function Tn(e,t,n){if(e===`x`)return t.x;let r=t.env[e];return r===void 0&&!Object.prototype.hasOwnProperty.call(t.env,e)&&Cn(`latex-variable`,`Parameter "${e}" is not declared.`,n),typeof r==`number`&&Number.isFinite(r)||Cn(`latex-type`,`Parameter "${e}" must be a finite number.`,n),r}function En(e,t,n){return e===0&&t<0&&Cn(`latex-divide-by-zero`,`Negative powers of zero are undefined.`,n),e<0&&!Number.isInteger(t)&&Cn(`latex-domain`,`A negative base with a non-integer exponent is not real.`,n),wn(e**+t,n)}function Dn(e,t,n){let r=t??2;return(!Number.isFinite(r)||r<=0)&&Cn(`latex-domain`,`Root index must be positive.`,n),e<0?(Number.isInteger(r)&&r%2!=0||Cn(`latex-domain`,`A negative number has no real even root.`,n),wn(r===3?-Math.cbrt(-e):-((-e)**(1/r)),n)):wn(e**(1/r),n)}function On(e,t){let n=An(e.left,t),r=An(e.right,t);switch(e.op){case`eq`:return n===r;case`ne`:return n!==r;case`lt`:return n<r;case`le`:return n<=r;case`gt`:return n>r;case`ge`:return n>=r;default:return!1}}function kn(e,t){let n=e.args.map(e=>An(e,t)),r=0;switch(e.name){case`sin`:r=Math.sin(n[0]);break;case`cos`:r=Math.cos(n[0]);break;case`tan`:Math.abs(Math.cos(n[0]))<1e-15&&Cn(`latex-domain`,`tan is undefined at this point.`,e.offset),r=Math.tan(n[0]);break;case`arcsin`:(n[0]<-1||n[0]>1)&&Cn(`latex-domain`,`arcsin argument must be in [-1, 1].`,e.offset),r=Math.asin(n[0]);break;case`arccos`:(n[0]<-1||n[0]>1)&&Cn(`latex-domain`,`arccos argument must be in [-1, 1].`,e.offset),r=Math.acos(n[0]);break;case`arctan`:r=Math.atan(n[0]);break;case`exp`:r=Math.exp(n[0]);break;case`ln`:n[0]<=0&&Cn(`latex-domain`,`ln argument must be positive.`,e.offset),r=Math.log(n[0]);break;case`log`:{let i=e.base?An(e.base,t):10;(i<=0||i===1)&&Cn(`latex-domain`,`Logarithm base must be positive and not equal to 1.`,e.offset),n[0]<=0&&Cn(`latex-domain`,`Logarithm argument must be positive.`,e.offset),r=Math.log(n[0])/Math.log(i);break}case`min`:r=Math.min(...n);break;case`max`:r=Math.max(...n);break;case`sqrt`:r=Dn(n[0],e.base?An(e.base,t):null,e.offset);break;default:Cn(`latex-unsupported`,`Unsupported function.`,e.offset)}return e.power&&(r=En(r,An(e.power,t),e.offset)),wn(r,e.offset)}function An(e,t){let n=e.offset;t.steps+=1,t.depth+=1;try{switch(t.steps>t.limit&&Cn(`latex-budget`,`Math evaluation exceeded its budget.`,n),t.depth>ln&&Cn(`latex-budget`,`Math evaluation is nested too deeply.`,n),e.kind){case`number`:return e.value;case`constant`:return e.value===`pi`?Math.PI:Math.E;case`variable`:return Tn(e.name,t,e.offset);case`unary`:{let n=An(e.operand,t);return e.op===`-`?-n:n}case`binary`:{let n=An(e.left,t),r=An(e.right,t);switch(e.op){case`+`:return wn(n+r,e.offset);case`-`:return wn(n-r,e.offset);case`*`:return wn(n*r,e.offset);case`/`:return r===0&&Cn(`latex-divide-by-zero`,`Division by zero.`,e.offset),wn(n/r,e.offset);case`^`:return En(n,r,e.offset)}break}case`abs`:return wn(Math.abs(An(e.value,t)),e.offset);case`call`:return kn(e,t);case`cases`:for(let n of e.branches)if(n.when===null||On(n.when,t))return An(n.value,t);Cn(`latex-undefined`,`No piecewise branch matched.`,e.offset)}Cn(`latex-unsupported`,`Cannot compute this math structure.`,n)}finally{--t.depth}}var jn=new Map;function Mn(e){if(typeof e!=`string`)throw new B(`latex-syntax`,`Math source must be a string.`,0);if(e.length>rn)throw new B(`latex-budget`,`Formula exceeds the length limit.`,rn);let t=jn.get(e);if(t)return t;let n=new xn(e,_n(e)).parseDocument(),r=new Set;Sn(n,r);let i={source:e,dependencies:[...r],evaluate(e,t,r){if(typeof e!=`number`||!Number.isFinite(e))throw new B(`latex-variable`,`Plot input x must be a finite number.`,0);let i={x:e,env:t??{},steps:r?.steps??0,limit:r?.limit??cn,depth:0};try{return An(n,i)}finally{r&&(r.steps=i.steps)}}};return jn.size>=512&&jn.clear(),jn.set(e,i),i}function Nn(e,t,n,r){try{return e.evaluate(t,n,r)}catch(e){if(e instanceof B){if(e.code===`latex-budget`)throw e;return null}throw e}}function Pn(e){if(e.length===0)return 0;let t=[...e].sort((e,t)=>e-t);return t[Math.floor(t.length/2)]}function Fn(e,t,n,r,i,a){let o=n-e;if(!(o>0))return!1;let s=0,c=0;for(let i=1;i<=dn;i+=1){let l=1<<i,u=o/l,d=t,f=0;for(let t=1;t<=l;t+=1){let i=t===l?n:e+t*u,o=t===l?r:a(i);if(o===null)return!0;let s=Math.abs(o-d)/u;s>f&&(f=s),d=o}i===2&&(s=f),c=f}return c>Math.max(s*6,i*12,1e-9)}function In(e,t,n,r,i=200,a){if(!Number.isFinite(n)||!Number.isFinite(r))throw new B(`latex-plot-range`,`Plot min/max must be finite numbers.`,0);if(!(n<r))throw new B(`latex-plot-range`,`Plot min must be less than max.`,0);if(!Number.isInteger(i)||i<2||i>un)throw new B(`latex-plot-samples`,`Sample count must be an integer between 2 and ${un}.`,0);let o={steps:0,limit:Math.max(fn,i*1024)},s=n=>{let r=o.limit-o.steps,i=a?Number.isFinite(a.limit)&&Number.isFinite(a.steps)?a.limit-a.steps:0:1/0,s={steps:0,limit:Math.max(0,Math.min(r,i))};try{return Nn(e,n,t,s)}finally{o.steps+=s.steps,a&&(a.steps=Number.isFinite(a.steps)?a.steps+s.steps:s.steps)}},c=(r-n)/(i-1),l=[];for(let e=0;e<i;e+=1){let t=e===i-1?r:n+e*c;l.push({x:t,y:s(t)})}let u=l.map(e=>e.y).filter(e=>e!==null).map(e=>Math.abs(e)),d=Math.max(1e-9,Pn(u)*8);for(let e=1;e<l.length-1;e+=1){let t=l[e-1].y,n=l[e].y,r=l[e+1].y;t!==null&&n!==null&&r!==null&&Math.abs(n)>Math.max(1,Math.abs(t),Math.abs(r))*100&&Math.abs(n)>d&&(l[e]={x:l[e].x,y:null})}let f=l.length-1,p=l[f].y,m=f>0?l[f-1].y:null;p!==null&&m!==null&&Math.abs(p)>Math.max(1,Math.abs(m))*100&&Math.abs(p)>d&&(p=null,l[f]={x:l[f].x,y:null});let h=[],g=[];for(let e=0;e<l.length-1;e+=1){let t=l[e],n=l[e+1];if(t.y===null||n.y===null)continue;let r=Math.abs(n.y-t.y);h.push(r);let i=n.x-t.x;i>0&&g.push(r/i)}let _=Pn(h),v=Pn(g);for(let e=0;e<l.length-1;e+=1){let t=l[e],n=l[e+1],r=t.y,i=n.y;if(r===null||i===null)continue;let a=()=>{l[e+1]={x:n.x,y:null}},o=s(t.x+(n.x-t.x)/2);if(o===null){a();continue}let c=Math.abs(i-r);(Math.abs(o-(r+i)/2)>Math.max(c*.25,_*.4,1e-9)||c>Math.max(_*16,1e-9))&&Fn(t.x,r,n.x,i,v,e=>s(e))&&a()}return{points:l,endpoint:p}}var Ln=new Map,Rn=new Set([`table`,`chart`,`plot`,`timeline`,`diagram`]),zn=new WeakMap,Bn=new WeakMap;function Vn(e){let t=e.snapshot().revision,n=Bn.get(e);if(n?.revision===t)return n.tokens;let r=new Map,i=t=>{let n=e.resetToken(t);for(let e of t.children??[])n+=i(e);return r.set(t.id,n),n};for(let t of e.document.nodes)i(t);return Bn.set(e,{revision:t,tokens:r}),r}function Hn(e,t){for(let n of t)e.add(n)}function Un(e){let t=zn.get(e);if(t!==void 0)return t;let n=e.dependencies;if(n!==void 0){let t=new Map(Object.entries(n));return zn.set(e,t),t}let r=new Map,i=t=>{let n=new Set,a=!1;if(t.attrs!==void 0)for(let e of Object.values(t.attrs))try{Hn(n,nn(e))}catch{a=!0;break}if(!a){if(t.type===`interpolation`)try{Hn(n,Yt(t.value??``).dependencies)}catch{a=!0}else if(t.type===`math`)try{Hn(n,Mn(t.value??``).dependencies)}catch{a=!0}else if(t.name!==void 0){if(t.name===`table`||t.name===`chart`)(t.attrs?.key??``).trim()!==``&&n.add(x(t));else if(t.name===`diagram`)n.add(x(t));else if(t.name===`plot`)for(let e of t.children??[]){if(e.type!==`inlineMath`)continue;let t=(e.value??``).trim();if(/^y\s*=/u.test(t))try{Hn(n,Mn(t).dependencies)}catch{}}else if(!Rn.has(t.name)){n.add(x(t));let r=e.bindingSlots?.[t.id];if(r!==void 0)for(let e of Object.values(r))n.add(e)}}}let o=!1;for(let e of t.children??[]){let t=i(e);t===null?o=!0:Hn(n,t)}let s=a||o?null:[...n];return r.set(t.id,s),s};for(let t of e.nodes)i(t);return zn.set(e,r),r}function Wn(e){if(e.dependencies!==void 0)return;let t=Un(e),n=Object.create(null);for(let[e,r]of t)n[e]=r===null?null:Object.freeze([...r]);e.dependencies=Object.freeze(n)}var Gn=new Set(`aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkgrey.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkslategrey.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dimgrey.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.green.greenyellow.grey.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightgrey.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightslategrey.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.slategrey.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen`.split(`.`)),Kn=/^#(?:[0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;function qn(e){return typeof e==`string`?Kn.test(e)||Gn.has(e.toLowerCase()):!1}function Jn(e,t,n,r=`local.expression`){t instanceof R?e(`${r}.${t.code||`invalid`}`,`Expression error: ${t.message}`,n+(Number.isFinite(t.offset)?t.offset:0)):e(`${r}.invalid`,`Expression error: ${t instanceof Error?t.message:String(t)}`,n)}function Yn(e){return e instanceof R?e:new R(`expression-eval`,e instanceof Error?e.message:String(e),0)}function Xn(e,t){let n=new Set(e),r=new Map,i=new Map;for(let t of e)r.set(t,0);for(let a of e)for(let e of t(a)){if(!n.has(e))continue;r.set(a,(r.get(a)??0)+1);let t=i.get(e);t?t.push(a):i.set(e,[a])}let a=[];for(let t of e)(r.get(t)??0)===0&&a.push(t);let o=[];for(let e=0;e<a.length;e+=1){let t=a[e];o.push(t);for(let e of i.get(t)??[]){let t=(r.get(e)??0)-1;r.set(e,t),t===0&&a.push(e)}}let s=new Set(o);return{order:o,cyclic:e.filter(e=>!s.has(e))}}function Zn(e){let t=Object.keys(e),n=new Set(t);return Xn(t,t=>{let r=e[t];return r?r.dependencies.filter(e=>n.has(e)):[]})}function Qn(e,t,n){let r=new Map,i=new Map,a=new Map,o=[],s=new Set;for(let t of e)a.has(t.name)||(a.set(t.name,t),o.push(t.name));let c=new Set(o);for(let e of o){let t=a.get(e),o;try{o=Yt(t.source)}catch(r){Jn(n,r,t.expressionOffset),s.add(e);continue}r.set(e,o),i.set(e,[...o.dependencies])}for(let e of o)if(!s.has(e)){for(let r of i.get(e)??[])if(!(c.has(r)||Object.hasOwn(t,r))){n(`local.computation.unknown`,`Reference to undeclared parameter ${r} in computation "${e}".`,a.get(e).expressionOffset+Math.max(0,a.get(e).source.indexOf(r))),s.add(e);break}}let l=new Set;for(let e of o){if(s.has(e))continue;let r=a.get(e);if(r.kind===`const`)for(let o of i.get(e)??[]){let i=c.has(o)?a.get(o).kind:null;Object.hasOwn(t,o)?(n(`local.computation.const`,`Constant "${e}" cannot depend on control parameter "${o}".`,r.expressionOffset+Math.max(0,r.source.indexOf(o))),l.add(e)):i===`computed`&&(n(`local.computation.const`,`Constant "${e}" cannot depend on computed value "${o}".`,r.expressionOffset+Math.max(0,r.source.indexOf(o))),l.add(e))}}let{order:u,cyclic:d}=Xn(o,e=>i.get(e)??[]);if(d.length>0){let e=new Set(d),t=[],r=new Map,o=d[0];for(;!r.has(o);){r.set(o,t.length),t.push(o);let n=(i.get(o)??[]).find(t=>e.has(t));if(n===void 0)break;o=n}let c=r.has(o)?t.slice(r.get(o)):[d[0]],l=c.slice(0,12).join(` → `)+(c.length>12?` → …`:` → ${c[0]}`);for(let e of c.slice(0,100)){let t=a.get(e);n(`local.computation.cycle`,`Computation "${e}" is part of a dependency cycle: ${l}.`,t.range.start,t.range.end)}for(let e of d)s.add(e)}for(let e of u)if(!s.has(e)&&!(a.get(e).kind!==`const`||l.has(e))&&(i.get(e)??[]).some(e=>c.has(e)?a.get(e).kind===`const`&&l.has(e):!1)){let t=a.get(e);n(`local.computation.const`,`Constant "${e}" indirectly depends on a value that is not a constant.`,t.expressionOffset),l.add(e)}let f={},p={...t};for(let e of u){if(s.has(e))continue;let t=a.get(e);if((i.get(e)??[]).some(e=>s.has(e))){s.add(e);continue}let o=r.get(e);try{let t=o.inferType(p);f[e]=t,p[e]=t}catch(r){Jn(n,r,t.expressionOffset),s.add(e)}}let m={},h={};for(let e of u){if(s.has(e)||a.get(e).kind!==`const`||l.has(e))continue;let t=a.get(e),i=r.get(e);try{let r=i.evaluate(h),a=bt(r);if(a){n(`local.computation.budget`,`Constant "${e}": ${a}`,t.expressionOffset),s.add(e);continue}m[e]=Array.isArray(r)?r.slice():r,h[e]=m[e]}catch(r){let i=Yn(r);n(`local.computation.expression`,`Constant "${e}" cannot be evaluated: ${i.message}`,t.expressionOffset+(Number.isFinite(i.offset)?i.offset:0)),s.add(e)}}let g={};for(let e of o){let t=a.get(e);if(s.has(e)||f[e]===void 0)continue;let n={name:e,kind:t.kind,source:t.source,dependencies:[...i.get(e)??[]],type:f[e],nodeId:t.nodeId,range:{...t.range}};t.kind===`const`&&Object.hasOwn(m,e)&&(n.value=m[e]),g[e]=n}return{computations:g,kinds:f,order:u.filter(e=>!s.has(e)),expressions:r,constValues:m}}function $n(e,t,n,r,i){let a={},o=new Map,s={};for(let[e,t]of Object.entries(r))s[e]=t;for(let[e,t]of Object.entries(i))a[e]=t,s[e]=t;for(let r of t){let t=e[r];if(!t||t.kind===`const`)continue;let i=n.get(r);if(i)try{let e=i.evaluate(s),t=bt(e);if(t)throw new R(`expression-budget`,t,0);a[r]=e,s[r]=e}catch(e){let t=Yn(e);o.set(r,t),Object.defineProperty(s,r,{enumerable:!0,configurable:!0,get(){throw t}})}}return{values:a,errors:o}}function er(e,t){return(e??[]).map(e=>{switch(e.type){case`text`:case`inlineCode`:case`inlineMath`:case`fallback`:return e.value??``;case`image`:return e.alt??``;case`break`:return` `;case`interpolation`:try{let n=Yt(e.value??``).evaluate(t);return Array.isArray(n)?`Cannot compute`:n===null?``:String(n)}catch{return`Cannot compute`}default:return er(e.children,t)}}).join(``)}function tr(e){return e.trim().toLowerCase().replace(/[^\p{L}\p{N}\p{M}\s_-]/gu,``).replace(/\s+/g,`-`)||`section`}function nr(e){if(e.type!==`component`||e.name!==`anchor`)return;let t=e.attrs?.id;if(typeof t==`string`&&t.length!==0)return/^[A-Za-z_][A-Za-z0-9_-]*$/.test(t)?t:void 0}function rr(e,t,n=!0){let r=e.initialState;if(e.computations){let t={},n=new Map;for(let[r,i]of Object.entries(e.computations)){i.kind===`const`&&Object.hasOwn(i,`value`)&&(t[r]=i.value);try{n.set(r,Yt(i.source))}catch{}}let{order:i}=Zn(e.computations),a=$n(e.computations,i,n,r,t);r={...r,...a.values}}let i=new Map,a=new Map,o=new Map,s=new Map;function c(e){let n=e,r=s.get(e)??0;for(;o.has(n);)r+=1,n=`${e}-${r}`;s.set(e,r);let i=`${t}-${n}`;return o.set(n,i),{slug:n,id:i}}function l(e){for(let t of e){if(t.type===`heading`){let e=tr(er(t.children,r));i.set(t,c(e).id)}else if(n){let e=nr(t);e&&a.set(t,c(e).id)}t.children&&l(t.children)}}l(e.nodes);function u(e){if(e.length===0)return;let t=o.get(e);if(t)return t;try{return o.get(decodeURIComponent(e))}catch{return}}return{ids:i,anchorIds:a,targetId(e){return u(e)},resolve(e){if(!e.startsWith(`#`))return e;let t=u(e.slice(1));return t?`#${t}`:e}}}function ir(e){if(e)throw e}var ar=s(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function or(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function sr(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?cr(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function cr(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}function lr(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?dr(e.position):`start`in e||`end`in e?dr(e):`line`in e||`column`in e?ur(e):``}function ur(e){return fr(e&&e.line)+`:`+fr(e&&e.column)}function dr(e){return ur(e&&e.start)+`-`+ur(e&&e.end)}function fr(e){return e&&typeof e==`number`?e:1}var pr=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=lr(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};pr.prototype.file=``,pr.prototype.name=``,pr.prototype.reason=``,pr.prototype.message=``,pr.prototype.stack=``,pr.prototype.column=void 0,pr.prototype.line=void 0,pr.prototype.ancestors=void 0,pr.prototype.cause=void 0,pr.prototype.fatal=void 0,pr.prototype.place=void 0,pr.prototype.ruleId=void 0,pr.prototype.source=void 0;var mr={basename:hr,dirname:gr,extname:_r,join:vr,sep:`/`};function hr(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);xr(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function gr(e){if(xr(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function _r(e){xr(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function vr(...e){let t=-1,n;for(;++t<e.length;)xr(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:yr(n)}function yr(e){xr(e);let t=e.codePointAt(0)===47,n=br(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function br(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function xr(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Sr={cwd:Cr};function Cr(){return`/`}function wr(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Tr(e){if(typeof e==`string`)e=new URL(e);else if(!wr(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Er(e)}function Er(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Dr=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Or=class{constructor(e){let t;t=e?wr(e)?{path:e}:typeof e==`string`||Mr(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Sr.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Dr.length;){let e=Dr[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Dr.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?mr.basename(this.path):void 0}set basename(e){Ar(e,`basename`),kr(e,`basename`),this.path=mr.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?mr.dirname(this.path):void 0}set dirname(e){jr(this.basename,`dirname`),this.path=mr.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?mr.extname(this.path):void 0}set extname(e){if(kr(e,`extname`),jr(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=mr.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){wr(e)&&(e=Tr(e)),Ar(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?mr.basename(this.path,this.extname):void 0}set stem(e){Ar(e,`stem`),kr(e,`stem`),this.path=mr.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new pr(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function kr(e,t){if(e&&e.includes(mr.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+mr.sep+"`")}function Ar(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function jr(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Mr(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Nr=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Pr=u(ar(),1),Fr={}.hasOwnProperty,Ir=new class e extends Nr{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=sr()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Pr.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(zr(`data`,this.frozen),this.namespace[e]=t,this):Fr.call(this.namespace,e)&&this.namespace[e]||void 0:e?(zr(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Hr(e),n=this.parser||this.Parser;return Lr(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Lr(`process`,this.parser||this.Parser),Rr(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Hr(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Wr(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Lr(`processSync`,this.parser||this.Parser),Rr(`processSync`,this.compiler||this.Compiler),this.process(e,r),Vr(`processSync`,`process`,t),n;function r(e,r){t=!0,ir(e),n=r}}run(e,t,n){Br(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Hr(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Vr(`runSync`,`run`,n),r;function i(e,t){ir(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Hr(t),r=this.compiler||this.Compiler;return Rr(`stringify`,r),Br(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(zr(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Pr.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];or(o)&&or(r)&&(r=(0,Pr.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Lr(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Rr(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function zr(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Br(e){if(!or(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Vr(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Hr(e){return Ur(e)?e:new Or(e)}function Ur(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Wr(e){return typeof e==`string`||Gr(e)}function Gr(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Kr={};function qr(e,t){let n=t||Kr;return Jr(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function Jr(e,t,n){if(Xr(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Yr(e.children,t,n)}return Array.isArray(e)?Yr(e,t,n):``}function Yr(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Jr(e[i],t,n);return r.join(``)}function Xr(e){return!!(e&&typeof e==`object`)}var Zr={AElig:`Æ`,AMP:`&`,Aacute:`Á`,Abreve:`Ă`,Acirc:`Â`,Acy:`А`,Afr:`𝔄`,Agrave:`À`,Alpha:`Α`,Amacr:`Ā`,And:`⩓`,Aogon:`Ą`,Aopf:`𝔸`,ApplyFunction:`⁡`,Aring:`Å`,Ascr:`𝒜`,Assign:`≔`,Atilde:`Ã`,Auml:`Ä`,Backslash:`∖`,Barv:`⫧`,Barwed:`⌆`,Bcy:`Б`,Because:`∵`,Bernoullis:`ℬ`,Beta:`Β`,Bfr:`𝔅`,Bopf:`𝔹`,Breve:`˘`,Bscr:`ℬ`,Bumpeq:`≎`,CHcy:`Ч`,COPY:`©`,Cacute:`Ć`,Cap:`⋒`,CapitalDifferentialD:`ⅅ`,Cayleys:`ℭ`,Ccaron:`Č`,Ccedil:`Ç`,Ccirc:`Ĉ`,Cconint:`∰`,Cdot:`Ċ`,Cedilla:`¸`,CenterDot:`·`,Cfr:`ℭ`,Chi:`Χ`,CircleDot:`⊙`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,ClockwiseContourIntegral:`∲`,CloseCurlyDoubleQuote:`”`,CloseCurlyQuote:`’`,Colon:`∷`,Colone:`⩴`,Congruent:`≡`,Conint:`∯`,ContourIntegral:`∮`,Copf:`ℂ`,Coproduct:`∐`,CounterClockwiseContourIntegral:`∳`,Cross:`⨯`,Cscr:`𝒞`,Cup:`⋓`,CupCap:`≍`,DD:`ⅅ`,DDotrahd:`⤑`,DJcy:`Ђ`,DScy:`Ѕ`,DZcy:`Џ`,Dagger:`‡`,Darr:`↡`,Dashv:`⫤`,Dcaron:`Ď`,Dcy:`Д`,Del:`∇`,Delta:`Δ`,Dfr:`𝔇`,DiacriticalAcute:`´`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,DiacriticalGrave:"`",DiacriticalTilde:`˜`,Diamond:`⋄`,DifferentialD:`ⅆ`,Dopf:`𝔻`,Dot:`¨`,DotDot:`⃜`,DotEqual:`≐`,DoubleContourIntegral:`∯`,DoubleDot:`¨`,DoubleDownArrow:`⇓`,DoubleLeftArrow:`⇐`,DoubleLeftRightArrow:`⇔`,DoubleLeftTee:`⫤`,DoubleLongLeftArrow:`⟸`,DoubleLongLeftRightArrow:`⟺`,DoubleLongRightArrow:`⟹`,DoubleRightArrow:`⇒`,DoubleRightTee:`⊨`,DoubleUpArrow:`⇑`,DoubleUpDownArrow:`⇕`,DoubleVerticalBar:`∥`,DownArrow:`↓`,DownArrowBar:`⤓`,DownArrowUpArrow:`⇵`,DownBreve:`̑`,DownLeftRightVector:`⥐`,DownLeftTeeVector:`⥞`,DownLeftVector:`↽`,DownLeftVectorBar:`⥖`,DownRightTeeVector:`⥟`,DownRightVector:`⇁`,DownRightVectorBar:`⥗`,DownTee:`⊤`,DownTeeArrow:`↧`,Downarrow:`⇓`,Dscr:`𝒟`,Dstrok:`Đ`,ENG:`Ŋ`,ETH:`Ð`,Eacute:`É`,Ecaron:`Ě`,Ecirc:`Ê`,Ecy:`Э`,Edot:`Ė`,Efr:`𝔈`,Egrave:`È`,Element:`∈`,Emacr:`Ē`,EmptySmallSquare:`◻`,EmptyVerySmallSquare:`▫`,Eogon:`Ę`,Eopf:`𝔼`,Epsilon:`Ε`,Equal:`⩵`,EqualTilde:`≂`,Equilibrium:`⇌`,Escr:`ℰ`,Esim:`⩳`,Eta:`Η`,Euml:`Ë`,Exists:`∃`,ExponentialE:`ⅇ`,Fcy:`Ф`,Ffr:`𝔉`,FilledSmallSquare:`◼`,FilledVerySmallSquare:`▪`,Fopf:`𝔽`,ForAll:`∀`,Fouriertrf:`ℱ`,Fscr:`ℱ`,GJcy:`Ѓ`,GT:`>`,Gamma:`Γ`,Gammad:`Ϝ`,Gbreve:`Ğ`,Gcedil:`Ģ`,Gcirc:`Ĝ`,Gcy:`Г`,Gdot:`Ġ`,Gfr:`𝔊`,Gg:`⋙`,Gopf:`𝔾`,GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterGreater:`⪢`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Gscr:`𝒢`,Gt:`≫`,HARDcy:`Ъ`,Hacek:`ˇ`,Hat:`^`,Hcirc:`Ĥ`,Hfr:`ℌ`,HilbertSpace:`ℋ`,Hopf:`ℍ`,HorizontalLine:`─`,Hscr:`ℋ`,Hstrok:`Ħ`,HumpDownHump:`≎`,HumpEqual:`≏`,IEcy:`Е`,IJlig:`IJ`,IOcy:`Ё`,Iacute:`Í`,Icirc:`Î`,Icy:`И`,Idot:`İ`,Ifr:`ℑ`,Igrave:`Ì`,Im:`ℑ`,Imacr:`Ī`,ImaginaryI:`ⅈ`,Implies:`⇒`,Int:`∬`,Integral:`∫`,Intersection:`⋂`,InvisibleComma:`⁣`,InvisibleTimes:`⁢`,Iogon:`Į`,Iopf:`𝕀`,Iota:`Ι`,Iscr:`ℐ`,Itilde:`Ĩ`,Iukcy:`І`,Iuml:`Ï`,Jcirc:`Ĵ`,Jcy:`Й`,Jfr:`𝔍`,Jopf:`𝕁`,Jscr:`𝒥`,Jsercy:`Ј`,Jukcy:`Є`,KHcy:`Х`,KJcy:`Ќ`,Kappa:`Κ`,Kcedil:`Ķ`,Kcy:`К`,Kfr:`𝔎`,Kopf:`𝕂`,Kscr:`𝒦`,LJcy:`Љ`,LT:`<`,Lacute:`Ĺ`,Lambda:`Λ`,Lang:`⟪`,Laplacetrf:`ℒ`,Larr:`↞`,Lcaron:`Ľ`,Lcedil:`Ļ`,Lcy:`Л`,LeftAngleBracket:`⟨`,LeftArrow:`←`,LeftArrowBar:`⇤`,LeftArrowRightArrow:`⇆`,LeftCeiling:`⌈`,LeftDoubleBracket:`⟦`,LeftDownTeeVector:`⥡`,LeftDownVector:`⇃`,LeftDownVectorBar:`⥙`,LeftFloor:`⌊`,LeftRightArrow:`↔`,LeftRightVector:`⥎`,LeftTee:`⊣`,LeftTeeArrow:`↤`,LeftTeeVector:`⥚`,LeftTriangle:`⊲`,LeftTriangleBar:`⧏`,LeftTriangleEqual:`⊴`,LeftUpDownVector:`⥑`,LeftUpTeeVector:`⥠`,LeftUpVector:`↿`,LeftUpVectorBar:`⥘`,LeftVector:`↼`,LeftVectorBar:`⥒`,Leftarrow:`⇐`,Leftrightarrow:`⇔`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,LessLess:`⪡`,LessSlantEqual:`⩽`,LessTilde:`≲`,Lfr:`𝔏`,Ll:`⋘`,Lleftarrow:`⇚`,Lmidot:`Ŀ`,LongLeftArrow:`⟵`,LongLeftRightArrow:`⟷`,LongRightArrow:`⟶`,Longleftarrow:`⟸`,Longleftrightarrow:`⟺`,Longrightarrow:`⟹`,Lopf:`𝕃`,LowerLeftArrow:`↙`,LowerRightArrow:`↘`,Lscr:`ℒ`,Lsh:`↰`,Lstrok:`Ł`,Lt:`≪`,Map:`⤅`,Mcy:`М`,MediumSpace:` `,Mellintrf:`ℳ`,Mfr:`𝔐`,MinusPlus:`∓`,Mopf:`𝕄`,Mscr:`ℳ`,Mu:`Μ`,NJcy:`Њ`,Nacute:`Ń`,Ncaron:`Ň`,Ncedil:`Ņ`,Ncy:`Н`,NegativeMediumSpace:`​`,NegativeThickSpace:`​`,NegativeThinSpace:`​`,NegativeVeryThinSpace:`​`,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NewLine:`
14
- `,Nfr:`𝔑`,NoBreak:`⁠`,NonBreakingSpace:`\xA0`,Nopf:`ℕ`,Not:`⫬`,NotCongruent:`≢`,NotCupCap:`≭`,NotDoubleVerticalBar:`∦`,NotElement:`∉`,NotEqual:`≠`,NotEqualTilde:`≂̸`,NotExists:`∄`,NotGreater:`≯`,NotGreaterEqual:`≱`,NotGreaterFullEqual:`≧̸`,NotGreaterGreater:`≫̸`,NotGreaterLess:`≹`,NotGreaterSlantEqual:`⩾̸`,NotGreaterTilde:`≵`,NotHumpDownHump:`≎̸`,NotHumpEqual:`≏̸`,NotLeftTriangle:`⋪`,NotLeftTriangleBar:`⧏̸`,NotLeftTriangleEqual:`⋬`,NotLess:`≮`,NotLessEqual:`≰`,NotLessGreater:`≸`,NotLessLess:`≪̸`,NotLessSlantEqual:`⩽̸`,NotLessTilde:`≴`,NotNestedGreaterGreater:`⪢̸`,NotNestedLessLess:`⪡̸`,NotPrecedes:`⊀`,NotPrecedesEqual:`⪯̸`,NotPrecedesSlantEqual:`⋠`,NotReverseElement:`∌`,NotRightTriangle:`⋫`,NotRightTriangleBar:`⧐̸`,NotRightTriangleEqual:`⋭`,NotSquareSubset:`⊏̸`,NotSquareSubsetEqual:`⋢`,NotSquareSuperset:`⊐̸`,NotSquareSupersetEqual:`⋣`,NotSubset:`⊂⃒`,NotSubsetEqual:`⊈`,NotSucceeds:`⊁`,NotSucceedsEqual:`⪰̸`,NotSucceedsSlantEqual:`⋡`,NotSucceedsTilde:`≿̸`,NotSuperset:`⊃⃒`,NotSupersetEqual:`⊉`,NotTilde:`≁`,NotTildeEqual:`≄`,NotTildeFullEqual:`≇`,NotTildeTilde:`≉`,NotVerticalBar:`∤`,Nscr:`𝒩`,Ntilde:`Ñ`,Nu:`Ν`,OElig:`Œ`,Oacute:`Ó`,Ocirc:`Ô`,Ocy:`О`,Odblac:`Ő`,Ofr:`𝔒`,Ograve:`Ò`,Omacr:`Ō`,Omega:`Ω`,Omicron:`Ο`,Oopf:`𝕆`,OpenCurlyDoubleQuote:`“`,OpenCurlyQuote:`‘`,Or:`⩔`,Oscr:`𝒪`,Oslash:`Ø`,Otilde:`Õ`,Otimes:`⨷`,Ouml:`Ö`,OverBar:`‾`,OverBrace:`⏞`,OverBracket:`⎴`,OverParenthesis:`⏜`,PartialD:`∂`,Pcy:`П`,Pfr:`𝔓`,Phi:`Φ`,Pi:`Π`,PlusMinus:`±`,Poincareplane:`ℌ`,Popf:`ℙ`,Pr:`⪻`,Precedes:`≺`,PrecedesEqual:`⪯`,PrecedesSlantEqual:`≼`,PrecedesTilde:`≾`,Prime:`″`,Product:`∏`,Proportion:`∷`,Proportional:`∝`,Pscr:`𝒫`,Psi:`Ψ`,QUOT:`"`,Qfr:`𝔔`,Qopf:`ℚ`,Qscr:`𝒬`,RBarr:`⤐`,REG:`®`,Racute:`Ŕ`,Rang:`⟫`,Rarr:`↠`,Rarrtl:`⤖`,Rcaron:`Ř`,Rcedil:`Ŗ`,Rcy:`Р`,Re:`ℜ`,ReverseElement:`∋`,ReverseEquilibrium:`⇋`,ReverseUpEquilibrium:`⥯`,Rfr:`ℜ`,Rho:`Ρ`,RightAngleBracket:`⟩`,RightArrow:`→`,RightArrowBar:`⇥`,RightArrowLeftArrow:`⇄`,RightCeiling:`⌉`,RightDoubleBracket:`⟧`,RightDownTeeVector:`⥝`,RightDownVector:`⇂`,RightDownVectorBar:`⥕`,RightFloor:`⌋`,RightTee:`⊢`,RightTeeArrow:`↦`,RightTeeVector:`⥛`,RightTriangle:`⊳`,RightTriangleBar:`⧐`,RightTriangleEqual:`⊵`,RightUpDownVector:`⥏`,RightUpTeeVector:`⥜`,RightUpVector:`↾`,RightUpVectorBar:`⥔`,RightVector:`⇀`,RightVectorBar:`⥓`,Rightarrow:`⇒`,Ropf:`ℝ`,RoundImplies:`⥰`,Rrightarrow:`⇛`,Rscr:`ℛ`,Rsh:`↱`,RuleDelayed:`⧴`,SHCHcy:`Щ`,SHcy:`Ш`,SOFTcy:`Ь`,Sacute:`Ś`,Sc:`⪼`,Scaron:`Š`,Scedil:`Ş`,Scirc:`Ŝ`,Scy:`С`,Sfr:`𝔖`,ShortDownArrow:`↓`,ShortLeftArrow:`←`,ShortRightArrow:`→`,ShortUpArrow:`↑`,Sigma:`Σ`,SmallCircle:`∘`,Sopf:`𝕊`,Sqrt:`√`,Square:`□`,SquareIntersection:`⊓`,SquareSubset:`⊏`,SquareSubsetEqual:`⊑`,SquareSuperset:`⊐`,SquareSupersetEqual:`⊒`,SquareUnion:`⊔`,Sscr:`𝒮`,Star:`⋆`,Sub:`⋐`,Subset:`⋐`,SubsetEqual:`⊆`,Succeeds:`≻`,SucceedsEqual:`⪰`,SucceedsSlantEqual:`≽`,SucceedsTilde:`≿`,SuchThat:`∋`,Sum:`∑`,Sup:`⋑`,Superset:`⊃`,SupersetEqual:`⊇`,Supset:`⋑`,THORN:`Þ`,TRADE:`™`,TSHcy:`Ћ`,TScy:`Ц`,Tab:` `,Tau:`Τ`,Tcaron:`Ť`,Tcedil:`Ţ`,Tcy:`Т`,Tfr:`𝔗`,Therefore:`∴`,Theta:`Θ`,ThickSpace:`  `,ThinSpace:` `,Tilde:`∼`,TildeEqual:`≃`,TildeFullEqual:`≅`,TildeTilde:`≈`,Topf:`𝕋`,TripleDot:`⃛`,Tscr:`𝒯`,Tstrok:`Ŧ`,Uacute:`Ú`,Uarr:`↟`,Uarrocir:`⥉`,Ubrcy:`Ў`,Ubreve:`Ŭ`,Ucirc:`Û`,Ucy:`У`,Udblac:`Ű`,Ufr:`𝔘`,Ugrave:`Ù`,Umacr:`Ū`,UnderBar:`_`,UnderBrace:`⏟`,UnderBracket:`⎵`,UnderParenthesis:`⏝`,Union:`⋃`,UnionPlus:`⊎`,Uogon:`Ų`,Uopf:`𝕌`,UpArrow:`↑`,UpArrowBar:`⤒`,UpArrowDownArrow:`⇅`,UpDownArrow:`↕`,UpEquilibrium:`⥮`,UpTee:`⊥`,UpTeeArrow:`↥`,Uparrow:`⇑`,Updownarrow:`⇕`,UpperLeftArrow:`↖`,UpperRightArrow:`↗`,Upsi:`ϒ`,Upsilon:`Υ`,Uring:`Ů`,Uscr:`𝒰`,Utilde:`Ũ`,Uuml:`Ü`,VDash:`⊫`,Vbar:`⫫`,Vcy:`В`,Vdash:`⊩`,Vdashl:`⫦`,Vee:`⋁`,Verbar:`‖`,Vert:`‖`,VerticalBar:`∣`,VerticalLine:`|`,VerticalSeparator:`❘`,VerticalTilde:`≀`,VeryThinSpace:` `,Vfr:`𝔙`,Vopf:`𝕍`,Vscr:`𝒱`,Vvdash:`⊪`,Wcirc:`Ŵ`,Wedge:`⋀`,Wfr:`𝔚`,Wopf:`𝕎`,Wscr:`𝒲`,Xfr:`𝔛`,Xi:`Ξ`,Xopf:`𝕏`,Xscr:`𝒳`,YAcy:`Я`,YIcy:`Ї`,YUcy:`Ю`,Yacute:`Ý`,Ycirc:`Ŷ`,Ycy:`Ы`,Yfr:`𝔜`,Yopf:`𝕐`,Yscr:`𝒴`,Yuml:`Ÿ`,ZHcy:`Ж`,Zacute:`Ź`,Zcaron:`Ž`,Zcy:`З`,Zdot:`Ż`,ZeroWidthSpace:`​`,Zeta:`Ζ`,Zfr:`ℨ`,Zopf:`ℤ`,Zscr:`𝒵`,aacute:`á`,abreve:`ă`,ac:`∾`,acE:`∾̳`,acd:`∿`,acirc:`â`,acute:`´`,acy:`а`,aelig:`æ`,af:`⁡`,afr:`𝔞`,agrave:`à`,alefsym:`ℵ`,aleph:`ℵ`,alpha:`α`,amacr:`ā`,amalg:`⨿`,amp:`&`,and:`∧`,andand:`⩕`,andd:`⩜`,andslope:`⩘`,andv:`⩚`,ang:`∠`,ange:`⦤`,angle:`∠`,angmsd:`∡`,angmsdaa:`⦨`,angmsdab:`⦩`,angmsdac:`⦪`,angmsdad:`⦫`,angmsdae:`⦬`,angmsdaf:`⦭`,angmsdag:`⦮`,angmsdah:`⦯`,angrt:`∟`,angrtvb:`⊾`,angrtvbd:`⦝`,angsph:`∢`,angst:`Å`,angzarr:`⍼`,aogon:`ą`,aopf:`𝕒`,ap:`≈`,apE:`⩰`,apacir:`⩯`,ape:`≊`,apid:`≋`,apos:`'`,approx:`≈`,approxeq:`≊`,aring:`å`,ascr:`𝒶`,ast:`*`,asymp:`≈`,asympeq:`≍`,atilde:`ã`,auml:`ä`,awconint:`∳`,awint:`⨑`,bNot:`⫭`,backcong:`≌`,backepsilon:`϶`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,barvee:`⊽`,barwed:`⌅`,barwedge:`⌅`,bbrk:`⎵`,bbrktbrk:`⎶`,bcong:`≌`,bcy:`б`,bdquo:`„`,becaus:`∵`,because:`∵`,bemptyv:`⦰`,bepsi:`϶`,bernou:`ℬ`,beta:`β`,beth:`ℶ`,between:`≬`,bfr:`𝔟`,bigcap:`⋂`,bigcirc:`◯`,bigcup:`⋃`,bigodot:`⨀`,bigoplus:`⨁`,bigotimes:`⨂`,bigsqcup:`⨆`,bigstar:`★`,bigtriangledown:`▽`,bigtriangleup:`△`,biguplus:`⨄`,bigvee:`⋁`,bigwedge:`⋀`,bkarow:`⤍`,blacklozenge:`⧫`,blacksquare:`▪`,blacktriangle:`▴`,blacktriangledown:`▾`,blacktriangleleft:`◂`,blacktriangleright:`▸`,blank:`␣`,blk12:`▒`,blk14:`░`,blk34:`▓`,block:`█`,bne:`=⃥`,bnequiv:`≡⃥`,bnot:`⌐`,bopf:`𝕓`,bot:`⊥`,bottom:`⊥`,bowtie:`⋈`,boxDL:`╗`,boxDR:`╔`,boxDl:`╖`,boxDr:`╓`,boxH:`═`,boxHD:`╦`,boxHU:`╩`,boxHd:`╤`,boxHu:`╧`,boxUL:`╝`,boxUR:`╚`,boxUl:`╜`,boxUr:`╙`,boxV:`║`,boxVH:`╬`,boxVL:`╣`,boxVR:`╠`,boxVh:`╫`,boxVl:`╢`,boxVr:`╟`,boxbox:`⧉`,boxdL:`╕`,boxdR:`╒`,boxdl:`┐`,boxdr:`┌`,boxh:`─`,boxhD:`╥`,boxhU:`╨`,boxhd:`┬`,boxhu:`┴`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxuL:`╛`,boxuR:`╘`,boxul:`┘`,boxur:`└`,boxv:`│`,boxvH:`╪`,boxvL:`╡`,boxvR:`╞`,boxvh:`┼`,boxvl:`┤`,boxvr:`├`,bprime:`‵`,breve:`˘`,brvbar:`¦`,bscr:`𝒷`,bsemi:`⁏`,bsim:`∽`,bsime:`⋍`,bsol:`\\`,bsolb:`⧅`,bsolhsub:`⟈`,bull:`•`,bullet:`•`,bump:`≎`,bumpE:`⪮`,bumpe:`≏`,bumpeq:`≏`,cacute:`ć`,cap:`∩`,capand:`⩄`,capbrcup:`⩉`,capcap:`⩋`,capcup:`⩇`,capdot:`⩀`,caps:`∩︀`,caret:`⁁`,caron:`ˇ`,ccaps:`⩍`,ccaron:`č`,ccedil:`ç`,ccirc:`ĉ`,ccups:`⩌`,ccupssm:`⩐`,cdot:`ċ`,cedil:`¸`,cemptyv:`⦲`,cent:`¢`,centerdot:`·`,cfr:`𝔠`,chcy:`ч`,check:`✓`,checkmark:`✓`,chi:`χ`,cir:`○`,cirE:`⧃`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledR:`®`,circledS:`Ⓢ`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,cire:`≗`,cirfnint:`⨐`,cirmid:`⫯`,cirscir:`⧂`,clubs:`♣`,clubsuit:`♣`,colon:`:`,colone:`≔`,coloneq:`≔`,comma:`,`,commat:`@`,comp:`∁`,compfn:`∘`,complement:`∁`,complexes:`ℂ`,cong:`≅`,congdot:`⩭`,conint:`∮`,copf:`𝕔`,coprod:`∐`,copy:`©`,copysr:`℗`,crarr:`↵`,cross:`✗`,cscr:`𝒸`,csub:`⫏`,csube:`⫑`,csup:`⫐`,csupe:`⫒`,ctdot:`⋯`,cudarrl:`⤸`,cudarrr:`⤵`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cularrp:`⤽`,cup:`∪`,cupbrcap:`⩈`,cupcap:`⩆`,cupcup:`⩊`,cupdot:`⊍`,cupor:`⩅`,cups:`∪︀`,curarr:`↷`,curarrm:`⤼`,curlyeqprec:`⋞`,curlyeqsucc:`⋟`,curlyvee:`⋎`,curlywedge:`⋏`,curren:`¤`,curvearrowleft:`↶`,curvearrowright:`↷`,cuvee:`⋎`,cuwed:`⋏`,cwconint:`∲`,cwint:`∱`,cylcty:`⌭`,dArr:`⇓`,dHar:`⥥`,dagger:`†`,daleth:`ℸ`,darr:`↓`,dash:`‐`,dashv:`⊣`,dbkarow:`⤏`,dblac:`˝`,dcaron:`ď`,dcy:`д`,dd:`ⅆ`,ddagger:`‡`,ddarr:`⇊`,ddotseq:`⩷`,deg:`°`,delta:`δ`,demptyv:`⦱`,dfisht:`⥿`,dfr:`𝔡`,dharl:`⇃`,dharr:`⇂`,diam:`⋄`,diamond:`⋄`,diamondsuit:`♦`,diams:`♦`,die:`¨`,digamma:`ϝ`,disin:`⋲`,div:`÷`,divide:`÷`,divideontimes:`⋇`,divonx:`⋇`,djcy:`ђ`,dlcorn:`⌞`,dlcrop:`⌍`,dollar:`$`,dopf:`𝕕`,dot:`˙`,doteq:`≐`,doteqdot:`≑`,dotminus:`∸`,dotplus:`∔`,dotsquare:`⊡`,doublebarwedge:`⌆`,downarrow:`↓`,downdownarrows:`⇊`,downharpoonleft:`⇃`,downharpoonright:`⇂`,drbkarow:`⤐`,drcorn:`⌟`,drcrop:`⌌`,dscr:`𝒹`,dscy:`ѕ`,dsol:`⧶`,dstrok:`đ`,dtdot:`⋱`,dtri:`▿`,dtrif:`▾`,duarr:`⇵`,duhar:`⥯`,dwangle:`⦦`,dzcy:`џ`,dzigrarr:`⟿`,eDDot:`⩷`,eDot:`≑`,eacute:`é`,easter:`⩮`,ecaron:`ě`,ecir:`≖`,ecirc:`ê`,ecolon:`≕`,ecy:`э`,edot:`ė`,ee:`ⅇ`,efDot:`≒`,efr:`𝔢`,eg:`⪚`,egrave:`è`,egs:`⪖`,egsdot:`⪘`,el:`⪙`,elinters:`⏧`,ell:`ℓ`,els:`⪕`,elsdot:`⪗`,emacr:`ē`,empty:`∅`,emptyset:`∅`,emptyv:`∅`,emsp13:` `,emsp14:` `,emsp:` `,eng:`ŋ`,ensp:` `,eogon:`ę`,eopf:`𝕖`,epar:`⋕`,eparsl:`⧣`,eplus:`⩱`,epsi:`ε`,epsilon:`ε`,epsiv:`ϵ`,eqcirc:`≖`,eqcolon:`≕`,eqsim:`≂`,eqslantgtr:`⪖`,eqslantless:`⪕`,equals:`=`,equest:`≟`,equiv:`≡`,equivDD:`⩸`,eqvparsl:`⧥`,erDot:`≓`,erarr:`⥱`,escr:`ℯ`,esdot:`≐`,esim:`≂`,eta:`η`,eth:`ð`,euml:`ë`,euro:`€`,excl:`!`,exist:`∃`,expectation:`ℰ`,exponentiale:`ⅇ`,fallingdotseq:`≒`,fcy:`ф`,female:`♀`,ffilig:`ffi`,fflig:`ff`,ffllig:`ffl`,ffr:`𝔣`,filig:`fi`,fjlig:`fj`,flat:`♭`,fllig:`fl`,fltns:`▱`,fnof:`ƒ`,fopf:`𝕗`,forall:`∀`,fork:`⋔`,forkv:`⫙`,fpartint:`⨍`,frac12:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`,frown:`⌢`,fscr:`𝒻`,gE:`≧`,gEl:`⪌`,gacute:`ǵ`,gamma:`γ`,gammad:`ϝ`,gap:`⪆`,gbreve:`ğ`,gcirc:`ĝ`,gcy:`г`,gdot:`ġ`,ge:`≥`,gel:`⋛`,geq:`≥`,geqq:`≧`,geqslant:`⩾`,ges:`⩾`,gescc:`⪩`,gesdot:`⪀`,gesdoto:`⪂`,gesdotol:`⪄`,gesl:`⋛︀`,gesles:`⪔`,gfr:`𝔤`,gg:`≫`,ggg:`⋙`,gimel:`ℷ`,gjcy:`ѓ`,gl:`≷`,glE:`⪒`,gla:`⪥`,glj:`⪤`,gnE:`≩`,gnap:`⪊`,gnapprox:`⪊`,gne:`⪈`,gneq:`⪈`,gneqq:`≩`,gnsim:`⋧`,gopf:`𝕘`,grave:"`",gscr:`ℊ`,gsim:`≳`,gsime:`⪎`,gsiml:`⪐`,gt:`>`,gtcc:`⪧`,gtcir:`⩺`,gtdot:`⋗`,gtlPar:`⦕`,gtquest:`⩼`,gtrapprox:`⪆`,gtrarr:`⥸`,gtrdot:`⋗`,gtreqless:`⋛`,gtreqqless:`⪌`,gtrless:`≷`,gtrsim:`≳`,gvertneqq:`≩︀`,gvnE:`≩︀`,hArr:`⇔`,hairsp:` `,half:`½`,hamilt:`ℋ`,hardcy:`ъ`,harr:`↔`,harrcir:`⥈`,harrw:`↭`,hbar:`ℏ`,hcirc:`ĥ`,hearts:`♥`,heartsuit:`♥`,hellip:`…`,hercon:`⊹`,hfr:`𝔥`,hksearow:`⤥`,hkswarow:`⤦`,hoarr:`⇿`,homtht:`∻`,hookleftarrow:`↩`,hookrightarrow:`↪`,hopf:`𝕙`,horbar:`―`,hscr:`𝒽`,hslash:`ℏ`,hstrok:`ħ`,hybull:`⁃`,hyphen:`‐`,iacute:`í`,ic:`⁣`,icirc:`î`,icy:`и`,iecy:`е`,iexcl:`¡`,iff:`⇔`,ifr:`𝔦`,igrave:`ì`,ii:`ⅈ`,iiiint:`⨌`,iiint:`∭`,iinfin:`⧜`,iiota:`℩`,ijlig:`ij`,imacr:`ī`,image:`ℑ`,imagline:`ℐ`,imagpart:`ℑ`,imath:`ı`,imof:`⊷`,imped:`Ƶ`,in:`∈`,incare:`℅`,infin:`∞`,infintie:`⧝`,inodot:`ı`,int:`∫`,intcal:`⊺`,integers:`ℤ`,intercal:`⊺`,intlarhk:`⨗`,intprod:`⨼`,iocy:`ё`,iogon:`į`,iopf:`𝕚`,iota:`ι`,iprod:`⨼`,iquest:`¿`,iscr:`𝒾`,isin:`∈`,isinE:`⋹`,isindot:`⋵`,isins:`⋴`,isinsv:`⋳`,isinv:`∈`,it:`⁢`,itilde:`ĩ`,iukcy:`і`,iuml:`ï`,jcirc:`ĵ`,jcy:`й`,jfr:`𝔧`,jmath:`ȷ`,jopf:`𝕛`,jscr:`𝒿`,jsercy:`ј`,jukcy:`є`,kappa:`κ`,kappav:`ϰ`,kcedil:`ķ`,kcy:`к`,kfr:`𝔨`,kgreen:`ĸ`,khcy:`х`,kjcy:`ќ`,kopf:`𝕜`,kscr:`𝓀`,lAarr:`⇚`,lArr:`⇐`,lAtail:`⤛`,lBarr:`⤎`,lE:`≦`,lEg:`⪋`,lHar:`⥢`,lacute:`ĺ`,laemptyv:`⦴`,lagran:`ℒ`,lambda:`λ`,lang:`⟨`,langd:`⦑`,langle:`⟨`,lap:`⪅`,laquo:`«`,larr:`←`,larrb:`⇤`,larrbfs:`⤟`,larrfs:`⤝`,larrhk:`↩`,larrlp:`↫`,larrpl:`⤹`,larrsim:`⥳`,larrtl:`↢`,lat:`⪫`,latail:`⤙`,late:`⪭`,lates:`⪭︀`,lbarr:`⤌`,lbbrk:`❲`,lbrace:`{`,lbrack:`[`,lbrke:`⦋`,lbrksld:`⦏`,lbrkslu:`⦍`,lcaron:`ľ`,lcedil:`ļ`,lceil:`⌈`,lcub:`{`,lcy:`л`,ldca:`⤶`,ldquo:`“`,ldquor:`„`,ldrdhar:`⥧`,ldrushar:`⥋`,ldsh:`↲`,le:`≤`,leftarrow:`←`,leftarrowtail:`↢`,leftharpoondown:`↽`,leftharpoonup:`↼`,leftleftarrows:`⇇`,leftrightarrow:`↔`,leftrightarrows:`⇆`,leftrightharpoons:`⇋`,leftrightsquigarrow:`↭`,leftthreetimes:`⋋`,leg:`⋚`,leq:`≤`,leqq:`≦`,leqslant:`⩽`,les:`⩽`,lescc:`⪨`,lesdot:`⩿`,lesdoto:`⪁`,lesdotor:`⪃`,lesg:`⋚︀`,lesges:`⪓`,lessapprox:`⪅`,lessdot:`⋖`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,lessgtr:`≶`,lesssim:`≲`,lfisht:`⥼`,lfloor:`⌊`,lfr:`𝔩`,lg:`≶`,lgE:`⪑`,lhard:`↽`,lharu:`↼`,lharul:`⥪`,lhblk:`▄`,ljcy:`љ`,ll:`≪`,llarr:`⇇`,llcorner:`⌞`,llhard:`⥫`,lltri:`◺`,lmidot:`ŀ`,lmoust:`⎰`,lmoustache:`⎰`,lnE:`≨`,lnap:`⪉`,lnapprox:`⪉`,lne:`⪇`,lneq:`⪇`,lneqq:`≨`,lnsim:`⋦`,loang:`⟬`,loarr:`⇽`,lobrk:`⟦`,longleftarrow:`⟵`,longleftrightarrow:`⟷`,longmapsto:`⟼`,longrightarrow:`⟶`,looparrowleft:`↫`,looparrowright:`↬`,lopar:`⦅`,lopf:`𝕝`,loplus:`⨭`,lotimes:`⨴`,lowast:`∗`,lowbar:`_`,loz:`◊`,lozenge:`◊`,lozf:`⧫`,lpar:`(`,lparlt:`⦓`,lrarr:`⇆`,lrcorner:`⌟`,lrhar:`⇋`,lrhard:`⥭`,lrm:`‎`,lrtri:`⊿`,lsaquo:`‹`,lscr:`𝓁`,lsh:`↰`,lsim:`≲`,lsime:`⪍`,lsimg:`⪏`,lsqb:`[`,lsquo:`‘`,lsquor:`‚`,lstrok:`ł`,lt:`<`,ltcc:`⪦`,ltcir:`⩹`,ltdot:`⋖`,lthree:`⋋`,ltimes:`⋉`,ltlarr:`⥶`,ltquest:`⩻`,ltrPar:`⦖`,ltri:`◃`,ltrie:`⊴`,ltrif:`◂`,lurdshar:`⥊`,luruhar:`⥦`,lvertneqq:`≨︀`,lvnE:`≨︀`,mDDot:`∺`,macr:`¯`,male:`♂`,malt:`✠`,maltese:`✠`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,mapstoleft:`↤`,mapstoup:`↥`,marker:`▮`,mcomma:`⨩`,mcy:`м`,mdash:`—`,measuredangle:`∡`,mfr:`𝔪`,mho:`℧`,micro:`µ`,mid:`∣`,midast:`*`,midcir:`⫰`,middot:`·`,minus:`−`,minusb:`⊟`,minusd:`∸`,minusdu:`⨪`,mlcp:`⫛`,mldr:`…`,mnplus:`∓`,models:`⊧`,mopf:`𝕞`,mp:`∓`,mscr:`𝓂`,mstpos:`∾`,mu:`μ`,multimap:`⊸`,mumap:`⊸`,nGg:`⋙̸`,nGt:`≫⃒`,nGtv:`≫̸`,nLeftarrow:`⇍`,nLeftrightarrow:`⇎`,nLl:`⋘̸`,nLt:`≪⃒`,nLtv:`≪̸`,nRightarrow:`⇏`,nVDash:`⊯`,nVdash:`⊮`,nabla:`∇`,nacute:`ń`,nang:`∠⃒`,nap:`≉`,napE:`⩰̸`,napid:`≋̸`,napos:`ʼn`,napprox:`≉`,natur:`♮`,natural:`♮`,naturals:`ℕ`,nbsp:`\xA0`,nbump:`≎̸`,nbumpe:`≏̸`,ncap:`⩃`,ncaron:`ň`,ncedil:`ņ`,ncong:`≇`,ncongdot:`⩭̸`,ncup:`⩂`,ncy:`н`,ndash:`–`,ne:`≠`,neArr:`⇗`,nearhk:`⤤`,nearr:`↗`,nearrow:`↗`,nedot:`≐̸`,nequiv:`≢`,nesear:`⤨`,nesim:`≂̸`,nexist:`∄`,nexists:`∄`,nfr:`𝔫`,ngE:`≧̸`,nge:`≱`,ngeq:`≱`,ngeqq:`≧̸`,ngeqslant:`⩾̸`,nges:`⩾̸`,ngsim:`≵`,ngt:`≯`,ngtr:`≯`,nhArr:`⇎`,nharr:`↮`,nhpar:`⫲`,ni:`∋`,nis:`⋼`,nisd:`⋺`,niv:`∋`,njcy:`њ`,nlArr:`⇍`,nlE:`≦̸`,nlarr:`↚`,nldr:`‥`,nle:`≰`,nleftarrow:`↚`,nleftrightarrow:`↮`,nleq:`≰`,nleqq:`≦̸`,nleqslant:`⩽̸`,nles:`⩽̸`,nless:`≮`,nlsim:`≴`,nlt:`≮`,nltri:`⋪`,nltrie:`⋬`,nmid:`∤`,nopf:`𝕟`,not:`¬`,notin:`∉`,notinE:`⋹̸`,notindot:`⋵̸`,notinva:`∉`,notinvb:`⋷`,notinvc:`⋶`,notni:`∌`,notniva:`∌`,notnivb:`⋾`,notnivc:`⋽`,npar:`∦`,nparallel:`∦`,nparsl:`⫽⃥`,npart:`∂̸`,npolint:`⨔`,npr:`⊀`,nprcue:`⋠`,npre:`⪯̸`,nprec:`⊀`,npreceq:`⪯̸`,nrArr:`⇏`,nrarr:`↛`,nrarrc:`⤳̸`,nrarrw:`↝̸`,nrightarrow:`↛`,nrtri:`⋫`,nrtrie:`⋭`,nsc:`⊁`,nsccue:`⋡`,nsce:`⪰̸`,nscr:`𝓃`,nshortmid:`∤`,nshortparallel:`∦`,nsim:`≁`,nsime:`≄`,nsimeq:`≄`,nsmid:`∤`,nspar:`∦`,nsqsube:`⋢`,nsqsupe:`⋣`,nsub:`⊄`,nsubE:`⫅̸`,nsube:`⊈`,nsubset:`⊂⃒`,nsubseteq:`⊈`,nsubseteqq:`⫅̸`,nsucc:`⊁`,nsucceq:`⪰̸`,nsup:`⊅`,nsupE:`⫆̸`,nsupe:`⊉`,nsupset:`⊃⃒`,nsupseteq:`⊉`,nsupseteqq:`⫆̸`,ntgl:`≹`,ntilde:`ñ`,ntlg:`≸`,ntriangleleft:`⋪`,ntrianglelefteq:`⋬`,ntriangleright:`⋫`,ntrianglerighteq:`⋭`,nu:`ν`,num:`#`,numero:`№`,numsp:` `,nvDash:`⊭`,nvHarr:`⤄`,nvap:`≍⃒`,nvdash:`⊬`,nvge:`≥⃒`,nvgt:`>⃒`,nvinfin:`⧞`,nvlArr:`⤂`,nvle:`≤⃒`,nvlt:`<⃒`,nvltrie:`⊴⃒`,nvrArr:`⤃`,nvrtrie:`⊵⃒`,nvsim:`∼⃒`,nwArr:`⇖`,nwarhk:`⤣`,nwarr:`↖`,nwarrow:`↖`,nwnear:`⤧`,oS:`Ⓢ`,oacute:`ó`,oast:`⊛`,ocir:`⊚`,ocirc:`ô`,ocy:`о`,odash:`⊝`,odblac:`ő`,odiv:`⨸`,odot:`⊙`,odsold:`⦼`,oelig:`œ`,ofcir:`⦿`,ofr:`𝔬`,ogon:`˛`,ograve:`ò`,ogt:`⧁`,ohbar:`⦵`,ohm:`Ω`,oint:`∮`,olarr:`↺`,olcir:`⦾`,olcross:`⦻`,oline:`‾`,olt:`⧀`,omacr:`ō`,omega:`ω`,omicron:`ο`,omid:`⦶`,ominus:`⊖`,oopf:`𝕠`,opar:`⦷`,operp:`⦹`,oplus:`⊕`,or:`∨`,orarr:`↻`,ord:`⩝`,order:`ℴ`,orderof:`ℴ`,ordf:`ª`,ordm:`º`,origof:`⊶`,oror:`⩖`,orslope:`⩗`,orv:`⩛`,oscr:`ℴ`,oslash:`ø`,osol:`⊘`,otilde:`õ`,otimes:`⊗`,otimesas:`⨶`,ouml:`ö`,ovbar:`⌽`,par:`∥`,para:`¶`,parallel:`∥`,parsim:`⫳`,parsl:`⫽`,part:`∂`,pcy:`п`,percnt:`%`,period:`.`,permil:`‰`,perp:`⊥`,pertenk:`‱`,pfr:`𝔭`,phi:`φ`,phiv:`ϕ`,phmmat:`ℳ`,phone:`☎`,pi:`π`,pitchfork:`⋔`,piv:`ϖ`,planck:`ℏ`,planckh:`ℎ`,plankv:`ℏ`,plus:`+`,plusacir:`⨣`,plusb:`⊞`,pluscir:`⨢`,plusdo:`∔`,plusdu:`⨥`,pluse:`⩲`,plusmn:`±`,plussim:`⨦`,plustwo:`⨧`,pm:`±`,pointint:`⨕`,popf:`𝕡`,pound:`£`,pr:`≺`,prE:`⪳`,prap:`⪷`,prcue:`≼`,pre:`⪯`,prec:`≺`,precapprox:`⪷`,preccurlyeq:`≼`,preceq:`⪯`,precnapprox:`⪹`,precneqq:`⪵`,precnsim:`⋨`,precsim:`≾`,prime:`′`,primes:`ℙ`,prnE:`⪵`,prnap:`⪹`,prnsim:`⋨`,prod:`∏`,profalar:`⌮`,profline:`⌒`,profsurf:`⌓`,prop:`∝`,propto:`∝`,prsim:`≾`,prurel:`⊰`,pscr:`𝓅`,psi:`ψ`,puncsp:` `,qfr:`𝔮`,qint:`⨌`,qopf:`𝕢`,qprime:`⁗`,qscr:`𝓆`,quaternions:`ℍ`,quatint:`⨖`,quest:`?`,questeq:`≟`,quot:`"`,rAarr:`⇛`,rArr:`⇒`,rAtail:`⤜`,rBarr:`⤏`,rHar:`⥤`,race:`∽̱`,racute:`ŕ`,radic:`√`,raemptyv:`⦳`,rang:`⟩`,rangd:`⦒`,range:`⦥`,rangle:`⟩`,raquo:`»`,rarr:`→`,rarrap:`⥵`,rarrb:`⇥`,rarrbfs:`⤠`,rarrc:`⤳`,rarrfs:`⤞`,rarrhk:`↪`,rarrlp:`↬`,rarrpl:`⥅`,rarrsim:`⥴`,rarrtl:`↣`,rarrw:`↝`,ratail:`⤚`,ratio:`∶`,rationals:`ℚ`,rbarr:`⤍`,rbbrk:`❳`,rbrace:`}`,rbrack:`]`,rbrke:`⦌`,rbrksld:`⦎`,rbrkslu:`⦐`,rcaron:`ř`,rcedil:`ŗ`,rceil:`⌉`,rcub:`}`,rcy:`р`,rdca:`⤷`,rdldhar:`⥩`,rdquo:`”`,rdquor:`”`,rdsh:`↳`,real:`ℜ`,realine:`ℛ`,realpart:`ℜ`,reals:`ℝ`,rect:`▭`,reg:`®`,rfisht:`⥽`,rfloor:`⌋`,rfr:`𝔯`,rhard:`⇁`,rharu:`⇀`,rharul:`⥬`,rho:`ρ`,rhov:`ϱ`,rightarrow:`→`,rightarrowtail:`↣`,rightharpoondown:`⇁`,rightharpoonup:`⇀`,rightleftarrows:`⇄`,rightleftharpoons:`⇌`,rightrightarrows:`⇉`,rightsquigarrow:`↝`,rightthreetimes:`⋌`,ring:`˚`,risingdotseq:`≓`,rlarr:`⇄`,rlhar:`⇌`,rlm:`‏`,rmoust:`⎱`,rmoustache:`⎱`,rnmid:`⫮`,roang:`⟭`,roarr:`⇾`,robrk:`⟧`,ropar:`⦆`,ropf:`𝕣`,roplus:`⨮`,rotimes:`⨵`,rpar:`)`,rpargt:`⦔`,rppolint:`⨒`,rrarr:`⇉`,rsaquo:`›`,rscr:`𝓇`,rsh:`↱`,rsqb:`]`,rsquo:`’`,rsquor:`’`,rthree:`⋌`,rtimes:`⋊`,rtri:`▹`,rtrie:`⊵`,rtrif:`▸`,rtriltri:`⧎`,ruluhar:`⥨`,rx:`℞`,sacute:`ś`,sbquo:`‚`,sc:`≻`,scE:`⪴`,scap:`⪸`,scaron:`š`,sccue:`≽`,sce:`⪰`,scedil:`ş`,scirc:`ŝ`,scnE:`⪶`,scnap:`⪺`,scnsim:`⋩`,scpolint:`⨓`,scsim:`≿`,scy:`с`,sdot:`⋅`,sdotb:`⊡`,sdote:`⩦`,seArr:`⇘`,searhk:`⤥`,searr:`↘`,searrow:`↘`,sect:`§`,semi:`;`,seswar:`⤩`,setminus:`∖`,setmn:`∖`,sext:`✶`,sfr:`𝔰`,sfrown:`⌢`,sharp:`♯`,shchcy:`щ`,shcy:`ш`,shortmid:`∣`,shortparallel:`∥`,shy:`­`,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,sim:`∼`,simdot:`⩪`,sime:`≃`,simeq:`≃`,simg:`⪞`,simgE:`⪠`,siml:`⪝`,simlE:`⪟`,simne:`≆`,simplus:`⨤`,simrarr:`⥲`,slarr:`←`,smallsetminus:`∖`,smashp:`⨳`,smeparsl:`⧤`,smid:`∣`,smile:`⌣`,smt:`⪪`,smte:`⪬`,smtes:`⪬︀`,softcy:`ь`,sol:`/`,solb:`⧄`,solbar:`⌿`,sopf:`𝕤`,spades:`♠`,spadesuit:`♠`,spar:`∥`,sqcap:`⊓`,sqcaps:`⊓︀`,sqcup:`⊔`,sqcups:`⊔︀`,sqsub:`⊏`,sqsube:`⊑`,sqsubset:`⊏`,sqsubseteq:`⊑`,sqsup:`⊐`,sqsupe:`⊒`,sqsupset:`⊐`,sqsupseteq:`⊒`,squ:`□`,square:`□`,squarf:`▪`,squf:`▪`,srarr:`→`,sscr:`𝓈`,ssetmn:`∖`,ssmile:`⌣`,sstarf:`⋆`,star:`☆`,starf:`★`,straightepsilon:`ϵ`,straightphi:`ϕ`,strns:`¯`,sub:`⊂`,subE:`⫅`,subdot:`⪽`,sube:`⊆`,subedot:`⫃`,submult:`⫁`,subnE:`⫋`,subne:`⊊`,subplus:`⪿`,subrarr:`⥹`,subset:`⊂`,subseteq:`⊆`,subseteqq:`⫅`,subsetneq:`⊊`,subsetneqq:`⫋`,subsim:`⫇`,subsub:`⫕`,subsup:`⫓`,succ:`≻`,succapprox:`⪸`,succcurlyeq:`≽`,succeq:`⪰`,succnapprox:`⪺`,succneqq:`⪶`,succnsim:`⋩`,succsim:`≿`,sum:`∑`,sung:`♪`,sup1:`¹`,sup2:`²`,sup3:`³`,sup:`⊃`,supE:`⫆`,supdot:`⪾`,supdsub:`⫘`,supe:`⊇`,supedot:`⫄`,suphsol:`⟉`,suphsub:`⫗`,suplarr:`⥻`,supmult:`⫂`,supnE:`⫌`,supne:`⊋`,supplus:`⫀`,supset:`⊃`,supseteq:`⊇`,supseteqq:`⫆`,supsetneq:`⊋`,supsetneqq:`⫌`,supsim:`⫈`,supsub:`⫔`,supsup:`⫖`,swArr:`⇙`,swarhk:`⤦`,swarr:`↙`,swarrow:`↙`,swnwar:`⤪`,szlig:`ß`,target:`⌖`,tau:`τ`,tbrk:`⎴`,tcaron:`ť`,tcedil:`ţ`,tcy:`т`,tdot:`⃛`,telrec:`⌕`,tfr:`𝔱`,there4:`∴`,therefore:`∴`,theta:`θ`,thetasym:`ϑ`,thetav:`ϑ`,thickapprox:`≈`,thicksim:`∼`,thinsp:` `,thkap:`≈`,thksim:`∼`,thorn:`þ`,tilde:`˜`,times:`×`,timesb:`⊠`,timesbar:`⨱`,timesd:`⨰`,tint:`∭`,toea:`⤨`,top:`⊤`,topbot:`⌶`,topcir:`⫱`,topf:`𝕥`,topfork:`⫚`,tosa:`⤩`,tprime:`‴`,trade:`™`,triangle:`▵`,triangledown:`▿`,triangleleft:`◃`,trianglelefteq:`⊴`,triangleq:`≜`,triangleright:`▹`,trianglerighteq:`⊵`,tridot:`◬`,trie:`≜`,triminus:`⨺`,triplus:`⨹`,trisb:`⧍`,tritime:`⨻`,trpezium:`⏢`,tscr:`𝓉`,tscy:`ц`,tshcy:`ћ`,tstrok:`ŧ`,twixt:`≬`,twoheadleftarrow:`↞`,twoheadrightarrow:`↠`,uArr:`⇑`,uHar:`⥣`,uacute:`ú`,uarr:`↑`,ubrcy:`ў`,ubreve:`ŭ`,ucirc:`û`,ucy:`у`,udarr:`⇅`,udblac:`ű`,udhar:`⥮`,ufisht:`⥾`,ufr:`𝔲`,ugrave:`ù`,uharl:`↿`,uharr:`↾`,uhblk:`▀`,ulcorn:`⌜`,ulcorner:`⌜`,ulcrop:`⌏`,ultri:`◸`,umacr:`ū`,uml:`¨`,uogon:`ų`,uopf:`𝕦`,uparrow:`↑`,updownarrow:`↕`,upharpoonleft:`↿`,upharpoonright:`↾`,uplus:`⊎`,upsi:`υ`,upsih:`ϒ`,upsilon:`υ`,upuparrows:`⇈`,urcorn:`⌝`,urcorner:`⌝`,urcrop:`⌎`,uring:`ů`,urtri:`◹`,uscr:`𝓊`,utdot:`⋰`,utilde:`ũ`,utri:`▵`,utrif:`▴`,uuarr:`⇈`,uuml:`ü`,uwangle:`⦧`,vArr:`⇕`,vBar:`⫨`,vBarv:`⫩`,vDash:`⊨`,vangrt:`⦜`,varepsilon:`ϵ`,varkappa:`ϰ`,varnothing:`∅`,varphi:`ϕ`,varpi:`ϖ`,varpropto:`∝`,varr:`↕`,varrho:`ϱ`,varsigma:`ς`,varsubsetneq:`⊊︀`,varsubsetneqq:`⫋︀`,varsupsetneq:`⊋︀`,varsupsetneqq:`⫌︀`,vartheta:`ϑ`,vartriangleleft:`⊲`,vartriangleright:`⊳`,vcy:`в`,vdash:`⊢`,vee:`∨`,veebar:`⊻`,veeeq:`≚`,vellip:`⋮`,verbar:`|`,vert:`|`,vfr:`𝔳`,vltri:`⊲`,vnsub:`⊂⃒`,vnsup:`⊃⃒`,vopf:`𝕧`,vprop:`∝`,vrtri:`⊳`,vscr:`𝓋`,vsubnE:`⫋︀`,vsubne:`⊊︀`,vsupnE:`⫌︀`,vsupne:`⊋︀`,vzigzag:`⦚`,wcirc:`ŵ`,wedbar:`⩟`,wedge:`∧`,wedgeq:`≙`,weierp:`℘`,wfr:`𝔴`,wopf:`𝕨`,wp:`℘`,wr:`≀`,wreath:`≀`,wscr:`𝓌`,xcap:`⋂`,xcirc:`◯`,xcup:`⋃`,xdtri:`▽`,xfr:`𝔵`,xhArr:`⟺`,xharr:`⟷`,xi:`ξ`,xlArr:`⟸`,xlarr:`⟵`,xmap:`⟼`,xnis:`⋻`,xodot:`⨀`,xopf:`𝕩`,xoplus:`⨁`,xotime:`⨂`,xrArr:`⟹`,xrarr:`⟶`,xscr:`𝓍`,xsqcup:`⨆`,xuplus:`⨄`,xutri:`△`,xvee:`⋁`,xwedge:`⋀`,yacute:`ý`,yacy:`я`,ycirc:`ŷ`,ycy:`ы`,yen:`¥`,yfr:`𝔶`,yicy:`ї`,yopf:`𝕪`,yscr:`𝓎`,yucy:`ю`,yuml:`ÿ`,zacute:`ź`,zcaron:`ž`,zcy:`з`,zdot:`ż`,zeetrf:`ℨ`,zeta:`ζ`,zfr:`𝔷`,zhcy:`ж`,zigrarr:`⇝`,zopf:`𝕫`,zscr:`𝓏`,zwj:`‍`,zwnj:`‌`},Qr={}.hasOwnProperty;function $r(e){return Qr.call(Zr,e)?Zr[e]:!1}function ei(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function ti(e,t){return e.length>0?(ei(e,e.length,0,t),e):t}var ni={}.hasOwnProperty;function ri(e){let t={},n=-1;for(;++n<e.length;)ii(t,e[n]);return t}function ii(e,t){let n;for(n in t){let r=(ni.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){ni.call(r,a)||(r[a]=[]);let e=i[a];ai(r[a],Array.isArray(e)?e:e?[e]:[])}}}function ai(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);ei(e,0,0,r)}function oi(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function si(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var ci=vi(/[A-Za-z]/),li=vi(/[\dA-Za-z]/),ui=vi(/[#-'*+\--9=?A-Z^-~]/);function di(e){return e!==null&&(e<32||e===127)}var fi=vi(/\d/),pi=vi(/[\dA-Fa-f]/),mi=vi(/[!-/:-@[-`{-~]/);function V(e){return e!==null&&e<-2}function hi(e){return e!==null&&(e<0||e===32)}function H(e){return e===-2||e===-1||e===32}var gi=vi(/\p{P}|\p{S}/u),_i=vi(/\s/);function vi(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function U(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return H(r)?(e.enter(n),s(r)):t(r)}function s(r){return H(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function yi(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&H(t)?(e.enter(r),c(t)):l(t)}function c(t){return H(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var bi={tokenize:xi};function xi(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),U(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return V(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Si=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){Ci(this,e,t,n,!1)}addBefore(e,t,n){Ci(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Ci(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var wi={tokenize:Ei},Ti={tokenize:Di};function Ei(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new Si;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ti,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Ti,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return V(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new Si;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Di(e,t,n){return U(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Oi(e){if(e===null||hi(e)||_i(e))return 1;if(gi(e))return 2}function ki(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Ai={name:`attention`,resolveAll:ji,tokenize:Mi};function ji(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};Ni(o,-a),Ni(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=ti(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=ti(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=ti(r,ki(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=ti(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=ti(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),ei(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Mi(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Oi(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Oi(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Ni(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Pi={name:`autolink`,tokenize:Fi};function Fi(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return ci(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||li(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||li(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||di(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):ui(t)?(e.consume(t),l):n(t)}function u(e){return li(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||li(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Ii={partial:!0,tokenize:Li};function Li(e,t,n){return r;function r(t){return H(t)?U(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||V(e)?t(e):n(e)}}var Ri={continuation:{tokenize:Bi},exit:Vi,name:`blockQuote`,tokenize:zi};function zi(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return H(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Bi(e,t,n){let r=this;return i;function i(t){return H(t)?U(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Ri,t,n)(r)}}function Vi(e){e.exit(`blockQuote`)}var Hi={name:`characterEscape`,tokenize:Ui};function Ui(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return mi(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Wi={name:`characterReference`,tokenize:Gi};function Gi(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=li,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=pi,u):(e.enter(`characterReferenceValue`),a=7,o=fi,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===li&&!$r(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Ki={partial:!0,tokenize:qi};function qi(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Ji={concrete:!0,name:`codeFenced`,tokenize:Yi};function Yi(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),H(t)?U(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||V(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Ki,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||V(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):H(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),U(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||V(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||V(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&H(t)?U(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||V(t)?e.check(Ki,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||V(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),H(t)?U(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),H(t)?U(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||V(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var Xi={name:`codeIndented`,tokenize:Qi},Zi={partial:!0,tokenize:$i};function Qi(e,t,n){return r;function r(t){return e.enter(`codeIndented`),yi(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):V(t)?e.attempt(Zi,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||V(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function $i(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):V(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):yi(e,t,a,`linePrefix`,4,4)(o)}function a(e){return V(e)?i(e):n(e)}}var ea={name:`codeText`,previous:ta,resolve:W,tokenize:na};function W(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ta(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function na(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):V(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||V(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var ra=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&ia(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),ia(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ia(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);ia(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);ia(this.left,t.reverse())}}}};function ia(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function aa(e){let t={},n=-1,r,i,a,o,s,c,l,u=new ra(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,oa(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return ei(e,0,1/0,u.slice(0)),!l}function oa(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var sa={resolve:la,tokenize:ua},ca={partial:!0,tokenize:da};function la(e){return aa(e),e}function ua(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):V(t)?e.check(ca,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function da(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),U(e,a,`linePrefix`)}function a(i){if(i===null||V(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function fa(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||di(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||V(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||hi(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||di(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function pa(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):V(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||V(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!H(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function ma(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):V(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),U(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||V(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function ha(e,t){let n;return r;function r(i){return V(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):H(i)?U(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var ga={name:`definition`,tokenize:va},_a={partial:!0,tokenize:ya};function va(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return pa.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=si(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return hi(t)?ha(e,l)(t):l(t)}function l(t){return fa(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(_a,d,d)(t)}function d(t){return H(t)?U(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||V(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function ya(e,t,n){return r;function r(t){return hi(t)?ha(e,i)(t):n(t)}function i(t){return ma(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return H(t)?U(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||V(e)?t(e):n(e)}}var ba={name:`hardBreakEscape`,tokenize:xa};function xa(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return V(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Sa={name:`headingAtx`,resolve:Ca,tokenize:wa};function Ca(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};ei(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function wa(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||hi(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||V(n)?(e.exit(`atxHeading`),t(n)):H(n)?U(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||hi(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Ta=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Ea=[`pre`,`script`,`style`,`textarea`],Da={concrete:!0,name:`htmlFlow`,resolveTo:ka,tokenize:Aa},Oa={partial:!0,tokenize:ja};function ka(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Aa(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:te):ci(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):ci(a)?(e.consume(a),i=4,r.interrupt?t:te):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:te):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return ci(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||hi(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Ea.includes(l)?(i=1,r.interrupt?t(s):O(s)):Ta.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||li(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return H(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||ci(t)?(e.consume(t),b):H(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||li(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):H(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):H(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||V(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||hi(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||H(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||V(t)?O(t):H(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),F):t===63&&i===3?(e.consume(t),te):t===93&&i===5?(e.consume(t),P):V(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Oa,ne,k)(t)):t===null||V(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Ki,A,ne)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||V(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),te):O(t)}function N(t){return t===47?(e.consume(t),o=``,ee):O(t)}function ee(t){if(t===62){let n=o.toLowerCase();return Ea.includes(n)?(e.consume(t),F):O(t)}return ci(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ee):O(t)}function P(t){return t===93?(e.consume(t),te):O(t)}function te(t){return t===62?(e.consume(t),F):t===45&&i===2?(e.consume(t),te):O(t)}function F(t){return t===null||V(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),F)}function ne(n){return e.exit(`htmlFlow`),t(n)}}function ja(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Ii,t,n)}}var Ma={name:`htmlText`,tokenize:Na};function Na(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):ci(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):ci(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):V(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):V(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):V(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):V(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return ci(t)?(e.consume(t),S):n(t)}function S(t){return t===45||li(t)?(e.consume(t),S):C(t)}function C(t){return V(t)?(o=C,N(t)):H(t)?(e.consume(t),C):M(t)}function w(t){return t===45||li(t)?(e.consume(t),w):t===47||t===62||hi(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||ci(t)?(e.consume(t),E):V(t)?(o=T,N(t)):H(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||li(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):V(t)?(o=D,N(t)):H(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):V(t)?(o=O,N(t)):H(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):V(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||hi(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||hi(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return H(t)?U(e,P,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):P(t)}function P(t){return e.enter(`htmlTextData`),o(t)}}var Pa={name:`labelEnd`,resolveAll:Ra,resolveTo:za,tokenize:Ba},Fa={tokenize:Va},Ia={tokenize:Ha},La={tokenize:Ua};function Ra(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&ei(e,0,e.length,n),e}function za(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=ti(o,e.slice(i+1,i+r+3)),o=ti(o,[[`enter`,l,t]]),o=ti(o,ki(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=ti(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=ti(o,e.slice(a+1)),o=ti(o,[[`exit`,s,t]]),ei(e,i,e.length,o),e}function Ba(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(si(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Fa,u,o?u:d)(t):t===91?e.attempt(Ia,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(La,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function Va(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return hi(t)?ha(e,a)(t):a(t)}function a(t){return t===41?u(t):fa(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return hi(t)?ha(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?ma(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return hi(t)?ha(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Ha(e,t,n){let r=this;return i;function i(t){return pa.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(si(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Ua(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Wa={name:`labelStartImage`,resolveAll:Pa.resolveAll,tokenize:Ga};function Ga(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Ka={name:`labelStartLink`,resolveAll:Pa.resolveAll,tokenize:qa};function qa(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Ja={name:`lineEnding`,tokenize:Ya};function Ya(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),U(e,t,`linePrefix`)}}var Xa={name:`thematicBreak`,tokenize:Za};function Za(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||V(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),H(t)?U(e,s,`whitespace`)(t):s(t))}}var Qa={continuation:{tokenize:no},exit:io,name:`list`,tokenize:to},$a={partial:!0,tokenize:ao},eo={partial:!0,tokenize:ro};function to(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:fi(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Xa,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return fi(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Ii,r.interrupt?n:u,e.attempt($a,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return H(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function no(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Ii,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,U(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!H(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(eo,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,U(e,e.attempt(Qa,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function ro(e,t,n){let r=this;return U(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function io(e){e.exit(this.containerState.type)}function ao(e,t,n){let r=this;return U(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!H(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var oo={name:`setextUnderline`,resolveTo:so,tokenize:co};function so(e,t){let n=new Si,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function co(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),H(t)?U(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||V(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var lo={tokenize:uo};function uo(e){let t=this,n=e.attempt(Ii,r,e.attempt(this.parser.constructs.flowInitial,i,U(e,e.attempt(this.parser.constructs.flow,i,e.attempt(sa,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var fo={resolveAll:go()},po=ho(`string`),mo=ho(`text`);function ho(e){return{resolveAll:go(e===`text`?_o:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function go(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function _o(e,t){let n=new Si,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var vo=c({attentionMarkers:()=>Eo,contentInitial:()=>bo,disable:()=>Do,document:()=>yo,flow:()=>So,flowInitial:()=>xo,insideSpan:()=>To,string:()=>Co,text:()=>wo}),yo={42:Qa,43:Qa,45:Qa,48:Qa,49:Qa,50:Qa,51:Qa,52:Qa,53:Qa,54:Qa,55:Qa,56:Qa,57:Qa,62:Ri},bo={91:ga},xo={[-2]:Xi,[-1]:Xi,32:Xi},So={35:Sa,42:Xa,45:[oo,Xa],60:Da,61:oo,95:Xa,96:Ji,126:Ji},Co={38:Wi,92:Hi},wo={[-5]:Ja,[-4]:Ja,[-3]:Ja,33:Wa,38:Wi,42:Ai,60:[Pi,Ma],91:Ka,92:[ba,Hi],93:Pa,95:Ai,96:ea},To={null:[Ai,fo]},Eo={null:[42,95]},Do={null:[]};function Oo(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=ti(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=ki(a,l.events,l),l.events):[]}function f(e,t){return Ao(p(e),t)}function p(e){return ko(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){V(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&ei(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ko(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Ao(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
13
+ `;)n+=1;else if(t===`\\`){if(n+1>=e.length)throw new B(`latex-syntax`,`Formula ends with a lone backslash.`,n);let t=e[n+1];if(t===`\\`){r(`command`,`newline`,n),n+=2;continue}if(/[A-Za-z]/.test(t)){let t=n+1;for(;t<e.length&&/[A-Za-z]/.test(e[t]);)t+=1;let i=e.slice(n+1,t);pn.has(i)||r(`command`,i,n),n=t;continue}if(t===` `||t===`,`||t===`;`||t===`:`||t===`!`){n+=2;continue}let i=gn[t];if(i){r(`command`,i,n),n+=2;continue}r(`command`,t,n),n+=2}else if(t>=`0`&&t<=`9`){let t=/^(?:\d+(?:\.\d*)?|\.\d+)/.exec(e.slice(n));r(`number`,t[0],n),n+=t[0].length}else if(t===`.`&&e[n+1]>=`0`&&e[n+1]<=`9`){let t=/^(?:\d+(?:\.\d*)?|\.\d+)/.exec(e.slice(n));r(`number`,t[0],n),n+=t[0].length}else/[A-Za-z]/.test(t)?(r(`letter`,t,n),n+=1):(r(`punct`,t,n),n+=1)}return r(`eof`,``,e.length),t}function vn(e){return Object.prototype.hasOwnProperty.call(mn,e)}function yn(e){switch(e.kind){case`number`:case`letter`:return!0;case`punct`:return e.value===`(`||e.value===`{`||e.value===`[`||e.value===`|`;case`command`:{let t=e.value;return hn.has(t)||vn(t)?!0:t===`frac`||t===`dfrac`||t===`tfrac`||t===`sqrt`||t===`left`||t===`pi`||t===`mathrm`||t===`begin`||t===`lvert`||t===`vert`||t===`lbrace`}default:return!1}}function bn(e){if(e.kind===`punct`)return e.value===`=`?`eq`:e.value===`<`?`lt`:e.value===`>`?`gt`:null;if(e.kind===`command`){if(e.value===`ne`||e.value===`neq`)return`ne`;if(e.value===`le`||e.value===`leq`)return`le`;if(e.value===`ge`||e.value===`geq`)return`ge`}return null}var xn=class{tokens;source;pos=0;nodes=0;constructor(e,t){this.source=e,this.tokens=t}parseDocument(){if(this.peek().kind===`eof`)throw new B(`latex-empty`,`Formula is empty.`,0);if(this.atLetter(`y`)&&this.atPunctAt(1,`=`)&&(this.pos+=2),this.peek().kind===`eof`)throw new B(`latex-empty`,`Missing expression after y.`,this.peek().offset);let e=this.parseAdditive(0),t=this.peek();if(t.kind!==`eof`)throw bn(t)||t.kind===`punct`&&t.value===`=`?new B(`latex-relation`,`Plots support only explicit y = f(x) equations.`,t.offset):new B(`latex-syntax`,`Unexpected token "${this.raw(t)}".`,t.offset);return e}peek(e=0){return this.tokens[Math.min(this.pos+e,this.tokens.length-1)]}take(){return this.tokens[this.pos++]}atPunct(e){let t=this.peek();return t.kind===`punct`&&t.value===e}atPunctAt(e,t){let n=this.peek(e);return n.kind===`punct`&&n.value===t}atCommand(e){let t=this.peek();return t.kind===`command`&&t.value===e}atLetter(e){let t=this.peek();return t.kind===`letter`&&t.value===e}expectPunct(e){let t=this.peek();if(t.kind!==`punct`||t.value!==e)throw new B(`latex-syntax`,`Missing "${e}".`,t.offset);return this.take()}raw(e){return e.kind===`eof`?`end of input`:e.kind===`command`?`\\${e.value}`:this.source.slice(e.offset,e.offset+Math.max(1,e.value.length))}make(e,t,n){if(this.nodes+=1,this.nodes>on)throw new B(`latex-budget`,`Formula is too complex.`,t);if(n>sn)throw new B(`latex-budget`,`Formula is nested too deeply.`,t);return e}parseAdditive(e){let t=this.parseMultiplicative(e+1,!1);for(;;){let n=this.peek();if(n.kind!==`punct`||n.value!==`+`&&n.value!==`-`)break;let r=this.take().value,i=this.parseMultiplicative(e+1,!1);t=this.make({kind:`binary`,op:r,left:t,right:i,offset:n.offset},n.offset,e)}return t}parseMultiplicative(e,t){let n=this.parseUnary(e+1,t);for(;;){let r=this.peek();if(r.kind===`punct`&&r.value===`/`){this.take();let i=this.parseUnary(e+1,t);n=this.make({kind:`binary`,op:`/`,left:n,right:i,offset:r.offset},r.offset,e);continue}if(r.kind===`punct`&&r.value===`*`||r.kind===`command`&&(r.value===`cdot`||r.value===`times`)){this.take();let i=this.parseUnary(e+1,t);n=this.make({kind:`binary`,op:`*`,left:n,right:i,offset:r.offset},r.offset,e);continue}if(t&&r.kind===`command`&&hn.has(r.value)||!yn(r))break;let i=this.parseUnary(e+1,t);n=this.make({kind:`binary`,op:`*`,left:n,right:i,offset:r.offset},r.offset,e)}return n}parseUnary(e,t){let n=this.peek();if(n.kind===`punct`&&(n.value===`+`||n.value===`-`)){this.take();let r=this.parseUnary(e+1,t);return n.value===`+`?r:this.make({kind:`unary`,op:`-`,operand:r,offset:n.offset},n.offset,e)}return this.parsePower(e,t)}parsePower(e,t){let n=this.parseAtom(e+1,t),r=this.peek();if(r.kind===`punct`&&r.value===`^`){this.take();let t=this.parseScriptArgument(e+1);return this.make({kind:`binary`,op:`^`,left:n,right:t,offset:r.offset},r.offset,e)}return n}parseScriptArgument(e){if(this.atPunct(`{`))return this.parseBraceGroup(e+1);if(this.atPunct(`+`)||this.atPunct(`-`)){let t=this.take(),n=this.parseUnary(e+1,!1);return t.value===`+`?n:this.make({kind:`unary`,op:`-`,operand:n,offset:t.offset},t.offset,e)}return this.parseUnary(e+1,!1)}parseAtom(e,t){let n=this.peek();if(n.kind===`number`){this.take();let t=Number(n.value);if(!Number.isFinite(t))throw new B(`latex-number`,`Number "${n.value}" is not finite.`,n.offset);return this.make({kind:`number`,value:t,offset:n.offset},n.offset,e)}if(n.kind===`letter`)return this.take(),this.variable(n.value,n.offset,e);if(n.kind===`punct`){if(n.value===`(`)return this.parseParenthesized(e);if(n.value===`{`)return this.parseBraceGroup(e);if(n.value===`[`)return this.parseBracketGroup(e);if(n.value===`|`)return this.parsePlainAbs(e,n.offset);throw new B(`latex-syntax`,`Cannot start an expression with "${n.value}".`,n.offset)}if(n.kind===`command`){let t=n.value;if(t===`frac`||t===`dfrac`||t===`tfrac`){this.take();let t=this.parseArgument(e+1),r=this.parseArgument(e+1);return this.make({kind:`binary`,op:`/`,left:t,right:r,offset:n.offset},n.offset,e)}if(t===`sqrt`){this.take();let t=null;this.atPunct(`[`)&&(this.take(),t=this.parseAdditive(e+1),this.expectPunct(`]`));let r=this.parseArgument(e+1);return this.make({kind:`call`,name:`sqrt`,args:[r],base:t,power:null,offset:n.offset},n.offset,e)}if(t===`left`)return this.parseLeft(e);if(hn.has(t))return this.parseFunction(t,e);if(t===`pi`)return this.take(),this.make({kind:`constant`,value:`pi`,offset:n.offset},n.offset,e);if(vn(t))return this.take(),this.variable(mn[t],n.offset,e);if(t===`mathrm`){this.take();let t=this.readRawGroup();if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(t.raw))throw new B(`latex-name`,`\\mathrm requires a valid parameter name.`,t.offset);return this.variable(t.raw,n.offset,e)}if(t===`begin`)return this.parseCases(e);if(t===`lvert`||t===`vert`)return this.parseCommandAbs(e,n.offset);throw t===`right`?new B(`latex-syntax`,`\\right has no matching \\left.`,n.offset):t===`text`?new B(`latex-unsupported`,`\\text is only allowed as the otherwise condition of a piecewise function.`,n.offset):new B(`latex-unsupported`,`Command \\${t} is not supported for computation.`,n.offset)}throw new B(`latex-syntax`,`Expression is incomplete.`,n.offset)}parseArgument(e){if(this.atPunct(`{`))return this.parseBraceGroup(e+1);if(this.peek().kind===`eof`)throw new B(`latex-syntax`,`Command is missing an argument.`,this.peek().offset);return this.parseUnary(e+1,!1)}parseParenthesized(e){let t=this.expectPunct(`(`);if(this.atPunct(`)`))throw new B(`latex-syntax`,`Missing expression inside parentheses.`,t.offset);let n=this.parseAdditive(e+1);return this.expectPunct(`)`),n}parseBraceGroup(e){let t=this.expectPunct(`{`);if(this.atPunct(`}`))throw new B(`latex-syntax`,`Missing expression inside braces.`,t.offset);let n=this.parseAdditive(e+1);return this.expectPunct(`}`),n}parseBracketGroup(e){let t=this.expectPunct(`[`);if(this.atPunct(`]`))throw new B(`latex-syntax`,`Missing expression inside brackets.`,t.offset);let n=this.parseAdditive(e+1);return this.expectPunct(`]`),n}parsePlainAbs(e,t){if(this.take(),this.atPunct(`|`))throw new B(`latex-syntax`,`Absolute value is missing its contents.`,t);let n=this.parseAdditive(e+1);if(this.atPunct(`|`))this.take();else if(this.atCommand(`rvert`))this.take();else throw new B(`latex-syntax`,`Unpaired absolute value bar.`,t);return this.make({kind:`abs`,value:n,offset:t},t,e)}parseCommandAbs(e,t){if(this.take(),this.atCommand(`rvert`)||this.atCommand(`vert`)||this.atPunct(`|`))throw new B(`latex-syntax`,`Absolute value is missing its contents.`,t);let n=this.parseAdditive(e+1);if(this.atCommand(`rvert`)||this.atCommand(`vert`)||this.atPunct(`|`))this.take();else throw new B(`latex-syntax`,`Unpaired absolute value bar.`,t);return this.make({kind:`abs`,value:n,offset:t},t,e)}parseLeft(e){let t=this.take(),n=this.readDelimiter(),r=this.parseAdditive(e+1);if(!this.atCommand(`right`))throw new B(`latex-syntax`,`\\left has no matching \\right.`,t.offset);this.take();let i=this.readDelimiter();if(n===`|`&&i!==`|`)throw new B(`latex-syntax`,`Unpaired absolute value bar.`,t.offset);return n===`|`?this.make({kind:`abs`,value:r,offset:t.offset},t.offset,e):r}readDelimiter(){let e=this.peek();if(e.kind===`punct`&&(e.value===`(`||e.value===`)`||e.value===`[`||e.value===`]`||e.value===`|`||e.value===`.`))return this.take(),e.value;if(e.kind===`command`&&(e.value===`lbrace`||e.value===`rbrace`||e.value===`lvert`||e.value===`rvert`||e.value===`vert`||e.value===`Vert`))return this.take(),e.value===`lbrace`||e.value===`rbrace`?`{`:e.value===`lvert`||e.value===`rvert`||e.value===`vert`?`|`:`Vert`;throw new B(`latex-syntax`,`Missing delimiter after \\left/\\right.`,e.offset)}variable(e,t,n){if(e===`y`)throw new B(`latex-name`,`y is the plot output marker and cannot appear in the expression.`,t);return e===`e`||e===`pi`?this.make({kind:`constant`,value:e,offset:t},t,n):this.make({kind:`variable`,name:e,offset:t},t,n)}parseFunction(e,t){let n=this.take().offset,r=null,i=null;e===`log`&&this.atPunct(`_`)&&(this.take(),r=this.parseScriptArgument(t+1)),this.atPunct(`^`)&&(this.take(),i=this.parseScriptArgument(t+1));let a=[];if((e===`min`||e===`max`)&&this.atPunct(`(`)){if(this.take(),this.atPunct(`)`))throw new B(`latex-syntax`,`\\${e} requires at least one argument.`,n);for(a.push(this.parseAdditive(t+1));this.atPunct(`,`);)this.take(),a.push(this.parseAdditive(t+1));this.expectPunct(`)`)}else a.push(this.parseFunctionArgument(t+1));return this.make({kind:`call`,name:e,args:a,base:r,power:i,offset:n},n,t)}parseFunctionArgument(e){if(this.atPunct(`(`)){this.take();let t=this.parseAdditive(e+1);return this.expectPunct(`)`),t}return this.parseMultiplicative(e+1,!0)}parseCases(e){let t=this.take(),n=this.readRawGroup();if(n.raw.trim()!==`cases`)throw new B(`latex-unsupported`,`Environment "${n.raw.trim()}" is not supported.`,n.offset);let r=[];for(;!this.atCommand(`end`);){if(this.peek().kind===`eof`)throw new B(`latex-syntax`,`cases environment is missing \\end{cases}.`,t.offset);if(this.atCommand(`newline`)){this.take();continue}let n=this.parseAdditive(e+1);this.atPunct(`,`)&&this.take();let i=null;if(this.atPunct(`&`)&&(this.take(),i=this.parseCaseCondition(e+1),this.atPunct(`,`)&&this.take()),r.push({value:n,when:i}),this.atCommand(`newline`)){this.take();continue}if(this.atCommand(`end`))break;let a=this.peek();throw new B(`latex-syntax`,`Unexpected "${this.raw(a)}" after a cases branch.`,a.offset)}let i=this.take();if(this.readRawGroup().raw.trim()!==`cases`)throw new B(`latex-syntax`,`\\begin{cases} must be closed with \\end{cases}.`,i.offset);if(r.length===0)throw new B(`latex-syntax`,`cases environment has no branches.`,t.offset);return this.make({kind:`cases`,branches:r,offset:t.offset},t.offset,e)}parseCaseCondition(e){if(this.atCommand(`text`)){let e=this.take(),t=this.readRawGroup();if(t.raw.trim()!==`otherwise`)throw new B(`latex-unsupported`,`Unsupported piecewise condition text "${t.raw.trim()}".`,e.offset);return null}let t=this.parseAdditive(e+1),n=this.peek(),r=bn(n);if(!r)throw new B(`latex-syntax`,`Piecewise condition requires one comparison.`,n.offset);return this.take(),{op:r,left:t,right:this.parseAdditive(e+1)}}readRawGroup(){let e=this.expectPunct(`{`),t=1,n=this.pos;for(;n<this.tokens.length;n+=1){let e=this.tokens[n];if(e.kind===`eof`)break;if(e.kind===`punct`){if(e.value===`{`)t+=1;else if(e.value===`}`&&(--t,t===0))break}}if(n>=this.tokens.length||this.tokens[n].kind===`eof`)throw new B(`latex-syntax`,`Unclosed brace.`,e.offset);let r=this.tokens[n];return this.pos=n+1,{raw:this.source.slice(e.offset+1,r.offset),offset:e.offset+1}}};function Sn(e,t){switch(e.kind){case`variable`:e.name!==`x`&&t.add(e.name);return;case`number`:case`constant`:return;case`unary`:Sn(e.operand,t);return;case`binary`:Sn(e.left,t),Sn(e.right,t);return;case`abs`:Sn(e.value,t);return;case`call`:e.base&&Sn(e.base,t),e.power&&Sn(e.power,t);for(let n of e.args)Sn(n,t);return;case`cases`:for(let n of e.branches)Sn(n.value,t),n.when&&(Sn(n.when.left,t),Sn(n.when.right,t));return}}function Cn(e,t,n){throw new B(e,t,n)}function wn(e,t){return Number.isFinite(e)||Cn(`latex-number`,`Result is not finite.`,t),e}function Tn(e,t,n){if(e===`x`)return t.x;let r=t.env[e];return r===void 0&&!Object.prototype.hasOwnProperty.call(t.env,e)&&Cn(`latex-variable`,`Parameter "${e}" is not declared.`,n),typeof r==`number`&&Number.isFinite(r)||Cn(`latex-type`,`Parameter "${e}" must be a finite number.`,n),r}function En(e,t,n){return e===0&&t<0&&Cn(`latex-divide-by-zero`,`Negative powers of zero are undefined.`,n),e<0&&!Number.isInteger(t)&&Cn(`latex-domain`,`A negative base with a non-integer exponent is not real.`,n),wn(e**+t,n)}function Dn(e,t,n){let r=t??2;return(!Number.isFinite(r)||r<=0)&&Cn(`latex-domain`,`Root index must be positive.`,n),e<0?(Number.isInteger(r)&&r%2!=0||Cn(`latex-domain`,`A negative number has no real even root.`,n),wn(r===3?-Math.cbrt(-e):-((-e)**(1/r)),n)):wn(e**(1/r),n)}function On(e,t){let n=An(e.left,t),r=An(e.right,t);switch(e.op){case`eq`:return n===r;case`ne`:return n!==r;case`lt`:return n<r;case`le`:return n<=r;case`gt`:return n>r;case`ge`:return n>=r;default:return!1}}function kn(e,t){let n=e.args.map(e=>An(e,t)),r=0;switch(e.name){case`sin`:r=Math.sin(n[0]);break;case`cos`:r=Math.cos(n[0]);break;case`tan`:Math.abs(Math.cos(n[0]))<1e-15&&Cn(`latex-domain`,`tan is undefined at this point.`,e.offset),r=Math.tan(n[0]);break;case`arcsin`:(n[0]<-1||n[0]>1)&&Cn(`latex-domain`,`arcsin argument must be in [-1, 1].`,e.offset),r=Math.asin(n[0]);break;case`arccos`:(n[0]<-1||n[0]>1)&&Cn(`latex-domain`,`arccos argument must be in [-1, 1].`,e.offset),r=Math.acos(n[0]);break;case`arctan`:r=Math.atan(n[0]);break;case`exp`:r=Math.exp(n[0]);break;case`ln`:n[0]<=0&&Cn(`latex-domain`,`ln argument must be positive.`,e.offset),r=Math.log(n[0]);break;case`log`:{let i=e.base?An(e.base,t):10;(i<=0||i===1)&&Cn(`latex-domain`,`Logarithm base must be positive and not equal to 1.`,e.offset),n[0]<=0&&Cn(`latex-domain`,`Logarithm argument must be positive.`,e.offset),r=Math.log(n[0])/Math.log(i);break}case`min`:r=Math.min(...n);break;case`max`:r=Math.max(...n);break;case`sqrt`:r=Dn(n[0],e.base?An(e.base,t):null,e.offset);break;default:Cn(`latex-unsupported`,`Unsupported function.`,e.offset)}return e.power&&(r=En(r,An(e.power,t),e.offset)),wn(r,e.offset)}function An(e,t){let n=e.offset;t.steps+=1,t.depth+=1;try{switch(t.steps>t.limit&&Cn(`latex-budget`,`Math evaluation exceeded its budget.`,n),t.depth>ln&&Cn(`latex-budget`,`Math evaluation is nested too deeply.`,n),e.kind){case`number`:return e.value;case`constant`:return e.value===`pi`?Math.PI:Math.E;case`variable`:return Tn(e.name,t,e.offset);case`unary`:{let n=An(e.operand,t);return e.op===`-`?-n:n}case`binary`:{let n=An(e.left,t),r=An(e.right,t);switch(e.op){case`+`:return wn(n+r,e.offset);case`-`:return wn(n-r,e.offset);case`*`:return wn(n*r,e.offset);case`/`:return r===0&&Cn(`latex-divide-by-zero`,`Division by zero.`,e.offset),wn(n/r,e.offset);case`^`:return En(n,r,e.offset)}break}case`abs`:return wn(Math.abs(An(e.value,t)),e.offset);case`call`:return kn(e,t);case`cases`:for(let n of e.branches)if(n.when===null||On(n.when,t))return An(n.value,t);Cn(`latex-undefined`,`No piecewise branch matched.`,e.offset)}Cn(`latex-unsupported`,`Cannot compute this math structure.`,n)}finally{--t.depth}}var jn=new Map;function Mn(e){if(typeof e!=`string`)throw new B(`latex-syntax`,`Math source must be a string.`,0);if(e.length>rn)throw new B(`latex-budget`,`Formula exceeds the length limit.`,rn);let t=jn.get(e);if(t)return t;let n=new xn(e,_n(e)).parseDocument(),r=new Set;Sn(n,r);let i={source:e,dependencies:[...r],evaluate(e,t,r){if(typeof e!=`number`||!Number.isFinite(e))throw new B(`latex-variable`,`Plot input x must be a finite number.`,0);let i={x:e,env:t??{},steps:r?.steps??0,limit:r?.limit??cn,depth:0};try{return An(n,i)}finally{r&&(r.steps=i.steps)}}};return jn.size>=512&&jn.clear(),jn.set(e,i),i}function Nn(e,t,n,r){try{return e.evaluate(t,n,r)}catch(e){if(e instanceof B){if(e.code===`latex-budget`)throw e;return null}throw e}}function Pn(e){if(e.length===0)return 0;let t=[...e].sort((e,t)=>e-t);return t[Math.floor(t.length/2)]}function Fn(e,t,n,r,i,a){let o=n-e;if(!(o>0))return!1;let s=0,c=0;for(let i=1;i<=dn;i+=1){let l=1<<i,u=o/l,d=t,f=0;for(let t=1;t<=l;t+=1){let i=t===l?n:e+t*u,o=t===l?r:a(i);if(o===null)return!0;let s=Math.abs(o-d)/u;s>f&&(f=s),d=o}i===2&&(s=f),c=f}return c>Math.max(s*6,i*12,1e-9)}function In(e,t,n,r,i=200,a){if(!Number.isFinite(n)||!Number.isFinite(r))throw new B(`latex-plot-range`,`Plot min/max must be finite numbers.`,0);if(!(n<r))throw new B(`latex-plot-range`,`Plot min must be less than max.`,0);if(!Number.isInteger(i)||i<2||i>un)throw new B(`latex-plot-samples`,`Sample count must be an integer between 2 and ${un}.`,0);let o={steps:0,limit:Math.max(fn,i*1024)},s=n=>{let r=o.limit-o.steps,i=a?Number.isFinite(a.limit)&&Number.isFinite(a.steps)?a.limit-a.steps:0:1/0,s={steps:0,limit:Math.max(0,Math.min(r,i))};try{return Nn(e,n,t,s)}finally{o.steps+=s.steps,a&&(a.steps=Number.isFinite(a.steps)?a.steps+s.steps:s.steps)}},c=(r-n)/(i-1),l=[];for(let e=0;e<i;e+=1){let t=e===i-1?r:n+e*c;l.push({x:t,y:s(t)})}let u=l.map(e=>e.y).filter(e=>e!==null).map(e=>Math.abs(e)),d=Math.max(1e-9,Pn(u)*8);for(let e=1;e<l.length-1;e+=1){let t=l[e-1].y,n=l[e].y,r=l[e+1].y;t!==null&&n!==null&&r!==null&&Math.abs(n)>Math.max(1,Math.abs(t),Math.abs(r))*100&&Math.abs(n)>d&&(l[e]={x:l[e].x,y:null})}let f=l.length-1,p=l[f].y,m=f>0?l[f-1].y:null;p!==null&&m!==null&&Math.abs(p)>Math.max(1,Math.abs(m))*100&&Math.abs(p)>d&&(p=null,l[f]={x:l[f].x,y:null});let h=[],g=[];for(let e=0;e<l.length-1;e+=1){let t=l[e],n=l[e+1];if(t.y===null||n.y===null)continue;let r=Math.abs(n.y-t.y);h.push(r);let i=n.x-t.x;i>0&&g.push(r/i)}let _=Pn(h),v=Pn(g);for(let e=0;e<l.length-1;e+=1){let t=l[e],n=l[e+1],r=t.y,i=n.y;if(r===null||i===null)continue;let a=()=>{l[e+1]={x:n.x,y:null}},o=s(t.x+(n.x-t.x)/2);if(o===null){a();continue}let c=Math.abs(i-r);(Math.abs(o-(r+i)/2)>Math.max(c*.25,_*.4,1e-9)||c>Math.max(_*16,1e-9))&&Fn(t.x,r,n.x,i,v,e=>s(e))&&a()}return{points:l,endpoint:p}}var Ln=new Map,Rn=new Set([`table`,`chart`,`plot`,`timeline`,`diagram`]),zn=new WeakMap,Bn=new WeakMap;function Vn(e){let t=e.snapshot().revision,n=Bn.get(e);if(n?.revision===t)return n.tokens;let r=new Map,i=t=>{let n=e.resetToken(t);for(let e of t.children??[])n+=i(e);return r.set(t.id,n),n};for(let t of e.document.nodes)i(t);return Bn.set(e,{revision:t,tokens:r}),r}function Hn(e,t){for(let n of t)e.add(n)}function Un(e){let t=zn.get(e);if(t!==void 0)return t;let n=e.dependencies;if(n!==void 0){let t=new Map(Object.entries(n));return zn.set(e,t),t}let r=new Map,i=t=>{let n=new Set,a=!1;if(t.attrs!==void 0)for(let e of Object.values(t.attrs))try{Hn(n,nn(e))}catch{a=!0;break}if(!a){if(t.type===`interpolation`)try{Hn(n,Yt(t.value??``).dependencies)}catch{a=!0}else if(t.type===`math`)try{Hn(n,Mn(t.value??``).dependencies)}catch{a=!0}else if(t.name!==void 0){if(t.name===`table`||t.name===`chart`)(t.attrs?.key??``).trim()!==``&&n.add(x(t));else if(t.name===`diagram`)n.add(x(t));else if(t.name===`plot`)for(let e of t.children??[]){if(e.type!==`inlineMath`)continue;let t=(e.value??``).trim();if(/^y\s*=/u.test(t))try{Hn(n,Mn(t).dependencies)}catch{}}else if(!Rn.has(t.name)){n.add(x(t));let r=e.bindingSlots?.[t.id];if(r!==void 0)for(let e of Object.values(r))n.add(e)}}}let o=!1;for(let e of t.children??[]){let t=i(e);t===null?o=!0:Hn(n,t)}let s=a||o?null:[...n];return r.set(t.id,s),s};for(let t of e.nodes)i(t);return zn.set(e,r),r}function Wn(e){if(e.dependencies!==void 0)return;let t=Un(e),n=Object.create(null);for(let[e,r]of t)n[e]=r===null?null:Object.freeze([...r]);e.dependencies=Object.freeze(n)}var Gn=new Set(`aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkgrey.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkslategrey.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dimgrey.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.green.greenyellow.grey.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightgrey.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightslategrey.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.slategrey.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen`.split(`.`)),Kn=/^#(?:[0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;function qn(e){return typeof e==`string`?Kn.test(e)||Gn.has(e.toLowerCase()):!1}function Jn(e,t,n,r=`local.expression`){t instanceof z?e(`${r}.${t.code||`invalid`}`,`Expression error: ${t.message}`,n+(Number.isFinite(t.offset)?t.offset:0)):e(`${r}.invalid`,`Expression error: ${t instanceof Error?t.message:String(t)}`,n)}function Yn(e){return e instanceof z?e:new z(`expression-eval`,e instanceof Error?e.message:String(e),0)}function Xn(e,t){let n=new Set(e),r=new Map,i=new Map;for(let t of e)r.set(t,0);for(let a of e)for(let e of t(a)){if(!n.has(e))continue;r.set(a,(r.get(a)??0)+1);let t=i.get(e);t?t.push(a):i.set(e,[a])}let a=[];for(let t of e)(r.get(t)??0)===0&&a.push(t);let o=[];for(let e=0;e<a.length;e+=1){let t=a[e];o.push(t);for(let e of i.get(t)??[]){let t=(r.get(e)??0)-1;r.set(e,t),t===0&&a.push(e)}}let s=new Set(o);return{order:o,cyclic:e.filter(e=>!s.has(e))}}function Zn(e){let t=Object.keys(e),n=new Set(t);return Xn(t,t=>{let r=e[t];return r?r.dependencies.filter(e=>n.has(e)):[]})}function Qn(e,t,n){let r=new Map,i=new Map,a=new Map,o=[],s=new Set;for(let t of e)a.has(t.name)||(a.set(t.name,t),o.push(t.name));let c=new Set(o);for(let e of o){let t=a.get(e),o;try{o=Yt(t.source)}catch(r){Jn(n,r,t.expressionOffset),s.add(e);continue}r.set(e,o),i.set(e,[...o.dependencies])}for(let e of o)if(!s.has(e)){for(let r of i.get(e)??[])if(!(c.has(r)||Object.hasOwn(t,r))){n(`local.computation.unknown`,`Reference to undeclared parameter ${r} in computation "${e}".`,a.get(e).expressionOffset+Math.max(0,a.get(e).source.indexOf(r))),s.add(e);break}}let l=new Set;for(let e of o){if(s.has(e))continue;let r=a.get(e);if(r.kind===`const`)for(let o of i.get(e)??[]){let i=c.has(o)?a.get(o).kind:null;Object.hasOwn(t,o)?(n(`local.computation.const`,`Constant "${e}" cannot depend on control parameter "${o}".`,r.expressionOffset+Math.max(0,r.source.indexOf(o))),l.add(e)):i===`computed`&&(n(`local.computation.const`,`Constant "${e}" cannot depend on computed value "${o}".`,r.expressionOffset+Math.max(0,r.source.indexOf(o))),l.add(e))}}let{order:u,cyclic:d}=Xn(o,e=>i.get(e)??[]);if(d.length>0){let e=new Set(d),t=[],r=new Map,o=d[0];for(;!r.has(o);){r.set(o,t.length),t.push(o);let n=(i.get(o)??[]).find(t=>e.has(t));if(n===void 0)break;o=n}let c=r.has(o)?t.slice(r.get(o)):[d[0]],l=c.slice(0,12).join(` → `)+(c.length>12?` → …`:` → ${c[0]}`);for(let e of c.slice(0,100)){let t=a.get(e);n(`local.computation.cycle`,`Computation "${e}" is part of a dependency cycle: ${l}.`,t.range.start,t.range.end)}for(let e of d)s.add(e)}for(let e of u)if(!s.has(e)&&!(a.get(e).kind!==`const`||l.has(e))&&(i.get(e)??[]).some(e=>c.has(e)?a.get(e).kind===`const`&&l.has(e):!1)){let t=a.get(e);n(`local.computation.const`,`Constant "${e}" indirectly depends on a value that is not a constant.`,t.expressionOffset),l.add(e)}let f={},p={...t};for(let e of u){if(s.has(e))continue;let t=a.get(e);if((i.get(e)??[]).some(e=>s.has(e))){s.add(e);continue}let o=r.get(e);try{let t=o.inferType(p);f[e]=t,p[e]=t}catch(r){Jn(n,r,t.expressionOffset),s.add(e)}}let m={},h={};for(let e of u){if(s.has(e)||a.get(e).kind!==`const`||l.has(e))continue;let t=a.get(e),i=r.get(e);try{let r=i.evaluate(h),a=yt(r);if(a){n(`local.computation.budget`,`Constant "${e}": ${a}`,t.expressionOffset),s.add(e);continue}m[e]=Array.isArray(r)?r.slice():r,h[e]=m[e]}catch(r){let i=Yn(r);n(`local.computation.expression`,`Constant "${e}" cannot be evaluated: ${i.message}`,t.expressionOffset+(Number.isFinite(i.offset)?i.offset:0)),s.add(e)}}let g={};for(let e of o){let t=a.get(e);if(s.has(e)||f[e]===void 0)continue;let n={name:e,kind:t.kind,source:t.source,dependencies:[...i.get(e)??[]],type:f[e],nodeId:t.nodeId,range:{...t.range}};t.kind===`const`&&Object.hasOwn(m,e)&&(n.value=m[e]),g[e]=n}return{computations:g,kinds:f,order:u.filter(e=>!s.has(e)),expressions:r,constValues:m}}function $n(e,t,n,r,i){let a={},o=new Map,s={};for(let[e,t]of Object.entries(r))s[e]=t;for(let[e,t]of Object.entries(i))a[e]=t,s[e]=t;for(let r of t){let t=e[r];if(!t||t.kind===`const`)continue;let i=n.get(r);if(i)try{let e=i.evaluate(s),t=yt(e);if(t)throw new z(`expression-budget`,t,0);a[r]=e,s[r]=e}catch(e){let t=Yn(e);o.set(r,t),Object.defineProperty(s,r,{enumerable:!0,configurable:!0,get(){throw t}})}}return{values:a,errors:o}}function er(e,t){return(e??[]).map(e=>{switch(e.type){case`text`:case`inlineCode`:case`inlineMath`:case`fallback`:return e.value??``;case`image`:return e.alt??``;case`break`:return` `;case`interpolation`:try{let n=Yt(e.value??``).evaluate(t);return Array.isArray(n)?`Cannot compute`:n===null?``:String(n)}catch{return`Cannot compute`}default:return er(e.children,t)}}).join(``)}function tr(e){return e.trim().toLowerCase().replace(/[^\p{L}\p{N}\p{M}\s_-]/gu,``).replace(/\s+/g,`-`)||`section`}function nr(e){if(e.type!==`component`||e.name!==`anchor`)return;let t=e.attrs?.id;if(typeof t==`string`&&t.length!==0)return/^[A-Za-z_][A-Za-z0-9_-]*$/.test(t)?t:void 0}function rr(e){if(e.type===`component`)return;let t=e.attrs?.id;if(typeof t!=`string`)return;let n=t.trim().replace(/[\u0000- \u007f-\u009f]+/g,`-`).replace(/^-+|-+$/g,``);return n===``?void 0:n}function ir(e,t,n=!0){let r=e.initialState;if(e.computations){let t={},n=new Map;for(let[r,i]of Object.entries(e.computations)){i.kind===`const`&&Object.hasOwn(i,`value`)&&(t[r]=i.value);try{n.set(r,Yt(i.source))}catch{}}let{order:i}=Zn(e.computations),a=$n(e.computations,i,n,r,t);r={...r,...a.values}}let i=new Map,a=new Map,o=new Map,s=new Map,c=new Map;function l(e){let n=e,r=c.get(e)??0;for(;s.has(n);)r+=1,n=`${e}-${r}`;c.set(e,r);let i=`${t}-${n}`;return s.set(n,i),{slug:n,id:i}}function u(e){for(let t of e){if(t.type===`heading`){let e=rr(t)??tr(er(t.children,r));i.set(t,l(e).id)}else{if(n){let e=nr(t);e&&a.set(t,l(e).id)}let e=rr(t);e&&o.set(t,l(e).id)}t.children&&u(t.children)}}u(e.nodes);function d(e){if(e.length===0)return;let t=s.get(e);if(t)return t;try{return s.get(decodeURIComponent(e))}catch{return}}return{ids:i,anchorIds:a,htmlIds:o,targetId(e){return d(e)},referenceId(e){return d(e)??`${t}-${e}`},resolve(e){if(!e.startsWith(`#`))return e;let t=d(e.slice(1));return t?`#${t}`:e}}}function ar(e){if(e)throw e}var or=s(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function sr(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function cr(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?lr(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function lr(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}function ur(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?fr(e.position):`start`in e||`end`in e?fr(e):`line`in e||`column`in e?dr(e):``}function dr(e){return pr(e&&e.line)+`:`+pr(e&&e.column)}function fr(e){return dr(e&&e.start)+`-`+dr(e&&e.end)}function pr(e){return e&&typeof e==`number`?e:1}var mr=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=ur(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};mr.prototype.file=``,mr.prototype.name=``,mr.prototype.reason=``,mr.prototype.message=``,mr.prototype.stack=``,mr.prototype.column=void 0,mr.prototype.line=void 0,mr.prototype.ancestors=void 0,mr.prototype.cause=void 0,mr.prototype.fatal=void 0,mr.prototype.place=void 0,mr.prototype.ruleId=void 0,mr.prototype.source=void 0;var hr={basename:gr,dirname:_r,extname:vr,join:yr,sep:`/`};function gr(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Sr(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function _r(e){if(Sr(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function vr(e){Sr(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function yr(...e){let t=-1,n;for(;++t<e.length;)Sr(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:br(n)}function br(e){Sr(e);let t=e.codePointAt(0)===47,n=xr(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function xr(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Sr(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Cr={cwd:wr};function wr(){return`/`}function Tr(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Er(e){if(typeof e==`string`)e=new URL(e);else if(!Tr(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Dr(e)}function Dr(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Or=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],kr=class{constructor(e){let t;t=e?Tr(e)?{path:e}:typeof e==`string`||Nr(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Cr.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Or.length;){let e=Or[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Or.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?hr.basename(this.path):void 0}set basename(e){jr(e,`basename`),Ar(e,`basename`),this.path=hr.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?hr.dirname(this.path):void 0}set dirname(e){Mr(this.basename,`dirname`),this.path=hr.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?hr.extname(this.path):void 0}set extname(e){if(Ar(e,`extname`),Mr(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=hr.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Tr(e)&&(e=Er(e)),jr(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?hr.basename(this.path,this.extname):void 0}set stem(e){jr(e,`stem`),Ar(e,`stem`),this.path=hr.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new mr(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Ar(e,t){if(e&&e.includes(hr.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+hr.sep+"`")}function jr(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Mr(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Nr(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Pr=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Fr=u(or(),1),Ir={}.hasOwnProperty,Lr=new class e extends Pr{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=cr()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Fr.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Br(`data`,this.frozen),this.namespace[e]=t,this):Ir.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Br(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Ur(e),n=this.parser||this.Parser;return Rr(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Rr(`process`,this.parser||this.Parser),zr(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Ur(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Gr(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Rr(`processSync`,this.parser||this.Parser),zr(`processSync`,this.compiler||this.Compiler),this.process(e,r),Hr(`processSync`,`process`,t),n;function r(e,r){t=!0,ar(e),n=r}}run(e,t,n){Vr(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Ur(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Hr(`runSync`,`run`,n),r;function i(e,t){ar(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Ur(t),r=this.compiler||this.Compiler;return zr(`stringify`,r),Vr(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Br(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Fr.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];sr(o)&&sr(r)&&(r=(0,Fr.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Rr(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function zr(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Br(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Vr(e){if(!sr(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Hr(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ur(e){return Wr(e)?e:new kr(e)}function Wr(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Gr(e){return typeof e==`string`||Kr(e)}function Kr(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var qr={};function Jr(e,t){let n=t||qr;return Yr(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function Yr(e,t,n){if(Zr(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Xr(e.children,t,n)}return Array.isArray(e)?Xr(e,t,n):``}function Xr(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Yr(e[i],t,n);return r.join(``)}function Zr(e){return!!(e&&typeof e==`object`)}var Qr={AElig:`Æ`,AMP:`&`,Aacute:`Á`,Abreve:`Ă`,Acirc:`Â`,Acy:`А`,Afr:`𝔄`,Agrave:`À`,Alpha:`Α`,Amacr:`Ā`,And:`⩓`,Aogon:`Ą`,Aopf:`𝔸`,ApplyFunction:`⁡`,Aring:`Å`,Ascr:`𝒜`,Assign:`≔`,Atilde:`Ã`,Auml:`Ä`,Backslash:`∖`,Barv:`⫧`,Barwed:`⌆`,Bcy:`Б`,Because:`∵`,Bernoullis:`ℬ`,Beta:`Β`,Bfr:`𝔅`,Bopf:`𝔹`,Breve:`˘`,Bscr:`ℬ`,Bumpeq:`≎`,CHcy:`Ч`,COPY:`©`,Cacute:`Ć`,Cap:`⋒`,CapitalDifferentialD:`ⅅ`,Cayleys:`ℭ`,Ccaron:`Č`,Ccedil:`Ç`,Ccirc:`Ĉ`,Cconint:`∰`,Cdot:`Ċ`,Cedilla:`¸`,CenterDot:`·`,Cfr:`ℭ`,Chi:`Χ`,CircleDot:`⊙`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,ClockwiseContourIntegral:`∲`,CloseCurlyDoubleQuote:`”`,CloseCurlyQuote:`’`,Colon:`∷`,Colone:`⩴`,Congruent:`≡`,Conint:`∯`,ContourIntegral:`∮`,Copf:`ℂ`,Coproduct:`∐`,CounterClockwiseContourIntegral:`∳`,Cross:`⨯`,Cscr:`𝒞`,Cup:`⋓`,CupCap:`≍`,DD:`ⅅ`,DDotrahd:`⤑`,DJcy:`Ђ`,DScy:`Ѕ`,DZcy:`Џ`,Dagger:`‡`,Darr:`↡`,Dashv:`⫤`,Dcaron:`Ď`,Dcy:`Д`,Del:`∇`,Delta:`Δ`,Dfr:`𝔇`,DiacriticalAcute:`´`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,DiacriticalGrave:"`",DiacriticalTilde:`˜`,Diamond:`⋄`,DifferentialD:`ⅆ`,Dopf:`𝔻`,Dot:`¨`,DotDot:`⃜`,DotEqual:`≐`,DoubleContourIntegral:`∯`,DoubleDot:`¨`,DoubleDownArrow:`⇓`,DoubleLeftArrow:`⇐`,DoubleLeftRightArrow:`⇔`,DoubleLeftTee:`⫤`,DoubleLongLeftArrow:`⟸`,DoubleLongLeftRightArrow:`⟺`,DoubleLongRightArrow:`⟹`,DoubleRightArrow:`⇒`,DoubleRightTee:`⊨`,DoubleUpArrow:`⇑`,DoubleUpDownArrow:`⇕`,DoubleVerticalBar:`∥`,DownArrow:`↓`,DownArrowBar:`⤓`,DownArrowUpArrow:`⇵`,DownBreve:`̑`,DownLeftRightVector:`⥐`,DownLeftTeeVector:`⥞`,DownLeftVector:`↽`,DownLeftVectorBar:`⥖`,DownRightTeeVector:`⥟`,DownRightVector:`⇁`,DownRightVectorBar:`⥗`,DownTee:`⊤`,DownTeeArrow:`↧`,Downarrow:`⇓`,Dscr:`𝒟`,Dstrok:`Đ`,ENG:`Ŋ`,ETH:`Ð`,Eacute:`É`,Ecaron:`Ě`,Ecirc:`Ê`,Ecy:`Э`,Edot:`Ė`,Efr:`𝔈`,Egrave:`È`,Element:`∈`,Emacr:`Ē`,EmptySmallSquare:`◻`,EmptyVerySmallSquare:`▫`,Eogon:`Ę`,Eopf:`𝔼`,Epsilon:`Ε`,Equal:`⩵`,EqualTilde:`≂`,Equilibrium:`⇌`,Escr:`ℰ`,Esim:`⩳`,Eta:`Η`,Euml:`Ë`,Exists:`∃`,ExponentialE:`ⅇ`,Fcy:`Ф`,Ffr:`𝔉`,FilledSmallSquare:`◼`,FilledVerySmallSquare:`▪`,Fopf:`𝔽`,ForAll:`∀`,Fouriertrf:`ℱ`,Fscr:`ℱ`,GJcy:`Ѓ`,GT:`>`,Gamma:`Γ`,Gammad:`Ϝ`,Gbreve:`Ğ`,Gcedil:`Ģ`,Gcirc:`Ĝ`,Gcy:`Г`,Gdot:`Ġ`,Gfr:`𝔊`,Gg:`⋙`,Gopf:`𝔾`,GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterGreater:`⪢`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Gscr:`𝒢`,Gt:`≫`,HARDcy:`Ъ`,Hacek:`ˇ`,Hat:`^`,Hcirc:`Ĥ`,Hfr:`ℌ`,HilbertSpace:`ℋ`,Hopf:`ℍ`,HorizontalLine:`─`,Hscr:`ℋ`,Hstrok:`Ħ`,HumpDownHump:`≎`,HumpEqual:`≏`,IEcy:`Е`,IJlig:`IJ`,IOcy:`Ё`,Iacute:`Í`,Icirc:`Î`,Icy:`И`,Idot:`İ`,Ifr:`ℑ`,Igrave:`Ì`,Im:`ℑ`,Imacr:`Ī`,ImaginaryI:`ⅈ`,Implies:`⇒`,Int:`∬`,Integral:`∫`,Intersection:`⋂`,InvisibleComma:`⁣`,InvisibleTimes:`⁢`,Iogon:`Į`,Iopf:`𝕀`,Iota:`Ι`,Iscr:`ℐ`,Itilde:`Ĩ`,Iukcy:`І`,Iuml:`Ï`,Jcirc:`Ĵ`,Jcy:`Й`,Jfr:`𝔍`,Jopf:`𝕁`,Jscr:`𝒥`,Jsercy:`Ј`,Jukcy:`Є`,KHcy:`Х`,KJcy:`Ќ`,Kappa:`Κ`,Kcedil:`Ķ`,Kcy:`К`,Kfr:`𝔎`,Kopf:`𝕂`,Kscr:`𝒦`,LJcy:`Љ`,LT:`<`,Lacute:`Ĺ`,Lambda:`Λ`,Lang:`⟪`,Laplacetrf:`ℒ`,Larr:`↞`,Lcaron:`Ľ`,Lcedil:`Ļ`,Lcy:`Л`,LeftAngleBracket:`⟨`,LeftArrow:`←`,LeftArrowBar:`⇤`,LeftArrowRightArrow:`⇆`,LeftCeiling:`⌈`,LeftDoubleBracket:`⟦`,LeftDownTeeVector:`⥡`,LeftDownVector:`⇃`,LeftDownVectorBar:`⥙`,LeftFloor:`⌊`,LeftRightArrow:`↔`,LeftRightVector:`⥎`,LeftTee:`⊣`,LeftTeeArrow:`↤`,LeftTeeVector:`⥚`,LeftTriangle:`⊲`,LeftTriangleBar:`⧏`,LeftTriangleEqual:`⊴`,LeftUpDownVector:`⥑`,LeftUpTeeVector:`⥠`,LeftUpVector:`↿`,LeftUpVectorBar:`⥘`,LeftVector:`↼`,LeftVectorBar:`⥒`,Leftarrow:`⇐`,Leftrightarrow:`⇔`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,LessLess:`⪡`,LessSlantEqual:`⩽`,LessTilde:`≲`,Lfr:`𝔏`,Ll:`⋘`,Lleftarrow:`⇚`,Lmidot:`Ŀ`,LongLeftArrow:`⟵`,LongLeftRightArrow:`⟷`,LongRightArrow:`⟶`,Longleftarrow:`⟸`,Longleftrightarrow:`⟺`,Longrightarrow:`⟹`,Lopf:`𝕃`,LowerLeftArrow:`↙`,LowerRightArrow:`↘`,Lscr:`ℒ`,Lsh:`↰`,Lstrok:`Ł`,Lt:`≪`,Map:`⤅`,Mcy:`М`,MediumSpace:` `,Mellintrf:`ℳ`,Mfr:`𝔐`,MinusPlus:`∓`,Mopf:`𝕄`,Mscr:`ℳ`,Mu:`Μ`,NJcy:`Њ`,Nacute:`Ń`,Ncaron:`Ň`,Ncedil:`Ņ`,Ncy:`Н`,NegativeMediumSpace:`​`,NegativeThickSpace:`​`,NegativeThinSpace:`​`,NegativeVeryThinSpace:`​`,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NewLine:`
14
+ `,Nfr:`𝔑`,NoBreak:`⁠`,NonBreakingSpace:`\xA0`,Nopf:`ℕ`,Not:`⫬`,NotCongruent:`≢`,NotCupCap:`≭`,NotDoubleVerticalBar:`∦`,NotElement:`∉`,NotEqual:`≠`,NotEqualTilde:`≂̸`,NotExists:`∄`,NotGreater:`≯`,NotGreaterEqual:`≱`,NotGreaterFullEqual:`≧̸`,NotGreaterGreater:`≫̸`,NotGreaterLess:`≹`,NotGreaterSlantEqual:`⩾̸`,NotGreaterTilde:`≵`,NotHumpDownHump:`≎̸`,NotHumpEqual:`≏̸`,NotLeftTriangle:`⋪`,NotLeftTriangleBar:`⧏̸`,NotLeftTriangleEqual:`⋬`,NotLess:`≮`,NotLessEqual:`≰`,NotLessGreater:`≸`,NotLessLess:`≪̸`,NotLessSlantEqual:`⩽̸`,NotLessTilde:`≴`,NotNestedGreaterGreater:`⪢̸`,NotNestedLessLess:`⪡̸`,NotPrecedes:`⊀`,NotPrecedesEqual:`⪯̸`,NotPrecedesSlantEqual:`⋠`,NotReverseElement:`∌`,NotRightTriangle:`⋫`,NotRightTriangleBar:`⧐̸`,NotRightTriangleEqual:`⋭`,NotSquareSubset:`⊏̸`,NotSquareSubsetEqual:`⋢`,NotSquareSuperset:`⊐̸`,NotSquareSupersetEqual:`⋣`,NotSubset:`⊂⃒`,NotSubsetEqual:`⊈`,NotSucceeds:`⊁`,NotSucceedsEqual:`⪰̸`,NotSucceedsSlantEqual:`⋡`,NotSucceedsTilde:`≿̸`,NotSuperset:`⊃⃒`,NotSupersetEqual:`⊉`,NotTilde:`≁`,NotTildeEqual:`≄`,NotTildeFullEqual:`≇`,NotTildeTilde:`≉`,NotVerticalBar:`∤`,Nscr:`𝒩`,Ntilde:`Ñ`,Nu:`Ν`,OElig:`Œ`,Oacute:`Ó`,Ocirc:`Ô`,Ocy:`О`,Odblac:`Ő`,Ofr:`𝔒`,Ograve:`Ò`,Omacr:`Ō`,Omega:`Ω`,Omicron:`Ο`,Oopf:`𝕆`,OpenCurlyDoubleQuote:`“`,OpenCurlyQuote:`‘`,Or:`⩔`,Oscr:`𝒪`,Oslash:`Ø`,Otilde:`Õ`,Otimes:`⨷`,Ouml:`Ö`,OverBar:`‾`,OverBrace:`⏞`,OverBracket:`⎴`,OverParenthesis:`⏜`,PartialD:`∂`,Pcy:`П`,Pfr:`𝔓`,Phi:`Φ`,Pi:`Π`,PlusMinus:`±`,Poincareplane:`ℌ`,Popf:`ℙ`,Pr:`⪻`,Precedes:`≺`,PrecedesEqual:`⪯`,PrecedesSlantEqual:`≼`,PrecedesTilde:`≾`,Prime:`″`,Product:`∏`,Proportion:`∷`,Proportional:`∝`,Pscr:`𝒫`,Psi:`Ψ`,QUOT:`"`,Qfr:`𝔔`,Qopf:`ℚ`,Qscr:`𝒬`,RBarr:`⤐`,REG:`®`,Racute:`Ŕ`,Rang:`⟫`,Rarr:`↠`,Rarrtl:`⤖`,Rcaron:`Ř`,Rcedil:`Ŗ`,Rcy:`Р`,Re:`ℜ`,ReverseElement:`∋`,ReverseEquilibrium:`⇋`,ReverseUpEquilibrium:`⥯`,Rfr:`ℜ`,Rho:`Ρ`,RightAngleBracket:`⟩`,RightArrow:`→`,RightArrowBar:`⇥`,RightArrowLeftArrow:`⇄`,RightCeiling:`⌉`,RightDoubleBracket:`⟧`,RightDownTeeVector:`⥝`,RightDownVector:`⇂`,RightDownVectorBar:`⥕`,RightFloor:`⌋`,RightTee:`⊢`,RightTeeArrow:`↦`,RightTeeVector:`⥛`,RightTriangle:`⊳`,RightTriangleBar:`⧐`,RightTriangleEqual:`⊵`,RightUpDownVector:`⥏`,RightUpTeeVector:`⥜`,RightUpVector:`↾`,RightUpVectorBar:`⥔`,RightVector:`⇀`,RightVectorBar:`⥓`,Rightarrow:`⇒`,Ropf:`ℝ`,RoundImplies:`⥰`,Rrightarrow:`⇛`,Rscr:`ℛ`,Rsh:`↱`,RuleDelayed:`⧴`,SHCHcy:`Щ`,SHcy:`Ш`,SOFTcy:`Ь`,Sacute:`Ś`,Sc:`⪼`,Scaron:`Š`,Scedil:`Ş`,Scirc:`Ŝ`,Scy:`С`,Sfr:`𝔖`,ShortDownArrow:`↓`,ShortLeftArrow:`←`,ShortRightArrow:`→`,ShortUpArrow:`↑`,Sigma:`Σ`,SmallCircle:`∘`,Sopf:`𝕊`,Sqrt:`√`,Square:`□`,SquareIntersection:`⊓`,SquareSubset:`⊏`,SquareSubsetEqual:`⊑`,SquareSuperset:`⊐`,SquareSupersetEqual:`⊒`,SquareUnion:`⊔`,Sscr:`𝒮`,Star:`⋆`,Sub:`⋐`,Subset:`⋐`,SubsetEqual:`⊆`,Succeeds:`≻`,SucceedsEqual:`⪰`,SucceedsSlantEqual:`≽`,SucceedsTilde:`≿`,SuchThat:`∋`,Sum:`∑`,Sup:`⋑`,Superset:`⊃`,SupersetEqual:`⊇`,Supset:`⋑`,THORN:`Þ`,TRADE:`™`,TSHcy:`Ћ`,TScy:`Ц`,Tab:` `,Tau:`Τ`,Tcaron:`Ť`,Tcedil:`Ţ`,Tcy:`Т`,Tfr:`𝔗`,Therefore:`∴`,Theta:`Θ`,ThickSpace:`  `,ThinSpace:` `,Tilde:`∼`,TildeEqual:`≃`,TildeFullEqual:`≅`,TildeTilde:`≈`,Topf:`𝕋`,TripleDot:`⃛`,Tscr:`𝒯`,Tstrok:`Ŧ`,Uacute:`Ú`,Uarr:`↟`,Uarrocir:`⥉`,Ubrcy:`Ў`,Ubreve:`Ŭ`,Ucirc:`Û`,Ucy:`У`,Udblac:`Ű`,Ufr:`𝔘`,Ugrave:`Ù`,Umacr:`Ū`,UnderBar:`_`,UnderBrace:`⏟`,UnderBracket:`⎵`,UnderParenthesis:`⏝`,Union:`⋃`,UnionPlus:`⊎`,Uogon:`Ų`,Uopf:`𝕌`,UpArrow:`↑`,UpArrowBar:`⤒`,UpArrowDownArrow:`⇅`,UpDownArrow:`↕`,UpEquilibrium:`⥮`,UpTee:`⊥`,UpTeeArrow:`↥`,Uparrow:`⇑`,Updownarrow:`⇕`,UpperLeftArrow:`↖`,UpperRightArrow:`↗`,Upsi:`ϒ`,Upsilon:`Υ`,Uring:`Ů`,Uscr:`𝒰`,Utilde:`Ũ`,Uuml:`Ü`,VDash:`⊫`,Vbar:`⫫`,Vcy:`В`,Vdash:`⊩`,Vdashl:`⫦`,Vee:`⋁`,Verbar:`‖`,Vert:`‖`,VerticalBar:`∣`,VerticalLine:`|`,VerticalSeparator:`❘`,VerticalTilde:`≀`,VeryThinSpace:` `,Vfr:`𝔙`,Vopf:`𝕍`,Vscr:`𝒱`,Vvdash:`⊪`,Wcirc:`Ŵ`,Wedge:`⋀`,Wfr:`𝔚`,Wopf:`𝕎`,Wscr:`𝒲`,Xfr:`𝔛`,Xi:`Ξ`,Xopf:`𝕏`,Xscr:`𝒳`,YAcy:`Я`,YIcy:`Ї`,YUcy:`Ю`,Yacute:`Ý`,Ycirc:`Ŷ`,Ycy:`Ы`,Yfr:`𝔜`,Yopf:`𝕐`,Yscr:`𝒴`,Yuml:`Ÿ`,ZHcy:`Ж`,Zacute:`Ź`,Zcaron:`Ž`,Zcy:`З`,Zdot:`Ż`,ZeroWidthSpace:`​`,Zeta:`Ζ`,Zfr:`ℨ`,Zopf:`ℤ`,Zscr:`𝒵`,aacute:`á`,abreve:`ă`,ac:`∾`,acE:`∾̳`,acd:`∿`,acirc:`â`,acute:`´`,acy:`а`,aelig:`æ`,af:`⁡`,afr:`𝔞`,agrave:`à`,alefsym:`ℵ`,aleph:`ℵ`,alpha:`α`,amacr:`ā`,amalg:`⨿`,amp:`&`,and:`∧`,andand:`⩕`,andd:`⩜`,andslope:`⩘`,andv:`⩚`,ang:`∠`,ange:`⦤`,angle:`∠`,angmsd:`∡`,angmsdaa:`⦨`,angmsdab:`⦩`,angmsdac:`⦪`,angmsdad:`⦫`,angmsdae:`⦬`,angmsdaf:`⦭`,angmsdag:`⦮`,angmsdah:`⦯`,angrt:`∟`,angrtvb:`⊾`,angrtvbd:`⦝`,angsph:`∢`,angst:`Å`,angzarr:`⍼`,aogon:`ą`,aopf:`𝕒`,ap:`≈`,apE:`⩰`,apacir:`⩯`,ape:`≊`,apid:`≋`,apos:`'`,approx:`≈`,approxeq:`≊`,aring:`å`,ascr:`𝒶`,ast:`*`,asymp:`≈`,asympeq:`≍`,atilde:`ã`,auml:`ä`,awconint:`∳`,awint:`⨑`,bNot:`⫭`,backcong:`≌`,backepsilon:`϶`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,barvee:`⊽`,barwed:`⌅`,barwedge:`⌅`,bbrk:`⎵`,bbrktbrk:`⎶`,bcong:`≌`,bcy:`б`,bdquo:`„`,becaus:`∵`,because:`∵`,bemptyv:`⦰`,bepsi:`϶`,bernou:`ℬ`,beta:`β`,beth:`ℶ`,between:`≬`,bfr:`𝔟`,bigcap:`⋂`,bigcirc:`◯`,bigcup:`⋃`,bigodot:`⨀`,bigoplus:`⨁`,bigotimes:`⨂`,bigsqcup:`⨆`,bigstar:`★`,bigtriangledown:`▽`,bigtriangleup:`△`,biguplus:`⨄`,bigvee:`⋁`,bigwedge:`⋀`,bkarow:`⤍`,blacklozenge:`⧫`,blacksquare:`▪`,blacktriangle:`▴`,blacktriangledown:`▾`,blacktriangleleft:`◂`,blacktriangleright:`▸`,blank:`␣`,blk12:`▒`,blk14:`░`,blk34:`▓`,block:`█`,bne:`=⃥`,bnequiv:`≡⃥`,bnot:`⌐`,bopf:`𝕓`,bot:`⊥`,bottom:`⊥`,bowtie:`⋈`,boxDL:`╗`,boxDR:`╔`,boxDl:`╖`,boxDr:`╓`,boxH:`═`,boxHD:`╦`,boxHU:`╩`,boxHd:`╤`,boxHu:`╧`,boxUL:`╝`,boxUR:`╚`,boxUl:`╜`,boxUr:`╙`,boxV:`║`,boxVH:`╬`,boxVL:`╣`,boxVR:`╠`,boxVh:`╫`,boxVl:`╢`,boxVr:`╟`,boxbox:`⧉`,boxdL:`╕`,boxdR:`╒`,boxdl:`┐`,boxdr:`┌`,boxh:`─`,boxhD:`╥`,boxhU:`╨`,boxhd:`┬`,boxhu:`┴`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxuL:`╛`,boxuR:`╘`,boxul:`┘`,boxur:`└`,boxv:`│`,boxvH:`╪`,boxvL:`╡`,boxvR:`╞`,boxvh:`┼`,boxvl:`┤`,boxvr:`├`,bprime:`‵`,breve:`˘`,brvbar:`¦`,bscr:`𝒷`,bsemi:`⁏`,bsim:`∽`,bsime:`⋍`,bsol:`\\`,bsolb:`⧅`,bsolhsub:`⟈`,bull:`•`,bullet:`•`,bump:`≎`,bumpE:`⪮`,bumpe:`≏`,bumpeq:`≏`,cacute:`ć`,cap:`∩`,capand:`⩄`,capbrcup:`⩉`,capcap:`⩋`,capcup:`⩇`,capdot:`⩀`,caps:`∩︀`,caret:`⁁`,caron:`ˇ`,ccaps:`⩍`,ccaron:`č`,ccedil:`ç`,ccirc:`ĉ`,ccups:`⩌`,ccupssm:`⩐`,cdot:`ċ`,cedil:`¸`,cemptyv:`⦲`,cent:`¢`,centerdot:`·`,cfr:`𝔠`,chcy:`ч`,check:`✓`,checkmark:`✓`,chi:`χ`,cir:`○`,cirE:`⧃`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledR:`®`,circledS:`Ⓢ`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,cire:`≗`,cirfnint:`⨐`,cirmid:`⫯`,cirscir:`⧂`,clubs:`♣`,clubsuit:`♣`,colon:`:`,colone:`≔`,coloneq:`≔`,comma:`,`,commat:`@`,comp:`∁`,compfn:`∘`,complement:`∁`,complexes:`ℂ`,cong:`≅`,congdot:`⩭`,conint:`∮`,copf:`𝕔`,coprod:`∐`,copy:`©`,copysr:`℗`,crarr:`↵`,cross:`✗`,cscr:`𝒸`,csub:`⫏`,csube:`⫑`,csup:`⫐`,csupe:`⫒`,ctdot:`⋯`,cudarrl:`⤸`,cudarrr:`⤵`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cularrp:`⤽`,cup:`∪`,cupbrcap:`⩈`,cupcap:`⩆`,cupcup:`⩊`,cupdot:`⊍`,cupor:`⩅`,cups:`∪︀`,curarr:`↷`,curarrm:`⤼`,curlyeqprec:`⋞`,curlyeqsucc:`⋟`,curlyvee:`⋎`,curlywedge:`⋏`,curren:`¤`,curvearrowleft:`↶`,curvearrowright:`↷`,cuvee:`⋎`,cuwed:`⋏`,cwconint:`∲`,cwint:`∱`,cylcty:`⌭`,dArr:`⇓`,dHar:`⥥`,dagger:`†`,daleth:`ℸ`,darr:`↓`,dash:`‐`,dashv:`⊣`,dbkarow:`⤏`,dblac:`˝`,dcaron:`ď`,dcy:`д`,dd:`ⅆ`,ddagger:`‡`,ddarr:`⇊`,ddotseq:`⩷`,deg:`°`,delta:`δ`,demptyv:`⦱`,dfisht:`⥿`,dfr:`𝔡`,dharl:`⇃`,dharr:`⇂`,diam:`⋄`,diamond:`⋄`,diamondsuit:`♦`,diams:`♦`,die:`¨`,digamma:`ϝ`,disin:`⋲`,div:`÷`,divide:`÷`,divideontimes:`⋇`,divonx:`⋇`,djcy:`ђ`,dlcorn:`⌞`,dlcrop:`⌍`,dollar:`$`,dopf:`𝕕`,dot:`˙`,doteq:`≐`,doteqdot:`≑`,dotminus:`∸`,dotplus:`∔`,dotsquare:`⊡`,doublebarwedge:`⌆`,downarrow:`↓`,downdownarrows:`⇊`,downharpoonleft:`⇃`,downharpoonright:`⇂`,drbkarow:`⤐`,drcorn:`⌟`,drcrop:`⌌`,dscr:`𝒹`,dscy:`ѕ`,dsol:`⧶`,dstrok:`đ`,dtdot:`⋱`,dtri:`▿`,dtrif:`▾`,duarr:`⇵`,duhar:`⥯`,dwangle:`⦦`,dzcy:`џ`,dzigrarr:`⟿`,eDDot:`⩷`,eDot:`≑`,eacute:`é`,easter:`⩮`,ecaron:`ě`,ecir:`≖`,ecirc:`ê`,ecolon:`≕`,ecy:`э`,edot:`ė`,ee:`ⅇ`,efDot:`≒`,efr:`𝔢`,eg:`⪚`,egrave:`è`,egs:`⪖`,egsdot:`⪘`,el:`⪙`,elinters:`⏧`,ell:`ℓ`,els:`⪕`,elsdot:`⪗`,emacr:`ē`,empty:`∅`,emptyset:`∅`,emptyv:`∅`,emsp13:` `,emsp14:` `,emsp:` `,eng:`ŋ`,ensp:` `,eogon:`ę`,eopf:`𝕖`,epar:`⋕`,eparsl:`⧣`,eplus:`⩱`,epsi:`ε`,epsilon:`ε`,epsiv:`ϵ`,eqcirc:`≖`,eqcolon:`≕`,eqsim:`≂`,eqslantgtr:`⪖`,eqslantless:`⪕`,equals:`=`,equest:`≟`,equiv:`≡`,equivDD:`⩸`,eqvparsl:`⧥`,erDot:`≓`,erarr:`⥱`,escr:`ℯ`,esdot:`≐`,esim:`≂`,eta:`η`,eth:`ð`,euml:`ë`,euro:`€`,excl:`!`,exist:`∃`,expectation:`ℰ`,exponentiale:`ⅇ`,fallingdotseq:`≒`,fcy:`ф`,female:`♀`,ffilig:`ffi`,fflig:`ff`,ffllig:`ffl`,ffr:`𝔣`,filig:`fi`,fjlig:`fj`,flat:`♭`,fllig:`fl`,fltns:`▱`,fnof:`ƒ`,fopf:`𝕗`,forall:`∀`,fork:`⋔`,forkv:`⫙`,fpartint:`⨍`,frac12:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`,frown:`⌢`,fscr:`𝒻`,gE:`≧`,gEl:`⪌`,gacute:`ǵ`,gamma:`γ`,gammad:`ϝ`,gap:`⪆`,gbreve:`ğ`,gcirc:`ĝ`,gcy:`г`,gdot:`ġ`,ge:`≥`,gel:`⋛`,geq:`≥`,geqq:`≧`,geqslant:`⩾`,ges:`⩾`,gescc:`⪩`,gesdot:`⪀`,gesdoto:`⪂`,gesdotol:`⪄`,gesl:`⋛︀`,gesles:`⪔`,gfr:`𝔤`,gg:`≫`,ggg:`⋙`,gimel:`ℷ`,gjcy:`ѓ`,gl:`≷`,glE:`⪒`,gla:`⪥`,glj:`⪤`,gnE:`≩`,gnap:`⪊`,gnapprox:`⪊`,gne:`⪈`,gneq:`⪈`,gneqq:`≩`,gnsim:`⋧`,gopf:`𝕘`,grave:"`",gscr:`ℊ`,gsim:`≳`,gsime:`⪎`,gsiml:`⪐`,gt:`>`,gtcc:`⪧`,gtcir:`⩺`,gtdot:`⋗`,gtlPar:`⦕`,gtquest:`⩼`,gtrapprox:`⪆`,gtrarr:`⥸`,gtrdot:`⋗`,gtreqless:`⋛`,gtreqqless:`⪌`,gtrless:`≷`,gtrsim:`≳`,gvertneqq:`≩︀`,gvnE:`≩︀`,hArr:`⇔`,hairsp:` `,half:`½`,hamilt:`ℋ`,hardcy:`ъ`,harr:`↔`,harrcir:`⥈`,harrw:`↭`,hbar:`ℏ`,hcirc:`ĥ`,hearts:`♥`,heartsuit:`♥`,hellip:`…`,hercon:`⊹`,hfr:`𝔥`,hksearow:`⤥`,hkswarow:`⤦`,hoarr:`⇿`,homtht:`∻`,hookleftarrow:`↩`,hookrightarrow:`↪`,hopf:`𝕙`,horbar:`―`,hscr:`𝒽`,hslash:`ℏ`,hstrok:`ħ`,hybull:`⁃`,hyphen:`‐`,iacute:`í`,ic:`⁣`,icirc:`î`,icy:`и`,iecy:`е`,iexcl:`¡`,iff:`⇔`,ifr:`𝔦`,igrave:`ì`,ii:`ⅈ`,iiiint:`⨌`,iiint:`∭`,iinfin:`⧜`,iiota:`℩`,ijlig:`ij`,imacr:`ī`,image:`ℑ`,imagline:`ℐ`,imagpart:`ℑ`,imath:`ı`,imof:`⊷`,imped:`Ƶ`,in:`∈`,incare:`℅`,infin:`∞`,infintie:`⧝`,inodot:`ı`,int:`∫`,intcal:`⊺`,integers:`ℤ`,intercal:`⊺`,intlarhk:`⨗`,intprod:`⨼`,iocy:`ё`,iogon:`į`,iopf:`𝕚`,iota:`ι`,iprod:`⨼`,iquest:`¿`,iscr:`𝒾`,isin:`∈`,isinE:`⋹`,isindot:`⋵`,isins:`⋴`,isinsv:`⋳`,isinv:`∈`,it:`⁢`,itilde:`ĩ`,iukcy:`і`,iuml:`ï`,jcirc:`ĵ`,jcy:`й`,jfr:`𝔧`,jmath:`ȷ`,jopf:`𝕛`,jscr:`𝒿`,jsercy:`ј`,jukcy:`є`,kappa:`κ`,kappav:`ϰ`,kcedil:`ķ`,kcy:`к`,kfr:`𝔨`,kgreen:`ĸ`,khcy:`х`,kjcy:`ќ`,kopf:`𝕜`,kscr:`𝓀`,lAarr:`⇚`,lArr:`⇐`,lAtail:`⤛`,lBarr:`⤎`,lE:`≦`,lEg:`⪋`,lHar:`⥢`,lacute:`ĺ`,laemptyv:`⦴`,lagran:`ℒ`,lambda:`λ`,lang:`⟨`,langd:`⦑`,langle:`⟨`,lap:`⪅`,laquo:`«`,larr:`←`,larrb:`⇤`,larrbfs:`⤟`,larrfs:`⤝`,larrhk:`↩`,larrlp:`↫`,larrpl:`⤹`,larrsim:`⥳`,larrtl:`↢`,lat:`⪫`,latail:`⤙`,late:`⪭`,lates:`⪭︀`,lbarr:`⤌`,lbbrk:`❲`,lbrace:`{`,lbrack:`[`,lbrke:`⦋`,lbrksld:`⦏`,lbrkslu:`⦍`,lcaron:`ľ`,lcedil:`ļ`,lceil:`⌈`,lcub:`{`,lcy:`л`,ldca:`⤶`,ldquo:`“`,ldquor:`„`,ldrdhar:`⥧`,ldrushar:`⥋`,ldsh:`↲`,le:`≤`,leftarrow:`←`,leftarrowtail:`↢`,leftharpoondown:`↽`,leftharpoonup:`↼`,leftleftarrows:`⇇`,leftrightarrow:`↔`,leftrightarrows:`⇆`,leftrightharpoons:`⇋`,leftrightsquigarrow:`↭`,leftthreetimes:`⋋`,leg:`⋚`,leq:`≤`,leqq:`≦`,leqslant:`⩽`,les:`⩽`,lescc:`⪨`,lesdot:`⩿`,lesdoto:`⪁`,lesdotor:`⪃`,lesg:`⋚︀`,lesges:`⪓`,lessapprox:`⪅`,lessdot:`⋖`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,lessgtr:`≶`,lesssim:`≲`,lfisht:`⥼`,lfloor:`⌊`,lfr:`𝔩`,lg:`≶`,lgE:`⪑`,lhard:`↽`,lharu:`↼`,lharul:`⥪`,lhblk:`▄`,ljcy:`љ`,ll:`≪`,llarr:`⇇`,llcorner:`⌞`,llhard:`⥫`,lltri:`◺`,lmidot:`ŀ`,lmoust:`⎰`,lmoustache:`⎰`,lnE:`≨`,lnap:`⪉`,lnapprox:`⪉`,lne:`⪇`,lneq:`⪇`,lneqq:`≨`,lnsim:`⋦`,loang:`⟬`,loarr:`⇽`,lobrk:`⟦`,longleftarrow:`⟵`,longleftrightarrow:`⟷`,longmapsto:`⟼`,longrightarrow:`⟶`,looparrowleft:`↫`,looparrowright:`↬`,lopar:`⦅`,lopf:`𝕝`,loplus:`⨭`,lotimes:`⨴`,lowast:`∗`,lowbar:`_`,loz:`◊`,lozenge:`◊`,lozf:`⧫`,lpar:`(`,lparlt:`⦓`,lrarr:`⇆`,lrcorner:`⌟`,lrhar:`⇋`,lrhard:`⥭`,lrm:`‎`,lrtri:`⊿`,lsaquo:`‹`,lscr:`𝓁`,lsh:`↰`,lsim:`≲`,lsime:`⪍`,lsimg:`⪏`,lsqb:`[`,lsquo:`‘`,lsquor:`‚`,lstrok:`ł`,lt:`<`,ltcc:`⪦`,ltcir:`⩹`,ltdot:`⋖`,lthree:`⋋`,ltimes:`⋉`,ltlarr:`⥶`,ltquest:`⩻`,ltrPar:`⦖`,ltri:`◃`,ltrie:`⊴`,ltrif:`◂`,lurdshar:`⥊`,luruhar:`⥦`,lvertneqq:`≨︀`,lvnE:`≨︀`,mDDot:`∺`,macr:`¯`,male:`♂`,malt:`✠`,maltese:`✠`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,mapstoleft:`↤`,mapstoup:`↥`,marker:`▮`,mcomma:`⨩`,mcy:`м`,mdash:`—`,measuredangle:`∡`,mfr:`𝔪`,mho:`℧`,micro:`µ`,mid:`∣`,midast:`*`,midcir:`⫰`,middot:`·`,minus:`−`,minusb:`⊟`,minusd:`∸`,minusdu:`⨪`,mlcp:`⫛`,mldr:`…`,mnplus:`∓`,models:`⊧`,mopf:`𝕞`,mp:`∓`,mscr:`𝓂`,mstpos:`∾`,mu:`μ`,multimap:`⊸`,mumap:`⊸`,nGg:`⋙̸`,nGt:`≫⃒`,nGtv:`≫̸`,nLeftarrow:`⇍`,nLeftrightarrow:`⇎`,nLl:`⋘̸`,nLt:`≪⃒`,nLtv:`≪̸`,nRightarrow:`⇏`,nVDash:`⊯`,nVdash:`⊮`,nabla:`∇`,nacute:`ń`,nang:`∠⃒`,nap:`≉`,napE:`⩰̸`,napid:`≋̸`,napos:`ʼn`,napprox:`≉`,natur:`♮`,natural:`♮`,naturals:`ℕ`,nbsp:`\xA0`,nbump:`≎̸`,nbumpe:`≏̸`,ncap:`⩃`,ncaron:`ň`,ncedil:`ņ`,ncong:`≇`,ncongdot:`⩭̸`,ncup:`⩂`,ncy:`н`,ndash:`–`,ne:`≠`,neArr:`⇗`,nearhk:`⤤`,nearr:`↗`,nearrow:`↗`,nedot:`≐̸`,nequiv:`≢`,nesear:`⤨`,nesim:`≂̸`,nexist:`∄`,nexists:`∄`,nfr:`𝔫`,ngE:`≧̸`,nge:`≱`,ngeq:`≱`,ngeqq:`≧̸`,ngeqslant:`⩾̸`,nges:`⩾̸`,ngsim:`≵`,ngt:`≯`,ngtr:`≯`,nhArr:`⇎`,nharr:`↮`,nhpar:`⫲`,ni:`∋`,nis:`⋼`,nisd:`⋺`,niv:`∋`,njcy:`њ`,nlArr:`⇍`,nlE:`≦̸`,nlarr:`↚`,nldr:`‥`,nle:`≰`,nleftarrow:`↚`,nleftrightarrow:`↮`,nleq:`≰`,nleqq:`≦̸`,nleqslant:`⩽̸`,nles:`⩽̸`,nless:`≮`,nlsim:`≴`,nlt:`≮`,nltri:`⋪`,nltrie:`⋬`,nmid:`∤`,nopf:`𝕟`,not:`¬`,notin:`∉`,notinE:`⋹̸`,notindot:`⋵̸`,notinva:`∉`,notinvb:`⋷`,notinvc:`⋶`,notni:`∌`,notniva:`∌`,notnivb:`⋾`,notnivc:`⋽`,npar:`∦`,nparallel:`∦`,nparsl:`⫽⃥`,npart:`∂̸`,npolint:`⨔`,npr:`⊀`,nprcue:`⋠`,npre:`⪯̸`,nprec:`⊀`,npreceq:`⪯̸`,nrArr:`⇏`,nrarr:`↛`,nrarrc:`⤳̸`,nrarrw:`↝̸`,nrightarrow:`↛`,nrtri:`⋫`,nrtrie:`⋭`,nsc:`⊁`,nsccue:`⋡`,nsce:`⪰̸`,nscr:`𝓃`,nshortmid:`∤`,nshortparallel:`∦`,nsim:`≁`,nsime:`≄`,nsimeq:`≄`,nsmid:`∤`,nspar:`∦`,nsqsube:`⋢`,nsqsupe:`⋣`,nsub:`⊄`,nsubE:`⫅̸`,nsube:`⊈`,nsubset:`⊂⃒`,nsubseteq:`⊈`,nsubseteqq:`⫅̸`,nsucc:`⊁`,nsucceq:`⪰̸`,nsup:`⊅`,nsupE:`⫆̸`,nsupe:`⊉`,nsupset:`⊃⃒`,nsupseteq:`⊉`,nsupseteqq:`⫆̸`,ntgl:`≹`,ntilde:`ñ`,ntlg:`≸`,ntriangleleft:`⋪`,ntrianglelefteq:`⋬`,ntriangleright:`⋫`,ntrianglerighteq:`⋭`,nu:`ν`,num:`#`,numero:`№`,numsp:` `,nvDash:`⊭`,nvHarr:`⤄`,nvap:`≍⃒`,nvdash:`⊬`,nvge:`≥⃒`,nvgt:`>⃒`,nvinfin:`⧞`,nvlArr:`⤂`,nvle:`≤⃒`,nvlt:`<⃒`,nvltrie:`⊴⃒`,nvrArr:`⤃`,nvrtrie:`⊵⃒`,nvsim:`∼⃒`,nwArr:`⇖`,nwarhk:`⤣`,nwarr:`↖`,nwarrow:`↖`,nwnear:`⤧`,oS:`Ⓢ`,oacute:`ó`,oast:`⊛`,ocir:`⊚`,ocirc:`ô`,ocy:`о`,odash:`⊝`,odblac:`ő`,odiv:`⨸`,odot:`⊙`,odsold:`⦼`,oelig:`œ`,ofcir:`⦿`,ofr:`𝔬`,ogon:`˛`,ograve:`ò`,ogt:`⧁`,ohbar:`⦵`,ohm:`Ω`,oint:`∮`,olarr:`↺`,olcir:`⦾`,olcross:`⦻`,oline:`‾`,olt:`⧀`,omacr:`ō`,omega:`ω`,omicron:`ο`,omid:`⦶`,ominus:`⊖`,oopf:`𝕠`,opar:`⦷`,operp:`⦹`,oplus:`⊕`,or:`∨`,orarr:`↻`,ord:`⩝`,order:`ℴ`,orderof:`ℴ`,ordf:`ª`,ordm:`º`,origof:`⊶`,oror:`⩖`,orslope:`⩗`,orv:`⩛`,oscr:`ℴ`,oslash:`ø`,osol:`⊘`,otilde:`õ`,otimes:`⊗`,otimesas:`⨶`,ouml:`ö`,ovbar:`⌽`,par:`∥`,para:`¶`,parallel:`∥`,parsim:`⫳`,parsl:`⫽`,part:`∂`,pcy:`п`,percnt:`%`,period:`.`,permil:`‰`,perp:`⊥`,pertenk:`‱`,pfr:`𝔭`,phi:`φ`,phiv:`ϕ`,phmmat:`ℳ`,phone:`☎`,pi:`π`,pitchfork:`⋔`,piv:`ϖ`,planck:`ℏ`,planckh:`ℎ`,plankv:`ℏ`,plus:`+`,plusacir:`⨣`,plusb:`⊞`,pluscir:`⨢`,plusdo:`∔`,plusdu:`⨥`,pluse:`⩲`,plusmn:`±`,plussim:`⨦`,plustwo:`⨧`,pm:`±`,pointint:`⨕`,popf:`𝕡`,pound:`£`,pr:`≺`,prE:`⪳`,prap:`⪷`,prcue:`≼`,pre:`⪯`,prec:`≺`,precapprox:`⪷`,preccurlyeq:`≼`,preceq:`⪯`,precnapprox:`⪹`,precneqq:`⪵`,precnsim:`⋨`,precsim:`≾`,prime:`′`,primes:`ℙ`,prnE:`⪵`,prnap:`⪹`,prnsim:`⋨`,prod:`∏`,profalar:`⌮`,profline:`⌒`,profsurf:`⌓`,prop:`∝`,propto:`∝`,prsim:`≾`,prurel:`⊰`,pscr:`𝓅`,psi:`ψ`,puncsp:` `,qfr:`𝔮`,qint:`⨌`,qopf:`𝕢`,qprime:`⁗`,qscr:`𝓆`,quaternions:`ℍ`,quatint:`⨖`,quest:`?`,questeq:`≟`,quot:`"`,rAarr:`⇛`,rArr:`⇒`,rAtail:`⤜`,rBarr:`⤏`,rHar:`⥤`,race:`∽̱`,racute:`ŕ`,radic:`√`,raemptyv:`⦳`,rang:`⟩`,rangd:`⦒`,range:`⦥`,rangle:`⟩`,raquo:`»`,rarr:`→`,rarrap:`⥵`,rarrb:`⇥`,rarrbfs:`⤠`,rarrc:`⤳`,rarrfs:`⤞`,rarrhk:`↪`,rarrlp:`↬`,rarrpl:`⥅`,rarrsim:`⥴`,rarrtl:`↣`,rarrw:`↝`,ratail:`⤚`,ratio:`∶`,rationals:`ℚ`,rbarr:`⤍`,rbbrk:`❳`,rbrace:`}`,rbrack:`]`,rbrke:`⦌`,rbrksld:`⦎`,rbrkslu:`⦐`,rcaron:`ř`,rcedil:`ŗ`,rceil:`⌉`,rcub:`}`,rcy:`р`,rdca:`⤷`,rdldhar:`⥩`,rdquo:`”`,rdquor:`”`,rdsh:`↳`,real:`ℜ`,realine:`ℛ`,realpart:`ℜ`,reals:`ℝ`,rect:`▭`,reg:`®`,rfisht:`⥽`,rfloor:`⌋`,rfr:`𝔯`,rhard:`⇁`,rharu:`⇀`,rharul:`⥬`,rho:`ρ`,rhov:`ϱ`,rightarrow:`→`,rightarrowtail:`↣`,rightharpoondown:`⇁`,rightharpoonup:`⇀`,rightleftarrows:`⇄`,rightleftharpoons:`⇌`,rightrightarrows:`⇉`,rightsquigarrow:`↝`,rightthreetimes:`⋌`,ring:`˚`,risingdotseq:`≓`,rlarr:`⇄`,rlhar:`⇌`,rlm:`‏`,rmoust:`⎱`,rmoustache:`⎱`,rnmid:`⫮`,roang:`⟭`,roarr:`⇾`,robrk:`⟧`,ropar:`⦆`,ropf:`𝕣`,roplus:`⨮`,rotimes:`⨵`,rpar:`)`,rpargt:`⦔`,rppolint:`⨒`,rrarr:`⇉`,rsaquo:`›`,rscr:`𝓇`,rsh:`↱`,rsqb:`]`,rsquo:`’`,rsquor:`’`,rthree:`⋌`,rtimes:`⋊`,rtri:`▹`,rtrie:`⊵`,rtrif:`▸`,rtriltri:`⧎`,ruluhar:`⥨`,rx:`℞`,sacute:`ś`,sbquo:`‚`,sc:`≻`,scE:`⪴`,scap:`⪸`,scaron:`š`,sccue:`≽`,sce:`⪰`,scedil:`ş`,scirc:`ŝ`,scnE:`⪶`,scnap:`⪺`,scnsim:`⋩`,scpolint:`⨓`,scsim:`≿`,scy:`с`,sdot:`⋅`,sdotb:`⊡`,sdote:`⩦`,seArr:`⇘`,searhk:`⤥`,searr:`↘`,searrow:`↘`,sect:`§`,semi:`;`,seswar:`⤩`,setminus:`∖`,setmn:`∖`,sext:`✶`,sfr:`𝔰`,sfrown:`⌢`,sharp:`♯`,shchcy:`щ`,shcy:`ш`,shortmid:`∣`,shortparallel:`∥`,shy:`­`,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,sim:`∼`,simdot:`⩪`,sime:`≃`,simeq:`≃`,simg:`⪞`,simgE:`⪠`,siml:`⪝`,simlE:`⪟`,simne:`≆`,simplus:`⨤`,simrarr:`⥲`,slarr:`←`,smallsetminus:`∖`,smashp:`⨳`,smeparsl:`⧤`,smid:`∣`,smile:`⌣`,smt:`⪪`,smte:`⪬`,smtes:`⪬︀`,softcy:`ь`,sol:`/`,solb:`⧄`,solbar:`⌿`,sopf:`𝕤`,spades:`♠`,spadesuit:`♠`,spar:`∥`,sqcap:`⊓`,sqcaps:`⊓︀`,sqcup:`⊔`,sqcups:`⊔︀`,sqsub:`⊏`,sqsube:`⊑`,sqsubset:`⊏`,sqsubseteq:`⊑`,sqsup:`⊐`,sqsupe:`⊒`,sqsupset:`⊐`,sqsupseteq:`⊒`,squ:`□`,square:`□`,squarf:`▪`,squf:`▪`,srarr:`→`,sscr:`𝓈`,ssetmn:`∖`,ssmile:`⌣`,sstarf:`⋆`,star:`☆`,starf:`★`,straightepsilon:`ϵ`,straightphi:`ϕ`,strns:`¯`,sub:`⊂`,subE:`⫅`,subdot:`⪽`,sube:`⊆`,subedot:`⫃`,submult:`⫁`,subnE:`⫋`,subne:`⊊`,subplus:`⪿`,subrarr:`⥹`,subset:`⊂`,subseteq:`⊆`,subseteqq:`⫅`,subsetneq:`⊊`,subsetneqq:`⫋`,subsim:`⫇`,subsub:`⫕`,subsup:`⫓`,succ:`≻`,succapprox:`⪸`,succcurlyeq:`≽`,succeq:`⪰`,succnapprox:`⪺`,succneqq:`⪶`,succnsim:`⋩`,succsim:`≿`,sum:`∑`,sung:`♪`,sup1:`¹`,sup2:`²`,sup3:`³`,sup:`⊃`,supE:`⫆`,supdot:`⪾`,supdsub:`⫘`,supe:`⊇`,supedot:`⫄`,suphsol:`⟉`,suphsub:`⫗`,suplarr:`⥻`,supmult:`⫂`,supnE:`⫌`,supne:`⊋`,supplus:`⫀`,supset:`⊃`,supseteq:`⊇`,supseteqq:`⫆`,supsetneq:`⊋`,supsetneqq:`⫌`,supsim:`⫈`,supsub:`⫔`,supsup:`⫖`,swArr:`⇙`,swarhk:`⤦`,swarr:`↙`,swarrow:`↙`,swnwar:`⤪`,szlig:`ß`,target:`⌖`,tau:`τ`,tbrk:`⎴`,tcaron:`ť`,tcedil:`ţ`,tcy:`т`,tdot:`⃛`,telrec:`⌕`,tfr:`𝔱`,there4:`∴`,therefore:`∴`,theta:`θ`,thetasym:`ϑ`,thetav:`ϑ`,thickapprox:`≈`,thicksim:`∼`,thinsp:` `,thkap:`≈`,thksim:`∼`,thorn:`þ`,tilde:`˜`,times:`×`,timesb:`⊠`,timesbar:`⨱`,timesd:`⨰`,tint:`∭`,toea:`⤨`,top:`⊤`,topbot:`⌶`,topcir:`⫱`,topf:`𝕥`,topfork:`⫚`,tosa:`⤩`,tprime:`‴`,trade:`™`,triangle:`▵`,triangledown:`▿`,triangleleft:`◃`,trianglelefteq:`⊴`,triangleq:`≜`,triangleright:`▹`,trianglerighteq:`⊵`,tridot:`◬`,trie:`≜`,triminus:`⨺`,triplus:`⨹`,trisb:`⧍`,tritime:`⨻`,trpezium:`⏢`,tscr:`𝓉`,tscy:`ц`,tshcy:`ћ`,tstrok:`ŧ`,twixt:`≬`,twoheadleftarrow:`↞`,twoheadrightarrow:`↠`,uArr:`⇑`,uHar:`⥣`,uacute:`ú`,uarr:`↑`,ubrcy:`ў`,ubreve:`ŭ`,ucirc:`û`,ucy:`у`,udarr:`⇅`,udblac:`ű`,udhar:`⥮`,ufisht:`⥾`,ufr:`𝔲`,ugrave:`ù`,uharl:`↿`,uharr:`↾`,uhblk:`▀`,ulcorn:`⌜`,ulcorner:`⌜`,ulcrop:`⌏`,ultri:`◸`,umacr:`ū`,uml:`¨`,uogon:`ų`,uopf:`𝕦`,uparrow:`↑`,updownarrow:`↕`,upharpoonleft:`↿`,upharpoonright:`↾`,uplus:`⊎`,upsi:`υ`,upsih:`ϒ`,upsilon:`υ`,upuparrows:`⇈`,urcorn:`⌝`,urcorner:`⌝`,urcrop:`⌎`,uring:`ů`,urtri:`◹`,uscr:`𝓊`,utdot:`⋰`,utilde:`ũ`,utri:`▵`,utrif:`▴`,uuarr:`⇈`,uuml:`ü`,uwangle:`⦧`,vArr:`⇕`,vBar:`⫨`,vBarv:`⫩`,vDash:`⊨`,vangrt:`⦜`,varepsilon:`ϵ`,varkappa:`ϰ`,varnothing:`∅`,varphi:`ϕ`,varpi:`ϖ`,varpropto:`∝`,varr:`↕`,varrho:`ϱ`,varsigma:`ς`,varsubsetneq:`⊊︀`,varsubsetneqq:`⫋︀`,varsupsetneq:`⊋︀`,varsupsetneqq:`⫌︀`,vartheta:`ϑ`,vartriangleleft:`⊲`,vartriangleright:`⊳`,vcy:`в`,vdash:`⊢`,vee:`∨`,veebar:`⊻`,veeeq:`≚`,vellip:`⋮`,verbar:`|`,vert:`|`,vfr:`𝔳`,vltri:`⊲`,vnsub:`⊂⃒`,vnsup:`⊃⃒`,vopf:`𝕧`,vprop:`∝`,vrtri:`⊳`,vscr:`𝓋`,vsubnE:`⫋︀`,vsubne:`⊊︀`,vsupnE:`⫌︀`,vsupne:`⊋︀`,vzigzag:`⦚`,wcirc:`ŵ`,wedbar:`⩟`,wedge:`∧`,wedgeq:`≙`,weierp:`℘`,wfr:`𝔴`,wopf:`𝕨`,wp:`℘`,wr:`≀`,wreath:`≀`,wscr:`𝓌`,xcap:`⋂`,xcirc:`◯`,xcup:`⋃`,xdtri:`▽`,xfr:`𝔵`,xhArr:`⟺`,xharr:`⟷`,xi:`ξ`,xlArr:`⟸`,xlarr:`⟵`,xmap:`⟼`,xnis:`⋻`,xodot:`⨀`,xopf:`𝕩`,xoplus:`⨁`,xotime:`⨂`,xrArr:`⟹`,xrarr:`⟶`,xscr:`𝓍`,xsqcup:`⨆`,xuplus:`⨄`,xutri:`△`,xvee:`⋁`,xwedge:`⋀`,yacute:`ý`,yacy:`я`,ycirc:`ŷ`,ycy:`ы`,yen:`¥`,yfr:`𝔶`,yicy:`ї`,yopf:`𝕪`,yscr:`𝓎`,yucy:`ю`,yuml:`ÿ`,zacute:`ź`,zcaron:`ž`,zcy:`з`,zdot:`ż`,zeetrf:`ℨ`,zeta:`ζ`,zfr:`𝔷`,zhcy:`ж`,zigrarr:`⇝`,zopf:`𝕫`,zscr:`𝓏`,zwj:`‍`,zwnj:`‌`},$r={}.hasOwnProperty;function ei(e){return $r.call(Qr,e)?Qr[e]:!1}function ti(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function ni(e,t){return e.length>0?(ti(e,e.length,0,t),e):t}var ri={}.hasOwnProperty;function ii(e){let t={},n=-1;for(;++n<e.length;)ai(t,e[n]);return t}function ai(e,t){let n;for(n in t){let r=(ri.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){ri.call(r,a)||(r[a]=[]);let e=i[a];oi(r[a],Array.isArray(e)?e:e?[e]:[])}}}function oi(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);ti(e,0,0,r)}function si(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function ci(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var li=yi(/[A-Za-z]/),ui=yi(/[\dA-Za-z]/),di=yi(/[#-'*+\--9=?A-Z^-~]/);function fi(e){return e!==null&&(e<32||e===127)}var pi=yi(/\d/),mi=yi(/[\dA-Fa-f]/),hi=yi(/[!-/:-@[-`{-~]/);function V(e){return e!==null&&e<-2}function gi(e){return e!==null&&(e<0||e===32)}function H(e){return e===-2||e===-1||e===32}var _i=yi(/\p{P}|\p{S}/u),vi=yi(/\s/);function yi(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function bi(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return H(r)?(e.enter(n),s(r)):t(r)}function s(r){return H(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function xi(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&H(t)?(e.enter(r),c(t)):l(t)}function c(t){return H(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var Si={tokenize:Ci};function Ci(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),bi(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return V(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var wi=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){Ti(this,e,t,n,!1)}addBefore(e,t,n){Ti(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Ti(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var Ei={tokenize:Oi},Di={tokenize:ki};function Oi(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new wi;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Di,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Di,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return V(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new wi;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ki(e,t,n){return bi(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Ai(e){if(e===null||gi(e)||vi(e))return 1;if(_i(e))return 2}function ji(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Mi={name:`attention`,resolveAll:Ni,tokenize:Pi};function Ni(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};Fi(o,-a),Fi(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=ni(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=ni(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=ni(r,ji(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=ni(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=ni(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),ti(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Pi(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ai(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Ai(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Fi(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Ii={name:`autolink`,tokenize:Li};function Li(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return li(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||ui(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||ui(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||fi(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):di(t)?(e.consume(t),l):n(t)}function u(e){return ui(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||ui(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Ri={partial:!0,tokenize:zi};function zi(e,t,n){return r;function r(t){return H(t)?bi(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||V(e)?t(e):n(e)}}var Bi={continuation:{tokenize:Hi},exit:Ui,name:`blockQuote`,tokenize:Vi};function Vi(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return H(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Hi(e,t,n){let r=this;return i;function i(t){return H(t)?bi(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Bi,t,n)(r)}}function Ui(e){e.exit(`blockQuote`)}var Wi={name:`characterEscape`,tokenize:Gi};function Gi(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return hi(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Ki={name:`characterReference`,tokenize:qi};function qi(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=ui,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=mi,u):(e.enter(`characterReferenceValue`),a=7,o=pi,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===ui&&!ei(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Ji={partial:!0,tokenize:Yi};function Yi(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Xi={concrete:!0,name:`codeFenced`,tokenize:Zi};function Zi(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),H(t)?bi(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||V(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Ji,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||V(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):H(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),bi(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||V(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||V(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&H(t)?bi(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||V(t)?e.check(Ji,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||V(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),H(t)?bi(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),H(t)?bi(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||V(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var Qi={name:`codeIndented`,tokenize:ea},$i={partial:!0,tokenize:ta};function ea(e,t,n){return r;function r(t){return e.enter(`codeIndented`),xi(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):V(t)?e.attempt($i,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||V(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function ta(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):V(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):xi(e,t,a,`linePrefix`,4,4)(o)}function a(e){return V(e)?i(e):n(e)}}var na={name:`codeText`,previous:ia,resolve:ra,tokenize:aa};function ra(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ia(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function aa(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):V(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||V(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var oa=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&sa(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),sa(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),sa(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);sa(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);sa(this.left,t.reverse())}}}};function sa(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function ca(e){let t={},n=-1,r,i,a,o,s,c,l,u=new oa(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,la(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return ti(e,0,1/0,u.slice(0)),!l}function la(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var ua={resolve:fa,tokenize:pa},da={partial:!0,tokenize:ma};function fa(e){return ca(e),e}function pa(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):V(t)?e.check(da,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function ma(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),bi(e,a,`linePrefix`)}function a(i){if(i===null||V(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function ha(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||fi(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||V(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||gi(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||fi(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function ga(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):V(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||V(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!H(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function _a(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):V(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),bi(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||V(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function va(e,t){let n;return r;function r(i){return V(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):H(i)?bi(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var ya={name:`definition`,tokenize:xa},ba={partial:!0,tokenize:Sa};function xa(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return ga.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=ci(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return gi(t)?va(e,l)(t):l(t)}function l(t){return ha(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(ba,d,d)(t)}function d(t){return H(t)?bi(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||V(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Sa(e,t,n){return r;function r(t){return gi(t)?va(e,i)(t):n(t)}function i(t){return _a(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return H(t)?bi(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||V(e)?t(e):n(e)}}var Ca={name:`hardBreakEscape`,tokenize:wa};function wa(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return V(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Ta={name:`headingAtx`,resolve:Ea,tokenize:Da};function Ea(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};ti(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function Da(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||gi(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||V(n)?(e.exit(`atxHeading`),t(n)):H(n)?bi(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||gi(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Oa=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),ka=[`pre`,`script`,`style`,`textarea`],Aa={concrete:!0,name:`htmlFlow`,resolveTo:Ma,tokenize:Na},ja={partial:!0,tokenize:Pa};function Ma(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Na(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:ee):li(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):li(a)?(e.consume(a),i=4,r.interrupt?t:ee):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ee):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return li(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||gi(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&ka.includes(l)?(i=1,r.interrupt?t(s):O(s)):Oa.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||ui(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return H(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||li(t)?(e.consume(t),b):H(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||ui(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):H(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):H(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||V(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||gi(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||H(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||V(t)?O(t):H(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),I):t===63&&i===3?(e.consume(t),ee):t===93&&i===5?(e.consume(t),F):V(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(ja,te,k)(t)):t===null||V(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Ji,A,te)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||V(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),ee):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return ka.includes(n)?(e.consume(t),I):O(t)}return li(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),ee):O(t)}function ee(t){return t===62?(e.consume(t),I):t===45&&i===2?(e.consume(t),ee):O(t)}function I(t){return t===null||V(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),I)}function te(n){return e.exit(`htmlFlow`),t(n)}}function Pa(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Ri,t,n)}}var Fa={name:`htmlText`,tokenize:Ia};function Ia(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):li(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):li(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):V(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):V(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):V(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):V(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return li(t)?(e.consume(t),S):n(t)}function S(t){return t===45||ui(t)?(e.consume(t),S):C(t)}function C(t){return V(t)?(o=C,N(t)):H(t)?(e.consume(t),C):M(t)}function w(t){return t===45||ui(t)?(e.consume(t),w):t===47||t===62||gi(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||li(t)?(e.consume(t),E):V(t)?(o=T,N(t)):H(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||ui(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):V(t)?(o=D,N(t)):H(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):V(t)?(o=O,N(t)):H(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):V(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||gi(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||gi(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return H(t)?bi(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var La={name:`labelEnd`,resolveAll:Va,resolveTo:Ha,tokenize:Ua},Ra={tokenize:Wa},za={tokenize:Ga},Ba={tokenize:Ka};function Va(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&ti(e,0,e.length,n),e}function Ha(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=ni(o,e.slice(i+1,i+r+3)),o=ni(o,[[`enter`,l,t]]),o=ni(o,ji(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=ni(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=ni(o,e.slice(a+1)),o=ni(o,[[`exit`,s,t]]),ti(e,i,e.length,o),e}function Ua(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(ci(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Ra,u,o?u:d)(t):t===91?e.attempt(za,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Ba,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function Wa(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return gi(t)?va(e,a)(t):a(t)}function a(t){return t===41?u(t):ha(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return gi(t)?va(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?_a(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return gi(t)?va(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Ga(e,t,n){let r=this;return i;function i(t){return ga.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(ci(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Ka(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var qa={name:`labelStartImage`,resolveAll:La.resolveAll,tokenize:Ja};function Ja(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Ya={name:`labelStartLink`,resolveAll:La.resolveAll,tokenize:Xa};function Xa(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Za={name:`lineEnding`,tokenize:Qa};function Qa(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),bi(e,t,`linePrefix`)}}var $a={name:`thematicBreak`,tokenize:eo};function eo(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||V(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),H(t)?bi(e,s,`whitespace`)(t):s(t))}}var to={continuation:{tokenize:ao},exit:so,name:`list`,tokenize:io},no={partial:!0,tokenize:co},ro={partial:!0,tokenize:oo};function io(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:pi(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check($a,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return pi(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Ri,r.interrupt?n:u,e.attempt(no,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return H(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function ao(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Ri,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,bi(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!H(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ro,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,bi(e,e.attempt(to,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function oo(e,t,n){let r=this;return bi(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function so(e){e.exit(this.containerState.type)}function co(e,t,n){let r=this;return bi(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!H(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var lo={name:`setextUnderline`,resolveTo:uo,tokenize:fo};function uo(e,t){let n=new wi,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function fo(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),H(t)?bi(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||V(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var po={tokenize:mo};function mo(e){let t=this,n=e.attempt(Ri,r,e.attempt(this.parser.constructs.flowInitial,i,bi(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ua,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var ho={resolveAll:yo()},go=vo(`string`),_o=vo(`text`);function vo(e){return{resolveAll:yo(e===`text`?bo:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function yo(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function bo(e,t){let n=new wi,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var xo=c({attentionMarkers:()=>ko,contentInitial:()=>Co,disable:()=>Ao,document:()=>So,flow:()=>To,flowInitial:()=>wo,insideSpan:()=>Oo,string:()=>Eo,text:()=>Do}),So={42:to,43:to,45:to,48:to,49:to,50:to,51:to,52:to,53:to,54:to,55:to,56:to,57:to,62:Bi},Co={91:ya},wo={[-2]:Qi,[-1]:Qi,32:Qi},To={35:Ta,42:$a,45:[lo,$a],60:Aa,61:lo,95:$a,96:Xi,126:Xi},Eo={38:Ki,92:Wi},Do={[-5]:Za,[-4]:Za,[-3]:Za,33:qa,38:Ki,42:Mi,60:[Ii,Fa],91:Ya,92:[Ca,Wi],93:La,95:Mi,96:na},Oo={null:[Mi,ho]},ko={null:[42,95]},Ao={null:[]};function jo(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=ni(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=ji(a,l.events,l),l.events):[]}function f(e,t){return No(p(e),t)}function p(e){return Mo(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){V(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&ti(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Mo(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function No(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
15
15
  `;break;case-3:o=`\r
16
- `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function jo(e){let t={constructs:ri([vo,...(e||{}).extensions||[]]),content:n(bi),defined:[],document:n(wi),flow:n(lo),lazy:{},string:n(po),text:n(mo)};return t;function n(e){return n;function n(n){return Oo(t,e,n)}}}function Mo(e){for(;!aa(e););return e}var No=/[\0\t\n\r]/g;function Po(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){No.lastIndex=c;let n=No.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Fo=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Io(e){return e.replace(Fo,Lo)}function Lo(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return oi(n.slice(t?2:1),t?16:10)}return $r(n)||e}var Ro={}.hasOwnProperty;function G(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),zo(n)(Mo(jo(n).document().write(Po()(e,t,!0))))}function zo(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(ve),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(L),blockQuote:o(de),characterEscape:E,characterReference:E,codeFenced:o(fe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(fe,s),codeText:o(pe,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(me),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(I),hardBreakEscape:o(he),hardBreakTrailing:o(he),htmlFlow:o(ge,s),htmlFlowData:E,htmlText:o(ge,s),htmlTextData:E,image:o(_e),label:s,link:o(ve),listItem:o(be),listItemValue:p,listOrdered:o(ye,f),listUnordered:o(ye),paragraph:o(xe),reference:ie,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(L),strong:o(Se),thematicBreak:o(we)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:ue,autolinkProtocol:le,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:se,characterReference:ce,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(M),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(j),htmlTextData:D,image:l(ee),label:te,labelText:P,lineEnding:O,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ae,resourceDestinationString:F,resourceTitleString:ne,resource:re,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};Vo(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),Ro.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||Uo).call(o,void 0,e[0])}for(r.position={start:Bo(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Bo(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Bo(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+lr({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Uo).call(this,e,r[0])),n.position.end=Bo(e.end)}function d(){return qr(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=si(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=Ce(),n.position={start:Bo(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Bo(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Bo(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ee(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Io(t),n.identifier=si(t).toLowerCase()}function te(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function re(){this.data.inReference=void 0}function ie(){this.data.referenceType=`collapsed`}function ae(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=si(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function oe(e){this.data.characterReferenceType=e.type}function se(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=oi(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=$r(t);let i=this.stack[this.stack.length-1];i.value+=r}function ce(e){let t=this.stack.pop();t.position.end=Bo(e.end)}function le(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ue(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function de(){return{type:`blockquote`,children:[],position:void 0}}function fe(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function pe(){return{type:`inlineCode`,value:``,position:void 0}}function me(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function I(){return{type:`emphasis`,children:[],position:void 0}}function L(){return{type:`heading`,depth:0,children:[],position:void 0}}function he(){return{type:`break`,position:void 0}}function ge(){return{type:`html`,value:``,position:void 0}}function _e(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function ve(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function ye(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function be(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function xe(){return{type:`paragraph`,children:[],position:void 0}}function Se(){return{type:`strong`,children:[],position:void 0}}function Ce(){return{type:`text`,value:``,position:void 0}}function we(){return{type:`thematicBreak`,position:void 0}}}function Bo(e){return{line:e.line,column:e.column,offset:e.offset}}function Vo(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Vo(e,r):Ho(e,r)}}function Ho(e,t){let n;for(n in t)if(Ro.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Uo(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+lr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+lr({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+lr({start:t.start,end:t.end})+`) is still open`)}function Wo(e){let t=this;t.parser=n;function n(n){return G(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Go(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Ko(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var qo=(function(e){if(e==null)return Qo;if(typeof e==`function`)return Zo(e);if(typeof e==`object`)return Array.isArray(e)?Jo(e):Yo(e);if(typeof e==`string`)return Xo(e);throw Error(`Expected function, string, or object as test`)});function Jo(e){let t=[],n=-1;for(;++n<e.length;)t[n]=qo(e[n]);return Zo(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Yo(e){let t=e;return Zo(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Xo(e){return Zo(t);function t(t){return t&&t.type===e}}function Zo(e){return t;function t(t,n,r){return!!($o(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Qo(){return!0}function $o(e){return typeof e==`object`&&!!e&&`type`in e}function es(e){return e}var ts=[];function ns(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=qo(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+es(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=ts,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=rs(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function rs(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?ts:[e]}function is(e,t,n){let r=qo((n||{}).ignore||[]),i=as(t),a=-1;for(;++a<i.length;)ns(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1)r.lastIndex=n+1;else{if(s!==n&&f({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a))for(let e of a)f(e);else a&&f(a);s=n+d[0].length,l=!0}if(!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&f({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function as(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([os(e[0]),ss(e[1])])}return t}function os(e){return typeof e==`string`?new RegExp(Ko(e),`g`):e}function ss(e){return typeof e==`function`?e:function(){return e}}var cs=`phrasing`,ls=[`autolink`,`link`,`image`,`label`];function us(){return{transforms:[vs],enter:{literalAutolink:fs,literalAutolinkEmail:ps,literalAutolinkHttp:ps,literalAutolinkWww:ps},exit:{literalAutolink:_s,literalAutolinkEmail:gs,literalAutolinkHttp:ms,literalAutolinkWww:hs}}}function ds(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:cs,notInConstruct:ls},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:cs,notInConstruct:ls},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:cs,notInConstruct:ls}]}}function fs(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function ps(e){this.config.enter.autolinkProtocol.call(this,e)}function ms(e){this.config.exit.autolinkProtocol.call(this,e)}function hs(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function gs(e){this.config.exit.autolinkEmail.call(this,e)}function _s(e){this.exit(e)}function vs(e){is(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ys],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,bs]],{ignore:[`link`,`linkReference`]})}function ys(e,t,n,r,i){let a=``;if(!Cs(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!xs(n)))return!1;let o=Ss(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function bs(e,t,n,r){return!Cs(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function xs(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Ss(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Go(e,`(`),a=Go(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Cs(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||_i(n)||gi(n))&&(!t||n!==47)}Ns.peek=Ms;function ws(){this.buffer()}function Ts(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Es(){this.buffer()}function Ds(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Os(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=si(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ks(e){this.exit(e)}function As(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=si(this.sliceSerialize(e)).toLowerCase(),n.label=t}function js(e){this.exit(e)}function Ms(){return`[`}function Ns(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Ps(){return{enter:{gfmFootnoteCallString:ws,gfmFootnoteCall:Ts,gfmFootnoteDefinitionLabelString:Es,gfmFootnoteDefinition:Ds},exit:{gfmFootnoteCallString:Os,gfmFootnoteCall:ks,gfmFootnoteDefinitionLabelString:As,gfmFootnoteDefinition:js}}}function Fs(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ns},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
17
- `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Ls:Is))),s(),o}}function Is(e,t,n){return t===0?e:Ls(e,t,n)}function Ls(e,t,n){return(n?``:` `)+e}var Rs=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Us.attention=Ws,Us.peek=Gs;function zs(){return{canContainEols:[`delete`],enter:{strikethrough:Vs},exit:{strikethrough:Hs}}}function Bs(){return{handlers:{delete:Us},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Rs}]}}function Vs(e){this.enter({type:`delete`,children:[],position:void 0},e)}function Hs(e){this.exit(e)}function Us(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function Ws(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function Gs(){return`~`}function Ks(e){return e.length}function qs(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Ks,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Js(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=Ys(r[d]);else{let e=Ys(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding===!1||n.alignDelimiters===!1&&i===``||n.delimiterStart===!1&&!d||r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
18
- `)}function Js(e){return e==null?``:String(e)}function Ys(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var Xs=qo([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Zs(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Qs);return i(),o}function Qs(e,t,n){return`>`+(n?``:` `)+e}function $s(e,t){return ec(e,t.inConstruct,!0)&&!ec(e,t.notInConstruct,!1)}function ec(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function tc(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
19
- `&&!e.before&&!e.after&&$s(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
20
- `}function nc(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function rc(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function ic(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function ac(e,t,n,r){let i=ic(n),a=e.value||``;if(rc(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,oc);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(nc(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
16
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Po(e){let t={constructs:ii([xo,...(e||{}).extensions||[]]),content:n(Si),defined:[],document:n(Ei),flow:n(po),lazy:{},string:n(go),text:n(_o)};return t;function n(e){return n;function n(n){return jo(t,e,n)}}}function Fo(e){for(;!ca(e););return e}var Io=/[\0\t\n\r]/g;function Lo(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){Io.lastIndex=c;let n=Io.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Ro=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function zo(e){return e.replace(Ro,Bo)}function Bo(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return si(n.slice(t?2:1),t?16:10)}return ei(n)||e}var U={}.hasOwnProperty;function Vo(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Ho(n)(Fo(Po(n).document().write(Lo()(e,t,!0))))}function Ho(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(_e),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(R),blockQuote:o(ue),characterEscape:E,characterReference:E,codeFenced:o(de),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(de,s),codeText:o(fe,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(pe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(L),hardBreakEscape:o(me),hardBreakTrailing:o(me),htmlFlow:o(he,s),htmlFlowData:E,htmlText:o(he,s),htmlTextData:E,image:o(ge),label:s,link:o(_e),listItem:o(ye),listItemValue:p,listOrdered:o(ve,f),listUnordered:o(ve),paragraph:o(be),reference:re,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(R),strong:o(xe),thematicBreak:o(Ce)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:le,autolinkProtocol:ce,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:oe,characterReference:se,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(M),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(j),htmlTextData:D,image:l(P),label:ee,labelText:F,lineEnding:O,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ie,resourceDestinationString:I,resourceTitleString:te,resource:ne,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};Wo(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),U.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||Ko).call(o,void 0,e[0])}for(r.position={start:Uo(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Uo(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Uo(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+ur({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Ko).call(this,e,r[0])),n.position.end=Uo(e.end)}function d(){return Jr(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ci(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=Se(),n.position={start:Uo(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Uo(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Uo(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function F(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=zo(t),n.identifier=ci(t).toLowerCase()}function ee(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ne(){this.data.inReference=void 0}function re(){this.data.referenceType=`collapsed`}function ie(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ci(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ae(e){this.data.characterReferenceType=e.type}function oe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=si(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=ei(t);let i=this.stack[this.stack.length-1];i.value+=r}function se(e){let t=this.stack.pop();t.position.end=Uo(e.end)}function ce(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function le(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ue(){return{type:`blockquote`,children:[],position:void 0}}function de(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function fe(){return{type:`inlineCode`,value:``,position:void 0}}function pe(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function L(){return{type:`emphasis`,children:[],position:void 0}}function R(){return{type:`heading`,depth:0,children:[],position:void 0}}function me(){return{type:`break`,position:void 0}}function he(){return{type:`html`,value:``,position:void 0}}function ge(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function _e(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function ve(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function ye(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function be(){return{type:`paragraph`,children:[],position:void 0}}function xe(){return{type:`strong`,children:[],position:void 0}}function Se(){return{type:`text`,value:``,position:void 0}}function Ce(){return{type:`thematicBreak`,position:void 0}}}function Uo(e){return{line:e.line,column:e.column,offset:e.offset}}function Wo(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Wo(e,r):Go(e,r)}}function Go(e,t){let n;for(n in t)if(U.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Ko(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+ur({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ur({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+ur({start:t.start,end:t.end})+`) is still open`)}function qo(e){let t=this;t.parser=n;function n(n){return Vo(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Jo(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Yo(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var Xo=(function(e){if(e==null)return ts;if(typeof e==`function`)return es(e);if(typeof e==`object`)return Array.isArray(e)?Zo(e):Qo(e);if(typeof e==`string`)return $o(e);throw Error(`Expected function, string, or object as test`)});function Zo(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Xo(e[n]);return es(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Qo(e){let t=e;return es(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function $o(e){return es(t);function t(t){return t&&t.type===e}}function es(e){return t;function t(t,n,r){return!!(ns(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function ts(){return!0}function ns(e){return typeof e==`object`&&!!e&&`type`in e}function rs(e){return e}var is=[];function as(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Xo(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+rs(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=is,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=os(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function os(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?is:[e]}function ss(e,t,n){let r=Xo((n||{}).ignore||[]),i=cs(t),a=-1;for(;++a<i.length;)as(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1)r.lastIndex=n+1;else{if(s!==n&&f({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a))for(let e of a)f(e);else a&&f(a);s=n+d[0].length,l=!0}if(!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&f({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function cs(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([ls(e[0]),us(e[1])])}return t}function ls(e){return typeof e==`string`?new RegExp(Yo(e),`g`):e}function us(e){return typeof e==`function`?e:function(){return e}}var ds=`phrasing`,fs=[`autolink`,`link`,`image`,`label`];function ps(){return{transforms:[xs],enter:{literalAutolink:hs,literalAutolinkEmail:gs,literalAutolinkHttp:gs,literalAutolinkWww:gs},exit:{literalAutolink:bs,literalAutolinkEmail:ys,literalAutolinkHttp:_s,literalAutolinkWww:vs}}}function ms(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:ds,notInConstruct:fs},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:ds,notInConstruct:fs},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:ds,notInConstruct:fs}]}}function hs(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function gs(e){this.config.enter.autolinkProtocol.call(this,e)}function _s(e){this.config.exit.autolinkProtocol.call(this,e)}function vs(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function ys(e){this.config.exit.autolinkEmail.call(this,e)}function bs(e){this.exit(e)}function xs(e){ss(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Ss],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Cs]],{ignore:[`link`,`linkReference`]})}function Ss(e,t,n,r,i){let a=``;if(!Es(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!ws(n)))return!1;let o=Ts(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function Cs(e,t,n,r){return!Es(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function ws(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Ts(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Jo(e,`(`),a=Jo(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Es(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||vi(n)||_i(n))&&(!t||n!==47)}Is.peek=Fs;function Ds(){this.buffer()}function Os(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function ks(){this.buffer()}function As(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function js(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ci(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Ms(e){this.exit(e)}function Ns(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ci(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Ps(e){this.exit(e)}function Fs(){return`[`}function Is(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Ls(){return{enter:{gfmFootnoteCallString:Ds,gfmFootnoteCall:Os,gfmFootnoteDefinitionLabelString:ks,gfmFootnoteDefinition:As},exit:{gfmFootnoteCallString:js,gfmFootnoteCall:Ms,gfmFootnoteDefinitionLabelString:Ns,gfmFootnoteDefinition:Ps}}}function Rs(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Is},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
17
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Bs:zs))),s(),o}}function zs(e,t,n){return t===0?e:Bs(e,t,n)}function Bs(e,t,n){return(n?``:` `)+e}var Vs=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Ks.attention=qs,Ks.peek=Js;function Hs(){return{canContainEols:[`delete`],enter:{strikethrough:Ws},exit:{strikethrough:Gs}}}function Us(){return{handlers:{delete:Ks},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Vs}]}}function Ws(e){this.enter({type:`delete`,children:[],position:void 0},e)}function Gs(e){this.exit(e)}function Ks(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function qs(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function Js(){return`~`}function Ys(e){return e.length}function Xs(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Ys,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Zs(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=Qs(r[d]);else{let e=Qs(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding===!1||n.alignDelimiters===!1&&i===``||n.delimiterStart===!1&&!d||r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
18
+ `)}function Zs(e){return e==null?``:String(e)}function Qs(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var $s=Xo([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function ec(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),tc);return i(),o}function tc(e,t,n){return`>`+(n?``:` `)+e}function nc(e,t){return rc(e,t.inConstruct,!0)&&!rc(e,t.notInConstruct,!1)}function rc(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function ic(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
19
+ `&&!e.before&&!e.after&&nc(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
20
+ `}function ac(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function oc(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function sc(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function cc(e,t,n,r){let i=sc(n),a=e.value||``;if(oc(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,lc);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(ac(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
21
21
  `,encode:["`"],...o.current()})),t()}return u+=o.move(`
22
22
  `),a&&(u+=o.move(a+`
23
- `)),u+=o.move(s),c(),u}function oc(e,t,n){return(n?``:` `)+e}function sc(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function cc(e,t,n,r){let i=sc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
24
- `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function lc(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}uc.attention=dc,uc.peek=fc;function uc(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function dc(e,t){return{construct:`emphasis`,markers:lc(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function fc(e,t,n){return n.options.emphasis||`*`}function pc(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function mc(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),ns(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}function hc(e,t){let n=!1;return mc(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&qr(e)&&(t.options.setext||n))}function gc(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(hc(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
23
+ `)),u+=o.move(s),c(),u}function lc(e,t,n){return(n?``:` `)+e}function uc(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function dc(e,t,n,r){let i=uc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
24
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function fc(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}pc.attention=mc,pc.peek=hc;function pc(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function mc(e,t){return{construct:`emphasis`,markers:fc(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function hc(e,t,n){return n.options.emphasis||`*`}function gc(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function _c(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),as(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}function vc(e,t){let n=!1;return _c(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Jr(e)&&(t.options.setext||n))}function yc(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(vc(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
25
25
  `,after:`
26
26
  `});return r(),t(),o+`
27
27
  `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
28
28
  `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
29
- `,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=pc(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}_c.peek=vc;function _c(e){return e.value||``}function vc(){return`<`}yc.peek=bc;function yc(e,t,n,r){let i=sc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function bc(){return`!`}xc.peek=Sc;function xc(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Sc(){return`!`}Cc.peek=wc;function Cc(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function wc(){return"`"}function Tc(e,t){let n=qr(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}Ec.peek=Dc;function Ec(e,t,n,r){let i=sc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(Tc(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Dc(e,t,n){return Tc(e,n)?`<`:`[`}Oc.peek=kc;function Oc(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function kc(){return`[`}function Ac(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function jc(e){let t=Ac(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Mc(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Nc(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Pc(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Mc(n):Ac(n),s=e.ordered?o===`.`?`)`:`.`:jc(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),Nc(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Fc(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Ic(e,t,n,r){let i=Fc(n),a=n.bulletCurrent||Ac(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Lc(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function Rc(e,t,n,r){if(!e.children.some(function(e){return Xs(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function zc(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Bc.attention=Vc,Bc.peek=Hc;function Bc(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function Vc(e,t){return{construct:`strong`,markers:zc(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function Hc(e,t,n){return n.options.strong||`*`}function Uc(e,t,n,r){let i=t?t.children:[],a=i.indexOf(e);return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function Wc(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Gc(e,t,n){let r=(Nc(n)+(n.options.ruleSpaces?` `:``)).repeat(Wc(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Kc={blockquote:Zs,break:tc,code:ac,definition:cc,emphasis:uc,hardBreak:tc,heading:gc,html:_c,image:yc,imageReference:xc,inlineCode:Cc,link:Ec,linkReference:Oc,list:Pc,listItem:Ic,paragraph:Lc,root:Rc,strong:Bc,text:Uc,thematicBreak:Gc};function qc(){return{enter:{table:Jc,tableData:Qc,tableHeader:Qc,tableRow:Xc},exit:{codeText:$c,table:Yc,tableData:Zc,tableHeader:Zc,tableRow:Zc}}}function Jc(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Yc(e){this.exit(e),this.data.inTable=void 0}function Xc(e){this.enter({type:`tableRow`,children:[]},e)}function Zc(e){this.exit(e)}function Qc(e){this.enter({type:`tableCell`,children:[]},e)}function $c(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,el));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function el(e,t){return t===`|`?t:e}function tl(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
29
+ `,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=gc(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}bc.peek=xc;function bc(e){return e.value||``}function xc(){return`<`}Sc.peek=Cc;function Sc(e,t,n,r){let i=uc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Cc(){return`!`}wc.peek=Tc;function wc(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Tc(){return`!`}Ec.peek=Dc;function Ec(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Dc(){return"`"}function Oc(e,t){let n=Jr(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}kc.peek=Ac;function kc(e,t,n,r){let i=uc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(Oc(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Ac(e,t,n){return Oc(e,n)?`<`:`[`}jc.peek=Mc;function jc(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Mc(){return`[`}function Nc(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Pc(e){let t=Nc(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Fc(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Ic(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Lc(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Fc(n):Nc(n),s=e.ordered?o===`.`?`)`:`.`:Pc(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),Ic(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Rc(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function zc(e,t,n,r){let i=Rc(n),a=n.bulletCurrent||Nc(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Bc(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function Vc(e,t,n,r){if(!e.children.some(function(e){return $s(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function Hc(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Uc.attention=Wc,Uc.peek=Gc;function Uc(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function Wc(e,t){return{construct:`strong`,markers:Hc(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function Gc(e,t,n){return n.options.strong||`*`}function Kc(e,t,n,r){let i=t?t.children:[],a=i.indexOf(e);return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function qc(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Jc(e,t,n){let r=(Ic(n)+(n.options.ruleSpaces?` `:``)).repeat(qc(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Yc={blockquote:ec,break:ic,code:cc,definition:dc,emphasis:pc,hardBreak:ic,heading:yc,html:bc,image:Sc,imageReference:wc,inlineCode:Ec,link:kc,linkReference:jc,list:Lc,listItem:zc,paragraph:Bc,root:Vc,strong:Uc,text:Kc,thematicBreak:Jc};function Xc(){return{enter:{table:Zc,tableData:tl,tableHeader:tl,tableRow:$c},exit:{codeText:nl,table:Qc,tableData:el,tableHeader:el,tableRow:el}}}function Zc(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Qc(e){this.exit(e),this.data.inTable=void 0}function $c(e){this.enter({type:`tableRow`,children:[]},e)}function el(e){this.exit(e)}function tl(e){this.enter({type:`tableCell`,children:[]},e)}function nl(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,rl));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function rl(e,t){return t===`|`?t:e}function il(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
30
30
  `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
31
- `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return qs(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Kc.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function nl(){return{exit:{taskListCheckValueChecked:il,taskListCheckValueUnchecked:il,paragraph:al}}}function rl(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:ol}}}function il(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function al(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function ol(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Kc.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function sl(){return[us(),Ps(),zs(),qc(),nl()]}function cl(e){return{extensions:[ds(),Fs(e),Bs(),tl(e),rl()]}}var ll={tokenize:Cl,partial:!0},ul={tokenize:wl,partial:!0},dl={tokenize:Tl,partial:!0},fl={tokenize:El,partial:!0},pl={tokenize:Dl,partial:!0},ml={name:`wwwAutolink`,tokenize:xl,previous:Ol},hl={name:`protocolAutolink`,tokenize:Sl,previous:kl},gl={name:`emailAutolink`,tokenize:bl,previous:Al},_l={};function vl(){return{text:_l}}for(var yl=48;yl<123;)_l[yl]=gl,yl++,yl===58?yl=65:yl===91&&(yl=97);_l[43]=gl,_l[45]=gl,_l[46]=gl,_l[95]=gl,_l[72]=[gl,hl],_l[104]=[gl,hl],_l[87]=[gl,ml],_l[119]=[gl,ml];function bl(e,t,n){let r=this,i,a;return o;function o(t){return!jl(t)||!Al.call(r,r.previous)||Ml(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return jl(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(pl,u,l)(t):t===45||t===95||li(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&ci(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function xl(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Ol.call(r,r.previous)||Ml(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(ll,e.attempt(ul,e.attempt(dl,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Sl(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&kl.call(r,r.previous)&&!Ml(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(ci(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||di(t)||hi(t)||_i(t)||gi(t)?n(t):e.attempt(ul,e.attempt(dl,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Cl(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function wl(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(fl,c,s)(t):t===null||hi(t)||_i(t)||t!==45&&gi(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Tl(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(fl,t,a)(o):o===null||hi(o)||_i(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function El(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||hi(o)||_i(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||hi(e)||_i(e)?t(e):r(e)}function a(e){return ci(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):ci(t)?(e.consume(t),o):n(t)}}function Dl(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return li(e)?n(e):t(e)}}function Ol(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||hi(e)}function kl(e){return!ci(e)}function Al(e){return!(e===47||jl(e))}function jl(e){return e===43||e===45||e===46||e===95||li(e)}function Ml(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Nl={tokenize:Vl,partial:!0};function Pl(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Rl,continuation:{tokenize:zl},exit:Bl}},text:{91:{name:`gfmFootnoteCall`,tokenize:Ll},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Fl,resolveTo:Il}}}}function Fl(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=si(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Il(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Ll(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||hi(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(si(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return hi(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Rl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||hi(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=si(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return hi(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),U(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function zl(e,t,n){return e.check(Ii,t,e.attempt(Nl,t,n))}function Bl(e){e.exit(`gfmFootnoteDefinition`)}function Vl(e,t,n){let r=this;return U(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Hl(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&ei(o,o.length,0,ki(s,e.slice(r+1,n),t)),ei(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),ei(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Oi(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Oi(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Ul=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){Wl(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Wl(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Gl(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Kl(){return{flow:{null:{name:`table`,tokenize:ql,resolveAll:Jl}}}}function ql(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):V(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):H(t)?U(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||hi(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,H(t)?U(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return H(t)?U(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||V(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return H(t)?U(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||V(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||V(n)?(e.exit(`tableRow`),t(n)):H(n)?U(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||hi(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Jl(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Ul;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Xl(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Yl(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Yl(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Yl(f,t,o,i,n,d)):(o[0]=o[1],d=Yl(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Xl(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Gl(t.events,n))}return e}function Yl(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Zl(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Zl(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Zl(t.events,n[2]),a=Zl(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Zl(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Xl(e,t,n,r,i){let a=[],o=Zl(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Zl(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Ql={name:`tasklistCheck`,tokenize:eu};function $l(){return{text:{91:Ql}}}function eu(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return hi(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return V(r)?t(r):H(r)?e.check({tokenize:tu},t,n)(r):n(r)}}function tu(e,t,n){return U(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function nu(e){return ri([vl(),Pl(),Hl(e),Kl(),$l()])}var ru={};function iu(e){let t=this,n=e||ru,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(nu(n)),a.push(sl()),o.push(cl(n))}var au=`local-draft-2`,ou={kind:`string`,static:!0},su={kind:`string`,static:!0},cu={kind:`number`,static:!0},lu={kind:`boolean`,static:!0},uu={kind:`boolean`,dynamic:!0,default:!1},du={kind:`string`},fu={kind:`string`,static:!0},pu={kind:`string`},mu={kind:`string`},hu=()=>({kind:`string`,static:!0,color:!0}),gu=(e={})=>({kind:`number`,...e}),_u=[{name:`input`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`string`,required:!1,family:`text`},initialRule:`empty`,props:{label:du,bind:ou,initial:su,type:{kind:`enum`,static:!0,values:[`text`,`email`],default:`text`},placeholder:{kind:`string`},required:{kind:`boolean`,default:!1},"min-length":gu({integer:!0,min:0,default:0}),"max-length":gu({integer:!0,min:0}),disabled:uu}},{name:`textarea`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`string`,required:!1,family:`text`},initialRule:`empty`,props:{label:du,bind:ou,initial:su,placeholder:{kind:`string`},rows:gu({integer:!0,positive:!0,default:4}),required:{kind:`boolean`,default:!1},"min-length":gu({integer:!0,min:0,default:0}),"max-length":gu({integer:!0,min:0}),disabled:uu}},{name:`number`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`number`,required:!1,family:`number`},initialRule:`nearest-zero`,props:{label:du,bind:ou,initial:cu,min:gu(),max:gu(),step:gu({positive:!0,default:1}),disabled:uu}},{name:`slider`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`number`,required:!1,family:`number`},initialRule:`min`,props:{label:du,bind:ou,initial:cu,min:gu({default:0}),max:gu({default:100}),step:gu({positive:!0,default:1}),disabled:uu,color:hu()}},{name:`range-slider`,form:`leaf`,childRule:`none`,label:`required`,slots:[{name:`start`,bind:`bind-start`,initial:`initial-start`,kind:`number`,family:`number`,exclusive:!0,initialRule:`min`},{name:`end`,bind:`bind-end`,initial:`initial-end`,kind:`number`,family:`number`,exclusive:!0,initialRule:`max-step`}],props:{label:du,"bind-start":ou,"bind-end":ou,"initial-start":cu,"initial-end":cu,min:gu({default:0}),max:gu({default:100}),step:gu({positive:!0,default:1}),disabled:uu,color:hu()}},{name:`coordinate`,form:`leaf`,childRule:`none`,label:`required`,slots:[{name:`x`,bind:`bind-x`,initial:`initial-x`,kind:`number`,family:`number`,exclusive:!0,initialRule:`nearest-zero`},{name:`y`,bind:`bind-y`,initial:`initial-y`,kind:`number`,family:`number`,exclusive:!0,initialRule:`nearest-zero`}],props:{label:du,"bind-x":ou,"bind-y":ou,"initial-x":cu,"initial-y":cu,"x-min":gu({default:-5}),"x-max":gu({default:5}),"y-min":gu({default:-5}),"y-max":gu({default:5}),step:gu({positive:!0,default:1}),disabled:uu,color:hu()}},{name:`toggle`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`boolean`,required:!1,family:`boolean`},initialRule:`false`,props:{label:du,bind:ou,initial:lu,disabled:uu,color:hu()}},{name:`checkbox`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`boolean`,required:!1,family:`boolean`},initialRule:`false`,props:{label:du,bind:ou,initial:lu,disabled:uu,color:hu()}},{name:`date`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`string`,required:!1,family:`date`},initialRule:`empty`,props:{label:du,bind:ou,initial:su,min:{kind:`string`,static:!0},max:{kind:`string`,static:!0},required:{kind:`boolean`,default:!1},disabled:uu}},{name:`select`,form:`container`,childRule:`options`,label:`required`,binding:{kind:`string`,required:!1,family:`choice`},initialRule:`first-option`,props:{label:du,bind:ou,initial:su,disabled:uu,color:hu()}},{name:`choices`,form:`container`,childRule:`options`,label:`required`,binding:{kind:`string`,required:!1,family:`choice`},initialRule:`first-option`,props:{label:du,bind:ou,initial:su,disabled:uu,color:hu()}},{name:`radio-group`,form:`container`,childRule:`options`,label:`required`,binding:{kind:`string`,required:!1,family:`choice`},initialRule:`first-option`,props:{label:du,bind:ou,initial:su,disabled:uu,color:hu()}},{name:`multi-select`,form:`container`,childRule:`options`,label:`required`,binding:{kind:`array`,required:!1,family:`multi-select`,exclusive:!0},initialRule:`empty-array`,props:{label:du,bind:ou,initial:su,"max-selected":gu({integer:!0,min:0}),disabled:uu,color:hu()}},{name:`option`,form:`container`,childRule:`inline`,label:`none`,parent:[`select`,`choices`,`radio-group`,`multi-select`,`quiz`],props:{value:{kind:`string`,static:!0,required:!0}}},{name:`counter`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`number`,required:!1,family:`number`},initialRule:`nearest-zero`,props:{label:du,bind:ou,initial:cu,min:gu({default:0}),max:gu(),step:gu({positive:!0,default:1}),disabled:uu}},{name:`timer`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`number`,required:!1,family:`timer`,exclusive:!0},initialRule:`duration`,props:{label:du,bind:ou,duration:gu({integer:!0,positive:!0,default:60})}},{name:`checklist`,form:`container`,childRule:`content`,label:`required`,binding:{kind:`array`,required:!1,family:`checklist`,exclusive:!0},initialRule:`checked`,props:{label:du,bind:ou,disabled:uu,color:hu()}},{name:`progress`,form:`leaf`,childRule:`none`,label:`required`,props:{label:du,value:{kind:`number`,dynamic:!0,required:!0},max:gu({positive:!0,default:100}),color:hu()}},{name:`jump`,form:`inline`,childRule:`inline`,label:`none`,props:{to:{kind:`string`,static:!0,required:!0},appearance:{kind:`enum`,static:!0,values:[`link`,`button`],default:`link`},color:hu()}},{name:`anchor`,form:`leaf`,childRule:`none`,label:`none`,props:{id:{kind:`string`,static:!0,required:!0}}},{name:`text`,form:`inline`,childRule:`inline`,label:`none`,props:{color:{kind:`string`,static:!0,required:!0,color:!0}}},{name:`section`,form:`container`,childRule:`any`,label:`none`,props:{color:{kind:`string`,static:!0,required:!0,color:!0}}},{name:`quiz`,form:`container`,childRule:`quiz`,label:`required`,props:{type:{kind:`enum`,static:!0,values:[`choice`,`number`],default:`choice`},label:du,answer:{kind:`string`,static:!0,required:!0},explanation:{kind:`string`},tolerance:gu({min:0,default:0}),disabled:uu}},{name:`panel`,form:`container`,childRule:`any`,label:`none`,props:{title:mu,reset:{kind:`boolean`,default:!0}}},{name:`card`,form:`container`,childRule:`any`,label:`none`,props:{title:mu}},{name:`grid`,form:`container`,childRule:`cards`,label:`none`,props:{columns:gu({integer:!0,min:1,max:4,default:2})}},{name:`tabs`,form:`container`,childRule:`tabs`,label:`optional`,binding:{kind:`string`,required:!1,family:`tabs`,exclusive:!0},initialRule:`first-tab`,props:{label:pu,bind:ou,initial:su}},{name:`tab`,form:`container`,childRule:`any`,label:`required`,parent:[`tabs`],props:{label:du,value:{kind:`string`,static:!0}}},{name:`steps`,form:`container`,childRule:`steps`,label:`optional`,binding:{kind:`string`,required:!1,family:`steps`,exclusive:!0},initialRule:`first-step`,props:{label:pu,bind:ou,initial:su}},{name:`step`,form:`container`,childRule:`any`,label:`required`,parent:[`steps`],props:{label:du,value:{kind:`string`,static:!0}}},{name:`accordion`,form:`container`,childRule:`disclosures`,label:`optional`,props:{label:pu}},{name:`disclosure`,form:`container`,childRule:`any`,label:`required`,parent:[`accordion`],props:{label:du,open:{kind:`boolean`,default:!1}}},{name:`if`,form:`container`,childRule:`any`,label:`none`,props:{when:{kind:`boolean`,dynamic:!0,required:!0}}},{name:`alert`,form:`container`,childRule:`any`,label:`none`,props:{title:mu,tone:{kind:`enum`,dynamic:!0,values:[`info`,`success`,`warning`],default:`info`}}},{name:`badge`,form:`inline`,childRule:`inline`,label:`none`,props:{tone:{kind:`enum`,dynamic:!0,values:[`neutral`,`success`,`warning`],default:`neutral`},color:hu()}},{name:`tooltip`,form:`inline`,childRule:`inline`,label:`none`,props:{text:{kind:`string`,required:!0}}},{name:`computed`,form:`leaf`,childRule:`none`,label:`none`,props:{name:{kind:`string`,static:!0,required:!0},value:{kind:`string`,required:!0}}},{name:`const`,form:`leaf`,childRule:`none`,label:`none`,props:{name:{kind:`string`,static:!0,required:!0},value:{kind:`string`,required:!0}}},{name:`validation`,form:`leaf`,childRule:`none`,label:`none`,props:{when:{kind:`boolean`,dynamic:!0,required:!0},message:{kind:`string`,required:!0},fields:{kind:`string`,static:!0,required:!0}}},{name:`data-table`,form:`container`,childRule:`columns`,label:`required`,props:{label:fu,rows:{kind:`string`,required:!0},key:{kind:`string`,required:!0},"max-rows":gu({integer:!0,positive:!0,max:A,default:100})}},{name:`column`,form:`leaf`,childRule:`none`,label:`none`,parent:[`data-table`],props:{label:{kind:`string`,static:!0,required:!0},value:{kind:`string`,required:!0}}},{name:`table`,form:`container`,childRule:`table`,label:`optional`,binding:{kind:`string`,required:!1,family:`selection`},initialRule:`none`,props:{label:pu,searchable:{kind:`boolean`,default:!0},sortable:{kind:`boolean`,default:!0},"page-size":gu({integer:!0,positive:!0,default:10}),bind:ou,key:{kind:`string`,static:!0},initial:su}},{name:`chart`,form:`container`,childRule:`table`,label:`none`,binding:{kind:`string`,required:!1,family:`selection`},initialRule:`none`,props:{kind:{kind:`enum`,static:!0,values:[`bar`,`line`,`area`,`scatter`,`donut`],default:`bar`},title:mu,x:{kind:`string`,static:!0},y:{kind:`string`,static:!0},"x-label":{kind:`string`},"y-label":{kind:`string`},bind:ou,key:{kind:`string`,static:!0},initial:su}},{name:`plot`,form:`container`,childRule:`plot`,label:`optional`,props:{label:pu,min:{kind:`number`,dynamic:!0,default:-10},max:{kind:`number`,dynamic:!0,default:10},samples:gu({integer:!0,min:2,max:2e3,static:!0,default:200}),"x-label":{kind:`string`,default:`x`},"y-label":{kind:`string`,default:`y`}}},{name:`timeline`,form:`container`,childRule:`table`,label:`none`,props:{title:mu,unit:{kind:`string`,default:`minutes`}}},{name:`diagram`,form:`container`,childRule:`diagram`,label:`optional`,binding:{kind:`string`,required:!1,family:`diagram`,exclusive:!0},initialRule:`first-node`,props:{label:pu,bind:ou,initial:su,direction:{kind:`enum`,static:!0,values:[`right`,`down`],default:`right`}}},{name:`node`,form:`container`,childRule:`content`,label:`required`,parent:[`diagram`],props:{id:{kind:`string`,static:!0,required:!0},label:du,tone:{kind:`enum`,dynamic:!0,values:[`neutral`,`success`,`warning`],default:`neutral`}}},{name:`edge`,form:`leaf`,childRule:`none`,label:`none`,parent:[`diagram`],props:{from:{kind:`string`,static:!0,required:!0},to:{kind:`string`,static:!0,required:!0},label:pu}}],vu=Object.freeze(Object.fromEntries(_u.map(e=>[e.name,Object.freeze(e)]))),yu=Object.freeze(_u.map(e=>e.name)),bu=Object.freeze({leaf:Object.freeze(_u.filter(e=>e.form===`leaf`).map(e=>e.name)),inline:Object.freeze(_u.filter(e=>e.form===`inline`).map(e=>e.name)),container:Object.freeze(_u.filter(e=>e.form===`container`).map(e=>e.name))});function xu(e){return bu[e]}function Su(e){return Object.hasOwn(vu,e)?vu[e]:void 0}function Cu(e,t){let n=Array.from({length:t.length+1},(e,t)=>t);for(let r=1;r<=e.length;r++){let i=n[0];n[0]=r;for(let a=1;a<=t.length;a++){let o=n[a];n[a]=Math.min(n[a]+1,n[a-1]+1,i+(e[r-1]===t[a-1]?0:1)),i=o}}return n[t.length]}function wu(e,t){let n,r=1/0;for(let i of t){let t=Cu(e,i);t<r&&(n=i,r=t)}return r<=2?n:void 0}function Tu(e){return wu(e,yu)}function Eu(e,t){return wu(t,Object.keys(e.props))}var Du=`reactive-md-theme-1`,Ou=Object.freeze({name:`default`,protocol:Du,colorSchemes:Object.freeze([`light`,`dark`])}),ku=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,Au=64;function ju(e){return typeof e==`string`&&e.length>0&&e.length<=Au&&ku.test(e)}function Mu(e,t){let n=typeof t==`string`?t.length:1/0;if(!e||typeof e.start!=`number`||typeof e.end!=`number`||!Number.isFinite(e.start)||!Number.isFinite(e.end))return{start:0,end:0};let r=Math.max(0,Math.min(n,Math.floor(e.start)));return{start:r,end:Math.max(r,Math.min(n,Math.floor(e.end)))}}function Nu(e,t){if(typeof e!=`string`||e.length===0)return{line:1,column:1};let n=Math.min(t,e.length),r=1,i=0;for(let t=0;t<n;t+=1)e[t]===`
32
- `&&(r+=1,i=t+1);return{line:r,column:t-i+1}}function Pu(e,t,n,r){let i=Mu(n,r),{line:a,column:o}=Nu(r,i.start);return{code:e,message:et(t),severity:`warning`,range:i,line:a,column:o,messageKey:t.key,...t.params?{params:t.params}:{}}}function Fu(e,t,n,r){let i=(e,t)=>({name:Ou.name,diagnostics:[Pu(e,t,n,r)]}),a=e;if(a==null||a===``)return{name:Ou.name,diagnostics:[]};if(!ju(a))return i(`local.theme.name`,Be(`local.theme.name`,{name:String(a),limit:Au}));let o=a;if(o===Ou.name)return{name:Ou.name,diagnostics:[]};if(!Array.isArray(t))return i(`local.theme.missing`,Be(`local.theme.missing`,{name:o}));let s=0,c=null;try{for(let e of t)typeof e==`object`&&e&&!Array.isArray(e)&&e.name===o&&(s+=1,c=e)}catch{return i(`local.theme.manifest`,Be(`local.theme.manifest.unreadable`))}if(s===0)return i(`local.theme.missing`,Be(`local.theme.missing`,{name:o}));if(s>1)return i(`local.theme.duplicate`,Be(`local.theme.duplicate`,{name:o}));try{let e=c;if(!e||typeof e!=`object`)return i(`local.theme.manifest`,Be(`local.theme.manifest.definition`,{name:o}));if(e.protocol!==`reactive-md-theme-1`)return i(`local.theme.protocol`,Be(`local.theme.protocol`,{name:o,protocol:Du}));let t=e.colorSchemes;if(!Array.isArray(t)||!t.includes(`light`)||!t.includes(`dark`))return i(`local.theme.modes`,Be(`local.theme.modes`,{name:o}))}catch{return i(`local.theme.manifest`,Be(`local.theme.manifest.selected`,{name:o}))}return{name:o,diagnostics:[]}}var Iu=new Set(xu(`leaf`)),Lu=new Set([...xu(`container`),...xu(`inline`)]),Ru=new Set(xu(`inline`)),zu=new Set([...Iu,...Lu]),Bu=``,Vu=``,Hu=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,Uu=Hu,Wu=128,Gu=Math.min(5e4,w),Ku=100,qu=Ir().use(Wo).use(iu),Ju=class extends Error{code;start;end;key;params;constructor(e,t,n,r,i=e,a){super(t),this.code=e,this.start=n,this.end=r,this.key=i,this.params=a,this.name=`LocalBudgetError`}};function Yu(e){if(e===void 0)return C;if(typeof e!=`object`||!e||Array.isArray(e))return{message:`Compile options must be an object.`,key:`local.options.invalid.object`};let t=e.limits;if(t===void 0)return C;if(typeof t!=`object`||!t||Array.isArray(t))return{message:`Compile option limits must be an object.`,key:`local.options.invalid.limits`};let n=t.maxSyntaxNodes;return n===void 0?C:typeof n!=`number`||!Number.isSafeInteger(n)||n<1?{message:`Compile option limits.maxSyntaxNodes must be a positive safe integer.`,key:`local.options.invalid.max-syntax-nodes`}:n}function Xu(e,t){let n=[];if(typeof e!=`string`||e.length>1e6){let t=typeof e==`string`?Be(`local.budget.document`,{limit:S}):Be(`local.parse.source`);return{nodes:[],diagnostics:[{code:typeof e==`string`?`local.budget`:`local.parse`,message:typeof e==`string`?`Document exceeds the ${S}-character limit.`:`Document source must be a string.`,severity:`error`,range:{start:0,end:typeof e==`string`&&e.length?1:0},line:1,column:1,messageKey:t.key,...t.params?{params:t.params}:{}}]}}let r=Yu(t);if(typeof r!=`number`)return{nodes:[],diagnostics:[{code:`local.options.invalid`,message:r.message,severity:`error`,range:{start:0,end:0},line:1,column:1,messageKey:r.key}]};let i=[0];for(let t=0;t<e.length;t+=1)e[t]===`
33
- `&&i.push(t+1);let a=0,o=0,s=0,c=new Set(e.match(RegExp(`[0-9]+`,`g`))??[]),l=[],u=[],d=+(e.charCodeAt(0)===65279),f=e=>{if(e.type===`code`)l.push({start:e.position.start.offset+d,end:e.position.end.offset+d});else if(e.type===`footnoteReference`||e.type===`footnoteDefinition`){let t=e.position?.start?.offset,n=e.position?.end?.offset;Number.isInteger(t)&&Number.isInteger(n)&&n>t&&u.push({start:t+d,end:n+d,block:e.type===`footnoteDefinition`})}for(let t of e.children??[])f(t)};try{f(qu.parse(e.slice(d)))}catch{return v(`local.parse`,`Cannot parse the Markdown document.`,0,void 0,{key:`local.parse.markdown`}),{nodes:[],diagnostics:n}}u.sort((e,t)=>e.start-t.start||t.end-e.end);let p=[];for(let e of u){let t=p[p.length-1];t&&e.start<t.end?(e.end>t.end&&(t.end=e.end),t.block=t.block||e.block):p.push({...e})}let m=e=>{let t=0,n=l.length-1;for(;t<=n;){let r=t+n>>1,i=l[r];if(e<i.start)n=r-1;else if(e>=i.end)t=r+1;else return i.end}return null},h=0,g=(e,t,n,i={})=>{if(o>=r)throw new Ju(`local.budget`,`Syntax nodes exceed the limit of ${r}.`,t,n,`local.budget.nodes`,{limit:r});return o+=1,{type:e,id:`local-${a++}`,range:{start:t,end:n},...i}};function _(t,r,a,o,s=o+1,c){if(n.length>=100){if(a===`warning`)return;let e=n.length-1;for(;e>=0&&n[e].severity!==`warning`;)--e;if(e<0)return;n.splice(e,1)}let l=Math.max(0,Math.min(e.length,o)),u=Math.max(l,Math.min(e.length,Math.max(l,s))),d=0,f=i.length-1;for(;d<f;){let e=Math.ceil((d+f)/2);i[e]<=l?d=e:f=e-1}let p=d+1,m=r.length>2e3?`${r.slice(0,D-1)}…`:r,h=Be(c?.key??t,c?.params);n.push({code:t,message:m,severity:a,range:{start:l,end:u},line:p,column:l-i[d]+1,messageKey:h.key,...h.params?{params:h.params}:{}})}function v(e,t,n,r=n+1,i){_(e,t,`error`,n,r,i)}function y(e,t,n,r=n+1,i){_(e,t,`warning`,n,r,i)}let b,x,C=0,w=0,T,E=0;function O(t){let n=e.startsWith(`</theme`,t),r=!n&&e.startsWith(`<theme`,t);if(!n&&!r)return!1;let i=e[t+(n?7:6)];return i!==void 0&&(i===`>`||i===`/`||/\s/.test(i))}function k(t,n){let r=/^<(\/?)theme(?=[\s/>])/.exec(e.slice(t,n));if(!r)return null;let i=t+r[0].length,a=e.indexOf(`
34
- `,i),o=a<0?n:Math.min(n,a),s=``,c=i;for(;c<o;c+=1){let t=e[c];if(s)t===s&&(s=``);else if(t===`"`||t===`'`)s=t;else if(t===`>`)break}let l=!!r[1];if(c>=o){let n=o;return{start:t,end:n,rest:e.slice(i,n),closing:l,selfClosing:!1,unclosed:!0}}let u=e.slice(i,c);return{start:t,end:c+1,rest:u,closing:l,selfClosing:/\/\s*$/.test(u),unclosed:!1}}function A(t,n){let r=t;for(;r<n;){let t=e[r];if(t.charCodeAt(0)===65279||t===` `||t===` `||t===`\r`||t===`
35
- `)r+=1;else if(e.startsWith(`<!--`,r)){let t=e.indexOf(`-->`,r+4);if(t<0||t+3>n)return-1;r=t+3}else break}return r}function j(t){if(t.unclosed)return!1;let n=t.end;for(;n<e.length&&(e[n]===` `||e[n]===` `||e[n]===`\r`);)n+=1;return n>=e.length||e[n]===`
36
- `}function M(e){if(/\{\{|\}\}/.test(e))return{code:`local.theme.expression`,key:`local.theme.expression`,message:`Theme names must be static text, not expressions.`};let t=e.replace(/\/\s*$/,``),n=/^\s*name\s*=\s*(?:"([^"]*)"|'([^']*)')\s*$/.exec(t);if(!n)return/\bname\s*=/.test(t)?{code:`local.theme.attribute`,key:`local.theme.attribute`,message:`Theme declarations only accept a quoted name attribute.`}:{code:`local.theme.name`,key:`local.theme.name.missing`,message:`A theme declaration requires a quoted name attribute.`};let r=n[1]??n[2]??``;return ju(r)?{name:r}:{code:`local.theme.name`,key:`local.theme.name.invalid`,params:{name:r,limit:64},message:`Theme name "${r}" must use lowercase letters, digits and single hyphens (maximum 64 characters).`}}function N(e){return e.replace(/&(quot|apos|amp|lt|gt);/g,(e,t)=>({quot:`"`,apos:`'`,amp:`&`,lt:`<`,gt:`>`})[t])}function ee(e,t){let n=Object.create(null),r=0;for(;r<e.length;){for(;r<e.length&&/\s/.test(e[r]);)r++;if(r>=e.length||e[r]===`/`)break;let i=r,a=/^[A-Za-z][A-Za-z0-9_-]*/.exec(e.slice(r));if(!a){for(v(`local.attribute`,`Attribute names must use lowercase kebab-case.`,t+r,void 0,{key:`local.attribute.format`});r<e.length&&!/\s/.test(e[r]);)r++;continue}let o=a[0];for(r+=o.length,o.length>Wu?v(`local.budget.name`,`Attribute name exceeds the ${Wu}-character limit.`,t+i,t+r,{key:`local.budget.name.attribute`,params:{limit:Wu}}):Uu.test(o)||v(`local.attribute.name`,`Attribute name ${o} must use lowercase kebab-case.`,t+i,t+r,{key:`local.attribute.name`,params:{name:o}});r<e.length&&/\s/.test(e[r]);)r++;let s=`true`;if(e[r]===`=`){for(r++;r<e.length&&/\s/.test(e[r]);)r++;let n=e[r++];if(n!==`"`&&n!==`'`){v(`local.attribute`,`Attribute ${o} value must be quoted.`,t+Math.max(0,r-1),void 0,{key:`local.attribute.value-quoted`,params:{name:o}});break}let i=e.indexOf(n,r);if(i<0){v(`local.attribute`,`Attribute ${o} is missing a closing quote.`,t+Math.max(0,r-1),void 0,{key:`local.attribute.closing-quote`,params:{name:o}});break}s=N(e.slice(r,i)),r=i+1}if(Object.hasOwn(n,o)?v(`local.attribute.duplicate`,`Duplicate attribute ${o}.`,t+i,t+r,{key:`local.attribute.duplicate`,params:{name:o}}):n[o]=s,r<e.length&&!/\s|\//.test(e[r])){v(`local.attribute`,`Attributes must be separated by whitespace.`,t+r,void 0,{key:`local.attribute.separator`});break}}return n}function P(t,n){let r=/^<(\/?)([A-Za-z][A-Za-z0-9_-]*)(?=[\s/>])/.exec(e.slice(t,n));if(!r)return null;let i=``,a=t+r[0].length;for(;a<n;a++){let t=e[a];if(i)t===i&&(i=``);else if(t===`"`||t===`'`)i=t;else if(t===`>`)break}if(a>=n)return v(`local.tag.unclosed`,`Tag ${r[2]} is missing >.`,t,n,{key:`local.tag.unclosed.open`,params:{name:r[2]}}),null;let o=r[2];o.length>Wu&&v(`local.budget.name`,`Tag name exceeds the ${Wu}-character limit.`,t,t+1+o.length,{key:`local.budget.name.tag`,params:{limit:Wu}});let s=e.slice(t+r[0].length,a);return r[1]?(s.trim()&&v(`local.tag.closing`,`Closing tag </${o}> cannot have attributes.`,t,a+1,{key:`local.tag.closing`,params:{name:o}}),{name:o,closing:!0,self:!1,start:t,end:a+1,attrs:{}}):(Hu.test(o)||v(`local.tag.name`,`Tag name ${o} must use lowercase kebab-case.`,t,t+1+o.length,{key:`local.tag.name`,params:{name:o}}),{name:o,closing:!1,self:/\/\s*$/.test(s),start:t,end:a+1,attrs:ee(s,t+r[0].length)})}function te(t,n){let r=/^<(\/?)([A-Za-z][A-Za-z0-9_-]*)(?=[\s/>])/.exec(e.slice(t,n));if(!r)return null;let i=``,a=t+r[0].length;for(;a<n;a++){let t=e[a];if(i)t===i&&(i=``);else if(t===`"`||t===`'`)i=t;else if(t===`>`)break}if(a>=n)return null;let o=e.slice(t+r[0].length,a);return{name:r[2],closing:!!r[1],self:!r[1]&&/\/\s*$/.test(o),end:a+1}}function F(t){let n=e.lastIndexOf(`
37
- `,t-1)+1;return/^[ \t]*$/.test(e.slice(n,t))}let ne=/^ {0,3}$/,re=/^[ \t]*$/;function ie(t,n,r){let i=e[t];if(i===`\\`)return Math.min(n,t+2);if(i!=="`"&&i!==`~`)return null;let a=e.lastIndexOf(`
38
- `,t-1)+1;if((r?re:ne).test(e.slice(a,t))){let i=/^(`{3,}|~{3,})[^\n]*(?:\n|$)/.exec(e.slice(t,n));if(i){let a=RegExp(`^${r?`[ \\t]*`:` {0,3}`}${i[1][0]}{${i[1].length},}[ \\t]*\\r?$`,`gm`);a.lastIndex=t+i[0].length;let o=a.exec(e);return o&&o.index<n?Math.min(n,o.index+o[0].length):n}}if(i==="`"){let r=/^`+/.exec(e.slice(t,n))[0],i=e.indexOf(r,t+r.length);for(;i>=0&&i<n;){if(e[i-1]!=="`"&&e[i+r.length]!=="`")return i+r.length;i=e.indexOf(r,i+r.length)}return t+r.length}return null}function ae(t,n,r,i){let a=1;for(let o=t;o<r;){if(!i){let e=m(o);if(e!==null&&e>o){o=Math.min(e,r);continue}}let t=ie(o,r,i);if(t!==null)o=t;else if(e.startsWith(`<!--`,o)){let t=e.indexOf(`-->`,o+4);o=t<0||t+3>r?r:t+3}else{if(e[o]===`<`){let e=te(o,r);if(e){if(e.name===n){if(e.closing){if(--a,a===0)return{start:o,end:e.end}}else e.self||(a+=1)}o=e.end;continue}}o++}}return null}function oe(t,n){let r=``;for(let i=t+2;i<n-1;i++){let t=e[i];if(r)t===`\\`?i++:t===r&&(r=``);else if(t===`"`||t===`'`)r=t;else if(t===`}`&&e[i+1]===`}`)return i+2}return-1}function se(t,n){let r=1/0,i=``,a=0,o=t;for(;o<n;){let t=e.indexOf(`
31
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Xs(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Yc.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function al(){return{exit:{taskListCheckValueChecked:sl,taskListCheckValueUnchecked:sl,paragraph:cl}}}function ol(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:ll}}}function sl(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function cl(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function ll(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Yc.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function ul(){return[ps(),Ls(),Hs(),Xc(),al()]}function dl(e){return{extensions:[ms(),Rs(e),Us(),il(e),ol()]}}var fl={tokenize:El,partial:!0},pl={tokenize:Dl,partial:!0},ml={tokenize:Ol,partial:!0},hl={tokenize:kl,partial:!0},gl={tokenize:Al,partial:!0},_l={name:`wwwAutolink`,tokenize:wl,previous:jl},vl={name:`protocolAutolink`,tokenize:Tl,previous:Ml},yl={name:`emailAutolink`,tokenize:Cl,previous:Nl},bl={};function xl(){return{text:bl}}for(var Sl=48;Sl<123;)bl[Sl]=yl,Sl++,Sl===58?Sl=65:Sl===91&&(Sl=97);bl[43]=yl,bl[45]=yl,bl[46]=yl,bl[95]=yl,bl[72]=[yl,vl],bl[104]=[yl,vl],bl[87]=[yl,_l],bl[119]=[yl,_l];function Cl(e,t,n){let r=this,i,a;return o;function o(t){return!Pl(t)||!Nl.call(r,r.previous)||Fl(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Pl(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(gl,u,l)(t):t===45||t===95||ui(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&li(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function wl(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!jl.call(r,r.previous)||Fl(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(fl,e.attempt(pl,e.attempt(ml,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Tl(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Ml.call(r,r.previous)&&!Fl(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(li(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||fi(t)||gi(t)||vi(t)||_i(t)?n(t):e.attempt(pl,e.attempt(ml,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function El(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Dl(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(hl,c,s)(t):t===null||gi(t)||vi(t)||t!==45&&_i(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Ol(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(hl,t,a)(o):o===null||gi(o)||vi(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function kl(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||gi(o)||vi(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||gi(e)||vi(e)?t(e):r(e)}function a(e){return li(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):li(t)?(e.consume(t),o):n(t)}}function Al(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return ui(e)?n(e):t(e)}}function jl(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||gi(e)}function Ml(e){return!li(e)}function Nl(e){return!(e===47||Pl(e))}function Pl(e){return e===43||e===45||e===46||e===95||ui(e)}function Fl(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Il={tokenize:Wl,partial:!0};function Ll(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Vl,continuation:{tokenize:Hl},exit:Ul}},text:{91:{name:`gfmFootnoteCall`,tokenize:Bl},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Rl,resolveTo:zl}}}}function Rl(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=ci(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function zl(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Bl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||gi(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(ci(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return gi(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Vl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||gi(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=ci(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return gi(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),bi(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Hl(e,t,n){return e.check(Ri,t,e.attempt(Il,t,n))}function Ul(e){e.exit(`gfmFootnoteDefinition`)}function Wl(e,t,n){let r=this;return bi(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Gl(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&ti(o,o.length,0,ji(s,e.slice(r+1,n),t)),ti(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),ti(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Ai(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Ai(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Kl=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){ql(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function ql(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Jl(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Yl(){return{flow:{null:{name:`table`,tokenize:Xl,resolveAll:Zl}}}}function Xl(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):V(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):H(t)?bi(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||gi(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,H(t)?bi(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return H(t)?bi(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||V(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return H(t)?bi(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||V(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||V(n)?(e.exit(`tableRow`),t(n)):H(n)?bi(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||gi(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Zl(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Kl;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&($l(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Ql(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Ql(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Ql(f,t,o,i,n,d)):(o[0]=o[1],d=Ql(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&$l(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Jl(t.events,n))}return e}function Ql(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},eu(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=eu(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=eu(t.events,n[2]),a=eu(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},eu(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function $l(e,t,n,r,i){let a=[],o=eu(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function eu(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var tu={name:`tasklistCheck`,tokenize:ru};function nu(){return{text:{91:tu}}}function ru(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return gi(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return V(r)?t(r):H(r)?e.check({tokenize:iu},t,n)(r):n(r)}}function iu(e,t,n){return bi(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function au(e){return ii([xl(),Ll(),Gl(e),Yl(),nu()])}var ou={};function su(e){let t=this,n=e||ou,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(au(n)),a.push(ul()),o.push(dl(n))}var cu=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),W;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(W||={});var lu={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function uu(e){return e>=55296&&e<=57343}function du(e){return e>=56320&&e<=57343}function fu(e,t){return(e-55296)*1024+9216+t}function pu(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function mu(e){return e>=64976&&e<=65007||cu.has(e)}var G;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(G||={});var hu=65536,gu=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=hu,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(du(t))return this.pos++,this._addGap(),fu(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,W.EOF;return this._err(G.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,W.EOF;let n=this.html.charCodeAt(t);return n===W.CARRIAGE_RETURN?W.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,W.EOF;let e=this.html.charCodeAt(this.pos);return e===W.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,W.LINE_FEED):e===W.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,uu(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===W.LINE_FEED||e===W.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){pu(e)?this._err(G.controlCharacterInInputStream):mu(e)&&this._err(G.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},_u;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(_u||={});function vu(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var yu=[8364,0,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,0,381,0,0,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,0,382,376];function bu(e){return e===0||e>=55296&&e<=57343||e>1114111}function xu(e){return bu(e)?65533:e>=128&&e<=159&&yu[e-128]||e}function Su(e){return bu(e)?65533:e}var Cu=(()=>{let e=new Uint8Array(127),t=0;for(let n=33;n<=126;n++)n!==34&&n!==36&&n!==92&&(e[n]=t++);return e})();function wu(e,t,n,r,i,a){let o=e.length,s=a*90,c=0,l=()=>{let t=Cu[e.charCodeAt(c++)];return t<a?t:t*91-s+Cu[e.charCodeAt(c++)]},u=n-r,d=n+i,f=new Int32Array(d);f.fill(-1,r,a),f.fill(-1,a+u,d);let p=new Int32Array(d),m=new Int32Array(d);function h(t,n){let r=0,i=n,a=n+t;for(;i<a;){let t=Cu[e.charCodeAt(c++)];if(t<89)r+=t,f[i++]=r;else if(t===89){let t=Cu[e.charCodeAt(c++)]+2;for(;t--;)f[i++]=++r}else{let t=Cu[e.charCodeAt(c++)];r+=89+(t<90?t*91+Cu[e.charCodeAt(c++)]:Cu[e.charCodeAt(c++)]*8281+Cu[e.charCodeAt(c++)]*91+Cu[e.charCodeAt(c++)]),f[i++]=r}}}h(r,0),h(u,a);let g=new Int32Array(i*2),_=0,v=0;function y(e,t){for(let n=0;n<e;n++){let e=t+n,r=l(),i=l();g[v*2]=r,g[v*2+1]=i,v+=1,p[e]=_;let a=(f[r]<0?m[r]:1)+(f[i]<0?m[i]:1);m[e]=a,_+=a}}y(i-a+r,a+u),y(a-r,r);let b=new Uint16Array(_),x=0;for(let e=0;e<v;e++)for(let t=0;t<2;t++){let n=g[e*2+t],r=f[n];if(r<0){let e=p[n],t=e+m[n];for(;e<t;)b[x++]=b[e++]}else b[x++]=r}let S=new Uint16Array(t),C=0;for(;c<o;){let t=Cu[e.charCodeAt(c++)];t>=a&&(t=t*91-s+Cu[e.charCodeAt(c++)]);let n=f[t];if(n<0){let e=p[t],n=e+m[t];for(;e<n;)S[C++]=b[e++]}else S[C++]=n}return S}var Tu=wu("!}.&u%}'&}*'~!6*)%&,~!J~!J~%L~y<~!R,~~%Lu~~#GD~~#|)1#%}^%}2%+#.##%##%}&%##%'#%##&%#%#'%#&#%#&#'#%%#&#%##%#)%''%&%#%#'%#%%#%%}%%%#%#&(23#%%#&-%0%('1#(##%#'##+%'*.:1}#%#6-+(%'%%#%%%}#L'2351&('%}&/N'(0(/*-%(%%}#'+&T%7.2}#&%&#%#36/5##%&%%#&#%%#))2%%##%&&'0~!#*+&'%1~!%).'3q?&%'1~!.##%6(~!+%%%(Gw'rT~!E#<nA%#jZ~!H%(~!42##~!*31&~!G%U~#)5~#`3~!J~!Z~%]~%Y~%C~!q~!u~#kz~%#~!6'~!D~!U~!?~#T~!c%~!G#'~%7|~!G~!J~!G&~#pb~(Df}#%}*&}#%##%##%##&#-}&'#'&%#.++}%mI,#,@&(}*%}*'%&##&#%##%}&0}#.},U},%}+%}&%}#%##&}B%(}(%}+%)})%##%#&}&%##%&}<%}>%#%&}*%}(%}9%}/%})%}*%}*%}?&}&%}3%}&*#%})%#%#)}#&#-#+*%E%%'%'#%}#*V##&##I}#&&##%&%#&&Qf%%))w/0+&%#(#.%-''''++++7}>%4'',##1,#%#&%##&#'##&#*#9)%&%}#*}%,#+P(%A&%#'&##wSD',9E00#y#@}(+}&%&>~!#~!X}#*}(&&}(&}(,%}%&#+&}#&}I%#%}%)#(},'%#*}4%%#%}(''}#/##(##),%-##%%)#&}(.}&%#&}%%}*&#%},&&}&%}#%*'#%})%}D&}&%}-&}6&#&}-,%}#%})-(~+`~,=?~I9'9%~!,#%})%})%}@%}?%}(~!?~#<~#pP~#BG~#=1#%K+~#?#~%;)~#A~#mF1~#A'~'X%'~#lR~#N~'N~#r~#m#-~#i'?%#'%~#B%##%,%#~#_%#0%~#]732~,w~2+#:&#%&'0%&>%}#>##F+)#%&&#(+_}4&}-%}(&}@&}O7Fdf0@+/v4}&WU##&/0#&'('B#%}.%}'+#%}#%%&#&%#%##+#&#)#6#'#.},%}c%},%#%##%&#&%#&~#>'*-.%##%##%}#%%}%'~#)D1}#%*&~#_%%'(~#S2%'.}#~#=##*'*-%}&'%'##&&~'E%.#&~#M4}%%##&'%#~#O1##%&#'+~#<B%##%%'%+~#;#@%}#&%#&&%#(~#H1}'%'##&&~#?A}&'~#D#%32}'&&&&~#[}'(#%}'~#;C})&}%%#%~#=&%,3}%'(#%%~#^'#&&)#%'~#Y%-~#d-%'~#^%%&#&&&}#~#b~2t*&'~&(~&@~0%~e~3}%*''0})&}+~!9##-}#%-hD*)1fC#%/&/fB#40~!+#)*4~!+~!K'&:~!/*7~!.#~!H~!L':~%x&~!H#~!*~%1~!I#~!+A~#p'~!F~~#-#~,,(~.Z~!V~%;'B'mq-W~!N~%I%#&&#&}#%},%%}'%}+X#%}#&}(%}'%}<%}#%}%%'}'%}:~![)9@~%>~#UA%-%##&~!C%~!-.9:~!1~!-^2/:a~!y,D*J#-5)/4~%23,~#G~!L1~!0X3`~!2+~!!0-~&E~!W~!o,>Y&]~%cZx_&~#O*9#A#'#+I'%#)~!0B*-5A+-((F&*M#)(-7-5+'-3a5Vi~!Y~!?+[)%3),ERHm~!+:D,VG.+)?fB%%*(%)'(#&80%1'8`K8?`+'Z#&O&'H5#*9)A%%5&3))0%39+.*7#()&&*=4@**L)<'_&*+..;(#*+)./&0#3)%')-8(4ixD(&.}%,('aI:,)%,k2231T)I'#/-W7,/'Q#.'Y24+h')37</31&83##&0#),H(?'&?/1##%#&&#%''-%&&&#(&''&#.-'%#%%(,')*'&#&#'##%(%(#%('#&##%%%%('%#%#%%#%#&%##h>w+v<ayvyvcg.uuhKr}g/v|g>u9i[~>g5uI~=RvdwEg;v/g;uk!!TTSx]@RT!U!#!@VBRUU!'UTe-d0c`e&gSdicedFcrdTaqb.kYcAohdYd@a3e+d}dMdtd.aJ#bqcK`dle/e.e'dwdPdodddjbEb}ogd^ofdpduc6j?l%d{drdqc)d7bacOdQ%T#Y)X.sR[yH>6Vyv3[xwLu>vo'!*.[yBacahoj>6Rew3[xqdZa#!a&#^(X-[yG>6Vyu3[xvg3sEr|g.u/Ri9db0T#^(Xa)!-[y;>6Vylg4wKs{JwNZt3@3r=c4Z([xlg;wKt!cpq's@v7A'*a(a+!-a#[y<3Dt?3Dt'>6Vym3[xmg9rxsNJwLZt4~?r?db1T#`-!(Xa,!0[yS>6Vz%NuQs.g4wKtnJwNZtS@3r>c4Z([y%g;wKtrdga8!a(!#&T*Y-Xa#!a0<or[yc3Dtq>6Vz43[y3JwNZtf@3s!Ju}!%Dti:pm3c_%X#tjB5pkd6q!r]u?voC'*-a.a2!0a&a+[yI3DtI3Ds~3DtH>6Vyw3[xx;:s#~<5pKJwNZtE@3r~d`a)!a2T#a.(!+U.X1[yT3Dt`3Dtv>6Vz&3[y&g9rxwzcxstPu.<rAJwLZtT~?r@dZa%!a.&^*Za(/Reu[ya>6Vz23[y1g3sEr}wkg{NuQRg{ci(U#5@b`~,cg#U(2WnH5wugcRh7dX#T(Y,a'Ta!!a,[yZ<]mj>6Vz,3[y+Pv#5ReZKu+=,%!H}7ABwkaS?Rh:BcW(X#<]mrj:ubv/ARekdg%!(!a.*Ta(Y.X1!#sP>Rl*Dt6[y>>6Vyo3Wf*jOvuumvuRgRJuq*!:9<B@bX~3jVv&v@s@5Re[d/rQt{uAvo&a&a*)a2!,0Wf!3Dt0=Bs'>6Re}3[xy~<5s%JwJZt1~Gs)c;&!#2sJkNuXvzq7rxu,Re8dka4!a8(aEZ+a@Y.X1Xa)[yd=Bs(3DtP>6Vz53[y4cX#X&Re:avRe9~<5s&JwJZtQ~Gs*i^rzvdRg+Jv{%!2sbB@bX}kdga,!Za?&^*T1/!a'Dt+[y6>6Vyf3Wf%g/u;s4hGu6?Rh-JvZ,!c%#&RoX54Rivj7uyvf8RgTKvZB%*!2sGh<vu5Rgq<=C::9bb~#dZ#T&Ta6Y.X*Dt>[y93Wf)coZ(T,6VyifluvRgC@95@B@bX~/hFu34cC#T,k/unq8w8Q5RkUklwQuzunq8w8Q5Rk8d/rJu?v8w9)-&!a0a;a&aIWejg3sEr/h1s<DtDJvyZqY5aws3Jvy!&Wei~Hr1:au5@Bag>23E~5c:Z&bX};kKv?w&unuVu5Rjc;>bs)#~@:Rh.=ay<a]C;b`}Vd6s/t{uAvoaxa()!a,a7%-a#a2Dt,[yF2Wo[>6Vyt3[xuNuPRi&NuPwpi#RoWh?vf8Ri%Jv]!%Ri:KvxD!.'2WeAjZu`q9rxu,Re7woeAg-unLq(qA_/*2Wg_g3u5q^9:4E}/jTrxrzv=Wkkd~0UX#^^Xa-a1a5T&a=U1a'*aEa]!a*aPaA-adok[y54Rn>;:p3~Dp5g9rpsFNvZqjg3uJp4~<5p0Pw;5qlJwNZt*@3p1Pw:5p/Ou!5p2JvG'!6Vye=<qnJvh_[xhg3v,Rh3kOwOw-sDuev/Re^dha[a%!%!a+#Ta7)-5TaCaO!aka!a)sf[yb2>Rl!9ARiq5E}Qg=ucRkBE|oJrJ_@Wk~@Wk{JrJ_@Wk|@WkyJrJ_@Wk}@WkzJvO_[y2g-vMRmiKuYC!)&>Ri;>Ri<@3RkNc](X#@9Rk=g5vuRmhKvDB!+'=]meg3u4Rmgd)#Y'Vz3CARmfd`a+!%T'!+#Ta1Ta6TaM-sTDt9[yA9sYd'%Y#s[[xpj:ueunaXRgEjRq,v-vuqdd2'`#6Rev<32@5>:2<E}5xIo9a*X#Y(;5RePJvD_g>vyRgNj8w)v8<wggs:RgXiZt|vjx,hSq3ah!-(~@:Ro/Ou!5RhWj^v(pyw8unRhUdx-UY#^Ua.a3a70!)%UX1TaDa)'omRiRRhE[y:3Dsz=Br,>6Vyj3[xkg6ruwjcqsrPw;5r*Ku]D'Zt-@3r(~?r.i[vwv]dU1a--U#`a4(g/vsRhPOu!5RhLj:rmu9Wo!~@:wdh@g/vsRiTjXuvvNr}:RhBj^v(pyw8unRn]dz1UYa'a+^Y(!aETZalaRY.Ta?a4[yDJw1!#qLsW>6Vyrfzq-pLflpwRe|Js>%!Dt@3Dt&Jvy_[xs~HrnjMuwpsw'RecKu+D#'!t<~Grl~?rjg5u-x,gwp{ah!-(~@:Rg~Ou!5Rh'jXuvvNr}:Rh#cW#X/c;&!#2sLi[v7u7RgpJv)(!iLrxu,Re6j7v@s@5Se[e7d`aW!Za(a`T.a#!a3!&aDa-!9)Dt_=6s+3[x~~DR|h~DS6avhGun5RkZj3w)v-]mkKunB!&*]kb97R|i<ARk<c:Z(6Vy}Juh'!wziMRoS:F|vkLuauJv5vtvQRh1d='T+Y#VyO~DR|jcF#T'7R|g97R|kJv3'!ay<Rj,Jvh&!:ReXcsa6*a+#a#_aIRf9aLRf?c,Z&Rf5Rf7c.Z&Rf;Rf>cQ#%T'p-Rf8Rf=ct#%'(*!,p,Rf4p+Rf6Rf:Rf<d~'Ua%U*^UYa(!a,-!#a4YaTalaEX0a8a<Weo3Dt/3Dsx=Br93Wen~Dr;~<5p<JwNZt2@3p=Pw:5p;Ou!5r3c7&!#:p>3Ds}KvGB)_6Vyk2sM=<r7x'eovA(!hFu1ARf}cV#X&@r5j6rvwQa^Rf3c=Za'wkghJv__g;unRggA53B9=b^}%j6uduo5Jq;!(hIv%2Re`Ou4ARe_e%a#^^^Xa&!a*a2!&a6YaP!*ad!#a:aE/5Rn?[y@>6Vyp;:pE~DrY~<5pBJwNZt8@3pCh=rt3rWPw:5pAJup_[xoNuPpF9c!#'45pD5ARn)d8#X'X*3@rU72s]h>v<<sSjJpqvewOJq/(!hNw'5ReBk0s2u3w/w'5ReE5@Jq.!a+JQ!&WeU23d(#Y&RjG5]jBk!u7w&u0udARjEe#+^^^Ub#!a2/a`Z(agT1!a-a;|@TaG!aS[yV=Re~fow'RguNuPRe?bz#'>RoUWeL>:Cbb|?JwPZtVg6ruRmzJvD'!6Vz(g/vmRh~Jvy_[y(g9voRgyx*cy(#2>Ri2B9b]~9kIw9u7rluJu3Rg]dI#a%UY'@=p%CAx.gQZ&RhwwygtRm{x5g_Z'+ABqR9Woa=Bp&dV#^*Xa'!&@o{g4v]Rk;Jv{!%Rk[wkkiA5RkiwwfUB=x,fUuqC&*!>RfTg8v0RfV~ARfSd;rJsAuAv9wR'ae+/aO!a@aza/a#[yQ@Wg!2Wemg3sEr0JvB_g>uvReWg2v+Re=KupB_+[y!2AbY~-~Hr2AJwD!(h<~El>h<~El?Kun@+_:9b`}Kg-v/Ri3g;vtwyk_9]k_d=&T#*U.6qh@Ab`|K9:H|CJv[!&3Dtex'fDwC%!Rf[9WlMd[(^X,!a%Z06Vz!@WgBg=v~Rgvg,QRe@awd,#Y+jTv|Q~EfWj]uNr|~FRfXdy#Y&^Ua%!aO.!(a)Ua;=!a@aKap!a-,a!Ta]a[rSa]p?[y82sK=Bq~;:p:~<5p8Pw:5p7d'#Y'Wf(;RnRi[u4w&RgJJvG'!6Vyh=<r#ijuuv/sIKuYD'ZtG@3p9~Gr&d2#`(g<vtRgFj`u5w&rqpxRf2CJuY!+:wfnTOu!5Rg}jNs1ucv&RfwJvA!&3@q|BDcC#T,k/unq8w8Q5RkTklwQuzunq8w8Q5Rk9dga#!a'!a=#a0!:+Tb*b@aO.a4!aba8aFJv^}?!VyR~Dr<g;u%Rn.~<5p[x'e`wNZtR@3p]Pw:5pZhNvjBp.woe_g5u-r4JwF!%DtO3:ooc7&!#:p^3DtpLuGw(!+%)Dtk6Vz#2sd=<r8d'#Y([y#<x3gJt`w@!)%}MRiowzikRij=]ilxAf3,U(#B2Rf#g0v-Rm[ck{`U#]giKv3>)!&6Ri154s,KuGB_%@r68r:dJ|t`#X(9<E|u2@H|rx3gJu?w'!+'1Nu7Reg4=H~+9<wxgY95Rm]xLggZ-`(X}U2:Ri4h<uOawRmsJv__5@bb{jbV~3dka#a'a]!,#a+U=a>b6a3b%!/aKa/)!arwve^VyJ;:pR~DpTg3uJpS~<5pOPw;5qmPw:5pNOu!5pQJvG'!6Vyx=<qoJvA!{~Jup!%@qk7Rn/KvyD!}''[xz;>wkh'?Rh,x8gyt`w5D!&),(SgyccRgztJ@3pPB5p#d'(Y#<]mmifubw&RgoJvE&!82s^JvF&!8Rf,ADb]~;x=h'rNu]vK!,%'*0RnORh)4Rh*AqQg-vaRnNg;wHwkh'ba~4cE#Ta*x3gctyw@'!+%RnFRnD<4Rn@hFvK5RnCxWg[#`&a0Ua()`1Rm75Rg[c]%X#qi8Rg^NvdRj>BwzgZauwji7Rm6A4wgg]d1#&(*,.0a#Rm;Rm<Rm=Rm>Rm?Rm@RmARmBe%#^^^Xaea?aC/b+(,!a+a#!a/!>a&Ta<aKbD!2wphBRnk[yPw}hE|.=Br-3Dtm>6Vy~g6urRf.x,hPrNav!%'RnqRo%Ro#Nu;q[Pw;5r+JwNZtM@3r)d'#Y'Weh;xChL#`&RnmRnoKu}>%(!Rne~Bs-;2wjcussJv+'!aYSO}6@B<5?ba~8LrNvj!.%*ROwungw~ng~:9;Ri^>wtnig;wHRnixDh@|(UZ.x1h@|)!#:2<H|*xHn]#-UX'3Ro)z=iT}6ARns=Bwsn_wpnaRncw]aR(#UXa&Ua*a/=]iPd'#Y&Ro'WnXf{QRm2hNvj]nZd`'T~&1`{|`#9b]{}c:'!#Wl{>@=be}]?cl{{U#:5Abb}Jds#^YaF!a*b4a#a3aPa>&Tb!bH!*a_!Eau?/a&RjY<]gj>6Vz*;:pe~DrZg,QRj1JwNZtX@wihspcJvZ&!VyX9WmOJu|!|N2WmHJvh&!]ht~Bpbcn&T(!#RmQ<s7Nu;padH#X'`+WmJ@>RmKCARhnKup=!)&Wf+:RhqNuPpf9c!#'45pd5AwghpARn(Ls@w!%,)!RmP@Wfe<E|IJva!&WmNg8vsRmLd`*.`#Y'Xa!axRn*]hrA8Rhug5s@rXg8u!RmMd8#X'X*3@rV72smdI*#UY&RmICARho~GsgxVgd)Ta'U-Y&Xa!T#RnEWnA@Wffg1uDRi0hFvK5RnBxGnG&#`%owp)@wsf+bX}Ze-*1!a*^^^Ua|!#a.aq&Ya2!a>.a6!a:aO`aJDtL[y`@Wg#>6Vz12@wzoYRoZNuPRi!NuPRhzg=ucRi,@=b`{Yg=ucRi-ACJvB!&Sh[ebSh]ebi`wUuFRm4Jw2_[y0JvB!.<Ju(!&SoG}6Shd}6<Ju(!&SoH}6She}6Kur@._g5vHRieJvx!{L2G{Kx6gd'T#?Rh82Wi5cZ#X(g1w)Rm5dW-Y(Ta#!a)!#aYa=wnfE=su2>>bU{0j9udv:<svj8uQv-7RgHdE%#^'sq9sp=>Bb_{TJv`!&g/r|snj6v(us5d,#Y(56H}[978H}]Jw5!&g1rushJvB!+j;v{u5?zDhd}6}bj;v{u5?zDhe}6}ce*#`(^^^a[aea!=!a6a*aoXb1a.!aAbL!b>,b'aL!aV@Wf|2Wlg3[y/JwNZt^@3piPw:5pgJunZou3@rsJva&!Vy_g<v~Rm#JvG'!6Vz0=<r{Ju{%!:pj@WfsiXuJu3Rm:JvZ&!WfA~Bph@c4Z&Dtwax5rubx(#:awRk1@d,#Y&RfjRfid1#,Y(@Wfp2Wlrg5s@ryKu[@!,'=]ig9wlk?Rk>g5u-rqJvy'!@9RkQcH(T#=>Ri~@<wkj(Wj(KuZB*!&<7rw@9RkRcH(T#=>Ri}@<wkj)Wj)dg(Ta2Xa9X#`-!a*CARhg@@=I}d9x;c~#X%so=<sj>2@@=aybb}XjWv0Q~EfEj3vLv;<d,#Y(56H}`978H}_dgaPaFa'a/!#a3Y0a_a;a|!1(a7-[yE3[xt;:pJNvZrrg3uJrvJwNZt=@3pIh=rt3rxPw:5pGOu!5rpJvG'!6Vys=<rz@c4Z&Dt(ax5rtJvZ!&~BpH@wsfNg-vaRlNci*U#=<wei<F}a5@Jq.!a*JQ!%@qZ23d(#Y&RjH5]jCk!u7w&u0udARjFd/prq=tyvpaEa(a:.!a1aZ(@@=I}:9wpd%=<sX55w_h}@@=I{t=ay<aU@@=I}T=ay<2@@=I})?C9:9au@9Cb]}DP~=x-fAZ(2Wl1=ay<aU@@=I}>5@d##Y+jTv|vV~EfFj]uNpn~FRfGdgaK!Z2&!a8a-Tb({E!acTbM*!a(DtY[yYd'%Y#sl[y*hHvh>Re5x2c{Z}.j4uCvcawRiMd+#X+_x&d!},<5RkX;2Hzw@x,gavfB-!{CcF&T#Roe;RodwWbBg5urRgaKvHC*_6Vz+<4opieuew&Rmq@d]&Y)X,T#X0Rh}<BqP=4qS9:ReMg/ujReNJw0!/<Jui%!bd{kawwnemRelAxUa?a3#*.&UX(Ya+a/RhvRnQ<o}9Wmtd-#Y&RgSRmw9;Rmxay=Rmyg-vaRmuxEhSrNu,v-voC!%(aR.a(a7+1Ro1>Ro5CE{A9b]{@;5x#eO{:g;urRi+KrNA!%(Ro3>Ro79;Ri_Ku@>{;&!x%gX|{KunA_+g5QRj/g3u5Rj#g>uERj%wio/xRhS&!,!#^1U}wba{8>>@=be}qC@:D5ba{7Ku+A&!}x?ba}t>>@=be}se(aA^^^Uat!b0#{pa+awUazbGa#aLb9bgaWac'a5TbS=Br!d1#`%scp_Jvl!#rT>Re0JvX&!VyN=H{Fcm#U&:pY=ReaJv2&!]h0=]nUJvG'!6Vy|=<r%JrM_=]h2@Wlud'#)U'Wf'b]{i=]h/Jvh!&~BpWg=v]RnMx+ny#'Nu;pVwjnu=]nwxJnx,T#`&Reqwjnt=]nvieu9vrRjLLuYwP(#+!th@wih5pX~Gr'g5v/Rh4KunA'!-CARnP@wwiN:Rm_9x'cvw>!|l=<saKvAA!0&3@q}>w^e1bp#&Re2Re3BDx7gH#T|f5H|eKuZ>!%(:qNAH{]Jv6!+3B2B9=b^{X<5<B92:E{ZLvhwA(a;a%!igQuyRmad+#Y}m@3Rh5d8#X'X*:AqUAHzmaxwbh<aXRnVcF}RT#Nw&cj#U(BWnug/vsRntdka)(a3+.Zb7aYYan1!bVa@Xa}[y^@b[{G=H{+hFu73Rj&Pv#5ReQcK%T#sig1v{Rj'Ku+D#'!t]~Grm~?rkKuMB!01d5#`'Vy.ta3Dtu~Hroc8#'{^45s85AwZbP&!#Rn!wghxWn#KvEA!)&2RlA2RlBx:h|#(T,=]j09Wobz>x]z/@awRoTd+#Y(az]hFhCrm4d,#Y+jTv|Q~EfMj]uNr|~FRfOdCa!Xa9_X#@<plJvf!%b`{(9;Rgwc;.!#2x7cw#T|UDb]|T5Ju={(!=@E{&Jv)&!Ab`{'awJvf!~*>>@=be{#KuY>!+&4Ezyi[ugv&RjIdea+T)#UXa&T-T&a!Rh9auRmW=]kLg5vuRn+g3u4Rn-Ow6ARn,hHus5xNk?#UX(U~)/g8v0RkD~AwkkF?Ri.OuNBwkkA?Ri/d|a2`a*^UYa.!aBTZaTa'Xa;!(!2!-a#b2[yC>6Vyq3[xr2Wi?g1rusVh%s?DtF~<5rbJs;%!DtBfswKtCj[uvuSsEu3RgVx3o:u+wN'*Zt;@3rd~Grh~?rfg8w)Lq)qE&-a%!>bI|`jWv0vV~EfCjTv|vV~Ef@j]uNpn~FRfBcK#T']gWNu7x,k7q4ai(0!hHv8<RhmkMu9vrsBuev/RhlCJvB!,g<v{wchh~@:Rhji[vrv{wchi~@:RhkdS&a5UY#Ta!RgPwwiI5BwciI~@:Rh`x'iJvj'!5]iJPu8Bwch]~@:Rhach)U#h3rp]gLh@t|Ax,hTq3ah!-(~@:Ro0Ou!5RhXj^v(pyw8unRhVd|)`,^UYas!a?/a2Z'a^Ta{Tb7Ta(a#!a,Wf&9sZ3DtAadamov=Bqt3[xig8vsRm~>waiL2b`{QJv*_Ouv2qgj<v]v2BqfdR'X*X#Y-@3qr~Gqv~?p6hHv-]glPup5Lq+q?_%*b_{qF{n9b^{rOu4ARhpKvCD!+&~Bqp:5Dbb}nwoiKl&unuTuBv]v+ueunaXRf0=Jvh!0nKufu8v1w&w7q%w&uHrz:Rgnj5w,uxDJq/(!hNw'5ReCk0s2u3w/w'5ReFd>Za&!*UaA=<wkgsRnSJv^!%Refifw3vyRgOKu_B'!,<]gkiiu:w&Rh<=C@a^<B57@2F{[<B5@aW:=3away9A5aW=<B=C@a^<B57@2F{Ie-#`(^^^bCara.b8aza6!/bZ,!adTbnTbOb+aFaS!aAT9@Wf~2Wli3Dtl2@d,#Y&RfnRfmJwJZtN~GqyJva&!VyMg<v~Rm%iXuJu3Rm9Jv[_=]ih9wlkDRkCd1#`(@Wg>2Wls3cH#T(@<Rj*=>Ri|b~'#23s9h<~El.d'#Y&Dtxi^rzvdRl#d*#U%(o|B2s`hJwSaxRmDKv4B&!1:Rmdd5#`'Vx}to~Hq{x'f1v3(!BA5ba|bJv_&!Wfug1v]ReIdO+U/Y#&G}-8wze=Rh{g1v]ReHg/uQRf/by#)ibQwERl/cH#T(@<Rj+=>Ri{cNu+vlax-!(#a0qa9<Rii2;;bU{H;x<i=&X#Rk`<4wwi=C9H~8xAI(Y#<azRi@45wXI<B9;5bb~7dL(X#Xa(+!aL6Vy{g5QqOau:5au2@ay547EzbxOcU(UX-T#Ta#:Cbb|A?wjh/b_|SOw6ARgtihr}u7Rhy<d1#T)X1@@=I|~=ay<2@@=aybb}Sj3vLv;<d,#Y(56H}A978H}@dGpvs@uAu`vcw9*!aFa+ai%(b!aXa8.a?a[ozWey=sU2@G}Nch&U#Rf_WexKu+D#'!t:~Gr`~?r^j]uNr|~FRg*j^psurwJt|RmcKv)@&!)7Rkv~Br[@wxfO:Rl3co#U'6Rezj_q#vIuavjRltwzeyh@vr5JqD0!>aY?C9:9au@9Cb]}9cl#U*5;5<H||jbuus1ucv&Rfvg1v~d/pppzqFr^a--a~!aMat1(hFv;Wiz@@=Izoj5uuv-7Rix~Cw`fk2WlVcZ#X,k)u3vWs@u2]ktg;wEx'fBq(_2Wg/jTv|vV~EfoJv]!15x'hzqG!(P~EfU~CRl_j6v(us5x4i-#T(2WmZ?C2F|d>Kq<aj1!*jTqIsBv=Wl`~Cw`fi2WlWj`v0u*~>RlR=c>Z,k#u3vWs@u2]kr<c1Z+jTqIsBv=Wla~Cw`fm2WlXdmb3!a{(arZa`bkTa%TbQTa-a9+c'!aM!/[yL=Bqug.w'RifhFvyDRj.g>vgwyk^9]k^Jv3_@WfbAARkhJw2_[x|JvB_wkoIRoKwkoJRoLd'(Y#<]gm=<9<H|yd'%_X#skDtb3awwqkgNulRkgdB#^',9:p'hJwSaxRmEBwVb8@4=H|qLu+w50&!)@3qs~?pU>Awwn;;Rn=c:Z'ARn<=<qwKvC@!/&~BqqJv6!&]eVb^z^xRge'/a%+^`#Sge}6<4Rn3=]n0Pw2>Rn8Jw0!&>Rn:>Rn6cY#a7+!a&=<wkaNw~h3z_c5Z{=wjh#=]nLKv^D!&)Vyz=bW|swYb<WetcG#T(2wxa@qVx@gD#Y&b^|V5JwG&!5bb|pg/w&RgD@x=kHs=uAvn!a%%/'+RmSRh694Ro`g-vaRmRhHv-]mlxCcS#`&ba~.5cD#Ta)P~=d,#Y(56H{>978H{Dd_#{2^Y%_+qbbb{6g3sERhsbU{?dfa.,`a(Xa<!aiX#(55RiG54RiHcI#T'WiU3RiVNvdwtfcRlKNvdd,#Y&RlHRlExQgf.1*^T'X#Sgf}6Wn4=]hfPrk>Rn7Jw0!&>Rn5>Rn9Lunw?&a2!,5<oq@@wqfdRlJj5Q~=d,#Y(~ARfcOuN]fdDKw;ay(}i!547E}j?cI#T(@5bV}iCbV}hdv(^^Tb?a40,b##Tbo!a*bR!a<b|a/!aKai!aU[yK=]o^g:v>ReGJwPZtK<7Rh+h<~El,Pv#5ReR@awwxjCg,ulRjDJv6&!]j!z?aQeeg>w=Sh<eeJw;!&axEzOg,Qosc!#*:wkeJ]eJ>x'h-u(!%Ro.w~h.zPdNZ(X,Ya![x{;9ReY;wkgxRiF:x?ap#Y&RmUg<s2Rkod]+UY0TZ'!a&A9sw<=bczLNvuw{gqzNhJwSaxRmCKuLay!#&s_Rf-55b^{uJvZa!!c%#(55Ri654wmiu5RiuawLu,vp!+}^%b_}Y9;wkgxba}o>A9:=b^}zKuh=a''!3awRk3c*'!#aHRk6c+Z&Rk5Rk4Jv)&!awRjSawd9*`#0?C2@EzMj8u<uJ5RmbjQrquJu3x,k>uq@_+=ayb^|W~ARkEOuN]k@7dhzV^X/X&a-#zRzSb`zXcJzTT#2WkVKvDBzW!%FzY9;5bbzWjQrquJu3Jw3%!b`zU=ayb^zQd:#X(T-a!6Vyywxh}=b]{Jg=u1RiAdGp~qHtzv!w(wA+a+a;<!aJaYai'anasb(=azRmV:Cbb{MLq2vb!%')RjuRjrRjtRjqx3jnqCw3!%')Rk(Rk+Rk&Rk)Lq2vb!%')Rj{RjxRjzRjwLq2vb!%')RjsRjpRjfRjex3jcqCw3!%')Rk'Rk*RjkRjl9<CbbzfOu4ARhxLq2vb!%')RjyRjvRjhRjgx=joq*uKvb!%')+-Rk.Rk%Rj~Rk-Rk#Rj}x=jdq*uKvb!%')+-Rk,Rk!Rj|RjmRjjRjidAq&qKs@uAv8Aa.'*-a@a&0!aM@a5[y73Dsy3Ds|3Dt):wxgI2sHJwJZt.~Gqxwsf0ikrzt}Rl0Jvy_[xj~HqzKv_A|D!&WfP8axRoVcf,U#k(v]v+ueunaXRf1Ju}'!g8u#Ri=jQw!sCunLprq>!,')~<5qeGzq9F{W=c##%s5au:5aU3CBE|;d4#X(D!a&6Vygx(b;#(=]ed?C2F{N<capoq2r[a&!aPa9,'Pw;5s:@@=I|,55w_h|@@=IzcP~=x'fCqB_2Wl2>aU@@=I|1OuNBc1Z+jTqIsBv=Wlc~Cw`fl2WlZ~AcTa%!Z+jTqIsBv=Wlb~Cw`fh2WlYk+uNqJsBv=WlSg,u3dca3#UXaMYa)TaB-=cM|7T#<bI}l5@B932:aV2G{BOuNBJq:|M!5Ezt=<B=C@a^<B57@2F{v>cB{/T#=ay<bI{3Jv6!a.6BKq0ah&+!5E}HP~Ef{978BaU@@=Iza<7d#.Y#978BaU@@=IzH~AJq0!(@@=IzG978BaU@@=IzFe,aU*Y&^^^bvJb,b:bFad!a,c2Ta>aL.bo6!a#CbTa'T#Re{2Wlh2@G{yg6t~Ro_NvdRfticuRQRllJv3&!x&c|zs@Jw3!%RflwpfkRlpKuL;%(!Re<@G|C2GzdhIvuBwgjAg-u0RjAKQB%!(GzZ@G|5NuuRl7d='T+Y#Vy[g<v~Rm!==G|>JvA!)@wma=]m1ifuaw&RmnLs@vT'!|/+[y,g:v>ReTJw1!#qX=x!eC{bLu+wT&)ZtZauq_~Graci&U#F|89:r_Lupvq!.)&2RlG8RfaC=x!eF{_h?rpWlmd&'!#X|&]k::xJey#`'T|+<E|&2@H|%dE#(^,g;u.RiEg6vjRiC9xCkA{O|zY#g=ucRmXKs0@!&*@G|m@awRknJuh!,3d(}gY}eJvj!%Rm):Jw3!%Rm+Rm-Ls0w(&!a(a#@b[|6cZ#X'7RkxWgAOu4ARn'dH'U#Y*Vz-Wm'CARm}d]*#a%^a*T'aK!a<9bV{PC=p*Jw4!&SgxcbB5r]idw(wBRmF7xFkt#&`(Rm/Rm8E|!JuY_9:Rl5=wrgr2:bbxd@xXfB(a*#T+!.X0X1Ta/a'T&RlDRfL>RlyARl9b[z[>RfZ:RlL:RfRwlg/ARl;9;RlxKv,A/!%7s69<74=BA5ba{-8Bde#`a<XaKYa1,a'P~=wxfB2bZ}}?C972@@=I}r8@55B9;5bb}G978B2@@=aybb}3j3vLv;<Jw3&!>Rfk=ayb^}4~Ad1#`*@@=aybb{w2@>==<bbz]dx+UY#^UaF!a9!bB'Ya1.!ajXa#%olRhD[y=3Dt#Ov5BrHKuMB%!(Rf^Wep~HrJwkiQjKr|~FRg)Ku+D#'!t5~GrF~?rDdV)UY,Z/_7RkuG{<~BrBg,rlsO:235B@bX}|d?a1!#`(6Vyn5@d##Y+jTv|vV~EfIj]uNpn~FRfH7Lq2vb1!a9-978BaU@@=Iz9978BbU}#~AJq0!(@@=Iz8978BaU@@=Iz7~AJQ|}!978BbU}!JvkaK!AdUa21-U#`a+(g/vsRn~Ou!5RPj:rmu9WhOjXuvvNr}:RhAj^v(pyw8unRn[kPr}p|u7vwv]RiSBd;pppzq@qHQa?(b.!a.a`@.|xa(hFv;Wiyj5uuv-7Riw~Cw`fg2WlU978BbU|wOuNBJqG!(P~EfD~CRlQcZ#X,k)u3vWs@u2]ksg;wEx'f@q1_2Wg.j]uNpn~FRfqJv]!15x'h{qG!(@@=IzK~CRl^j6v(us5x4i,#T(2WmY?C2F{1>Kq<aj1!*jTqIsBv=Wld~Cw`fj2Wl[j`v0u*~>RlT=c>Z,k#u3vWs@u2]kq<c1Z+jTqIsBv=Wle~Cw`fn2Wl]dn1#c(a(b^a2!b/bAT(bj!aDa7bu,a_a{c0!2T0g:v>ReD2@G{42@G{5~DpM~<5rc=Bx6i>{RT#RnI@zCx]y]z:2Jv[!zr5Awyk]9]k]dD(Y+X#6Vz.g=wKtgwhaCwgmTWj2Lu,w%_+/[y-B;b^xeg3u3Rj-2@bX{*KrJ<!+'@Wg(g?QRlC@Jv`!%b[zIwsfII}8JQ_@w|kW|=Jv(%!AqcOuNBJvEzh!bYzjLs@wP#(0!oy@>RkdJwMZtc3Dtd@BcG#T'9bWxg2@2Fznd*#Y+;2x'c}w<zizixNgwa#Z'U+!/!a'!a+w~g~z6wcn{Rn}wcnzRn|5Rh%=]nJg5vuRmvNvdRlvcprJu}w*az*a#!%.a.'Bot9qT]kj@Wg'ay2Gzv@Jv`!%b[zEwsfHI}1;ck#Ux`<Cbbx_Lu+w!a&0*!wko*wwo,So,}6Juqxf!E}PigQuyRm`d3(`#8>Rn%:A5B;bZ~%KvhCa!a2!x>k7#Uxb@b{#xaRk7Jw0!)>wwhlShl}6>wwhmShm}6CJvB!.x'hhvj{!!5Bwkhhbaz}x'hivjz~!5Bwkhibaz|xEhTrNu,v-vpD!a%&/)a3a.,%Ro2t[CE{)@3re9b]{%wjo09:rgc:Z&Ro6=<riifuaw&RmoKrNA!%(Ro4>Ro89;Ri`dSaL'UYzxZb)7Rka3xRhT&!,!#^1U}vbaz{>>@=be}yC@:D5bazzKu+A&!}{?ba}y>>@=be}wxBh[t`u~vJvr!%a!a()a,a0a4RoC=]o;Ju(!%RoGRhdwjh`=]oAg>w#Ro?g5vuRo=NvdRl|Ku]C.!&;RoEJvB!%RoORoMBx'h[v+_?w~h`}~5?w~hd~!xKh]oiptu-utv.vp!#%&a30a@a'a+(a/aOp(o~p!RoDJu(!%RoHRhewjha=]oBNvdRl}g>w#Ro@g5vuRo>c[#X']o<CauRoRAd-#Y':RkpauRoQKu]C.!&;RoFJvB!%RoNRoPBx'h]v+_?w~ha}t5?w~he}ue!/UbhYacXaW^Tc&a;b:a-c/#b&aja1(!cL+!bKbt!bmcRc9aIc?8[yW3Dtt94Rg`Jv}!&SiRMzBhEebShEMNuPRe>x7gL#TzuwjirRipc<Z&>on;>z=h-MSh.Mwqczx'a7vj&!>Re4@=ResJt__NuPRi*NuPRi)j]uNr|~FRfzKrJ>_+@Wfy@Wf]2WocKrJ<!+'@Wg%g/QRl@@Jv`!&awRl<wsfFIzgLu(w*!.*&ShBMwvhIRhI9;RhNx1hK'!#Sn]Mx1hK~0!#:2<H~7cNu+w7D*'1ZtW>Rn1~?rOc:Z&Rn2=<rQ<7wjh&=BSnLMc]#X(6Vz)w[b=a!U#9wzgMc3#&(RgMRitRis<x,gKt`ax!&+SioM=BSilMc3#&(RgKRinRimKurB,!&SiQMzBhDebShDM6BJQ!(P~Efx978B2@@=I}WLrJw!!,a*&@G}O@9wkibRid@@x'fKwC!&SlDMSfLMjUv~Q~EfKKv3@a+!(hFv-]mpx/hYZ(C5RiWz<o/MwkhY?So/M@x,gbvfB*&!SgEM:SoeeehFu3:Rgbda(,^TZa)X/7Sg[eb:2RgI~BrMC@wgkc:wwkcRerx3h(uUvK!&*,SnOM4Sh*MArRg;wHRh(x=h;rJvPwI!a4',a'0@Wg&=BSh/Mg>w=Rh=g3w*wwgGRgGcW(X#;Sg}M2Gzk@Jv`!&awRl=wsfGIz`dKZ*T'Y-:RhR7RhQg5u-p`j6v(us5d,#Y+~Awkia?RicOuNBwkibba}Ld6p~tyu_vbAa'a+!a/'a3aEa8a!>Sh,ebJv{!&Sh@ebSaReb9;SgwebNuPRi(NvdRl)NuPRi'hHu^<Rm^Jvv_@Wl(g;u1Si/ebKu'B&!*Sh?eb@Wl'z@aPeb95Si.ebcpputyvjB)!,&a+0a%ShAMWeK@G}C@WfJ9;RhMwvhH9w{ia}ix,hJvRA1(!zAn[MRhHx1hJ~*!#hFv(BSn[MBJQ!(@@=I~'978B2@@=I}2db.Ua<'X}+T#a0XaG2G}E;wkg|wuh!Rh!x,hZu,@)!&So0MVy)C5RiXACJvB!&5RiY5RiZg8w)cG}*T#2@bU}=KsA>(!a.3wkhZba~(x,h^u(A!&(SoCMRhb5Bz=h[eb?w~hb~6x,h_u(A!&(SoDMRhc5Bz=h]eb?w~hc~6e)aA1T#T,^^^c-bMb&blcPaP(a/!0!bA=b5c@a(!bfbrc#2afwmhARnjwchORnp2Wlf3DtsNvdRl-2@wpa<]m0bx(#:awRk2@Jw3!%RfhwpfgRlnKQB%!(G{V@G|'NuuRl6d='T+Y#VyUg<v~Rl~==G|<Jv+'!aYShC}6@B<5?ba~8@Jw3'!g2QRljhLrpWlOd+#Y'g.w'rIg>w*wgj@g-u0Rj@Lu+wT&)ZtUauq]~GrGci&U#F|39:rELrNvj!.%*RhCwunfw~nf~:9;Ri]>wtnhg;wHRnhx3hDs@v~!/+'@Wfr@9RkSNu&Rlo=@<5GzoKs0@_+@Wl+@awRkmJuh!-3d(}pY#qWJvj!%Rm(:Jw3!%Rm,Rm*de&!1U-U#`)Re;@G|.@9Ri82@wjfvRlq=@<5GzpLvOvr!).&2RlF8Rf`C=x!eE{.Jw3_g2QRlkhLrpWlPde(!#U{s,UXa*Ta'[y'g:v>ReS;x0PZ&RnlRnn~HrKJw1}f!=x!eB|2w]aP(#Xa&a*Ta.Ua2a7=]iOd'#Y&Ro&WnWg;u.RiDg6vjRiBNvdRlzhNvj]nYJuW_2Wm3x)kFze{9d])!a.!,Y01!#&aC!a3RndC=ox~BrC@2b^{pg,rlse7x'ksuq!%Rm.E{xidw(wBRmGx9o+)X#wwo-So-}69:Rl4@xSf@a#XZ'X)X,Ta(/ARl8b[xc>RfY:RlI:RfQwlg.ARl:9;Rlwdn'#^XafaQa1X1TaHTa)@b[{zcZ#X'7RkwWg@Ou4ARn&x)kG#{,g7u/RkGdH'U#Y*Vz'Wm&CARm|bx#(A]gUbUzJj9Q~=d,#Y(56H}l978H{U7d,0#U*2>ABb_xZ978BbU{e~AJQ{g!978BbU{hxMh?ad{oUYZ.x1h?{l!#:2<H{mx3n[t{vl!,&a%3Ro(z=iS}6ARnr=Bwsn^wvn`Rnbd`*T}B0!#^X'BG{c9b]{a>>@=be}F?JvS!&BG{d7BG}(Bde#`a1X,Ya@!a'P~=wxf@2bZ}I56B2@@=aybb}08@55B9;5bb}<j3vLv;<Jw3&!>Rfg=ayb^}&OuNBKuLA!)a!P~=x#fD{f2@>==<bbzl?C972@@=Ix^d6rSu,v7w*C(0a)a6#B+a%!sQ[y?3Dt%3[xn~<5rLOu!5p@Ku+D#'!t7~GrP~?rNKvlaya7'!h+v-5qMg=t|cd,U#5AAaa5Abb{S@52B5@a[@52B5Gx[iXueu;d<#`a(!/549C;ag>23ExY5@Dah89b^~689Jv)!~2b[~1Lv'w(%*!a#bX|aPrmawRe]keu7uhv-q6rxu,q`xTo]/a5aU!bNaDXbi!b-!ao!b<bwA!#5@B932:aV2G|:d-)Y#hJrL>RhG<7@C5<H|_=Cau:5aj5@B932:bJ|ng>vIbs)#?C2F|9jPv0w.vISh-MKvUaz(.!9ABbb|[5;5<H|Eg>unwfh;9:4E|YjQsBt|vjx'hYq3!(?C2F|J:2<BaY?C2F|GOu!5x,g|p{ah!-(?C2F|c9:4E|OjXuvvNr}:Rh&i[w*t|cd+U#jJvsu)vsSn~Mkfrmu9p}u7vwv]So!McW#Xa!ax5@A5aY:5;5<H|>kJv~vYrquJu3x4ib#T)2@SmZM?C2F|Bj:rmu9@xPhI(a*a#U#`a3-5Abb|L~@:RhK9:4E|0@52B5G|#C::aY?C2F|-:2<BaY?C2F|.5Jvk!a)javYrquJu3x4ia#T)2@SmYM?C2F|HAxPhH(!a#U#`a*-5Abb|4~@:RhJ9:4E|R@52B5G|F:2<BaY?C2F|Sc^#Xa2j=Qq5CJvB!-g<v{z;hhM?C2F|Zi[vrv{z;hiM?C2F|XKsA>!a)-g<v{z;h[eb?C2F|]i[vrv{z;h]eb?C2F|^iZu.vix,hZq3ah!.(?C2F|QOu!5ShXM:2<BaY?C2F|P",13494,2713,49,25,61),Eu=new Uint16Array([512,26465,29036,7,0,2,4,116,24638,116,24636,8693,29807,24610,621,1,0,0,3,112,24614,111,115,24615]),Du;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.FLAG13=8192]=`FLAG13`,e[e.BRANCH_LENGTH=8064]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`,e[e.VALUE_MASK=8191]=`VALUE_MASK`})(Du||={});var Ou;(function(e){e[e.AMP=38]=`AMP`,e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_X=120]=`LOWER_X`})(Ou||={});var ku=32;function Au(e){return e-Ou.ZERO>>>0<=9}function ju(e){return(e|ku)-Ou.LOWER_A>>>0<=5}function Mu(e){return(e|ku)-Ou.LOWER_A>>>0<=25}function Nu(e){return e===Ou.EQUALS||Mu(e)||Au(e)}var Pu;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(Pu||={});var Fu;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(Fu||={});var Iu=class{decodeTree;emitCodePoint;errors;state=Pu.EntityStart;consumed=1;result=0;treeIndex=0;excess=1;decodeMode=Fu.Strict;runConsumed=0;constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n}startEntity(e){this.decodeMode=e,this.state=Pu.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(e,t){switch(this.state){case Pu.EntityStart:return e.charCodeAt(t)===Ou.NUM?(this.state=Pu.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Pu.NamedEntity,this.stateNamedEntity(e,t));case Pu.NumericStart:return this.stateNumericStart(e,t);case Pu.NumericDecimal:return this.stateNumericDecimal(e,t);case Pu.NumericHex:return this.stateNumericHex(e,t);default:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|ku)===Ou.LOWER_X?(this.state=Pu.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Pu.NumericDecimal,this.stateNumericDecimal(e,t))}stateNumericHex(e,t){let n=e.length,{result:r}=this,{consumed:i}=this;for(;t<n;){let n=e.charCodeAt(t);if(Au(n)||ju(n)){let e=n<=Ou.NINE?n-Ou.ZERO:(n|ku)-Ou.LOWER_A+10;r=r*16+e,i+=1,t+=1}else return this.result=r,this.consumed=i,this.emitNumericEntity(n,3)}return this.result=r,this.consumed=i,-1}stateNumericDecimal(e,t){let n=e.length,{result:r}=this,{consumed:i}=this;for(;t<n;){let n=e.charCodeAt(t)-Ou.ZERO;if(n>>>0>9)return this.result=r,this.consumed=i,this.emitNumericEntity(n+Ou.ZERO,2);r=r*10+n,i+=1,t+=1}return this.result=r,this.consumed=i,-1}emitNumericEntity(e,t){if(this.consumed<=t)return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Ou.SEMI)this.consumed+=1;else if(this.decodeMode===Fu.Strict)return 0;return this.emitCodePoint((this.decodeTree===Eu?Su:xu)(this.result),this.consumed),this.errors&&(e!==Ou.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}flushAndEmitLegacyOrReject(e,t,n,r){return this.consumed=e,this.excess=t,this.result===0||this.decodeMode===Fu.Attribute&&(r===0||t>1||Nu(n))?0:this.emitNotTerminatedNamedEntity()}stateNamedEntity(e,t){let{decodeTree:n}=this,r=e.length,i=this.decodeMode===Fu.Strict,{treeIndex:a}=this,{excess:o}=this,{consumed:s}=this,c=n[a];for(;t<r;){for(;(c&(Du.VALUE_LENGTH|Du.FLAG13))===0&&(c&Du.JUMP_TABLE)!==0;){let i=e.charCodeAt(t),l=c&Du.JUMP_TABLE,u=(c&Du.BRANCH_LENGTH)>>7;if(u===0){if(i!==l)return this.flushAndEmitLegacyOrReject(s,o,i,0);a+=1}else{let e=i-l;if(e>>>0>=u)return this.flushAndEmitLegacyOrReject(s,o,i,0);let t=n[a+1+e];if(t===0)return this.flushAndEmitLegacyOrReject(s,o,i,0);a=a+u+t&65535}if(c=n[a],t+=1,o+=1,t>=r)break}if(t>=r)break;if((c&(Du.VALUE_LENGTH|Du.FLAG13))===Du.FLAG13){let i=(c&Du.BRANCH_LENGTH)>>7,{runConsumed:l}=this;if(l===0){let n=e.charCodeAt(t);if(n!==(c&Du.JUMP_TABLE))return this.flushAndEmitLegacyOrReject(s,o,n,0);t+=1,o+=1,l=1}for(;l<i;){if(t>=r)return this.treeIndex=a,this.excess=o,this.consumed=s,this.runConsumed=l,-1;let i=l-1,c=n[a+1+(i>>1)]>>((i&1)<<3)&255,u=e.charCodeAt(t);if(u!==c)return this.runConsumed=0,this.flushAndEmitLegacyOrReject(s,o,u,0);t+=1,o+=1,l+=1}this.runConsumed=0,a+=1+(i>>1),c=n[a];continue}let l=c>>>14,u=e.charCodeAt(t);if(l!==0){if(!i&&(c&Du.FLAG13)===0&&(this.result=a,s+=o-1,o=1),u===Ou.SEMI)return this.emitNamedEntityData(a,l,s+o);if(l===1)return this.flushAndEmitLegacyOrReject(s,o,u,l)}let d=Lu(n,c,a+(l||1),u);if(d<0)return this.flushAndEmitLegacyOrReject(s,o,u,l);a=d,c=n[a],t+=1,o+=1}return!i&&c>>>14&&(c&Du.FLAG13)===0&&(this.result=a,s+=o-1,o=1),this.treeIndex=a,this.excess=o,this.consumed=s,-1}emitNotTerminatedNamedEntity(){let{result:e,decodeTree:t}=this,n=t[e]>>>14;return this.emitNamedEntityData(e,n,this.consumed),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&Du.VALUE_MASK:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){switch(this.state){case Pu.NamedEntity:return this.result!==0&&(this.decodeMode!==Fu.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Pu.NumericDecimal:return this.emitNumericEntity(0,2);case Pu.NumericHex:return this.emitNumericEntity(0,3);case Pu.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;default:return 0}}};function Lu(e,t,n,r){let i=(t&Du.BRANCH_LENGTH)>>7,a=t&Du.JUMP_TABLE;if(a){if(i===0)return r===a?n:-1;let t=r-a;if(t>>>0>=i)return-1;let o=e[n+t];return o===0?-1:n+i+o-1&65535}if(i===0)return-1;let o=i+1>>1,s=n+o+i;for(let t=0;t<i;t++){let i=e[n+(t>>1)]>>((t&1)<<3)&255;if(i===r)return s+e[n+o+t]&65535;if(i>r)return-1}return-1}var K;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(K||={});var Ru;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(Ru||={});var zu;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(zu||={});var q;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(q||={});var J;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(J||={});var Bu=new Map([[q.A,J.A],[q.ADDRESS,J.ADDRESS],[q.ANNOTATION_XML,J.ANNOTATION_XML],[q.APPLET,J.APPLET],[q.AREA,J.AREA],[q.ARTICLE,J.ARTICLE],[q.ASIDE,J.ASIDE],[q.B,J.B],[q.BASE,J.BASE],[q.BASEFONT,J.BASEFONT],[q.BGSOUND,J.BGSOUND],[q.BIG,J.BIG],[q.BLOCKQUOTE,J.BLOCKQUOTE],[q.BODY,J.BODY],[q.BR,J.BR],[q.BUTTON,J.BUTTON],[q.CAPTION,J.CAPTION],[q.CENTER,J.CENTER],[q.CODE,J.CODE],[q.COL,J.COL],[q.COLGROUP,J.COLGROUP],[q.DD,J.DD],[q.DESC,J.DESC],[q.DETAILS,J.DETAILS],[q.DIALOG,J.DIALOG],[q.DIR,J.DIR],[q.DIV,J.DIV],[q.DL,J.DL],[q.DT,J.DT],[q.EM,J.EM],[q.EMBED,J.EMBED],[q.FIELDSET,J.FIELDSET],[q.FIGCAPTION,J.FIGCAPTION],[q.FIGURE,J.FIGURE],[q.FONT,J.FONT],[q.FOOTER,J.FOOTER],[q.FOREIGN_OBJECT,J.FOREIGN_OBJECT],[q.FORM,J.FORM],[q.FRAME,J.FRAME],[q.FRAMESET,J.FRAMESET],[q.H1,J.H1],[q.H2,J.H2],[q.H3,J.H3],[q.H4,J.H4],[q.H5,J.H5],[q.H6,J.H6],[q.HEAD,J.HEAD],[q.HEADER,J.HEADER],[q.HGROUP,J.HGROUP],[q.HR,J.HR],[q.HTML,J.HTML],[q.I,J.I],[q.IMG,J.IMG],[q.IMAGE,J.IMAGE],[q.INPUT,J.INPUT],[q.IFRAME,J.IFRAME],[q.KEYGEN,J.KEYGEN],[q.LABEL,J.LABEL],[q.LI,J.LI],[q.LINK,J.LINK],[q.LISTING,J.LISTING],[q.MAIN,J.MAIN],[q.MALIGNMARK,J.MALIGNMARK],[q.MARQUEE,J.MARQUEE],[q.MATH,J.MATH],[q.MENU,J.MENU],[q.META,J.META],[q.MGLYPH,J.MGLYPH],[q.MI,J.MI],[q.MO,J.MO],[q.MN,J.MN],[q.MS,J.MS],[q.MTEXT,J.MTEXT],[q.NAV,J.NAV],[q.NOBR,J.NOBR],[q.NOFRAMES,J.NOFRAMES],[q.NOEMBED,J.NOEMBED],[q.NOSCRIPT,J.NOSCRIPT],[q.OBJECT,J.OBJECT],[q.OL,J.OL],[q.OPTGROUP,J.OPTGROUP],[q.OPTION,J.OPTION],[q.P,J.P],[q.PARAM,J.PARAM],[q.PLAINTEXT,J.PLAINTEXT],[q.PRE,J.PRE],[q.RB,J.RB],[q.RP,J.RP],[q.RT,J.RT],[q.RTC,J.RTC],[q.RUBY,J.RUBY],[q.S,J.S],[q.SCRIPT,J.SCRIPT],[q.SEARCH,J.SEARCH],[q.SECTION,J.SECTION],[q.SELECT,J.SELECT],[q.SOURCE,J.SOURCE],[q.SMALL,J.SMALL],[q.SPAN,J.SPAN],[q.STRIKE,J.STRIKE],[q.STRONG,J.STRONG],[q.STYLE,J.STYLE],[q.SUB,J.SUB],[q.SUMMARY,J.SUMMARY],[q.SUP,J.SUP],[q.TABLE,J.TABLE],[q.TBODY,J.TBODY],[q.TEMPLATE,J.TEMPLATE],[q.TEXTAREA,J.TEXTAREA],[q.TFOOT,J.TFOOT],[q.TD,J.TD],[q.TH,J.TH],[q.THEAD,J.THEAD],[q.TITLE,J.TITLE],[q.TR,J.TR],[q.TRACK,J.TRACK],[q.TT,J.TT],[q.U,J.U],[q.UL,J.UL],[q.SVG,J.SVG],[q.VAR,J.VAR],[q.WBR,J.WBR],[q.XMP,J.XMP]]);function Vu(e){return Bu.get(e)??J.UNKNOWN}var Y=J,Hu={[K.HTML]:new Set([Y.ADDRESS,Y.APPLET,Y.AREA,Y.ARTICLE,Y.ASIDE,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BLOCKQUOTE,Y.BODY,Y.BR,Y.BUTTON,Y.CAPTION,Y.CENTER,Y.COL,Y.COLGROUP,Y.DD,Y.DETAILS,Y.DIR,Y.DIV,Y.DL,Y.DT,Y.EMBED,Y.FIELDSET,Y.FIGCAPTION,Y.FIGURE,Y.FOOTER,Y.FORM,Y.FRAME,Y.FRAMESET,Y.H1,Y.H2,Y.H3,Y.H4,Y.H5,Y.H6,Y.HEAD,Y.HEADER,Y.HGROUP,Y.HR,Y.HTML,Y.IFRAME,Y.IMG,Y.INPUT,Y.LI,Y.LINK,Y.LISTING,Y.MAIN,Y.MARQUEE,Y.MENU,Y.META,Y.NAV,Y.NOEMBED,Y.NOFRAMES,Y.NOSCRIPT,Y.OBJECT,Y.OL,Y.P,Y.PARAM,Y.PLAINTEXT,Y.PRE,Y.SCRIPT,Y.SECTION,Y.SELECT,Y.SOURCE,Y.STYLE,Y.SUMMARY,Y.TABLE,Y.TBODY,Y.TD,Y.TEMPLATE,Y.TEXTAREA,Y.TFOOT,Y.TH,Y.THEAD,Y.TITLE,Y.TR,Y.TRACK,Y.UL,Y.WBR,Y.XMP]),[K.MATHML]:new Set([Y.MI,Y.MO,Y.MN,Y.MS,Y.MTEXT,Y.ANNOTATION_XML]),[K.SVG]:new Set([Y.TITLE,Y.FOREIGN_OBJECT,Y.DESC]),[K.XLINK]:new Set,[K.XML]:new Set,[K.XMLNS]:new Set},Uu=new Set([Y.H1,Y.H2,Y.H3,Y.H4,Y.H5,Y.H6]),Wu=new Set([q.STYLE,q.SCRIPT,q.XMP,q.IFRAME,q.NOEMBED,q.NOFRAMES,q.PLAINTEXT]);function Gu(e,t){return Wu.has(e)||t&&e===q.NOSCRIPT}var X;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(X||={});var Ku={DATA:X.DATA,RCDATA:X.RCDATA,RAWTEXT:X.RAWTEXT,SCRIPT_DATA:X.SCRIPT_DATA,PLAINTEXT:X.PLAINTEXT,CDATA_SECTION:X.CDATA_SECTION};function qu(e){return e>=W.DIGIT_0&&e<=W.DIGIT_9}function Ju(e){return e>=W.LATIN_CAPITAL_A&&e<=W.LATIN_CAPITAL_Z}function Yu(e){return e>=W.LATIN_SMALL_A&&e<=W.LATIN_SMALL_Z}function Xu(e){return Yu(e)||Ju(e)}function Zu(e){return Xu(e)||qu(e)}function Qu(e){return e+32}function $u(e){return e===W.SPACE||e===W.LINE_FEED||e===W.TABULATION||e===W.FORM_FEED}function ed(e){return $u(e)||e===W.SOLIDUS||e===W.GREATER_THAN_SIGN}function td(e){return e===W.NULL?G.nullCharacterReference:e>1114111?G.characterReferenceOutsideUnicodeRange:uu(e)?G.surrogateCharacterReference:mu(e)?G.noncharacterCharacterReference:pu(e)||e===W.CARRIAGE_RETURN?G.controlCharacterReference:null}var nd=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=X.DATA,this.returnState=X.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new gu(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Iu(Tu,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(G.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(G.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=td(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:_u.START_TAG,tagName:``,tagID:J.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:_u.END_TAG,tagName:``,tagID:J.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:_u.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:_u.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(vu(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(G.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=Vu(e.tagName),e.type===_u.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(G.endTagWithAttributes),e.selfClosing&&this._err(G.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case _u.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case _u.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case _u.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:_u.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){let t=$u(e)?_u.WHITESPACE_CHARACTER:e===W.NULL?_u.NULL_CHARACTER:_u.CHARACTER;this._appendCharToCurrentCharacterToken(t,e<65536?String.fromCharCode(e):String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(_u.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=X.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Fu.Attribute:Fu.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===X.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===X.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===X.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case X.DATA:this._stateData(e);break;case X.RCDATA:this._stateRcdata(e);break;case X.RAWTEXT:this._stateRawtext(e);break;case X.SCRIPT_DATA:this._stateScriptData(e);break;case X.PLAINTEXT:this._statePlaintext(e);break;case X.TAG_OPEN:this._stateTagOpen(e);break;case X.END_TAG_OPEN:this._stateEndTagOpen(e);break;case X.TAG_NAME:this._stateTagName(e);break;case X.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case X.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case X.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case X.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case X.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case X.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case X.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case X.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case X.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case X.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case X.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case X.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case X.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case X.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case X.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case X.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case X.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case X.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case X.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case X.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case X.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case X.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case X.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case X.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case X.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case X.BOGUS_COMMENT:this._stateBogusComment(e);break;case X.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case X.COMMENT_START:this._stateCommentStart(e);break;case X.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case X.COMMENT:this._stateComment(e);break;case X.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case X.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case X.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case X.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case X.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case X.COMMENT_END:this._stateCommentEnd(e);break;case X.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case X.DOCTYPE:this._stateDoctype(e);break;case X.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case X.DOCTYPE_NAME:this._stateDoctypeName(e);break;case X.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case X.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case X.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case X.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case X.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case X.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case X.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case X.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case X.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case X.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case X.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case X.CDATA_SECTION:this._stateCdataSection(e);break;case X.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case X.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case X.CHARACTER_REFERENCE:this._stateCharacterReference();break;case X.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case W.LESS_THAN_SIGN:this.state=X.TAG_OPEN;break;case W.AMPERSAND:this._startCharacterReference();break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitCodePoint(e);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case W.AMPERSAND:this._startCharacterReference();break;case W.LESS_THAN_SIGN:this.state=X.RCDATA_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case W.LESS_THAN_SIGN:this.state=X.RAWTEXT_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Xu(e))this._createStartTagToken(),this.state=X.TAG_NAME,this._stateTagName(e);else switch(e){case W.EXCLAMATION_MARK:this.state=X.MARKUP_DECLARATION_OPEN;break;case W.SOLIDUS:this.state=X.END_TAG_OPEN;break;case W.QUESTION_MARK:this._err(G.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=X.BOGUS_COMMENT,this._stateBogusComment(e);break;case W.EOF:this._err(G.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(G.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=X.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Xu(e))this._createEndTagToken(),this.state=X.TAG_NAME,this._stateTagName(e);else switch(e){case W.GREATER_THAN_SIGN:this._err(G.missingEndTagName),this.state=X.DATA;break;case W.EOF:this._err(G.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(G.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=X.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BEFORE_ATTRIBUTE_NAME;break;case W.SOLIDUS:this.state=X.SELF_CLOSING_START_TAG;break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentTagToken();break;case W.NULL:this._err(G.unexpectedNullCharacter),t.tagName+=`�`;break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(Ju(e)?Qu(e):e)}}_stateRcdataLessThanSign(e){e===W.SOLIDUS?this.state=X.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=X.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Xu(e)?(this.state=X.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=X.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=X.BEFORE_ATTRIBUTE_NAME,!1;case W.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=X.SELF_CLOSING_START_TAG,!1;case W.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=X.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=X.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===W.SOLIDUS?this.state=X.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=X.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Xu(e)?(this.state=X.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=X.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=X.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case W.SOLIDUS:this.state=X.SCRIPT_DATA_END_TAG_OPEN;break;case W.EXCLAMATION_MARK:this.state=X.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=X.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Xu(e)?(this.state=X.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=X.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=X.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===W.HYPHEN_MINUS?(this.state=X.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=X.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===W.HYPHEN_MINUS?(this.state=X.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=X.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case W.HYPHEN_MINUS:this.state=X.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case W.HYPHEN_MINUS:this.state=X.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=X.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case W.HYPHEN_MINUS:this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case W.GREATER_THAN_SIGN:this.state=X.SCRIPT_DATA,this._emitChars(`>`);break;case W.NULL:this._err(G.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=X.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===W.SOLIDUS?this.state=X.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Xu(e)?(this._emitChars(`<`),this.state=X.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Xu(e)?(this.state=X.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(lu.SCRIPT,!1)&&ed(this.preprocessor.peek(lu.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<lu.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case W.HYPHEN_MINUS:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case W.HYPHEN_MINUS:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case W.NULL:this._err(G.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case W.HYPHEN_MINUS:this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case W.GREATER_THAN_SIGN:this.state=X.SCRIPT_DATA,this._emitChars(`>`);break;case W.NULL:this._err(G.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===W.SOLIDUS?(this.state=X.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(lu.SCRIPT,!1)&&ed(this.preprocessor.peek(lu.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<lu.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=X.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.SOLIDUS:case W.GREATER_THAN_SIGN:case W.EOF:this.state=X.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case W.EQUALS_SIGN:this._err(G.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=X.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=X.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:case W.SOLIDUS:case W.GREATER_THAN_SIGN:case W.EOF:this._leaveAttrName(),this.state=X.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case W.EQUALS_SIGN:this._leaveAttrName(),this.state=X.BEFORE_ATTRIBUTE_VALUE;break;case W.QUOTATION_MARK:case W.APOSTROPHE:case W.LESS_THAN_SIGN:this._err(G.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case W.NULL:this._err(G.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(Ju(e)?Qu(e):e)}}_stateAfterAttributeName(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.SOLIDUS:this.state=X.SELF_CLOSING_START_TAG;break;case W.EQUALS_SIGN:this.state=X.BEFORE_ATTRIBUTE_VALUE;break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentTagToken();break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=X.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.QUOTATION_MARK:this.state=X.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case W.APOSTROPHE:this.state=X.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingAttributeValue),this.state=X.DATA,this.emitCurrentTagToken();break;default:this.state=X.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case W.QUOTATION_MARK:this.state=X.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case W.AMPERSAND:this._startCharacterReference();break;case W.NULL:this._err(G.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case W.APOSTROPHE:this.state=X.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case W.AMPERSAND:this._startCharacterReference();break;case W.NULL:this._err(G.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this._leaveAttrValue(),this.state=X.BEFORE_ATTRIBUTE_NAME;break;case W.AMPERSAND:this._startCharacterReference();break;case W.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=X.DATA,this.emitCurrentTagToken();break;case W.NULL:this._err(G.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case W.QUOTATION_MARK:case W.APOSTROPHE:case W.LESS_THAN_SIGN:case W.EQUALS_SIGN:case W.GRAVE_ACCENT:this._err(G.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this._leaveAttrValue(),this.state=X.BEFORE_ATTRIBUTE_NAME;break;case W.SOLIDUS:this._leaveAttrValue(),this.state=X.SELF_CLOSING_START_TAG;break;case W.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=X.DATA,this.emitCurrentTagToken();break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this._err(G.missingWhitespaceBetweenAttributes),this.state=X.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case W.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=X.DATA,this.emitCurrentTagToken();break}case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this._err(G.unexpectedSolidusInTag),this.state=X.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentComment(t);break;case W.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case W.NULL:this._err(G.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(lu.DASH_DASH,!0)?(this._createCommentToken(lu.DASH_DASH.length+1),this.state=X.COMMENT_START):this._consumeSequenceIfMatch(lu.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(lu.DOCTYPE.length+1),this.state=X.DOCTYPE):this._consumeSequenceIfMatch(lu.CDATA_START,!0)?this.inForeignNode?this.state=X.CDATA_SECTION:(this._err(G.cdataInHtmlContent),this._createCommentToken(lu.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=X.BOGUS_COMMENT):this._ensureHibernation()||(this._err(G.incorrectlyOpenedComment),this._createCommentToken(2),this.state=X.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case W.HYPHEN_MINUS:this.state=X.COMMENT_START_DASH;break;case W.GREATER_THAN_SIGN:{this._err(G.abruptClosingOfEmptyComment),this.state=X.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=X.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:this.state=X.COMMENT_END;break;case W.GREATER_THAN_SIGN:this._err(G.abruptClosingOfEmptyComment),this.state=X.DATA,this.emitCurrentComment(t);break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=X.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:this.state=X.COMMENT_END_DASH;break;case W.LESS_THAN_SIGN:t.data+=`<`,this.state=X.COMMENT_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.data+=`�`;break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case W.EXCLAMATION_MARK:t.data+=`!`,this.state=X.COMMENT_LESS_THAN_SIGN_BANG;break;case W.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=X.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===W.HYPHEN_MINUS?this.state=X.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=X.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===W.HYPHEN_MINUS?this.state=X.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=X.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==W.GREATER_THAN_SIGN&&e!==W.EOF&&this._err(G.nestedComment),this.state=X.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:this.state=X.COMMENT_END;break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=X.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentComment(t);break;case W.EXCLAMATION_MARK:this.state=X.COMMENT_END_BANG;break;case W.HYPHEN_MINUS:t.data+=`-`;break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=X.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:t.data+=`--!`,this.state=X.COMMENT_END_DASH;break;case W.GREATER_THAN_SIGN:this._err(G.incorrectlyClosedComment),this.state=X.DATA,this.emitCurrentComment(t);break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=X.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BEFORE_DOCTYPE_NAME;break;case W.GREATER_THAN_SIGN:this.state=X.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case W.EOF:{this._err(G.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(G.missingWhitespaceBeforeDoctypeName),this.state=X.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Ju(e))this._createDoctypeToken(String.fromCharCode(Qu(e))),this.state=X.DOCTYPE_NAME;else switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.NULL:this._err(G.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=X.DOCTYPE_NAME;break;case W.GREATER_THAN_SIGN:{this._err(G.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=X.DATA;break}case W.EOF:{this._err(G.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=X.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.AFTER_DOCTYPE_NAME;break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.NULL:this._err(G.unexpectedNullCharacter),t.name+=`�`;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Ju(e)?Qu(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(lu.PUBLIC,!1)?this.state=X.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(lu.SYSTEM,!1)?this.state=X.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(G.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case W.QUOTATION_MARK:this._err(G.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:this._err(G.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.QUOTATION_MARK:t.publicId=``,this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:t.publicId=``,this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case W.QUOTATION_MARK:this.state=X.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.publicId+=`�`;break;case W.GREATER_THAN_SIGN:this._err(G.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case W.APOSTROPHE:this.state=X.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.publicId+=`�`;break;case W.GREATER_THAN_SIGN:this._err(G.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.QUOTATION_MARK:this._err(G.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:this._err(G.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.QUOTATION_MARK:t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case W.QUOTATION_MARK:this._err(G.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:this._err(G.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.QUOTATION_MARK:t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case W.QUOTATION_MARK:this.state=X.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.systemId+=`�`;break;case W.GREATER_THAN_SIGN:this._err(G.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case W.APOSTROPHE:this.state=X.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.systemId+=`�`;break;case W.GREATER_THAN_SIGN:this._err(G.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case W.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.NULL:this._err(G.unexpectedNullCharacter);break;case W.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case W.RIGHT_SQUARE_BRACKET:this.state=X.CDATA_SECTION_BRACKET;break;case W.EOF:this._err(G.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===W.RIGHT_SQUARE_BRACKET?this.state=X.CDATA_SECTION_END:(this._emitChars(`]`),this.state=X.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case W.GREATER_THAN_SIGN:this.state=X.DATA;break;case W.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=X.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0){if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(W.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Zu(this.preprocessor.peek(1))?X.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Zu(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===W.SEMICOLON&&this._err(G.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},rd=new Set([J.DD,J.DT,J.LI,J.OPTGROUP,J.OPTION,J.P,J.RB,J.RP,J.RT,J.RTC]),id=new Set([...rd,J.CAPTION,J.COLGROUP,J.TBODY,J.TD,J.TFOOT,J.TH,J.THEAD,J.TR]),ad=new Set([J.APPLET,J.CAPTION,J.HTML,J.MARQUEE,J.OBJECT,J.TABLE,J.TD,J.TEMPLATE,J.TH]),od=new Set([...ad,J.OL,J.UL]),sd=new Set([...ad,J.BUTTON]),cd=new Set([J.ANNOTATION_XML,J.MI,J.MN,J.MO,J.MS,J.MTEXT]),ld=new Set([J.DESC,J.FOREIGN_OBJECT,J.TITLE]),ud=new Set([J.TR,J.TEMPLATE,J.HTML]),dd=new Set([J.TBODY,J.TFOOT,J.THEAD,J.TEMPLATE,J.HTML]),fd=new Set([J.TABLE,J.TEMPLATE,J.HTML]),pd=new Set([J.TD,J.TH]),md=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=J.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===J.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===K.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==K.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Uu,K.HTML)}popUntilTableCellPopped(){this.popUntilPopped(pd,K.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(fd,K.HTML)}clearBackToTableBodyContext(){this.clearBackTo(dd,K.HTML)}clearBackToTableRowContext(){this.clearBackTo(ud,K.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===J.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===J.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case K.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case K.SVG:if(ld.has(r))return!1;break;case K.MATHML:if(cd.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,ad)}hasInListItemScope(e){return this.hasInDynamicScope(e,od)}hasInButtonScope(e){return this.hasInDynamicScope(e,sd)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case K.HTML:if(Uu.has(t))return!0;if(ad.has(t))return!1;break;case K.SVG:if(ld.has(t))return!1;break;case K.MATHML:if(cd.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===K.HTML)switch(this.tagIDs[t]){case e:return!0;case J.TABLE:case J.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===K.HTML)switch(this.tagIDs[e]){case J.TBODY:case J.THEAD:case J.TFOOT:return!0;case J.TABLE:case J.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===K.HTML)switch(this.tagIDs[t]){case e:return!0;case J.OPTION:case J.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&rd.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&id.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&id.has(this.currentTagId);)this.pop()}},hd=3,gd;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(gd||={});var _d={type:gd.Marker},vd=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===gd.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<hd)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<hd)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=hd&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(_d)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:gd.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:gd.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(_d);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===gd.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===gd.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===gd.Element&&t.element===e)}},yd={createDocument(){return{nodeName:`#document`,mode:zu.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};yd.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(yd.isTextNode(n)){n.value+=t;return}}yd.appendChild(e,yd.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&yd.isTextNode(r)?r.value+=t:yd.insertBefore(e,yd.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},bd=`html`,xd=`about:legacy-compat`,Sd=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,Cd=`+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`),wd=[...Cd,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],Td=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),Ed=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],Dd=[...Ed,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function Od(e,t){return t.some(t=>e.startsWith(t))}function kd(e){return e.name===bd&&e.publicId===null&&(e.systemId===null||e.systemId===xd)}function Ad(e){if(e.name!==bd)return zu.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===Sd)return zu.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Td.has(n))return zu.QUIRKS;let e=t===null?wd:Cd;if(Od(n,e))return zu.QUIRKS;if(e=t===null?Ed:Dd,Od(n,e))return zu.LIMITED_QUIRKS}return zu.NO_QUIRKS}var jd={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},Md=`definitionurl`,Nd=`definitionURL`,Pd=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),Fd=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:K.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:K.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:K.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:K.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:K.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:K.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:K.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:K.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:K.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:K.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:K.XMLNS}]]),Id=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),Ld=new Set([J.B,J.BIG,J.BLOCKQUOTE,J.BODY,J.BR,J.CENTER,J.CODE,J.DD,J.DIV,J.DL,J.DT,J.EM,J.EMBED,J.H1,J.H2,J.H3,J.H4,J.H5,J.H6,J.HEAD,J.HR,J.I,J.IMG,J.LI,J.LISTING,J.MENU,J.META,J.NOBR,J.OL,J.P,J.PRE,J.RUBY,J.S,J.SMALL,J.SPAN,J.STRONG,J.STRIKE,J.SUB,J.SUP,J.TABLE,J.TT,J.U,J.UL,J.VAR]);function Rd(e){let t=e.tagID;return t===J.FONT&&e.attrs.some(({name:e})=>e===Ru.COLOR||e===Ru.SIZE||e===Ru.FACE)||Ld.has(t)}function zd(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Md){e.attrs[t].name=Nd;break}}function Bd(e){for(let t=0;t<e.attrs.length;t++){let n=Pd.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Vd(e){for(let t=0;t<e.attrs.length;t++){let n=Fd.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Hd(e){let t=Id.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Vu(e.tagName))}function Ud(e,t){return t===K.MATHML&&(e===J.MI||e===J.MO||e===J.MN||e===J.MS||e===J.MTEXT)}function Wd(e,t,n){if(t===K.MATHML&&e===J.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===Ru.ENCODING){let t=n[e].value.toLowerCase();return t===jd.TEXT_HTML||t===jd.APPLICATION_XML}}return t===K.SVG&&(e===J.FOREIGN_OBJECT||e===J.DESC||e===J.TITLE)}function Gd(e,t,n,r){return(!r||r===K.HTML)&&Wd(e,t,n)||(!r||r===K.MATHML)&&Ud(e,t)}var Kd=`hidden`,qd=8,Jd=3,Z;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})(Z||={});var Yd={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Xd=new Set([J.TABLE,J.TBODY,J.TFOOT,J.THEAD,J.TR]),Zd={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:yd,onParseError:null},Qd=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=Z.INITIAL,this.originalInsertionMode=Z.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Zd,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new nd(this.options,this),this.activeFormattingElements=new vd(this.treeAdapter),this.fragmentContextID=n?Vu(this.treeAdapter.getTagName(n)):J.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new md(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...Zd,...t};e??=n.treeAdapter.createElement(q.TEMPLATE,K.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,K.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===J.TEMPLATE&&i.tmplInsertionModeStack.unshift(Z.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??Yd,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===K.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,K.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=Z.TEXT}switchToPlaintextParsing(){this.insertionMode=Z.TEXT,this.originalInsertionMode=Z.IN_BODY,this.tokenizer.state=Ku.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===q.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===K.HTML)switch(this.fragmentContextID){case J.TITLE:case J.TEXTAREA:this.tokenizer.state=Ku.RCDATA;break;case J.STYLE:case J.XMP:case J.IFRAME:case J.NOEMBED:case J.NOFRAMES:case J.NOSCRIPT:this.tokenizer.state=Ku.RAWTEXT;break;case J.SCRIPT:this.tokenizer.state=Ku.SCRIPT_DATA;break;case J.PLAINTEXT:this.tokenizer.state=Ku.PLAINTEXT}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,K.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,K.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(q.HTML,K.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,J.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===_u.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===J.SVG&&this.treeAdapter.getTagName(t)===q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===K.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===J.MGLYPH||e.tagID===J.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,K.HTML)}_processToken(e){switch(e.type){case _u.CHARACTER:this.onCharacter(e);break;case _u.NULL_CHARACTER:this.onNullCharacter(e);break;case _u.COMMENT:this.onComment(e);break;case _u.DOCTYPE:this.onDoctype(e);break;case _u.START_TAG:this._processStartTag(e);break;case _u.END_TAG:this.onEndTag(e);break;case _u.EOF:this.onEof(e);break;case _u.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return Gd(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===gd.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Z.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(J.P),this.openElements.popUntilTagNamePopped(J.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case J.TR:this.insertionMode=Z.IN_ROW;return;case J.TBODY:case J.THEAD:case J.TFOOT:this.insertionMode=Z.IN_TABLE_BODY;return;case J.CAPTION:this.insertionMode=Z.IN_CAPTION;return;case J.COLGROUP:this.insertionMode=Z.IN_COLUMN_GROUP;return;case J.TABLE:this.insertionMode=Z.IN_TABLE;return;case J.BODY:this.insertionMode=Z.IN_BODY;return;case J.FRAMESET:this.insertionMode=Z.IN_FRAMESET;return;case J.SELECT:this._resetInsertionModeForSelect(e);return;case J.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case J.HTML:this.insertionMode=this.headElement?Z.AFTER_HEAD:Z.BEFORE_HEAD;return;case J.TD:case J.TH:if(e>0){this.insertionMode=Z.IN_CELL;return}break;case J.HEAD:if(e>0){this.insertionMode=Z.IN_HEAD;return}}this.insertionMode=Z.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===J.TEMPLATE)break;if(e===J.TABLE){this.insertionMode=Z.IN_SELECT_IN_TABLE;return}}this.insertionMode=Z.IN_SELECT}_isElementCausesFosterParenting(e){return Xd.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case J.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===K.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case J.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return Hu[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)_m(this,e);else switch(this.insertionMode){case Z.INITIAL:ff(this,e);break;case Z.BEFORE_HTML:hf(this,e);break;case Z.BEFORE_HEAD:vf(this,e);break;case Z.IN_HEAD:Sf(this,e);break;case Z.IN_HEAD_NO_SCRIPT:Tf(this,e);break;case Z.AFTER_HEAD:Of(this,e);break;case Z.IN_BODY:case Z.IN_CAPTION:case Z.IN_CELL:case Z.IN_TEMPLATE:jf(this,e);break;case Z.TEXT:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:Ep(this,e);break;case Z.IN_TABLE_TEXT:zp(this,e);break;case Z.IN_COLUMN_GROUP:Kp(this,e);break;case Z.AFTER_BODY:cm(this,e);break;case Z.AFTER_AFTER_BODY:mm(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)gm(this,e);else switch(this.insertionMode){case Z.INITIAL:ff(this,e);break;case Z.BEFORE_HTML:hf(this,e);break;case Z.BEFORE_HEAD:vf(this,e);break;case Z.IN_HEAD:Sf(this,e);break;case Z.IN_HEAD_NO_SCRIPT:Tf(this,e);break;case Z.AFTER_HEAD:Of(this,e);break;case Z.TEXT:this._insertCharacters(e);break;case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:Ep(this,e);break;case Z.IN_COLUMN_GROUP:Kp(this,e);break;case Z.AFTER_BODY:cm(this,e);break;case Z.AFTER_AFTER_BODY:mm(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)sf(this,e);else switch(this.insertionMode){case Z.INITIAL:case Z.BEFORE_HTML:case Z.BEFORE_HEAD:case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:case Z.IN_BODY:case Z.IN_TABLE:case Z.IN_CAPTION:case Z.IN_COLUMN_GROUP:case Z.IN_TABLE_BODY:case Z.IN_ROW:case Z.IN_CELL:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:case Z.IN_TEMPLATE:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:sf(this,e);break;case Z.IN_TABLE_TEXT:Bp(this,e);break;case Z.AFTER_BODY:cf(this,e);break;case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:lf(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case Z.INITIAL:df(this,e);break;case Z.BEFORE_HEAD:case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:this._err(e,G.misplacedDoctype);break;case Z.IN_TABLE_TEXT:Bp(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,G.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?ym(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case Z.INITIAL:ff(this,e);break;case Z.BEFORE_HTML:pf(this,e);break;case Z.BEFORE_HEAD:gf(this,e);break;case Z.IN_HEAD:yf(this,e);break;case Z.IN_HEAD_NO_SCRIPT:Cf(this,e);break;case Z.AFTER_HEAD:Ef(this,e);break;case Z.IN_BODY:up(this,e);break;case Z.IN_TABLE:Fp(this,e);break;case Z.IN_TABLE_TEXT:Bp(this,e);break;case Z.IN_CAPTION:Hp(this,e);break;case Z.IN_COLUMN_GROUP:Wp(this,e);break;case Z.IN_TABLE_BODY:qp(this,e);break;case Z.IN_ROW:Yp(this,e);break;case Z.IN_CELL:Zp(this,e);break;case Z.IN_SELECT:$p(this,e);break;case Z.IN_SELECT_IN_TABLE:tm(this,e);break;case Z.IN_TEMPLATE:rm(this,e);break;case Z.AFTER_BODY:om(this,e);break;case Z.IN_FRAMESET:lm(this,e);break;case Z.AFTER_FRAMESET:dm(this,e);break;case Z.AFTER_AFTER_BODY:pm(this,e);break;case Z.AFTER_AFTER_FRAMESET:hm(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?bm(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case Z.INITIAL:ff(this,e);break;case Z.BEFORE_HTML:mf(this,e);break;case Z.BEFORE_HEAD:_f(this,e);break;case Z.IN_HEAD:bf(this,e);break;case Z.IN_HEAD_NO_SCRIPT:wf(this,e);break;case Z.AFTER_HEAD:Df(this,e);break;case Z.IN_BODY:Sp(this,e);break;case Z.TEXT:wp(this,e);break;case Z.IN_TABLE:Ip(this,e);break;case Z.IN_TABLE_TEXT:Bp(this,e);break;case Z.IN_CAPTION:Up(this,e);break;case Z.IN_COLUMN_GROUP:Gp(this,e);break;case Z.IN_TABLE_BODY:Jp(this,e);break;case Z.IN_ROW:Xp(this,e);break;case Z.IN_CELL:Qp(this,e);break;case Z.IN_SELECT:em(this,e);break;case Z.IN_SELECT_IN_TABLE:nm(this,e);break;case Z.IN_TEMPLATE:im(this,e);break;case Z.AFTER_BODY:sm(this,e);break;case Z.IN_FRAMESET:um(this,e);break;case Z.AFTER_FRAMESET:fm(this,e);break;case Z.AFTER_AFTER_BODY:mm(this,e)}}onEof(e){switch(this.insertionMode){case Z.INITIAL:ff(this,e);break;case Z.BEFORE_HTML:hf(this,e);break;case Z.BEFORE_HEAD:vf(this,e);break;case Z.IN_HEAD:Sf(this,e);break;case Z.IN_HEAD_NO_SCRIPT:Tf(this,e);break;case Z.AFTER_HEAD:Of(this,e);break;case Z.IN_BODY:case Z.IN_TABLE:case Z.IN_CAPTION:case Z.IN_COLUMN_GROUP:case Z.IN_TABLE_BODY:case Z.IN_ROW:case Z.IN_CELL:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:Cp(this,e);break;case Z.TEXT:Tp(this,e);break;case Z.IN_TABLE_TEXT:Bp(this,e);break;case Z.IN_TEMPLATE:am(this,e);break;case Z.AFTER_BODY:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:uf(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===W.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:case Z.TEXT:case Z.IN_COLUMN_GROUP:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:this._insertCharacters(e);break;case Z.IN_BODY:case Z.IN_CAPTION:case Z.IN_CELL:case Z.IN_TEMPLATE:case Z.AFTER_BODY:case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:Af(this,e);break;case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:Ep(this,e);break;case Z.IN_TABLE_TEXT:Rp(this,e)}}};function $d(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):xp(e,t),n}function ef(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function tf(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=Jd;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=nf(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function nf(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function rf(e,t,n){let r=Vu(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===J.TEMPLATE&&i===K.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function af(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function of(e,t){for(let n=0;n<qd;n++){let n=$d(e,t);if(!n)break;let r=ef(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=tf(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&rf(e,a,i),af(e,r,n)}}function sf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function cf(e,t){e._appendCommentNode(t,e.openElements.items[0])}function lf(e,t){e._appendCommentNode(t,e.document)}function uf(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function df(e,t){e._setDocumentType(t);let n=t.forceQuirks?zu.QUIRKS:Ad(t);kd(t)||e._err(t,G.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Z.BEFORE_HTML}function ff(e,t){e._err(t,G.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,zu.QUIRKS),e.insertionMode=Z.BEFORE_HTML,e._processToken(t)}function pf(e,t){t.tagID===J.HTML?(e._insertElement(t,K.HTML),e.insertionMode=Z.BEFORE_HEAD):hf(e,t)}function mf(e,t){let n=t.tagID;(n===J.HTML||n===J.HEAD||n===J.BODY||n===J.BR)&&hf(e,t)}function hf(e,t){e._insertFakeRootElement(),e.insertionMode=Z.BEFORE_HEAD,e._processToken(t)}function gf(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.HEAD:e._insertElement(t,K.HTML),e.headElement=e.openElements.current,e.insertionMode=Z.IN_HEAD;break;default:vf(e,t)}}function _f(e,t){let n=t.tagID;n===J.HEAD||n===J.BODY||n===J.HTML||n===J.BR?vf(e,t):e._err(t,G.endTagWithoutMatchingOpenElement)}function vf(e,t){e._insertFakeElement(q.HEAD,J.HEAD),e.headElement=e.openElements.current,e.insertionMode=Z.IN_HEAD,e._processToken(t)}function yf(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.BASE:case J.BASEFONT:case J.BGSOUND:case J.LINK:case J.META:e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.TITLE:e._switchToTextParsing(t,Ku.RCDATA);break;case J.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Ku.RAWTEXT):(e._insertElement(t,K.HTML),e.insertionMode=Z.IN_HEAD_NO_SCRIPT);break;case J.NOFRAMES:case J.STYLE:e._switchToTextParsing(t,Ku.RAWTEXT);break;case J.SCRIPT:e._switchToTextParsing(t,Ku.SCRIPT_DATA);break;case J.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Z.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Z.IN_TEMPLATE);break;case J.HEAD:e._err(t,G.misplacedStartTagForHeadElement);break;default:Sf(e,t)}}function bf(e,t){switch(t.tagID){case J.HEAD:e.openElements.pop(),e.insertionMode=Z.AFTER_HEAD;break;case J.BODY:case J.BR:case J.HTML:Sf(e,t);break;case J.TEMPLATE:xf(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function xf(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==J.TEMPLATE&&e._err(t,G.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(J.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,G.endTagWithoutMatchingOpenElement)}function Sf(e,t){e.openElements.pop(),e.insertionMode=Z.AFTER_HEAD,e._processToken(t)}function Cf(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.BASEFONT:case J.BGSOUND:case J.HEAD:case J.LINK:case J.META:case J.NOFRAMES:case J.STYLE:yf(e,t);break;case J.NOSCRIPT:e._err(t,G.nestedNoscriptInHead);break;default:Tf(e,t)}}function wf(e,t){switch(t.tagID){case J.NOSCRIPT:e.openElements.pop(),e.insertionMode=Z.IN_HEAD;break;case J.BR:Tf(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function Tf(e,t){let n=t.type===_u.EOF?G.openElementsLeftAfterEof:G.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Z.IN_HEAD,e._processToken(t)}function Ef(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.BODY:e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=Z.IN_BODY;break;case J.FRAMESET:e._insertElement(t,K.HTML),e.insertionMode=Z.IN_FRAMESET;break;case J.BASE:case J.BASEFONT:case J.BGSOUND:case J.LINK:case J.META:case J.NOFRAMES:case J.SCRIPT:case J.STYLE:case J.TEMPLATE:case J.TITLE:e._err(t,G.abandonedHeadElementChild),e.openElements.push(e.headElement,J.HEAD),yf(e,t),e.openElements.remove(e.headElement);break;case J.HEAD:e._err(t,G.misplacedStartTagForHeadElement);break;default:Of(e,t)}}function Df(e,t){switch(t.tagID){case J.BODY:case J.HTML:case J.BR:Of(e,t);break;case J.TEMPLATE:xf(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function Of(e,t){e._insertFakeElement(q.BODY,J.BODY),e.insertionMode=Z.IN_BODY,kf(e,t)}function kf(e,t){switch(t.type){case _u.CHARACTER:jf(e,t);break;case _u.WHITESPACE_CHARACTER:Af(e,t);break;case _u.COMMENT:sf(e,t);break;case _u.START_TAG:up(e,t);break;case _u.END_TAG:Sp(e,t);break;case _u.EOF:Cp(e,t)}}function Af(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function jf(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Mf(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Nf(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Pf(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_FRAMESET)}function Ff(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function If(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Uu.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,K.HTML)}function Lf(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Rf(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),n||(e.formElement=e.openElements.current))}function zf(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===J.LI&&r===J.LI||(n===J.DD||n===J.DT)&&(r===J.DD||r===J.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==J.ADDRESS&&r!==J.DIV&&r!==J.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function Bf(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.tokenizer.state=Ku.PLAINTEXT}function Vf(e,t){e.openElements.hasInScope(J.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(J.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.framesetOk=!1}function Hf(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(q.A);n&&(of(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Uf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Wf(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(J.NOBR)&&(of(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Gf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Kf(e,t){e.treeAdapter.getDocumentMode(e.document)!==zu.QUIRKS&&e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=Z.IN_TABLE}function qf(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Jf(e){let t=vu(e,Ru.TYPE);return t!=null&&t.toLowerCase()===Kd}function Yf(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),Jf(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Xf(e,t){e._appendElement(t,K.HTML),t.ackSelfClosing=!0}function Zf(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Qf(e,t){t.tagName=q.IMG,t.tagID=J.IMG,qf(e,t)}function $f(e,t){e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ku.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Z.TEXT}function ep(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ku.RAWTEXT)}function tp(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ku.RAWTEXT)}function np(e,t){e._switchToTextParsing(t,Ku.RAWTEXT)}function rp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Z.IN_TABLE||e.insertionMode===Z.IN_CAPTION||e.insertionMode===Z.IN_TABLE_BODY||e.insertionMode===Z.IN_ROW||e.insertionMode===Z.IN_CELL?Z.IN_SELECT_IN_TABLE:Z.IN_SELECT}function ip(e,t){e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function ap(e,t){e.openElements.hasInScope(J.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,K.HTML)}function op(e,t){e.openElements.hasInScope(J.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(J.RTC),e._insertElement(t,K.HTML)}function sp(e,t){e._reconstructActiveFormattingElements(),zd(t),Vd(t),t.selfClosing?e._appendElement(t,K.MATHML):e._insertElement(t,K.MATHML),t.ackSelfClosing=!0}function cp(e,t){e._reconstructActiveFormattingElements(),Bd(t),Vd(t),t.selfClosing?e._appendElement(t,K.SVG):e._insertElement(t,K.SVG),t.ackSelfClosing=!0}function lp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function up(e,t){switch(t.tagID){case J.I:case J.S:case J.B:case J.U:case J.EM:case J.TT:case J.BIG:case J.CODE:case J.FONT:case J.SMALL:case J.STRIKE:case J.STRONG:Uf(e,t);break;case J.A:Hf(e,t);break;case J.H1:case J.H2:case J.H3:case J.H4:case J.H5:case J.H6:If(e,t);break;case J.P:case J.DL:case J.OL:case J.UL:case J.DIV:case J.DIR:case J.NAV:case J.MAIN:case J.MENU:case J.ASIDE:case J.CENTER:case J.FIGURE:case J.FOOTER:case J.HEADER:case J.HGROUP:case J.DIALOG:case J.DETAILS:case J.ADDRESS:case J.ARTICLE:case J.SEARCH:case J.SECTION:case J.SUMMARY:case J.FIELDSET:case J.BLOCKQUOTE:case J.FIGCAPTION:Ff(e,t);break;case J.LI:case J.DD:case J.DT:zf(e,t);break;case J.BR:case J.IMG:case J.WBR:case J.AREA:case J.EMBED:case J.KEYGEN:qf(e,t);break;case J.HR:Zf(e,t);break;case J.RB:case J.RTC:ap(e,t);break;case J.RT:case J.RP:op(e,t);break;case J.PRE:case J.LISTING:Lf(e,t);break;case J.XMP:ep(e,t);break;case J.SVG:cp(e,t);break;case J.HTML:Mf(e,t);break;case J.BASE:case J.LINK:case J.META:case J.STYLE:case J.TITLE:case J.SCRIPT:case J.BGSOUND:case J.BASEFONT:case J.TEMPLATE:yf(e,t);break;case J.BODY:Nf(e,t);break;case J.FORM:Rf(e,t);break;case J.NOBR:Wf(e,t);break;case J.MATH:sp(e,t);break;case J.TABLE:Kf(e,t);break;case J.INPUT:Yf(e,t);break;case J.PARAM:case J.TRACK:case J.SOURCE:Xf(e,t);break;case J.IMAGE:Qf(e,t);break;case J.BUTTON:Vf(e,t);break;case J.APPLET:case J.OBJECT:case J.MARQUEE:Gf(e,t);break;case J.IFRAME:tp(e,t);break;case J.SELECT:rp(e,t);break;case J.OPTION:case J.OPTGROUP:ip(e,t);break;case J.NOEMBED:case J.NOFRAMES:np(e,t);break;case J.FRAMESET:Pf(e,t);break;case J.TEXTAREA:$f(e,t);break;case J.NOSCRIPT:e.options.scriptingEnabled?np(e,t):lp(e,t);break;case J.PLAINTEXT:Bf(e,t);break;case J.COL:case J.TH:case J.TD:case J.TR:case J.HEAD:case J.FRAME:case J.TBODY:case J.TFOOT:case J.THEAD:case J.CAPTION:case J.COLGROUP:break;default:lp(e,t)}}function dp(e,t){if(e.openElements.hasInScope(J.BODY)&&(e.insertionMode=Z.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function fp(e,t){e.openElements.hasInScope(J.BODY)&&(e.insertionMode=Z.AFTER_BODY,sm(e,t))}function pp(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function mp(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(J.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(J.FORM):n&&e.openElements.remove(n))}function hp(e){e.openElements.hasInButtonScope(J.P)||e._insertFakeElement(q.P,J.P),e._closePElement()}function gp(e){e.openElements.hasInListItemScope(J.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(J.LI),e.openElements.popUntilTagNamePopped(J.LI))}function _p(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function vp(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function yp(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function bp(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(q.BR,J.BR),e.openElements.pop(),e.framesetOk=!1}function xp(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==J.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function Sp(e,t){switch(t.tagID){case J.A:case J.B:case J.I:case J.S:case J.U:case J.EM:case J.TT:case J.BIG:case J.CODE:case J.FONT:case J.NOBR:case J.SMALL:case J.STRIKE:case J.STRONG:of(e,t);break;case J.P:hp(e);break;case J.DL:case J.UL:case J.OL:case J.DIR:case J.DIV:case J.NAV:case J.PRE:case J.MAIN:case J.MENU:case J.ASIDE:case J.BUTTON:case J.CENTER:case J.FIGURE:case J.FOOTER:case J.HEADER:case J.HGROUP:case J.DIALOG:case J.ADDRESS:case J.ARTICLE:case J.DETAILS:case J.SEARCH:case J.SECTION:case J.SUMMARY:case J.LISTING:case J.FIELDSET:case J.BLOCKQUOTE:case J.FIGCAPTION:pp(e,t);break;case J.LI:gp(e);break;case J.DD:case J.DT:_p(e,t);break;case J.H1:case J.H2:case J.H3:case J.H4:case J.H5:case J.H6:vp(e);break;case J.BR:bp(e);break;case J.BODY:dp(e,t);break;case J.HTML:fp(e,t);break;case J.FORM:mp(e);break;case J.APPLET:case J.OBJECT:case J.MARQUEE:yp(e,t);break;case J.TEMPLATE:xf(e,t);break;default:xp(e,t)}}function Cp(e,t){e.tmplInsertionModeStack.length>0?am(e,t):uf(e,t)}function wp(e,t){var n;t.tagID===J.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Tp(e,t){e._err(t,G.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ep(e,t){if(e.openElements.currentTagId!==void 0&&Xd.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Z.IN_TABLE_TEXT,t.type){case _u.CHARACTER:zp(e,t);break;case _u.WHITESPACE_CHARACTER:Rp(e,t)}else Lp(e,t)}function Dp(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_CAPTION}function Op(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_COLUMN_GROUP}function kp(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.COLGROUP,J.COLGROUP),e.insertionMode=Z.IN_COLUMN_GROUP,Wp(e,t)}function Ap(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_TABLE_BODY}function jp(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.TBODY,J.TBODY),e.insertionMode=Z.IN_TABLE_BODY,qp(e,t)}function Mp(e,t){e.openElements.hasInTableScope(J.TABLE)&&(e.openElements.popUntilTagNamePopped(J.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Np(e,t){Jf(t)?e._appendElement(t,K.HTML):Lp(e,t),t.ackSelfClosing=!0}function Pp(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,K.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Fp(e,t){switch(t.tagID){case J.TD:case J.TH:case J.TR:jp(e,t);break;case J.STYLE:case J.SCRIPT:case J.TEMPLATE:yf(e,t);break;case J.COL:kp(e,t);break;case J.FORM:Pp(e,t);break;case J.TABLE:Mp(e,t);break;case J.TBODY:case J.TFOOT:case J.THEAD:Ap(e,t);break;case J.INPUT:Np(e,t);break;case J.CAPTION:Dp(e,t);break;case J.COLGROUP:Op(e,t);break;default:Lp(e,t)}}function Ip(e,t){switch(t.tagID){case J.TABLE:e.openElements.hasInTableScope(J.TABLE)&&(e.openElements.popUntilTagNamePopped(J.TABLE),e._resetInsertionMode());break;case J.TEMPLATE:xf(e,t);break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:case J.TBODY:case J.TD:case J.TFOOT:case J.TH:case J.THEAD:case J.TR:break;default:Lp(e,t)}}function Lp(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,kf(e,t),e.fosterParentingEnabled=n}function Rp(e,t){e.pendingCharacterTokens.push(t)}function zp(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Bp(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Lp(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var Vp=new Set([J.CAPTION,J.COL,J.COLGROUP,J.TBODY,J.TD,J.TFOOT,J.TH,J.THEAD,J.TR]);function Hp(e,t){let n=t.tagID;Vp.has(n)?e.openElements.hasInTableScope(J.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(J.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_TABLE,Fp(e,t)):up(e,t)}function Up(e,t){let n=t.tagID;switch(n){case J.CAPTION:case J.TABLE:e.openElements.hasInTableScope(J.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(J.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_TABLE,n===J.TABLE&&Ip(e,t));break;case J.BODY:case J.COL:case J.COLGROUP:case J.HTML:case J.TBODY:case J.TD:case J.TFOOT:case J.TH:case J.THEAD:case J.TR:break;default:Sp(e,t)}}function Wp(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.COL:e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.TEMPLATE:yf(e,t);break;default:Kp(e,t)}}function Gp(e,t){switch(t.tagID){case J.COLGROUP:e.openElements.currentTagId===J.COLGROUP&&(e.openElements.pop(),e.insertionMode=Z.IN_TABLE);break;case J.TEMPLATE:xf(e,t);break;case J.COL:break;default:Kp(e,t)}}function Kp(e,t){e.openElements.currentTagId===J.COLGROUP&&(e.openElements.pop(),e.insertionMode=Z.IN_TABLE,e._processToken(t))}function qp(e,t){switch(t.tagID){case J.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_ROW;break;case J.TH:case J.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(q.TR,J.TR),e.insertionMode=Z.IN_ROW,Yp(e,t);break;case J.CAPTION:case J.COL:case J.COLGROUP:case J.TBODY:case J.TFOOT:case J.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE,Fp(e,t));break;default:Fp(e,t)}}function Jp(e,t){let n=t.tagID;switch(t.tagID){case J.TBODY:case J.TFOOT:case J.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE);break;case J.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE,Ip(e,t));break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:case J.TD:case J.TH:case J.TR:break;default:Ip(e,t)}}function Yp(e,t){switch(t.tagID){case J.TH:case J.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_CELL,e.activeFormattingElements.insertMarker();break;case J.CAPTION:case J.COL:case J.COLGROUP:case J.TBODY:case J.TFOOT:case J.THEAD:case J.TR:e.openElements.hasInTableScope(J.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,qp(e,t));break;default:Fp(e,t)}}function Xp(e,t){switch(t.tagID){case J.TR:e.openElements.hasInTableScope(J.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY);break;case J.TABLE:e.openElements.hasInTableScope(J.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,Jp(e,t));break;case J.TBODY:case J.TFOOT:case J.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(J.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,Jp(e,t));break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:case J.TD:case J.TH:break;default:Ip(e,t)}}function Zp(e,t){let n=t.tagID;Vp.has(n)?(e.openElements.hasInTableScope(J.TD)||e.openElements.hasInTableScope(J.TH))&&(e._closeTableCell(),Yp(e,t)):up(e,t)}function Qp(e,t){let n=t.tagID;switch(n){case J.TD:case J.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_ROW);break;case J.TABLE:case J.TBODY:case J.TFOOT:case J.THEAD:case J.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Xp(e,t));break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:break;default:Sp(e,t)}}function $p(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.OPTION:e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e._insertElement(t,K.HTML);break;case J.OPTGROUP:e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e.openElements.currentTagId===J.OPTGROUP&&e.openElements.pop(),e._insertElement(t,K.HTML);break;case J.HR:e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e.openElements.currentTagId===J.OPTGROUP&&e.openElements.pop(),e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.INPUT:case J.KEYGEN:case J.TEXTAREA:case J.SELECT:e.openElements.hasInSelectScope(J.SELECT)&&(e.openElements.popUntilTagNamePopped(J.SELECT),e._resetInsertionMode(),t.tagID!==J.SELECT&&e._processStartTag(t));break;case J.SCRIPT:case J.TEMPLATE:yf(e,t)}}function em(e,t){switch(t.tagID){case J.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===J.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===J.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===J.OPTGROUP&&e.openElements.pop();break;case J.OPTION:e.openElements.currentTagId===J.OPTION&&e.openElements.pop();break;case J.SELECT:e.openElements.hasInSelectScope(J.SELECT)&&(e.openElements.popUntilTagNamePopped(J.SELECT),e._resetInsertionMode());break;case J.TEMPLATE:xf(e,t)}}function tm(e,t){let n=t.tagID;n===J.CAPTION||n===J.TABLE||n===J.TBODY||n===J.TFOOT||n===J.THEAD||n===J.TR||n===J.TD||n===J.TH?(e.openElements.popUntilTagNamePopped(J.SELECT),e._resetInsertionMode(),e._processStartTag(t)):$p(e,t)}function nm(e,t){let n=t.tagID;n===J.CAPTION||n===J.TABLE||n===J.TBODY||n===J.TFOOT||n===J.THEAD||n===J.TR||n===J.TD||n===J.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(J.SELECT),e._resetInsertionMode(),e.onEndTag(t)):em(e,t)}function rm(e,t){switch(t.tagID){case J.BASE:case J.BASEFONT:case J.BGSOUND:case J.LINK:case J.META:case J.NOFRAMES:case J.SCRIPT:case J.STYLE:case J.TEMPLATE:case J.TITLE:yf(e,t);break;case J.CAPTION:case J.COLGROUP:case J.TBODY:case J.TFOOT:case J.THEAD:e.tmplInsertionModeStack[0]=Z.IN_TABLE,e.insertionMode=Z.IN_TABLE,Fp(e,t);break;case J.COL:e.tmplInsertionModeStack[0]=Z.IN_COLUMN_GROUP,e.insertionMode=Z.IN_COLUMN_GROUP,Wp(e,t);break;case J.TR:e.tmplInsertionModeStack[0]=Z.IN_TABLE_BODY,e.insertionMode=Z.IN_TABLE_BODY,qp(e,t);break;case J.TD:case J.TH:e.tmplInsertionModeStack[0]=Z.IN_ROW,e.insertionMode=Z.IN_ROW,Yp(e,t);break;default:e.tmplInsertionModeStack[0]=Z.IN_BODY,e.insertionMode=Z.IN_BODY,up(e,t)}}function im(e,t){t.tagID===J.TEMPLATE&&xf(e,t)}function am(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(J.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):uf(e,t)}function om(e,t){t.tagID===J.HTML?up(e,t):cm(e,t)}function sm(e,t){if(t.tagID===J.HTML){if(e.fragmentContext||(e.insertionMode=Z.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===J.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else cm(e,t)}function cm(e,t){e.insertionMode=Z.IN_BODY,kf(e,t)}function lm(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.FRAMESET:e._insertElement(t,K.HTML);break;case J.FRAME:e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.NOFRAMES:yf(e,t)}}function um(e,t){t.tagID===J.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==J.FRAMESET&&(e.insertionMode=Z.AFTER_FRAMESET))}function dm(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.NOFRAMES:yf(e,t)}}function fm(e,t){t.tagID===J.HTML&&(e.insertionMode=Z.AFTER_AFTER_FRAMESET)}function pm(e,t){t.tagID===J.HTML?up(e,t):mm(e,t)}function mm(e,t){e.insertionMode=Z.IN_BODY,kf(e,t)}function hm(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.NOFRAMES:yf(e,t)}}function gm(e,t){t.chars=`�`,e._insertCharacters(t)}function _m(e,t){e._insertCharacters(t),e.framesetOk=!1}function vm(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==K.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function ym(e,t){if(Rd(t))vm(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===K.MATHML?zd(t):r===K.SVG&&(Hd(t),Bd(t)),Vd(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function bm(e,t){if(t.tagID===J.P||t.tagID===J.BR)vm(e),e._endTagOutsideForeignContent(t);else for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===K.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}function xm(e){return e===34?`&quot;`:e===38?`&amp;`:e===39?`&apos;`:e===60?`&lt;`:e===62?`&gt;`:`&nbsp;`}function Sm(e,t){if(e.lastIndex=0,!e.test(t))return t;let n=``,r=0;do{let i=e.lastIndex-1;r!==i&&(n+=t.substring(r,i));let a=t.charCodeAt(i);n+=xm(a),r=i+1}while(e.test(t));return n+t.substring(r)}var Cm=/["&\u{A0}]/gu;function wm(e){return Sm(Cm,e)}var Tm=/[&<>\u{A0}]/gu;function Em(e){return Sm(Tm,e)}var Dm=new Set([q.AREA,q.BASE,q.BASEFONT,q.BGSOUND,q.BR,q.COL,q.EMBED,q.FRAME,q.HR,q.IMG,q.INPUT,q.KEYGEN,q.LINK,q.META,q.PARAM,q.SOURCE,q.TRACK,q.WBR]);function Om(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===K.HTML&&Dm.has(t.treeAdapter.getTagName(e))}var km={treeAdapter:yd,scriptingEnabled:!0};function Am(e,t){return Mm(e,{...km,...t})}function jm(e,t){let n=``,r=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===q.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===K.HTML?t.treeAdapter.getTemplateContent(e):e,i=t.treeAdapter.getChildNodes(r);if(i)for(let e of i)n+=Mm(e,t);return n}function Mm(e,t){return t.treeAdapter.isElementNode(e)?Nm(e,t):t.treeAdapter.isTextNode(e)?Fm(e,t):t.treeAdapter.isCommentNode(e)?Im(e,t):t.treeAdapter.isDocumentTypeNode(e)?Lm(e,t):``}function Nm(e,t){let n=t.treeAdapter.getTagName(e);return`<${n}${Pm(e,t)}>${Om(e,t)?``:`${jm(e,t)}</${n}>`}`}function Pm(e,{treeAdapter:t}){let n=``;for(let r of t.getAttrList(e)){if(n+=` `,r.namespace)switch(r.namespace){case K.XML:n+=`xml:${r.name}`;break;case K.XMLNS:r.name!==`xmlns`&&(n+=`xmlns:`),n+=r.name;break;case K.XLINK:n+=`xlink:${r.name}`;break;default:n+=`${r.prefix}:${r.name}`}else n+=r.name;n+=`="${wm(r.value)}"`}return n}function Fm(e,t){let{treeAdapter:n}=t,r=n.getTextNodeContent(e),i=n.getParentNode(e),a=i&&n.isElementNode(i)&&n.getTagName(i);return a&&n.getNamespaceURI(i)===K.HTML&&Gu(a,t.scriptingEnabled)?r:Em(r)}function Im(e,{treeAdapter:t}){return`<!--${t.getCommentNodeContent(e)}-->`}function Lm(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function Rm(e,t){return Qd.parse(e,t)}function zm(e,t,n){typeof e==`string`&&(n=t,t=e,e=null);let r=Qd.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}var Bm=`local-draft-2`,Vm={kind:`string`,static:!0},Hm={kind:`string`,static:!0},Um={kind:`number`,static:!0},Wm={kind:`boolean`,static:!0},Gm={kind:`boolean`,dynamic:!0,default:!1},Km={kind:`string`},qm={kind:`string`,static:!0},Jm={kind:`string`},Ym={kind:`string`},Xm=()=>({kind:`string`,static:!0,color:!0}),Zm=(e={})=>({kind:`number`,...e}),Qm=[{name:`input`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`string`,required:!1,family:`text`},initialRule:`empty`,props:{label:Km,bind:Vm,initial:Hm,type:{kind:`enum`,static:!0,values:[`text`,`email`],default:`text`},placeholder:{kind:`string`},required:{kind:`boolean`,default:!1},"min-length":Zm({integer:!0,min:0,default:0}),"max-length":Zm({integer:!0,min:0}),disabled:Gm}},{name:`textarea`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`string`,required:!1,family:`text`},initialRule:`empty`,props:{label:Km,bind:Vm,initial:Hm,placeholder:{kind:`string`},rows:Zm({integer:!0,positive:!0,default:4}),required:{kind:`boolean`,default:!1},"min-length":Zm({integer:!0,min:0,default:0}),"max-length":Zm({integer:!0,min:0}),disabled:Gm}},{name:`number`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`number`,required:!1,family:`number`},initialRule:`nearest-zero`,props:{label:Km,bind:Vm,initial:Um,min:Zm(),max:Zm(),step:Zm({positive:!0,default:1}),disabled:Gm}},{name:`slider`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`number`,required:!1,family:`number`},initialRule:`min`,props:{label:Km,bind:Vm,initial:Um,min:Zm({default:0}),max:Zm({default:100}),step:Zm({positive:!0,default:1}),disabled:Gm,color:Xm()}},{name:`range-slider`,form:`leaf`,childRule:`none`,label:`required`,slots:[{name:`start`,bind:`bind-start`,initial:`initial-start`,kind:`number`,family:`number`,exclusive:!0,initialRule:`min`},{name:`end`,bind:`bind-end`,initial:`initial-end`,kind:`number`,family:`number`,exclusive:!0,initialRule:`max-step`}],props:{label:Km,"bind-start":Vm,"bind-end":Vm,"initial-start":Um,"initial-end":Um,min:Zm({default:0}),max:Zm({default:100}),step:Zm({positive:!0,default:1}),disabled:Gm,color:Xm()}},{name:`coordinate`,form:`leaf`,childRule:`none`,label:`required`,slots:[{name:`x`,bind:`bind-x`,initial:`initial-x`,kind:`number`,family:`number`,exclusive:!0,initialRule:`nearest-zero`},{name:`y`,bind:`bind-y`,initial:`initial-y`,kind:`number`,family:`number`,exclusive:!0,initialRule:`nearest-zero`}],props:{label:Km,"bind-x":Vm,"bind-y":Vm,"initial-x":Um,"initial-y":Um,"x-min":Zm({default:-5}),"x-max":Zm({default:5}),"y-min":Zm({default:-5}),"y-max":Zm({default:5}),step:Zm({positive:!0,default:1}),disabled:Gm,color:Xm()}},{name:`toggle`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`boolean`,required:!1,family:`boolean`},initialRule:`false`,props:{label:Km,bind:Vm,initial:Wm,disabled:Gm,color:Xm()}},{name:`checkbox`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`boolean`,required:!1,family:`boolean`},initialRule:`false`,props:{label:Km,bind:Vm,initial:Wm,disabled:Gm,color:Xm()}},{name:`date`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`string`,required:!1,family:`date`},initialRule:`empty`,props:{label:Km,bind:Vm,initial:Hm,min:{kind:`string`,static:!0},max:{kind:`string`,static:!0},required:{kind:`boolean`,default:!1},disabled:Gm}},{name:`select`,form:`container`,childRule:`options`,label:`required`,binding:{kind:`string`,required:!1,family:`choice`},initialRule:`first-option`,props:{label:Km,bind:Vm,initial:Hm,disabled:Gm,color:Xm()}},{name:`choices`,form:`container`,childRule:`options`,label:`required`,binding:{kind:`string`,required:!1,family:`choice`},initialRule:`first-option`,props:{label:Km,bind:Vm,initial:Hm,disabled:Gm,color:Xm()}},{name:`radio-group`,form:`container`,childRule:`options`,label:`required`,binding:{kind:`string`,required:!1,family:`choice`},initialRule:`first-option`,props:{label:Km,bind:Vm,initial:Hm,disabled:Gm,color:Xm()}},{name:`multi-select`,form:`container`,childRule:`options`,label:`required`,binding:{kind:`array`,required:!1,family:`multi-select`,exclusive:!0},initialRule:`empty-array`,props:{label:Km,bind:Vm,initial:Hm,"max-selected":Zm({integer:!0,min:0}),disabled:Gm,color:Xm()}},{name:`option`,form:`container`,childRule:`inline`,label:`none`,parent:[`select`,`choices`,`radio-group`,`multi-select`,`quiz`],props:{value:{kind:`string`,static:!0,required:!0}}},{name:`counter`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`number`,required:!1,family:`number`},initialRule:`nearest-zero`,props:{label:Km,bind:Vm,initial:Um,min:Zm({default:0}),max:Zm(),step:Zm({positive:!0,default:1}),disabled:Gm}},{name:`timer`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`number`,required:!1,family:`timer`,exclusive:!0},initialRule:`duration`,props:{label:Km,bind:Vm,duration:Zm({integer:!0,positive:!0,default:60})}},{name:`checklist`,form:`container`,childRule:`content`,label:`required`,binding:{kind:`array`,required:!1,family:`checklist`,exclusive:!0},initialRule:`checked`,props:{label:Km,bind:Vm,disabled:Gm,color:Xm()}},{name:`progress`,form:`leaf`,childRule:`none`,label:`required`,props:{label:Km,value:{kind:`number`,dynamic:!0,required:!0},max:Zm({positive:!0,default:100}),color:Xm()}},{name:`jump`,form:`inline`,childRule:`inline`,label:`none`,props:{to:{kind:`string`,static:!0,required:!0},appearance:{kind:`enum`,static:!0,values:[`link`,`button`],default:`link`},color:Xm()}},{name:`anchor`,form:`leaf`,childRule:`none`,label:`none`,props:{id:{kind:`string`,static:!0,required:!0}}},{name:`text`,form:`inline`,childRule:`inline`,label:`none`,props:{color:{kind:`string`,static:!0,required:!0,color:!0}}},{name:`section`,form:`container`,childRule:`any`,label:`none`,props:{color:{kind:`string`,static:!0,required:!0,color:!0}}},{name:`quiz`,form:`container`,childRule:`quiz`,label:`required`,props:{type:{kind:`enum`,static:!0,values:[`choice`,`number`],default:`choice`},label:Km,answer:{kind:`string`,static:!0,required:!0},explanation:{kind:`string`},tolerance:Zm({min:0,default:0}),disabled:Gm}},{name:`panel`,form:`container`,childRule:`any`,label:`none`,props:{title:Ym,reset:{kind:`boolean`,default:!0}}},{name:`card`,form:`container`,childRule:`any`,label:`none`,props:{title:Ym}},{name:`grid`,form:`container`,childRule:`cards`,label:`none`,props:{columns:Zm({integer:!0,min:1,max:4,default:2})}},{name:`tabs`,form:`container`,childRule:`tabs`,label:`optional`,binding:{kind:`string`,required:!1,family:`tabs`,exclusive:!0},initialRule:`first-tab`,props:{label:Jm,bind:Vm,initial:Hm}},{name:`tab`,form:`container`,childRule:`any`,label:`required`,parent:[`tabs`],props:{label:Km,value:{kind:`string`,static:!0}}},{name:`steps`,form:`container`,childRule:`steps`,label:`optional`,binding:{kind:`string`,required:!1,family:`steps`,exclusive:!0},initialRule:`first-step`,props:{label:Jm,bind:Vm,initial:Hm}},{name:`step`,form:`container`,childRule:`any`,label:`required`,parent:[`steps`],props:{label:Km,value:{kind:`string`,static:!0}}},{name:`accordion`,form:`container`,childRule:`disclosures`,label:`optional`,props:{label:Jm}},{name:`disclosure`,form:`container`,childRule:`any`,label:`required`,parent:[`accordion`],props:{label:Km,open:{kind:`boolean`,default:!1}}},{name:`if`,form:`container`,childRule:`any`,label:`none`,props:{when:{kind:`boolean`,dynamic:!0,required:!0}}},{name:`alert`,form:`container`,childRule:`any`,label:`none`,props:{title:Ym,tone:{kind:`enum`,dynamic:!0,values:[`info`,`success`,`warning`],default:`info`}}},{name:`badge`,form:`inline`,childRule:`inline`,label:`none`,props:{tone:{kind:`enum`,dynamic:!0,values:[`neutral`,`success`,`warning`],default:`neutral`},color:Xm()}},{name:`tooltip`,form:`inline`,childRule:`inline`,label:`none`,props:{text:{kind:`string`,required:!0}}},{name:`computed`,form:`leaf`,childRule:`none`,label:`none`,props:{name:{kind:`string`,static:!0,required:!0},value:{kind:`string`,required:!0}}},{name:`const`,form:`leaf`,childRule:`none`,label:`none`,props:{name:{kind:`string`,static:!0,required:!0},value:{kind:`string`,required:!0}}},{name:`validation`,form:`leaf`,childRule:`none`,label:`none`,props:{when:{kind:`boolean`,dynamic:!0,required:!0},message:{kind:`string`,required:!0},fields:{kind:`string`,static:!0,required:!0}}},{name:`data-table`,form:`container`,childRule:`columns`,label:`required`,props:{label:qm,rows:{kind:`string`,required:!0},key:{kind:`string`,required:!0},"max-rows":Zm({integer:!0,positive:!0,max:A,default:100})}},{name:`column`,form:`leaf`,childRule:`none`,label:`none`,parent:[`data-table`],props:{label:{kind:`string`,static:!0,required:!0},value:{kind:`string`,required:!0}}},{name:`table`,form:`container`,childRule:`table`,label:`optional`,binding:{kind:`string`,required:!1,family:`selection`},initialRule:`none`,props:{label:Jm,searchable:{kind:`boolean`,default:!0},sortable:{kind:`boolean`,default:!0},"page-size":Zm({integer:!0,positive:!0,default:10}),bind:Vm,key:{kind:`string`,static:!0},initial:Hm}},{name:`chart`,form:`container`,childRule:`table`,label:`none`,binding:{kind:`string`,required:!1,family:`selection`},initialRule:`none`,props:{kind:{kind:`enum`,static:!0,values:[`bar`,`line`,`area`,`scatter`,`donut`],default:`bar`},title:Ym,x:{kind:`string`,static:!0},y:{kind:`string`,static:!0},"x-label":{kind:`string`},"y-label":{kind:`string`},bind:Vm,key:{kind:`string`,static:!0},initial:Hm}},{name:`plot`,form:`container`,childRule:`plot`,label:`optional`,props:{label:Jm,min:{kind:`number`,dynamic:!0,default:-10},max:{kind:`number`,dynamic:!0,default:10},samples:Zm({integer:!0,min:2,max:2e3,static:!0,default:200}),"x-label":{kind:`string`,default:`x`},"y-label":{kind:`string`,default:`y`}}},{name:`timeline`,form:`container`,childRule:`table`,label:`none`,props:{title:Ym,unit:{kind:`string`,default:`minutes`}}},{name:`diagram`,form:`container`,childRule:`diagram`,label:`optional`,binding:{kind:`string`,required:!1,family:`diagram`,exclusive:!0},initialRule:`first-node`,props:{label:Jm,bind:Vm,initial:Hm,direction:{kind:`enum`,static:!0,values:[`right`,`down`],default:`right`}}},{name:`node`,form:`container`,childRule:`content`,label:`required`,parent:[`diagram`],props:{id:{kind:`string`,static:!0,required:!0},label:Km,tone:{kind:`enum`,dynamic:!0,values:[`neutral`,`success`,`warning`],default:`neutral`}}},{name:`edge`,form:`leaf`,childRule:`none`,label:`none`,parent:[`diagram`],props:{from:{kind:`string`,static:!0,required:!0},to:{kind:`string`,static:!0,required:!0},label:Jm}}],$m=Object.freeze(Object.fromEntries(Qm.map(e=>[e.name,Object.freeze(e)]))),eh=Object.freeze(Qm.map(e=>e.name)),th=Object.freeze({leaf:Object.freeze(Qm.filter(e=>e.form===`leaf`).map(e=>e.name)),inline:Object.freeze(Qm.filter(e=>e.form===`inline`).map(e=>e.name)),container:Object.freeze(Qm.filter(e=>e.form===`container`).map(e=>e.name))});function nh(e){return th[e]}function rh(e){return Object.hasOwn($m,e)?$m[e]:void 0}function ih(e,t){let n=Array.from({length:t.length+1},(e,t)=>t);for(let r=1;r<=e.length;r++){let i=n[0];n[0]=r;for(let a=1;a<=t.length;a++){let o=n[a];n[a]=Math.min(n[a]+1,n[a-1]+1,i+(e[r-1]===t[a-1]?0:1)),i=o}}return n[t.length]}function ah(e,t){let n,r=1/0;for(let i of t){let t=ih(e,i);t<r&&(n=i,r=t)}return r<=2?n:void 0}function oh(e){return ah(e,eh)}function sh(e,t){return ah(t,Object.keys(e.props))}var ch=`reactive-md-theme-1`,lh=Object.freeze({name:`default`,protocol:ch,colorSchemes:Object.freeze([`light`,`dark`])}),uh=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,dh=64;function fh(e){return typeof e==`string`&&e.length>0&&e.length<=dh&&uh.test(e)}function ph(e,t){let n=typeof t==`string`?t.length:1/0;if(!e||typeof e.start!=`number`||typeof e.end!=`number`||!Number.isFinite(e.start)||!Number.isFinite(e.end))return{start:0,end:0};let r=Math.max(0,Math.min(n,Math.floor(e.start)));return{start:r,end:Math.max(r,Math.min(n,Math.floor(e.end)))}}function mh(e,t){if(typeof e!=`string`||e.length===0)return{line:1,column:1};let n=Math.min(t,e.length),r=1,i=0;for(let t=0;t<n;t+=1)e[t]===`
32
+ `&&(r+=1,i=t+1);return{line:r,column:t-i+1}}function hh(e,t,n,r){let i=ph(n,r),{line:a,column:o}=mh(r,i.start);return{code:e,message:$e(t),severity:`warning`,range:i,line:a,column:o,messageKey:t.key,...t.params?{params:t.params}:{}}}function gh(e,t,n,r){let i=(e,t)=>({name:lh.name,diagnostics:[hh(e,t,n,r)]}),a=e;if(a==null||a===``)return{name:lh.name,diagnostics:[]};if(!fh(a))return i(`local.theme.name`,ze(`local.theme.name`,{name:String(a),limit:dh}));let o=a;if(o===lh.name)return{name:lh.name,diagnostics:[]};if(!Array.isArray(t))return i(`local.theme.missing`,ze(`local.theme.missing`,{name:o}));let s=0,c=null;try{for(let e of t)typeof e==`object`&&e&&!Array.isArray(e)&&e.name===o&&(s+=1,c=e)}catch{return i(`local.theme.manifest`,ze(`local.theme.manifest.unreadable`))}if(s===0)return i(`local.theme.missing`,ze(`local.theme.missing`,{name:o}));if(s>1)return i(`local.theme.duplicate`,ze(`local.theme.duplicate`,{name:o}));try{let e=c;if(!e||typeof e!=`object`)return i(`local.theme.manifest`,ze(`local.theme.manifest.definition`,{name:o}));if(e.protocol!==`reactive-md-theme-1`)return i(`local.theme.protocol`,ze(`local.theme.protocol`,{name:o,protocol:ch}));let t=e.colorSchemes;if(!Array.isArray(t)||!t.includes(`light`)||!t.includes(`dark`))return i(`local.theme.modes`,ze(`local.theme.modes`,{name:o}))}catch{return i(`local.theme.manifest`,ze(`local.theme.manifest.selected`,{name:o}))}return{name:o,diagnostics:[]}}function _h(e){return typeof e==`string`&&e.trim()!==``?e:void 0}function vh(e){let t=/^\[\^([\s\S]*)\]$/.exec(e.trim());return t?t[1]:e}function yh(e){return e}function bh(e,t){return _h(e.attrs?.[t])}function xh(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase().toLowerCase()}function Sh(e){let t=yh(e),n=_h(e.value);return _h(t.identifier)??_h(t.label)??bh(e,`identifier`)??bh(e,`label`)??(n?vh(n):``)}function Ch(e){return xh(Sh(e))}function wh(e){let t=yh(e),n=_h(e.value);return(_h(t.label)??_h(t.identifier)??bh(e,`label`)??bh(e,`identifier`)??(n?vh(n):``)).trim().replace(/\s+/g,` `)}function Th(e,t){let n=new Map,r=[],i=new Map,a=[],o=e=>{for(let t of e??[])if(t.type===`footnoteDefinition`){let e=Ch(t);e&&!n.has(e)&&n.set(e,t),a.push(t),o(t.children),a.pop()}else if(t.type===`footnoteReference`){let e=a[a.length-1];if(e){let n=i.get(e);n?n.push(t):i.set(e,[t])}else r.push(t)}else o(t.children)};o(e.nodes);let s=[],c=new Map,l=new Map,u=new Map,d=e=>{let r=n.get(e);if(!r)return null;let i=c.get(e);if(i)return i;let a={identifier:e,number:s.length+1,definition:r,id:`${t}-fn-${s.length+1}`,references:[]};return s.push(a),c.set(e,a),a},f=e=>{let n=Ch(e),r=n?d(n):null;if(!r){l.set(e,{id:``,entry:null,label:wh(e)});return}let i=(u.get(n)??0)+1;u.set(n,i);let a=`${t}-fnref-${r.number}-${i}`;r.references.push({node:e,id:a}),l.set(e,{id:a,entry:r,label:wh(e)})};for(let e of r)f(e);for(let e=0;e<s.length;e+=1){let t=s[e];for(let e of i.get(t.definition)??[])f(e)}return{entries:s,siteFor(e){return l.get(e)}}}var Eh=[`enableCss`,`enableJavaScript`,`enableExtendedHtml`];function Dh(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Oh(e){if(e===void 0)return{ok:!0,maxSyntaxNodes:C,html:{enableCss:!1,enableJavaScript:!1,enableExtendedHtml:!1},htmlActive:!1};if(!Dh(e))return{ok:!1,message:`Compile options must be an object.`,key:`local.options.invalid.object`};let t={enableCss:!1,enableJavaScript:!1,enableExtendedHtml:!1};for(let n of Eh){if(!Object.hasOwn(e,n))continue;let r=e[n];if(r!==void 0){if(typeof r!=`boolean`)return{ok:!1,message:`Compile option ${n} must be a boolean.`,key:`local.options.invalid.html-flag`};t[n]=r}}let n=e.limits,r=C;if(n!==void 0){if(!Dh(n))return{ok:!1,message:`Compile option limits must be an object.`,key:`local.options.invalid.limits`};let e=n.maxSyntaxNodes;if(e!==void 0){if(typeof e!=`number`||!Number.isSafeInteger(e)||e<1)return{ok:!1,message:`Compile option limits.maxSyntaxNodes must be a positive safe integer.`,key:`local.options.invalid.max-syntax-nodes`};r=e}}return{ok:!0,maxSyntaxNodes:r,html:t,htmlActive:t.enableCss||t.enableJavaScript||t.enableExtendedHtml}}var kh=new Set(nh(`leaf`)),Ah=new Set([...nh(`container`),...nh(`inline`)]),jh=new Set(nh(`inline`)),Mh=new Set([...kh,...Ah]),Nh=``,Ph=``,Fh=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,Ih=Fh,Lh={b:`strong`,strong:`strong`,i:`emphasis`,em:`emphasis`,s:`delete`,del:`delete`,u:`underline`,mark:`mark`,sup:`sup`,sub:`sub`},Rh=new Set([...Object.keys(Lh),`br`,`hr`,`img`,`p`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`div`,`span`,`details`,`summary`,`blockquote`,`code`,`pre`,`ul`,`ol`,`li`,`a`]),zh=new Set([`br`,`hr`,`img`]),Bh=new Set([`p`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`div`,`details`,`blockquote`,`pre`,`ul`,`ol`,`li`]),Vh=new Set([`paragraph`,`heading`,`div`,`details`,`blockquote`,`code`,`list`,`listItem`,`thematicBreak`]),Hh=new Set([`id`,`title`,`lang`,`dir`]),Uh={a:new Set([`href`]),img:new Set([`src`,`alt`,`width`,`height`]),ol:new Set([`start`]),details:new Set([`open`])};function Wh(e){if(!e.includes(`&`))return e;try{let t=zm(e.replace(/</g,`&lt;`),{scriptingEnabled:!1}),n=``,r=e=>{if(e.nodeName===`#text`)n+=e.value;else{for(let t of e.childNodes??[])r(t);if(e.content?.childNodes)for(let t of e.content.childNodes)r(t)}};for(let e of t.childNodes)r(e);return n}catch{return e}}function Gh(e,t){let n=Object.create(null),r=[],i=[],a=0;for(;a<e.length;){for(;a<e.length&&/\s/.test(e[a]);)a+=1;if(a>=e.length||e[a]===`/`)break;let o=a,s=/^[A-Za-z_:][A-Za-z0-9_.:-]*/.exec(e.slice(a));if(!s){a+=1;continue}let c=s[0].toLowerCase();for(a+=s[0].length;a<e.length&&/\s/.test(e[a]);)a+=1;let l=`true`;if(e[a]===`=`){for(a+=1;a<e.length&&/\s/.test(e[a]);)a+=1;let n=e[a];if(n===`"`||n===`'`){a+=1;let r=e.indexOf(n,a);if(r<0){i.push({name:c,value:``,start:t+o,end:t+e.length});break}l=Wh(e.slice(a,r)),a=r+1}else{let t=a;for(;a<e.length&&!/[\s>]/.test(e[a]);)a+=1;l=Wh(e.slice(t,a))}}let u={name:c,value:l,start:t+o,end:t+a};Object.hasOwn(n,c)||(n[c]=l),r.push(u)}return{attrs:n,entries:r,invalid:i}}var Kh=128,qh=Math.min(5e4,w),Jh=100,Yh=1e3,Xh=Lr().use(qo).use(su),Zh=class extends Error{code;start;end;key;params;constructor(e,t,n,r,i=e,a){super(t),this.code=e,this.start=n,this.end=r,this.key=i,this.params=a,this.name=`LocalBudgetError`}};function Qh(e,t){let n=[];if(typeof e!=`string`||e.length>1e6){let t=typeof e==`string`?ze(`local.budget.document`,{limit:S}):ze(`local.parse.source`);return{nodes:[],diagnostics:[{code:typeof e==`string`?`local.budget`:`local.parse`,message:typeof e==`string`?`Document exceeds the ${S}-character limit.`:`Document source must be a string.`,severity:`error`,range:{start:0,end:typeof e==`string`&&e.length?1:0},line:1,column:1,messageKey:t.key,...t.params?{params:t.params}:{}}]}}let r=Oh(t);if(!r.ok)return{nodes:[],diagnostics:[{code:`local.options.invalid`,message:r.message,severity:`error`,range:{start:0,end:0},line:1,column:1,messageKey:r.key}]};let i=r.maxSyntaxNodes,a=[0];for(let t=0;t<e.length;t+=1)e[t]===`
33
+ `&&a.push(t+1);let o=0,s=0,c=0,l=new Set(e.match(RegExp(`[0-9]+`,`g`))??[]),u=[],d=[],f=+(e.charCodeAt(0)===65279),p=e=>{if(e.type===`code`)u.push({start:e.position.start.offset+f,end:e.position.end.offset+f});else if(e.type===`footnoteDefinition`){let t=e.position?.start?.offset,n=e.position?.end?.offset;Number.isInteger(t)&&Number.isInteger(n)&&n>t&&d.push({start:t+f,end:n+f})}for(let t of e.children??[])p(t)};try{p(Xh.parse(e.slice(f)))}catch{return y(`local.parse`,`Cannot parse the Markdown document.`,0,void 0,{key:`local.parse.markdown`}),{nodes:[],diagnostics:n}}d.sort((e,t)=>e.start-t.start||t.end-e.end);let m=[];for(let e of d){let t=m[m.length-1];t&&e.start<t.end?e.end>t.end&&(t.end=e.end):m.push({...e})}let h=e=>{let t=0,n=u.length-1;for(;t<=n;){let r=t+n>>1,i=u[r];if(e<i.start)n=r-1;else if(e>=i.end)t=r+1;else return i.end}return null},g=0,_=(e,t,n,r={})=>{if(s>=i)throw new Zh(`local.budget`,`Syntax nodes exceed the limit of ${i}.`,t,n,`local.budget.nodes`,{limit:i});return s+=1,{type:e,id:`local-${o++}`,range:{start:t,end:n},...r}};function v(t,r,i,o,s=o+1,c){if(n.length>=100){if(i===`warning`)return;let e=n.length-1;for(;e>=0&&n[e].severity!==`warning`;)--e;if(e<0)return;n.splice(e,1)}let l=Math.max(0,Math.min(e.length,o)),u=Math.max(l,Math.min(e.length,Math.max(l,s))),d=0,f=a.length-1;for(;d<f;){let e=Math.ceil((d+f)/2);a[e]<=l?d=e:f=e-1}let p=d+1,m=r.length>2e3?`${r.slice(0,D-1)}…`:r,h=ze(c?.key??t,c?.params);n.push({code:t,message:m,severity:i,range:{start:l,end:u},line:p,column:l-a[d]+1,messageKey:h.key,...h.params?{params:h.params}:{}})}function y(e,t,n,r=n+1,i){v(e,t,`error`,n,r,i)}function b(e,t,n,r=n+1,i){v(e,t,`warning`,n,r,i)}let x,C,w=0,T=0,E,O=0;function k(t){let n=e.startsWith(`</theme`,t),r=!n&&e.startsWith(`<theme`,t);if(!n&&!r)return!1;let i=e[t+(n?7:6)];return i!==void 0&&(i===`>`||i===`/`||/\s/.test(i))}function A(t,n){let r=/^<(\/?)theme(?=[\s/>])/.exec(e.slice(t,n));if(!r)return null;let i=t+r[0].length,a=e.indexOf(`
34
+ `,i),o=a<0?n:Math.min(n,a),s=``,c=i;for(;c<o;c+=1){let t=e[c];if(s)t===s&&(s=``);else if(t===`"`||t===`'`)s=t;else if(t===`>`)break}let l=!!r[1];if(c>=o){let n=o;return{start:t,end:n,rest:e.slice(i,n),closing:l,selfClosing:!1,unclosed:!0}}let u=e.slice(i,c);return{start:t,end:c+1,rest:u,closing:l,selfClosing:/\/\s*$/.test(u),unclosed:!1}}function j(t,n){let r=t;for(;r<n;){let t=e[r];if(t.charCodeAt(0)===65279||t===` `||t===` `||t===`\r`||t===`
35
+ `)r+=1;else if(e.startsWith(`<!--`,r)){let t=e.indexOf(`-->`,r+4);if(t<0||t+3>n)return-1;r=t+3}else break}return r}function M(t){if(t.unclosed)return!1;let n=t.end;for(;n<e.length&&(e[n]===` `||e[n]===` `||e[n]===`\r`);)n+=1;return n>=e.length||e[n]===`
36
+ `}function N(e){if(/\{\{|\}\}/.test(e))return{code:`local.theme.expression`,key:`local.theme.expression`,message:`Theme names must be static text, not expressions.`};let t=e.replace(/\/\s*$/,``),n=/^\s*name\s*=\s*(?:"([^"]*)"|'([^']*)')\s*$/.exec(t);if(!n)return/\bname\s*=/.test(t)?{code:`local.theme.attribute`,key:`local.theme.attribute`,message:`Theme declarations only accept a quoted name attribute.`}:{code:`local.theme.name`,key:`local.theme.name.missing`,message:`A theme declaration requires a quoted name attribute.`};let r=n[1]??n[2]??``;return fh(r)?{name:r}:{code:`local.theme.name`,key:`local.theme.name.invalid`,params:{name:r,limit:64},message:`Theme name "${r}" must use lowercase letters, digits and single hyphens (maximum 64 characters).`}}function P(e){return e.replace(/&(quot|apos|amp|lt|gt);/g,(e,t)=>({quot:`"`,apos:`'`,amp:`&`,lt:`<`,gt:`>`})[t])}function F(e,t){let n=Object.create(null),r=0;for(;r<e.length;){for(;r<e.length&&/\s/.test(e[r]);)r++;if(r>=e.length||e[r]===`/`)break;let i=r,a=/^[A-Za-z][A-Za-z0-9_-]*/.exec(e.slice(r));if(!a){for(y(`local.attribute`,`Attribute names must use lowercase kebab-case.`,t+r,void 0,{key:`local.attribute.format`});r<e.length&&!/\s/.test(e[r]);)r++;continue}let o=a[0];for(r+=o.length,o.length>Kh?y(`local.budget.name`,`Attribute name exceeds the ${Kh}-character limit.`,t+i,t+r,{key:`local.budget.name.attribute`,params:{limit:Kh}}):Ih.test(o)||y(`local.attribute.name`,`Attribute name ${o} must use lowercase kebab-case.`,t+i,t+r,{key:`local.attribute.name`,params:{name:o}});r<e.length&&/\s/.test(e[r]);)r++;let s=`true`;if(e[r]===`=`){for(r++;r<e.length&&/\s/.test(e[r]);)r++;let n=e[r++];if(n!==`"`&&n!==`'`){y(`local.attribute`,`Attribute ${o} value must be quoted.`,t+Math.max(0,r-1),void 0,{key:`local.attribute.value-quoted`,params:{name:o}});break}let i=e.indexOf(n,r);if(i<0){y(`local.attribute`,`Attribute ${o} is missing a closing quote.`,t+Math.max(0,r-1),void 0,{key:`local.attribute.closing-quote`,params:{name:o}});break}s=P(e.slice(r,i)),r=i+1}if(Object.hasOwn(n,o)?y(`local.attribute.duplicate`,`Duplicate attribute ${o}.`,t+i,t+r,{key:`local.attribute.duplicate`,params:{name:o}}):n[o]=s,r<e.length&&!/\s|\//.test(e[r])){y(`local.attribute`,`Attributes must be separated by whitespace.`,t+r,void 0,{key:`local.attribute.separator`});break}}return n}function ee(t,n){let r=/^<(\/?)([A-Za-z][A-Za-z0-9_-]*)(?=[\s/>])/.exec(e.slice(t,n));if(!r)return null;let i=t+r[0].length,a=n,o=e[i];if((o===` `||o===` `||o===`
37
+ `||o===`\r`)&&!Mh.has(r[2].toLowerCase())&&!te(t)){let t=e.indexOf(`
38
+ `,i);t>=0&&(a=Math.min(n,t))}let s=``,c=i;for(;c<a;c++){let t=e[c];if(s)t===s&&(s=``);else if(t===`"`||t===`'`)s=t;else if(t===`>`)break}let l=r[2];if(c>=a)return{name:l,closing:!!r[1],self:!1,start:t,end:a,attrs:{},head:i,unclosed:!0};l.length>Kh&&y(`local.budget.name`,`Tag name exceeds the ${Kh}-character limit.`,t,t+1+l.length,{key:`local.budget.name.tag`,params:{limit:Kh}});let u=e.slice(i,c);return r[1]?(u.trim()&&y(`local.tag.closing`,`Closing tag </${l}> cannot have attributes.`,t,c+1,{key:`local.tag.closing`,params:{name:l}}),{name:l,closing:!0,self:!1,start:t,end:c+1,attrs:{},head:i,unclosed:!1}):{name:l,closing:!1,self:/\/\s*$/.test(u),start:t,end:c+1,attrs:Mh.has(l.toLowerCase())?F(u,i):{},head:i,unclosed:!1}}function I(t,n){let r=/^<(\/?)([A-Za-z][A-Za-z0-9_-]*)(?=[\s/>])/.exec(e.slice(t,n));if(!r)return null;let i=t+r[0].length,a=n,o=e[i];if((o===` `||o===` `||o===`
39
+ `||o===`\r`)&&!Mh.has(r[2].toLowerCase())&&!te(t)){let t=e.indexOf(`
40
+ `,i);t>=0&&(a=Math.min(n,t))}let s=``,c=i;for(;c<a;c++){let t=e[c];if(s)t===s&&(s=``);else if(t===`"`||t===`'`)s=t;else if(t===`>`)break}if(c>=a)return null;let l=e.slice(i,c);return{name:r[2],closing:!!r[1],self:!r[1]&&/\/\s*$/.test(l),end:c+1}}function te(t){let n=e.lastIndexOf(`
41
+ `,t-1)+1;return/^[ \t]*$/.test(e.slice(n,t))}function ne(t,n){if(e[t]!==`[`||e[t+1]!==`^`)return null;let r=t+2,i=Math.min(n,t+2+Yh);for(;r<i;r++){let t=e[r];if(t===`\\`&&/[!-/:-@\[\]\\^_`{|}~]/.test(e[r+1]??``))r+=1;else{if(t===`]`)break;if(t===`[`||t===`
42
+ `||t===`\r`)return null}}if(r>=i||e[r]!==`]`)return null;let a=e.slice(t+2,r);if(!a.trim())return null;let o=xh(a);return o?{label:a,identifier:o,openEnd:t+2,closeEnd:r+1}:null}function re(t){let n=ne(t,e.length);return!n||e[n.closeEnd]!==`:`?null:{label:n.label,identifier:n.identifier,bodyStart:n.closeEnd+1}}function ie(t,n){let r=/^<(\/?)([A-Za-z][A-Za-z0-9]*)(?=[\s/>])/.exec(e.slice(t,Math.min(n,t+64)));if(!r)return null;let i=r[2].toLowerCase();if(!Rh.has(i))return null;let a=t+r[0].length,o=``,s=a;for(;s<n;s++){let t=e[s];if(o)t===o&&(o=``);else if(t===`"`||t===`'`)o=t;else if(t===`>`)break}if(s>=n)return null;let c=e.slice(a,s),l=!!r[1],u=l?{attrs:Object.create(null),entries:[],invalid:[]}:Gh(c,a);return{lower:i,closing:l,self:!l&&/\/\s*$/.test(c),rest:c,attrs:u.attrs,entries:u.entries,invalid:u.invalid,start:t,head:a,end:s+1}}function ae(t,n,r,i){let a=1;for(let o=t;o<r;){if(!i){let e=h(o);if(e!==null&&e>o){o=Math.min(e,r);continue}}let t=fe(o,r,i);if(t!==null)o=t;else if(e.startsWith(`<!--`,o)){let t=e.indexOf(`-->`,o+4);o=t<0||t+3>r?r:t+3}else{if(e[o]===`<`){let e=ie(o,r);if(e){if(e.lower===n){if(e.closing){if(--a,a===0)return{start:o,end:e.end}}else!e.self&&!zh.has(n)&&(a+=1)}else if(!e.closing&&(e.lower===`pre`||e.lower===`code`)&&!zh.has(e.lower)){let t=ae(e.end,e.lower,r,i);if(t){o=t.end;continue}}o=e.end;continue}}o++}}return null}function oe(e,t){if(!t)return{ok:!1,attr:``};let n=Object.create(null);if(t.invalid.length)return{ok:!1,attr:t.invalid[0].name};for(let r of t.entries){let t=r.name;if(t===`class`||t===`style`||/^on[a-z]/.test(t))return{ok:!1,attr:t};let i=Hh.has(t),a=/^aria-[a-z0-9_.-]+$/.test(t),o=/^data-[a-z0-9_.-]+$/.test(t),s=Uh[e]?.has(t)??!1;if(!i&&!a&&!o&&!s||t===`dir`&&![`ltr`,`rtl`,`auto`].includes(r.value.trim().toLowerCase())||t===`id`&&r.value.trim()===``||(t===`width`||t===`height`)&&!/^\d{1,6}$/.test(r.value.trim())||t===`start`&&!/^-?\d{1,9}$/.test(r.value.trim()))return{ok:!1,attr:t};if(t===`href`||t===`src`){let e=/^([a-z][a-z0-9+.-]*):/i.exec(r.value.trim().replace(/[\u0000- ]+/g,``));if(e&&!((t===`src`?`image`:`link`)==`image`?e[1].toLowerCase()===`http`||e[1].toLowerCase()===`https`:[`http`,`https`,`mailto`,`tel`].includes(e[1].toLowerCase())))return{ok:!1,attr:t}}n[t]=r.value}return e===`details`&&Object.hasOwn(n,`open`)&&(n.open=`true`),{ok:!0,attrs:n}}function se(e){return e.length===1&&e[0].type===`paragraph`?e[0].children??[]:e}function ce(e){return e.flatMap(e=>e.type===`paragraph`?e.children??[]:[e])}function le(t,n,r,i){let a=t.start,o=n.end,s=()=>{let e=me(t.end,n.start,void 0,a,t.end,i.depth+1,{footnote:i.footnote,indent:i.indent,container:i.container,definitions:[],stripBlockquote:i.stripBlockquote});return he(t.end,n.start,e.tokens,i.indent,{literalHtml:i.footnote,stripBlockquote:i.stripBlockquote})},c=()=>se(s()),l=e=>{let t=[];for(let n of e)if(n.type===`list`)for(let e of n.children??[])e.type===`listItem`&&t.push(e);else n.type===`listItem`?t.push(n):n.type===`comment`||n.type===`text`&&!(n.value??``).trim()||t.push(_(`listItem`,n.range.start,n.range.end,{children:n.type===`paragraph`?n.children??[]:[n]}));return t};switch(t.lower){case`code`:return _(`inlineCode`,a,o,{value:Wh(e.slice(t.end,n.start))});case`pre`:{let i=e.slice(t.end,n.start),s=/^<code(?:\s[^>]*)?>([\s\S]*)<\/code>$/.exec(i);return _(`code`,a,o,{value:Wh(s?s[1]:i),attrs:r})}case`summary`:return _(`summary`,a,o,{attrs:r,children:c()});case`details`:{let e=s(),t=null,n=e.findIndex(e=>e.type===`summary`);return n<0?(n=e.findIndex(e=>e.type===`paragraph`&&e.children?.length===1&&e.children[0].type===`summary`),n>=0&&(t=e[n].children[0],e.splice(n,1))):(t=e[n],e.splice(n,1)),_(`details`,a,o,{attrs:r,children:t?[t,...e]:e})}case`p`:return _(`paragraph`,a,o,{attrs:r,children:ce(s())});case`h1`:case`h2`:case`h3`:case`h4`:case`h5`:case`h6`:return _(`heading`,a,o,{depth:Number(t.lower.slice(1)),attrs:r,children:ce(s())});case`div`:return _(`div`,a,o,{attrs:r,children:s()});case`blockquote`:return _(`blockquote`,a,o,{attrs:r,children:s()});case`ul`:case`ol`:{let e=t.lower===`ol`,n=r.start,i=e&&n!==void 0?Number(n):void 0;return _(`list`,a,o,{ordered:e,...e&&i!==void 0&&Number.isFinite(i)?{start:i}:{},attrs:r,children:l(s())})}case`li`:{let e=s();return _(`listItem`,a,o,{attrs:r,children:e.length===1&&e[0].type===`paragraph`?e[0].children??[]:e})}case`a`:return r.href===void 0?_(`span`,a,o,{attrs:r,children:c()}):_(`link`,a,o,{url:r.href,title:r.title??null,attrs:r,children:c()});case`span`:return _(`span`,a,o,{attrs:r,children:c()});default:return _(Lh[t.lower]??t.lower,a,o,{attrs:r,children:c()})}}let ue=/^ {0,3}$/,de=/^[ \t]*$/;function fe(t,n,r){let i=e[t];if(i===`\\`)return Math.min(n,t+2);if(i!=="`"&&i!==`~`)return null;let a=e.lastIndexOf(`
43
+ `,t-1)+1;if((r?de:ue).test(e.slice(a,t))){let i=/^(`{3,}|~{3,})[^\n]*(?:\n|$)/.exec(e.slice(t,n));if(i){let a=RegExp(`^${r?`[ \\t]*`:` {0,3}`}${i[1][0]}{${i[1].length},}[ \\t]*\\r?$`,`gm`);a.lastIndex=t+i[0].length;let o=a.exec(e);return o&&o.index<n?Math.min(n,o.index+o[0].length):n}}if(i==="`"){let r=/^`+/.exec(e.slice(t,n))[0],i=e.indexOf(r,t+r.length);for(;i>=0&&i<n;){if(e[i-1]!=="`"&&e[i+r.length]!=="`")return i+r.length;i=e.indexOf(r,i+r.length)}return t+r.length}return null}function pe(t,n,r,i){let a=1;for(let o=t;o<r;){if(!i){let e=h(o);if(e!==null&&e>o){o=Math.min(e,r);continue}}let t=fe(o,r,i);if(t!==null)o=t;else if(e.startsWith(`<!--`,o)){let t=e.indexOf(`-->`,o+4);o=t<0||t+3>r?r:t+3}else{if(e[o]===`<`){let e=I(o,r);if(e){if(e.name===n){if(e.closing){if(--a,a===0)return{start:o,end:e.end}}else e.self||(a+=1)}o=e.end;continue}}o++}}return null}function L(t,n){let r=``;for(let i=t+2;i<n-1;i++){let t=e[i];if(r)t===`\\`?i++:t===r&&(r=``);else if(t===`"`||t===`'`)r=t;else if(t===`}`&&e[i+1]===`}`)return i+2}return-1}function R(t,n){let r=1/0,i=``,a=0,o=t;for(;o<n;){let t=e.indexOf(`
39
44
  `,o),s=t<0||t>n?n:t,c=e.slice(o,s);if(e.lastIndexOf(`
40
- `,o-1)+1===o){if(i)RegExp(`^[ \\t]*${i}{${a},}[ \\t]*\\r?$`).test(c)&&(i=``);else{let e=/^([ \t]*)(`{3,}|~{3,})/.exec(c);e?(r=Math.min(r,e[1].length),i=e[2][0],a=e[2].length):c.trim()!==``&&(r=Math.min(r,/^[ \t]*/.exec(c)[0].length))}}if(s>=n)break;o=s+1}return Number.isFinite(r)?r:0}function ce(t,n,r,i=t,a=t,o=0){let s=[];if(o>Ku)return v(`local.budget`,`Component nesting exceeds the 100-level limit.`,i,a,{key:`local.budget.nesting`,params:{limit:Ku}}),{tokens:s,end:n,contentEnd:t,indent:0};let c=p;if(r){let i=ae(t,r,n,!0)?.start??n,a=se(t,i),o=``,s=[];for(let n=t;n<i;){if(n===0||e[n-1]===`
41
- `){let t=0;for(;t<a&&n<i&&/[ \t]/.test(e[n]);)n++,t++}if(n>=i)break;s.push(n),o+=e[n++]}s.push(i);let l=[],u=e=>{if(e.type===`footnoteReference`||e.type===`footnoteDefinition`)l.push({start:s[e.position.start.offset],end:s[e.position.end.offset],block:e.type===`footnoteDefinition`});else for(let t of e.children??[])u(t)};u(qu.parse(o)),c=[...p.filter(e=>e.start>=t&&e.end<=i),...l].sort((e,t)=>e.start-t.start||t.end-e.end)}let u=0;for(let i=t;i<n;){if(r===void 0){for(;l[h]?.end<=i;)h++;let e=l[h];if(e&&e.start<=i){i=e.end;continue}}for(;c[u]?.end<=i;)u++;let a=c[u];if(a&&a.start<=i){a.start===i&&(s.push({start:i,end:a.end,block:a.block,node:g(`fallback`,i,a.end,{value:e.slice(i,a.end)})}),y(`local.footnote.unsupported`,`Footnotes are not part of the local interaction syntax and are shown as source.`,i,a.end,{key:`local.footnote.unsupported`})),i=a.end;continue}let d=ie(i,n,r!==void 0);if(d!==null)i=d;else if(e.startsWith(`<!--`,i)){let t=e.indexOf(`-->`,i+4),a=t<0?n:Math.min(n,t+3),o=e.slice(i,a);if(/^<!--\s*reactive-md(?=[\s:]|-->|$)/i.test(o)){E+=1;let n=e.lastIndexOf(`
45
+ `,o-1)+1===o){if(i)RegExp(`^[ \\t]*${i}{${a},}[ \\t]*\\r?$`).test(c)&&(i=``);else{let e=/^([ \t]*)(`{3,}|~{3,})/.exec(c);e?(r=Math.min(r,e[1].length),i=e[2][0],a=e[2].length):c.trim()!==``&&(r=Math.min(r,/^[ \t]*/.exec(c)[0].length))}}if(s>=n)break;o=s+1}return Number.isFinite(r)?r:0}function me(t,n,r,i=t,a=t,o=0,s={}){let c=[];if(o>Jh)return y(`local.budget`,`Component nesting exceeds the 100-level limit.`,i,a,{key:`local.budget.nesting`,params:{limit:Jh}}),{tokens:c,end:n,contentEnd:t,indent:0};let l=s.footnote===!0,d=s.container??r!==void 0,f=s.indent??0,p=s.definitions??m;if(r){let i=pe(t,r,n,!0)?.start??n,a=R(t,i);f=a;let o=``,s=[];for(let n=t;n<i;){if(n===0||e[n-1]===`
46
+ `){let t=0;for(;t<a&&n<i&&/[ \t]/.test(e[n]);)n++,t++}if(n>=i)break;s.push(n),o+=e[n++]}s.push(i);let c=[],l=e=>{if(e.type===`footnoteDefinition`){let t=s[e.position.start.offset],n=s[e.position.end.offset];Number.isInteger(t)&&Number.isInteger(n)&&n>t&&c.push({start:t,end:n})}else for(let t of e.children??[])l(t)};l(Xh.parse(o)),p=c.filter(e=>e.start>=t&&e.end<=i).sort((e,t)=>e.start-t.start||t.end-e.end)}let h=0;for(let i=t;i<n;){if(!d){for(;u[g]?.end<=i;)g++;let e=u[g];if(e&&e.start<=i){i=e.end;continue}}for(;p[h]?.end<=i;)h++;let a=p[h];if(a&&a.start===i){let t=i,n=re(t);for(;!n&&t-i<4&&t<a.end&&(e[t]===` `||e[t]===` `);)t+=1,n=re(t);if(n&&n.bodyStart<=a.end){let r=e.lastIndexOf(`
47
+ `,t-1)+1,s=e.slice(r,t),l=/^(?:[ \t]{0,3}>[ \t]?)+/.exec(s)?.[0]??``,u=/^[ \t]*/.exec(s.slice(l.length))[0].length,f=u+4,p=me(n.bodyStart,a.end,void 0,n.bodyStart,n.bodyStart,o+1,{footnote:!0,indent:f,container:d||u>0,definitions:[],stripBlockquote:l.length>0}),m=he(n.bodyStart,a.end,p.tokens,f,{literalHtml:!0,stripBlockquote:l.length>0});c.push({start:a.start,end:a.end,block:!0,node:_(`footnoteDefinition`,a.start,a.end,{identifier:n.identifier,label:n.label,children:m})}),i=a.end,h+=1;continue}h+=1}let m=fe(i,n,d);if(m!==null)i=m;else if(e.startsWith(`<!--`,i)){let t=e.indexOf(`-->`,i+4),a=t<0?n:Math.min(n,t+3),o=e.slice(i,a);if(!l&&/^<!--\s*reactive-md(?=[\s:]|-->|$)/i.test(o)){O+=1;let n=e.lastIndexOf(`
42
48
  `,i-1)+1,s=e.indexOf(`
43
- `,a),c=/^\s*$/.test(e.slice(n,i))&&/^\s*$/.test(e.slice(a,s<0?e.length:s)),l=/^<!--[ \t]*reactive-md:[ \t]*(local-draft-[1-9][0-9]*)[ \t]*-->$/.exec(o);E>1?v(`local.version.duplicate`,`Only one source syntax declaration is allowed.`,i,a):!l||t<0||/[\r\n]/.test(o)?v(`local.version.malformed`,`Use <!-- reactive-md: local-draft-2 --> on one line.`,i,a):(T={version:l[1],range:{start:i,end:a}},r!==void 0||!c||A(0,i)!==i?v(`local.version.placement`,`The syntax declaration must be on its own line before the theme and document body.`,i,a):l[1]!==`local-draft-2`&&v(`local.version.unsupported`,`This reader accepts ${au}; migrate ${l[1]} or use a compatible reader.`,i,a,{key:`local.version.unsupported`,params:{declared:l[1],supported:au}}))}s.push({start:i,end:a,node:g(`comment`,i,a)}),i=a}else if(e.startsWith(`{{`,i)){let t=oe(i,n);if(t<0){v(`local.interpolation`,`Interpolation is missing }}.`,i,n,{key:`local.interpolation.unclosed`}),i+=2;continue}s.push({start:i,end:t,node:g(`interpolation`,i,t,{value:e.slice(i+2,t-2).trim()})}),i=t}else if(e[i]===`$`){let t=e[i+1]===`$`,r=t?`$$`:`$`,a=i+r.length;for(;a<n;a++)if(e[a]===`\\`)a++;else if(!t&&e[a]===`
44
- `||e.startsWith(r,a))break;if(a>=n||!e.startsWith(r,a)){v(`local.math.unclosed`,`Formula is missing its closing delimiter.`,i,void 0,{key:`local.math.unclosed`}),i+=r.length;continue}let o=e.slice(i+r.length,a);t||o&&!/^\s|\s$/.test(o)||v(`local.math.whitespace`,`Inline math cannot start or end with whitespace.`,i,a+1,{key:`local.math.whitespace`}),o.length>Gu&&(v(`local.budget.math`,`Formula exceeds the ${Gu}-character limit.`,i,a+r.length,{key:`local.budget.math`,params:{limit:Gu}}),o=o.slice(0,Gu));let c=a+r.length;s.push({start:i,end:c,node:g(t?`math`:`inlineMath`,i,c,{value:o})}),i=c}else{if(e[i]===`<`){let a=O(i)?k(i,n):null;if(a){if(r===void 0&&A(w,i)===i){if(C+=1,C===1&&(x={start:a.start,end:a.end}),a.unclosed)y(`local.theme.malformed`,`Theme declaration is missing >.`,i,a.end,{key:`local.theme.malformed.unclosed`});else if(a.closing)y(`local.theme.malformed`,`A theme declaration cannot be a closing tag.`,i,a.end,{key:`local.theme.malformed.closing`});else if(!j(a))y(`local.theme.malformed`,`A theme declaration must be on its own line before the document content.`,i,a.end,{key:`local.theme.malformed.placement`});else if(C>1)y(`local.theme.duplicate`,`Only one theme declaration is allowed before the document content; this declaration is ignored.`,i,a.end,{key:`local.theme.duplicate.declaration`});else{let e=M(a.rest);e.code?y(e.code,e.message??`Invalid theme declaration.`,i,a.end,{key:e.key??e.code,...e.params?{params:e.params}:{}}):b=e.name}w=a.end,s.push({start:i,end:a.end,block:!0,node:g(`comment`,i,a.end)}),i=a.end;continue}let t=r===void 0?`local.theme.late`:`local.theme.nested`;y(t,r===void 0?`Theme declarations after document content are ignored.`:`Theme declarations inside document content are ignored.`,i,a.end,{key:t}),s.push({start:i,end:a.end,block:!1,node:g(`fallback`,i,a.end,{value:e.slice(i,a.end)})}),i=a.end;continue}let c=te(i,n);if(c&&!c.closing&&Hu.test(c.name)&&c.name.length<=Wu&&!zu.has(c.name)){let t=c.self?c.end:ae(c.end,c.name,n,r!==void 0)?.end??null;if(t===null){v(`local.tag.unclosed`,`<${c.name}> is missing </${c.name}>.`,i,c.end,{key:`local.tag.unclosed.pair`,params:{name:c.name}}),i=c.end;continue}let a=Tu(c.name);y(`local.component.unknown`,`Unknown component <${c.name}>. ${a?`Did you mean <${a}>?`:`This mode only accepts local interaction components.`}`,i,t,{key:a?`local.component.unknown.suggestion`:`local.component.unknown`,params:a?{name:c.name,suggestion:a}:{name:c.name}}),s.push({start:i,end:t,block:F(i),node:g(`fallback`,i,t,{value:e.slice(i,t)})}),i=t;continue}let l=P(i,n);if(l){if(l.closing){if(l.name===r)return{tokens:s,end:l.end,contentEnd:i,indent:se(t,i)};v(`local.tag.mismatch`,`Closing tag </${l.name}> does not match ${r?`<${r}>`:`the document root`}.`,i,l.end,{key:r?`local.tag.mismatch.parent`:`local.tag.mismatch.root`,params:r?{name:l.name,parent:r}:{name:l.name}}),i=l.end;continue}let e=Iu.has(l.name)||l.self;if(l.self&&Lu.has(l.name)&&v(`local.tag.shape`,`<${l.name}> requires a closing tag.`,i,l.end,{key:`local.tag.shape`,params:{name:l.name}}),e){s.push({start:i,end:l.end,node:g(`component`,i,l.end,{name:l.name,attrs:l.attrs,children:[]})}),i=l.end;continue}let a=ce(l.end,n,l.name,i,l.end,o+1),c=le(l.end,a.contentEnd,a.tokens,Ru.has(l.name)?0:a.indent),u=g(`component`,i,a.end,{name:l.name,attrs:l.attrs,children:Ru.has(l.name)&&c.length===1&&c[0].type===`paragraph`?c[0].children??[]:c});s.push({start:i,end:a.end,node:u}),i=a.end;continue}}i++}}return r&&v(`local.tag.unclosed`,`<${r}> is missing </${r}>.`,i,Math.min(e.length,Math.max(a,i+1)),{key:`local.tag.unclosed.pair`,params:{name:r}}),{tokens:s,end:n,contentEnd:n,indent:r?se(t,n):0}}function le(t,n,r,i=0){let a=``,o=t,l=[],u=new Map,d=new Map;function f(t){let n=e.lastIndexOf(`
45
- `,t-1)+1,r=d.get(n);if(r===void 0){for(r=0;r<i&&(e[n+r]===` `||e[n+r]===` `);)r++;d.set(n,r)}return{lineStart:n,skip:r}}function p(e,t,n){if(n&&t===0&&e.charCodeAt(0)===65279&&(e=e.slice(1),t+=1),n&&i>0)for(let n=0;n<e.length;n++){let r=t+n,{lineStart:i,skip:o}=f(r);r<i+o||(a+=e[n],l.push(r))}else{a+=e;for(let r=0;r<e.length;r++)l.push(n?t+r:t)}}for(let t of r){p(e.slice(o,t.start),o,!0);let n;do n=Bu+s+++Vu;while(c.has(n));let r=t.block??(t.node.type===`math`||t.node.type===`component`&&!Ru.has(t.node.name));r&&p(`
49
+ `,a),c=/^\s*$/.test(e.slice(n,i))&&/^\s*$/.test(e.slice(a,s<0?e.length:s)),l=/^<!--[ \t]*reactive-md:[ \t]*(local-draft-[1-9][0-9]*)[ \t]*-->$/.exec(o);O>1?y(`local.version.duplicate`,`Only one source syntax declaration is allowed.`,i,a):!l||t<0||/[\r\n]/.test(o)?y(`local.version.malformed`,`Use <!-- reactive-md: local-draft-2 --> on one line.`,i,a):(E={version:l[1],range:{start:i,end:a}},r!==void 0||!c||j(0,i)!==i?y(`local.version.placement`,`The syntax declaration must be on its own line before the theme and document body.`,i,a):l[1]!==`local-draft-2`&&y(`local.version.unsupported`,`This reader accepts ${Bm}; migrate ${l[1]} or use a compatible reader.`,i,a,{key:`local.version.unsupported`,params:{declared:l[1],supported:Bm}}))}c.push({start:i,end:a,node:_(`comment`,i,a)}),i=a}else if(!l&&e.startsWith(`{{`,i)){let t=L(i,n);if(t<0){y(`local.interpolation`,`Interpolation is missing }}.`,i,n,{key:`local.interpolation.unclosed`}),i+=2;continue}c.push({start:i,end:t,node:_(`interpolation`,i,t,{value:e.slice(i+2,t-2).trim()})}),i=t}else if(!l&&e[i]===`$`){let t=e[i+1]===`$`,r=t?`$$`:`$`;if(t){let t=i+r.length;for(;t<n;t++)if(e[t]===`\\`)t++;else if(e.startsWith(r,t))break;if(t>=n||!e.startsWith(r,t)){y(`local.math.unclosed`,`Formula is missing its closing delimiter.`,i,void 0,{key:`local.math.unclosed`}),i+=r.length;continue}let a=e.slice(i+r.length,t);a.length>qh&&(y(`local.budget.math`,`Formula exceeds the ${qh}-character limit.`,i,t+r.length,{key:`local.budget.math`,params:{limit:qh}}),a=a.slice(0,qh));let o=t+r.length;c.push({start:i,end:o,node:_(`math`,i,o,{value:a})}),i=o;continue}let a=i+1,o=-1;for(;a<n;a++){let t=e[a];if(t===`\\`){a++;continue}if(t===`
50
+ `)break;if(t!==`$`)continue;let n=e.slice(i+1,a),r=e[a+1];if(!n||/^\s/.test(n)||/\s$/.test(n)||r!==void 0&&r>=`0`&&r<=`9`)break;o=a;break}if(o<0){i+=1;continue}let s=e.slice(i+1,o);s.length>qh&&(y(`local.budget.math`,`Formula exceeds the ${qh}-character limit.`,i,o+1,{key:`local.budget.math`,params:{limit:qh}}),s=s.slice(0,qh));let l=o+1;c.push({start:i,end:l,node:_(`inlineMath`,i,l,{value:s})}),i=l}else{if(e[i]===`[`){let t=ne(i,n);if(t&&(e[t.closeEnd]!==`:`||!te(i))){c.push({start:i,end:t.closeEnd,node:_(`footnoteReference`,i,t.closeEnd,{identifier:t.identifier,label:t.label})}),i=t.closeEnd;continue}}if(e[i]===`<`){let a=ie(i,n);if(a){if(a.closing){c.push({start:i,end:a.end,block:!1,node:_(`fallback`,i,a.end,{value:e.slice(i,a.end)})}),i=a.end;continue}let t=oe(a.lower,a);if(!t.ok){let r=a.self||zh.has(a.lower)?a.end:ae(a.end,a.lower,n,d)?.end??a.end;b(`local.html`,`HTML attribute ${t.attr} is not supported; the tag is shown as source.`,i,r,{key:`local.html`}),c.push({start:i,end:r,block:!1,node:_(`fallback`,i,r,{value:e.slice(i,r)})}),i=r;continue}let r=t.attrs;if(zh.has(a.lower)){if(a.lower===`br`)c.push({start:i,end:a.end,node:_(`break`,i,a.end,{attrs:r})});else if(a.lower===`hr`)c.push({start:i,end:a.end,block:!0,node:_(`thematicBreak`,i,a.end,{attrs:r})});else{let e=r.width===void 0?void 0:Number(r.width),t=r.height===void 0?void 0:Number(r.height);c.push({start:i,end:a.end,node:_(`image`,i,a.end,{url:r.src,alt:r.alt??``,title:r.title??null,...e===void 0?{}:{width:e},...t===void 0?{}:{height:t},attrs:r})})}i=a.end;continue}let u=ae(a.end,a.lower,n,d);if(!u){c.push({start:i,end:a.end,block:!1,node:_(`text`,i,a.end,{value:e.slice(i,a.end)})}),i=a.end;continue}let p=Bh.has(a.lower),m=le(a,u,r,{footnote:l,container:d,indent:f,stripBlockquote:s.stripBlockquote===!0,depth:o});c.push({start:i,end:u.end,...p?{block:!0}:{},node:m}),i=u.end;continue}if(l){i+=1;continue}let u=k(i)?A(i,n):null;if(u){if(r===void 0&&j(T,i)===i){if(w+=1,w===1&&(C={start:u.start,end:u.end}),u.unclosed)b(`local.theme.malformed`,`Theme declaration is missing >.`,i,u.end,{key:`local.theme.malformed.unclosed`});else if(u.closing)b(`local.theme.malformed`,`A theme declaration cannot be a closing tag.`,i,u.end,{key:`local.theme.malformed.closing`});else if(!M(u))b(`local.theme.malformed`,`A theme declaration must be on its own line before the document content.`,i,u.end,{key:`local.theme.malformed.placement`});else if(w>1)b(`local.theme.duplicate`,`Only one theme declaration is allowed before the document content; this declaration is ignored.`,i,u.end,{key:`local.theme.duplicate.declaration`});else{let e=N(u.rest);e.code?b(e.code,e.message??`Invalid theme declaration.`,i,u.end,{key:e.key??e.code,...e.params?{params:e.params}:{}}):x=e.name}T=u.end,c.push({start:i,end:u.end,block:!0,node:_(`comment`,i,u.end)}),i=u.end;continue}let t=r===void 0?`local.theme.late`:`local.theme.nested`;b(t,r===void 0?`Theme declarations after document content are ignored.`:`Theme declarations inside document content are ignored.`,i,u.end,{key:t}),c.push({start:i,end:u.end,block:!1,node:_(`fallback`,i,u.end,{value:e.slice(i,u.end)})}),i=u.end;continue}let p=I(i,n);if(p&&!p.closing&&Fh.test(p.name)&&p.name.length<=Kh&&!Mh.has(p.name)){let t=p.self?p.end:pe(p.end,p.name,n,d)?.end??null;if(t===null){if(!te(i)){c.push({start:i,end:p.end,block:!1,node:_(`text`,i,p.end,{value:e.slice(i,p.end)})}),i=p.end;continue}y(`local.tag.unclosed`,`<${p.name}> is missing </${p.name}>.`,i,p.end,{key:`local.tag.unclosed.pair`,params:{name:p.name}}),i=p.end;continue}let r=oh(p.name);b(`local.component.unknown`,`Unknown component <${p.name}>. ${r?`Did you mean <${r}>?`:`This mode only accepts local interaction components.`}`,i,t,{key:r?`local.component.unknown.suggestion`:`local.component.unknown`,params:r?{name:p.name,suggestion:r}:{name:p.name}}),c.push({start:i,end:t,block:te(i),node:_(`fallback`,i,t,{value:e.slice(i,t)})}),i=t;continue}let m=ee(i,n);if(m){if(m.unclosed){if(!Mh.has(m.name.toLowerCase())&&!te(i)){c.push({start:i,end:m.head,block:!1,node:_(`text`,i,m.head,{value:e.slice(i,m.head)})}),i=m.head;continue}y(`local.tag.unclosed`,`Tag ${m.name} is missing >.`,i,n,{key:`local.tag.unclosed.open`,params:{name:m.name}}),i=n;continue}if(!Fh.test(m.name)&&!Mh.has(m.name.toLowerCase())){c.push({start:i,end:m.end,block:!1,node:_(`text`,i,m.end,{value:e.slice(i,m.end)})}),i=m.end;continue}if(Fh.test(m.name)||y(`local.tag.name`,`Tag name ${m.name} must use lowercase kebab-case.`,i,i+1+m.name.length,{key:`local.tag.name`,params:{name:m.name}}),m.closing){if(m.name===r)return{tokens:c,end:m.end,contentEnd:i,indent:R(t,i)};y(`local.tag.mismatch`,`Closing tag </${m.name}> does not match ${r?`<${r}>`:`the document root`}.`,i,m.end,{key:r?`local.tag.mismatch.parent`:`local.tag.mismatch.root`,params:r?{name:m.name,parent:r}:{name:m.name}}),i=m.end;continue}let a=kh.has(m.name)||m.self;if(m.self&&Ah.has(m.name)&&y(`local.tag.shape`,`<${m.name}> requires a closing tag.`,i,m.end,{key:`local.tag.shape`,params:{name:m.name}}),a){c.push({start:i,end:m.end,node:_(`component`,i,m.end,{name:m.name,attrs:m.attrs,children:[]})}),i=m.end;continue}let s=me(m.end,n,m.name,i,m.end,o+1),l=he(m.end,s.contentEnd,s.tokens,jh.has(m.name)?0:s.indent),u=_(`component`,i,s.end,{name:m.name,attrs:m.attrs,children:jh.has(m.name)&&l.length===1&&l[0].type===`paragraph`?l[0].children??[]:l});c.push({start:i,end:s.end,node:u}),i=s.end;continue}}i++}}return r&&y(`local.tag.unclosed`,`<${r}> is missing </${r}>.`,i,Math.min(e.length,Math.max(a,i+1)),{key:`local.tag.unclosed.pair`,params:{name:r}}),{tokens:c,end:n,contentEnd:n,indent:r?R(t,n):0}}function he(t,n,r,i=0,a={}){let o=``,s=t,u=[],d=new Map,f=new Map;function p(t){let n=e.lastIndexOf(`
51
+ `,t-1)+1,r=f.get(n);if(r===void 0){r=a.stripBlockquote?/^(?:[ \t]{0,3}>[ \t]?)+/.exec(e.slice(n))?.[0].length??0:0;let t=0;for(;t<i&&(e[n+r]===` `||e[n+r]===` `);)r++,t++;f.set(n,r)}return{lineStart:n,skip:r}}function m(e,t,n){if(n&&t===0&&e.charCodeAt(0)===65279&&(e=e.slice(1),t+=1),n&&i>0)for(let n=0;n<e.length;n++){let r=t+n,{lineStart:i,skip:a}=p(r);r<i+a||(o+=e[n],u.push(r))}else{o+=e;for(let r=0;r<e.length;r++)u.push(n?t+r:t)}}for(let t of r){m(e.slice(s,t.start),s,!0);let n;do n=Nh+c+++Ph;while(l.has(n));let r=t.block??(t.node.type===`math`||t.node.type===`component`&&!jh.has(t.node.name));r&&m(`
46
52
 
47
- `,t.start,!1);let i=a.length;p(`![${n}](rmd-internal:placeholder)`,t.start,!1),u.set(i,{marker:n,end:a.length,node:t.node}),r&&p(`
53
+ `,t.start,!1);let i=o.length;m(`![${n}](rmd-internal:placeholder)`,t.start,!1),d.set(i,{marker:n,end:o.length,node:t.node}),r&&m(`
48
54
 
49
- `,t.end,!1),o=t.end}p(e.slice(o,n),o,!0),l.push(n);let m=qu.parse(a);function h(e){for(let t of e)t.type===`interpolation`&&t.value!==void 0&&(t.value=t.value.replace(/\\\|/g,`|`)),t.children&&h(t.children)}function _(r){let i=l[r.position?.start?.offset??0]??t,o=l[r.position?.end?.offset??a.length]??n;if(r.type===`image`){let e=u.get(r.position?.start?.offset);if(e&&r.position.end.offset===e.end&&r.url===`rmd-internal:placeholder`&&r.alt===e.marker)return u.delete(r.position.start.offset),e.node.type===`comment`?[]:[e.node]}if(r.type===`text`)return r.value?[g(`text`,i,o,{value:r.value})]:[];if(r.type===`footnoteReference`||r.type===`footnoteDefinition`)return y(`local.footnote.unsupported`,`Footnotes are not part of the local interaction syntax and are shown as source.`,i,o,{key:`local.footnote.unsupported`}),[g(`fallback`,i,o,{value:e.slice(i,o)})];let s=r.children?.flatMap(_);if(r.type===`paragraph`&&s?.length===1&&(s[0].type===`math`||s[0].type===`fallback`||s[0].type===`component`&&!Ru.has(s[0].name)))return s;if(r.type===`paragraph`&&!s?.length)return[];if(r.type===`html`)return v(`local.html`,`Raw HTML is not part of the local interaction syntax.`,i,o,{key:`local.html`}),[];let c=g(r.type,i,o);for(let e of[`value`,`depth`,`ordered`,`start`,`checked`,`url`,`title`,`alt`,`lang`,`align`])r[e]!==void 0&&(c[e]=r[e]);return s&&(c.children=s),r.type===`table`&&c.children&&h(c.children),[c]}return m.children.flatMap(_)}try{let t=ce(0,e.length);return{nodes:le(0,e.length,t.tokens),diagnostics:n,...T?{versionDeclaration:T}:{},...b===void 0?{}:{theme:b},...x?{themeRange:x}:{}}}catch(e){return e instanceof Ju?(v(e.code,e.message,e.start,e.end,{key:e.key,params:e.params}),{nodes:[],diagnostics:n}):(v(`local.parse`,`Cannot parse document: ${e instanceof Error?e.message:String(e)}`,0,void 0,{key:`local.parse.document`,params:{detail:e instanceof Error?e.message:String(e)}}),{nodes:[],diagnostics:n})}}var Zu=`local.validation.failed`,Qu=`local.validation.expression`,$u=`Validation failed.`;function ed(e){return e.length>2e3?`${e.slice(0,D-1)}…`:e}function td(e){let t=e.trim();return t?t.split(/\s+/):[]}function K(e){let t=[0];for(let n=0;n<e.length;n+=1)e[n]===`
50
- `&&t.push(n+1);return t}function q(e){if(!e||typeof e!=`object`)return!1;let t=e,n=t.range;return typeof t.expression==`string`&&typeof t.message==`string`&&Array.isArray(t.fields)&&!!n&&Number.isFinite(n.start)&&Number.isFinite(n.end)}function nd(e,t,n,r,i){let a=e.length,o=Math.max(0,Math.min(a,Math.trunc(n.start))),s=Math.max(o+1,Math.min(a,Math.trunc(n.end))),c=0,l=Math.max(0,t.length-1);for(;c<l;){let e=Math.ceil((c+l)/2);t[e]<=o?c=e:l=e-1}return{code:r,message:i,severity:`error`,range:{start:o,end:s},line:c+1,column:o-t[c]+1}}var rd=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,id=/^[A-Za-z_][A-Za-z0-9_]*$/,ad=1e-9,od=128,sd=4,cd=3,ld=new Set([`x`,`y`,`true`,`false`,`null`,`pi`,`e`]);function ud(e){let t=e.trim();if(!rd.test(t))return null;let n=Number(t);return Number.isFinite(n)?n:null}function dd(e){return e===``||be(e)!==null}function fd(e){return Array.isArray(e)?e.slice():e}function pd(e,t,n){let r=(e-t)/n;return Math.abs(r-Math.round(r))<=ad*Math.max(1,Math.abs(r))}function md(e,t,n){let r=e??0,i=e===void 0?-1/0:Math.ceil((e-r)/n),a=t===void 0?1/0:Math.floor((t-r)/n);if(i>a)return null;let o=-r/n,s=null;for(let e of[Math.floor(o),Math.ceil(o)]){let t=Math.min(a,Math.max(i,e));if(!Number.isFinite(t))continue;if(s===null){s=t;continue}let o=r+t*n,c=r+s*n;(Math.abs(o)<Math.abs(c)||Math.abs(o)===Math.abs(c)&&o<c)&&(s=t)}if(s===null)return null;let c=r+s*n;return e!==void 0&&c<e||t!==void 0&&c>t?null:c}function hd(e){let t=[],n=[];for(let r=0;r<e.length;){if(e[r]===`\\`&&e.startsWith(`{{`,r+1)){r+=3;continue}if(!e.startsWith(`{{`,r)){r++;continue}let i=``,a=r+2;for(;a<e.length-1;a++){let t=e[a];if(i)t===`\\`?a++:t===i&&(i=``);else if(t===`"`||t===`'`)i=t;else if(t===`}`&&e[a+1]===`}`)break}if(a>=e.length-1){n.push(r);break}let o=e.slice(r+2,a),s=o.length-o.trimStart().length;t.push({expression:o.trim(),start:r+2+s,end:a}),r=a+2}return{segments:t,unterminated:n}}function gd(e){let t=/^\s*\{\{([\s\S]*)\}\}\s*$/.exec(e);if(!t)return null;let n=t[1],r=n.length-n.trimStart().length,i=e.indexOf(`{{`);return{expression:n.trim(),start:i+2+r}}function _d(e){return e.type===`comment`||e.type===`text`&&!(e.value??``).trim()||e.type===`paragraph`&&!e.children?.length&&!(e.value??``).trim()}function vd(e){return(e??[]).filter(e=>!_d(e))}function yd(e){return e.type===`text`||e.type===`inlineCode`||e.type===`fallback`?e.value??``:e.type===`interpolation`?`\0`:e.type===`break`?` `:(e.children??[]).map(yd).join(``)}function bd(e){return e.type===`interpolation`||(e.children??[]).some(bd)}function xd(e){return e.type===`component`||(e.children??[]).some(xd)}function J(e){switch(e){case`string`:return`string`;case`number`:return`number`;case`boolean`:return`boolean`;case`null`:return`null`;case`array`:return`array`;case`number-array`:return`number-array`}}function Sd(e,t){if(typeof e!=`string`||e.length>1e6)return{ok:!1,diagnostics:Xu(e,t).diagnostics};let n=[],r=[0];for(let t=0;t<e.length;t+=1)e[t]===`
51
- `&&r.push(t+1);let i=(t,i,a,o=a+1,s)=>{if(n.length>=100){let e=n.length-1;for(;e>=0&&n[e].severity!==`warning`;)--e;if(e<0)return;n.splice(e,1)}let c=Math.max(0,Math.min(e.length,a)),l=Math.max(c,Math.min(e.length,Math.max(c,o))),u=0,d=r.length-1;for(;u<d;){let e=Math.ceil((u+d)/2);r[e]<=c?u=e:d=e-1}let f=Be(s?.key??t,s?.params);n.push({code:t,message:i.length>2e3?`${i.slice(0,D-1)}…`:i,severity:`error`,range:{start:c,end:l},line:u+1,column:c-r[u]+1,messageKey:f.key,...f.params?{params:f.params}:{}})},a;try{a=Xu(e,t)}catch(e){return i(`local.parse`,`Cannot parse document: ${e instanceof Error?e.message:String(e)}`,0,void 0,{key:`local.parse.document`,params:{detail:e instanceof Error?e.message:String(e)}}),{ok:!1,diagnostics:n}}if(n.push(...a.diagnostics),n.some(e=>e.severity===`error`&&e.code.startsWith(`local.version.`)))return{ok:!1,diagnostics:n.filter(e=>e.code.startsWith(`local.version.`))};for(let e of Cd(a.nodes))i(`local.legacy`,`Legacy reactive-md configuration fences (state/data/computed/actions, etc.) are not part of the local interaction syntax; select legacy mode explicitly in the host.`,e.range.start,e.range.end,{key:`local.legacy`});let o={source:e,lineStarts:r,nodes:a.nodes,report:i,entries:[],attrs:new Map,options:new Map,tabs:new Map,steps:new Map,selections:new Map,diagramNodes:new Map,checklists:new Map,tables:new Map,tableShapes:new Map,bindingSlots:Object.create(null),bindingKinds:{},computationKinds:{},computations:{},expressionKinds:new Map};wd(a.nodes,null,o.entries,o);for(let e of o.entries)o.attrs.set(e.node.id,Dd(e,o)),Ad(e,o);for(let e of o.entries)Md(e,o);Of(o);let s=Bd(o);o.bindingKinds=Vd(s),af(o),cf(o),hf(o);let c=gf(o);bf(o),Tf(o);let l={};for(let[e,t]of Object.entries(s))l[e]=fd(t.initial);if(lf(o,s,l),n.sort((e,t)=>e.range.start-t.range.start||e.range.end-t.range.end),n.some(e=>e.severity===`error`))return{ok:!1,diagnostics:n};let u=tf(o),d=Object.keys(o.computations),f={syntax:`local`,source:e,syntaxVersion:au,...a.versionDeclaration?{versionDeclaration:a.versionDeclaration}:{},nodes:sf(a.nodes),initialState:l,bindings:s,theme:a.theme??Ou.name,...a.themeRange?{themeRange:a.themeRange}:{},...u?{bindingSlots:u}:{},...d.length?{computations:o.computations}:{},...c.length?{validations:c}:{}};return Wn(f),Df(f,o.tableShapes),{ok:!0,document:f,diagnostics:n}}function Cd(e){let t=[],n=e=>{for(let r of e)r.type===`code`&&(r.lang??``).trim().toLowerCase()===`reactive-md`&&t.push(r),r.children&&n(r.children)};return n(e),t}function wd(e,t,n,r){for(let i of e){let e=t;if(i.type===`component`&&i.name){let a=Su(i.name);if(a){let r={node:i,name:i.name,schema:a,parent:t};n.push(r),e=r}else{let e=i.name.length<=od?Tu(i.name):void 0;r.report(`local.component.unknown`,`Unknown component <${i.name}>. ${e?`Did you mean <${e}>?`:`This mode only accepts local interaction components.`}`,i.range.start,i.range.end,{key:e?`local.component.unknown.suggestion`:`local.component.unknown`,params:e?{name:i.name,suggestion:e}:{name:i.name}})}}i.children&&wd(i.children,e,n,r)}}function Td(e,t,n){let r=``,i=t;for(;i<n;i+=1){let t=e[i];if(r)t===r&&(r=``);else if(t===`"`||t===`'`)r=t;else if(t===`>`){i+=1;break}}return e.slice(t,i)}function Ed(e,t,n){if(n.length>od)return t.node.range.start;let r=Td(e.source,t.node.range.start,t.node.range.end),i=RegExp(`(?:^|[\\s"'/])${n.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}(?=\\s|=|/|>)`).exec(r);return i?t.node.range.start+i.index+(i[0].length-n.length):t.node.range.start}function Dd(e,t){let n={},r=e.node.attrs??{};for(let[i,a]of Object.entries(r)){let r=e.schema.props[i],o=Ed(t,e,i);if(!r){let n=i.length<=od?Eu(e.schema,i):void 0;t.report(`local.attribute.unknown`,`Component <${e.name}> does not support attribute ${i}.${n?` Did you mean ${n}?`:``}`,o,o+i.length,{key:n?`local.attribute.unknown.suggestion`:`local.attribute.unknown`,params:n?{component:e.name,name:i,suggestion:n}:{component:e.name,name:i}});continue}let s={raw:a,offset:o,dynamic:!1};if(r.kind===`string`&&a.length>1e5&&(t.report(`local.budget.attribute`,`Attribute ${i} on component <${e.name}> exceeds the ${w}-character limit.`,o,o+i.length,{key:`local.budget.attribute`,params:{name:i,component:e.name,limit:w}}),s.raw=a.slice(0,w)),Od(e,i,r,s,t),r.color){let n=hd(s.raw);n.segments.length||n.unterminated.length||qn(s.raw)||t.report(`local.attribute.color`,`Attribute ${i} on component <${e.name}> must be a standard CSS named color or #RGB/#RRGGBB, got "${s.raw}".`,o,o+i.length,{key:`local.attribute.color`,params:{name:i,component:e.name,value:s.raw}})}n[i]=s}for(let[r,i]of Object.entries(e.schema.props))i.required&&!Object.hasOwn(n,r)&&t.report(`local.attribute.required`,`Component <${e.name}> is missing required attribute ${r}.`,e.node.range.start,e.node.range.end,{key:`local.attribute.required`,params:{component:e.name,name:r}});return e.schema.label===`required`&&(Object.hasOwn(n,`label`)?String(n.label.raw).trim()||t.report(`local.label.required`,`Component <${e.name}> label cannot be empty.`,n.label.offset,void 0,{key:`local.label.required.empty`,params:{component:e.name}}):t.report(`local.label.required`,`Component <${e.name}> requires a label.`,e.node.range.start,e.node.range.end,{key:`local.label.required.missing`,params:{component:e.name}})),n}function Od(e,t,n,r,i){if(n.kind===`string`){if(n.static){let e=hd(r.raw);(e.segments.length||e.unterminated.length)&&i.report(`local.attribute.static`,`Attribute ${t} is static and cannot contain interpolations.`,r.offset,r.offset+r.raw.length,{key:`local.attribute.static`,params:{name:t}})}r.value=r.raw;return}if(n.kind===`number`){let e=n.dynamic?gd(r.raw):null;if(e){r.dynamic=!0,r.expression=e.expression,r.expressionOffset=r.offset+e.start,e.expression||i.report(`local.expression.empty`,`Attribute ${t} interpolation cannot be empty.`,r.expressionOffset,void 0,{key:`local.expression.empty.attribute`,params:{name:t}});return}let a=ud(r.raw);if(a===null){i.report(`local.attribute.type`,`Attribute ${t} requires a number${n.dynamic?` or a full number interpolation`:``}, got "${r.raw}".`,r.offset,r.offset+r.raw.length,{key:n.dynamic?`local.attribute.type.number-interpolation`:`local.attribute.type.number`,params:{name:t,value:r.raw}});return}n.integer&&!Number.isInteger(a)&&i.report(`local.attribute.type`,`Attribute ${t} requires an integer.`,r.offset,void 0,{key:`local.attribute.type.integer`,params:{name:t}}),n.positive&&!(a>0)&&i.report(`local.attribute.type`,`Attribute ${t} requires a positive number.`,r.offset,void 0,{key:`local.attribute.type.positive`,params:{name:t}}),n.min!==void 0&&a<n.min&&i.report(`local.attribute.range`,`Attribute ${t} must be at least ${n.min}.`,r.offset,void 0,{key:`local.attribute.range.min`,params:{name:t,min:n.min}}),n.max!==void 0&&a>n.max&&i.report(`local.attribute.range`,`Attribute ${t} must be at most ${n.max}.`,r.offset,void 0,{key:`local.attribute.range.max`,params:{name:t,max:n.max}}),r.value=a;return}if(n.kind===`boolean`){let e=n.dynamic?gd(r.raw):null;if(e){r.dynamic=!0,r.expression=e.expression,r.expressionOffset=r.offset+e.start,e.expression||i.report(`local.expression.empty`,`Attribute ${t} interpolation cannot be empty.`,r.expressionOffset,void 0,{key:`local.expression.empty.attribute`,params:{name:t}});return}if(r.raw===`true`||r.raw===`false`){r.value=r.raw===`true`;return}i.report(`local.attribute.type`,`Attribute ${t} requires true or false${n.dynamic?`, or a full boolean interpolation`:``}.`,r.offset,r.offset+r.raw.length,{key:n.dynamic?`local.attribute.type.boolean-interpolation`:`local.attribute.type.boolean`,params:{name:t}});return}let a=n.dynamic?gd(r.raw):null;if(a){r.dynamic=!0,r.expression=a.expression,r.expressionOffset=r.offset+a.start,a.expression||i.report(`local.expression.empty`,`Attribute ${t} interpolation cannot be empty.`,r.expressionOffset,void 0,{key:`local.expression.empty.attribute`,params:{name:t}});return}let o=n.values??[];o.includes(r.raw)?r.value=r.raw:i.report(`local.attribute.type`,`Attribute ${t} must be one of ${o.join(` / `)}, got "${r.raw}".`,r.offset,r.offset+r.raw.length,{key:`local.attribute.type.enum`,params:{name:t,values:o.join(` / `),value:r.raw}})}function kd(e,t,n){let r=t[n];if(r)return!r.dynamic&&typeof r.value==`number`?r.value:void 0;let i=e.schema.props[n]?.default;return typeof i==`number`?i:void 0}function Ad(e,t){let n=t.attrs.get(e.node.id)??{},r=t.report;if(e.name===`number`||e.name===`slider`||e.name===`counter`){let t=kd(e,n,`min`),i=kd(e,n,`max`),a=kd(e,n,`step`);t!==void 0&&i!==void 0&&t>i&&r(`local.constraint`,`Component <${e.name}> min cannot exceed max.`,n.min?.offset??e.node.range.start,void 0,{key:`local.constraint.number-min-max`,params:{component:e.name}}),a!==void 0&&!(a>0)&&r(`local.constraint`,`Component <${e.name}> step must be greater than 0.`,n.step?.offset??e.node.range.start,void 0,{key:`local.constraint.number-step`,params:{component:e.name}})}if(e.name===`input`||e.name===`textarea`){let t=kd(e,n,`min-length`)??0,i=kd(e,n,`max-length`);i!==void 0&&i<t&&r(`local.constraint`,`max-length cannot be less than min-length.`,n[`max-length`]?.offset??e.node.range.start,void 0,{key:`local.constraint.length-order`})}if(e.name===`date`){let t=typeof n.min?.value==`string`?n.min.value:void 0,i=typeof n.max?.value==`string`?n.max.value:void 0;t!==void 0&&!dd(t)&&r(`local.attribute.type`,`Date lower bound ${t} is not a valid YYYY-MM-DD.`,n.min?.offset??e.node.range.start,void 0,{key:`local.attribute.type.date-lower`,params:{value:t}}),i!==void 0&&!dd(i)&&r(`local.attribute.type`,`Date upper bound ${i} is not a valid YYYY-MM-DD.`,n.max?.offset??e.node.range.start,void 0,{key:`local.attribute.type.date-upper`,params:{value:i}}),t&&i&&t>i&&r(`local.constraint`,`Date min cannot be later than max.`,n.min?.offset??e.node.range.start,void 0,{key:`local.constraint.date-order`})}if(e.name===`progress`){let t=kd(e,n,`max`)??100,i=n.value;i&&!i.dynamic&&typeof i.value==`number`&&(i.value<0||i.value>t)&&r(`local.constraint`,`progress value must be between 0 and ${t}, got ${i.value}.`,i.offset,void 0,{key:`local.constraint.progress-range`,params:{max:t,value:i.value}})}if(e.name===`plot`){let t=kd(e,n,`min`),i=kd(e,n,`max`);t!==void 0&&i!==void 0&&!(t<i)&&r(`local.constraint`,`plot min must be less than max.`,n.min?.offset??e.node.range.start,void 0,{key:`local.constraint.plot-range`})}if(e.name===`timer`){let t=kd(e,n,`duration`)??60;(!Number.isInteger(t)||t<=0)&&r(`local.constraint`,`timer duration must be a positive whole number of seconds.`,n.duration?.offset??e.node.range.start,void 0,{key:`local.constraint.timer-duration`})}if(e.name===`range-slider`){let t=kd(e,n,`min`)??0,i=kd(e,n,`max`)??100,a=kd(e,n,`step`)??1;t<=i||r(`local.constraint`,`range-slider min cannot exceed max.`,n.min?.offset??e.node.range.start,void 0,{key:`local.constraint.range-slider-min-max`}),a>0&&Number.isFinite(a)||r(`local.constraint`,`range-slider step must be a finite positive number.`,n.step?.offset??e.node.range.start,void 0,{key:`local.constraint.range-slider-step`})}if(e.name===`coordinate`){for(let t of[`x`,`y`])(kd(e,n,`${t}-min`)??-5)<=(kd(e,n,`${t}-max`)??5)||r(`local.constraint`,`coordinate ${t}-min cannot exceed ${t}-max.`,n[`${t}-min`]?.offset??e.node.range.start,void 0,{key:`local.constraint.coordinate-axis`,params:{axis:t}});let t=kd(e,n,`step`)??1;t>0&&Number.isFinite(t)||r(`local.constraint`,`coordinate step must be a finite positive number.`,n.step?.offset??e.node.range.start,void 0,{key:`local.constraint.coordinate-step`})}if(e.name===`multi-select`){let t=kd(e,n,`max-selected`);t!==void 0&&(!Number.isInteger(t)||t<0)&&r(`local.constraint`,`multi-select max-selected must be a nonnegative whole number.`,n[`max-selected`]?.offset??e.node.range.start,void 0,{key:`local.constraint.multi-select`})}if((e.name===`table`||e.name===`chart`)&&!Object.hasOwn(n,`key`))for(let t of[`bind`,`initial`])Object.hasOwn(n,t)&&r(`local.selection.key`,`<${e.name}> ${t} requires a key attribute naming the selection column.`,n[t].offset,void 0,{key:`local.selection.key.required`,params:{component:e.name,name:t}})}function jd(e){return(e.node.children??[]).filter(e=>e.type===`component`&&!!e.name).map(t=>({node:t,name:t.name,schema:Su(t.name),parent:e})).filter(e=>!!e.schema)}function Md(e,t){let n=t.attrs.get(e.node.id)??{},r=vd(e.node.children),i=t.report,a=e.schema.childRule;switch(e.schema.parent&&(e.parent&&e.schema.parent.includes(e.parent.name)||i(`local.structure.parent`,`<${e.name}> can only appear directly inside ${e.schema.parent.map(e=>`<${e}>`).join(` or `)}.`,e.node.range.start,e.node.range.end,{key:`local.structure.parent`,params:{name:e.name,parents:e.schema.parent.map(e=>`<${e}>`).join(` / `)}})),a){case`none`:r.length&&i(`local.structure.children`,`<${e.name}> does not accept body content.`,r[0].range.start,r[0].range.end,{key:`local.structure.no-body`,params:{name:e.name}});break;case`inline`:if(e.name===`text`||e.name===`jump`){let t=new Set([`text`,`emphasis`,`strong`,`delete`,`link`,`image`,`inlineCode`,`inlineMath`,`interpolation`,`break`,`comment`,`fallback`]),n=e=>t.has(e.type)&&(e.children??[]).every(n);(r.length===1&&r[0].type===`paragraph`?r[0].children??[]:r).every(n)||i(`local.structure.children`,`<${e.name}> only accepts inline Markdown.`,e.node.range.start,e.node.range.end,{key:`local.structure.inline-only`,params:{name:e.name}})}for(let t of r)xd(t)&&i(`local.structure.children`,`The body of <${e.name}> cannot contain other interactive components.`,t.range.start,t.range.end,{key:`local.structure.no-nested-components`,params:{name:e.name}});break;case`content`:e.name===`node`&&Nd(e,t);break;case`any`:break;case`options`:Pd(e,t,n);break;case`tabs`:Fd(e,t);break;case`disclosures`:{let t=jd(e),n=t.filter(e=>e.name===`disclosure`);if(n.length||i(`local.structure.children`,`<accordion> requires at least one <disclosure>.`,e.node.range.start,e.node.range.end,{key:`local.structure.accordion.needs-disclosure`}),n.length!==t.length)for(let e of t)e.name!==`disclosure`&&i(`local.structure.children`,`<accordion> can only contain <disclosure>.`,e.node.range.start,e.node.range.end,{key:`local.structure.accordion.only-disclosure`});r.some(e=>e.type!==`component`)&&i(`local.structure.children`,`<accordion> can only contain <disclosure>.`,e.node.range.start,e.node.range.end,{key:`local.structure.accordion.only-disclosure`});break}case`cards`:{let t=jd(e),n=t.filter(e=>e.name===`card`);if(n.length||i(`local.structure.children`,`<grid> requires at least one <card>.`,e.node.range.start,e.node.range.end,{key:`local.structure.grid.needs-card`}),n.length!==t.length)for(let e of t)e.name!==`card`&&i(`local.structure.children`,`Direct children of <grid> must be <card>.`,e.node.range.start,e.node.range.end,{key:`local.structure.grid.only-card`});r.some(e=>e.type!==`component`)&&i(`local.structure.children`,`Direct children of <grid> must be <card>.`,e.node.range.start,e.node.range.end,{key:`local.structure.grid.only-card`});break}case`diagram`:Rd(e,t);break;case`table`:{let n=r.filter(e=>e.type===`table`);(n.length!==1||r.length!==1)&&i(`local.structure.children`,`The body of <${e.name}> must be exactly one Markdown table.`,e.node.range.start,e.node.range.end,{key:`local.structure.table.single`,params:{name:e.name}}),n.length?t.tables.set(e.node.id,n[0]):e.name===`table`&&r.length===1&&t.tables.set(e.node.id,r[0]);break}case`plot`:r.filter(e=>e.type===`math`).length||i(`local.structure.children`,`<plot> requires at least one $$...$$ formula block.`,e.node.range.start,e.node.range.end,{key:`local.structure.plot.needs-formula`});for(let e of r)e.type!==`math`&&i(`local.structure.children`,`The body of <plot> can only contain blank lines and $$...$$ formula blocks.`,e.range.start,e.range.end,{key:`local.structure.plot.only-formulas`});break;case`steps`:Id(e,t);break;case`quiz`:Ld(e,t,n);break;case`columns`:{let t=jd(e),n=t.filter(e=>e.name===`column`);n.length||i(`local.structure.children`,`<data-table> requires at least one <column>.`,e.node.range.start,e.node.range.end),n.length>20&&i(`local.budget.data-table.columns`,`<data-table> supports at most 20 columns, but has ${n.length}.`,e.node.range.start,e.node.range.end);for(let e of t)e.name!==`column`&&i(`local.structure.children`,`<data-table> can only contain <column>.`,e.node.range.start,e.node.range.end);r.some(e=>e.type!==`component`)&&i(`local.structure.children`,`<data-table> can only contain <column>.`,e.node.range.start,e.node.range.end);break}}}function Nd(e,t){let n=e=>{for(let r of e)r.type===`component`?t.report(`local.structure.children`,`The description of <node> cannot contain interactive components.`,r.range.start,r.range.end,{key:`local.structure.node.no-components`}):r.children&&n(r.children)};n(e.node.children??[])}function Pd(e,t,n){let r=jd(e),i=r.filter(e=>e.name===`option`);i.length||t.report(`local.structure.children`,`<${e.name}> requires at least one <option value="...">.`,e.node.range.start,e.node.range.end,{key:`local.structure.options.needed`,params:{name:e.name}});for(let n of r)n.name!==`option`&&t.report(`local.structure.children`,`<${e.name}> can only contain <option>.`,n.node.range.start,n.node.range.end,{key:`local.structure.options.only`,params:{name:e.name}});vd(e.node.children).some(e=>e.type!==`component`)&&t.report(`local.structure.children`,`<${e.name}> can only contain <option>.`,e.node.range.start,e.node.range.end,{key:`local.structure.options.only`,params:{name:e.name}}),i.length>1e4&&t.report(`local.budget.array`,`<${e.name}> options exceed the limit of ${T}.`,e.node.range.start,e.node.range.end,{key:`local.budget.array.options`,params:{name:e.name,limit:T}});let a=[];for(let n of i){let r=t.attrs.get(n.node.id)??{},i=typeof r.value?.value==`string`?r.value.value:``;i?e.name===`multi-select`&&i.includes(`,`)?t.report(`local.option.value`,`<multi-select> option values cannot contain commas: "${i}".`,n.node.range.start,n.node.range.end,{key:`local.option.value.comma`,params:{value:i}}):a.includes(i)?t.report(`local.option.value`,`Option values in <${e.name}> must be unique; duplicate value "${i}".`,n.node.range.start,n.node.range.end,{key:`local.option.value.duplicate`,params:{name:e.name,value:i}}):((n.node.children??[]).some(xd)&&t.report(`local.structure.children`,`The body of <option> cannot contain interactive components.`,n.node.range.start,n.node.range.end,{key:`local.structure.option.no-components`}),a.push(i)):t.report(`local.option.value`,`<option> requires a non-empty value.`,n.node.range.start,n.node.range.end,{key:`local.option.value.required`})}t.options.set(e.node.id,a)}function Fd(e,t){let n=jd(e),r=n.filter(e=>e.name===`tab`);r.length||t.report(`local.structure.children`,`<tabs> requires at least one <tab>.`,e.node.range.start,e.node.range.end,{key:`local.structure.tabs.needs-tab`});for(let e of n)e.name!==`tab`&&t.report(`local.structure.children`,`<tabs> can only contain <tab>.`,e.node.range.start,e.node.range.end,{key:`local.structure.tabs.only-tab`});vd(e.node.children).some(e=>e.type!==`component`)&&t.report(`local.structure.children`,`<tabs> can only contain <tab>.`,e.node.range.start,e.node.range.end,{key:`local.structure.tabs.only-tab`});let i=[];r.forEach((e,n)=>{let r=t.attrs.get(e.node.id)??{},a=(typeof r.value?.value==`string`?r.value.value.trim():``)||`tab-${n+1}`;i.includes(a)?t.report(`local.tab.value`,`Tab values in <tabs> must be unique; duplicate value "${a}".`,e.node.range.start,e.node.range.end,{key:`local.tab.value.duplicate`,params:{value:a}}):i.push(a)}),t.tabs.set(e.node.id,i)}function Id(e,t){let n=jd(e),r=n.filter(e=>e.name===`step`);r.length||t.report(`local.structure.children`,`<steps> requires at least one <step>.`,e.node.range.start,e.node.range.end,{key:`local.structure.steps.needs-step`});for(let e of n)e.name!==`step`&&t.report(`local.structure.children`,`<steps> can only contain <step>.`,e.node.range.start,e.node.range.end,{key:`local.structure.steps.only-step`});vd(e.node.children).some(e=>e.type!==`component`)&&t.report(`local.structure.children`,`<steps> can only contain <step>.`,e.node.range.start,e.node.range.end,{key:`local.structure.steps.only-step`});let i=[];r.forEach((e,n)=>{let r=t.attrs.get(e.node.id)??{},a=(typeof r.value?.value==`string`?r.value.value.trim():``)||`step-${n+1}`;i.includes(a)?t.report(`local.step.value`,`Step values in <steps> must be unique; duplicate value "${a}".`,e.node.range.start,e.node.range.end,{key:`local.step.value.duplicate`,params:{value:a}}):i.push(a)}),t.steps.set(e.node.id,i)}function Ld(e,t,n){let r=typeof n.type?.value==`string`?n.type.value:`choice`,i=typeof n.answer?.value==`string`?n.answer.value:``;if(i.trim()||t.report(`local.quiz.answer`,`<quiz> requires a non-empty answer.`,n.answer?.offset??e.node.range.start,void 0,{key:`local.quiz.answer.required`}),r===`number`){vd(e.node.children).length&&t.report(`local.structure.children`,`A numeric <quiz> cannot have body content; use type="choice" for option-based quizzes.`,e.node.range.start,e.node.range.end,{key:`local.structure.quiz.numeric-no-body`}),i.trim()&&ud(i)===null&&t.report(`local.quiz.answer`,`A numeric <quiz> answer must be a finite number.`,n.answer?.offset??e.node.range.start,void 0,{key:`local.quiz.answer.numeric`});let r=kd(e,n,`tolerance`);r!==void 0&&(!Number.isFinite(r)||r<0)&&t.report(`local.constraint`,`<quiz> tolerance must be a nonnegative finite number.`,n.tolerance?.offset??e.node.range.start,void 0,{key:`local.constraint.quiz-tolerance`});return}Pd(e,t,n);let a=t.options.get(e.node.id)??[];i.trim()&&a.length&&!a.includes(i)&&t.report(`local.quiz.answer`,`<quiz> answer "${i}" is not one of the option values: ${a.join(`, `)}.`,n.answer?.offset??e.node.range.start,void 0,{key:`local.quiz.answer.not-option`,params:{answer:i,options:a.join(`, `)}})}function Rd(e,t){let n=jd(e),r=n.filter(e=>e.name===`node`),i=n.filter(e=>e.name===`edge`);r.length||t.report(`local.diagram.node`,`<diagram> requires at least one <node>.`,e.node.range.start,e.node.range.end,{key:`local.diagram.node.required`});for(let e of n)e.name!==`node`&&e.name!==`edge`&&t.report(`local.structure.children`,`<diagram> can only contain <node> and <edge>.`,e.node.range.start,e.node.range.end,{key:`local.structure.diagram.only`});vd(e.node.children).some(e=>e.type!==`component`)&&t.report(`local.structure.children`,`<diagram> can only contain <node> and <edge>.`,e.node.range.start,e.node.range.end,{key:`local.structure.diagram.only`});let a=[];for(let e of r){let n=t.attrs.get(e.node.id)??{},r=typeof n.id?.value==`string`?n.id.value:``;r&&(/^[A-Za-z_][A-Za-z0-9_-]*$/.test(r)||t.report(`local.diagram.node`,`Node ID "${r}" may only contain letters, digits, underscores and hyphens, and cannot start with a digit.`,e.node.range.start,e.node.range.end,{key:`local.diagram.node.invalid`,params:{id:r}}),a.includes(r)?t.report(`local.diagram.node`,`Duplicate node ID "${r}".`,e.node.range.start,e.node.range.end,{key:`local.diagram.node.duplicate`,params:{id:r}}):a.push(r))}t.diagramNodes.set(e.node.id,a);let o=new Set;for(let e of i){let n=t.attrs.get(e.node.id)??{},r=typeof n.from?.value==`string`?n.from.value:``,i=typeof n.to?.value==`string`?n.to.value:``,s=typeof n.label?.value==`string`?n.label.value:``;r&&!a.includes(r)&&t.report(`local.diagram.edge`,`Edge from references unknown node "${r}".`,e.node.range.start,e.node.range.end,{key:`local.diagram.edge.from`,params:{id:r}}),i&&!a.includes(i)&&t.report(`local.diagram.edge`,`Edge to references unknown node "${i}".`,e.node.range.start,e.node.range.end,{key:`local.diagram.edge.to`,params:{id:i}});let c=`${r}\u0000${i}\u0000${s}`;o.has(c)&&t.report(`local.diagram.edge`,`Duplicate edge: ${r} → ${i}${s?` (${s})`:``}.`,e.node.range.start,e.node.range.end,{key:`local.diagram.edge.duplicate`,params:{from:r,to:i,label:s?` (${s})`:``}}),o.add(c)}}function zd(e,t){let n=t.checklists.get(e.node.id);if(n)return n;let r=vd(e.node.children),i=r.filter(e=>e.type===`list`);(r.length!==1||i.length!==1)&&t.report(`local.checklist.body`,`The body of <checklist> must be exactly one single-level Markdown task list.`,e.node.range.start,e.node.range.end,{key:`local.checklist.body.single`});let a=i[0],o=[],s=[];if(!a)return t.checklists.set(e.node.id,{ids:o,checked:s}),{ids:o,checked:s};let c=a.children??[];c.length||t.report(`local.checklist.body`,`<checklist> requires at least one task list item.`,a.range.start,a.range.end,{key:`local.checklist.body.item-required`}),c.length>1e4&&t.report(`local.budget.array`,`<checklist> items exceed the limit of ${T}.`,a.range.start,a.range.end,{key:`local.checklist.body.items-limit`,params:{limit:T}}),c.slice(0,T).forEach((e,n)=>{if(e.type!==`listItem`||e.checked===null||e.checked===void 0){t.report(`local.checklist.body`,`<checklist> can only contain task list items (- [ ] / - [x]).`,e.range.start,e.range.end,{key:`local.checklist.body.task-only`});return}(e.children??[]).some(e=>e.type===`list`)&&t.report(`local.checklist.body`,`<checklist> does not support nested lists.`,e.range.start,e.range.end,{key:`local.checklist.body.no-nested`}),xd(e)&&t.report(`local.checklist.body`,`<checklist> items cannot contain interactive components.`,e.range.start,e.range.end,{key:`local.checklist.body.no-components`});let r=`item-${n+1}`;o.push(r),e.checked&&s.push(r)});let l={ids:o,checked:s};return t.checklists.set(e.node.id,l),l}function Bd(e){let t=new Map;for(let n of e.entries){if(!n.schema.binding)continue;let r=e.attrs.get(n.node.id)??{};if((n.name===`table`||n.name===`chart`)&&!Object.hasOwn(r,`key`))continue;let i=typeof r.bind?.value==`string`?r.bind.value:``,a=i||`@${n.node.id}`;r.bind&&(i.length>od?(e.report(`local.budget.identifier`,`Parameter name exceeds the ${od}-character limit.`,r.bind.offset??n.node.range.start,void 0,{key:`local.budget.identifier`,params:{limit:od}}),a=`@${n.node.id}`):id.test(i)?(ct.has(i)||ld.has(i))&&(e.report(`local.binding.reserved`,`Parameter name "${i}" is reserved; choose another name.`,r.bind.offset??n.node.range.start,void 0,{key:`local.binding.reserved`,params:{name:i}}),a=`@${n.node.id}`):(e.report(`local.binding.name`,`Parameter name "${i}" must match [A-Za-z_][A-Za-z0-9_]*.`,r.bind.offset??n.node.range.start,void 0,{key:`local.binding.name`,params:{name:i}}),a=`@${n.node.id}`));let o=t.get(a);o?o.members.push({entry:n,attrs:r}):t.set(a,{key:a,schema:n.schema,members:[{entry:n,attrs:r}]})}let n={};for(let r of t.values()){let t=Ud(r,e);t&&(n[r.key]=t)}return Qd(e,n),n}function Vd(e){let t={};for(let[n,r]of Object.entries(e))n.startsWith(`@`)||(t[n]=r.type);return t}function Hd(e,t,n){return n===`timer`?{min:0,max:kd(e,t,`duration`)??60,step:1}:{min:kd(e,t,`min`),max:kd(e,t,`max`),step:kd(e,t,`step`)??1}}function Ud(e,t){let n=e.members[0],r=n.entry.schema.binding;if(!r)return null;let i=r.family;for(let a of e.members.slice(1))a.entry.schema.binding?.family!==i&&t.report(`local.binding.type`,`Parameter "${e.key}" is already declared as ${J(r.kind)} by <${n.entry.name}> and cannot also bind <${a.entry.name}>.`,a.entry.node.range.start,a.entry.node.range.end,{key:`local.binding.type`,params:{key:e.key,kind:J(r.kind),first:n.entry.name,second:a.entry.name}});if(r.exclusive&&e.members.length>1)for(let r of e.members.slice(1))t.report(`local.binding.exclusive`,`Parameter "${e.key}" of <${n.entry.name}> can only be owned by one component and cannot be shared with <${r.entry.name}>.`,r.entry.node.range.start,r.entry.node.range.end,{key:`local.binding.exclusive`,params:{key:e.key,first:n.entry.name,second:r.entry.name}});let a=qd(n.entry,t,i),o;if(r.kind===`number`){o=Hd(n.entry,n.attrs,i);for(let r of e.members.slice(1)){let a=Hd(r.entry,r.attrs,i);(a.min!==o.min||a.max!==o.max||a.step!==o.step)&&t.report(`local.binding.constraint`,`Parameter "${e.key}" must use the same numeric range and step: <${n.entry.name}> has ${Wd(o)}, <${r.entry.name}> has ${Wd(a)}.`,r.entry.node.range.start,r.entry.node.range.end,{key:`local.binding.constraint`,params:{key:e.key,first:n.entry.name,second:r.entry.name,firstConstraints:Wd(o),secondConstraints:Wd(a)}})}}if(i===`choice`||i===`selection`)for(let n of e.members.slice(1))qd(n.entry,t,i).join(`\0`)!==a.join(`\0`)&&t.report(`local.binding.option`,`Parameter "${e.key}" must use the same option set in the same order.`,n.entry.node.range.start,n.entry.node.range.end,{key:`local.binding.option`,params:{key:e.key}});let s=i===`multi-select`?kd(n.entry,n.attrs,`max-selected`):void 0,c=e.members.filter(e=>Object.hasOwn(e.attrs,`initial`)),l;if(c.length>1){let n=c.map(e=>Gd(t,e.attrs.initial.offset)),r=Math.min(c.length,sd);for(let i=0;i<r;i+=1){let r=[];for(let e=1;e<n.length&&r.length<cd;e+=1)r.push(n[(i+e)%n.length]);t.report(`local.initial.duplicate`,`Parameter "${e.key}" has multiple explicit initial values (${c.length} in total${r.length?`; see also line ${r.join(`, `)}`:``}).`,c[i].attrs.initial.offset,void 0,r.length?{key:`local.initial.duplicate-peers`,params:{key:e.key,count:c.length,lines:r.join(`, `)}}:{key:`local.initial.duplicate`,params:{key:e.key,count:c.length}})}}l=i===`multi-select`?c.length?Jd(c[0],a,s,t):[]:c.length>0?Yd(c[0],t,i,a):Xd(n,t,i,a,o),i===`checklist`&&!Array.isArray(l)&&(l=[]),r.kind!==`array`&&Zd(e,n,l,i,a,o,t),(i===`text`||i===`date`)&&Kd(e,l,t);let u={name:e.key,nodeIds:e.members.map(e=>e.entry.node.id),type:r.kind,initial:fd(l),owner:n.entry.node.id};return o&&(o.min!==void 0&&(u.min=o.min),o.max!==void 0&&(u.max=o.max),u.step=o.step),a.length&&(u.options=[...a]),i===`multi-select`&&(u.maxItems=s??a.length),u}function Wd(e){return`[${e.min===void 0?`-∞`:String(e.min)}, ${e.max===void 0?`∞`:String(e.max)}] / ${e.step}`}function Gd(e,t){let n=Math.max(0,Math.min(e.source.length,t)),r=0,i=e.lineStarts.length-1;for(;r<i;){let t=Math.ceil((r+i)/2);e.lineStarts[t]<=n?r=t:i=t-1}return r+1}function Kd(e,t,n){if(typeof t!=`string`||t===``)return;let r=e.members[0],i=r.attrs.initial?.offset??r.entry.node.range.start,a=nt(t);for(let r of e.members){let{entry:o,attrs:s}=r;if(o.name===`input`||o.name===`textarea`){let r=kd(o,s,`min-length`)??0,c=kd(o,s,`max-length`);a<r&&n.report(`local.initial.length`,`Initial value of parameter "${e.key}" has length ${a}, below the minimum length ${r} required by <${o.name}>.`,i,void 0,{key:`local.initial.length.min`,params:{key:e.key,length:a,min:r,name:o.name}}),c!==void 0&&a>c&&n.report(`local.initial.length`,`Initial value of parameter "${e.key}" has length ${a}, exceeding the maximum length ${c} allowed by <${o.name}>.`,i,void 0,{key:`local.initial.length.max`,params:{key:e.key,length:a,max:c,name:o.name}}),o.name===`input`&&(typeof s.type?.value==`string`?s.type.value:`text`)===`email`&&!N(t)&&n.report(`local.initial.email`,`Initial value of parameter "${e.key}" is not a valid email address.`,i,void 0,{key:`local.initial.email`,params:{key:e.key}})}else if(o.name===`date`&&dd(t)){let r=typeof s.min?.value==`string`&&dd(s.min.value)?s.min.value:void 0,a=typeof s.max?.value==`string`&&dd(s.max.value)?s.max.value:void 0;r&&t<r&&n.report(`local.initial.range`,`Initial value ${t} of parameter "${e.key}" is earlier than the minimum date ${r} of <date>.`,i,void 0,{key:`local.initial.date.min`,params:{key:e.key,value:t,min:r}}),a&&t>a&&n.report(`local.initial.range`,`Initial value ${t} of parameter "${e.key}" is later than the maximum date ${a} of <date>.`,i,void 0,{key:`local.initial.date.max`,params:{key:e.key,value:t,max:a}})}}}function qd(e,t,n){switch(n){case`choice`:case`multi-select`:return t.options.get(e.node.id)??[];case`tabs`:return t.tabs.get(e.node.id)??[];case`steps`:return t.steps.get(e.node.id)??[];case`selection`:return t.selections.get(e.node.id)??[``];case`diagram`:return t.diagramNodes.get(e.node.id)??[];case`checklist`:return zd(e,t).ids;default:return[]}}function Jd(e,t,n,r){let i=e.attrs.initial;if(!i)return[];let a=typeof i.value==`string`?i.value:String(i.value??``),o=[];for(let n of a.split(`,`).map(e=>e.trim()).filter(Boolean))t.includes(n)?o.includes(n)||o.push(n):r.report(`local.initial.option`,`Initial value "${n}" of parameter "${e.entry.node.id}" is not an option of <multi-select>.`,i.offset,void 0,{key:`local.initial.option.multi-select`,params:{key:e.entry.node.id,value:n}});return n!==void 0&&o.length>n&&r.report(`local.initial.range`,`Initial values of <multi-select> exceed max-selected ${n}.`,i.offset,void 0,{key:`local.initial.multi-select`,params:{max:n}}),t.filter(e=>o.includes(e))}function Yd(e,t,n,r){let i=e.attrs.initial;if(!i)return Xd(e,t,n,r,void 0);let a=e.entry;if(n===`number`&&typeof i.value==`number`||n===`boolean`&&typeof i.value==`boolean`)return i.value;if(n===`number`||n===`boolean`)return t.report(`local.initial.type`,`Initial value of parameter "${a.node.id}" has the wrong type.`,i.offset,void 0,{key:`local.initial.type`,params:{name:a.node.id}}),n===`number`&&0;let o=typeof i.value==`string`?i.value:String(i.value??``);return n===`date`&&!dd(o)&&t.report(`local.initial.date`,`Initial date "${o}" is not a valid YYYY-MM-DD.`,i.offset,void 0,{key:`local.initial.date`,params:{value:o}}),n===`choice`&&r.length&&!r.includes(o)&&t.report(`local.initial.option`,`Initial value "${o}" is not an available option: ${r.join(`, `)}.`,i.offset,void 0,{key:`local.initial.value.option`,params:{value:o,options:r.join(`, `)}}),o}function Xd(e,t,n,r,i){let a=e.entry;switch(n){case`text`:case`date`:return``;case`boolean`:return!1;case`choice`:return r[0]??``;case`tabs`:case`steps`:case`diagram`:return r[0]??``;case`selection`:return``;case`multi-select`:return[];case`timer`:return(i??Hd(a,e.attrs,n)).max??60;case`checklist`:return[...zd(a,t).checked];case`number`:{let r=i??Hd(a,e.attrs,n);if(a.schema.initialRule===`min`)return r.min??0;let o=md(r.min,r.max,r.step);return o===null?(t.report(`local.initial.range`,`Parameter "${a.node.id}" has no valid step value within range [${r.min??`-∞`}, ${r.max??`∞`}].`,a.node.range.start,a.node.range.end,{key:`local.initial.no-step`,params:{key:a.node.id,min:r.min??`-∞`,max:r.max??`∞`}}),0):o}}return t.report(`local.initial`,`Cannot derive a default initial value for <${a.name}> parameter "${a.node.id}".`,a.node.range.start,a.node.range.end,{key:`local.initial.cannot-derive`,params:{name:a.name,key:a.node.id}}),``}function Zd(e,t,n,r,i,a,o){let s=e.key;if(r===`number`){if(typeof n!=`number`||!Number.isFinite(n)){o.report(`local.initial.type`,`Initial value of parameter "${s}" must be a finite number.`,t.entry.node.range.start,void 0,{key:`local.initial.type.number`,params:{key:s}});return}let e=a??Hd(t.entry,t.attrs,r);e.min!==void 0&&n<e.min&&o.report(`local.initial.range`,`Initial value ${n} of parameter "${s}" is below the minimum ${e.min}.`,t.attrs.initial?.offset??t.entry.node.range.start,void 0,{key:`local.initial.range.min`,params:{value:n,key:s,min:e.min}}),e.max!==void 0&&n>e.max&&o.report(`local.initial.range`,`Initial value ${n} of parameter "${s}" exceeds the maximum ${e.max}.`,t.attrs.initial?.offset??t.entry.node.range.start,void 0,{key:`local.initial.range.max`,params:{value:n,key:s,max:e.max}});let i=e.min??0;n>=(e.min??-1/0)&&n<=(e.max??1/0)&&!pd(n,i,e.step)&&o.report(`local.initial.step`,`Initial value ${n} of parameter "${s}" is not on step ${e.step} (based at ${e.min??0}).`,t.attrs.initial?.offset??t.entry.node.range.start,void 0,{key:`local.initial.range.step`,params:{value:n,key:s,step:e.step,base:e.min??0}})}else r===`boolean`&&typeof n!=`boolean`&&o.report(`local.initial.type`,`Initial value of parameter "${s}" must be a boolean.`,t.entry.node.range.start,void 0,{key:`local.initial.type.boolean`,params:{key:s}}),(r===`choice`||r===`tabs`||r===`steps`||r===`diagram`||r===`selection`)&&i.length&&!i.includes(String(n))&&o.report(`local.initial.option`,`Initial value "${String(n)}" of parameter "${s}" is not among the available values ${i.join(`, `)}.`,t.attrs.initial?.offset??t.entry.node.range.start,void 0,{key:`local.initial.value.options`,params:{value:String(n),key:s,options:i.join(`, `)}})}function Qd(e,t){let n=new Set(Object.keys(t));for(let r of e.entries){let i=r.schema.slots;if(!i?.length)continue;let a=e.attrs.get(r.node.id)??{},o=Object.create(null),s=new Map;for(let c of i){let i=a[c.bind],l;if(i){let t=typeof i.value==`string`?i.value:``;t.length>od?e.report(`local.budget.identifier`,`Parameter name exceeds the ${od}-character limit.`,i.offset??r.node.range.start,void 0,{key:`local.budget.identifier`,params:{limit:od}}):id.test(t)?ct.has(t)||ld.has(t)?e.report(`local.binding.reserved`,`Parameter name "${t}" is reserved; choose another name.`,i.offset??r.node.range.start,void 0,{key:`local.binding.reserved`,params:{name:t}}):l=t:e.report(`local.binding.name`,`Parameter name "${t}" must match [A-Za-z_][A-Za-z0-9_]*.`,i.offset??r.node.range.start,void 0,{key:`local.binding.name`,params:{name:t}})}let u=l??`@${r.node.id}:${c.name}`;l&&n.has(l)&&(e.report(`local.binding.exclusive`,`Parameter "${l}" of the ${c.name} slot of <${r.name}> is exclusive and cannot be shared with another control.`,i?.offset??r.node.range.start,void 0,{key:`local.binding.exclusive.slot`,params:{key:l,slot:c.name,name:r.name}}),u=`@${r.node.id}:${c.name}`),n.add(u);let d=$d(r,a,c.name),f=ef(r,a,c,d,e),p={name:u,nodeIds:[r.node.id],type:c.kind,initial:f,owner:r.node.id};d.min!==void 0&&(p.min=d.min),d.max!==void 0&&(p.max=d.max),p.step=d.step,t[u]=p,o[c.name]=u,s.set(c.name,u)}let c=s.get(`start`),l=s.get(`end`);if(c&&l){let n=t[c].initial,i=t[l].initial;typeof n==`number`&&typeof i==`number`&&n>i&&e.report(`local.initial.range`,`<range-slider> start ${n} cannot be greater than end ${i}.`,r.node.range.start,r.node.range.end,{key:`local.initial.range-slider`,params:{start:n,end:i}})}e.bindingSlots[r.node.id]=o}}function $d(e,t,n){return e.name===`coordinate`?{min:kd(e,t,`${n}-min`)??-5,max:kd(e,t,`${n}-max`)??5,step:kd(e,t,`step`)??1}:{min:kd(e,t,`min`)??0,max:kd(e,t,`max`)??100,step:kd(e,t,`step`)??1}}function ef(e,t,n,r,i){let a=r.min??0,o=t[n.initial];if(o&&typeof o.value==`number`){let t=o.value;return r.min!==void 0&&t<r.min&&i.report(`local.initial.range`,`Initial value ${t} of <${e.name}> ${n.initial} is below the minimum ${r.min}.`,o.offset,void 0,{key:`local.initial.slot.min`,params:{value:t,name:e.name,slot:n.initial,min:r.min}}),r.max!==void 0&&t>r.max&&i.report(`local.initial.range`,`Initial value ${t} of <${e.name}> ${n.initial} exceeds the maximum ${r.max}.`,o.offset,void 0,{key:`local.initial.slot.max`,params:{value:t,name:e.name,slot:n.initial,max:r.max}}),pd(t,a,r.step)||i.report(`local.initial.step`,`Initial value ${t} of <${e.name}> ${n.initial} is not on step ${r.step} (based at ${a}).`,o.offset,void 0,{key:`local.initial.slot.step`,params:{value:t,name:e.name,slot:n.initial,step:r.step,base:a}}),t}if(n.initialRule===`max-step`){let e=(r.max??a)-a,t=a+Math.max(0,Math.floor(e/r.step+ad))*r.step;return Math.min(r.max??t,Math.max(r.min??t,t))}return n.initialRule===`min`?r.min??0:md(r.min,r.max,r.step)??0}function tf(e){return Object.keys(e.bindingSlots).length?e.bindingSlots:void 0}function nf(e,t){let n=e.source.lastIndexOf(`
55
+ `,t.end,!1),s=t.end}m(e.slice(s,n),s,!0),u.push(n);let h=Xh.parse(o);function g(e){for(let t of e)t.type===`interpolation`&&t.value!==void 0&&(t.value=t.value.replace(/\\\|/g,`|`)),t.children&&g(t.children)}function v(e){let r=u[e.position?.start?.offset??0]??t,i=u[e.position?.end?.offset??o.length]??n;if(e.type===`image`){let t=d.get(e.position?.start?.offset);if(t&&e.position.end.offset===t.end&&e.url===`rmd-internal:placeholder`&&e.alt===t.marker)return d.delete(e.position.start.offset),t.node.type===`comment`?[]:[t.node]}if(e.type===`text`)return e.value?[_(`text`,r,i,{value:e.value})]:[];if(e.type===`footnoteReference`||e.type===`footnoteDefinition`){let t=typeof e.label==`string`&&e.label?e.label:String(e.identifier??``),n=xh(String(e.identifier??t));if(e.type===`footnoteDefinition`){let a=e.children?.flatMap(v);return[_(`footnoteDefinition`,r,i,{identifier:n,label:t,children:a??[]})]}return[_(`footnoteReference`,r,i,{identifier:n,label:t})]}let s=e.children?.flatMap(v);if(e.type===`paragraph`&&s?.length===1&&(s[0].type===`math`||s[0].type===`fallback`||s[0].type===`footnoteDefinition`||Vh.has(s[0].type)||s[0].type===`component`&&!jh.has(s[0].name)))return s;if(e.type===`paragraph`&&!s?.length)return[];if(e.type===`html`)return a.literalHtml?typeof e.value==`string`&&e.value?[_(`text`,r,i,{value:e.value})]:[]:(y(`local.html`,`Raw HTML is not part of the local interaction syntax.`,r,i,{key:`local.html`}),[]);let c=_(e.type,r,i);for(let t of[`value`,`depth`,`ordered`,`start`,`checked`,`url`,`title`,`alt`,`lang`,`align`])e[t]!==void 0&&(c[t]=e[t]);return s&&(c.children=s),e.type===`table`&&c.children&&g(c.children),[c]}return h.children.flatMap(v)}function ge(t){let n=new Set,r=e=>{for(let t of e)t.type===`footnoteDefinition`&&t.identifier&&n.add(t.identifier),t.children&&r(t.children)};r(t);let i=t=>{for(let r of t)r.type!==`footnoteReference`||r.identifier&&n.has(r.identifier)||(r.type=`text`,r.value=e.slice(r.range.start,r.range.end),delete r.identifier,delete r.label),r.children&&i(r.children)};i(t)}try{let t=me(0,e.length),r=he(0,e.length,t.tokens);return ge(r),{nodes:r,diagnostics:n,...E?{versionDeclaration:E}:{},...x===void 0?{}:{theme:x},...C?{themeRange:C}:{}}}catch(e){return e instanceof Zh?(y(e.code,e.message,e.start,e.end,{key:e.key,params:e.params}),{nodes:[],diagnostics:n}):(y(`local.parse`,`Cannot parse document: ${e instanceof Error?e.message:String(e)}`,0,void 0,{key:`local.parse.document`,params:{detail:e instanceof Error?e.message:String(e)}}),{nodes:[],diagnostics:n})}}var $h=`local.validation.failed`,eg=`local.validation.expression`,tg=`Validation failed.`;function ng(e){return e.length>2e3?`${e.slice(0,D-1)}…`:e}function rg(e){let t=e.trim();return t?t.split(/\s+/):[]}function ig(e){let t=[0];for(let n=0;n<e.length;n+=1)e[n]===`
56
+ `&&t.push(n+1);return t}function ag(e){if(!e||typeof e!=`object`)return!1;let t=e,n=t.range;return typeof t.expression==`string`&&typeof t.message==`string`&&Array.isArray(t.fields)&&!!n&&Number.isFinite(n.start)&&Number.isFinite(n.end)}function og(e,t,n,r,i){let a=e.length,o=Math.max(0,Math.min(a,Math.trunc(n.start))),s=Math.max(o+1,Math.min(a,Math.trunc(n.end))),c=0,l=Math.max(0,t.length-1);for(;c<l;){let e=Math.ceil((c+l)/2);t[e]<=o?c=e:l=e-1}return{code:r,message:i,severity:`error`,range:{start:o,end:s},line:c+1,column:o-t[c]+1}}var sg=`http://www.w3.org/1999/xhtml`,cg=new Set(`b.strong.i.em.s.del.u.mark.sup.sub.br.hr.p.h1.h2.h3.h4.h5.h6.div.span.details.summary.blockquote.code.pre.ul.ol.li.a.img`.split(`.`)),lg=new Set([`html`,`head`,`body`]),ug=new Set([`frameset`,`frame`,`noframes`,`applet`]),dg=new Set([`animate`,`animatemotion`,`animatetransform`,`set`,`discard`]),fg=new Set(`alignment-baseline.baseline-shift.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-rendering.cursor.direction.display.dominant-baseline.fill.fill-opacity.fill-rule.filter.flood-color.flood-opacity.font.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.glyph-orientation-horizontal.glyph-orientation-vertical.image-rendering.kerning.letter-spacing.lighting-color.marker.marker-end.marker-mid.marker-start.mask.opacity.overflow.paint-order.pointer-events.shape-rendering.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.text-anchor.text-decoration.text-rendering.transform-origin.unicode-bidi.vector-effect.visibility.word-spacing.writing-mode`.split(`.`)),pg=new Set([`id`,`class`,`title`,`lang`,`dir`]),mg=new Set([`align`,`bgcolor`,`background`,`face`,`text`,`link`,`alink`,`vlink`,`border`,`cellpadding`,`cellspacing`,`frame`,`rules`,`hspace`,`vspace`]),hg={a:new Set([`href`]),img:new Set([`src`,`alt`,`width`,`height`]),ol:new Set([`start`]),details:new Set([`open`]),script:new Set([`type`,`src`,`async`,`defer`,`nomodule`,`crossorigin`,`integrity`,`referrerpolicy`]),style:new Set([`type`,`media`]),link:new Set([`rel`,`href`,`type`,`media`,`crossorigin`,`integrity`,`referrerpolicy`,`disabled`])},gg={href:`link`,action:`form`,formaction:`form`,poster:`image`,background:`image`,data:`frame`,src:`source`,cite:`link`,longdesc:`link`},_g=4,vg=class extends Error{start;end;limit;constructor(e,t,n){super(`Syntax nodes exceed the limit of ${n}.`),this.start=e,this.end=t,this.limit=n,this.name=`HtmlBudgetError`}};function yg(e){let t=[0];for(let n=0;n<e.length;n+=1)e[n]===`
57
+ `&&t.push(n+1);return t}function bg(e,t,n){let r=e.source.length,i=Math.max(0,Math.min(r,t)),a=Math.max(i,Math.min(r,Math.max(i,n))),o=0,s=e.lines.starts.length-1;for(;o<s;){let t=Math.ceil((o+s)/2);e.lines.starts[t]<=i?o=t:s=t-1}return{start:i,end:a,line:o+1,column:i-e.lines.starts[o]+1}}function xg(e,t,n,r,i,a){if(e.diagnostics.length>=100)return;let o=bg(e,r,i),s=ze(a?.key??t,a?.params);e.diagnostics.push({code:t,message:n,severity:`warning`,range:{start:o.start,end:o.end},line:o.line,column:o.column,messageKey:s.key,...s.params?{params:s.params}:{}})}function Sg(e,t){let n=e.sourceCodeLocation,r=n&&Number.isInteger(n.startOffset)?n.startOffset:0,i=n&&Number.isInteger(n.endOffset)?n.endOffset:r;return{start:Math.max(0,Math.min(t.source.length,r)),end:Math.max(0,Math.min(t.source.length,i))}}function Cg(e,t,n){let r=e.sourceCodeLocation?.attrs,i=r&&(r[t.name]??(t.prefix?r[`${t.prefix}:${t.name}`]:void 0));return i&&Number.isInteger(i.startOffset)&&Number.isInteger(i.endOffset)?{start:i.startOffset,end:i.endOffset}:Sg(e,n)}function wg(e,t,n){if(e.budget.nodes+=1,e.budget.nodes>e.maxNodes)throw new vg(t,n,e.maxNodes)}function Tg(e,t){let n=Sg(e,t);return t.source.slice(n.start,n.end).replace(/\u0000/g,`�`)}function Eg(e){return yd.createTextNode(e.replace(/\u0000/g,`�`))}function Dg(e){return e.replace(/[\u0000- \u007f-\u009f]+/g,``)}function Og(e){let t=/^([a-z][a-z0-9+.-]*):/i.exec(Dg(e));return t?t[1].toLowerCase():null}function kg(e,t){let n=e.trim();if(n===``)return!0;let r=Og(n);return r===null?!0:r===`javascript`||r===`vbscript`?!1:r===`data`?t===`image`&&/^data:image\/(?:png|jpeg|gif|webp);base64,[A-Za-z0-9+/]+={0,2}$/i.test(n.replace(/\s+/g,``)):r===`http`||r===`https`||t===`link`&&(r===`mailto`||r===`tel`)}function Ag(e){return Object.hasOwn(gg,e)||e===`xlink:href`}function jg(e,t){return(e===`href`||e===`xlink:href`)&&t===`image`?`image`:e===`href`&&t===`base`?`source`:e===`xlink:href`?`link`:e===`src`?t===`img`||t===`image`?`image`:t===`iframe`||t===`frame`||t===`embed`?`frame`:t===`audio`||t===`video`||t===`source`||t===`track`?`media`:`source`:gg[e]??`source`}function Mg(e,t){return pg.has(t)||t.startsWith(`aria-`)||t.startsWith(`data-`)?!0:hg[e]?.has(t)??!1}function Ng(e){return/^on[a-z]/i.test(e)}function Pg(e,t){return fg.has(e)?!0:t&&mg.has(e)}function Fg(e){return[...e.enableJavaScript?[`allow-scripts`]:[],...e.enableExtendedHtml?[`allow-forms`]:[]].join(` `)}function Ig(e,t){return e.split(/\s+/).filter(Boolean).filter(e=>{let n=e.toLowerCase();return n===`allow-same-origin`||n===`allow-top-navigation`||n===`allow-top-navigation-by-user-activation`||n===`allow-parent-navigation`||n===`allow-popups`||n===`allow-popups-to-escape-sandbox`||n===`allow-modals`||n===`allow-downloads`||n===`allow-orientation-lock`||n===`allow-pointer-lock`||n===`allow-presentation`?!1:n===`allow-forms`?t.enableExtendedHtml:n===`allow-scripts`&&t.enableJavaScript}).join(` `)}function Lg(e,t){for(let n of e.childNodes)if(yd.isElementNode(n)&&n.tagName.toLowerCase()===t)return n;return null}function Rg(e){let t=``;for(let n of e.childNodes)t+=Am(n,{scriptingEnabled:!1});return t}function zg(e){return e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function Bg(e){return[`default-src 'none'`,e.enableExtendedHtml?`base-uri 'self' http: https:`:`base-uri 'none'`,e.enableExtendedHtml?`form-action http: https:`:`form-action 'none'`,`object-src 'none'`,`connect-src 'none'`,`media-src 'none'`,`font-src data:`,`img-src data:`,e.enableCss?`style-src 'unsafe-inline'`:`style-src 'none'`,e.enableJavaScript?`script-src 'unsafe-inline'`:`script-src 'none'`,e.enableExtendedHtml?`frame-src about: data: blob:`:`frame-src 'none'`].join(`; `)}function Vg(e,t){let n=Lg(t,`html`),r=n?Lg(n,`head`):null,i=n?Lg(n,`body`):null,a=r?Rg(r):``,o=Rg(i||n||t);e.bodyFallbacks.length>0&&(o=e.bodyFallbacks.map(e=>Am(Eg(e),{scriptingEnabled:!1})).join(``)+o);let s=zg(Bg(e.policy)),c=e=>(e?.attrs??[]).map(e=>` ${e.prefix?`${e.prefix}:`:``}${e.name}="${zg(e.value)}"`).join(``);return`<!doctype html><html${c(n)}><head${c(r)}><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="${s}">${a}</head><body${c(i)}>${o}</body></html>`}function Hg(e,t){if(t.depth>=_g)return``;let n;try{n=Rm(e,{scriptingEnabled:!1,sourceCodeLocationInfo:!1})}catch{return``}let r={...t,source:e,lines:{starts:yg(e)},depth:t.depth+1,bodyFallbacks:[]};try{let e=Lg(n,`html`);return e&&(Ug(e,`html`,!0,r),Kg(e,r,!1)),Vg(r,n)}catch(e){if(e instanceof vg)throw e;return``}}function Ug(e,t,n,r){e.sourceCodeLocation;let i=[],a=!1;for(let o of e.attrs){let s=o.name.toLowerCase(),c=o.prefix?`${o.prefix}:${o.name}`:o.name,l=Cg(e,o,r);if(Ng(s)){if(!r.policy.enableJavaScript){xg(r,`local.html.capability`,`Author event handler attribute ${c} was disabled by the compile options.`,l.start,l.end,{key:`local.html.capability`,params:{feature:`event handlers`}});continue}i.push(o)}else if(s===`style`||Pg(s,n)){if(!r.policy.enableCss){xg(r,`local.html.capability`,`Author style attribute ${c} was disabled by the compile options.`,l.start,l.end,{key:`local.html.capability`,params:{feature:`CSS`}});continue}i.push(o)}else if(s===`srcset`||s===`imagesrcset`)xg(r,`local.html.unsafe-url`,`Unsafe URL in attribute ${c} was removed.`,l.start,l.end,{key:`local.html.unsafe-url`,params:{name:c}});else if(s===`srcdoc`&&t===`iframe`){let e=Hg(o.value,r);if(e===``)continue;o.value=e,i.push(o)}else s===`sandbox`&&t===`iframe`?(o.value=Ig(o.value,r.policy),a=!0,i.push(o)):Ag(s)&&!kg(o.value,jg(s,t))?xg(r,`local.html.unsafe-url`,`Unsafe URL in attribute ${c} was removed.`,l.start,l.end,{key:`local.html.unsafe-url`,params:{name:c}}):s===`target`&&/^_(?:top|parent)$/i.test(o.value.trim())?xg(r,`local.html.capability`,`Navigation target ${o.value} was disabled.`,l.start,l.end,{key:`local.html.capability`,params:{feature:`top-level navigation`}}):!r.policy.enableExtendedHtml&&!Mg(t,s)?xg(r,`local.html.attribute`,`HTML attribute ${c} on <${t}> is not supported; the element is shown as source.`,l.start,l.end,{key:`local.html.attribute`,params:{name:c,tag:t}}):i.push(o)}t===`iframe`&&!a&&i.push({name:`sandbox`,value:Fg(r.policy)}),e.attrs=i}function Wg(e,t,n){let r=Sg(e,t);wg(t,r.start,r.end);let i=e.tagName.toLowerCase(),a=e.namespaceURI===sg;if(ug.has(i))return t.bodyFallbacks.push(Tg(e,t)),xg(t,`local.html.extended`,`HTML element <${i}> requires enableExtendedHtml in this mode; it is shown as source.`,r.start,r.end,{key:`local.html.extended`,params:{name:i}}),[];if(!a&&!t.policy.enableCss&&dg.has(i))return xg(t,`local.html.capability`,`Author animation <${i}> was disabled by the compile options.`,r.start,r.end,{key:`local.html.capability`,params:{feature:`animation`}}),[];if(i===`script`)return t.policy.enableJavaScript?(Ug(e,i,a,t),[e]):(xg(t,`local.html.capability`,`Author JavaScript was disabled by the compile options.`,r.start,r.end,{key:`local.html.capability`,params:{feature:`JavaScript`}}),[]);if(i===`style`)return t.policy.enableCss?(Ug(e,i,a,t),[e]):(xg(t,`local.html.capability`,`Author CSS was disabled by the compile options.`,r.start,r.end,{key:`local.html.capability`,params:{feature:`CSS`}}),[]);if(i===`link`)return(e.attrs.find(e=>e.name.toLowerCase()===`rel`)?.value.toLowerCase()??``).split(/\s+/).includes(`stylesheet`)?t.policy.enableCss?(Ug(e,i,a,t),[e]):(xg(t,`local.html.capability`,`Author CSS was disabled by the compile options.`,r.start,r.end,{key:`local.html.capability`,params:{feature:`CSS`}}),[]):t.policy.enableExtendedHtml?(Ug(e,i,a,t),[e]):Gg(e,t);if(i===`meta`){if(!t.policy.enableExtendedHtml)return Gg(e,t);let n=e.attrs.find(e=>e.name.toLowerCase()===`http-equiv`)?.value.trim().toLowerCase()??``;return n===`refresh`||n===`content-security-policy`||n===`set-cookie`?(xg(t,`local.html.capability`,`Author metadata ${n} was disabled.`,r.start,r.end,{key:`local.html.capability`,params:{feature:`document metadata`}}),[]):(Ug(e,i,a,t),[e])}return(i===`title`||i===`html`||i===`head`||i===`body`)&&!t.policy.enableExtendedHtml&&i===`title`||!(a&&(cg.has(i)||lg.has(i))||t.policy.enableExtendedHtml)?Gg(e,t,n):(Ug(e,i,a,t),i===`template`?(Kg(yd.getTemplateContent(e),t,!1),[e]):(Kg(e,t,n),[e]))}function Gg(e,t,n=!1){let r=e.tagName.toLowerCase(),i=Sg(e,t);return xg(t,`local.html.extended`,`HTML element <${r}> requires enableExtendedHtml in this mode; it is shown as source.`,i.start,i.end,{key:`local.html.extended`,params:{name:r}}),n?(t.bodyFallbacks.push(Tg(e,t)),[]):[Eg(Tg(e,t))]}function Kg(e,t,n){let r=[];for(let i of e.childNodes)if(yd.isTextNode(i))wg(t,0,0),r.push(i);else if(yd.isCommentNode(i))wg(t,0,0),r.push(i);else if(!yd.isDocumentTypeNode(i)&&yd.isElementNode(i)){let e=i.tagName.toLowerCase(),a=n||e===`head`;r.push(...Wg(i,t,a))}e.childNodes=r}function qg(e,t,n){let r=[],i={policy:t,source:e,lines:{starts:yg(e)},diagnostics:r,maxNodes:n,depth:0,budget:{nodes:0},bodyFallbacks:[],stopped:!1},a;try{a=Rm(e,{scriptingEnabled:!1,sourceCodeLocationInfo:!0})}catch(e){return{markup:Vg(i,yd.createDocument()),diagnostics:[{code:`local.parse`,message:`Cannot parse the HTML document: ${e instanceof Error?e.message:String(e)}`,severity:`error`,range:{start:0,end:0},line:1,column:1,messageKey:`local.parse.document`,params:{detail:e instanceof Error?e.message:String(e)}}]}}try{let e=Lg(a,`html`);e?(Ug(e,`html`,!0,i),Kg(e,i,!1)):Kg(a,i,!1)}catch(e){if(e instanceof vg){let t=bg(i,e.start,e.end);return{markup:``,diagnostics:[{code:`local.budget`,message:e.message,severity:`error`,range:{start:t.start,end:t.end},line:t.line,column:t.column,messageKey:`local.budget.nodes`,params:{limit:e.limit}}]}}return{markup:``,diagnostics:[{code:`local.parse`,message:`Cannot parse the HTML document: ${e instanceof Error?e.message:String(e)}`,severity:`error`,range:{start:0,end:0},line:1,column:1,messageKey:`local.parse.document`,params:{detail:e instanceof Error?e.message:String(e)}}]}}return{markup:Vg(i,a),diagnostics:r}}var Jg=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,Yg=/^[A-Za-z_][A-Za-z0-9_]*$/,Xg=1e-9,Zg=128,Qg=4,$g=3,e_=new Set([`x`,`y`,`true`,`false`,`null`,`pi`,`e`]);function t_(e){let t=e.trim();if(!Jg.test(t))return null;let n=Number(t);return Number.isFinite(n)?n:null}function n_(e){return e===``||ye(e)!==null}function r_(e){return Array.isArray(e)?e.slice():e}function i_(e,t,n){let r=(e-t)/n;return Math.abs(r-Math.round(r))<=Xg*Math.max(1,Math.abs(r))}function a_(e,t,n){let r=e??0,i=e===void 0?-1/0:Math.ceil((e-r)/n),a=t===void 0?1/0:Math.floor((t-r)/n);if(i>a)return null;let o=-r/n,s=null;for(let e of[Math.floor(o),Math.ceil(o)]){let t=Math.min(a,Math.max(i,e));if(!Number.isFinite(t))continue;if(s===null){s=t;continue}let o=r+t*n,c=r+s*n;(Math.abs(o)<Math.abs(c)||Math.abs(o)===Math.abs(c)&&o<c)&&(s=t)}if(s===null)return null;let c=r+s*n;return e!==void 0&&c<e||t!==void 0&&c>t?null:c}function o_(e){let t=[],n=[];for(let r=0;r<e.length;){if(e[r]===`\\`&&e.startsWith(`{{`,r+1)){r+=3;continue}if(!e.startsWith(`{{`,r)){r++;continue}let i=``,a=r+2;for(;a<e.length-1;a++){let t=e[a];if(i)t===`\\`?a++:t===i&&(i=``);else if(t===`"`||t===`'`)i=t;else if(t===`}`&&e[a+1]===`}`)break}if(a>=e.length-1){n.push(r);break}let o=e.slice(r+2,a),s=o.length-o.trimStart().length;t.push({expression:o.trim(),start:r+2+s,end:a}),r=a+2}return{segments:t,unterminated:n}}function s_(e){let t=/^\s*\{\{([\s\S]*)\}\}\s*$/.exec(e);if(!t)return null;let n=t[1],r=n.length-n.trimStart().length,i=e.indexOf(`{{`);return{expression:n.trim(),start:i+2+r}}function c_(e){return e.type===`comment`||e.type===`text`&&!(e.value??``).trim()||e.type===`paragraph`&&!e.children?.length&&!(e.value??``).trim()}function l_(e){return(e??[]).filter(e=>!c_(e))}function u_(e){return e.type===`text`||e.type===`inlineCode`||e.type===`fallback`?e.value??``:e.type===`interpolation`?`\0`:e.type===`break`?` `:(e.children??[]).map(u_).join(``)}function d_(e){return e.type===`interpolation`||(e.children??[]).some(d_)}function f_(e){return e.type===`component`||(e.children??[]).some(f_)}function p_(e){switch(e){case`string`:return`string`;case`number`:return`number`;case`boolean`:return`boolean`;case`null`:return`null`;case`array`:return`array`;case`number-array`:return`number-array`}}function m_(e,t){if(typeof e!=`string`||e.length>1e6)return{ok:!1,diagnostics:[{code:typeof e==`string`?`local.budget`:`local.parse`,message:typeof e==`string`?`Document exceeds the ${S}-character limit.`:`Document source must be a string.`,severity:`error`,range:{start:0,end:typeof e==`string`&&e.length?1:0},line:1,column:1,messageKey:typeof e==`string`?`local.budget.document`:`local.parse.source`,...typeof e==`string`?{params:{limit:S}}:{}}]};let n=qg(e,t.html,t.maxSyntaxNodes);return n.diagnostics.some(e=>e.severity===`error`)?{ok:!1,diagnostics:n.diagnostics}:{ok:!0,document:{syntax:`local`,source:e,syntaxVersion:Bm,html:t.html,nodes:[{type:`htmlDocument`,id:`local-0`,range:{start:0,end:e.length},value:n.markup}],initialState:{},bindings:{}},diagnostics:n.diagnostics}}function h_(e,t){let n=Oh(t);if(!n.ok)return{ok:!1,diagnostics:[{code:`local.options.invalid`,message:n.message,severity:`error`,range:{start:0,end:0},line:1,column:1,messageKey:n.key}]};if(n.htmlActive)return m_(e,n);if(typeof e!=`string`||e.length>1e6)return{ok:!1,diagnostics:Qh(e,t).diagnostics};let r=[],i=[0];for(let t=0;t<e.length;t+=1)e[t]===`
58
+ `&&i.push(t+1);let a=(t,n,a,o=a+1,s)=>{if(r.length>=100){let e=r.length-1;for(;e>=0&&r[e].severity!==`warning`;)--e;if(e<0)return;r.splice(e,1)}let c=Math.max(0,Math.min(e.length,a)),l=Math.max(c,Math.min(e.length,Math.max(c,o))),u=0,d=i.length-1;for(;u<d;){let e=Math.ceil((u+d)/2);i[e]<=c?u=e:d=e-1}let f=ze(s?.key??t,s?.params);r.push({code:t,message:n.length>2e3?`${n.slice(0,D-1)}…`:n,severity:`error`,range:{start:c,end:l},line:u+1,column:c-i[u]+1,messageKey:f.key,...f.params?{params:f.params}:{}})},o;try{o=Qh(e,t)}catch(e){return a(`local.parse`,`Cannot parse document: ${e instanceof Error?e.message:String(e)}`,0,void 0,{key:`local.parse.document`,params:{detail:e instanceof Error?e.message:String(e)}}),{ok:!1,diagnostics:r}}if(r.push(...o.diagnostics),r.some(e=>e.severity===`error`&&e.code.startsWith(`local.version.`)))return{ok:!1,diagnostics:r.filter(e=>e.code.startsWith(`local.version.`))};for(let e of g_(o.nodes))a(`local.legacy`,`Legacy reactive-md configuration fences (state/data/computed/actions, etc.) are not part of the local interaction syntax; select legacy mode explicitly in the host.`,e.range.start,e.range.end,{key:`local.legacy`});let s={source:e,lineStarts:i,nodes:o.nodes,report:a,entries:[],attrs:new Map,options:new Map,tabs:new Map,steps:new Map,selections:new Map,diagramNodes:new Map,checklists:new Map,tables:new Map,tableShapes:new Map,bindingSlots:Object.create(null),bindingKinds:{},computationKinds:{},computations:{},expressionKinds:new Map};__(o.nodes,null,s.entries,s);for(let e of s.entries)s.attrs.set(e.node.id,b_(e,s)),C_(e,s);for(let e of s.entries)T_(e,s);bv(s);let c=N_(s);s.bindingKinds=P_(c),Z_(s),ev(s),sv(s);let l=cv(s);fv(s),_v(s);let u={};for(let[e,t]of Object.entries(c))u[e]=r_(t.initial);if(tv(s,c,u),r.sort((e,t)=>e.range.start-t.range.start||e.range.end-t.range.end),r.some(e=>e.severity===`error`))return{ok:!1,diagnostics:r};let d=J_(s),f=Object.keys(s.computations),p={syntax:`local`,source:e,syntaxVersion:Bm,...o.versionDeclaration?{versionDeclaration:o.versionDeclaration}:{},nodes:$_(o.nodes),initialState:u,bindings:c,theme:o.theme??lh.name,...o.themeRange?{themeRange:o.themeRange}:{},...d?{bindingSlots:d}:{},...f.length?{computations:s.computations}:{},...l.length?{validations:l}:{}};return Wn(p),yv(p,s.tableShapes),{ok:!0,document:p,diagnostics:r}}function g_(e){let t=[],n=e=>{for(let r of e)r.type===`code`&&(r.lang??``).trim().toLowerCase()===`reactive-md`&&t.push(r),r.children&&n(r.children)};return n(e),t}function __(e,t,n,r){for(let i of e){let e=t;if(i.type===`component`&&i.name){let a=rh(i.name);if(a){let r={node:i,name:i.name,schema:a,parent:t};n.push(r),e=r}else{let e=i.name.length<=Zg?oh(i.name):void 0;r.report(`local.component.unknown`,`Unknown component <${i.name}>. ${e?`Did you mean <${e}>?`:`This mode only accepts local interaction components.`}`,i.range.start,i.range.end,{key:e?`local.component.unknown.suggestion`:`local.component.unknown`,params:e?{name:i.name,suggestion:e}:{name:i.name}})}}i.children&&__(i.children,e,n,r)}}function v_(e,t,n){let r=``,i=t;for(;i<n;i+=1){let t=e[i];if(r)t===r&&(r=``);else if(t===`"`||t===`'`)r=t;else if(t===`>`){i+=1;break}}return e.slice(t,i)}function y_(e,t,n){if(n.length>Zg)return t.node.range.start;let r=v_(e.source,t.node.range.start,t.node.range.end),i=RegExp(`(?:^|[\\s"'/])${n.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}(?=\\s|=|/|>)`).exec(r);return i?t.node.range.start+i.index+(i[0].length-n.length):t.node.range.start}function b_(e,t){let n={},r=e.node.attrs??{};for(let[i,a]of Object.entries(r)){let r=e.schema.props[i],o=y_(t,e,i);if(!r){let n=i.length<=Zg?sh(e.schema,i):void 0;t.report(`local.attribute.unknown`,`Component <${e.name}> does not support attribute ${i}.${n?` Did you mean ${n}?`:``}`,o,o+i.length,{key:n?`local.attribute.unknown.suggestion`:`local.attribute.unknown`,params:n?{component:e.name,name:i,suggestion:n}:{component:e.name,name:i}});continue}let s={raw:a,offset:o,dynamic:!1};if(r.kind===`string`&&a.length>1e5&&(t.report(`local.budget.attribute`,`Attribute ${i} on component <${e.name}> exceeds the ${w}-character limit.`,o,o+i.length,{key:`local.budget.attribute`,params:{name:i,component:e.name,limit:w}}),s.raw=a.slice(0,w)),x_(e,i,r,s,t),r.color){let n=o_(s.raw);n.segments.length||n.unterminated.length||qn(s.raw)||t.report(`local.attribute.color`,`Attribute ${i} on component <${e.name}> must be a standard CSS named color or #RGB/#RRGGBB, got "${s.raw}".`,o,o+i.length,{key:`local.attribute.color`,params:{name:i,component:e.name,value:s.raw}})}n[i]=s}for(let[r,i]of Object.entries(e.schema.props))i.required&&!Object.hasOwn(n,r)&&t.report(`local.attribute.required`,`Component <${e.name}> is missing required attribute ${r}.`,e.node.range.start,e.node.range.end,{key:`local.attribute.required`,params:{component:e.name,name:r}});return e.schema.label===`required`&&(Object.hasOwn(n,`label`)?String(n.label.raw).trim()||t.report(`local.label.required`,`Component <${e.name}> label cannot be empty.`,n.label.offset,void 0,{key:`local.label.required.empty`,params:{component:e.name}}):t.report(`local.label.required`,`Component <${e.name}> requires a label.`,e.node.range.start,e.node.range.end,{key:`local.label.required.missing`,params:{component:e.name}})),n}function x_(e,t,n,r,i){if(n.kind===`string`){if(n.static){let e=o_(r.raw);(e.segments.length||e.unterminated.length)&&i.report(`local.attribute.static`,`Attribute ${t} is static and cannot contain interpolations.`,r.offset,r.offset+r.raw.length,{key:`local.attribute.static`,params:{name:t}})}r.value=r.raw;return}if(n.kind===`number`){let e=n.dynamic?s_(r.raw):null;if(e){r.dynamic=!0,r.expression=e.expression,r.expressionOffset=r.offset+e.start,e.expression||i.report(`local.expression.empty`,`Attribute ${t} interpolation cannot be empty.`,r.expressionOffset,void 0,{key:`local.expression.empty.attribute`,params:{name:t}});return}let a=t_(r.raw);if(a===null){i.report(`local.attribute.type`,`Attribute ${t} requires a number${n.dynamic?` or a full number interpolation`:``}, got "${r.raw}".`,r.offset,r.offset+r.raw.length,{key:n.dynamic?`local.attribute.type.number-interpolation`:`local.attribute.type.number`,params:{name:t,value:r.raw}});return}n.integer&&!Number.isInteger(a)&&i.report(`local.attribute.type`,`Attribute ${t} requires an integer.`,r.offset,void 0,{key:`local.attribute.type.integer`,params:{name:t}}),n.positive&&!(a>0)&&i.report(`local.attribute.type`,`Attribute ${t} requires a positive number.`,r.offset,void 0,{key:`local.attribute.type.positive`,params:{name:t}}),n.min!==void 0&&a<n.min&&i.report(`local.attribute.range`,`Attribute ${t} must be at least ${n.min}.`,r.offset,void 0,{key:`local.attribute.range.min`,params:{name:t,min:n.min}}),n.max!==void 0&&a>n.max&&i.report(`local.attribute.range`,`Attribute ${t} must be at most ${n.max}.`,r.offset,void 0,{key:`local.attribute.range.max`,params:{name:t,max:n.max}}),r.value=a;return}if(n.kind===`boolean`){let e=n.dynamic?s_(r.raw):null;if(e){r.dynamic=!0,r.expression=e.expression,r.expressionOffset=r.offset+e.start,e.expression||i.report(`local.expression.empty`,`Attribute ${t} interpolation cannot be empty.`,r.expressionOffset,void 0,{key:`local.expression.empty.attribute`,params:{name:t}});return}if(r.raw===`true`||r.raw===`false`){r.value=r.raw===`true`;return}i.report(`local.attribute.type`,`Attribute ${t} requires true or false${n.dynamic?`, or a full boolean interpolation`:``}.`,r.offset,r.offset+r.raw.length,{key:n.dynamic?`local.attribute.type.boolean-interpolation`:`local.attribute.type.boolean`,params:{name:t}});return}let a=n.dynamic?s_(r.raw):null;if(a){r.dynamic=!0,r.expression=a.expression,r.expressionOffset=r.offset+a.start,a.expression||i.report(`local.expression.empty`,`Attribute ${t} interpolation cannot be empty.`,r.expressionOffset,void 0,{key:`local.expression.empty.attribute`,params:{name:t}});return}let o=n.values??[];o.includes(r.raw)?r.value=r.raw:i.report(`local.attribute.type`,`Attribute ${t} must be one of ${o.join(` / `)}, got "${r.raw}".`,r.offset,r.offset+r.raw.length,{key:`local.attribute.type.enum`,params:{name:t,values:o.join(` / `),value:r.raw}})}function S_(e,t,n){let r=t[n];if(r)return!r.dynamic&&typeof r.value==`number`?r.value:void 0;let i=e.schema.props[n]?.default;return typeof i==`number`?i:void 0}function C_(e,t){let n=t.attrs.get(e.node.id)??{},r=t.report;if(e.name===`number`||e.name===`slider`||e.name===`counter`){let t=S_(e,n,`min`),i=S_(e,n,`max`),a=S_(e,n,`step`);t!==void 0&&i!==void 0&&t>i&&r(`local.constraint`,`Component <${e.name}> min cannot exceed max.`,n.min?.offset??e.node.range.start,void 0,{key:`local.constraint.number-min-max`,params:{component:e.name}}),a!==void 0&&!(a>0)&&r(`local.constraint`,`Component <${e.name}> step must be greater than 0.`,n.step?.offset??e.node.range.start,void 0,{key:`local.constraint.number-step`,params:{component:e.name}})}if(e.name===`input`||e.name===`textarea`){let t=S_(e,n,`min-length`)??0,i=S_(e,n,`max-length`);i!==void 0&&i<t&&r(`local.constraint`,`max-length cannot be less than min-length.`,n[`max-length`]?.offset??e.node.range.start,void 0,{key:`local.constraint.length-order`})}if(e.name===`date`){let t=typeof n.min?.value==`string`?n.min.value:void 0,i=typeof n.max?.value==`string`?n.max.value:void 0;t!==void 0&&!n_(t)&&r(`local.attribute.type`,`Date lower bound ${t} is not a valid YYYY-MM-DD.`,n.min?.offset??e.node.range.start,void 0,{key:`local.attribute.type.date-lower`,params:{value:t}}),i!==void 0&&!n_(i)&&r(`local.attribute.type`,`Date upper bound ${i} is not a valid YYYY-MM-DD.`,n.max?.offset??e.node.range.start,void 0,{key:`local.attribute.type.date-upper`,params:{value:i}}),t&&i&&t>i&&r(`local.constraint`,`Date min cannot be later than max.`,n.min?.offset??e.node.range.start,void 0,{key:`local.constraint.date-order`})}if(e.name===`progress`){let t=S_(e,n,`max`)??100,i=n.value;i&&!i.dynamic&&typeof i.value==`number`&&(i.value<0||i.value>t)&&r(`local.constraint`,`progress value must be between 0 and ${t}, got ${i.value}.`,i.offset,void 0,{key:`local.constraint.progress-range`,params:{max:t,value:i.value}})}if(e.name===`plot`){let t=S_(e,n,`min`),i=S_(e,n,`max`);t!==void 0&&i!==void 0&&!(t<i)&&r(`local.constraint`,`plot min must be less than max.`,n.min?.offset??e.node.range.start,void 0,{key:`local.constraint.plot-range`})}if(e.name===`timer`){let t=S_(e,n,`duration`)??60;(!Number.isInteger(t)||t<=0)&&r(`local.constraint`,`timer duration must be a positive whole number of seconds.`,n.duration?.offset??e.node.range.start,void 0,{key:`local.constraint.timer-duration`})}if(e.name===`range-slider`){let t=S_(e,n,`min`)??0,i=S_(e,n,`max`)??100,a=S_(e,n,`step`)??1;t<=i||r(`local.constraint`,`range-slider min cannot exceed max.`,n.min?.offset??e.node.range.start,void 0,{key:`local.constraint.range-slider-min-max`}),a>0&&Number.isFinite(a)||r(`local.constraint`,`range-slider step must be a finite positive number.`,n.step?.offset??e.node.range.start,void 0,{key:`local.constraint.range-slider-step`})}if(e.name===`coordinate`){for(let t of[`x`,`y`])(S_(e,n,`${t}-min`)??-5)<=(S_(e,n,`${t}-max`)??5)||r(`local.constraint`,`coordinate ${t}-min cannot exceed ${t}-max.`,n[`${t}-min`]?.offset??e.node.range.start,void 0,{key:`local.constraint.coordinate-axis`,params:{axis:t}});let t=S_(e,n,`step`)??1;t>0&&Number.isFinite(t)||r(`local.constraint`,`coordinate step must be a finite positive number.`,n.step?.offset??e.node.range.start,void 0,{key:`local.constraint.coordinate-step`})}if(e.name===`multi-select`){let t=S_(e,n,`max-selected`);t!==void 0&&(!Number.isInteger(t)||t<0)&&r(`local.constraint`,`multi-select max-selected must be a nonnegative whole number.`,n[`max-selected`]?.offset??e.node.range.start,void 0,{key:`local.constraint.multi-select`})}if((e.name===`table`||e.name===`chart`)&&!Object.hasOwn(n,`key`))for(let t of[`bind`,`initial`])Object.hasOwn(n,t)&&r(`local.selection.key`,`<${e.name}> ${t} requires a key attribute naming the selection column.`,n[t].offset,void 0,{key:`local.selection.key.required`,params:{component:e.name,name:t}})}function w_(e){return(e.node.children??[]).filter(e=>e.type===`component`&&!!e.name).map(t=>({node:t,name:t.name,schema:rh(t.name),parent:e})).filter(e=>!!e.schema)}function T_(e,t){let n=t.attrs.get(e.node.id)??{},r=l_(e.node.children),i=t.report,a=e.schema.childRule;switch(e.schema.parent&&(e.parent&&e.schema.parent.includes(e.parent.name)||i(`local.structure.parent`,`<${e.name}> can only appear directly inside ${e.schema.parent.map(e=>`<${e}>`).join(` or `)}.`,e.node.range.start,e.node.range.end,{key:`local.structure.parent`,params:{name:e.name,parents:e.schema.parent.map(e=>`<${e}>`).join(` / `)}})),a){case`none`:r.length&&i(`local.structure.children`,`<${e.name}> does not accept body content.`,r[0].range.start,r[0].range.end,{key:`local.structure.no-body`,params:{name:e.name}});break;case`inline`:if(e.name===`text`||e.name===`jump`){let t=new Set([`text`,`emphasis`,`strong`,`delete`,`underline`,`mark`,`link`,`image`,`inlineCode`,`inlineMath`,`interpolation`,`break`,`comment`,`fallback`,`footnoteReference`]),n=e=>t.has(e.type)&&(e.children??[]).every(n);(r.length===1&&r[0].type===`paragraph`?r[0].children??[]:r).every(n)||i(`local.structure.children`,`<${e.name}> only accepts inline Markdown.`,e.node.range.start,e.node.range.end,{key:`local.structure.inline-only`,params:{name:e.name}})}for(let t of r)f_(t)&&i(`local.structure.children`,`The body of <${e.name}> cannot contain other interactive components.`,t.range.start,t.range.end,{key:`local.structure.no-nested-components`,params:{name:e.name}});break;case`content`:e.name===`node`&&E_(e,t);break;case`any`:break;case`options`:D_(e,t,n);break;case`tabs`:O_(e,t);break;case`disclosures`:{let t=w_(e),n=t.filter(e=>e.name===`disclosure`);if(n.length||i(`local.structure.children`,`<accordion> requires at least one <disclosure>.`,e.node.range.start,e.node.range.end,{key:`local.structure.accordion.needs-disclosure`}),n.length!==t.length)for(let e of t)e.name!==`disclosure`&&i(`local.structure.children`,`<accordion> can only contain <disclosure>.`,e.node.range.start,e.node.range.end,{key:`local.structure.accordion.only-disclosure`});r.some(e=>e.type!==`component`)&&i(`local.structure.children`,`<accordion> can only contain <disclosure>.`,e.node.range.start,e.node.range.end,{key:`local.structure.accordion.only-disclosure`});break}case`cards`:{let t=w_(e),n=t.filter(e=>e.name===`card`);if(n.length||i(`local.structure.children`,`<grid> requires at least one <card>.`,e.node.range.start,e.node.range.end,{key:`local.structure.grid.needs-card`}),n.length!==t.length)for(let e of t)e.name!==`card`&&i(`local.structure.children`,`Direct children of <grid> must be <card>.`,e.node.range.start,e.node.range.end,{key:`local.structure.grid.only-card`});r.some(e=>e.type!==`component`)&&i(`local.structure.children`,`Direct children of <grid> must be <card>.`,e.node.range.start,e.node.range.end,{key:`local.structure.grid.only-card`});break}case`diagram`:j_(e,t);break;case`table`:{let n=r.filter(e=>e.type===`table`);(n.length!==1||r.length!==1)&&i(`local.structure.children`,`The body of <${e.name}> must be exactly one Markdown table.`,e.node.range.start,e.node.range.end,{key:`local.structure.table.single`,params:{name:e.name}}),n.length?t.tables.set(e.node.id,n[0]):e.name===`table`&&r.length===1&&t.tables.set(e.node.id,r[0]);break}case`plot`:r.filter(e=>e.type===`math`).length||i(`local.structure.children`,`<plot> requires at least one $$...$$ formula block.`,e.node.range.start,e.node.range.end,{key:`local.structure.plot.needs-formula`});for(let e of r)e.type!==`math`&&i(`local.structure.children`,`The body of <plot> can only contain blank lines and $$...$$ formula blocks.`,e.range.start,e.range.end,{key:`local.structure.plot.only-formulas`});break;case`steps`:k_(e,t);break;case`quiz`:A_(e,t,n);break;case`columns`:{let t=w_(e),n=t.filter(e=>e.name===`column`);n.length||i(`local.structure.children`,`<data-table> requires at least one <column>.`,e.node.range.start,e.node.range.end),n.length>20&&i(`local.budget.data-table.columns`,`<data-table> supports at most 20 columns, but has ${n.length}.`,e.node.range.start,e.node.range.end);for(let e of t)e.name!==`column`&&i(`local.structure.children`,`<data-table> can only contain <column>.`,e.node.range.start,e.node.range.end);r.some(e=>e.type!==`component`)&&i(`local.structure.children`,`<data-table> can only contain <column>.`,e.node.range.start,e.node.range.end);break}}}function E_(e,t){let n=e=>{for(let r of e)r.type===`component`?t.report(`local.structure.children`,`The description of <node> cannot contain interactive components.`,r.range.start,r.range.end,{key:`local.structure.node.no-components`}):r.children&&n(r.children)};n(e.node.children??[])}function D_(e,t,n){let r=w_(e),i=r.filter(e=>e.name===`option`);i.length||t.report(`local.structure.children`,`<${e.name}> requires at least one <option value="...">.`,e.node.range.start,e.node.range.end,{key:`local.structure.options.needed`,params:{name:e.name}});for(let n of r)n.name!==`option`&&t.report(`local.structure.children`,`<${e.name}> can only contain <option>.`,n.node.range.start,n.node.range.end,{key:`local.structure.options.only`,params:{name:e.name}});l_(e.node.children).some(e=>e.type!==`component`)&&t.report(`local.structure.children`,`<${e.name}> can only contain <option>.`,e.node.range.start,e.node.range.end,{key:`local.structure.options.only`,params:{name:e.name}}),i.length>1e4&&t.report(`local.budget.array`,`<${e.name}> options exceed the limit of ${T}.`,e.node.range.start,e.node.range.end,{key:`local.budget.array.options`,params:{name:e.name,limit:T}});let a=[];for(let n of i){let r=t.attrs.get(n.node.id)??{},i=typeof r.value?.value==`string`?r.value.value:``;i?e.name===`multi-select`&&i.includes(`,`)?t.report(`local.option.value`,`<multi-select> option values cannot contain commas: "${i}".`,n.node.range.start,n.node.range.end,{key:`local.option.value.comma`,params:{value:i}}):a.includes(i)?t.report(`local.option.value`,`Option values in <${e.name}> must be unique; duplicate value "${i}".`,n.node.range.start,n.node.range.end,{key:`local.option.value.duplicate`,params:{name:e.name,value:i}}):((n.node.children??[]).some(f_)&&t.report(`local.structure.children`,`The body of <option> cannot contain interactive components.`,n.node.range.start,n.node.range.end,{key:`local.structure.option.no-components`}),a.push(i)):t.report(`local.option.value`,`<option> requires a non-empty value.`,n.node.range.start,n.node.range.end,{key:`local.option.value.required`})}t.options.set(e.node.id,a)}function O_(e,t){let n=w_(e),r=n.filter(e=>e.name===`tab`);r.length||t.report(`local.structure.children`,`<tabs> requires at least one <tab>.`,e.node.range.start,e.node.range.end,{key:`local.structure.tabs.needs-tab`});for(let e of n)e.name!==`tab`&&t.report(`local.structure.children`,`<tabs> can only contain <tab>.`,e.node.range.start,e.node.range.end,{key:`local.structure.tabs.only-tab`});l_(e.node.children).some(e=>e.type!==`component`)&&t.report(`local.structure.children`,`<tabs> can only contain <tab>.`,e.node.range.start,e.node.range.end,{key:`local.structure.tabs.only-tab`});let i=[];r.forEach((e,n)=>{let r=t.attrs.get(e.node.id)??{},a=(typeof r.value?.value==`string`?r.value.value.trim():``)||`tab-${n+1}`;i.includes(a)?t.report(`local.tab.value`,`Tab values in <tabs> must be unique; duplicate value "${a}".`,e.node.range.start,e.node.range.end,{key:`local.tab.value.duplicate`,params:{value:a}}):i.push(a)}),t.tabs.set(e.node.id,i)}function k_(e,t){let n=w_(e),r=n.filter(e=>e.name===`step`);r.length||t.report(`local.structure.children`,`<steps> requires at least one <step>.`,e.node.range.start,e.node.range.end,{key:`local.structure.steps.needs-step`});for(let e of n)e.name!==`step`&&t.report(`local.structure.children`,`<steps> can only contain <step>.`,e.node.range.start,e.node.range.end,{key:`local.structure.steps.only-step`});l_(e.node.children).some(e=>e.type!==`component`)&&t.report(`local.structure.children`,`<steps> can only contain <step>.`,e.node.range.start,e.node.range.end,{key:`local.structure.steps.only-step`});let i=[];r.forEach((e,n)=>{let r=t.attrs.get(e.node.id)??{},a=(typeof r.value?.value==`string`?r.value.value.trim():``)||`step-${n+1}`;i.includes(a)?t.report(`local.step.value`,`Step values in <steps> must be unique; duplicate value "${a}".`,e.node.range.start,e.node.range.end,{key:`local.step.value.duplicate`,params:{value:a}}):i.push(a)}),t.steps.set(e.node.id,i)}function A_(e,t,n){let r=typeof n.type?.value==`string`?n.type.value:`choice`,i=typeof n.answer?.value==`string`?n.answer.value:``;if(i.trim()||t.report(`local.quiz.answer`,`<quiz> requires a non-empty answer.`,n.answer?.offset??e.node.range.start,void 0,{key:`local.quiz.answer.required`}),r===`number`){l_(e.node.children).length&&t.report(`local.structure.children`,`A numeric <quiz> cannot have body content; use type="choice" for option-based quizzes.`,e.node.range.start,e.node.range.end,{key:`local.structure.quiz.numeric-no-body`}),i.trim()&&t_(i)===null&&t.report(`local.quiz.answer`,`A numeric <quiz> answer must be a finite number.`,n.answer?.offset??e.node.range.start,void 0,{key:`local.quiz.answer.numeric`});let r=S_(e,n,`tolerance`);r!==void 0&&(!Number.isFinite(r)||r<0)&&t.report(`local.constraint`,`<quiz> tolerance must be a nonnegative finite number.`,n.tolerance?.offset??e.node.range.start,void 0,{key:`local.constraint.quiz-tolerance`});return}D_(e,t,n);let a=t.options.get(e.node.id)??[];i.trim()&&a.length&&!a.includes(i)&&t.report(`local.quiz.answer`,`<quiz> answer "${i}" is not one of the option values: ${a.join(`, `)}.`,n.answer?.offset??e.node.range.start,void 0,{key:`local.quiz.answer.not-option`,params:{answer:i,options:a.join(`, `)}})}function j_(e,t){let n=w_(e),r=n.filter(e=>e.name===`node`),i=n.filter(e=>e.name===`edge`);r.length||t.report(`local.diagram.node`,`<diagram> requires at least one <node>.`,e.node.range.start,e.node.range.end,{key:`local.diagram.node.required`});for(let e of n)e.name!==`node`&&e.name!==`edge`&&t.report(`local.structure.children`,`<diagram> can only contain <node> and <edge>.`,e.node.range.start,e.node.range.end,{key:`local.structure.diagram.only`});l_(e.node.children).some(e=>e.type!==`component`)&&t.report(`local.structure.children`,`<diagram> can only contain <node> and <edge>.`,e.node.range.start,e.node.range.end,{key:`local.structure.diagram.only`});let a=[];for(let e of r){let n=t.attrs.get(e.node.id)??{},r=typeof n.id?.value==`string`?n.id.value:``;r&&(/^[A-Za-z_][A-Za-z0-9_-]*$/.test(r)||t.report(`local.diagram.node`,`Node ID "${r}" may only contain letters, digits, underscores and hyphens, and cannot start with a digit.`,e.node.range.start,e.node.range.end,{key:`local.diagram.node.invalid`,params:{id:r}}),a.includes(r)?t.report(`local.diagram.node`,`Duplicate node ID "${r}".`,e.node.range.start,e.node.range.end,{key:`local.diagram.node.duplicate`,params:{id:r}}):a.push(r))}t.diagramNodes.set(e.node.id,a);let o=new Set;for(let e of i){let n=t.attrs.get(e.node.id)??{},r=typeof n.from?.value==`string`?n.from.value:``,i=typeof n.to?.value==`string`?n.to.value:``,s=typeof n.label?.value==`string`?n.label.value:``;r&&!a.includes(r)&&t.report(`local.diagram.edge`,`Edge from references unknown node "${r}".`,e.node.range.start,e.node.range.end,{key:`local.diagram.edge.from`,params:{id:r}}),i&&!a.includes(i)&&t.report(`local.diagram.edge`,`Edge to references unknown node "${i}".`,e.node.range.start,e.node.range.end,{key:`local.diagram.edge.to`,params:{id:i}});let c=`${r}\u0000${i}\u0000${s}`;o.has(c)&&t.report(`local.diagram.edge`,`Duplicate edge: ${r} → ${i}${s?` (${s})`:``}.`,e.node.range.start,e.node.range.end,{key:`local.diagram.edge.duplicate`,params:{from:r,to:i,label:s?` (${s})`:``}}),o.add(c)}}function M_(e,t){let n=t.checklists.get(e.node.id);if(n)return n;let r=l_(e.node.children),i=r.filter(e=>e.type===`list`);(r.length!==1||i.length!==1)&&t.report(`local.checklist.body`,`The body of <checklist> must be exactly one single-level Markdown task list.`,e.node.range.start,e.node.range.end,{key:`local.checklist.body.single`});let a=i[0],o=[],s=[];if(!a)return t.checklists.set(e.node.id,{ids:o,checked:s}),{ids:o,checked:s};let c=a.children??[];c.length||t.report(`local.checklist.body`,`<checklist> requires at least one task list item.`,a.range.start,a.range.end,{key:`local.checklist.body.item-required`}),c.length>1e4&&t.report(`local.budget.array`,`<checklist> items exceed the limit of ${T}.`,a.range.start,a.range.end,{key:`local.checklist.body.items-limit`,params:{limit:T}}),c.slice(0,T).forEach((e,n)=>{if(e.type!==`listItem`||e.checked===null||e.checked===void 0){t.report(`local.checklist.body`,`<checklist> can only contain task list items (- [ ] / - [x]).`,e.range.start,e.range.end,{key:`local.checklist.body.task-only`});return}(e.children??[]).some(e=>e.type===`list`)&&t.report(`local.checklist.body`,`<checklist> does not support nested lists.`,e.range.start,e.range.end,{key:`local.checklist.body.no-nested`}),f_(e)&&t.report(`local.checklist.body`,`<checklist> items cannot contain interactive components.`,e.range.start,e.range.end,{key:`local.checklist.body.no-components`});let r=`item-${n+1}`;o.push(r),e.checked&&s.push(r)});let l={ids:o,checked:s};return t.checklists.set(e.node.id,l),l}function N_(e){let t=new Map;for(let n of e.entries){if(!n.schema.binding)continue;let r=e.attrs.get(n.node.id)??{};if((n.name===`table`||n.name===`chart`)&&!Object.hasOwn(r,`key`))continue;let i=typeof r.bind?.value==`string`?r.bind.value:``,a=i||`@${n.node.id}`;r.bind&&(i.length>Zg?(e.report(`local.budget.identifier`,`Parameter name exceeds the ${Zg}-character limit.`,r.bind.offset??n.node.range.start,void 0,{key:`local.budget.identifier`,params:{limit:Zg}}),a=`@${n.node.id}`):Yg.test(i)?(st.has(i)||e_.has(i))&&(e.report(`local.binding.reserved`,`Parameter name "${i}" is reserved; choose another name.`,r.bind.offset??n.node.range.start,void 0,{key:`local.binding.reserved`,params:{name:i}}),a=`@${n.node.id}`):(e.report(`local.binding.name`,`Parameter name "${i}" must match [A-Za-z_][A-Za-z0-9_]*.`,r.bind.offset??n.node.range.start,void 0,{key:`local.binding.name`,params:{name:i}}),a=`@${n.node.id}`));let o=t.get(a);o?o.members.push({entry:n,attrs:r}):t.set(a,{key:a,schema:n.schema,members:[{entry:n,attrs:r}]})}let n={};for(let r of t.values()){let t=I_(r,e);t&&(n[r.key]=t)}return G_(e,n),n}function P_(e){let t={};for(let[n,r]of Object.entries(e))n.startsWith(`@`)||(t[n]=r.type);return t}function F_(e,t,n){return n===`timer`?{min:0,max:S_(e,t,`duration`)??60,step:1}:{min:S_(e,t,`min`),max:S_(e,t,`max`),step:S_(e,t,`step`)??1}}function I_(e,t){let n=e.members[0],r=n.entry.schema.binding;if(!r)return null;let i=r.family;for(let a of e.members.slice(1))a.entry.schema.binding?.family!==i&&t.report(`local.binding.type`,`Parameter "${e.key}" is already declared as ${p_(r.kind)} by <${n.entry.name}> and cannot also bind <${a.entry.name}>.`,a.entry.node.range.start,a.entry.node.range.end,{key:`local.binding.type`,params:{key:e.key,kind:p_(r.kind),first:n.entry.name,second:a.entry.name}});if(r.exclusive&&e.members.length>1)for(let r of e.members.slice(1))t.report(`local.binding.exclusive`,`Parameter "${e.key}" of <${n.entry.name}> can only be owned by one component and cannot be shared with <${r.entry.name}>.`,r.entry.node.range.start,r.entry.node.range.end,{key:`local.binding.exclusive`,params:{key:e.key,first:n.entry.name,second:r.entry.name}});let a=B_(n.entry,t,i),o;if(r.kind===`number`){o=F_(n.entry,n.attrs,i);for(let r of e.members.slice(1)){let a=F_(r.entry,r.attrs,i);(a.min!==o.min||a.max!==o.max||a.step!==o.step)&&t.report(`local.binding.constraint`,`Parameter "${e.key}" must use the same numeric range and step: <${n.entry.name}> has ${L_(o)}, <${r.entry.name}> has ${L_(a)}.`,r.entry.node.range.start,r.entry.node.range.end,{key:`local.binding.constraint`,params:{key:e.key,first:n.entry.name,second:r.entry.name,firstConstraints:L_(o),secondConstraints:L_(a)}})}}if(i===`choice`||i===`selection`)for(let n of e.members.slice(1))B_(n.entry,t,i).join(`\0`)!==a.join(`\0`)&&t.report(`local.binding.option`,`Parameter "${e.key}" must use the same option set in the same order.`,n.entry.node.range.start,n.entry.node.range.end,{key:`local.binding.option`,params:{key:e.key}});let s=i===`multi-select`?S_(n.entry,n.attrs,`max-selected`):void 0,c=e.members.filter(e=>Object.hasOwn(e.attrs,`initial`)),l;if(c.length>1){let n=c.map(e=>R_(t,e.attrs.initial.offset)),r=Math.min(c.length,Qg);for(let i=0;i<r;i+=1){let r=[];for(let e=1;e<n.length&&r.length<$g;e+=1)r.push(n[(i+e)%n.length]);t.report(`local.initial.duplicate`,`Parameter "${e.key}" has multiple explicit initial values (${c.length} in total${r.length?`; see also line ${r.join(`, `)}`:``}).`,c[i].attrs.initial.offset,void 0,r.length?{key:`local.initial.duplicate-peers`,params:{key:e.key,count:c.length,lines:r.join(`, `)}}:{key:`local.initial.duplicate`,params:{key:e.key,count:c.length}})}}l=i===`multi-select`?c.length?V_(c[0],a,s,t):[]:c.length>0?H_(c[0],t,i,a):U_(n,t,i,a,o),i===`checklist`&&!Array.isArray(l)&&(l=[]),r.kind!==`array`&&W_(e,n,l,i,a,o,t),(i===`text`||i===`date`)&&z_(e,l,t);let u={name:e.key,nodeIds:e.members.map(e=>e.entry.node.id),type:r.kind,initial:r_(l),owner:n.entry.node.id};return o&&(o.min!==void 0&&(u.min=o.min),o.max!==void 0&&(u.max=o.max),u.step=o.step),a.length&&(u.options=[...a]),i===`multi-select`&&(u.maxItems=s??a.length),u}function L_(e){return`[${e.min===void 0?`-∞`:String(e.min)}, ${e.max===void 0?`∞`:String(e.max)}] / ${e.step}`}function R_(e,t){let n=Math.max(0,Math.min(e.source.length,t)),r=0,i=e.lineStarts.length-1;for(;r<i;){let t=Math.ceil((r+i)/2);e.lineStarts[t]<=n?r=t:i=t-1}return r+1}function z_(e,t,n){if(typeof t!=`string`||t===``)return;let r=e.members[0],i=r.attrs.initial?.offset??r.entry.node.range.start,a=tt(t);for(let r of e.members){let{entry:o,attrs:s}=r;if(o.name===`input`||o.name===`textarea`){let r=S_(o,s,`min-length`)??0,c=S_(o,s,`max-length`);a<r&&n.report(`local.initial.length`,`Initial value of parameter "${e.key}" has length ${a}, below the minimum length ${r} required by <${o.name}>.`,i,void 0,{key:`local.initial.length.min`,params:{key:e.key,length:a,min:r,name:o.name}}),c!==void 0&&a>c&&n.report(`local.initial.length`,`Initial value of parameter "${e.key}" has length ${a}, exceeding the maximum length ${c} allowed by <${o.name}>.`,i,void 0,{key:`local.initial.length.max`,params:{key:e.key,length:a,max:c,name:o.name}}),o.name===`input`&&(typeof s.type?.value==`string`?s.type.value:`text`)===`email`&&!N(t)&&n.report(`local.initial.email`,`Initial value of parameter "${e.key}" is not a valid email address.`,i,void 0,{key:`local.initial.email`,params:{key:e.key}})}else if(o.name===`date`&&n_(t)){let r=typeof s.min?.value==`string`&&n_(s.min.value)?s.min.value:void 0,a=typeof s.max?.value==`string`&&n_(s.max.value)?s.max.value:void 0;r&&t<r&&n.report(`local.initial.range`,`Initial value ${t} of parameter "${e.key}" is earlier than the minimum date ${r} of <date>.`,i,void 0,{key:`local.initial.date.min`,params:{key:e.key,value:t,min:r}}),a&&t>a&&n.report(`local.initial.range`,`Initial value ${t} of parameter "${e.key}" is later than the maximum date ${a} of <date>.`,i,void 0,{key:`local.initial.date.max`,params:{key:e.key,value:t,max:a}})}}}function B_(e,t,n){switch(n){case`choice`:case`multi-select`:return t.options.get(e.node.id)??[];case`tabs`:return t.tabs.get(e.node.id)??[];case`steps`:return t.steps.get(e.node.id)??[];case`selection`:return t.selections.get(e.node.id)??[``];case`diagram`:return t.diagramNodes.get(e.node.id)??[];case`checklist`:return M_(e,t).ids;default:return[]}}function V_(e,t,n,r){let i=e.attrs.initial;if(!i)return[];let a=typeof i.value==`string`?i.value:String(i.value??``),o=[];for(let n of a.split(`,`).map(e=>e.trim()).filter(Boolean))t.includes(n)?o.includes(n)||o.push(n):r.report(`local.initial.option`,`Initial value "${n}" of parameter "${e.entry.node.id}" is not an option of <multi-select>.`,i.offset,void 0,{key:`local.initial.option.multi-select`,params:{key:e.entry.node.id,value:n}});return n!==void 0&&o.length>n&&r.report(`local.initial.range`,`Initial values of <multi-select> exceed max-selected ${n}.`,i.offset,void 0,{key:`local.initial.multi-select`,params:{max:n}}),t.filter(e=>o.includes(e))}function H_(e,t,n,r){let i=e.attrs.initial;if(!i)return U_(e,t,n,r,void 0);let a=e.entry;if(n===`number`&&typeof i.value==`number`||n===`boolean`&&typeof i.value==`boolean`)return i.value;if(n===`number`||n===`boolean`)return t.report(`local.initial.type`,`Initial value of parameter "${a.node.id}" has the wrong type.`,i.offset,void 0,{key:`local.initial.type`,params:{name:a.node.id}}),n===`number`&&0;let o=typeof i.value==`string`?i.value:String(i.value??``);return n===`date`&&!n_(o)&&t.report(`local.initial.date`,`Initial date "${o}" is not a valid YYYY-MM-DD.`,i.offset,void 0,{key:`local.initial.date`,params:{value:o}}),n===`choice`&&r.length&&!r.includes(o)&&t.report(`local.initial.option`,`Initial value "${o}" is not an available option: ${r.join(`, `)}.`,i.offset,void 0,{key:`local.initial.value.option`,params:{value:o,options:r.join(`, `)}}),o}function U_(e,t,n,r,i){let a=e.entry;switch(n){case`text`:case`date`:return``;case`boolean`:return!1;case`choice`:return r[0]??``;case`tabs`:case`steps`:case`diagram`:return r[0]??``;case`selection`:return``;case`multi-select`:return[];case`timer`:return(i??F_(a,e.attrs,n)).max??60;case`checklist`:return[...M_(a,t).checked];case`number`:{let r=i??F_(a,e.attrs,n);if(a.schema.initialRule===`min`)return r.min??0;let o=a_(r.min,r.max,r.step);return o===null?(t.report(`local.initial.range`,`Parameter "${a.node.id}" has no valid step value within range [${r.min??`-∞`}, ${r.max??`∞`}].`,a.node.range.start,a.node.range.end,{key:`local.initial.no-step`,params:{key:a.node.id,min:r.min??`-∞`,max:r.max??`∞`}}),0):o}}return t.report(`local.initial`,`Cannot derive a default initial value for <${a.name}> parameter "${a.node.id}".`,a.node.range.start,a.node.range.end,{key:`local.initial.cannot-derive`,params:{name:a.name,key:a.node.id}}),``}function W_(e,t,n,r,i,a,o){let s=e.key;if(r===`number`){if(typeof n!=`number`||!Number.isFinite(n)){o.report(`local.initial.type`,`Initial value of parameter "${s}" must be a finite number.`,t.entry.node.range.start,void 0,{key:`local.initial.type.number`,params:{key:s}});return}let e=a??F_(t.entry,t.attrs,r);e.min!==void 0&&n<e.min&&o.report(`local.initial.range`,`Initial value ${n} of parameter "${s}" is below the minimum ${e.min}.`,t.attrs.initial?.offset??t.entry.node.range.start,void 0,{key:`local.initial.range.min`,params:{value:n,key:s,min:e.min}}),e.max!==void 0&&n>e.max&&o.report(`local.initial.range`,`Initial value ${n} of parameter "${s}" exceeds the maximum ${e.max}.`,t.attrs.initial?.offset??t.entry.node.range.start,void 0,{key:`local.initial.range.max`,params:{value:n,key:s,max:e.max}});let i=e.min??0;n>=(e.min??-1/0)&&n<=(e.max??1/0)&&!i_(n,i,e.step)&&o.report(`local.initial.step`,`Initial value ${n} of parameter "${s}" is not on step ${e.step} (based at ${e.min??0}).`,t.attrs.initial?.offset??t.entry.node.range.start,void 0,{key:`local.initial.range.step`,params:{value:n,key:s,step:e.step,base:e.min??0}})}else r===`boolean`&&typeof n!=`boolean`&&o.report(`local.initial.type`,`Initial value of parameter "${s}" must be a boolean.`,t.entry.node.range.start,void 0,{key:`local.initial.type.boolean`,params:{key:s}}),(r===`choice`||r===`tabs`||r===`steps`||r===`diagram`||r===`selection`)&&i.length&&!i.includes(String(n))&&o.report(`local.initial.option`,`Initial value "${String(n)}" of parameter "${s}" is not among the available values ${i.join(`, `)}.`,t.attrs.initial?.offset??t.entry.node.range.start,void 0,{key:`local.initial.value.options`,params:{value:String(n),key:s,options:i.join(`, `)}})}function G_(e,t){let n=new Set(Object.keys(t));for(let r of e.entries){let i=r.schema.slots;if(!i?.length)continue;let a=e.attrs.get(r.node.id)??{},o=Object.create(null),s=new Map;for(let c of i){let i=a[c.bind],l;if(i){let t=typeof i.value==`string`?i.value:``;t.length>Zg?e.report(`local.budget.identifier`,`Parameter name exceeds the ${Zg}-character limit.`,i.offset??r.node.range.start,void 0,{key:`local.budget.identifier`,params:{limit:Zg}}):Yg.test(t)?st.has(t)||e_.has(t)?e.report(`local.binding.reserved`,`Parameter name "${t}" is reserved; choose another name.`,i.offset??r.node.range.start,void 0,{key:`local.binding.reserved`,params:{name:t}}):l=t:e.report(`local.binding.name`,`Parameter name "${t}" must match [A-Za-z_][A-Za-z0-9_]*.`,i.offset??r.node.range.start,void 0,{key:`local.binding.name`,params:{name:t}})}let u=l??`@${r.node.id}:${c.name}`;l&&n.has(l)&&(e.report(`local.binding.exclusive`,`Parameter "${l}" of the ${c.name} slot of <${r.name}> is exclusive and cannot be shared with another control.`,i?.offset??r.node.range.start,void 0,{key:`local.binding.exclusive.slot`,params:{key:l,slot:c.name,name:r.name}}),u=`@${r.node.id}:${c.name}`),n.add(u);let d=K_(r,a,c.name),f=q_(r,a,c,d,e),p={name:u,nodeIds:[r.node.id],type:c.kind,initial:f,owner:r.node.id};d.min!==void 0&&(p.min=d.min),d.max!==void 0&&(p.max=d.max),p.step=d.step,t[u]=p,o[c.name]=u,s.set(c.name,u)}let c=s.get(`start`),l=s.get(`end`);if(c&&l){let n=t[c].initial,i=t[l].initial;typeof n==`number`&&typeof i==`number`&&n>i&&e.report(`local.initial.range`,`<range-slider> start ${n} cannot be greater than end ${i}.`,r.node.range.start,r.node.range.end,{key:`local.initial.range-slider`,params:{start:n,end:i}})}e.bindingSlots[r.node.id]=o}}function K_(e,t,n){return e.name===`coordinate`?{min:S_(e,t,`${n}-min`)??-5,max:S_(e,t,`${n}-max`)??5,step:S_(e,t,`step`)??1}:{min:S_(e,t,`min`)??0,max:S_(e,t,`max`)??100,step:S_(e,t,`step`)??1}}function q_(e,t,n,r,i){let a=r.min??0,o=t[n.initial];if(o&&typeof o.value==`number`){let t=o.value;return r.min!==void 0&&t<r.min&&i.report(`local.initial.range`,`Initial value ${t} of <${e.name}> ${n.initial} is below the minimum ${r.min}.`,o.offset,void 0,{key:`local.initial.slot.min`,params:{value:t,name:e.name,slot:n.initial,min:r.min}}),r.max!==void 0&&t>r.max&&i.report(`local.initial.range`,`Initial value ${t} of <${e.name}> ${n.initial} exceeds the maximum ${r.max}.`,o.offset,void 0,{key:`local.initial.slot.max`,params:{value:t,name:e.name,slot:n.initial,max:r.max}}),i_(t,a,r.step)||i.report(`local.initial.step`,`Initial value ${t} of <${e.name}> ${n.initial} is not on step ${r.step} (based at ${a}).`,o.offset,void 0,{key:`local.initial.slot.step`,params:{value:t,name:e.name,slot:n.initial,step:r.step,base:a}}),t}if(n.initialRule===`max-step`){let e=(r.max??a)-a,t=a+Math.max(0,Math.floor(e/r.step+Xg))*r.step;return Math.min(r.max??t,Math.max(r.min??t,t))}return n.initialRule===`min`?r.min??0:a_(r.min,r.max,r.step)??0}function J_(e){return Object.keys(e.bindingSlots).length?e.bindingSlots:void 0}function Y_(e,t){let n=e.source.lastIndexOf(`
52
59
  `,t.range.start-1)+1,r=e.source.indexOf(`
53
- `,t.range.end),i=r<0?e.source.length:r;return e.source.slice(n,t.range.start).trim()===``&&e.source.slice(t.range.end,i).trim()===``}function rf(e,t,n){let r=Td(e.source,t.node.range.start,t.node.range.end),i=/(?:^|[\s"'/])value\s*=\s*(["'])/.exec(r);if(!i)return t.node.range.start;let a=t.node.range.start+i.index+i[0].length;return Math.min(t.node.range.end,a+n)}function af(e){let t=[],n=new Map,r=new Set(e.nodes);for(let i of e.entries){if(i.name!==`computed`&&i.name!==`const`)continue;let a=i.name,o=i.node;if(!r.has(o)||!nf(e,o)){e.report(`local.computation.placement`,`<${a}> declarations must be standalone tags at the document top level.`,o.range.start,o.range.end);continue}let s=e.attrs.get(o.id)??{},c=s.name,l=typeof c?.value==`string`?c.value:``;if(!c||!l)continue;if(l.length>od){e.report(`local.budget.identifier`,`Computation name exceeds the ${od}-character limit.`,c.offset);continue}if(!id.test(l)){e.report(`local.computation.name`,`Computation name "${l}" must match [A-Za-z_][A-Za-z0-9_]*.`,c.offset);continue}if(ct.has(l)||ld.has(l)){e.report(`local.computation.reserved`,`Computation name "${l}" is reserved; choose another name.`,c.offset);continue}if(Object.hasOwn(e.bindingKinds,l)){e.report(`local.computation.duplicate`,`Computation name "${l}" conflicts with a control parameter of the same name.`,c.offset);continue}if(n.has(l)){e.report(`local.computation.duplicate`,`Computation name "${l}" is declared more than once.`,c.offset);continue}n.set(l,a);let u=s.value;if(!u)continue;let d=gd(u.raw);d?d.expression?t.push({name:l,kind:a,source:d.expression,expressionOffset:rf(e,i,d.start),nodeId:o.id,range:{...o.range}}):e.report(`local.expression.empty`,`Interpolation expression cannot be empty.`,u.offset):e.report(`local.computation.value`,`The value of <${a}> must be exactly one {{ expression }} interpolation.`,u.offset,u.offset+u.raw.length)}let i=Qn(t,e.bindingKinds,e.report);e.computations=i.computations,e.computationKinds=i.kinds}function of(e){return Object.keys(e.computationKinds).length?{...e.bindingKinds,...e.computationKinds}:e.bindingKinds}function sf(e){let t=[];for(let n of e)(n.type!==`component`||n.name!==`computed`&&n.name!==`const`)&&(n.children&&=sf(n.children),t.push(n));return t}function cf(e){let t=of(e),n=Object.keys(t),r=(t,n)=>{t instanceof R?e.report(`local.expression.${t.code||`invalid`}`,`Expression error: ${t.message}`,n+(Number.isFinite(t.offset)?t.offset:0),void 0,{key:`local.expression.error`,params:{detail:t.message,code:t.code||`invalid`,near:e.source.slice(Math.max(n,n+t.offset-16),n+t.offset+24)}}):e.report(`local.expression.invalid`,`Expression error: ${t instanceof Error?t.message:String(t)}`,n,void 0,{key:`local.expression.error`,params:{detail:t instanceof Error?t.message:String(t),code:`invalid`}})},i=(i,a,o)=>{if(!i.trim())return e.report(`local.expression.empty`,`Interpolation expression cannot be empty.`,a,void 0,{key:`local.expression.empty`}),null;let s=null;try{s=Yt(i)}catch(e){return r(e,a),null}if(!s)return null;let c=!1;for(let r of s.dependencies)if(!Object.hasOwn(t,r)){let t=_f(r,n);e.report(`local.binding.unknown`,`Reference to undeclared parameter ${r}.${t?` Did you mean ${t}?`:``}`,a+Math.max(0,i.indexOf(r)),void 0,t?{key:`local.binding.unknown.suggestion`,params:{name:r,suggestion:t}}:{key:`local.binding.unknown`,params:{name:r}}),c=!0}if(c)return null;let l;try{l=s.inferType(t)}catch(e){return r(e,a),null}return o===`number`&&l!==`number`?e.report(`local.type`,`Expected a number here, but the expression evaluates to ${J(l)}.`,a,void 0,{key:`local.type.number`,params:{kind:J(l)}}):o===`boolean`&&l!==`boolean`?e.report(`local.type`,`Expected a boolean here, but the expression evaluates to ${J(l)}.`,a,void 0,{key:`local.type.boolean`,params:{kind:J(l)}}):o===`string`&&l!==`string`?e.report(`local.type`,`Expected a string here, but the expression evaluates to ${J(l)}.`,a,void 0,{key:`local.type.string`,params:{kind:J(l)}}):o===`text`&&(l===`array`||l===`number-array`)&&e.report(`local.type`,`Arrays cannot be displayed directly; convert them first with a function such as len.`,a,void 0,{key:`local.type.array`}),l},a=t=>{for(let n of t){if(n.type===`interpolation`){let t=e.source.slice(n.range.start+2,Math.max(n.range.start+2,n.range.end-2)),r=n.value??``,a=Math.max(0,t.indexOf(r)),o=n.range.start+2+a;e.expressionKinds.set(n.id,i(r,o,`text`))}n.children&&a(n.children)}};a(e.nodes);for(let t of e.entries){if(t.name===`computed`||t.name===`const`)continue;let n=e.attrs.get(t.node.id)??{};for(let[r,a]of Object.entries(n)){let n=t.schema.props[r];if(n&&!n.static&&(t.name!==`data-table`||r!==`rows`&&r!==`key`)&&(t.name!==`column`||r!==`value`)&&(t.name!==`validation`||r!==`when`)){if(n.kind===`string`){let t=hd(a.raw);for(let n of t.unterminated)e.report(`local.interpolation`,`Interpolation is missing }}.`,a.offset+n,void 0,{key:`local.interpolation.unclosed`});for(let e of t.segments)i(e.expression,a.offset+e.start,`text`)}else a.dynamic&&(n.kind===`number`?i(a.expression??``,a.expressionOffset??a.offset,`number`):n.kind===`boolean`?i(a.expression??``,a.expressionOffset??a.offset,`boolean`):n.kind===`enum`&&i(a.expression??``,a.expressionOffset??a.offset,`string`))}}if(t.name===`if`){let t=n.when;t&&!t.dynamic&&e.report(`local.attribute.interpolation`,`The when attribute of if must be a full boolean interpolation, e.g. when="{{ seats >= 5 }}".`,t.offset,void 0,{key:`local.attribute.interpolation`})}}}function lf(e,t,n){let r={syntax:`local`,source:e.source,nodes:e.nodes,initialState:n,bindings:t,...Object.keys(e.computations).length?{computations:e.computations}:{}},i=`__local_core_check__`,a=rr(r,i,!1),o=new Set,s=e=>{for(let t of e){if(t.type===`heading`){let e=a.ids.get(t);e&&e.startsWith(`${i}-`)&&o.add(e.slice(21))}t.children&&s(t.children)}};s(e.nodes);let c=new Set;for(let t of e.entries){if(t.name!==`anchor`)continue;let n=(e.attrs.get(t.node.id)??{}).id;if(!n)continue;let r=typeof n.value==`string`?n.value:``;!r||!uf.test(r)?e.report(`local.anchor.id`,`Anchor id "${r}" must match [A-Za-z_][A-Za-z0-9_-]*.`,n.offset,void 0,{key:`local.anchor.id`,params:{id:r}}):(c.has(r)?e.report(`local.anchor.duplicate`,`Duplicate anchor id "${r}".`,n.offset,void 0,{key:`local.anchor.duplicate`,params:{id:r}}):c.add(r),o.has(r)&&e.report(`local.anchor.duplicate`,`Anchor id "${r}" collides with an automatic heading target.`,n.offset,void 0,{key:`local.anchor.heading-collision`,params:{id:r}}))}for(let t of e.entries){if(t.name!==`jump`)continue;let n=(e.attrs.get(t.node.id)??{}).to;if(!n)continue;let r=typeof n.value==`string`?n.value:``;r?r.startsWith(`#`)||/\s/.test(r)?e.report(`local.jump.target`,`<jump> target "${r}" must be a bare heading slug or anchor id without "#" or whitespace.`,n.offset,void 0,{key:`local.jump.bad-target`,params:{target:r}}):!c.has(r)&&!o.has(r)&&e.report(`local.jump.target`,`<jump> target "${r}" does not resolve to a heading or explicit anchor in this document.`,n.offset,void 0,{key:`local.jump.unresolved`,params:{target:r}}):e.report(`local.jump.target`,`<jump> target cannot be empty.`,n.offset,void 0,{key:`local.jump.empty`})}}var uf=/^[A-Za-z_][A-Za-z0-9_-]*$/;function df(e,t,n){t instanceof R?e.report(`local.expression.${t.code||`invalid`}`,`Expression error: ${t.message}`,n+(Number.isFinite(t.offset)?t.offset:0)):e.report(`local.expression.invalid`,`Expression error: ${t instanceof Error?t.message:String(t)}`,n)}function ff(e,t,n,r,i){if(!t.trim())return e.report(`local.expression.empty`,`Interpolation expression cannot be empty.`,n),null;let a;try{a=Yt(t)}catch(t){return df(e,t,n),null}let o=Object.keys(r),s=!1;for(let i of a.dependencies)if(!Object.hasOwn(r,i)){let r=_f(i,o);e.report(`local.binding.unknown`,`Reference to undeclared parameter ${i}.${r?` Did you mean ${r}?`:``}`,n+Math.max(0,t.indexOf(i))),s=!0}if(s||!i)return{compiled:a,kind:null};let c;try{c=a.inferType(r)}catch(t){return df(e,t,n),null}return{compiled:a,kind:c}}function pf(e,t,n,r,i){if(!e)return null;let a=gd(e.raw);return a?a.expression?{expression:a.expression,base:e.offset+a.start}:(i.report(`local.expression.empty`,`Interpolation expression cannot be empty.`,e.offset+a.start),null):(i.report(t,`<${n}> ${r} must be exactly one {{ expression }} interpolation.`,e.offset,e.offset+e.raw.length),null)}function mf(e){let t=e[`max-rows`];return t&&!t.dynamic&&typeof t.value==`number`&&Number.isInteger(t.value)&&t.value>0&&t.value<=1e3?t.value:100}function hf(e){let t=e.entries.filter(e=>e.name===`data-table`);if(!t.length)return;let n=of(e),r=0,i=0,a=!1,o=!1;for(let s of t){let t=e.attrs.get(s.node.id)??{},c=vd(s.node.children).filter(e=>e.type===`component`&&e.name===`column`),l=mf(t),u=Math.min(c.length,20);r+=l,i+=l*u,!a&&r>2e3&&(a=!0,e.report(`local.budget.data-table.rows`,`The document's generated row budget exceeds ${j}; max-rows summed over every <data-table> must stay within it.`,s.node.range.start,s.node.range.end)),!o&&i>1e4&&(o=!0,e.report(`local.budget.data-table.cells`,`The document's generated cell budget exceeds ${M}; max-rows multiplied by columns, summed over every <data-table>, must stay within it.`,s.node.range.start,s.node.range.end));let d=pf(t.rows,`local.data-table.rows`,`data-table`,`rows`,e),f=`string`,p=!1;if(d){let t=ff(e,d.expression,d.base,n,!0);t?.kind===`array`?(f=`string`,p=!0):t?.kind===`number-array`?(f=`number`,p=!0):t&&t.kind!==null&&e.report(`local.data-table.rows`,`<data-table> rows must evaluate to an array, but the expression evaluates to ${J(t.kind)}.`,d.base)}let m={...n,item:f,index:`number`},h=pf(t.key,`local.data-table.key`,`data-table`,`key`,e);if(h){let t=ff(e,h.expression,h.base,m,p);if(t){let r=t.compiled.dependencies;r.includes(`item`)||e.report(`local.data-table.key`,`<data-table> key must depend on item.`,h.base);for(let t of r)t!==`item`&&(t===`index`?e.report(`local.data-table.key`,`<data-table> key cannot depend on index; use a stable item identifier.`,h.base):Object.hasOwn(n,t)&&e.report(`local.data-table.key`,`<data-table> key cannot depend on global parameter "${t}"; it must be derived from item only.`,h.base));t.kind!==null&&t.kind!==`string`&&t.kind!==`number`&&e.report(`local.data-table.key`,`<data-table> key must evaluate to a string or number, got ${J(t.kind)}.`,h.base)}}for(let t of c){let n=e.attrs.get(t.id)??{},r=n.label;r&&!String(r.value??``).trim()&&e.report(`local.data-table.column`,`<column> label cannot be empty.`,r.offset);let i=pf(n.value,`local.data-table.value`,`column`,`value`,e);if(!i)continue;let a=ff(e,i.expression,i.base,m,p);a&&(a.kind===`array`||a.kind===`number-array`)&&e.report(`local.data-table.value`,`<column> value must be a scalar string, number, boolean or null, got ${J(a.kind)}.`,i.base)}}}function gf(e){let t=[],n=0,r=!1,i=Object.keys(e.bindingKinds),a=of(e);for(let o of e.entries){if(o.name!==`validation`)continue;n+=1;let s=o.node;if(n>100){r||(r=!0,e.report(`local.validation.budget`,`The document declares more than 100 validation rules; rules in hidden regions count too.`,s.range.start,s.range.end));continue}o.parent&&(o.parent.schema.form!==`container`||o.parent.name===`data-table`)&&e.report(`local.validation.placement`,`<validation> can appear in normal prose or a container, but not inside inline content or a data table.`,s.range.start,s.range.end);let c=e.attrs.get(s.id)??{},l=``,u=[],d=c.when;if(d){let t=gd(d.raw);if(!t)e.report(`local.validation.when`,`<validation> when must be exactly one {{ boolean }} interpolation.`,d.offset,d.offset+d.raw.length);else if(t.expression){l=t.expression;let n=ff(e,l,d.offset+t.start,a,!0);n&&(u=[...n.compiled.dependencies],n.kind!==null&&n.kind!==`boolean`&&e.report(`local.type`,`Expected a boolean here, but the expression evaluates to ${J(n.kind)}.`,d.offset+t.start))}}let f=c.fields,p=f?td(f.raw):[];f&&!p.length&&e.report(`local.validation.fields`,`<validation> requires at least one field name.`,f.offset,f.offset+f.raw.length);let m=new Set;for(let t of p)if(m.has(t))e.report(`local.validation.fields`,`Duplicate field "${t}" in <validation> fields.`,f?.offset??s.range.start);else if(m.add(t),!Object.hasOwn(e.bindingKinds,t)){let n=_f(t,i);e.report(`local.validation.fields`,`Field "${t}" is not a public writable parameter.${n?` Did you mean ${n}?`:``}`,f?.offset??s.range.start)}l&&t.push({nodeId:s.id,expression:l,dependencies:u,message:typeof c.message?.value==`string`?c.message.value:``,fields:[...m],range:{...s.range}})}return t}function _f(e,t){if(e.length>od)return;let n,r=1/0;for(let i of t){let t=vf(e,i);t<r&&(n=i,r=t)}return r<=2?n:void 0}function vf(e,t){let n=Array.from({length:t.length+1},(e,t)=>t);for(let r=1;r<=e.length;r++){let i=n[0];n[0]=r;for(let a=1;a<=t.length;a++){let o=n[a];n[a]=Math.min(n[a]+1,n[a-1]+1,i+(e[r-1]===t[a-1]?0:1)),i=o}}return n[t.length]}function yf(e,t){let n=e.schema.props.samples?.default,r=typeof n==`number`?n:200;return kd(e,t,`samples`)??r}function bf(e){let t=of(e),n=0,r=!1;for(let i of e.entries){if(i.name!==`plot`)continue;let a=e.attrs.get(i.node.id)??{},o=vd(i.node.children).filter(e=>e.type===`math`),s=yf(i,a);o.length>16&&e.report(`local.budget.plot.curves`,`<plot> supports at most 16 curves, but has ${o.length}.`,i.node.range.start,i.node.range.end,{key:`local.budget.plot.curves`,params:{limit:16,count:o.length}});let c=o.length*s,l=n+c;if(!r&&l>2e4&&(e.report(`local.budget.plot.points`,`The document's total plot sample count exceeds the limit of ${O}.`,i.node.range.start,i.node.range.end,{key:`local.budget.plot.points`,params:{limit:O}}),r=!0),n=Math.min(O+1,l),!(o.length>16||r))for(let n of o){let r=(n.value??``).trim();if(!/^y\s*=/u.test(r)){e.report(`local.math.formula`,`<plot> formulas must be written explicitly as y = expression.`,n.range.start,n.range.end,{key:`local.math.formula.shape`});continue}let i=null;try{i=Mn(r)}catch(t){e.report(`local.math`,`Cannot compute plot formula: ${t instanceof Error?t.message:String(t)}`,n.range.start,n.range.end,{key:`local.math.compute`,params:{detail:t instanceof Error?t.message:String(t),code:t&&typeof t==`object`&&`code`in t&&typeof t.code==`string`?t.code:`latex-syntax`,near:r.slice(0,120)}})}if(i)for(let r of i.dependencies)r!==`x`&&r!==`y`&&(Object.hasOwn(t,r)?t[r]!==`number`&&e.report(`local.math.binding`,`Plot parameter "${r}" must be a number, but is ${J(t[r])}.`,n.range.start,n.range.end,{key:`local.math.binding.type`,params:{name:r,kind:J(t[r])}}):e.report(`local.math.binding`,`Plot formula references undeclared parameter "${r}".`,n.range.start,n.range.end,{key:`local.math.binding.unknown`,params:{name:r}}))}}}function xf(e,t,n){let r=(e.children??[]).filter(e=>e.type===`tableRow`);if(!r.length)return t.report(`local.table.header`,`The table for <${n.name}> is missing a header.`,e.range.start,e.range.end,{key:`local.table.header.missing`,params:{name:n.name}}),null;let i=r[0].children??[],a=[];for(let e of i){if(bd(e))return t.report(`local.table.header`,`Table headers cannot contain interpolations.`,e.range.start,e.range.end,{key:`local.table.header.interpolation`}),null;let n=yd(e).trim();if(!n)return t.report(`local.table.header`,`Table headers cannot be empty.`,e.range.start,e.range.end,{key:`local.table.header.empty`}),null;if(a.includes(n))return t.report(`local.table.header`,`Duplicate table header "${n}".`,e.range.start,e.range.end,{key:`local.table.header.duplicate`,params:{name:n}}),null;a.push(n)}if(!a.length)return t.report(`local.table.header`,`Table headers cannot be empty.`,e.range.start,e.range.end,{key:`local.table.header.empty`}),null;let o=[];for(let e of r.slice(1)){let n=e.children??[];n.length===a.length?o.push(n):t.report(`local.table.row`,`Table row has a different column count: header has ${a.length} columns, this row has ${n.length}.`,e.range.start,e.range.end,{key:`local.table.row.mismatch`,params:{header:a.length,row:n.length}})}return{header:a,rows:o}}function Sf(e,t){let n=vd(e.children);if(n.length===1&&n[0].type===`interpolation`){let e=t.expressionKinds.get(n[0].id);if(e===`number`||e===null)return!0;if(e!==void 0)return!1}let r=yd(e).trim();return r?ud(r)!==null:!1}function Cf(e,t,n,r,i){let a=e.header[t];e.rows.forEach((e,i)=>{let o=e[t];if(!o)return;let s=vd(o.children);if(s.length===1&&s[0].type===`interpolation`){let e=n.expressionKinds.get(s[0].id);e!=null&&e!==`number`&&n.report(`local.chart.numeric`,`${r.name===`timeline`?`Timeline`:`Chart`} column "${a}" requires a number in row ${i+1}, but the expression evaluates to ${J(e)}.`,o.range.start,o.range.end,{key:r.name===`timeline`?`local.timeline.numeric.expression`:`local.chart.numeric.expression`,params:{name:a,row:i+1,kind:J(e)}})}else Sf(o,n)||n.report(`local.chart.numeric`,`${r.name===`timeline`?`Timeline`:`Chart`} column "${a}" requires a plain number in row ${i+1}, got "${yd(o).trim()||`empty`}".`,o.range.start,o.range.end,{key:r.name===`timeline`?`local.timeline.numeric.plain`:`local.chart.numeric.plain`,params:{name:a,row:i+1,value:yd(o).trim()||`empty`}})})}function wf(e,t){return e.indexOf(t)}function Tf(e){for(let t of e.entries){if(t.name===`table`){Ef(t,e);continue}if(t.name!==`chart`&&t.name!==`timeline`)continue;let n=Ef(t,e);n&&(t.name===`chart`?kf(t,n,e):Af(t,n,e))}}function Ef(e,t){if(t.tableShapes.has(e.node.id))return t.tableShapes.get(e.node.id)??null;let n=t.tables.get(e.node.id),r=n?xf(n,t,e):null;return t.tableShapes.set(e.node.id,r),r}function Df(e,t){if(t.size===0)return;let n=Object.create(null),r=0;for(let[e,i]of t)i&&(n[e]=Object.freeze({header:Object.freeze([...i.header]),rowIds:Object.freeze(i.rows.map(e=>Object.freeze(e.map(e=>e.id))))}),r+=1);r!==0&&(e.tableShapes=Object.freeze(n))}function Of(e){for(let t of e.entries){if(t.name!==`table`&&t.name!==`chart`)continue;let n=e.attrs.get(t.node.id)??{},r=n.key;if(!r)continue;let i=typeof r.value==`string`?r.value.trim():``;if(!i){e.report(`local.selection.key`,`<${t.name}> key cannot be empty.`,r.offset,void 0,{key:`local.selection.key.empty`,params:{component:t.name}}),e.selections.set(t.node.id,[``]);continue}let a=Ef(t,e);if(!a){e.selections.set(t.node.id,[``]);continue}let o=wf(a.header,i);if(o<0){e.report(`local.selection.key`,`<${t.name}> key column "${i}" does not exist in its table.`,r.offset,void 0,{key:`local.selection.key.missing-column`,params:{component:t.name,name:i}}),e.selections.set(t.node.id,[``]);continue}let s=[],c=new Set;a.rows.forEach((n,r)=>{let a=n[o];if(!a)return;if(bd(a)){e.report(`local.selection.key`,`<${t.name}> key column "${i}" must contain static text; row ${r+1} contains an interpolation.`,a.range.start,a.range.end,{key:`local.selection.key.interpolation`,params:{component:t.name,name:i,row:r+1}});return}let l=yd(a).trim();l?c.has(l)?e.report(`local.selection.key`,`<${t.name}> key column "${i}" must be unique; duplicate value "${l}".`,a.range.start,a.range.end,{key:`local.selection.key.duplicate`,params:{component:t.name,name:i,value:l}}):(c.add(l),s.push(l)):e.report(`local.selection.key`,`<${t.name}> key column "${i}" cannot be empty in row ${r+1}.`,a.range.start,a.range.end,{key:`local.selection.key.empty-cell`,params:{component:t.name,name:i,row:r+1}})}),e.selections.set(t.node.id,[``,...s]);let l=n.initial;l&&typeof l.value==`string`&&l.value!==``&&!s.includes(l.value)&&e.report(`local.initial.option`,`Initial selection "${l.value}" of <${t.name}> is not a value of key column "${i}".`,l.offset,void 0,{key:`local.selection.key.initial`,params:{value:l.value,component:t.name,name:i}})}}function kf(e,t,n){let r=n.attrs.get(e.node.id)??{},i=typeof r.kind?.value==`string`?r.kind.value:`bar`,a=t.header;for(let t of a)t.includes(`,`)&&n.report(`local.chart.column`,`Chart column names cannot contain commas: "${t}".`,e.node.range.start,e.node.range.end,{key:`local.chart.column.comma`,params:{name:t}});let o=typeof r.x?.value==`string`?r.x.value.trim():``,s=typeof r.y?.value==`string`?r.y.value.trim():``;o&&wf(a,o)<0&&n.report(`local.chart.column`,`Chart x column "${o}" does not exist.`,r.x?.offset??e.node.range.start,void 0,{key:`local.chart.column.x-missing`,params:{name:o}});let c=[];if(s){c=s.split(`,`).map(e=>e.trim()).filter(Boolean),c.length||n.report(`local.chart.column`,`Chart y requires a column name.`,r.y?.offset??e.node.range.start,void 0,{key:`local.chart.column.y-required`});for(let t of c)wf(a,t)<0&&n.report(`local.chart.column`,`Chart y column "${t}" does not exist.`,r.y?.offset??e.node.range.start,void 0,{key:`local.chart.column.y-missing`,params:{name:t}})}let l=[];if(i===`bar`||i===`line`||i===`area`){let t=o?Math.max(0,wf(a,o)):0;l=c.length?c.map(e=>wf(a,e)).filter(e=>e>=0):a.map((e,t)=>t).filter(e=>e!==t),l.length||n.report(`local.chart.column`,`Chart requires at least one numeric column.`,e.node.range.start,e.node.range.end,{key:`local.chart.column.needs-numeric`})}else if(i===`scatter`){let r=o?wf(a,o):0;r<0?n.report(`local.chart.column`,`Scatter chart x column "${o}" does not exist.`,e.node.range.start,void 0,{key:`local.chart.column.scatter-x-missing`,params:{name:o}}):Cf(t,r,n,e,`x`),l=c.length?c.map(e=>wf(a,e)).filter(e=>e>=0):a.map((e,t)=>t).filter(e=>e!==r),l.length||n.report(`local.chart.column`,`Scatter chart requires at least one numeric column.`,e.node.range.start,e.node.range.end,{key:`local.chart.column.scatter-needs-numeric`})}else if(i===`donut`){if(a.length<2){n.report(`local.chart.column`,`Donut chart requires a label column and a value column.`,e.node.range.start,e.node.range.end,{key:`local.chart.column.donut-columns`});return}if(c.length===1){let e=wf(a,c[0]);e>=0&&(l=[e])}else c.length>1?n.report(`local.chart.column`,`Donut chart y can only specify one numeric column.`,r.y?.offset??e.node.range.start,void 0,{key:`local.chart.column.donut-y`}):a.length>2?n.report(`local.chart.column`,`A donut chart with more than two columns must use y to specify the single numeric column.`,e.node.range.start,e.node.range.end,{key:`local.chart.column.donut-need-y`}):l=[1]}l=[...new Set(l)];for(let r of l)Cf(t,r,n,e,`y`);if(i===`donut`)for(let e of l)t.rows.forEach((t,r)=>{let i=t[e];if(!i||vd(i.children).length)return;let a=ud(yd(i).trim());a!==null&&a<0&&n.report(`local.chart.negative`,`Donut chart values cannot be negative; row ${r+1} is ${a}.`,i.range.start,i.range.end,{key:`local.chart.negative`,params:{row:r+1,value:a}})})}function Af(e,t,n){let r=[{title:`Task`,start:`Start`,duration:`Duration`,notes:`Notes`},{title:`事项`,start:`开始`,duration:`时长`,notes:`说明`}].find(e=>t.header.includes(e.title)&&t.header.includes(e.start)&&t.header.includes(e.duration));if(!r){n.report(`local.timeline.header`,`Timeline requires either Task, Start and Duration columns or 事项, 开始 and 时长 columns, with optional Notes or 说明.`,e.node.range.start,e.node.range.end,{key:`local.timeline.header.missing`});return}let i=new Set(Object.values(r));for(let r of t.header)i.has(r)||n.report(`local.timeline.header`,`Timeline does not support column "${r}".`,e.node.range.start,e.node.range.end,{key:`local.timeline.header.column`,params:{name:r}});for(let i of[r.start,r.duration]){let r=wf(t.header,i);r>=0&&Cf(t,r,n,e,i)}let a=wf(t.header,r.start),o=wf(t.header,r.duration);t.rows.forEach((e,r)=>{for(let i of[a,o]){if(i<0)continue;let a=e[i];if(!a||vd(a.children).length)continue;let o=ud(yd(a).trim());o!==null&&o<0&&n.report(`local.timeline.value`,`Timeline column "${t.header[i]}" cannot be negative in row ${r+1}.`,a.range.start,a.range.end,{key:`local.timeline.value.negative`,params:{name:t.header[i],row:r+1}})}})}var jf=1e-9,Mf=200;function Nf(e){return Array.isArray(e)?e.slice():e}function Pf(e){return{...e,range:{...e.range}}}function Ff(e,t){return Array.isArray(e)||Array.isArray(t)?!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length?!1:e.every((e,n)=>e===t[n]):e===t}function If(e){return e===``||be(e)!==null}function Lf(e,t,n){let r=(e-t)/n;return Math.abs(r-Math.round(r))<=jf*Math.max(1,Math.abs(r))}function Rf(e){for(let[t,n]of Object.entries(e))Array.isArray(n)&&!Object.isFrozen(n)&&(e[t]=Object.freeze([...n]));return Object.freeze(e)}function zf(e,t,n,r){let i=Math.max(0,Math.min(e.source.length,t.range.start)),a=e.source.slice(0,i).split(`
54
- `);return{code:n,message:et(r),severity:`error`,range:{start:i,end:Math.max(i+1,Math.min(e.source.length,t.range.end))},line:a.length,column:(a.at(-1)??``).length+1,messageKey:r.key,...r.params?{params:r.params}:{}}}function Bf(e,t){return{code:e,message:t,severity:`error`,range:{start:0,end:0},line:1,column:1}}function Vf(e,t){return e.attrs?.[t]}function Hf(e,t){let n=Vf(e,t);if(n===`true`)return!0;if(n===`false`)return!1}function Uf(e,t){let n=Vf(e,t);if(n===void 0)return;let r=Number(n);return Number.isFinite(r)?r:void 0}function Wf(e){return nt(e)}function Y(e,t){return{ok:!1,detail:Be(e,t)}}function Gf(e,t){if(e.name===`date`){if(!If(t))return Y(`local.runtime.value.date-invalid`);if(t===``&&Hf(e,`required`)===!0)return Y(`local.runtime.value.date-required`);let n=Vf(e,`min`),r=Vf(e,`max`);return t!==``&&n&&t<n?Y(`local.runtime.value.date-earlier`,{min:n}):t!==``&&r&&t>r?Y(`local.runtime.value.date-later`,{max:r}):{ok:!0,value:t}}if(e.name===`input`||e.name===`textarea`){let n=Wf(t);if(t===``&&Hf(e,`required`)===!0)return Y(`local.runtime.value.field-required`);let r=Uf(e,`min-length`),i=Uf(e,`max-length`);if(r!==void 0&&r>0&&t!==``&&n<r)return Y(`local.runtime.value.min-length`,{min:r});if(i!==void 0&&n>i)return Y(`local.runtime.value.max-length`,{max:i});if(e.name===`input`&&Vf(e,`type`)===`email`&&t!==``){if(t.length>254)return Y(`local.runtime.value.email-length`,{limit:254});if(!N(t))return Y(`local.runtime.value.email-invalid`)}}return{ok:!0,value:t}}function Kf(e,t,n){switch(e.type){case`number`:{if(typeof n!=`number`||!Number.isFinite(n))return Y(`local.runtime.value.finite-number`,{name:e.name});if(e.min!==void 0&&n<e.min)return Y(`local.runtime.value.min`,{name:e.name,min:e.min});if(e.max!==void 0&&n>e.max)return Y(`local.runtime.value.max`,{name:e.name,max:e.max});let t=e.step??1,r=e.min??0;return t>0&&!Lf(n,r,t)?Y(`local.runtime.value.step`,{name:e.name,step:t,base:r}):{ok:!0,value:n}}case`boolean`:return typeof n==`boolean`?{ok:!0,value:n}:Y(`local.runtime.value.boolean`,{name:e.name});case`string`:{if(typeof n!=`string`)return Y(`local.runtime.value.string`,{name:e.name});let r=yt(n);if(r)return Y(`local.runtime.value.budget`,{name:e.name,detail:et(r),detailKey:r.key,...r.params});for(let e of t){let t=Gf(e,n);if(!t.ok)return t}return e.options?.length&&!e.options.includes(n)?Y(`local.runtime.value.option`,{value:n,options:e.options.join(`, `)}):{ok:!0,value:n}}case`array`:{if(!Array.isArray(n))return Y(`local.runtime.value.array`,{name:e.name});let t=yt(n);if(t)return Y(`local.runtime.value.budget`,{name:e.name,detail:et(t),detailKey:t.key,...t.params});let r=new Set;for(let t of n){if(typeof t!=`string`)return Y(`local.runtime.value.array-members`,{name:e.name});if(e.options&&!e.options.includes(t))return Y(`local.runtime.value.checklist-option`,{value:t});r.add(t)}let i=e.options?e.options.filter(e=>r.has(e)):[...r];return e.maxItems!==void 0&&i.length>e.maxItems?Y(`local.runtime.value.max-items`,{name:e.name,max:e.maxItems}):{ok:!0,value:i}}case`null`:return{ok:!0,value:n}}return Y(`local.runtime.value.unsupported-type`,{name:e.name})}function qf(e){if(!e||e.syntax!==`local`)throw Error(`createLocalRuntime requires a local interaction document.`);if(e.syntaxVersion!==void 0&&e.syntaxVersion!==`local-draft-2`||e.versionDeclaration&&e.versionDeclaration.version!==`local-draft-2`)throw Error(`createLocalRuntime requires ${au}; migrate the source before constructing a runtime.`);let t=new Map,n=e=>{for(let r of e)t.set(r.id,r),r.children&&n(r.children)};n(e.nodes);let r={},i=new Map;for(let[n,a]of Object.entries(e.bindings)){let e=yt(a.initial);if(e)throw new R(`expression-budget`,`Parameter "${n}": ${et(e)}`,0);r[n]=Nf(a.initial);let o=[];for(let e of a.nodeIds){let n=t.get(e);n&&o.push(n)}i.set(n,o)}let a=new Map;for(let[t,n]of Object.entries(e.bindingSlots??{}))a.set(t,{...n});let o=Object.freeze(Object.keys(e.bindings).filter(e=>!e.startsWith(`@`)).sort()),s=new Map;for(let[e,t]of a)for(let n of Object.values(t)){if(n.startsWith(`@`))continue;let t=s.get(n)??new Set;t.add(e),s.set(n,t)}let c=(e,t)=>{let n=a.get(e);if(!n?.start||!n?.end)return!1;let r=t[n.start],i=t[n.end];return typeof r==`number`&&typeof i==`number`&&r>i},l=e.computations??{},u=Object.keys(l),d=new Map;for(let[e,t]of Object.entries(l))try{d.set(e,Yt(t.source))}catch{}let{order:f,cyclic:p}=Zn(l),m={},h=new Map,g=e=>e instanceof R?e:new R(`expression-eval`,e instanceof Error?e.message:String(e),0);for(let e of f){let t=l[e];if(!t||t.kind!==`const`)continue;if(Object.hasOwn(t,`value`)){let n=t.value,r=bt(n);if(r){h.set(e,new R(`expression-budget`,`Constant "${e}": ${r}`,0));continue}m[e]=Nf(n);continue}let n=d.get(e);if(!n)h.set(e,new R(`expression-eval`,`Constant "${e}" cannot be evaluated.`,0));else try{let t=n.evaluate({...m}),r=bt(t);if(r){h.set(e,new R(`expression-budget`,`Constant "${e}": ${r}`,0));continue}m[e]=Nf(t)}catch(t){h.set(e,g(t))}}let _=new Map;for(let e of p)_.set(e,new R(`expression-cycle`,`Computation "${e}" is part of a dependency cycle.`,0));let v=[];if(Array.isArray(e.validations)){for(let t of e.validations)if(q(t))try{v.push({rule:t,expression:Yt(t.expression),error:null})}catch(e){v.push({rule:t,expression:null,error:g(e)})}}let y=K(typeof e.source==`string`?e.source:``),b=null,S=e=>{let t;try{t=tn(e,O)}catch{t=$u}return ed(t)},C=()=>{let t=[],n=typeof e.source==`string`?e.source:``;for(let e of v){if(e.error){t.push(nd(n,y,e.rule.range,Qu,ed(`Validation expression is invalid: ${e.error.message}`)));continue}if(!e.expression)continue;let r;try{r=e.expression.evaluate(O)}catch(r){t.push(nd(n,y,e.rule.range,Qu,ed(`Validation expression failed: ${r instanceof Error?r.message:String(r)}`)));continue}typeof r==`boolean`?r||t.push(nd(n,y,e.rule.range,Zu,S(e.rule.message))):t.push(nd(n,y,e.rule.range,Qu,`Validation expression must evaluate to a boolean.`))}return t},w=r,T=0,E={},D=new Map,O={},k={},A={revision:0,state:Rf({})},j=!1,M=new Set,N=new Map,ee=new Map,P=()=>{if(j)throw Error(`The local interaction runtime has been disposed.`)},te=()=>{if(u.length===0)E={},D=new Map;else{let e=$n(l,f,d,w,m);E=e.values,D=e.errors;for(let[e,t]of h)Object.hasOwn(E,e)||D.set(e,t);for(let[e,t]of _)Object.hasOwn(E,e)||D.set(e,t)}let e={};for(let[t,n]of Object.entries(w))e[t]=n;for(let[t,n]of Object.entries(E))e[t]=n;for(let[t,n]of D)Object.hasOwn(E,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get(){throw n}});O=e;let t={};for(let[e,n]of Object.entries(w))t[e]=n;for(let[e,n]of Object.entries(E))t[e]=n;k=t},F=()=>{A={revision:T,state:Rf(k)}},ne=e=>{w=e,T+=1,te(),F();for(let e of M)e()},re=(n,r)=>{let a=(i.get(n.name)??[])[0]??(n.owner?t.get(n.owner):void 0)??(n.nodeIds[0]?t.get(n.nodeIds[0]):void 0);return a?zf(e,a,`local.runtime.value`,r):Bf(`local.runtime.value`,et(r))},ie=n=>{P();let r=[],a={},o=Object.keys(n).sort();for(let t of o){if(t===`__proto__`){r.push(Bf(`local.runtime.parameter`,`Parameter names cannot be "__proto__".`));continue}if(t.startsWith(`@`)){r.push(Bf(`local.runtime.parameter`,`Internal parameter "${t}" cannot be written by name.`));continue}if(!Object.hasOwn(e.bindings,t)){r.push(Bf(`local.runtime.parameter`,`Unknown parameter "${t}".`));continue}let o=e.bindings[t],s=Kf(o,i.get(t)??[],n[t]);s.ok?a[t]=Nf(s.value):r.push(re(o,s.detail))}if(r.length)return r;if(!o.some(e=>!Ff(w[e],a[e])))return[];let l={...w,...a},u=new Set;for(let e of o)for(let t of s.get(e)??[])u.add(t);for(let n of[...u].sort())if(c(n,l)){let i=t.get(n);r.push(i?zf(e,i,`local.runtime.value`,Be(`local.runtime.value.range-order`)):Bf(`local.runtime.value`,et(Be(`local.runtime.value.range-order`))))}return r.length?r:(ne(l),[])};te(),F();let ae=e=>{let t=ee.get(e);if(!t){if(t=Yt(e),ee.size>=Mf){let e=ee.keys().next().value;e!==void 0&&ee.delete(e)}ee.set(e,t)}return t},oe=e=>{let t=new Set,n=e=>{t.add(e.id);for(let t of e.children??[])n(t)};return n(e),t};return{document:e,snapshot(){return P(),A},get(e,n){P();let r=t.get(e.id);if(!r)return null;let i=n===void 0?x(r):a.get(r.id)?.[n];return i&&Object.hasOwn(w,i)?Nf(w[i]):null},set(n,r,o){P();let s=t.get(n.id);if(!s)return[zf(e,n,`local.runtime.binding`,Be(`local.runtime.binding.no-writable`))];let l=a.get(s.id),u;if(o===void 0){if(l)return[zf(e,s,`local.runtime.binding`,Be(`local.runtime.binding.needs-slot`))];u=x(s)}else if(u=l?.[o],!u)return[zf(e,s,`local.runtime.binding`,Be(`local.runtime.binding.unknown-slot`,{slot:o}))];let d=Object.hasOwn(e.bindings,u)?e.bindings[u]:void 0;if(!d)return[zf(e,s,`local.runtime.binding`,Be(`local.runtime.binding.no-writable`))];let f=Kf(d,i.get(u)??[],r);if(!f.ok)return[zf(e,s,`local.runtime.value`,f.detail)];let p=Nf(f.value);if(Ff(w[u],p))return[];let m={...w,[u]:p};return c(s.id,m)?[zf(e,s,`local.runtime.value`,Be(`local.runtime.value.range-order`))]:(ne(m),[])},setMany(n,r){P();let o=t.get(n.id);if(!o)return[zf(e,n,`local.runtime.binding`,Be(`local.runtime.binding.no-writable`))];let s=a.get(o.id);if(!s)return[zf(e,o,`local.runtime.binding`,Be(`local.runtime.binding.no-multi-slot`))];let l=Object.entries(r);if(!l.length)return[];let u={...w};for(let[t,n]of l){let r=s[t];if(!r||!Object.hasOwn(e.bindings,r))return[zf(e,o,`local.runtime.binding`,Be(`local.runtime.binding.unknown-slot`,{slot:t}))];let a=Kf(e.bindings[r],i.get(r)??[],n);if(!a.ok)return[zf(e,o,`local.runtime.value`,a.detail)];u[r]=Nf(a.value)}return c(o.id,u)?[zf(e,o,`local.runtime.value`,Be(`local.runtime.value.range-order`))]:(l.every(([e,t])=>Ff(w[s[e]],t))||ne(u),[])},parameterNames(){return P(),o},getParameter(t){if(P(),!t.startsWith(`@`)&&Object.hasOwn(e.bindings,t))return Object.hasOwn(w,t)?Nf(w[t]):void 0},getParameters(){P();let e={};for(let t of o){let n=w[t];e[t]=Array.isArray(n)?Object.freeze([...n]):n}return Object.freeze(e)},setParameter(e,t){P();let n=Object.create(null);return n[e]=t,ie(n)},setParameters(e){if(P(),typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`setParameters requires an object of parameter values.`);return ie(e)},evaluate(e){P();let t=ae(e).evaluate(O);return Array.isArray(t)?t.slice():t},validate(){if(P(),b&&b.revision===T)return b.diagnostics.map(Pf);let e=C();return b={revision:T,diagnostics:e},e.map(Pf)},text(e){return P(),tn(e,O)},reset(n){P();let r=t.get(n.id);if(!r)return;let a=oe(r),o={...w};for(let[t,n]of Object.entries(e.bindings)){if(!(i.get(t)??[]).some(e=>a.has(e.id)))continue;let e=yt(n.initial);if(e)throw new R(`expression-budget`,`Parameter "${t}": ${et(e)}`,0);o[t]=Nf(n.initial)}for(let e of a)N.set(e,(N.get(e)??0)+1);ne(o)},resetToken(e){P();let n=t.get(e.id);return n?N.get(n.id)??0:0},subscribe(e){return P(),M.add(e),()=>{M.delete(e)}},dispose(){j||(j=!0,M.clear(),ee.clear(),d.clear(),N.clear())}}}var X=(e,t,...n)=>(0,y.createElement)(e,t,...n),Jf={" ":`space`,",":`thinspace`,":":`medspace`,";":`thickspace`,"!":`negthinspace`,"{":`lbrace`,"}":`rbrace`,"|":`vert`,"%":`percent`,"&":`amp`,"#":`hash`,_:`underscore`,$:`dollar`},Yf=5e4,Xf=2e4,Zf=120,Qf=2e3;function $f(e){return e.length>Qf?`${e.slice(0,Qf)}…`:e}function ep(e){if(e.length>Yf)throw Error(`Math source exceeds the length limit.`);let t=[],n=e=>{if(t.length>=Xf)throw Error(`Math input contains too many tokens.`);t.push(e)},r=0;for(;r<e.length;){let t=e[r];if(t===` `||t===` `||t===`\r`||t===`
60
+ `,t.range.end),i=r<0?e.source.length:r;return e.source.slice(n,t.range.start).trim()===``&&e.source.slice(t.range.end,i).trim()===``}function X_(e,t,n){let r=v_(e.source,t.node.range.start,t.node.range.end),i=/(?:^|[\s"'/])value\s*=\s*(["'])/.exec(r);if(!i)return t.node.range.start;let a=t.node.range.start+i.index+i[0].length;return Math.min(t.node.range.end,a+n)}function Z_(e){let t=[],n=new Map,r=new Set(e.nodes);for(let i of e.entries){if(i.name!==`computed`&&i.name!==`const`)continue;let a=i.name,o=i.node;if(!r.has(o)||!Y_(e,o)){e.report(`local.computation.placement`,`<${a}> declarations must be standalone tags at the document top level.`,o.range.start,o.range.end);continue}let s=e.attrs.get(o.id)??{},c=s.name,l=typeof c?.value==`string`?c.value:``;if(!c||!l)continue;if(l.length>Zg){e.report(`local.budget.identifier`,`Computation name exceeds the ${Zg}-character limit.`,c.offset);continue}if(!Yg.test(l)){e.report(`local.computation.name`,`Computation name "${l}" must match [A-Za-z_][A-Za-z0-9_]*.`,c.offset);continue}if(st.has(l)||e_.has(l)){e.report(`local.computation.reserved`,`Computation name "${l}" is reserved; choose another name.`,c.offset);continue}if(Object.hasOwn(e.bindingKinds,l)){e.report(`local.computation.duplicate`,`Computation name "${l}" conflicts with a control parameter of the same name.`,c.offset);continue}if(n.has(l)){e.report(`local.computation.duplicate`,`Computation name "${l}" is declared more than once.`,c.offset);continue}n.set(l,a);let u=s.value;if(!u)continue;let d=s_(u.raw);d?d.expression?t.push({name:l,kind:a,source:d.expression,expressionOffset:X_(e,i,d.start),nodeId:o.id,range:{...o.range}}):e.report(`local.expression.empty`,`Interpolation expression cannot be empty.`,u.offset):e.report(`local.computation.value`,`The value of <${a}> must be exactly one {{ expression }} interpolation.`,u.offset,u.offset+u.raw.length)}let i=Qn(t,e.bindingKinds,e.report);e.computations=i.computations,e.computationKinds=i.kinds}function Q_(e){return Object.keys(e.computationKinds).length?{...e.bindingKinds,...e.computationKinds}:e.bindingKinds}function $_(e){let t=[];for(let n of e)(n.type!==`component`||n.name!==`computed`&&n.name!==`const`)&&(n.children&&=$_(n.children),t.push(n));return t}function ev(e){let t=Q_(e),n=Object.keys(t),r=(t,n)=>{t instanceof z?e.report(`local.expression.${t.code||`invalid`}`,`Expression error: ${t.message}`,n+(Number.isFinite(t.offset)?t.offset:0),void 0,{key:`local.expression.error`,params:{detail:t.message,code:t.code||`invalid`,near:e.source.slice(Math.max(n,n+t.offset-16),n+t.offset+24)}}):e.report(`local.expression.invalid`,`Expression error: ${t instanceof Error?t.message:String(t)}`,n,void 0,{key:`local.expression.error`,params:{detail:t instanceof Error?t.message:String(t),code:`invalid`}})},i=(i,a,o)=>{if(!i.trim())return e.report(`local.expression.empty`,`Interpolation expression cannot be empty.`,a,void 0,{key:`local.expression.empty`}),null;let s=null;try{s=Yt(i)}catch(e){return r(e,a),null}if(!s)return null;let c=!1;for(let r of s.dependencies)if(!Object.hasOwn(t,r)){let t=lv(r,n);e.report(`local.binding.unknown`,`Reference to undeclared parameter ${r}.${t?` Did you mean ${t}?`:``}`,a+Math.max(0,i.indexOf(r)),void 0,t?{key:`local.binding.unknown.suggestion`,params:{name:r,suggestion:t}}:{key:`local.binding.unknown`,params:{name:r}}),c=!0}if(c)return null;let l;try{l=s.inferType(t)}catch(e){return r(e,a),null}return o===`number`&&l!==`number`?e.report(`local.type`,`Expected a number here, but the expression evaluates to ${p_(l)}.`,a,void 0,{key:`local.type.number`,params:{kind:p_(l)}}):o===`boolean`&&l!==`boolean`?e.report(`local.type`,`Expected a boolean here, but the expression evaluates to ${p_(l)}.`,a,void 0,{key:`local.type.boolean`,params:{kind:p_(l)}}):o===`string`&&l!==`string`?e.report(`local.type`,`Expected a string here, but the expression evaluates to ${p_(l)}.`,a,void 0,{key:`local.type.string`,params:{kind:p_(l)}}):o===`text`&&(l===`array`||l===`number-array`)&&e.report(`local.type`,`Arrays cannot be displayed directly; convert them first with a function such as len.`,a,void 0,{key:`local.type.array`}),l},a=t=>{for(let n of t){if(n.type===`interpolation`){let t=e.source.slice(n.range.start+2,Math.max(n.range.start+2,n.range.end-2)),r=n.value??``,a=Math.max(0,t.indexOf(r)),o=n.range.start+2+a;e.expressionKinds.set(n.id,i(r,o,`text`))}n.children&&a(n.children)}};a(e.nodes);for(let t of e.entries){if(t.name===`computed`||t.name===`const`)continue;let n=e.attrs.get(t.node.id)??{};for(let[r,a]of Object.entries(n)){let n=t.schema.props[r];if(n&&!n.static&&(t.name!==`data-table`||r!==`rows`&&r!==`key`)&&(t.name!==`column`||r!==`value`)&&(t.name!==`validation`||r!==`when`)){if(n.kind===`string`){let t=o_(a.raw);for(let n of t.unterminated)e.report(`local.interpolation`,`Interpolation is missing }}.`,a.offset+n,void 0,{key:`local.interpolation.unclosed`});for(let e of t.segments)i(e.expression,a.offset+e.start,`text`)}else a.dynamic&&(n.kind===`number`?i(a.expression??``,a.expressionOffset??a.offset,`number`):n.kind===`boolean`?i(a.expression??``,a.expressionOffset??a.offset,`boolean`):n.kind===`enum`&&i(a.expression??``,a.expressionOffset??a.offset,`string`))}}if(t.name===`if`){let t=n.when;t&&!t.dynamic&&e.report(`local.attribute.interpolation`,`The when attribute of if must be a full boolean interpolation, e.g. when="{{ seats >= 5 }}".`,t.offset,void 0,{key:`local.attribute.interpolation`})}}}function tv(e,t,n){let r={syntax:`local`,source:e.source,nodes:e.nodes,initialState:n,bindings:t,...Object.keys(e.computations).length?{computations:e.computations}:{}},i=`__local_core_check__`,a=ir(r,i,!1),o=new Set,s=e=>{for(let t of e){if(t.type===`heading`){let e=a.ids.get(t);e&&e.startsWith(`${i}-`)&&o.add(e.slice(21))}t.children&&s(t.children)}};s(e.nodes);let c=new Set;for(let t of e.entries){if(t.name!==`anchor`)continue;let n=(e.attrs.get(t.node.id)??{}).id;if(!n)continue;let r=typeof n.value==`string`?n.value:``;!r||!nv.test(r)?e.report(`local.anchor.id`,`Anchor id "${r}" must match [A-Za-z_][A-Za-z0-9_-]*.`,n.offset,void 0,{key:`local.anchor.id`,params:{id:r}}):(c.has(r)?e.report(`local.anchor.duplicate`,`Duplicate anchor id "${r}".`,n.offset,void 0,{key:`local.anchor.duplicate`,params:{id:r}}):c.add(r),o.has(r)&&e.report(`local.anchor.duplicate`,`Anchor id "${r}" collides with an automatic heading target.`,n.offset,void 0,{key:`local.anchor.heading-collision`,params:{id:r}}))}for(let t of e.entries){if(t.name!==`jump`)continue;let n=(e.attrs.get(t.node.id)??{}).to;if(!n)continue;let r=typeof n.value==`string`?n.value:``;r?r.startsWith(`#`)||/\s/.test(r)?e.report(`local.jump.target`,`<jump> target "${r}" must be a bare heading slug or anchor id without "#" or whitespace.`,n.offset,void 0,{key:`local.jump.bad-target`,params:{target:r}}):!c.has(r)&&!o.has(r)&&e.report(`local.jump.target`,`<jump> target "${r}" does not resolve to a heading or explicit anchor in this document.`,n.offset,void 0,{key:`local.jump.unresolved`,params:{target:r}}):e.report(`local.jump.target`,`<jump> target cannot be empty.`,n.offset,void 0,{key:`local.jump.empty`})}}var nv=/^[A-Za-z_][A-Za-z0-9_-]*$/;function rv(e,t,n){t instanceof z?e.report(`local.expression.${t.code||`invalid`}`,`Expression error: ${t.message}`,n+(Number.isFinite(t.offset)?t.offset:0)):e.report(`local.expression.invalid`,`Expression error: ${t instanceof Error?t.message:String(t)}`,n)}function iv(e,t,n,r,i){if(!t.trim())return e.report(`local.expression.empty`,`Interpolation expression cannot be empty.`,n),null;let a;try{a=Yt(t)}catch(t){return rv(e,t,n),null}let o=Object.keys(r),s=!1;for(let i of a.dependencies)if(!Object.hasOwn(r,i)){let r=lv(i,o);e.report(`local.binding.unknown`,`Reference to undeclared parameter ${i}.${r?` Did you mean ${r}?`:``}`,n+Math.max(0,t.indexOf(i))),s=!0}if(s||!i)return{compiled:a,kind:null};let c;try{c=a.inferType(r)}catch(t){return rv(e,t,n),null}return{compiled:a,kind:c}}function av(e,t,n,r,i){if(!e)return null;let a=s_(e.raw);return a?a.expression?{expression:a.expression,base:e.offset+a.start}:(i.report(`local.expression.empty`,`Interpolation expression cannot be empty.`,e.offset+a.start),null):(i.report(t,`<${n}> ${r} must be exactly one {{ expression }} interpolation.`,e.offset,e.offset+e.raw.length),null)}function ov(e){let t=e[`max-rows`];return t&&!t.dynamic&&typeof t.value==`number`&&Number.isInteger(t.value)&&t.value>0&&t.value<=1e3?t.value:100}function sv(e){let t=e.entries.filter(e=>e.name===`data-table`);if(!t.length)return;let n=Q_(e),r=0,i=0,a=!1,o=!1;for(let s of t){let t=e.attrs.get(s.node.id)??{},c=l_(s.node.children).filter(e=>e.type===`component`&&e.name===`column`),l=ov(t),u=Math.min(c.length,20);r+=l,i+=l*u,!a&&r>2e3&&(a=!0,e.report(`local.budget.data-table.rows`,`The document's generated row budget exceeds ${j}; max-rows summed over every <data-table> must stay within it.`,s.node.range.start,s.node.range.end)),!o&&i>1e4&&(o=!0,e.report(`local.budget.data-table.cells`,`The document's generated cell budget exceeds ${M}; max-rows multiplied by columns, summed over every <data-table>, must stay within it.`,s.node.range.start,s.node.range.end));let d=av(t.rows,`local.data-table.rows`,`data-table`,`rows`,e),f=`string`,p=!1;if(d){let t=iv(e,d.expression,d.base,n,!0);t?.kind===`array`?(f=`string`,p=!0):t?.kind===`number-array`?(f=`number`,p=!0):t&&t.kind!==null&&e.report(`local.data-table.rows`,`<data-table> rows must evaluate to an array, but the expression evaluates to ${p_(t.kind)}.`,d.base)}let m={...n,item:f,index:`number`},h=av(t.key,`local.data-table.key`,`data-table`,`key`,e);if(h){let t=iv(e,h.expression,h.base,m,p);if(t){let r=t.compiled.dependencies;r.includes(`item`)||e.report(`local.data-table.key`,`<data-table> key must depend on item.`,h.base);for(let t of r)t!==`item`&&(t===`index`?e.report(`local.data-table.key`,`<data-table> key cannot depend on index; use a stable item identifier.`,h.base):Object.hasOwn(n,t)&&e.report(`local.data-table.key`,`<data-table> key cannot depend on global parameter "${t}"; it must be derived from item only.`,h.base));t.kind!==null&&t.kind!==`string`&&t.kind!==`number`&&e.report(`local.data-table.key`,`<data-table> key must evaluate to a string or number, got ${p_(t.kind)}.`,h.base)}}for(let t of c){let n=e.attrs.get(t.id)??{},r=n.label;r&&!String(r.value??``).trim()&&e.report(`local.data-table.column`,`<column> label cannot be empty.`,r.offset);let i=av(n.value,`local.data-table.value`,`column`,`value`,e);if(!i)continue;let a=iv(e,i.expression,i.base,m,p);a&&(a.kind===`array`||a.kind===`number-array`)&&e.report(`local.data-table.value`,`<column> value must be a scalar string, number, boolean or null, got ${p_(a.kind)}.`,i.base)}}}function cv(e){let t=[],n=0,r=!1,i=Object.keys(e.bindingKinds),a=Q_(e);for(let o of e.entries){if(o.name!==`validation`)continue;n+=1;let s=o.node;if(n>100){r||(r=!0,e.report(`local.validation.budget`,`The document declares more than 100 validation rules; rules in hidden regions count too.`,s.range.start,s.range.end));continue}o.parent&&(o.parent.schema.form!==`container`||o.parent.name===`data-table`)&&e.report(`local.validation.placement`,`<validation> can appear in normal prose or a container, but not inside inline content or a data table.`,s.range.start,s.range.end);let c=e.attrs.get(s.id)??{},l=``,u=[],d=c.when;if(d){let t=s_(d.raw);if(!t)e.report(`local.validation.when`,`<validation> when must be exactly one {{ boolean }} interpolation.`,d.offset,d.offset+d.raw.length);else if(t.expression){l=t.expression;let n=iv(e,l,d.offset+t.start,a,!0);n&&(u=[...n.compiled.dependencies],n.kind!==null&&n.kind!==`boolean`&&e.report(`local.type`,`Expected a boolean here, but the expression evaluates to ${p_(n.kind)}.`,d.offset+t.start))}}let f=c.fields,p=f?rg(f.raw):[];f&&!p.length&&e.report(`local.validation.fields`,`<validation> requires at least one field name.`,f.offset,f.offset+f.raw.length);let m=new Set;for(let t of p)if(m.has(t))e.report(`local.validation.fields`,`Duplicate field "${t}" in <validation> fields.`,f?.offset??s.range.start);else if(m.add(t),!Object.hasOwn(e.bindingKinds,t)){let n=lv(t,i);e.report(`local.validation.fields`,`Field "${t}" is not a public writable parameter.${n?` Did you mean ${n}?`:``}`,f?.offset??s.range.start)}l&&t.push({nodeId:s.id,expression:l,dependencies:u,message:typeof c.message?.value==`string`?c.message.value:``,fields:[...m],range:{...s.range}})}return t}function lv(e,t){if(e.length>Zg)return;let n,r=1/0;for(let i of t){let t=uv(e,i);t<r&&(n=i,r=t)}return r<=2?n:void 0}function uv(e,t){let n=Array.from({length:t.length+1},(e,t)=>t);for(let r=1;r<=e.length;r++){let i=n[0];n[0]=r;for(let a=1;a<=t.length;a++){let o=n[a];n[a]=Math.min(n[a]+1,n[a-1]+1,i+(e[r-1]===t[a-1]?0:1)),i=o}}return n[t.length]}function dv(e,t){let n=e.schema.props.samples?.default,r=typeof n==`number`?n:200;return S_(e,t,`samples`)??r}function fv(e){let t=Q_(e),n=0,r=!1;for(let i of e.entries){if(i.name!==`plot`)continue;let a=e.attrs.get(i.node.id)??{},o=l_(i.node.children).filter(e=>e.type===`math`),s=dv(i,a);o.length>16&&e.report(`local.budget.plot.curves`,`<plot> supports at most 16 curves, but has ${o.length}.`,i.node.range.start,i.node.range.end,{key:`local.budget.plot.curves`,params:{limit:16,count:o.length}});let c=o.length*s,l=n+c;if(!r&&l>2e4&&(e.report(`local.budget.plot.points`,`The document's total plot sample count exceeds the limit of ${O}.`,i.node.range.start,i.node.range.end,{key:`local.budget.plot.points`,params:{limit:O}}),r=!0),n=Math.min(O+1,l),!(o.length>16||r))for(let n of o){let r=(n.value??``).trim();if(!/^y\s*=/u.test(r)){e.report(`local.math.formula`,`<plot> formulas must be written explicitly as y = expression.`,n.range.start,n.range.end,{key:`local.math.formula.shape`});continue}let i=null;try{i=Mn(r)}catch(t){e.report(`local.math`,`Cannot compute plot formula: ${t instanceof Error?t.message:String(t)}`,n.range.start,n.range.end,{key:`local.math.compute`,params:{detail:t instanceof Error?t.message:String(t),code:t&&typeof t==`object`&&`code`in t&&typeof t.code==`string`?t.code:`latex-syntax`,near:r.slice(0,120)}})}if(i)for(let r of i.dependencies)r!==`x`&&r!==`y`&&(Object.hasOwn(t,r)?t[r]!==`number`&&e.report(`local.math.binding`,`Plot parameter "${r}" must be a number, but is ${p_(t[r])}.`,n.range.start,n.range.end,{key:`local.math.binding.type`,params:{name:r,kind:p_(t[r])}}):e.report(`local.math.binding`,`Plot formula references undeclared parameter "${r}".`,n.range.start,n.range.end,{key:`local.math.binding.unknown`,params:{name:r}}))}}}function pv(e,t,n){let r=(e.children??[]).filter(e=>e.type===`tableRow`);if(!r.length)return t.report(`local.table.header`,`The table for <${n.name}> is missing a header.`,e.range.start,e.range.end,{key:`local.table.header.missing`,params:{name:n.name}}),null;let i=r[0].children??[],a=[];for(let e of i){if(d_(e))return t.report(`local.table.header`,`Table headers cannot contain interpolations.`,e.range.start,e.range.end,{key:`local.table.header.interpolation`}),null;let n=u_(e).trim();if(!n)return t.report(`local.table.header`,`Table headers cannot be empty.`,e.range.start,e.range.end,{key:`local.table.header.empty`}),null;if(a.includes(n))return t.report(`local.table.header`,`Duplicate table header "${n}".`,e.range.start,e.range.end,{key:`local.table.header.duplicate`,params:{name:n}}),null;a.push(n)}if(!a.length)return t.report(`local.table.header`,`Table headers cannot be empty.`,e.range.start,e.range.end,{key:`local.table.header.empty`}),null;let o=[];for(let e of r.slice(1)){let n=e.children??[];n.length===a.length?o.push(n):t.report(`local.table.row`,`Table row has a different column count: header has ${a.length} columns, this row has ${n.length}.`,e.range.start,e.range.end,{key:`local.table.row.mismatch`,params:{header:a.length,row:n.length}})}return{header:a,rows:o}}function mv(e,t){let n=l_(e.children);if(n.length===1&&n[0].type===`interpolation`){let e=t.expressionKinds.get(n[0].id);if(e===`number`||e===null)return!0;if(e!==void 0)return!1}let r=u_(e).trim();return r?t_(r)!==null:!1}function hv(e,t,n,r,i){let a=e.header[t];e.rows.forEach((e,i)=>{let o=e[t];if(!o)return;let s=l_(o.children);if(s.length===1&&s[0].type===`interpolation`){let e=n.expressionKinds.get(s[0].id);e!=null&&e!==`number`&&n.report(`local.chart.numeric`,`${r.name===`timeline`?`Timeline`:`Chart`} column "${a}" requires a number in row ${i+1}, but the expression evaluates to ${p_(e)}.`,o.range.start,o.range.end,{key:r.name===`timeline`?`local.timeline.numeric.expression`:`local.chart.numeric.expression`,params:{name:a,row:i+1,kind:p_(e)}})}else mv(o,n)||n.report(`local.chart.numeric`,`${r.name===`timeline`?`Timeline`:`Chart`} column "${a}" requires a plain number in row ${i+1}, got "${u_(o).trim()||`empty`}".`,o.range.start,o.range.end,{key:r.name===`timeline`?`local.timeline.numeric.plain`:`local.chart.numeric.plain`,params:{name:a,row:i+1,value:u_(o).trim()||`empty`}})})}function gv(e,t){return e.indexOf(t)}function _v(e){for(let t of e.entries){if(t.name===`table`){vv(t,e);continue}if(t.name!==`chart`&&t.name!==`timeline`)continue;let n=vv(t,e);n&&(t.name===`chart`?xv(t,n,e):Sv(t,n,e))}}function vv(e,t){if(t.tableShapes.has(e.node.id))return t.tableShapes.get(e.node.id)??null;let n=t.tables.get(e.node.id),r=n?pv(n,t,e):null;return t.tableShapes.set(e.node.id,r),r}function yv(e,t){if(t.size===0)return;let n=Object.create(null),r=0;for(let[e,i]of t)i&&(n[e]=Object.freeze({header:Object.freeze([...i.header]),rowIds:Object.freeze(i.rows.map(e=>Object.freeze(e.map(e=>e.id))))}),r+=1);r!==0&&(e.tableShapes=Object.freeze(n))}function bv(e){for(let t of e.entries){if(t.name!==`table`&&t.name!==`chart`)continue;let n=e.attrs.get(t.node.id)??{},r=n.key;if(!r)continue;let i=typeof r.value==`string`?r.value.trim():``;if(!i){e.report(`local.selection.key`,`<${t.name}> key cannot be empty.`,r.offset,void 0,{key:`local.selection.key.empty`,params:{component:t.name}}),e.selections.set(t.node.id,[``]);continue}let a=vv(t,e);if(!a){e.selections.set(t.node.id,[``]);continue}let o=gv(a.header,i);if(o<0){e.report(`local.selection.key`,`<${t.name}> key column "${i}" does not exist in its table.`,r.offset,void 0,{key:`local.selection.key.missing-column`,params:{component:t.name,name:i}}),e.selections.set(t.node.id,[``]);continue}let s=[],c=new Set;a.rows.forEach((n,r)=>{let a=n[o];if(!a)return;if(d_(a)){e.report(`local.selection.key`,`<${t.name}> key column "${i}" must contain static text; row ${r+1} contains an interpolation.`,a.range.start,a.range.end,{key:`local.selection.key.interpolation`,params:{component:t.name,name:i,row:r+1}});return}let l=u_(a).trim();l?c.has(l)?e.report(`local.selection.key`,`<${t.name}> key column "${i}" must be unique; duplicate value "${l}".`,a.range.start,a.range.end,{key:`local.selection.key.duplicate`,params:{component:t.name,name:i,value:l}}):(c.add(l),s.push(l)):e.report(`local.selection.key`,`<${t.name}> key column "${i}" cannot be empty in row ${r+1}.`,a.range.start,a.range.end,{key:`local.selection.key.empty-cell`,params:{component:t.name,name:i,row:r+1}})}),e.selections.set(t.node.id,[``,...s]);let l=n.initial;l&&typeof l.value==`string`&&l.value!==``&&!s.includes(l.value)&&e.report(`local.initial.option`,`Initial selection "${l.value}" of <${t.name}> is not a value of key column "${i}".`,l.offset,void 0,{key:`local.selection.key.initial`,params:{value:l.value,component:t.name,name:i}})}}function xv(e,t,n){let r=n.attrs.get(e.node.id)??{},i=typeof r.kind?.value==`string`?r.kind.value:`bar`,a=t.header;for(let t of a)t.includes(`,`)&&n.report(`local.chart.column`,`Chart column names cannot contain commas: "${t}".`,e.node.range.start,e.node.range.end,{key:`local.chart.column.comma`,params:{name:t}});let o=typeof r.x?.value==`string`?r.x.value.trim():``,s=typeof r.y?.value==`string`?r.y.value.trim():``;o&&gv(a,o)<0&&n.report(`local.chart.column`,`Chart x column "${o}" does not exist.`,r.x?.offset??e.node.range.start,void 0,{key:`local.chart.column.x-missing`,params:{name:o}});let c=[];if(s){c=s.split(`,`).map(e=>e.trim()).filter(Boolean),c.length||n.report(`local.chart.column`,`Chart y requires a column name.`,r.y?.offset??e.node.range.start,void 0,{key:`local.chart.column.y-required`});for(let t of c)gv(a,t)<0&&n.report(`local.chart.column`,`Chart y column "${t}" does not exist.`,r.y?.offset??e.node.range.start,void 0,{key:`local.chart.column.y-missing`,params:{name:t}})}let l=[];if(i===`bar`||i===`line`||i===`area`){let t=o?Math.max(0,gv(a,o)):0;l=c.length?c.map(e=>gv(a,e)).filter(e=>e>=0):a.map((e,t)=>t).filter(e=>e!==t),l.length||n.report(`local.chart.column`,`Chart requires at least one numeric column.`,e.node.range.start,e.node.range.end,{key:`local.chart.column.needs-numeric`})}else if(i===`scatter`){let r=o?gv(a,o):0;r<0?n.report(`local.chart.column`,`Scatter chart x column "${o}" does not exist.`,e.node.range.start,void 0,{key:`local.chart.column.scatter-x-missing`,params:{name:o}}):hv(t,r,n,e,`x`),l=c.length?c.map(e=>gv(a,e)).filter(e=>e>=0):a.map((e,t)=>t).filter(e=>e!==r),l.length||n.report(`local.chart.column`,`Scatter chart requires at least one numeric column.`,e.node.range.start,e.node.range.end,{key:`local.chart.column.scatter-needs-numeric`})}else if(i===`donut`){if(a.length<2){n.report(`local.chart.column`,`Donut chart requires a label column and a value column.`,e.node.range.start,e.node.range.end,{key:`local.chart.column.donut-columns`});return}if(c.length===1){let e=gv(a,c[0]);e>=0&&(l=[e])}else c.length>1?n.report(`local.chart.column`,`Donut chart y can only specify one numeric column.`,r.y?.offset??e.node.range.start,void 0,{key:`local.chart.column.donut-y`}):a.length>2?n.report(`local.chart.column`,`A donut chart with more than two columns must use y to specify the single numeric column.`,e.node.range.start,e.node.range.end,{key:`local.chart.column.donut-need-y`}):l=[1]}l=[...new Set(l)];for(let r of l)hv(t,r,n,e,`y`);if(i===`donut`)for(let e of l)t.rows.forEach((t,r)=>{let i=t[e];if(!i||l_(i.children).length)return;let a=t_(u_(i).trim());a!==null&&a<0&&n.report(`local.chart.negative`,`Donut chart values cannot be negative; row ${r+1} is ${a}.`,i.range.start,i.range.end,{key:`local.chart.negative`,params:{row:r+1,value:a}})})}function Sv(e,t,n){let r=[{title:`Task`,start:`Start`,duration:`Duration`,notes:`Notes`},{title:`事项`,start:`开始`,duration:`时长`,notes:`说明`}].find(e=>t.header.includes(e.title)&&t.header.includes(e.start)&&t.header.includes(e.duration));if(!r){n.report(`local.timeline.header`,`Timeline requires either Task, Start and Duration columns or 事项, 开始 and 时长 columns, with optional Notes or 说明.`,e.node.range.start,e.node.range.end,{key:`local.timeline.header.missing`});return}let i=new Set(Object.values(r));for(let r of t.header)i.has(r)||n.report(`local.timeline.header`,`Timeline does not support column "${r}".`,e.node.range.start,e.node.range.end,{key:`local.timeline.header.column`,params:{name:r}});for(let i of[r.start,r.duration]){let r=gv(t.header,i);r>=0&&hv(t,r,n,e,i)}let a=gv(t.header,r.start),o=gv(t.header,r.duration);t.rows.forEach((e,r)=>{for(let i of[a,o]){if(i<0)continue;let a=e[i];if(!a||l_(a.children).length)continue;let o=t_(u_(a).trim());o!==null&&o<0&&n.report(`local.timeline.value`,`Timeline column "${t.header[i]}" cannot be negative in row ${r+1}.`,a.range.start,a.range.end,{key:`local.timeline.value.negative`,params:{name:t.header[i],row:r+1}})}})}var Cv=1e-9,wv=200;function Tv(e){return Array.isArray(e)?e.slice():e}function Ev(e){return{...e,range:{...e.range}}}function Dv(e,t){return Array.isArray(e)||Array.isArray(t)?!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length?!1:e.every((e,n)=>e===t[n]):e===t}function Ov(e){return e===``||ye(e)!==null}function kv(e,t,n){let r=(e-t)/n;return Math.abs(r-Math.round(r))<=Cv*Math.max(1,Math.abs(r))}function Av(e){for(let[t,n]of Object.entries(e))Array.isArray(n)&&!Object.isFrozen(n)&&(e[t]=Object.freeze([...n]));return Object.freeze(e)}function jv(e,t,n,r){let i=Math.max(0,Math.min(e.source.length,t.range.start)),a=e.source.slice(0,i).split(`
61
+ `);return{code:n,message:$e(r),severity:`error`,range:{start:i,end:Math.max(i+1,Math.min(e.source.length,t.range.end))},line:a.length,column:(a.at(-1)??``).length+1,messageKey:r.key,...r.params?{params:r.params}:{}}}function Mv(e,t){return{code:e,message:t,severity:`error`,range:{start:0,end:0},line:1,column:1}}function Nv(e,t){return e.attrs?.[t]}function Pv(e,t){let n=Nv(e,t);if(n===`true`)return!0;if(n===`false`)return!1}function Fv(e,t){let n=Nv(e,t);if(n===void 0)return;let r=Number(n);return Number.isFinite(r)?r:void 0}function Iv(e){return tt(e)}function Lv(e,t){return{ok:!1,detail:ze(e,t)}}function Rv(e,t){if(e.name===`date`){if(!Ov(t))return Lv(`local.runtime.value.date-invalid`);if(t===``&&Pv(e,`required`)===!0)return Lv(`local.runtime.value.date-required`);let n=Nv(e,`min`),r=Nv(e,`max`);return t!==``&&n&&t<n?Lv(`local.runtime.value.date-earlier`,{min:n}):t!==``&&r&&t>r?Lv(`local.runtime.value.date-later`,{max:r}):{ok:!0,value:t}}if(e.name===`input`||e.name===`textarea`){let n=Iv(t);if(t===``&&Pv(e,`required`)===!0)return Lv(`local.runtime.value.field-required`);let r=Fv(e,`min-length`),i=Fv(e,`max-length`);if(r!==void 0&&r>0&&t!==``&&n<r)return Lv(`local.runtime.value.min-length`,{min:r});if(i!==void 0&&n>i)return Lv(`local.runtime.value.max-length`,{max:i});if(e.name===`input`&&Nv(e,`type`)===`email`&&t!==``){if(t.length>254)return Lv(`local.runtime.value.email-length`,{limit:254});if(!N(t))return Lv(`local.runtime.value.email-invalid`)}}return{ok:!0,value:t}}function zv(e,t,n){switch(e.type){case`number`:{if(typeof n!=`number`||!Number.isFinite(n))return Lv(`local.runtime.value.finite-number`,{name:e.name});if(e.min!==void 0&&n<e.min)return Lv(`local.runtime.value.min`,{name:e.name,min:e.min});if(e.max!==void 0&&n>e.max)return Lv(`local.runtime.value.max`,{name:e.name,max:e.max});let t=e.step??1,r=e.min??0;return t>0&&!kv(n,r,t)?Lv(`local.runtime.value.step`,{name:e.name,step:t,base:r}):{ok:!0,value:n}}case`boolean`:return typeof n==`boolean`?{ok:!0,value:n}:Lv(`local.runtime.value.boolean`,{name:e.name});case`string`:{if(typeof n!=`string`)return Lv(`local.runtime.value.string`,{name:e.name});let r=vt(n);if(r)return Lv(`local.runtime.value.budget`,{name:e.name,detail:$e(r),detailKey:r.key,...r.params});for(let e of t){let t=Rv(e,n);if(!t.ok)return t}return e.options?.length&&!e.options.includes(n)?Lv(`local.runtime.value.option`,{value:n,options:e.options.join(`, `)}):{ok:!0,value:n}}case`array`:{if(!Array.isArray(n))return Lv(`local.runtime.value.array`,{name:e.name});let t=vt(n);if(t)return Lv(`local.runtime.value.budget`,{name:e.name,detail:$e(t),detailKey:t.key,...t.params});let r=new Set;for(let t of n){if(typeof t!=`string`)return Lv(`local.runtime.value.array-members`,{name:e.name});if(e.options&&!e.options.includes(t))return Lv(`local.runtime.value.checklist-option`,{value:t});r.add(t)}let i=e.options?e.options.filter(e=>r.has(e)):[...r];return e.maxItems!==void 0&&i.length>e.maxItems?Lv(`local.runtime.value.max-items`,{name:e.name,max:e.maxItems}):{ok:!0,value:i}}case`null`:return{ok:!0,value:n}}return Lv(`local.runtime.value.unsupported-type`,{name:e.name})}function Bv(e){if(!e||e.syntax!==`local`)throw Error(`createLocalRuntime requires a local interaction document.`);if(e.syntaxVersion!==void 0&&e.syntaxVersion!==`local-draft-2`||e.versionDeclaration&&e.versionDeclaration.version!==`local-draft-2`)throw Error(`createLocalRuntime requires ${Bm}; migrate the source before constructing a runtime.`);let t=new Map,n=e=>{for(let r of e)t.set(r.id,r),r.children&&n(r.children)};n(e.nodes);let r={},i=new Map;for(let[n,a]of Object.entries(e.bindings)){let e=vt(a.initial);if(e)throw new z(`expression-budget`,`Parameter "${n}": ${$e(e)}`,0);r[n]=Tv(a.initial);let o=[];for(let e of a.nodeIds){let n=t.get(e);n&&o.push(n)}i.set(n,o)}let a=new Map;for(let[t,n]of Object.entries(e.bindingSlots??{}))a.set(t,{...n});let o=Object.freeze(Object.keys(e.bindings).filter(e=>!e.startsWith(`@`)).sort()),s=new Map;for(let[e,t]of a)for(let n of Object.values(t)){if(n.startsWith(`@`))continue;let t=s.get(n)??new Set;t.add(e),s.set(n,t)}let c=(e,t)=>{let n=a.get(e);if(!n?.start||!n?.end)return!1;let r=t[n.start],i=t[n.end];return typeof r==`number`&&typeof i==`number`&&r>i},l=e.computations??{},u=Object.keys(l),d=new Map;for(let[e,t]of Object.entries(l))try{d.set(e,Yt(t.source))}catch{}let{order:f,cyclic:p}=Zn(l),m={},h=new Map,g=e=>e instanceof z?e:new z(`expression-eval`,e instanceof Error?e.message:String(e),0);for(let e of f){let t=l[e];if(!t||t.kind!==`const`)continue;if(Object.hasOwn(t,`value`)){let n=t.value,r=yt(n);if(r){h.set(e,new z(`expression-budget`,`Constant "${e}": ${r}`,0));continue}m[e]=Tv(n);continue}let n=d.get(e);if(!n)h.set(e,new z(`expression-eval`,`Constant "${e}" cannot be evaluated.`,0));else try{let t=n.evaluate({...m}),r=yt(t);if(r){h.set(e,new z(`expression-budget`,`Constant "${e}": ${r}`,0));continue}m[e]=Tv(t)}catch(t){h.set(e,g(t))}}let _=new Map;for(let e of p)_.set(e,new z(`expression-cycle`,`Computation "${e}" is part of a dependency cycle.`,0));let v=[];if(Array.isArray(e.validations)){for(let t of e.validations)if(ag(t))try{v.push({rule:t,expression:Yt(t.expression),error:null})}catch(e){v.push({rule:t,expression:null,error:g(e)})}}let y=ig(typeof e.source==`string`?e.source:``),b=null,S=e=>{let t;try{t=tn(e,O)}catch{t=tg}return ng(t)},C=()=>{let t=[],n=typeof e.source==`string`?e.source:``;for(let e of v){if(e.error){t.push(og(n,y,e.rule.range,eg,ng(`Validation expression is invalid: ${e.error.message}`)));continue}if(!e.expression)continue;let r;try{r=e.expression.evaluate(O)}catch(r){t.push(og(n,y,e.rule.range,eg,ng(`Validation expression failed: ${r instanceof Error?r.message:String(r)}`)));continue}typeof r==`boolean`?r||t.push(og(n,y,e.rule.range,$h,S(e.rule.message))):t.push(og(n,y,e.rule.range,eg,`Validation expression must evaluate to a boolean.`))}return t},w=r,T=0,E={},D=new Map,O={},k={},A={revision:0,state:Av({})},j=!1,M=new Set,N=new Map,P=new Map,F=()=>{if(j)throw Error(`The local interaction runtime has been disposed.`)},ee=()=>{if(u.length===0)E={},D=new Map;else{let e=$n(l,f,d,w,m);E=e.values,D=e.errors;for(let[e,t]of h)Object.hasOwn(E,e)||D.set(e,t);for(let[e,t]of _)Object.hasOwn(E,e)||D.set(e,t)}let e={};for(let[t,n]of Object.entries(w))e[t]=n;for(let[t,n]of Object.entries(E))e[t]=n;for(let[t,n]of D)Object.hasOwn(E,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get(){throw n}});O=e;let t={};for(let[e,n]of Object.entries(w))t[e]=n;for(let[e,n]of Object.entries(E))t[e]=n;k=t},I=()=>{A={revision:T,state:Av(k)}},te=e=>{w=e,T+=1,ee(),I();for(let e of M)e()},ne=(n,r)=>{let a=(i.get(n.name)??[])[0]??(n.owner?t.get(n.owner):void 0)??(n.nodeIds[0]?t.get(n.nodeIds[0]):void 0);return a?jv(e,a,`local.runtime.value`,r):Mv(`local.runtime.value`,$e(r))},re=n=>{F();let r=[],a={},o=Object.keys(n).sort();for(let t of o){if(t===`__proto__`){r.push(Mv(`local.runtime.parameter`,`Parameter names cannot be "__proto__".`));continue}if(t.startsWith(`@`)){r.push(Mv(`local.runtime.parameter`,`Internal parameter "${t}" cannot be written by name.`));continue}if(!Object.hasOwn(e.bindings,t)){r.push(Mv(`local.runtime.parameter`,`Unknown parameter "${t}".`));continue}let o=e.bindings[t],s=zv(o,i.get(t)??[],n[t]);s.ok?a[t]=Tv(s.value):r.push(ne(o,s.detail))}if(r.length)return r;if(!o.some(e=>!Dv(w[e],a[e])))return[];let l={...w,...a},u=new Set;for(let e of o)for(let t of s.get(e)??[])u.add(t);for(let n of[...u].sort())if(c(n,l)){let i=t.get(n);r.push(i?jv(e,i,`local.runtime.value`,ze(`local.runtime.value.range-order`)):Mv(`local.runtime.value`,$e(ze(`local.runtime.value.range-order`))))}return r.length?r:(te(l),[])};ee(),I();let ie=e=>{let t=P.get(e);if(!t){if(t=Yt(e),P.size>=wv){let e=P.keys().next().value;e!==void 0&&P.delete(e)}P.set(e,t)}return t},ae=e=>{let t=new Set,n=e=>{t.add(e.id);for(let t of e.children??[])n(t)};return n(e),t};return{document:e,snapshot(){return F(),A},get(e,n){F();let r=t.get(e.id);if(!r)return null;let i=n===void 0?x(r):a.get(r.id)?.[n];return i&&Object.hasOwn(w,i)?Tv(w[i]):null},set(n,r,o){F();let s=t.get(n.id);if(!s)return[jv(e,n,`local.runtime.binding`,ze(`local.runtime.binding.no-writable`))];let l=a.get(s.id),u;if(o===void 0){if(l)return[jv(e,s,`local.runtime.binding`,ze(`local.runtime.binding.needs-slot`))];u=x(s)}else if(u=l?.[o],!u)return[jv(e,s,`local.runtime.binding`,ze(`local.runtime.binding.unknown-slot`,{slot:o}))];let d=Object.hasOwn(e.bindings,u)?e.bindings[u]:void 0;if(!d)return[jv(e,s,`local.runtime.binding`,ze(`local.runtime.binding.no-writable`))];let f=zv(d,i.get(u)??[],r);if(!f.ok)return[jv(e,s,`local.runtime.value`,f.detail)];let p=Tv(f.value);if(Dv(w[u],p))return[];let m={...w,[u]:p};return c(s.id,m)?[jv(e,s,`local.runtime.value`,ze(`local.runtime.value.range-order`))]:(te(m),[])},setMany(n,r){F();let o=t.get(n.id);if(!o)return[jv(e,n,`local.runtime.binding`,ze(`local.runtime.binding.no-writable`))];let s=a.get(o.id);if(!s)return[jv(e,o,`local.runtime.binding`,ze(`local.runtime.binding.no-multi-slot`))];let l=Object.entries(r);if(!l.length)return[];let u={...w};for(let[t,n]of l){let r=s[t];if(!r||!Object.hasOwn(e.bindings,r))return[jv(e,o,`local.runtime.binding`,ze(`local.runtime.binding.unknown-slot`,{slot:t}))];let a=zv(e.bindings[r],i.get(r)??[],n);if(!a.ok)return[jv(e,o,`local.runtime.value`,a.detail)];u[r]=Tv(a.value)}return c(o.id,u)?[jv(e,o,`local.runtime.value`,ze(`local.runtime.value.range-order`))]:(l.every(([e,t])=>Dv(w[s[e]],t))||te(u),[])},parameterNames(){return F(),o},getParameter(t){if(F(),!t.startsWith(`@`)&&Object.hasOwn(e.bindings,t))return Object.hasOwn(w,t)?Tv(w[t]):void 0},getParameters(){F();let e={};for(let t of o){let n=w[t];e[t]=Array.isArray(n)?Object.freeze([...n]):n}return Object.freeze(e)},setParameter(e,t){F();let n=Object.create(null);return n[e]=t,re(n)},setParameters(e){if(F(),typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`setParameters requires an object of parameter values.`);return re(e)},evaluate(e){F();let t=ie(e).evaluate(O);return Array.isArray(t)?t.slice():t},validate(){if(F(),b&&b.revision===T)return b.diagnostics.map(Ev);let e=C();return b={revision:T,diagnostics:e},e.map(Ev)},text(e){return F(),tn(e,O)},reset(n){F();let r=t.get(n.id);if(!r)return;let a=ae(r),o={...w};for(let[t,n]of Object.entries(e.bindings)){if(!(i.get(t)??[]).some(e=>a.has(e.id)))continue;let e=vt(n.initial);if(e)throw new z(`expression-budget`,`Parameter "${t}": ${$e(e)}`,0);o[t]=Tv(n.initial)}for(let e of a)N.set(e,(N.get(e)??0)+1);te(o)},resetToken(e){F();let n=t.get(e.id);return n?N.get(n.id)??0:0},subscribe(e){return F(),M.add(e),()=>{M.delete(e)}},dispose(){j||(j=!0,M.clear(),P.clear(),d.clear(),N.clear())}}}var Q=(e,t,...n)=>(0,y.createElement)(e,t,...n),Vv={" ":`space`,",":`thinspace`,":":`medspace`,";":`thickspace`,"!":`negthinspace`,"{":`lbrace`,"}":`rbrace`,"|":`vert`,"%":`percent`,"&":`amp`,"#":`hash`,_:`underscore`,$:`dollar`},Hv=5e4,Uv=2e4,Wv=120,Gv=2e3;function Kv(e){return e.length>Gv?`${e.slice(0,Gv)}…`:e}function qv(e){if(e.length>Hv)throw Error(`Math source exceeds the length limit.`);let t=[],n=e=>{if(t.length>=Uv)throw Error(`Math input contains too many tokens.`);t.push(e)},r=0;for(;r<e.length;){let t=e[r];if(t===` `||t===` `||t===`\r`||t===`
55
62
  `)r+=1;else if(t===`%`)for(;r<e.length&&e[r]!==`
56
- `;)r+=1;else if(t===`\\`){if(r+1>=e.length){n({kind:`command`,value:`backslash`,offset:r}),r+=1;continue}let t=e[r+1];if(t===`\\`){n({kind:`newline`,value:`\\\\`,offset:r}),r+=2;continue}if(/[A-Za-z]/.test(t)){let t=r+1;for(;t<e.length&&/[A-Za-z]/.test(e[t]);)t+=1;n({kind:`command`,value:e.slice(r+1,t),offset:r}),r=t;continue}n({kind:`command`,value:Object.hasOwn(Jf,t)?Jf[t]:t,offset:r}),r+=2}else if(t>=`0`&&t<=`9`){let t=/^\d+(?:\.\d*)?/.exec(e.slice(r));n({kind:`number`,value:t[0],offset:r}),r+=t[0].length}else if(t===`.`&&e[r+1]>=`0`&&e[r+1]<=`9`){let t=/^(?:\d+(?:\.\d*)?|\.\d+)/.exec(e.slice(r));n({kind:`number`,value:t[0],offset:r}),r+=t[0].length}else/[A-Za-z]/.test(t)?(n({kind:`letter`,value:t,offset:r}),r+=1):(n({kind:`punct`,value:t,offset:r}),r+=1)}return n({kind:`eof`,value:``,offset:e.length}),t}var tp={alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ϵ`,varepsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,vartheta:`ϑ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,varpi:`ϖ`,rho:`ρ`,varrho:`ϱ`,sigma:`σ`,varsigma:`ς`,tau:`τ`,upsilon:`υ`,phi:`φ`,varphi:`ϕ`,chi:`χ`,psi:`ψ`,omega:`ω`,Gamma:`Γ`,Delta:`Δ`,Theta:`Θ`,Lambda:`Λ`,Xi:`Ξ`,Pi:`Π`,Sigma:`Σ`,Upsilon:`Υ`,Phi:`Φ`,Psi:`Ψ`,Omega:`Ω`},np={cdot:`·`,times:`×`,div:`÷`,pm:`±`,mp:`∓`,le:`≤`,leq:`≤`,ge:`≥`,geq:`≥`,ne:`≠`,neq:`≠`,lt:`<`,gt:`>`,approx:`≈`,equiv:`≡`,sim:`∼`,propto:`∝`,infty:`∞`,partial:`∂`,nabla:`∇`,sum:`∑`,prod:`∏`,int:`∫`,iint:`∬`,oint:`∮`,to:`→`,rightarrow:`→`,leftarrow:`←`,Rightarrow:`⇒`,leftrightarrow:`↔`,in:`∈`,notin:`∉`,ni:`∋`,subset:`⊂`,supset:`⊃`,subseteq:`⊆`,supseteq:`⊇`,cup:`∪`,cap:`∩`,emptyset:`∅`,forall:`∀`,exists:`∃`,neg:`¬`,land:`∧`,lor:`∨`,angle:`∠`,perp:`⊥`,parallel:`∥`,degree:`°`,prime:`′`,ldots:`…`,cdots:`⋯`,dots:`…`,langle:`⟨`,rangle:`⟩`,lbrace:`{`,rbrace:`}`,vert:`|`,lvert:`|`,rvert:`|`,lVert:`‖`,rVert:`‖`,backslash:`\\`,percent:`%`,amp:`&`,hash:`#`,underscore:`_`,dollar:`$`,colon:`:`},rp=new Set([`sin`,`cos`,`tan`,`arcsin`,`arccos`,`arctan`,`exp`,`ln`,`log`,`min`,`max`,`lim`,`det`,`sup`,`inf`,`arg`,`gcd`]),ip={space:`0.25em`,thinspace:`0.167em`,medspace:`0.222em`,thickspace:`0.278em`,negthinspace:`-0.167em`,quad:`1em`,qquad:`2em`,enspace:`0.5em`},ap=new Set([`displaystyle`,`textstyle`,`scriptstyle`,`scriptscriptstyle`,`limits`,`nolimits`]),op=class{tokens;pos=0;source;depth=0;constructor(e){this.source=e,this.tokens=ep(e)}enter(){if(this.depth+=1,this.depth>Zf)throw--this.depth,Error(`Formula is nested too deeply.`)}leave(){--this.depth}render(){let e=this.parseRow({});return e.length===1?e[0]:X(`mrow`,null,...e)}peek(e=0){return this.tokens[Math.min(this.pos+e,this.tokens.length-1)]}take(){return this.tokens[this.pos++]}atPunct(e){let t=this.peek();return t.kind===`punct`&&t.value===e}atCommand(e){let t=this.peek();return t.kind===`command`&&t.value===e}parseRow(e){this.enter();try{let t=[];for(;;){let n=this.peek();if(n.kind===`eof`||n.kind===`punct`&&e.chars?.has(n.value)||n.kind===`command`&&e.commands?.has(n.value)||n.kind===`newline`&&e.newline)break;t.push(this.parseAtom())}return t}finally{this.leave()}}parseAtom(){this.enter();try{return this.parseAtomBody()}finally{this.leave()}}parseAtomBody(){let e=this.peek(),t;return e.kind===`number`?(this.take(),t=X(`mn`,null,e.value)):e.kind===`letter`?(this.take(),t=X(`mi`,null,e.value)):e.kind===`punct`?t=this.parsePunctuation(e):e.kind===`newline`?(this.take(),t=X(`mspace`,{linebreak:`newline`})):e.kind===`command`?t=this.parseCommand(e):(this.take(),t=X(`mtext`,null,``)),this.applyScripts(t)}parsePunctuation(e){return this.take(),e.value===`{`?(--this.pos,this.parseBraceGroup()):e.value===`}`||e.value===`&`||e.value===`#`?X(`mo`,null,e.value):X(`mo`,e.value===`(`||e.value===`)`||e.value===`[`||e.value===`]`||e.value===`|`?{fence:`true`,stretchy:`true`}:null,e.value)}parseCommand(e){let t=e.value;if(t===`frac`||t===`dfrac`||t===`tfrac`)return this.take(),this.parseFraction();if(t===`sqrt`)return this.take(),this.parseRoot();if(t===`left`)return this.take(),this.parseLeft();if(t===`right`)return this.take(),this.readDelimiter()??X(`mrow`,null);if(t===`begin`)return this.take(),this.parseEnvironment();if(t===`end`)return this.take(),this.readRawGroup(),X(`mtext`,null,`\\end`);if(t===`text`||t===`textrm`||t===`mbox`||t===`operatorname`)return this.take(),X(`mtext`,null,this.readRawGroup());if(t===`mathrm`||t===`mathbf`||t===`mathit`||t===`mathsf`){this.take();let e=this.readRawGroup();return X(`mtext`,{mathvariant:t===`mathrm`?`normal`:t===`mathbf`?`bold`:t===`mathit`?`italic`:`sans-serif`},e)}if(t===`overline`||t===`bar`||t===`hat`||t===`tilde`||t===`vec`||t===`dot`||t===`ddot`)return this.take(),X(`mover`,{accent:`true`},this.parseRequiredArgument(),X(`mo`,{stretchy:`true`},t===`overline`||t===`bar`?`¯`:t===`hat`?`^`:t===`tilde`?`~`:t===`vec`?`→`:t===`dot`?`˙`:`¨`));if(ap.has(t))return this.take(),X(`mrow`,null);if(Object.hasOwn(ip,t))return this.take(),X(`mspace`,{width:ip[t]});if(rp.has(t))return this.take(),X(`mo`,{mathvariant:`normal`,form:`prefix`},t);if(Object.hasOwn(tp,t))return this.take(),X(`mi`,null,tp[t]);if(Object.hasOwn(np,t)){this.take();let e=np[t];return X(`mo`,e===`(`||e===`)`||e===`[`||e===`]`||e===`{`||e===`}`||e===`|`||e===`‖`||e===`⟨`||e===`⟩`?{fence:`true`,stretchy:`true`}:null,e)}return this.take(),X(`mtext`,null,`\\${t}`)}parseBraceGroup(){if(!this.atPunct(`{`))return X(`mrow`,null);this.take();let e=this.parseRow({chars:new Set([`}`])});return this.atPunct(`}`)&&this.take(),X(`mrow`,null,...e)}parseFraction(){return X(`mfrac`,null,this.parseRequiredArgument(),this.parseRequiredArgument())}parseRoot(){let e=null;if(this.atPunct(`[`)){this.take();let t=this.parseRow({chars:new Set([`]`])});this.atPunct(`]`)&&this.take(),e=X(`mrow`,null,...t)}let t=this.parseRequiredArgument();return e?X(`mroot`,null,t,e):X(`msqrt`,null,t)}parseRequiredArgument(){return this.atPunct(`{`)?this.parseBraceGroup():this.parseAtom()}parseLeft(){let e=this.readDelimiter(),t=this.parseRow({commands:new Set([`right`])}),n=null;return this.atCommand(`right`)&&(this.take(),n=this.readDelimiter()),!e&&!n?X(`mrow`,null,...t):X(`mrow`,null,e,...t,n)}readDelimiter(){let e=this.peek();if(e.kind===`punct`)return e.value===`.`?(this.take(),null):`()[]|`.includes(e.value)?(this.take(),X(`mo`,{fence:`true`,stretchy:`true`},e.value)):null;if(e.kind===`command`){let t={lbrace:`{`,rbrace:`}`,lvert:`|`,rvert:`|`,vert:`|`,lVert:`‖`,rVert:`‖`,Vert:`‖`,langle:`⟨`,rangle:`⟩`},n=Object.hasOwn(t,e.value)?t[e.value]:void 0;if(n)return this.take(),X(`mo`,{fence:`true`,stretchy:`true`},n)}return null}parseEnvironment(){let e=this.readRawGroup().trim();if(e!==`cases`)return X(`mtext`,null,`\\begin{${e}}`);let t=[],n=0;for(;!this.atCommand(`end`)&&this.peek().kind!==`eof`&&n<500;){n+=1;let e=[];for(;;){let t=this.parseRow({chars:new Set([`&`]),commands:new Set([`end`]),newline:!0});if(e.push(X(`mtd`,{columnalign:`left`},...t)),!this.atPunct(`&`))break;this.take()}if(t.push(X(`mtr`,null,...e)),this.peek().kind===`newline`)this.take();else{if(this.atCommand(`end`)||this.peek().kind===`eof`)break;this.take()}}this.atCommand(`end`)&&(this.take(),this.readRawGroup());let r=X(`mtable`,{columnalign:`left`,columnspacing:`1em`},...t);return X(`mrow`,null,X(`mo`,{fence:`true`,stretchy:`true`},`{`),r)}applyScripts(e){let t=null,n=null,r=!1;for(;;)if(this.atPunct(`^`))this.take(),n=this.parseScriptArgument(),r=!0;else if(this.atPunct(`_`))this.take(),t=this.parseScriptArgument(),r=!0;else break;return r?t!==null&&n!==null?X(`msubsup`,null,e,t,n):n===null?X(`msub`,null,e,t):X(`msup`,null,e,n):e}parseScriptArgument(){return this.atPunct(`{`)?this.parseBraceGroup():this.atPunct(`+`)||this.atPunct(`-`)?X(`mrow`,null,X(`mo`,null,this.take().value),this.parseAtom()):this.parseAtom()}readRawGroup(){if(!this.atPunct(`{`))return``;let e=this.take(),t=1,n=this.pos;for(;n<this.tokens.length;n+=1){let e=this.tokens[n];if(e.kind===`eof`)break;if(e.kind===`punct`){if(e.value===`{`)t+=1;else if(e.value===`}`&&(--t,t===0))break}}if(n>=this.tokens.length||this.tokens[n].kind===`eof`)return this.pos=n,this.source.slice(e.offset+1);let r=this.tokens[n];return this.pos=n+1,this.source.slice(e.offset+1,r.offset)}};function sp({source:e,display:t=!1}){let n=$f(e),r;if(e.length>Yf)r=X(`mtext`,null,n);else try{r=new op(e).render()}catch{r=X(`mtext`,null,n)}let i=e.length>Qf?n:e;return X(`math`,{display:t?`block`:`inline`,className:t?`local-math local-math-block`:`local-math`,"aria-label":i},X(`semantics`,null,X(`mrow`,null,r),X(`annotation`,{encoding:`application/x-tex`},i)))}var cp=s((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})),Z=s(((e,t)=>{t.exports=cp()}))(),lp=e=>e,up=(0,y.createContext)(`en`);function dp({locale:e=`en`,children:t}){return(0,Z.jsx)(up.Provider,{value:e,children:t})}function fp(){return(0,y.useContext)(up)}function pp(e,t,n){return e===`zh`?n:t}function Q(){let e=fp();return(0,y.useMemo)(()=>(t,n)=>pp(e,t,n),[e])}var mp=[`var(--chart-1)`,`var(--chart-2)`,`var(--chart-3)`,`var(--chart-4)`,`var(--chart-5)`,`var(--chart-6)`,`var(--chart-7)`,`var(--chart-8)`],hp=520,gp=320,_p=520,vp=320,yp=520,bp=120,xp=46,Sp=150,Cp=12.5,wp=10,Tp=100,Ep=2,Dp=15,Op=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,kp=/^\s*\{\{([\s\S]*)\}\}\s*$/;function Ap(e){if(!Number.isFinite(e))return`—`;if(Object.is(e,-0))return`0`;let t=Math.abs(e);return t>=0xe8d4a51000||t>0&&t<1e-4?e.toExponential(3).replace(/(\.\d*?)0+e/,`$1e`).replace(/\.e/,`e`):Number(e.toFixed(6)).toString()}function jp(e){if(!Number.isFinite(e))return`—`;let t=Math.abs(e);return t>=1e6||t>0&&t<.001?e.toExponential(2):Number(e.toFixed(4)).toString()}function Mp(e){return e instanceof Error?e.message:String(e)}function Np(e,t,n,r=``){let i=t?.[n];if(i===void 0)return r;try{return e.text(i)}catch{return r}}function Pp(e,t,n,r){let i=t?.[n];if(i===void 0)return r;let a=i.trim();if(!a)return null;let o=kp.exec(a);try{let t=o?e.evaluate(o[1].trim()):Number(a);return typeof t==`number`&&Number.isFinite(t)?t:null}catch{return null}}function Fp(e,t,n,r){let i=t?.[n];if(i===void 0)return r;let a=i.trim();if(!a||a===`true`)return!0;if(a===`false`)return!1;let o=kp.exec(a);if(!o)return r;try{let t=e.evaluate(o[1].trim());return typeof t==`boolean`?t:r}catch{return r}}function Ip(e,t,n,r){let i=Pp(e,t,n,r);return i===null||!Number.isFinite(i)?r:Math.trunc(i)}function Lp(e,t){return e.length>t?`${e.slice(0,Math.max(1,t-1))}…`:e}function Rp(e,t=8,n=2){if(!e)return[``];let r=[],i=e;for(;i&&r.length<n-1;)r.push(i.slice(0,t)),i=i.slice(t);return(i||r.length===0)&&r.push(i.length>t?`${i.slice(0,Math.max(1,t-1))}…`:i),r}function zp(e,t){let n=Array.from(e),r=Array.from(t),i=Math.min(n.length,r.length);for(let e=0;e<i;e+=1){let t=(n[e].codePointAt(0)??0)-(r[e].codePointAt(0)??0);if(t!==0)return t}return n.length-r.length}function Bp(e,t,n=5){if(!Number.isFinite(e)||!Number.isFinite(t)||t<=e)return[e];let r=(t-e)/Math.max(1,n-1),i=10**Math.floor(Math.log10(r)),a=r/i,o=(a<=1?1:a<=2?2:a<=5?5:10)*i,s=Math.ceil(e/o)*o,c=[];for(let e=s;e<=t+o*1e-9&&c.length<40;e+=o)c.push(Number(e.toFixed(10)));return c}function Vp(e,t){let n=1/0,r=-1/0;for(let t of e)Number.isFinite(t)&&(t<n&&(n=t),t>r&&(r=t));if(!Number.isFinite(n)||!Number.isFinite(r))return{min:0,max:1};if(t&&(n=Math.min(n,0),r=Math.max(r,0)),n===r){let e=Math.abs(n)>0?Math.abs(n)*.15:1;n-=e,r+=e}else{let e=(r-n)*.06;n-=e,r+=e,t&&(n=Math.min(n,0),r=Math.max(r,0))}return{min:n,max:r}}function Hp(e,t){return Math.max(46,...e.map(e=>jp(e).length*6+(t?24:10)))}function Up(e,t,n){let r=e.currentTarget,i=r.ownerSVGElement??r.closest(`svg`);if(!i)return;let a=Array.from(i.querySelectorAll(t)),o=a.indexOf(r);o<0||a.length===0||(e.preventDefault(),a[(o+n+a.length)%a.length]?.focus())}function Wp(e){return e.key===`Enter`||e.key===` `||e.key===`Spacebar`}function Gp(e,t=lp){return e===null?{text:``,kind:`null`,error:null}:typeof e==`string`?{text:e,kind:`string`,error:null}:typeof e==`number`?Number.isFinite(e)?{text:Ap(e),kind:`number`,error:null}:{text:t(`Cannot compute`,`无法计算`),kind:`error`,error:t(`Result is not a finite number`,`结果不是有限数字`)}:typeof e==`boolean`?{text:e?`true`:`false`,kind:`boolean`,error:null}:{text:t(`Cannot compute`,`无法计算`),kind:`array`,error:t(`Arrays must first be converted with a function such as len`,`数组需要先用 len 等函数转换`)}}function Kp(e,t,n=lp){let r=``,i=null;for(let a of e??[])if(a.type===`text`||a.type===`inlineCode`||a.type===`code`)r+=a.value??``;else if(a.type===`interpolation`)try{let e=Gp(t.evaluate((a.value??``).trim()),n);e.error&&(i??=e.error),r+=e.text}catch(e){i??=Mp(e),r+=n(`Cannot compute`,`无法计算`)}else if(a.type===`inlineMath`||a.type===`math`)r+=a.value??``;else if(a.type===`image`)r+=a.alt??``;else if(a.children&&a.children.length>0){let e=Kp(a.children,t,n);r+=e.text,i??=e.error}else a.value&&(r+=a.value);return{text:r,error:i}}function qp(e,t,n=lp){let r=e.children??[],i=r.filter(e=>!(e.type===`text`&&!(e.value??``).trim()));if(i.length===1&&i[0].type===`interpolation`)try{let a=t.evaluate((i[0].value??``).trim()),o=Gp(a,n);return{node:e,children:r,text:o.text,value:a,kind:o.kind,numeric:o.kind===`number`?a:null,error:o.error}}catch(t){return{node:e,children:r,text:n(`Cannot compute`,`无法计算`),value:void 0,kind:`error`,numeric:null,error:Mp(t)}}let a=Kp(r,t,n);if(i.length>0&&i.every(e=>e.type===`text`)&&Op.test(a.text.trim())){let t=Number(a.text.trim());if(Number.isFinite(t))return{node:e,children:r,text:a.text,value:t,kind:`number`,numeric:t,error:null}}let o=!a.text.trim()&&!a.error;return{node:e,children:r,text:a.error?n(`Cannot compute`,`无法计算`):a.text,value:a.text,kind:a.error?`error`:o?`empty`:`string`,numeric:null,error:a.error}}function Jp(e,t=lp){return e?e.error?t(`Cannot compute`,`无法计算`):e.text:``}function Yp(e,t,n=lp){let r=e.children?.find(e=>e.type===`table`);if(!r)return null;let i=r.children?.filter(e=>e.type===`tableRow`)??[];if(i.length===0)return null;let a=(i[0].children??[]).map(e=>qp(e,t,n));return{tableNode:r,header:a,headerText:a.map(e=>Jp(e,n)),rows:i.slice(1).map((e,r)=>({index:r,cells:(e.children??[]).map(e=>qp(e,t,n))}))}}function Xp(e,t){let n=!1;for(let r of e.rows){let e=r.cells[t];if(e&&e.kind!==`empty`){if(e.numeric===null)return!1;n=!0}}return n}function Zp(e,t){let n=(e?.key??``).trim();return n?t.findIndex(e=>e.trim()===n):-1}function Qp(e,t,n){return e<0?``:Jp(t.cells[e],n).trim()}function $p(e,t,n){if(!n)return``;try{let n=e.get(t);return typeof n==`string`?n:``}catch{return``}}function em({className:e,label:t,children:n}){let r=(0,y.useId)();return(0,Z.jsxs)(`figure`,{className:`local-visual ${e}`,"aria-labelledby":r,children:[(0,Z.jsx)(`figcaption`,{id:r,className:`local-visual-title`,children:t}),n]})}function tm({message:e,kind:t=`status`}){return(0,Z.jsx)(`p`,{className:`local-visual-message local-visual-${t}`,role:t,children:e})}function nm({notes:e}){return e.length===0?null:(0,Z.jsx)(`ul`,{className:`local-visual-notes`,role:`status`,children:e.map((e,t)=>(0,Z.jsx)(`li`,{children:e},`${e}-${t}`))})}function rm({items:e,hidden:t,onToggle:n,label:r,mode:i}){let a=Q(),o=i!==`static`;return(0,Z.jsx)(`div`,{className:`local-visual-legend${o?``:` local-static-legend`}`,role:`group`,"aria-label":o?r:a(`Legend`,`图例`),children:e.map((e,r)=>{let i=t.has(r);return o?(0,Z.jsxs)(`button`,{type:`button`,className:`local-visual-legend-item${i?` is-off`:``}`,"aria-pressed":!i,disabled:e.disabled,onClick:()=>n(r),title:i?a(`Show ${e.name}`,`显示 ${e.name}`):a(`Hide ${e.name}`,`隐藏 ${e.name}`),children:[(0,Z.jsx)(`span`,{className:`local-visual-swatch`,style:{backgroundColor:e.color},"aria-hidden":`true`}),(0,Z.jsxs)(`span`,{className:`local-visual-legend-text`,children:[e.name,e.detail?a(` (${e.detail})`,`(${e.detail})`):``]})]},`${e.name}-${r}`):(0,Z.jsxs)(`span`,{className:`local-visual-legend-item local-static-legend-item`,children:[(0,Z.jsx)(`span`,{className:`local-visual-swatch`,style:{backgroundColor:e.color},"aria-hidden":`true`}),(0,Z.jsxs)(`span`,{className:`local-visual-legend-text`,children:[e.name,e.detail?a(` (${e.detail})`,`(${e.detail})`):``]})]},`${e.name}-${r}`)})})}function im({node:e,runtime:t,render:n,mode:r}){let i=Q(),[a,o]=(0,y.useState)(``),[s,c]=(0,y.useState)(null),[l,u]=(0,y.useState)(1),[d,f]=(0,y.useState)(null),p=t.resetToken(e);(0,y.useEffect)(()=>{o(``),c(null),u(1),f(null)},[p]);let m=Np(t,e.attrs,`label`,i(`Table`,`表格`)),h=Fp(t,e.attrs,`searchable`,!0),g=Fp(t,e.attrs,`sortable`,!0),_=Ip(t,e.attrs,`page-size`,10),v=Math.max(1,_),b=Yp(e,t,i);if(!b||b.header.length===0)return(0,Z.jsx)(em,{className:`local-visual-table-block`,label:m,children:(0,Z.jsx)(tm,{message:i(`Table requires a non-empty Markdown table.`,`表格需要一个非空的 Markdown 表格。`),kind:`alert`})});let x=Zp(e.attrs,b.headerText),S=x>=0,C=$p(t,e,S),w=n=>{f(null);try{let r=t.set(e,n);r.length>0&&f(r.map(e=>i(tt(e,`en`),tt(e,`zh`))).join(`; `))}catch(e){f(Mp(e))}},T=b.header.map((e,t)=>Xp(b,t)),E=a.trim().toLowerCase(),D=[...b.rows.filter(e=>!E||e.cells.some(e=>Jp(e,i).toLowerCase().includes(E)))];if(s){let e=T[s.column];D.sort((t,n)=>{let r=t.cells[s.column],a=n.cells[s.column],o;if(e){let e=r?.numeric??-1/0,t=a?.numeric??-1/0;o=e===t?0:e<t?-1:1}else o=zp(Jp(r,i),Jp(a,i));return o===0?t.index-n.index:s.direction===`asc`?o:-o})}let O=Math.max(1,Math.ceil(D.length/v)),k=Math.min(l,O),A=D.slice((k-1)*v,k*v),j=e=>{u(1),c(t=>!t||t.column!==e?{column:e,direction:`asc`}:t.direction===`asc`?{column:e,direction:`desc`}:null)},M=e=>!s||s.column!==e?null:(0,Z.jsx)(`span`,{className:`local-visual-sort-marker`,"aria-hidden":`true`,children:s.direction===`asc`?`▲`:`▼`});return r===`static`?(0,Z.jsxs)(em,{className:`local-visual-table-block local-static-table-block`,label:m,children:[(0,Z.jsx)(`div`,{className:`local-visual-table-scroll local-static-table-scroll`,children:(0,Z.jsxs)(`table`,{className:`local-visual-table local-static-table`,children:[(0,Z.jsx)(`caption`,{className:`local-visual-sr-only`,children:m}),(0,Z.jsx)(`thead`,{children:(0,Z.jsx)(`tr`,{children:b.header.map((e,t)=>(0,Z.jsx)(`th`,{scope:`col`,className:T[t]?`is-numeric`:void 0,children:Jp(e,i)},`head-${t}`))})}),(0,Z.jsx)(`tbody`,{children:b.rows.map(e=>{let t=S?Qp(x,e,i):``,r=S&&t!==``&&t===C;return(0,Z.jsx)(`tr`,{className:r?`is-selected local-static-selected`:void 0,children:b.header.map((t,a)=>{let o=e.cells[a];return(0,Z.jsxs)(`td`,{className:T[a]?`is-numeric`:void 0,children:[r&&a===0?(0,Z.jsx)(`span`,{className:`local-visual-sr-only`,children:i(`Selected row`,`已选择行`)}):null,o?.error?(0,Z.jsx)(`span`,{className:`local-visual-cell-error`,title:o.error,children:i(`Cannot compute`,`无法计算`)}):n(o?.children??[])]},`cell-${e.index}-${a}`)})},`row-${e.index}`)})})]})}),b.rows.length===0?(0,Z.jsx)(tm,{message:i(`No rows to display`,`没有可显示的行`)}):null]}):(0,Z.jsxs)(em,{className:`local-visual-table-block`,label:m,children:[h?(0,Z.jsxs)(`label`,{className:`local-visual-search`,children:[(0,Z.jsx)(`span`,{children:i(`Search`,`搜索`)}),(0,Z.jsx)(`input`,{type:`search`,value:a,placeholder:i(`Search all columns`,`搜索所有列`),"aria-label":i(`Search ${m}`,`搜索${m}`),onChange:e=>{o(e.target.value),u(1)}})]}):null,(0,Z.jsx)(`div`,{className:`local-visual-table-scroll`,children:(0,Z.jsxs)(`table`,{className:`local-visual-table`,children:[(0,Z.jsx)(`caption`,{className:`local-visual-sr-only`,children:m}),(0,Z.jsx)(`thead`,{children:(0,Z.jsxs)(`tr`,{children:[S?(0,Z.jsx)(`th`,{scope:`col`,className:`local-visual-select-column`,children:(0,Z.jsx)(`span`,{className:`local-visual-sr-only`,children:i(`Select`,`选择`)})}):null,b.header.map((e,t)=>{let n=s&&s.column===t?s.direction===`asc`?`ascending`:`descending`:`none`;return(0,Z.jsx)(`th`,{scope:`col`,"aria-sort":n,className:T[t]?`is-numeric`:void 0,children:g?(0,Z.jsxs)(`button`,{type:`button`,className:`local-visual-sort-button${s&&s.column===t?` is-sorted`:``}`,onClick:()=>j(t),title:i(`Click to cycle ascending, descending and original order`,`点击切换升序、降序和原始顺序`),children:[Jp(e,i),M(t)]}):Jp(e,i)},`head-${t}`)})]})}),(0,Z.jsx)(`tbody`,{children:A.map(e=>{let t=S?Qp(x,e,i):``,r=S&&t!==``&&t===C;return(0,Z.jsxs)(`tr`,{className:r?`is-selected`:void 0,children:[S?(0,Z.jsx)(`td`,{className:`local-visual-select-cell`,children:t?(0,Z.jsx)(`button`,{type:`button`,className:`local-visual-select-button${r?` is-selected`:``}`,"aria-pressed":r,"aria-label":i(`Select row ${t}`,`选择行 ${t}`),title:i(`Select row ${t}`,`选择行 ${t}`),onClick:()=>w(t),children:(0,Z.jsx)(`span`,{"aria-hidden":`true`,children:r?`●`:`○`})}):null}):null,b.header.map((t,r)=>{let a=e.cells[r];return(0,Z.jsx)(`td`,{className:T[r]?`is-numeric`:void 0,children:a?.error?(0,Z.jsx)(`span`,{className:`local-visual-cell-error`,title:a.error,children:i(`Cannot compute`,`无法计算`)}):n(a?.children??[])},`cell-${e.index}-${r}`)})]},`row-${e.index}`)})})]})}),d?(0,Z.jsx)(tm,{message:d,kind:`alert`}):null,D.length===0?(0,Z.jsx)(tm,{message:i(`No matching results`,`没有匹配结果`)}):null,O>1?(0,Z.jsxs)(`nav`,{className:`local-visual-pagination`,"aria-label":i(`Table pagination`,`表格分页`),children:[(0,Z.jsx)(`button`,{type:`button`,disabled:k<=1,onClick:()=>u(e=>Math.max(1,e-1)),children:i(`Previous`,`上一页`)}),(0,Z.jsx)(`span`,{children:i(`Page ${k} of ${O} · ${D.length} rows`,`第 ${k} / ${O} 页 · 共 ${D.length} 行`)}),(0,Z.jsx)(`button`,{type:`button`,disabled:k>=O,onClick:()=>u(e=>Math.min(O,e+1)),children:i(`Next`,`下一页`)})]}):null]})}var am=[`bar`,`line`,`area`,`scatter`,`donut`];function om(e,t,n,r,i,a){let o=(n,r)=>[e+n*Math.cos(r),t+n*Math.sin(r)],[s,c]=o(n,i),[l,u]=o(n,a),[d,f]=o(r,a),[p,m]=o(r,i),h=+(a-i>Math.PI);return[`M ${s} ${c}`,`A ${n} ${n} 0 ${h} 1 ${l} ${u}`,`L ${d} ${f}`,`A ${r} ${r} 0 ${h} 0 ${p} ${m}`,`Z`].join(` `)}function sm({node:e,runtime:t,mode:n}){let r=Q(),i=n===`static`,[a,o]=(0,y.useState)(new Set),[s,c]=(0,y.useState)(new Set),[l,u]=(0,y.useState)(null),[d,f]=(0,y.useState)(null),p=t.resetToken(e);(0,y.useEffect)(()=>{o(new Set),c(new Set),u(null),f(null)},[p]);let m=(0,y.useId)(),h=Np(t,e.attrs,`title`,``)||Np(t,e.attrs,`label`,``)||r(`Chart`,`图表`),g=(e.attrs?.kind??`bar`).trim().toLowerCase(),_=am.includes(g)?g:null,v=Np(t,e.attrs,`x-label`,``),b=Np(t,e.attrs,`y-label`,``),x=Yp(e,t,r);if(!x||x.header.length===0)return(0,Z.jsx)(em,{className:`local-visual-chart`,label:h,children:(0,Z.jsx)(tm,{message:r(`chart body requires a non-empty Markdown table.`,`chart 正文需要一个非空的 Markdown 表格。`),kind:`alert`})});let S=x.headerText.map(e=>e.trim()),C=Zp(e.attrs,S),w=C>=0,T=$p(t,e,w),E=n=>{f(null);try{let i=t.set(e,n);i.length>0&&f(i.map(e=>r(tt(e,`en`),tt(e,`zh`))).join(`; `))}catch(e){f(Mp(e))}},D=x.rows.map(e=>({index:e.index,cells:e.cells,texts:S.map((t,n)=>Jp(e.cells[n],r)),keyValue:Qp(C,e,r)}));if(!_)return(0,Z.jsx)(em,{className:`local-visual-chart`,label:h,children:(0,Z.jsx)(tm,{message:r(`Unknown chart type "${g}".`,`未知图表类型“${g}”。`),kind:`alert`})});let O=[],k=[],A=(e.attrs?.x??``).trim(),j=A?S.indexOf(A):0;(j<0||j>=S.length)&&k.push(r(`x column "${A}" does not exist.`,`x 列“${A}”不存在。`));let M=(e.attrs?.y??``).split(`,`).map(e=>e.trim()).filter(Boolean),N=[];if(_===`donut`){if(M.length>1)k.push(r(`donut can only use one numeric column; specify a single column in y.`,`donut 只能使用一个数值列,请在 y 中指定唯一列。`));else if(M.length===1){let e=S.indexOf(M[0]);e<0?k.push(r(`y column "${M[0]}" does not exist.`,`y 列“${M[0]}”不存在。`)):N=[e]}else S.length===2?N=[1]:k.push(r(`A donut chart with more than two columns must use y to specify the single numeric column.`,`donut 多于两列时必须用 y 指定唯一数值列。`))}else if(M.length>0)for(let e of M){let t=S.indexOf(e);t<0?k.push(r(`y column "${e}" does not exist.`,`y 列“${e}”不存在。`)):N.includes(t)||N.push(t)}else N=S.map((e,t)=>t).filter(e=>e!==j);if(k.length===0&&N.length===0&&k.push(r(`Chart requires at least one numeric series.`,`图表至少需要一个数值系列。`)),k.length>0)return(0,Z.jsx)(em,{className:`local-visual-chart local-visual-chart-${_}`,label:h,children:k.map((e,t)=>(0,Z.jsx)(tm,{message:e,kind:`alert`},`${e}-${t}`))});let ee=N.map(e=>S[e]||r(`Series ${e+1}`,`系列 ${e+1}`)),P=0,te=0,F=D.map(e=>{let t=e.cells[j],n=e.texts[j]||r(`Item ${e.index+1}`,`第 ${e.index+1} 项`),i=t&&t.numeric!==null?t.numeric:null,a=N.map(t=>{let n=e.cells[t];return!n||n.kind===`empty`||n.numeric===null?(P+=1,null):(_===`donut`&&n.numeric<0&&(te+=1),n.numeric)});return{index:e.index,label:n,xValue:i,values:a,cells:e.cells,keyValue:e.keyValue}});P>0&&O.push(r(`${P} values are empty or cannot be computed; gaps are kept in the chart.`,`${P} 个数值为空或无法计算,图表中保留空缺。`));for(let e of N)Xp(x,e)||O.push(r(`Column "${S[e]}" is not purely numeric; non-numeric values are treated as gaps.`,`列“${S[e]}”不是纯数值列,非数值按空缺处理。`));_===`donut`&&te>0&&O.push(r(`Donut values must be non-negative; ignored ${te} negative values.`,`环形图数值必须非负,已忽略 ${te} 个负值。`)),_===`scatter`&&!Xp(x,j)&&O.push(r(`scatter horizontal axis column "${S[j]}" requires numeric values.`,`scatter 的横轴列“${S[j]}”需要数值。`));let ne=e=>{u(null),o(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},re=e=>{u(null),c(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},ie=ee.map((e,t)=>({name:e,color:mp[t%mp.length]}));if(_===`donut`){let e=F.map(e=>e.values[0]),t=e.map(e=>e!==null&&e>=0?e:0),a=t.reduce((e,t,n)=>!i&&s.has(n)?e:e+t,0),o=F.map((n,r)=>({name:n.label,color:mp[r%mp.length],detail:e[r]===null?`—`:Ap(e[r]),disabled:t[r]<=0}));if(a<=0)return(0,Z.jsxs)(em,{className:`local-visual-chart local-visual-chart-donut`,label:h,children:[(0,Z.jsx)(tm,{message:r(`No share to display`,`暂无占比`)}),(0,Z.jsx)(nm,{notes:O}),(0,Z.jsx)(rm,{items:o,hidden:s,onToggle:re,label:r(`Legend`,`图例`),mode:n})]});let c=-Math.PI/2,f=[];F.forEach((e,n)=>{if(!i&&s.has(n))return;let r=t[n];if(r<=0)return;let o=r/a*Math.PI*2,l=c,u=c+o;c=u,f.push({key:`donut:${n}`,label:e.label,value:r,start:l,end:u,color:mp[n%mp.length],x:170,y:120,rowKey:e.keyValue})});let p=l?r(`${l.label}: ${Ap(l.value)}`,`${l.label}:${Ap(l.value)}`):r(`Focus a slice or legend to view values`,`聚焦扇区或图例查看数值`);return(0,Z.jsxs)(em,{className:`local-visual-chart local-visual-chart-donut${i?` local-static-chart`:``}`,label:h,children:[i?null:(0,Z.jsx)(`div`,{className:`local-visual-readout`,id:m,"aria-live":`polite`,children:p}),(0,Z.jsx)(`div`,{className:`local-visual-svg-wrap`,children:(0,Z.jsxs)(`svg`,{className:`local-visual-svg`,viewBox:`0 0 340 240`,role:`group`,"aria-label":r(`${h}, donut chart, ${F.length} items`,`${h},环形图,共 ${F.length} 项`),"aria-describedby":i?void 0:m,children:[(0,Z.jsxs)(`g`,{className:`local-visual-donut-center`,"aria-hidden":`true`,children:[(0,Z.jsx)(`text`,{x:170,y:118,textAnchor:`middle`,className:`local-visual-donut-total`,children:Ap(a)}),(0,Z.jsx)(`text`,{x:170,y:138,textAnchor:`middle`,className:`local-visual-donut-caption`,children:Lp(ee[0],14)})]}),f.map(e=>{let t=w&&e.rowKey!==``,n=t&&e.rowKey===T,a={key:e.key,series:ee[0],label:e.label,value:e.value,x:e.x,y:e.y,rowKey:e.rowKey,selectable:t,selected:n},o=i?{}:{"data-chart-mark":``,...t?{"data-chart-selectable":``}:{},tabIndex:0,role:t?`button`:`img`,...t?{"aria-pressed":n}:{},"aria-label":r(`${e.label}: ${Ap(e.value)}`,`${e.label}:${Ap(e.value)}`),onFocus:()=>u(a),onBlur:()=>u(null),onPointerEnter:()=>u(a),onPointerLeave:()=>u(null),onClick:t?()=>E(e.rowKey):void 0,onKeyDown:n=>{t&&Wp(n)?(n.preventDefault(),E(e.rowKey)):n.key===`ArrowRight`||n.key===`ArrowDown`?Up(n,`[data-chart-mark]`,1):(n.key===`ArrowLeft`||n.key===`ArrowUp`)&&Up(n,`[data-chart-mark]`,-1)}},s=`local-visual-donut-slice${n?` is-selected`:``}`;return e.end-e.start>=Math.PI*2-1e-6?(0,Z.jsx)(`circle`,{className:s,cx:170,cy:120,r:77,fill:`none`,style:{stroke:e.color},strokeWidth:30,...o,children:(0,Z.jsx)(`title`,{children:r(`${e.label}: ${Ap(e.value)}`,`${e.label}:${Ap(e.value)}`)})},e.key):(0,Z.jsx)(`path`,{className:s,d:om(170,120,92,62,e.start,e.end),style:{fill:e.color},...o,children:(0,Z.jsx)(`title`,{children:r(`${e.label}: ${Ap(e.value)}`,`${e.label}:${Ap(e.value)}`)})},e.key)})]})}),(0,Z.jsx)(rm,{items:o,hidden:s,onToggle:re,label:r(`Legend, toggle slices`,`图例,可开关扇区`),mode:n}),d?(0,Z.jsx)(tm,{message:d,kind:`alert`}):null,(0,Z.jsx)(nm,{notes:O})]})}let ae=ee.map((e,t)=>t).filter(e=>i||!a.has(e));if(ae.length===0)return(0,Z.jsxs)(em,{className:`local-visual-chart local-visual-chart-${_}`,label:h,children:[(0,Z.jsx)(tm,{message:r(`All series are hidden in the legend`,`所有系列已在图例中关闭`)}),(0,Z.jsx)(rm,{items:ie,hidden:a,onToggle:ne,label:r(`Legend, toggle series`,`图例,可开关系列`),mode:n})]});let oe=Xp(x,j),se=_===`scatter`?!0:_===`line`||_===`area`?oe:!1,ce=se?F.filter(e=>e.xValue!==null):F;se&&ce.length<F.length&&O.push(r(`${F.length-ce.length} rows have an empty or non-numeric horizontal axis and are not plotted.`,`${F.length-ce.length} 行横轴为空或不是数值,未参与绘制。`));let le=[];for(let e of ce)for(let t of ae){let n=e.values[t];n!==null&&le.push(n)}if(ce.length===0)return(0,Z.jsxs)(em,{className:`local-visual-chart local-visual-chart-${_}`,label:h,children:[(0,Z.jsx)(tm,{message:r(`No data rows to plot`,`没有可绘制的数据行`)}),(0,Z.jsx)(nm,{notes:O}),(0,Z.jsx)(rm,{items:ie,hidden:a,onToggle:ne,label:r(`Legend, toggle series`,`图例,可开关系列`),mode:n})]});if(le.length===0)return(0,Z.jsxs)(em,{className:`local-visual-chart local-visual-chart-${_}`,label:h,children:[(0,Z.jsx)(tm,{message:r(`No values to read`,`没有可读取的数值`)}),(0,Z.jsx)(nm,{notes:O}),(0,Z.jsx)(rm,{items:ie,hidden:a,onToggle:ne,label:r(`Legend, toggle series`,`图例,可开关系列`),mode:n})]});let ue=Vp(le,_===`bar`||_===`area`),de=Bp(ue.min,ue.max,5),fe=Hp(de,!!b),pe=506-fe,me=e=>16+(ue.max-e)/(ue.max-ue.min)*258,I=me(Math.max(ue.min,Math.min(ue.max,0))),L=se&&ce.length>0?Vp(ce.map(e=>e.xValue).filter(e=>e!==null),!1):null,he=pe/Math.max(1,F.length),ge=e=>fe+he*(e+.5),_e=e=>fe+(e-L.min)/(L.max-L.min)*pe,ve=(e,t)=>L?e.xValue===null?null:_e(e.xValue):ge(t),ye=[];if(L)ye.push(...Bp(L.min,L.max,5));else{let e=Math.max(1,Math.ceil(F.length/6));for(let t=0;t<F.length;t+=e)ye.push(t);let t=F.length-1;t>=0&&ye[ye.length-1]!==t&&(ye.length>1&&t-ye[ye.length-1]<e*.6?ye[ye.length-1]=t:ye.push(t))}let be=e=>L?fe+(e-L.min)/(L.max-L.min)*pe:ge(e),xe=i||!l?null:L?(0,Z.jsx)(`line`,{className:`local-visual-guide`,x1:Math.max(fe,Math.min(506,l.x)),x2:Math.max(fe,Math.min(506,l.x)),y1:16,y2:274}):null,Se=e=>i?{}:{"data-chart-mark":``,...e.selectable?{"data-chart-selectable":``}:{},tabIndex:0,role:e.selectable?`button`:`img`,...e.selectable?{"aria-pressed":e.selected}:{},"aria-label":r(`${e.series}, ${e.label}${e.selectable&&e.rowKey!==e.label?`, ${e.rowKey}`:``}: ${Ap(e.value)}`,`${e.series},${e.label}${e.selectable&&e.rowKey!==e.label?`,${e.rowKey}`:``}:${Ap(e.value)}`),onFocus:()=>u(e),onBlur:()=>u(null),onPointerEnter:()=>u(e),onPointerLeave:()=>u(null),onClick:e.selectable?()=>E(e.rowKey):void 0,onKeyDown:t=>{e.selectable&&Wp(t)?(t.preventDefault(),E(e.rowKey)):t.key===`ArrowRight`||t.key===`ArrowDown`?Up(t,`[data-chart-mark]`,1):(t.key===`ArrowLeft`||t.key===`ArrowUp`)&&Up(t,`[data-chart-mark]`,-1)}},Ce=(e,t,n,r,i)=>{let a=w&&t.keyValue!==``;return{key:`${e}:${t.index}`,series:ee[e],label:t.label,value:n,x:r,y:i,rowKey:t.keyValue,selectable:a,selected:a&&t.keyValue===T}},we=[];if(_===`bar`){let e=he*.76,t=Math.max(1,e/Math.max(1,ae.length));F.forEach((n,i)=>{ae.forEach((a,o)=>{let s=n.values[a];if(s===null)return;let c=fe+he*i+(he-e)/2+o*t,l=Math.max(1,Math.abs(me(s)-I)),u=s>=0?I-l:I,d=Math.max(1.5,t-1),f=Math.min(4,d/2,l/2),p=Ce(a,n,s,c+t/2,u+l/2);we.push((0,Z.jsx)(`rect`,{className:`local-visual-bar${p.selected?` is-selected`:``}`,x:c,y:u,width:d,height:l,rx:f,style:{fill:mp[a%mp.length]},...Se(p),children:(0,Z.jsx)(`title`,{children:r(`${p.series}, ${p.label}: ${Ap(p.value)}`,`${p.series},${p.label}:${Ap(p.value)}`)})},`bar-${a}-${n.index}`))})})}let Te=[],Ee=[],De=[];if(_===`line`||_===`area`)for(let e of ae){let t=[],n=[],i=()=>{n.length>0&&t.push(n),n=[]};F.forEach((t,r)=>{let a=t.values[e],o=ve(t,r);a===null||o===null?i():n.push({row:t,value:a,x:o,y:me(a)})}),i();for(let n of t){if(n.length>=2){let t=n.map((e,t)=>`${t===0?`M`:`L`} ${e.x} ${e.y}`).join(` `);if(Te.push((0,Z.jsx)(`path`,{className:`local-visual-line`,d:t,fill:`none`,style:{stroke:mp[e%mp.length]},strokeWidth:2.4,strokeLinejoin:`round`,strokeLinecap:`round`},`line-${e}-${n[0].row.index}`)),_===`area`){let t=I,r=n[0],i=n[n.length-1],a=`M ${r.x} ${t} ${n.map(e=>`L ${e.x} ${e.y}`).join(` `)} L ${i.x} ${t} Z`;Ee.push((0,Z.jsx)(`path`,{className:`local-visual-area`,d:a,style:{fill:mp[e%mp.length]}},`area-${e}-${r.row.index}`))}}for(let t of n){let n=Ce(e,t.row,t.value,t.x,t.y);De.push((0,Z.jsxs)(`g`,{className:`local-visual-point-group`,children:[(0,Z.jsx)(`circle`,{className:`local-visual-hit${n.selected?` is-selected`:``}`,cx:t.x,cy:t.y,r:12,fill:`transparent`,...Se(n),children:(0,Z.jsx)(`title`,{children:r(`${n.series}, ${n.label}: ${Ap(n.value)}`,`${n.series},${n.label}:${Ap(n.value)}`)})}),(0,Z.jsx)(`circle`,{className:`local-visual-point${n.selected?` is-selected`:``}`,cx:t.x,cy:t.y,r:4.5,style:{fill:mp[e%mp.length],stroke:`var(--surface)`},strokeWidth:1.5,pointerEvents:`none`})]},`point-${e}-${t.row.index}`))}}}_===`scatter`&&F.forEach((e,t)=>{let n=ve(e,t);n!==null&&ae.forEach(t=>{let i=e.values[t];if(i===null)return;let a=me(i),o=Ce(t,e,i,n,a);De.push((0,Z.jsxs)(`g`,{className:`local-visual-point-group`,children:[(0,Z.jsx)(`circle`,{className:`local-visual-hit${o.selected?` is-selected`:``}`,cx:n,cy:a,r:15,fill:`transparent`,...Se(o),children:(0,Z.jsx)(`title`,{children:r(`${o.series}, ${o.label}: ${Ap(o.value)}`,`${o.series},${o.label}:${Ap(o.value)}`)})}),(0,Z.jsx)(`circle`,{className:`local-visual-point${o.selected?` is-selected`:``}`,cx:n,cy:a,r:6,style:{fill:mp[t%mp.length],stroke:`var(--surface)`},strokeWidth:1.5,pointerEvents:`none`})]},`scatter-${t}-${e.index}`))})});let Oe=l?r(`${l.series} · ${l.label}: ${Ap(l.value)}`,`${l.series} · ${l.label}:${Ap(l.value)}`):r(`Focus or point at a mark; use arrow keys to change the readout`,`聚焦或指向图形,用方向键切换读数`),ke=r(`${h}, ${_} chart, ${F.length} items, ${ae.length} series`,`${h},${_} 图,共 ${F.length} 项,${ae.length} 个系列`);return(0,Z.jsxs)(em,{className:`local-visual-chart local-visual-chart-${_}${i?` local-static-chart`:``}`,label:h,children:[i?null:(0,Z.jsx)(`div`,{className:`local-visual-readout`,id:m,"aria-live":`polite`,children:Oe}),(0,Z.jsx)(`div`,{className:`local-visual-svg-wrap`,children:(0,Z.jsxs)(`svg`,{className:`local-visual-svg`,viewBox:`0 0 ${hp} ${gp}`,role:`group`,"aria-label":ke,"aria-describedby":i?void 0:m,children:[de.map(e=>(0,Z.jsxs)(`g`,{children:[(0,Z.jsx)(`line`,{className:`local-visual-grid-line`,x1:fe,x2:506,y1:me(e),y2:me(e)}),(0,Z.jsx)(`text`,{className:`local-visual-axis-label`,x:fe-6,y:me(e),textAnchor:`end`,dominantBaseline:`middle`,children:jp(e)})]},`y-${e}`)),ue.min<0&&ue.max>0?(0,Z.jsx)(`line`,{className:`local-visual-zero-line`,x1:fe,x2:506,y1:I,y2:I}):null,(0,Z.jsx)(`line`,{className:`local-visual-axis-line`,x1:fe,x2:506,y1:274,y2:274}),ye.map(e=>{let t=be(e),n=L?jp(e):Lp(F[e]?.label??``,8);return(0,Z.jsxs)(`g`,{children:[(0,Z.jsx)(`line`,{className:`local-visual-tick`,x1:t,x2:t,y1:274,y2:279}),(0,Z.jsxs)(`text`,{className:`local-visual-axis-label`,x:t,y:293,textAnchor:`middle`,children:[n,!L&&F[e]?(0,Z.jsx)(`title`,{children:F[e].label}):null]})]},`x-${e}`)}),v?(0,Z.jsx)(`text`,{className:`local-visual-axis-title`,x:(fe+506)/2,y:318,textAnchor:`middle`,children:v}):null,b?(0,Z.jsx)(`text`,{className:`local-visual-axis-title`,transform:`translate(12 145) rotate(-90)`,textAnchor:`middle`,children:b}):null,Ee,Te,xe,we,De]})}),(0,Z.jsx)(rm,{items:ie,hidden:a,onToggle:ne,label:r(`Legend, toggle series`,`图例,可开关系列`),mode:n}),d?(0,Z.jsx)(tm,{message:d,kind:`alert`}):null,(0,Z.jsx)(nm,{notes:O})]})}var cm=64,lm=new WeakMap,um=new WeakMap;function dm(e,t){let n=lm.get(e);return n&&n.revision===t||(n={revision:t,requestedPoints:new Map,evaluation:{steps:0,limit:k}},lm.set(e,n)),n}function fm(e){let t=um.get(e);return t||(t=new Map,um.set(e,t)),t}function pm(e,t,n){if(e.size>=cm){let t=e.keys().next().value;t!==void 0&&e.delete(t)}return e.set(t,n),n}function mm(e,t,n){return e.map(e=>{let r=/^y\s*=\s*([\s\S]+)$/.exec((e.value??``).trim());if(!r)return`\u0003${n}`;try{let e=Mn(r[1].trim());return JSON.stringify(e.dependencies.map(e=>t[e]??null))}catch{return`\u0003${n}`}}).join(``)}function hm(e,t,n,r,i,a,o,s,c,l=lp){let u=fm(s),d=u.get(t);if(d)return d;let f=dm(s,c),p=e=>pm(u,t,{ok:!1,message:e});if(n.length>16)return p(l(`plot supports at most 16 curves, but has ${n.length}.`,`plot 最多支持 16 条曲线,当前为 ${n.length} 条。`));let m=n.length*o;f.requestedPoints.set(e,m);let h=0;for(let e of f.requestedPoints.values())h+=e;if(h>2e4)return p(l(`The document's plot sample count exceeds the limit: ${h} requested, at most ${O} allowed. Reduce curves or samples.`,`整篇文档的绘图采样点超过上限:已请求 ${h} 个,最多 ${O} 个。请减少曲线或采样数。`));let g=[],_={message:null},v=n.map((e,t)=>{let n=(e.value??``).trim(),s=/^y\s*=\s*([\s\S]+)$/.exec(n);if(!s)return g.push(l(`Curve ${t+1}: cannot compute (each formula block must be written as y = expression).`,`曲线 ${t+1}:无法计算(每块公式需写成 y = 表达式)。`)),{source:n,expression:null,points:[],endpoint:null,error:`formula`};try{let e=Mn(s[1].trim()),t=In(e,r,i,a,o,f.evaluation);return{source:n,expression:e,points:t.points,endpoint:t.endpoint,error:null}}catch(e){return e instanceof B&&e.code===`latex-budget`?(_.message=e.message,{source:n,expression:null,points:[],endpoint:null,error:e.message}):(g.push(l(`Curve ${t+1}: cannot compute (${Mp(e)}).`,`曲线 ${t+1}:无法计算(${Mp(e)})。`)),{source:n,expression:null,points:[],endpoint:null,error:Mp(e)})}});return _.message===null?pm(u,t,{ok:!0,curves:v,notes:g}):p(l(`Plot computation exceeded the shared execution budget: ${_.message}`,`绘图计算超过共享执行预算:${_.message}`))}function gm(e){if(e.length===0)return 0;let t=[...e].sort((e,t)=>e-t),n=Math.floor(t.length/2);return t.length%2==0?(t[n-1]+t[n])/2:t[n]}function _m(e,t,n,r){let i=[],a=[],o=(e,i)=>{let a=Math.abs(i.y-e.y),o=e.y*i.y<0&&Math.min(Math.abs(e.y),Math.abs(i.y))>Math.max(1,n*8),s=a>t*.8&&a>Math.max(r,1e-9)*10;return o||s};for(let t of e){if(t.y===null){a.length>0&&i.push(a),a=[];continue}let e={x:t.x,y:t.y},n=a[a.length-1];n&&o(n,e)&&(i.push(a),a=[]),a.push(e)}return a.length>0&&i.push(a),i}function vm({node:e,runtime:t,mode:n}){let r=Q(),i=fp(),a=n===`static`,[o,s]=(0,y.useState)(null),c=t.resetToken(e);(0,y.useEffect)(()=>{s(null)},[c]);let l=(0,y.useId)(),u=Np(t,e.attrs,`label`,``)||r(`Function plot`,`函数图`),d=Np(t,e.attrs,`x-label`,`x`),f=Np(t,e.attrs,`y-label`,`y`),p=Pp(t,e.attrs,`min`,-10),m=Pp(t,e.attrs,`max`,10),h=Math.min(2e3,Math.max(2,Ip(t,e.attrs,`samples`,200))),g=(e.children??[]).filter(e=>e.type===`math`||e.type===`inlineMath`),_=(()=>{try{return{...t.snapshot().state}}catch{return{}}})(),v=0;try{v=t.snapshot().revision}catch{v=0}let b=g.map(e=>`${e.id}\u0000${e.value??``}`).join(``),x=`${e.id}\u0000${p}\u0000${m}\u0000${h}\u0000${i}\u0000${b}`,S=mm(g,_,v),C=`${x}\u0002${S}`,w=(0,y.useMemo)(()=>g.length===0||p===null||m===null||!(m>p)?{ok:!0,curves:[],notes:[]}:hm(e.id,C,g,_,p,m,h,t,v,r),[x,S,e.id,t,r]);if(g.length===0)return(0,Z.jsx)(em,{className:`local-visual-plot`,label:u,children:(0,Z.jsx)(tm,{message:r(`plot body requires one or more $$ formula blocks.`,`plot 正文需要一个或多个 $$ 公式块。`),kind:`alert`})});if(p===null||m===null||!(m>p))return(0,Z.jsx)(em,{className:`local-visual-plot`,label:u,children:(0,Z.jsx)(tm,{message:r(`plot min must be less than max.`,`plot 的 min 必须小于 max。`),kind:`alert`})});if(!w.ok)return(0,Z.jsx)(em,{className:`local-visual-plot`,label:u,children:(0,Z.jsx)(tm,{message:w.message,kind:`alert`})});let{curves:T,notes:E}=w,D=T.flatMap(e=>e.points.filter(e=>e.y!==null&&Number.isFinite(e.y))),O=(0,Z.jsx)(`div`,{className:`local-visual-plot-legend`,role:`list`,"aria-label":r(`Curve legend`,`曲线图例`),children:T.map((e,t)=>(0,Z.jsxs)(`div`,{className:`local-visual-plot-legend-item`,role:`listitem`,children:[(0,Z.jsx)(`span`,{className:`local-visual-swatch`,style:{backgroundColor:mp[t%mp.length]},"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`local-visual-plot-legend-text`,children:(0,Z.jsx)(`span`,{className:`local-visual-plot-formula`,children:(0,Z.jsx)(sp,{source:e.source})})})]},`curve-legend-${t}`))});if(D.length===0)return(0,Z.jsxs)(em,{className:`local-visual-plot`,label:u,children:[(0,Z.jsx)(tm,{message:r(`No plottable values in the current range`,`当前范围内没有可绘制的值`)}),(0,Z.jsx)(nm,{notes:E}),O]});let A=Vp(D.map(e=>e.y),!1),j=Bp(A.min,A.max,5),M=Bp(p,m,5),N=Hp(j,!!f),ee=506-N,P=e=>N+(e-p)/(m-p)*ee,te=e=>16+(A.max-e)/(A.max-A.min)*258,F=gm(D.map(e=>Math.abs(e.y))),ne=[];for(let e of T)for(let t=1;t<e.points.length;t+=1){let n=e.points[t-1],r=e.points[t];n.y!==null&&r.y!==null&&ne.push(Math.abs(r.y-n.y))}let re=gm(ne),ie=A.max-A.min,ae=T.map(e=>_m(e.points,ie,F,re)),oe={steps:0,limit:k},se=(e,t)=>{if(!e.expression)return null;try{let n=e.expression.evaluate(t,_,oe);return typeof n==`number`&&Number.isFinite(n)?n:null}catch{return null}},ce=e=>Math.max(p,Math.min(m,e)),le=(m-p)/100,ue=e=>{let t=e.currentTarget.getBoundingClientRect();if(t.width===0)return;let n=Math.max(0,Math.min(1,(e.clientX-t.left)/t.width));s(p+n*(m-p))},de=e=>{let t=e.shiftKey?10:1,n=o;if(e.key===`ArrowRight`)n=(o??(p+m)/2)+le*t;else if(e.key===`ArrowLeft`)n=(o??(p+m)/2)-le*t;else if(e.key===`Home`)n=p;else if(e.key===`End`)n=m;else return;e.preventDefault(),s(ce(n))},fe=a||o===null?null:ce(o),pe=fe===null?r(`Range [${Ap(p)}, ${Ap(m)}] · ${h} samples; use arrow keys or pointer to read values`,`区间 [${Ap(p)}, ${Ap(m)}] · ${h} 个采样点;用方向键或指针读取数值`):`${r(`x = ${Ap(fe)}; `,`x = ${Ap(fe)};`)}${T.map((e,t)=>{let n=se(e,fe),i=e.error?r(`cannot compute`,`无法计算`):n===null?r(`undefined`,`无定义`):Ap(n);return r(`Curve ${t+1}: `,`曲线 ${t+1}:`)+i}).join(r(`; `,`;`))}`,me=fe===null?null:T.map((e,t)=>{let n=se(e,fe);return n===null||!e.expression?null:(0,Z.jsx)(`circle`,{className:`local-visual-active-point`,cx:P(fe),cy:te(n),r:4.5,style:{fill:mp[t%mp.length],stroke:`var(--surface)`},strokeWidth:1.5},`active-${t}`)});return(0,Z.jsxs)(em,{className:`local-visual-plot`,label:u,children:[a?null:(0,Z.jsx)(`div`,{className:`local-visual-readout`,id:l,"aria-live":`polite`,children:pe}),(0,Z.jsx)(`div`,{className:`local-visual-svg-wrap`,children:(0,Z.jsxs)(`svg`,{className:`local-visual-svg`,viewBox:`0 0 ${_p} ${vp}`,role:`group`,"aria-label":r(`${u}, range ${Ap(p)} to ${Ap(m)}, ${h} samples`,`${u},区间 ${Ap(p)} 到 ${Ap(m)},${h} 个采样点`),"aria-describedby":a?void 0:l,tabIndex:a?void 0:0,onPointerMove:a?void 0:ue,onPointerLeave:a?void 0:()=>s(null),onFocus:a?void 0:()=>s(e=>e??(p+m)/2),onBlur:a?void 0:()=>s(null),onKeyDown:a?void 0:de,children:[j.map(e=>(0,Z.jsxs)(`g`,{children:[(0,Z.jsx)(`line`,{className:`local-visual-grid-line`,x1:N,x2:506,y1:te(e),y2:te(e)}),(0,Z.jsx)(`text`,{className:`local-visual-axis-label`,x:N-6,y:te(e),textAnchor:`end`,dominantBaseline:`middle`,children:jp(e)})]},`y-${e}`)),A.min<0&&A.max>0?(0,Z.jsx)(`line`,{className:`local-visual-zero-line`,x1:N,x2:506,y1:te(0),y2:te(0)}):null,(0,Z.jsx)(`line`,{className:`local-visual-axis-line`,x1:N,x2:506,y1:274,y2:274}),M.map(e=>(0,Z.jsxs)(`g`,{children:[(0,Z.jsx)(`line`,{className:`local-visual-tick`,x1:P(e),x2:P(e),y1:274,y2:279}),(0,Z.jsx)(`text`,{className:`local-visual-axis-label`,x:P(e),y:293,textAnchor:`middle`,children:jp(e)})]},`x-${e}`)),d?(0,Z.jsx)(`text`,{className:`local-visual-axis-title`,x:(N+506)/2,y:318,textAnchor:`middle`,children:d}):null,f?(0,Z.jsx)(`text`,{className:`local-visual-axis-title`,transform:`translate(12 145) rotate(-90)`,textAnchor:`middle`,children:f}):null,ae.map((e,t)=>e.map((e,n)=>{if(e.length<2)return null;let r=e.map((e,t)=>`${t===0?`M`:`L`} ${P(e.x)} ${te(e.y)}`).join(` `);return(0,Z.jsx)(`path`,{className:`local-visual-plot-line`,d:r,fill:`none`,style:{stroke:mp[t%mp.length]},strokeWidth:2.4,strokeLinejoin:`round`,strokeLinecap:`round`},`curve-${t}-${n}`)})),fe===null?null:(0,Z.jsx)(`line`,{className:`local-visual-guide`,x1:P(fe),x2:P(fe),y1:16,y2:274}),me]})}),(0,Z.jsx)(nm,{notes:E}),O]})}var ym={title:`Task`,start:`Start`,duration:`Duration`,notes:`Notes`},bm={title:`事项`,start:`开始`,duration:`时长`,notes:`说明`};function xm(e){let t=t=>e.includes(t.title)&&e.includes(t.start)&&e.includes(t.duration);return t(ym)?ym:t(bm)?bm:null}function Sm({node:e,runtime:t,render:n,mode:r}){let i=Q(),a=r!==`static`,[o,s]=(0,y.useState)(null),c=t.resetToken(e);(0,y.useEffect)(()=>{s(null)},[c]);let l=Np(t,e.attrs,`title`,``)||i(`Timeline`,`时间轴`),u=Np(t,e.attrs,`unit`,i(`minutes`,`分钟`)),d=Yp(e,t,i);if(!d)return(0,Z.jsx)(em,{className:`local-visual-timeline`,label:l,children:(0,Z.jsx)(tm,{message:i(`timeline body requires a Markdown table.`,`timeline 正文需要一个 Markdown 表格。`),kind:`alert`})});let f=d.headerText.map(e=>e.trim()),p=xm(f),m=p?f.indexOf(p.title):-1,h=p?f.indexOf(p.start):-1,g=p?f.indexOf(p.duration):-1,_=p?f.indexOf(p.notes):-1;if(!p||m<0||h<0||g<0)return(0,Z.jsx)(em,{className:`local-visual-timeline`,label:l,children:(0,Z.jsx)(tm,{message:i(`timeline table requires the "Task", "Start" and "Duration" columns.`,`timeline 表格需要“事项”“开始”“时长”三列,或“Task”“Start”“Duration”三列。`),kind:`alert`})});let v=[],b=[],x=[];if(d.rows.forEach((e,t)=>{let n=e.cells[h],r=e.cells[g],a=n?.numeric??null,o=r?.numeric??null;if(a===null||o===null||a<0||o<0){b.push(t+1);return}let s=Jp(e.cells[m],i)||i(`Task ${t+1}`,`事项 ${t+1}`);x.push({key:`item-${e.index}`,title:s,start:a,duration:o,description:_>=0?e.cells[_]?.children??[]:[],sourceIndex:t})}),b.length>0&&v.push(i(`Rows ${b.join(`, `)} have an invalid start or duration (must be non-negative numbers) and are hidden.`,`第 ${b.join(`、`)} 行的开始或时长不是非负数字,未显示。`)),x.length===0)return(0,Z.jsxs)(em,{className:`local-visual-timeline`,label:l,children:[(0,Z.jsx)(tm,{message:i(`No valid timeline items.`,`没有有效的时间轴事项。`)}),(0,Z.jsx)(nm,{notes:v})]});let S=[...x].sort((e,t)=>e.start-t.start||e.sourceIndex-t.sourceIndex),C=S.reduce((e,t)=>Math.max(e,t.start+t.duration),0),w=Math.max(1,C),T=Bp(0,w,5);(T.length===0||T[0]!==0)&&T.unshift(0),T[T.length-1]<w&&T.push(w);let E=u?` ${u}`:``,D=e=>`${Ap(e)}${E}`,O=S.find(e=>e.key===o)??null;return(0,Z.jsxs)(em,{className:`local-visual-timeline${a?``:` local-static-timeline`}`,label:l,children:[(0,Z.jsx)(`div`,{className:`local-visual-timeline-axis`,"aria-hidden":`true`,children:T.map((e,t)=>{let n=e/w*100,r=t===T.length-1?{left:`${n}%`,transform:`translateX(-100%)`}:t===0?{left:`0%`}:{left:`${n}%`,transform:`translateX(-50%)`};return(0,Z.jsx)(`span`,{className:`local-visual-timeline-tick`,style:r,children:jp(e)},`tick-${e}`)})}),(0,Z.jsx)(`ol`,{className:`local-visual-timeline-list`,children:S.map(e=>{let t=e.start+e.duration,r=e.start/w*100,c=e.duration/w*100,l=S.indexOf(e);return(0,Z.jsxs)(`li`,{className:`local-visual-timeline-item${a&&o===e.key?` is-active`:``}${a?``:` local-static-timeline-item`}`,tabIndex:a?0:void 0,"aria-label":a?i(`${e.title}, started ${D(e.start)}, ended ${D(t)}, duration ${D(e.duration)}${e.description.length>0?`, with notes`:``}`,`${e.title},开始 ${D(e.start)},结束 ${D(t)},时长 ${D(e.duration)}${e.description.length>0?`,有说明`:``}`):void 0,onFocus:a?()=>s(e.key):void 0,onBlur:a?()=>s(t=>t===e.key?null:t):void 0,onPointerEnter:a?()=>s(e.key):void 0,onPointerLeave:a?()=>s(t=>t===e.key?null:t):void 0,onKeyDown:a?e=>{e.key===`Escape`&&(e.preventDefault(),s(null))}:void 0,children:[(0,Z.jsxs)(`div`,{className:`local-visual-timeline-head`,children:[(0,Z.jsxs)(`span`,{className:`local-visual-timeline-title`,children:[(0,Z.jsx)(`span`,{className:`local-visual-swatch`,style:{backgroundColor:mp[l%mp.length]},"aria-hidden":`true`}),e.title]}),(0,Z.jsxs)(`span`,{className:`local-visual-timeline-times`,children:[i(`Started`,`开始`),` `,D(e.start),` · `,i(`Ended`,`结束`),` `,D(t),` · `,i(`Duration`,`时长`),` `,D(e.duration)]})]}),(0,Z.jsx)(`div`,{className:`local-visual-timeline-track`,"aria-hidden":`true`,children:(0,Z.jsx)(`span`,{className:`local-visual-timeline-bar${e.duration===0?` is-zero`:``}`,style:{left:`${r}%`,width:`${c}%`,backgroundColor:mp[l%mp.length]}})}),a||e.description.length===0?null:(0,Z.jsx)(`div`,{className:`local-visual-timeline-detail local-static-timeline-detail`,children:n(e.description)})]},e.key)})}),a?(0,Z.jsx)(`div`,{className:`local-visual-timeline-detail`,"aria-live":`polite`,children:O?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`strong`,{children:O.title}),O.description.length>0?n(O.description):(0,Z.jsx)(`span`,{children:i(`No notes.`,`没有说明。`)})]}):(0,Z.jsx)(`span`,{children:i(`Focus or point at an item to view its notes.`,`聚焦或指向事项查看说明。`)})}):null,(0,Z.jsx)(nm,{notes:v})]})}var Cm=/[\u1100-\u115f\u2e80-\u303f\u3040-\u33ff\u3400-\u4dbf\u4e00-\u9fff\uac00-\ud7af\uf900-\ufaff\ufe30-\ufe4f\uff00-\uff60\uffe0-\uffe6]/u;function wm(e){let t=0;for(let n of e)Cm.test(n)?t+=1:/\s/u.test(n)?t+=.3:t+=.58;return t*Cp}function Tm(e,t){if(wm(e)<=t)return e;let n=``;for(let r of e){if(wm(`${n}${r}…`)>t)break;n+=r}return`${n.trimEnd()}…`}function Em(e){let t=[],n=``;for(let r of e)n&&wm(n+r)>Tp?(t.push(n),n=r):n+=r;if(n&&t.push(n),t.length<=Ep)return t;let r=t.slice(0,Ep);return r[1]=Tm(t.slice(1).join(``),Tp),r}function Dm(e){let t=Em(e);return{width:t.reduce((e,t)=>Math.max(e,wm(t)),0)+10,height:t.length*Dp+6,lines:t}}function Om(e){let t=new Map;for(let n of e){let e=`${n.from}\u0000${n.to}`;t.set(e,(t.get(e)??0)+1)}let n=new Map,r=new Map;for(let i of e){let e=`${i.from}\u0000${i.to}`,a=t.get(e)??1,o=n.get(e)??0;n.set(e,o+1),r.set(i.key,(o-(a-1)/2)*12)}return r}function km(e,t,n){let{width:r,height:i,positions:a}=e,o=Om(t),s=1/0,c=1/0,l=-1/0,u=-1/0;for(let e of t){if(!e.label)continue;let t=a.get(e.from),r=a.get(e.to);if(!t||!r)continue;let i=jm(n,t,r,o.get(e.key)??0,e.from===e.to),d=Dm(e.label);s=Math.min(s,i.labelX-d.width/2),c=Math.min(c,i.labelY-d.height/2),l=Math.max(l,i.labelX+d.width/2),u=Math.max(u,i.labelY+d.height/2)}if(!Number.isFinite(s))return e;let d=Math.max(0,wp-s),f=Math.max(0,wp-c),p=Math.max(0,l+wp-r),m=Math.max(0,u+wp-i);if(d===0&&f===0&&p===0&&m===0)return e;for(let e of a.values())e.x+=d,e.y+=f;return{width:r+d+p,height:i+f+m,positions:a}}function Am(e,t,n){let r=e.map(e=>e.id),i=new Map(r.map((e,t)=>[e,t])),a=new Set(r),o=new Map(r.map(e=>[e,[]]));for(let e of t)e.from!==e.to&&a.has(e.from)&&a.has(e.to)&&o.get(e.from).push(e.to);let s=new Map,c=new Map,l=new Set,u=[],d=[],f=0,p=e=>{s.set(e,f),c.set(e,f),f+=1,u.push(e),l.add(e);for(let t of o.get(e)??[])s.has(t)?l.has(t)&&c.set(e,Math.min(c.get(e),s.get(t))):(p(t),c.set(e,Math.min(c.get(e),c.get(t))));if(c.get(e)===s.get(e)){let t=[],n;do n=u.pop(),l.delete(n),t.push(n);while(n!==e);d.push(t.reverse())}};for(let e of r)s.has(e)||p(e);let m=new Map;d.forEach((e,t)=>{for(let n of e)m.set(n,t)});let h=d.map(()=>new Set),g=d.map(()=>0);for(let e of t){if(!a.has(e.from)||!a.has(e.to))continue;let t=m.get(e.from),n=m.get(e.to);t===n||h[t].has(n)||(h[t].add(n),g[n]+=1)}let _=d.map((e,t)=>({index:t,order:Math.min(...e.map(e=>i.get(e)??0))})),v=_.filter(e=>g[e.index]===0).map(e=>e.index).sort((e,t)=>_[e].order-_[t].order),y=d.map(()=>0);for(;v.length>0;){let e=v.shift();for(let t of h[e])y[t]=Math.max(y[t],y[e]+1),--g[t],g[t]===0&&v.push(t)}let b=Math.max(1,...y)+1,x=Array.from({length:b},()=>[]);for(let e of r)x[y[m.get(e)]].push(e);let S=x.filter(e=>e.length>0),C=Math.max(1,...S.map(e=>e.length)),w=new Map,T,E;if(n===`down`)T=yp,E=Math.max(240,106+(S.length-1)*120),S.forEach((e,t)=>{let n=53+t*120;e.forEach((t,r)=>{let i=e.length===1?T/2:104+r*((T-88-bp)/(e.length-1));w.set(t,{x:i,y:n})})});else{let e=t.reduce((e,t)=>t.label?Math.max(e,Dm(t.label).width):e,0),n=Math.max(Sp,bp+(e>0?e+24:0));T=Math.max(yp,208+(S.length-1)*n),E=Math.max(240,106+(C-1)*74),S.forEach((e,t)=>{let n=S.length===1?T/2:104+t*((T-88-bp)/(S.length-1));e.forEach((t,r)=>{let i=e.length===1?E/2:53+r*((E-60-xp)/(e.length-1));w.set(t,{x:n,y:i})})})}return km({width:T,height:E,positions:w},t,n)}function jm(e,t,n,r,i){let a=bp,o=xp;if(i)return e===`right`?{d:`M ${t.x+20} ${t.y-o/2} C ${t.x+64} ${t.y-o/2-64}, ${t.x-64} ${t.y-o/2-64}, ${t.x-20} ${t.y-o/2}`,labelX:t.x,labelY:t.y-o/2-46}:{d:`M ${t.x+a/2} ${t.y-10} C ${t.x+a/2+64} ${t.y-54}, ${t.x+a/2+64} ${t.y+54}, ${t.x+a/2} ${t.y+10}`,labelX:t.x+a/2+44,labelY:t.y};if(e===`right`){if(n.x>t.x){let e=t.x+a/2,i=t.y+r,o=n.x-a/2,s=n.y+r;return{d:`M ${e} ${i} L ${o} ${s}`,labelX:(e+o)/2,labelY:(i+s)/2-12}}let e=t.x+r,i=n.x+r,s=t.y+o/2,c=n.y-o/2,l=Math.max(70,Math.abs(i-e)*.45);return{d:`M ${e} ${s} C ${e+l} ${s+86}, ${i-l} ${c+86}, ${i} ${c}`,labelX:(e+i)/2,labelY:Math.max(s,c)+48}}if(n.y>t.y){let e=t.x+r,i=n.x+r,a=t.y+o/2,s=n.y-o/2;return{d:`M ${e} ${a} L ${i} ${s}`,labelX:(e+i)/2+10,labelY:(a+s)/2}}let s=t.x+a/2,c=n.x-a/2,l=t.y+r,u=n.y+r,d=Math.max(70,Math.abs(u-l)*.45);return{d:`M ${s} ${l} C ${s+86} ${l+d}, ${c+86} ${u-d}, ${c} ${u}`,labelX:Math.max(s,c)+48,labelY:(l+u)/2}}function Mm({node:e,runtime:t,render:n,mode:r}){let i=Q(),a=r!==`static`,[o,s]=(0,y.useState)(null),[c,l]=(0,y.useState)(null),u=t.resetToken(e);(0,y.useEffect)(()=>{s(null),l(null)},[u]);let d=(0,y.useId)().replace(/[^a-zA-Z0-9_-]/g,``),f=`local-diagram-arrow-${d}`,p=`local-diagram-description-${d}`,m=Np(t,e.attrs,`label`,``)||i(`Diagram`,`图解`),h=(e.attrs?.direction??`right`).trim().toLowerCase()===`down`?`down`:`right`,g=e.children?.filter(e=>e.type===`component`)??[],_=[],v=[],b=new Set;for(let e of g){if(e.name!==`node`)continue;let n=(e.attrs?.id??``).trim();if(!n){_.push(i(`Ignored a node without an id.`,`已忽略缺少 id 的节点。`));continue}if(b.has(n)){_.push(i(`Duplicate node id ${n}; ignored the later node.`,`节点 id 重复(${n}),已忽略后一个节点。`));continue}b.add(n);let r=Np(t,e.attrs,`tone`,`neutral`).trim(),a=r===`success`||r===`warning`?r:`neutral`;v.push({id:n,label:Np(t,e.attrs,`label`,n)||n,tone:a,children:e.children??[]})}let x=[],S=new Set;for(let e of g){if(e.name!==`edge`)continue;let n=(e.attrs?.from??``).trim(),r=(e.attrs?.to??``).trim();if(!n||!r||!b.has(n)||!b.has(r)){_.push(i(`Edge ${n||`?`} → ${r||`?`} references a missing endpoint; ignored.`,`连线 ${n||`?`} → ${r||`?`} 缺少端点,已忽略。`));continue}let a=Np(t,e.attrs,`label`,``),o=`${n}\u0000${r}\u0000${a}`;S.has(o)?_.push(i(`Duplicate edge: ${n} → ${r}${a?` (${a})`:``}; ignored.`,`重复连线:${n} → ${r}${a?`(${a})`:``},已忽略。`)):(S.add(o),x.push({key:o,from:n,to:r,label:a}))}if(v.length===0)return(0,Z.jsxs)(em,{className:`local-visual-diagram`,label:m,children:[(0,Z.jsx)(tm,{message:`diagram requires at least one node.`,kind:`alert`}),(0,Z.jsx)(nm,{notes:_})]});let C=null;try{let n=t.get(e);typeof n==`string`&&(C=n)}catch{C=null}let w=new Set(v.map(e=>e.id)),T=(e.attrs?.initial??``).trim(),E=T&&w.has(T)?T:v[0].id,D=C&&w.has(C)?C:o&&w.has(o)?o:E,O=v.find(e=>e.id===D)??v[0],k=C&&w.has(C)?C:T&&w.has(T)?T:null,A=n=>{s(n),l(null);try{let r=t.set(e,n);r.length>0&&l(r.map(e=>i(tt(e,`en`),tt(e,`zh`))).join(`; `))}catch(e){l(Mp(e))}},j=Am(v,x,h),M=Om(x),N=[],ee=[];for(let e of x){let t=j.positions.get(e.from),n=j.positions.get(e.to);if(!t||!n)continue;let r=jm(h,t,n,M.get(e.key)??0,e.from===e.to);if(N.push((0,Z.jsx)(`g`,{className:`local-visual-edge`,children:(0,Z.jsx)(`path`,{d:r.d,fill:`none`,style:{stroke:`var(--ink-muted)`},strokeWidth:1.6,markerEnd:`url(#${f})`})},`edge-${e.key}`)),!e.label)continue;let i=Dm(e.label);ee.push((0,Z.jsx)(`g`,{className:`local-visual-edge-label-group`,children:(0,Z.jsx)(`text`,{className:`local-visual-edge-label`,x:r.labelX,y:r.labelY,textAnchor:`middle`,dominantBaseline:`middle`,children:i.lines.map((e,t)=>(0,Z.jsx)(`tspan`,{x:r.labelX,y:r.labelY+(t-(i.lines.length-1)/2)*Dp,children:e},t))})},`edge-label-${e.key}`))}return(0,Z.jsxs)(em,{className:`local-visual-diagram${a?``:` local-static-diagram`}`,label:m,children:[(0,Z.jsx)(`div`,{className:`local-visual-svg-wrap`,children:(0,Z.jsxs)(`svg`,{className:`local-visual-svg local-visual-diagram-svg`,viewBox:`0 0 ${j.width} ${j.height}`,role:`group`,"aria-label":a?`${m}, with ${v.length} nodes and ${x.length} edges; press Tab to focus a node and Enter to select`:i(`${m}, with ${v.length} nodes and ${x.length} edges`,`${m},共 ${v.length} 个节点、${x.length} 条连线`),"aria-describedby":p,children:[(0,Z.jsx)(`defs`,{children:(0,Z.jsx)(`marker`,{id:f,viewBox:`0 0 10 10`,refX:`9`,refY:`5`,markerWidth:`7`,markerHeight:`7`,orient:`auto-start-reverse`,children:(0,Z.jsx)(`path`,{d:`M 0 0 L 10 5 L 0 10 z`,style:{fill:`var(--ink-muted)`}})})}),N,v.map(e=>{let t=j.positions.get(e.id);if(!t)return null;let n=a?e.id===D:k!==null&&e.id===k,r=Rp(e.label,8,2);return(0,Z.jsxs)(`g`,{className:`local-visual-node local-visual-node-${e.tone}${n?` is-selected`:``}`,"data-diagram-node":a?``:void 0,transform:`translate(${t.x} ${t.y})`,role:a?`button`:void 0,tabIndex:a?0:void 0,"aria-pressed":a?n:void 0,"aria-label":a?e.label:void 0,onClick:a?()=>A(e.id):void 0,onKeyDown:a?t=>{Wp(t)?(t.preventDefault(),A(e.id)):t.key===`ArrowRight`||t.key===`ArrowDown`?Up(t,`[data-diagram-node]`,1):(t.key===`ArrowLeft`||t.key===`ArrowUp`)&&Up(t,`[data-diagram-node]`,-1)}:void 0,children:[(0,Z.jsx)(`title`,{children:e.label}),(0,Z.jsx)(`rect`,{className:`local-visual-node-shape`,x:-60,y:-23,width:bp,height:xp,rx:10}),(0,Z.jsx)(`text`,{className:`local-visual-node-text`,textAnchor:`middle`,children:r.map((e,t)=>(0,Z.jsx)(`tspan`,{x:0,y:(t-(r.length-1)/2)*16+4,children:e},t))})]},`node-${e.id}`)}),ee]})}),a?(0,Z.jsx)(`div`,{className:`local-visual-diagram-detail`,"aria-live":`polite`,children:O?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`strong`,{children:O.label}),O.children.length>0?n(O.children):(0,Z.jsx)(`span`,{children:i(`This node has no description.`,`此节点没有说明。`)})]}):(0,Z.jsx)(`span`,{children:i(`Click a node, or focus it with Tab and press Enter, to view its description.`,`点击节点,或用 Tab 聚焦后按 Enter 查看说明。`)})}):(0,Z.jsx)(`div`,{className:`local-visual-diagram-detail local-static-diagram-detail`,children:(0,Z.jsx)(`dl`,{className:`local-static-diagram-nodes`,children:v.map(e=>(0,Z.jsxs)(`div`,{className:`local-static-diagram-node`,children:[(0,Z.jsx)(`dt`,{children:e.label}),(0,Z.jsx)(`dd`,{children:e.children.length>0?n(e.children):(0,Z.jsx)(`span`,{children:i(`This node has no description.`,`此节点没有说明。`)})})]},`static-node-${e.id}`))})}),(0,Z.jsxs)(`ul`,{id:p,className:`local-visual-sr-only`,"aria-label":i(`Nodes and edges`,`节点与连线`),children:[v.map(e=>(0,Z.jsx)(`li`,{children:e.label},`description-node-${e.id}`)),x.map(e=>{let t=v.find(t=>t.id===e.from),n=v.find(t=>t.id===e.to);return(0,Z.jsxs)(`li`,{children:[t?.label??e.from,` → `,n?.label??e.to,e.label?` (${e.label})`:``]},`description-edge-${e.key}`)})]}),c?(0,Z.jsx)(tm,{message:c,kind:`alert`}):null,(0,Z.jsx)(nm,{notes:_})]})}function Nm(e){let t={...e,mode:e.mode??`interactive`};switch(t.node.name){case`table`:return(0,Z.jsx)(im,{...t});case`chart`:return(0,Z.jsx)(sm,{...t});case`plot`:return(0,Z.jsx)(vm,{...t});case`timeline`:return(0,Z.jsx)(Sm,{...t});case`diagram`:return(0,Z.jsx)(Mm,{...t});default:return null}}var Pm=class extends Error{failure;constructor(e){super(e),this.name=`DataTableFailureError`,this.failure=e}};function Fm(e){return e===null?``:typeof e==`string`?e:typeof e==`number`?Number.isFinite(e)?String(e):null:typeof e==`boolean`?e?`true`:`false`:null}function Im(e){return typeof e==`string`?e===``?null:`s:${e}`:typeof e==`number`&&Number.isFinite(e)?`n:${e===0?0:e}`:null}function Lm(e,t,n){let r={...n};for(let i of t)Object.hasOwn(n,i)||Object.defineProperty(r,i,{enumerable:!0,configurable:!0,get(){return e.evaluate(i)}});return r}function Rm(e){if(e.length===0)return null;let t=typeof e[0];if(t!==`string`&&t!==`number`)return`rows`;for(let n of e)if(typeof n!==t||typeof n==`number`&&!Number.isFinite(n))return`rows`;return null}function zm(e,t){let n;try{n=Yt(t)}catch{throw new Pm(`rows`)}let r;try{r=n.evaluate(Lm(e,n.dependencies,{}))}catch{throw new Pm(`rows`)}if(!Array.isArray(r))throw new Pm(`rows`);let i=Rm(r);if(i)throw new Pm(i);return r}function Bm(e){let{rows:t,columns:n,keyExpression:r,runtime:i}=e,a=e.maxRows??100,o=e.budget??1e5;if(!Number.isSafeInteger(a)||a<=0||a>1e3)return{ok:!1,failure:`max-rows`};if(n.length<1||n.length>20)return{ok:!1,failure:`columns`};let s=Rm(t);if(s)return{ok:!1,failure:s};if(t.length>a)return{ok:!1,failure:`rows-budget`};let c;try{c=Yt(r)}catch{return{ok:!1,failure:`key`}}let l=c.dependencies;if(l.length!==1||l[0]!==`item`)return{ok:!1,failure:`key`};let u=n.map(e=>{try{return{spec:e,expression:Yt(e.value)}}catch{return{spec:e,expression:null}}}),d=0;for(let e of n)d+=e.label.length;if(t.length===0&&(d+=7),d>o)return{ok:!1,failure:`text-budget`};let f=e=>{if(d+=e,d>o)throw new Pm(`text-budget`)},p=new Set,m=[];try{for(let e=0;e<t.length;e+=1){let n={item:t[e],index:e},r=null;try{r=Im(c.evaluate(n))}catch{return{ok:!1,failure:`key`}}if(r===null||p.has(r))return{ok:!1,failure:`key`};f(r.length),p.add(r);let a=[];for(let e of u){if(!e.expression){f(14),a.push({ok:!1,text:``});continue}let t=null;try{t=Fm(e.expression.evaluate(Lm(i,e.expression.dependencies,n)))}catch{t=null}t===null?(f(14),a.push({ok:!1,text:``})):(f(t.length),a.push({ok:!0,text:t}))}m.push({key:r,cells:a})}}catch(e){return e instanceof Pm?{ok:!1,failure:e.failure}:{ok:!1,failure:`rows`}}return{ok:!0,model:{columns:n.map(e=>e.label),rows:m,empty:t.length===0}}}function Vm(e,t){switch(t){case`label`:return e(`Data table requires a label.`,`数据表需要标签。`);case`columns`:return e(`Data table requires between 1 and 20 column definitions.`,`数据表需要 1 到 20 个列定义。`);case`max-rows`:return e(`max-rows must be a positive integer no greater than ${A}.`,`max-rows 必须是 1 到 ${A} 之间的整数。`);case`rows`:return e(`Rows must evaluate to a list.`,`行数据必须计算为列表。`);case`rows-budget`:return e(`Too many rows for this table.`,`此数据表的行数超过上限。`);case`key`:return e(`Every row needs a unique, non-empty key.`,`每一行都需要唯一且非空的键。`);case`text-budget`:return e(`The table content exceeds the text budget.`,`数据表内容超过文本上限。`)}}var Hm=/^\s*\{\{([\s\S]*)\}\}\s*$/;function Um(e){if(e===void 0)return null;let t=Hm.exec(e),n=t?t[1].trim():``;return n===``?null:n}function Wm(e){return e.type===`comment`||e.type===`text`&&(e.value??``).trim()===``||e.type===`paragraph`&&!e.children?.length&&(e.value??``).trim()===``}function Gm(e){let t=(e.attrs?.label??``).trim();if(t===``)return{ok:!1,failure:`label`};let n=Um(e.attrs?.rows);if(!n)return{ok:!1,failure:`rows`};let r=Um(e.attrs?.key);if(!r)return{ok:!1,failure:`key`};let i=e.attrs?.[`max-rows`],a=100;if(i!==void 0&&(!/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/.test(i.trim())||(a=Number(i.trim()),!Number.isSafeInteger(a)||a<=0||a>1e3)))return{ok:!1,failure:`max-rows`};let o=(e.children??[]).filter(e=>!Wm(e)),s=[];for(let e of o){let t=(e.children??[]).filter(e=>!Wm(e));if(e.type!==`component`||e.name!==`column`||t.length>0)return{ok:!1,failure:`columns`};let n=(e.attrs?.label??``).trim(),r=Um(e.attrs?.value);if(n===``||!r)return{ok:!1,failure:`columns`};s.push({label:n,value:r})}return s.length<1||s.length>20?{ok:!1,failure:`columns`}:{ok:!0,table:{label:t,rows:n,key:r,maxRows:a,columns:s}}}function Km({node:e,runtime:t,t:n}){let r=Gm(e);if(!r.ok)return(0,Z.jsx)(`div`,{className:`local-error local-data-table-error`,role:`alert`,children:Vm(n,r.failure)});let i;try{i=Bm({rows:zm(t,r.table.rows),columns:r.table.columns,keyExpression:r.table.key,maxRows:r.table.maxRows,runtime:t})}catch(e){i={ok:!1,failure:e instanceof Pm?e.failure:`rows`}}if(!i.ok)return(0,Z.jsx)(`div`,{className:`local-error local-data-table-error`,role:`alert`,children:Vm(n,i.failure)});let{model:a}=i;return(0,Z.jsx)(`div`,{className:`md-table-scroll local-data-table-scroll`,"data-local-data-table":``,children:(0,Z.jsxs)(`table`,{className:`md-table local-data-table`,"aria-label":r.table.label,children:[(0,Z.jsx)(`thead`,{children:(0,Z.jsx)(`tr`,{children:a.columns.map((e,t)=>(0,Z.jsx)(`th`,{scope:`col`,children:e},`column-${t}`))})}),(0,Z.jsx)(`tbody`,{children:a.empty?(0,Z.jsx)(`tr`,{children:(0,Z.jsx)(`td`,{className:`local-data-table-empty`,colSpan:a.columns.length,children:n(`No rows`,`没有数据`)})}):a.rows.map(e=>(0,Z.jsx)(`tr`,{children:e.cells.map((e,t)=>(0,Z.jsx)(`td`,{children:e.ok?e.text:(0,Z.jsx)(`span`,{className:`local-error local-data-table-cell-error`,children:n(`Cannot compute`,`无法计算`)})},`cell-${t}`))},e.key))})]})})}var qm=(0,y.createContext)(null);function $(){let e=(0,y.useContext)(qm);if(!e)throw Error(`LocalViewContext is not initialized`);return e}var Jm=`local.validation.failed`,Ym=`local.validation.expression`,Xm=2e3,Zm={invalid:!1},Qm={hintFor:()=>null,fieldFor:()=>Zm};function $m(e){return`${e.start}:${e.end}`}function eh(e){return e.length>Xm?`${e.slice(0,1999)}…`:e}function th(e,t,n,r){let i=Array.isArray(e.validations)?e.validations:[];if(i.length===0)return Qm;let a=null;try{typeof t.validate==`function`&&(a=t.validate())}catch{a=null}let o=new Map;for(let e of a??[])(e.code===Jm||e.code===Ym)&&o.set($m(e.range),e);let s=new Map,c=new Map,l=new Map,u=r(`This rule cannot be evaluated`,`无法计算此规则`),d=r(`Validation failed.`,`校验未通过。`);for(let[t,r]of i.entries()){let i=$m(r.range),f=o.get(i),p=a===null||f?.code===Ym,m=f?.code===Jm,h=m?eh(f?.message||r.message||d):p?f?.message?`${u}: ${eh(f.message)}`:u:``,g={id:`${n}-validation-${t}`,failed:m,error:p,message:h};if(s.set(r.nodeId,g),c.set(i,g),m||p)for(let t of r.fields??[]){let n=Object.hasOwn(e.bindings,t)?e.bindings[t]:void 0;if(n)for(let e of n.nodeIds??[]){let t=l.get(e);t?t.includes(g.id)||t.push(g.id):l.set(e,[g.id])}}}return{hintFor(e){return c.get($m(e.range))??s.get(e.id)??null},fieldFor(e){let t=l.get(e.id);return t&&t.length>0?{describedBy:t.join(` `),invalid:!0}:Zm}}}function nh(e){return $().validation.fieldFor(e)}var rh=/^\s*\{\{([\s\S]*)\}\}\s*$/,ih={revision:0,state:{}};function ah(e,t){return e.attrs?.[t]}function oh(e,t,n){let r=ah(t,n);if(r===void 0)return{present:!1};let i=rh.exec(r);if(!i)return{present:!0,ok:!0,value:r};try{return{present:!0,ok:!0,value:e.evaluate(i[1])}}catch{return{present:!0,ok:!1}}}function sh(e){return e===null?``:typeof e==`string`?e:typeof e==`number`?Number.isFinite(e)?String(e):null:typeof e==`boolean`?e?`true`:`false`:null}function ch(e,t,n,r=``,i=lp){let a=ah(t,n);if(a===void 0)return r;let o=rh.exec(a);try{return o?sh(e.evaluate(o[1]))??i(`Cannot compute`,`无法计算`):e.text(a)}catch{return i(`Cannot compute`,`无法计算`)}}function lh(e,t,n,r){let i=ah(t,n);if(i===void 0)return{ok:!0,value:r};let a=rh.exec(i);if(!a)return{ok:!0,value:i===`true`};try{let t=e.evaluate(a[1]);return typeof t==`boolean`?{ok:!0,value:t}:{ok:!1}}catch{return{ok:!1}}}function uh(e,t,n,r=!1){let i=lh(e,t,n,r);return i.ok?i.value:r}function dh(e,t,n,r,i){let a=ah(t,n);if(a===void 0)return{tone:i,error:!1};let o=rh.exec(a);if(!o){let e=a.trim();return{tone:r.includes(e)?e:i,error:!1}}try{let t=e.evaluate(o[1]);return typeof t==`string`&&r.includes(t)?{tone:t,error:!1}:{tone:i,error:!0}}catch{return{tone:i,error:!0}}}function fh(e){try{return e.snapshot().revision}catch{return 0}}function ph(e,t,n,r){let i=ah(t,n);if(i===void 0)return r;let a=rh.exec(i);try{let t=a?e.evaluate(a[1]):Number(i);return typeof t==`number`&&Number.isFinite(t)?t:r}catch{return r}}function mh(e,t){try{return e.get(t)}catch{return null}}function hh(e){return sh(e)??``}var gh=`—`;function _h(e){return e.trim()===``?gh:e}function vh({label:e,value:t,hint:n,className:r=``,multiline:i=!1}){return(0,Z.jsxs)(`div`,{className:`md-control local-static-control ${r}`.trim(),children:[(0,Z.jsx)(`span`,{className:`md-label`,children:e}),(0,Z.jsx)(`span`,{className:`local-static-value${i?` local-static-multiline`:``}`,"data-local-static-value":``,children:t}),n?(0,Z.jsx)(`span`,{className:`md-hint`,children:n}):null]})}function yh({value:e,block:t=!1}){return t?(0,Z.jsx)(`div`,{className:`local-print-value local-print-block`,"aria-hidden":`true`,"data-local-print-value":``,children:e}):(0,Z.jsx)(`span`,{className:`local-print-value`,"aria-hidden":`true`,"data-local-print-value":``,children:e})}function bh(e){let t=ah(e,`color`);if(t===void 0)return;let n=t.trim();return n!==``&&qn(n)?n:void 0}function xh(e){if(e)return{"--local-accent":e,"--local-accent-soft":`color-mix(in srgb, ${e} 14%, var(--surface))`,"--local-accent-strong":e}}var Sh=`(prefers-color-scheme: dark)`;function Ch(e){if(!Array.isArray(e)||e.length===0)return``;try{return e.map(e=>{if(!e||typeof e!=`object`)return``;let t=Array.isArray(e.colorSchemes)?e.colorSchemes.join(``):``;return`${e.name}\u0000${e.protocol}\u0000${t}`}).join(``)}catch{return``}}function wh(e){return e.map(e=>`${e.code}\u0000${e.range.start}\u0000${e.range.end}\u0000${e.message}`).join(``)}function Th(e){return e===`light`||e===`dark`?e:null}function Eh(e){let t=Th(e.getAttribute(`data-theme`));if(t)return t;let n=e.parentElement;for(;n;){let e=Th(n.getAttribute(`data-color-scheme`))??Th(n.getAttribute(`data-theme`));if(e)return e;n=n.parentElement}return null}function Dh(){if(typeof window>`u`||typeof window.matchMedia!=`function`)return null;try{return window.matchMedia(Sh).matches?`dark`:`light`}catch{return null}}function Oh(e,t){let n=Th(t),[r,i]=(0,y.useState)(`light`);return(0,y.useEffect)(()=>{if(n){i(n);return}let t=e.current;if(!t||typeof window>`u`){i(`light`);return}let r=()=>i(Eh(t)??Dh()??`light`);r();let a=[];if(typeof MutationObserver==`function`)try{let e=(e,t)=>{let n=new MutationObserver(r);n.observe(e,{attributes:!0,attributeFilter:t}),a.push(n)};e(t,[`data-theme`]);let n=t.parentElement;for(;n;)e(n,[`data-color-scheme`,`data-theme`]),n=n.parentElement}catch{for(let e of a)e.disconnect();a=[]}let o=()=>r(),s=null;if(typeof window.matchMedia==`function`)try{s=window.matchMedia(Sh),typeof s.addEventListener==`function`?s.addEventListener(`change`,o):typeof s.addListener==`function`&&s.addListener(o)}catch{s=null}return()=>{for(let e of a)e.disconnect();s&&(typeof s.removeEventListener==`function`?s.removeEventListener(`change`,o):typeof s.removeListener==`function`&&s.removeListener(o))}},[n,e]),n??r}function kh(e,t,n){return Math.min(n,Math.max(t,e))}function Ah(e,t,n,r){let i=Number.isFinite(r)&&r>0?r:1,a=Math.max(0,Math.floor((n-t)/i+1e-9)),o=t+Math.max(0,Math.min(a,Math.round((e-t)/i)))*i;return Number(o.toPrecision(15))}function jh(e,t,n,r){try{let i=e.get(t,n);return typeof i==`number`&&Number.isFinite(i)?i:r}catch{return r}}function Mh(e,t,n,r,i,a,o=1){let s=ph(e,t,n,i),c=ph(e,t,r,a);s>c&&([s,c]=[c,s]);let l=ph(e,t,`step`,o);return{min:s,max:c,step:Number.isFinite(l)&&l>0?l:1}}function Nh(e){let{runtime:t,report:n}=$(),r=fp(),i=Q(),[a,o]=(0,y.useState)(null);return{write:(0,y.useCallback)((a,s)=>{try{let i=t.set(e,a,s);return i.length?(o(i.map(e=>tt(e,r)).join(`; `)),n(i),!1):(o(null),!0)}catch(e){return o(e instanceof Error?e.message:i(`Cannot write`,`无法写入`)),!1}},[r,e,n,t,i]),writeMany:(0,y.useCallback)(a=>{try{let i=t.setMany(e,a);return i.length?(o(i.map(e=>tt(e,r)).join(`; `)),n(i),!1):(o(null),!0)}catch(e){return o(e instanceof Error?e.message:i(`Cannot write`,`无法写入`)),!1}},[r,e,n,t,i]),error:a,setError:o}}function Ph(e){let{runtime:t}=$(),n=lh(t,e,`disabled`,!1);return n.ok?{disabled:n.value,invalid:!1}:{disabled:!0,invalid:!0}}function Fh(e,t,n){let r=0;try{r=e.resetToken(t)}catch{r=0}let i=(0,y.useRef)(r),a=(0,y.useRef)(n);a.current=n,(0,y.useEffect)(()=>{i.current!==r&&(i.current=r,a.current())},[r])}function Ih({message:e}){let t=Q();return(0,Z.jsx)(`span`,{className:`local-error`,role:`alert`,children:e??t(`Cannot compute`,`无法计算`)})}var Lh=class extends y.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidUpdate(e){this.state.failed&&e.revision!==this.props.revision&&this.setState({failed:!1})}render(){return this.state.failed?(0,Z.jsx)(Ih,{}):this.props.children}},Rh=new Set([`table`,`chart`,`plot`,`timeline`,`diagram`]);function zh(e,t,n){if(!e)return null;let r=e.trim();if(!r)return null;let i=r.replace(/[\u0000- ]+/g,``),a=/^([a-z][a-z0-9+.-]*):/i.exec(i);if(a){let e=a[1].toLowerCase();if(!(t===`image`?e===`http`||e===`https`:e===`http`||e===`https`||e===`mailto`||e===`tel`))return null}if(!n)return t===`image`?null:r;try{return n(r,t)?r:null}catch{return null}}function Bh(e){return`h${Math.min(6,Math.max(1,e??1))}`}function Vh(e,t){if(e.node!==t.node||e.visible!==t.visible||e.resetToken!==t.resetToken||e.env!==t.env||e.depValues===null||t.depValues===null||e.depValues.length!==t.depValues.length)return!1;for(let n=0;n<e.depValues.length;n+=1)if(!Object.is(e.depValues[n],t.depValues[n]))return!1;return!0}var Hh=(0,y.memo)(function({node:e,index:t,visible:n,env:r}){return qh(r,e,t,n,!0)},Vh);function Uh(e,t,n,r=!0){if(!t||t.length===0)return null;if(!r)return t.map((t,r)=>qh(e,t,r,n,!1));let i=null,a=null;try{i=e.runtime.snapshot().state,a=Vn(e.runtime)}catch{i=null}let o=i;return t.map((t,r)=>{let i=e.dependencies.get(t.id),s=i==null||o===null||a===null?null:i.map(e=>o[e]),c=a?.get(t.id)??0;return(0,Z.jsx)(Hh,{node:t,index:r,visible:n,env:e,depValues:s,resetToken:c},t.id||`${t.type}-${r}`)})}function Wh(e,t){if(typeof t.value==`string`)return t.value;let{start:n,end:r}=t.range;return Number.isInteger(n)&&Number.isInteger(r)&&n>=0&&r>=n?e.runtime.document.source.slice(n,r):``}function Gh(e,t,n,r){return(0,Z.jsx)(`span`,{className:r?`local-fallback local-fallback-block`:`local-fallback local-fallback-inline`,title:e.t(`Unsupported syntax shown as source`,`未支持的语法,已按源码原样显示`),"data-local-fallback":``,children:Wh(e,t)},n)}function Kh(e,t,n){return!t||t.length===0?null:t.map((t,r)=>t.type===`paragraph`||t.type===`root`?(0,Z.jsx)(`span`,{children:Uh(e,t.children,n,!1)},t.id||`inline-${r}`):qh(e,t,r,n,!1))}function qh(e,t,n,r,i=!0){let a=t.id||`${t.type}-${n}`;if(t.type===`component`)return(0,Z.jsx)(Lh,{revision:fh(e.runtime),children:Yh(t,r,e.runtime,e.t)},a);switch(t.type){case`root`:return(0,Z.jsx)(`div`,{children:Uh(e,t.children,r)},a);case`heading`:return(0,y.createElement)(Bh(t.depth),{key:a,id:e.anchors.ids.get(t)},Uh(e,t.children,r,!1));case`paragraph`:return(0,Z.jsx)(`p`,{children:Uh(e,t.children,r,!1)},a);case`text`:return(0,Z.jsx)(`span`,{children:t.value??``},a);case`emphasis`:return(0,Z.jsx)(`em`,{children:Uh(e,t.children,r,!1)},a);case`strong`:return(0,Z.jsx)(`strong`,{children:Uh(e,t.children,r,!1)},a);case`delete`:return(0,Z.jsx)(`del`,{children:Uh(e,t.children,r,!1)},a);case`inlineCode`:return(0,Z.jsx)(`code`,{className:`md-inline-code`,children:t.value??``},a);case`code`:{let e=t.lang?`language-${t.lang}`:void 0;return(0,Z.jsx)(`pre`,{className:`md-code`,children:(0,Z.jsx)(`code`,{className:e,children:t.value??``})},a)}case`blockquote`:return(0,Z.jsx)(`blockquote`,{children:Uh(e,t.children,r)},a);case`break`:return(0,Z.jsx)(`br`,{},a);case`thematicBreak`:return(0,Z.jsx)(`hr`,{},a);case`list`:return t.ordered?(0,Z.jsx)(`ol`,{start:t.start??1,className:`md-list`,children:Uh(e,t.children,r)},a):(0,Z.jsx)(`ul`,{className:`md-list`,children:Uh(e,t.children,r)},a);case`listItem`:{let n=typeof t.checked==`boolean`;return(0,Z.jsxs)(`li`,{className:n?`md-list-item md-task-item`:`md-list-item`,children:[n?e.mode===`static`?(0,Z.jsx)(`span`,{className:`md-task-marker`,role:`img`,"aria-label":t.checked?e.t(`Completed`,`已完成`):e.t(`Not completed`,`未完成`),children:t.checked?`✓`:`☐`}):(0,Z.jsx)(`input`,{type:`checkbox`,className:`md-task-checkbox`,checked:t.checked===!0,readOnly:!0,tabIndex:-1,"aria-label":t.checked?e.t(`Completed`,`已完成`):e.t(`Not completed`,`未完成`)}):null,Uh(e,t.children,r)]},a)}case`link`:{let n=zh(t.url,`link`,e.urlPolicy);if(!n)return(0,Z.jsx)(`span`,{className:`md-link-rejected`,title:e.t(`Unsafe link URL rejected`,`已拒绝不安全的链接地址`),children:Uh(e,t.children,r,!1)},a);let i=e.anchors.resolve(n),o=/^https?:/i.test(i);return(0,Z.jsx)(`a`,{href:i,title:t.title??void 0,target:o?`_blank`:void 0,rel:o?`noopener noreferrer`:void 0,children:Uh(e,t.children,r,!1)},a)}case`image`:{let n=zh(t.url,`image`,e.urlPolicy),r=n;if(n&&e.imageResolver)try{let t=e.imageResolver(n);r=typeof t==`string`&&t.trim()!==``?t:null}catch{r=null}if(!r){let n=e.t(`Unsafe image rejected`,`已拒绝不安全的图片`),r=t.alt?e.t(`: ${t.alt}`,`:${t.alt}`):``;return(0,Z.jsxs)(`span`,{className:`md-image-rejected`,children:[`[`,n,r,`]`]},a)}return(0,Z.jsx)(`img`,{className:`md-image`,src:r,alt:t.alt??``,title:t.title??void 0,loading:`lazy`,referrerPolicy:`no-referrer`},a)}case`table`:{let[n,...i]=t.children??[];return(0,Z.jsx)(`div`,{className:`md-table-scroll`,children:(0,Z.jsxs)(`table`,{className:`md-table`,children:[n?(0,Z.jsx)(`thead`,{children:(0,Z.jsx)(`tr`,{children:Jh(e,n,`th`,t.align,r)})}):null,i.length?(0,Z.jsx)(`tbody`,{children:i.map((n,i)=>(0,Z.jsx)(`tr`,{children:Jh(e,n,`td`,t.align,r)},n.id||`${a}-row-${i}`))}):null]})},a)}case`tableRow`:return(0,Z.jsx)(`tr`,{children:Jh(e,t,`td`,void 0,r)},a);case`tableCell`:{let n=t.align?.[0]??void 0;return(0,Z.jsx)(`td`,{style:{textAlign:n??void 0},children:Uh(e,t.children,r,!1)},a)}case`interpolation`:try{let n=sh(e.runtime.evaluate(t.value??``));if(n===null)throw Error(`Cannot display an array`);return(0,Z.jsx)(`span`,{className:`local-interpolation`,children:n},a)}catch{return(0,Z.jsx)(Ih,{},a)}case`math`:case`inlineMath`:{let n=t.type===`math`;return(0,Z.jsx)(`span`,{className:n?`local-math-display`:`local-math-inline`,children:(0,Z.jsx)(Lh,{revision:fh(e.runtime),children:(0,Z.jsx)(sp,{source:t.value??``,display:n})})},a)}case`html`:return(0,Z.jsx)(`span`,{className:`md-raw-html`,children:t.value??``},a);case`fallback`:return Gh(e,t,a,i);case`footnoteReference`:return Gh(e,t,a,!1);case`footnoteDefinition`:return Gh(e,t,a,i);case`comment`:case`definition`:return null;default:return t.children&&t.children.length?(0,Z.jsx)(`span`,{children:Uh(e,t.children,r,i)},a):typeof t.value==`string`?(0,Z.jsx)(`span`,{children:t.value},a):null}}function Jh(e,t,n,r,i){return(t.children??[]).map((a,o)=>{let s=a.align?.[0]??t.align?.[o]??r?.[o]??void 0;return n===`th`?(0,Z.jsx)(`th`,{style:{textAlign:s??void 0},children:Uh(e,a.children,i,!1)},a.id||`${t.id}-h-${o}`):(0,Z.jsx)(`td`,{style:{textAlign:s??void 0},children:Uh(e,a.children,i,!1)},a.id||`${t.id}-c-${o}`)})}function Yh(e,t,n,r){let i=e.name??``;if(i===`computed`||i===`const`)return null;if(i===`data-table`)return(0,Z.jsx)(Km,{node:e,visible:t,runtime:n,t:r});if(Rh.has(i))return(0,Z.jsx)(Xh,{node:e,visible:t});let a=qg[i];return a?(0,Z.jsx)(a,{node:e,visible:t}):(0,Z.jsxs)(`span`,{className:`component-error`,children:[r(`Unknown component "`,`未知组件“`),i||r(`(missing name)`,`(缺少名称)`),r(`"`,`”`)]})}function Xh({node:e,visible:t}){let{runtime:n,render:r,mode:i}=$(),a=Q(),o=nh(e),s=(0,Z.jsx)(Nm,{node:e,runtime:n,render:r,visible:t,mode:i});if(!n.document.validations?.some(t=>t.fields.some(t=>Object.hasOwn(n.document.bindings,t)&&n.document.bindings[t].nodeIds.includes(e.id))))return s;let c=ch(n,e,`label`,ch(n,e,`title`,a(`Selection`,`选择`),a),a);return(0,Z.jsx)(`div`,{role:`group`,"aria-label":c,"aria-invalid":o.invalid||void 0,"aria-describedby":o.describedBy,children:s})}function Zh({node:e,visible:t}){let{validation:n}=$(),r=n.hintFor(e);if(!r)return null;let i=r.failed||r.error,a=t&&i;return(0,Z.jsx)(`span`,{id:r.id,className:`local-validation-hint`,"data-local-validation":r.error?`error`:r.failed?`failed`:`passed`,role:a?`status`:void 0,"aria-live":a?`polite`:void 0,children:i?r.message:null})}function Qh(){return null}function $h({message:e}){return e?(0,Z.jsx)(`span`,{className:`field-error`,role:`alert`,children:e}):null}function eg(e,t,n=lp){if(t.required&&e.length===0)return n(`This field is required`,`请填写此字段`);if(e.length>1e5)return n(`At most ${w} characters`,`最多允许 ${w} 个字符`);if(t.email&&e!==``&&!N(e))return n(`Enter a valid email address`,`请输入有效的邮箱地址`);let r=nt(e);return t.minLength!==void 0&&t.minLength>0&&e!==``&&r<t.minLength?n(`At least ${t.minLength} characters`,`至少需要 ${t.minLength} 个字符`):t.maxLength!==void 0&&t.maxLength>=0&&r>t.maxLength?n(`At most ${t.maxLength} characters`,`最多允许 ${t.maxLength} 个字符`):null}function tg({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=$(),i=Q(),{write:a,error:o,setError:s}=Nh(e),c=ch(n,e,`label`,e.name??i(`Input`,`输入`),i),l=ch(n,e,`placeholder`,``,i),u=(ah(e,`type`)??`text`)===`email`,d=uh(n,e,`required`,!1),{disabled:f,invalid:p}=Ph(e),m=nh(e),h=ah(e,`min-length`),g=ah(e,`max-length`),_=h===void 0?void 0:Math.max(0,Math.floor(ph(n,e,`min-length`,0))),v=g===void 0?void 0:Math.max(0,Math.floor(ph(n,e,`max-length`,0))),b=hh(mh(n,e)),[x,S]=(0,y.useState)(b),[C,w]=(0,y.useState)(!1),[T,E]=(0,y.useState)(!1),[D,O]=(0,y.useState)(null),k=(0,y.useRef)(!1),A=(0,y.useRef)(b),j=(0,y.useRef)(b);if(j.current=b,(0,y.useEffect)(()=>{A.current!==b&&(A.current=b,!C&&!k.current&&S(b))},[b,C]),Fh(n,e,()=>{k.current=!1,S(j.current),E(!1),O(null),s(null)}),r===`static`)return(0,Z.jsx)(vh,{className:`local-input${u?` local-input-email`:``}`,label:c,value:_h(b)});let M=e=>eg(e,{required:d,minLength:_,maxLength:v,email:u},i);return(0,Z.jsxs)(`div`,{className:`md-control local-input${u?` local-input-email`:``}`,children:[(0,Z.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-input`,children:c}),(0,Z.jsx)(`input`,{id:`${t}-input`,className:`md-text-input`,type:u?`email`:`text`,value:x,placeholder:l||void 0,disabled:f,required:d,"aria-invalid":D||o||m.invalid?!0:void 0,"aria-describedby":m.describedBy,onFocus:()=>w(!0),onBlur:()=>{w(!1),E(!0);let e=M(x);O(e),!e&&x!==b&&a(x)},onChange:e=>{let t=e.target.value;S(t),s(null),T&&O(M(t)),!k.current&&M(t)===null&&a(t)},onCompositionStart:()=>{k.current=!0},onCompositionEnd:e=>{k.current=!1;let t=e.currentTarget.value;S(t),T&&O(M(t)),M(t)===null&&a(t)}}),(0,Z.jsx)(yh,{value:_h(b)}),(0,Z.jsx)($h,{message:p?i(`Cannot compute`,`无法计算`):D??o})]})}function ng({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=$(),i=Q(),{write:a,error:o,setError:s}=Nh(e),c=ch(n,e,`label`,i(`Text`,`文本`),i),l=ch(n,e,`placeholder`,``,i),u=Math.min(40,Math.max(1,Math.floor(ph(n,e,`rows`,4)))),d=uh(n,e,`required`,!1),{disabled:f,invalid:p}=Ph(e),m=nh(e),h=ah(e,`min-length`),g=ah(e,`max-length`),_=h===void 0?void 0:Math.max(0,Math.floor(ph(n,e,`min-length`,0))),v=g===void 0?void 0:Math.max(0,Math.floor(ph(n,e,`max-length`,0))),b=hh(mh(n,e)),[x,S]=(0,y.useState)(b),[C,w]=(0,y.useState)(!1),[T,E]=(0,y.useState)(!1),[D,O]=(0,y.useState)(null),k=(0,y.useRef)(!1),A=(0,y.useRef)(b),j=(0,y.useRef)(b);if(j.current=b,(0,y.useEffect)(()=>{A.current!==b&&(A.current=b,!C&&!k.current&&S(b))},[b,C]),Fh(n,e,()=>{k.current=!1,S(j.current),E(!1),O(null),s(null)}),r===`static`)return(0,Z.jsx)(vh,{className:`local-textarea`,label:c,value:_h(b),multiline:!0});let M=e=>eg(e,{required:d,minLength:_,maxLength:v},i);return(0,Z.jsxs)(`div`,{className:`md-control local-textarea`,children:[(0,Z.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-textarea`,children:c}),(0,Z.jsx)(`textarea`,{id:`${t}-textarea`,className:`md-text-input`,rows:u,value:x,placeholder:l||void 0,disabled:f,required:d,"aria-invalid":D||o||m.invalid?!0:void 0,"aria-describedby":m.describedBy,onFocus:()=>w(!0),onBlur:()=>{w(!1),E(!0);let e=M(x);O(e),!e&&x!==b&&a(x)},onChange:e=>{let t=e.target.value;S(t),s(null),T&&O(M(t)),!k.current&&M(t)===null&&a(t)},onCompositionStart:()=>{k.current=!0},onCompositionEnd:e=>{k.current=!1;let t=e.currentTarget.value;S(t),T&&O(M(t)),M(t)===null&&a(t)}}),(0,Z.jsx)(yh,{value:_h(b),block:!0}),(0,Z.jsx)($h,{message:p?i(`Cannot compute`,`无法计算`):D??o})]})}function rg(e){let t=e.trim();if(t===``||t===`-`||t===`+`||t===`.`||t===`-.`)return{kind:`empty`};let n=Number(t);return Number.isFinite(n)?{kind:`valid`,value:n}:{kind:`invalid`}}function ig(e,t,n,r,i=lp){let a=1e-9*Math.max(1,Math.abs(e));if(t!==void 0&&e<t-a)return i(`Must be at least ${t}`,`不能小于 ${t}`);if(n!==void 0&&e>n+a)return i(`Must be at most ${n}`,`不能大于 ${n}`);if(!Number.isFinite(r)||r<=0)return i(`Step must be greater than 0`,`步长必须大于 0`);let o=(e-(t??0))/r;return Math.abs(o-Math.round(o))>1e-9*Math.max(1,Math.abs(o))?i(`Must be a multiple of ${r}`,`需要按步长 ${r} 取值`):null}function ag({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=$(),i=Q(),{write:a,error:o,setError:s}=Nh(e),c=ch(n,e,`label`,i(`Number`,`数字`),i),{disabled:l,invalid:u}=Ph(e),d=nh(e),f=ah(e,`min`)!==void 0,p=ah(e,`max`)!==void 0,m=f?ph(n,e,`min`,0):void 0,h=p?ph(n,e,`max`,0):void 0,g=ph(n,e,`step`,1),_=mh(n,e),v=typeof _==`number`&&Number.isFinite(_)?String(_):``,[b,x]=(0,y.useState)(v),[S,C]=(0,y.useState)(!1),[w,T]=(0,y.useState)(!1),[E,D]=(0,y.useState)(null),O=(0,y.useRef)(!1),k=(0,y.useRef)(v),A=(0,y.useRef)(v);A.current=v,(0,y.useEffect)(()=>{k.current!==v&&(k.current=v,!S&&!O.current&&x(v))},[v,S]),Fh(n,e,()=>{O.current=!1,x(A.current),T(!1),D(null),s(null)});let j=(0,Z.jsxs)(Z.Fragment,{children:[m===void 0?``:i(`Min ${m}`,`最小 ${m}`),m!==void 0&&h!==void 0?` · `:``,h===void 0?``:i(`Max ${h}`,`最大 ${h}`),g===void 0?``:i(` · Step ${g}`,` · 步长 ${g}`)]});if(r===`static`)return(0,Z.jsx)(vh,{className:`local-number`,label:c,value:_h(v),hint:j});let M=(e,t)=>{let n=rg(e);if(n.kind!==`valid`)return t&&D(i(`Enter a valid number`,`请输入有效数字`)),!1;let r=ig(n.value,m,h,g,i);return r?(t&&D(r),!1):(D(null),a(n.value))};return(0,Z.jsxs)(`div`,{className:`md-control local-number`,children:[(0,Z.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-number`,children:c}),(0,Z.jsx)(`input`,{id:`${t}-number`,className:`md-text-input`,type:`text`,inputMode:`decimal`,value:b,disabled:l,"aria-invalid":E||o||d.invalid?!0:void 0,"aria-describedby":d.describedBy,onFocus:()=>C(!0),onBlur:()=>{C(!1),T(!0),M(b,!0)},onChange:e=>{let t=e.target.value;x(t),s(null),O.current||M(t,w)},onCompositionStart:()=>{O.current=!0},onCompositionEnd:e=>{O.current=!1,M(e.currentTarget.value,w)}}),(0,Z.jsx)(yh,{value:_h(v)}),m!==void 0||h!==void 0||g!==void 0?(0,Z.jsx)(`span`,{className:`md-hint`,children:j}):null,(0,Z.jsx)($h,{message:u?i(`Cannot compute`,`无法计算`):E??o})]})}function og({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=$(),i=Q(),{write:a,error:o}=Nh(e),s=ch(n,e,`label`,i(`Slider`,`滑块`),i),{disabled:c,invalid:l}=Ph(e),u=nh(e),d=ph(n,e,`min`,0),f=ph(n,e,`max`,100),p=ph(n,e,`step`,1),m=mh(n,e),h=Math.min(f,Math.max(d,typeof m==`number`&&Number.isFinite(m)?m:d));return r===`static`?(0,Z.jsx)(vh,{className:`md-slider local-slider`,label:s,value:String(h)}):(0,Z.jsxs)(`div`,{className:`md-control md-slider local-slider`,style:xh(bh(e)),children:[(0,Z.jsxs)(`label`,{className:`md-label`,htmlFor:`${t}-slider`,children:[(0,Z.jsx)(`span`,{children:s}),(0,Z.jsx)(`span`,{className:`md-slider-value`,"aria-hidden":`true`,children:h})]}),(0,Z.jsx)(`input`,{id:`${t}-slider`,type:`range`,min:d,max:f,step:p,value:h,disabled:c,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,onChange:e=>a(Number(e.target.value))}),(0,Z.jsx)(yh,{value:String(h)}),(0,Z.jsx)($h,{message:l?i(`Cannot compute`,`无法计算`):o})]})}function sg({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=$(),i=Q(),{write:a,error:o}=Nh(e),s=ch(n,e,`label`,i(`Toggle`,`开关`),i),{disabled:c,invalid:l}=Ph(e),u=nh(e),d=mh(n,e)===!0,f=d?i(`On`,`开`):i(`Off`,`关`);return r===`static`?(0,Z.jsx)(vh,{className:`md-toggle local-toggle`,label:s,value:f}):(0,Z.jsxs)(`div`,{className:`md-control md-toggle local-toggle`,style:xh(bh(e)),children:[(0,Z.jsxs)(`label`,{className:`md-toggle-label`,htmlFor:`${t}-toggle`,children:[(0,Z.jsx)(`input`,{id:`${t}-toggle`,type:`checkbox`,checked:d,disabled:c,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,onChange:e=>a(e.target.checked)}),(0,Z.jsx)(`span`,{children:s})]}),(0,Z.jsx)(yh,{value:f}),(0,Z.jsx)($h,{message:l?i(`Cannot compute`,`无法计算`):o})]})}function cg({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=$(),i=Q(),{write:a,error:o}=Nh(e),s=ch(n,e,`label`,i(`Checkbox`,`勾选`),i),{disabled:c,invalid:l}=Ph(e),u=nh(e),d=mh(n,e)===!0,f=d?i(`Checked`,`已勾选`):i(`Unchecked`,`未勾选`);return r===`static`?(0,Z.jsx)(vh,{className:`local-checkbox`,label:s,value:f}):(0,Z.jsxs)(`div`,{className:`md-control local-checkbox`,style:xh(bh(e)),children:[(0,Z.jsxs)(`label`,{className:`md-toggle-label`,htmlFor:`${t}-checkbox`,children:[(0,Z.jsx)(`input`,{id:`${t}-checkbox`,type:`checkbox`,checked:d,disabled:c,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,onChange:e=>a(e.target.checked)}),(0,Z.jsx)(`span`,{children:s})]}),(0,Z.jsx)(yh,{value:f}),(0,Z.jsx)($h,{message:l?i(`Cannot compute`,`无法计算`):o})]})}function lg({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=$(),i=Q(),{write:a,error:o}=Nh(e),s=ch(n,e,`label`,i(`Date`,`日期`),i),{disabled:c,invalid:l}=Ph(e),u=nh(e),d=uh(n,e,`required`,!1),f=ch(n,e,`min`,``,i),p=ch(n,e,`max`,``,i),m=mh(n,e),h=typeof m==`string`?m:``,[g,_]=(0,y.useState)(!1),v=g&&d&&h===``?i(`Select a date`,`请选择日期`):null;return r===`static`?(0,Z.jsx)(vh,{className:`local-date`,label:s,value:_h(h)}):(0,Z.jsxs)(`div`,{className:`md-control local-date`,children:[(0,Z.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-date`,children:s}),(0,Z.jsx)(`input`,{id:`${t}-date`,className:`md-text-input`,type:`date`,value:h,min:f||void 0,max:p||void 0,required:d,disabled:c,"aria-invalid":v||o||u.invalid?!0:void 0,"aria-describedby":u.describedBy,onBlur:()=>_(!0),onChange:e=>{_(!0),a(e.target.value)}}),(0,Z.jsx)(yh,{value:_h(h)}),(0,Z.jsx)($h,{message:l?i(`Cannot compute`,`无法计算`):v??o})]})}function ug(e){return(e.children??[]).filter(e=>e.type===`component`&&e.name===`option`).map((e,t)=>({value:ah(e,`value`)??`option-${t+1}`,node:e}))}function dg(e,t,n=lp){if(!t)return``;let r=``;for(let i of t)if(i.type===`text`||i.type===`inlineCode`)r+=i.value??``;else if(i.type===`fallback`)r+=i.value??``;else if(i.type===`interpolation`)try{r+=sh(e.evaluate(i.value??``))??``}catch{r+=n(`Cannot compute`,`无法计算`)}else i.type===`break`?r+=` `:r+=dg(e,i.children,n);return r}function fg(e,t,n=lp){return dg(e,t.children,n)||ah(t,`value`)||``}function pg(){return null}function mg({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=$(),i=Q(),{write:a,error:o}=Nh(e),s=ch(n,e,`label`,i(`Select`,`选择`),i),{disabled:c,invalid:l}=Ph(e),u=nh(e),d=ug(e),f=mh(n,e),p=typeof f==`string`?f:``,m=d.some(e=>e.value===p)?p:d[0]?.value??``,h=d.find(e=>e.value===m),g=h?fg(n,h.node,i)||m:``;return d.length===0?(0,Z.jsx)(Ih,{message:i(`Missing options`,`缺少选项`)}):r===`static`?(0,Z.jsx)(vh,{className:`md-select local-select`,label:s,value:_h(g)}):(0,Z.jsxs)(`div`,{className:`md-control md-select local-select`,style:xh(bh(e)),children:[(0,Z.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-select`,children:s}),(0,Z.jsx)(`select`,{id:`${t}-select`,className:`md-select-input`,value:m,disabled:c,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,onChange:e=>a(e.target.value),children:d.map(e=>(0,Z.jsx)(`option`,{value:e.value,children:fg(n,e.node,i)||e.value},e.node.id))}),(0,Z.jsx)(yh,{value:_h(g)}),(0,Z.jsx)($h,{message:l?i(`Cannot compute`,`无法计算`):o})]})}function hg({node:e,visible:t}){let n=(0,y.useId)(),r=$(),{runtime:i,mode:a}=r,o=Q(),{write:s,error:c}=Nh(e),l=ch(i,e,`label`,o(`Options`,`选项`),o),{disabled:u,invalid:d}=Ph(e),f=nh(e),p=ug(e),m=mh(i,e),h=typeof m==`string`?m:``,g=p.findIndex(e=>e.value===h),_=g>=0?g:0,v=g>=0?p[g]:void 0,b=v?fg(i,v.node,o):``,x=(0,y.useRef)([]);if(p.length===0)return(0,Z.jsx)(Ih,{message:o(`Missing options`,`缺少选项`)});if(a===`static`)return(0,Z.jsx)(vh,{className:`local-choices`,label:l,value:_h(b)});let S=e=>{let t=p[e];t&&(s(t.value),x.current[e]?.focus())},C=(e,t)=>{let n=-1;e.key===`ArrowRight`||e.key===`ArrowDown`?n=(t+1)%p.length:e.key===`ArrowLeft`||e.key===`ArrowUp`?n=(t-1+p.length)%p.length:e.key===`Home`?n=0:e.key===`End`&&(n=p.length-1),!(n<0)&&(e.preventDefault(),S(n))};return(0,Z.jsxs)(`div`,{className:`md-control local-choices`,style:xh(bh(e)),children:[(0,Z.jsx)(`span`,{className:`md-label`,id:`${n}-choices-label`,children:l}),(0,Z.jsx)(`div`,{className:`local-choice-list`,role:`radiogroup`,"aria-labelledby":`${n}-choices-label`,"aria-disabled":u||void 0,"aria-invalid":f.invalid||void 0,"aria-describedby":f.describedBy,children:p.map((e,n)=>{let i=e.value===h;return(0,Z.jsx)(`button`,{ref:e=>{x.current[n]=e},type:`button`,role:`radio`,"aria-checked":i,tabIndex:n===_?0:-1,disabled:u,className:`local-choice${i?` is-selected`:``}`,onClick:()=>s(e.value),onKeyDown:e=>C(e,n),children:Kh(r,e.node.children,t)},e.node.id)})}),(0,Z.jsx)(yh,{value:_h(b)}),(0,Z.jsx)($h,{message:d?o(`Cannot compute`,`无法计算`):c})]})}function gg({node:e,visible:t}){let n=(0,y.useId)(),r=$(),{runtime:i,mode:a}=r,o=Q(),{write:s,error:c}=Nh(e),l=ch(i,e,`label`,o(`Options`,`选项`),o),{disabled:u,invalid:d}=Ph(e),f=nh(e),p=ug(e),m=mh(i,e),h=typeof m==`string`?m:``,g=n,_=p.find(e=>e.value===h),v=_?fg(i,_.node,o):``;return p.length===0?(0,Z.jsx)(Ih,{message:o(`Missing options`,`缺少选项`)}):a===`static`?(0,Z.jsx)(vh,{className:`local-radio-group`,label:l,value:_h(v)}):(0,Z.jsxs)(`fieldset`,{className:`md-control local-radio-group`,style:xh(bh(e)),disabled:u,"aria-invalid":f.invalid||void 0,"aria-describedby":f.describedBy,children:[(0,Z.jsx)(`legend`,{className:`md-label`,children:l}),p.map(e=>(0,Z.jsxs)(`label`,{className:`local-radio-option`,children:[(0,Z.jsx)(`input`,{type:`radio`,name:g,value:e.value,checked:h===e.value,onChange:()=>s(e.value)}),(0,Z.jsx)(`span`,{children:Kh(r,e.node.children,t)})]},e.node.id)),(0,Z.jsx)(yh,{value:_h(v)}),(0,Z.jsx)($h,{message:d?o(`Cannot compute`,`无法计算`):c})]})}function _g(e){return((e.children??[]).find(e=>e.type===`list`)?.children??[]).filter(e=>e.type===`listItem`).map((e,t)=>({id:`item-${t+1}`,node:e}))}function vg({node:e,visible:t}){let n=(0,y.useId)(),r=$(),{runtime:i,mode:a}=r,o=Q(),{write:s,error:c}=Nh(e),l=ch(i,e,`label`,o(`Checklist`,`清单`),o),{disabled:u,invalid:d}=Ph(e),f=nh(e),p=_g(e),m=mh(i,e),h=Array.isArray(m)?m.filter(e=>typeof e==`string`):[];if(p.length===0)return(0,Z.jsx)(Ih,{message:o(`Checklist requires a task list`,`清单需要任务列表`)});let g=e=>e?o(`Checked`,`已勾选`):o(`Unchecked`,`未勾选`);if(a===`static`)return(0,Z.jsxs)(`div`,{className:`local-checklist local-static-checklist`,style:xh(bh(e)),role:`group`,"aria-label":l,children:[(0,Z.jsx)(`span`,{className:`md-label`,children:l}),(0,Z.jsx)(`ul`,{className:`local-static-list`,children:p.map(e=>{let n=h.includes(e.id);return(0,Z.jsxs)(`li`,{className:`local-static-list-item`,children:[(0,Z.jsx)(`span`,{className:`local-static-state`,children:g(n)}),(0,Z.jsx)(`span`,{className:`local-static-item${n?` is-checked`:``}`,children:Kh(r,e.node.children,t)})]},e.id)})})]});let _=(e,t)=>{let n=new Set(h);t?n.add(e):n.delete(e),s(p.filter(e=>n.has(e.id)).map(e=>e.id))};return(0,Z.jsxs)(`fieldset`,{className:`local-checklist`,style:xh(bh(e)),disabled:u,"aria-invalid":f.invalid||void 0,"aria-describedby":f.describedBy,children:[(0,Z.jsx)(`legend`,{className:`md-label`,children:l}),p.map(e=>{let i=h.includes(e.id);return(0,Z.jsxs)(`div`,{className:`local-checklist-item`,children:[(0,Z.jsx)(`input`,{id:`${n}-${e.id}`,type:`checkbox`,checked:i,onChange:t=>_(e.id,t.target.checked)}),(0,Z.jsx)(`label`,{className:`local-checklist-text${i?` is-checked`:``}`,htmlFor:`${n}-${e.id}`,children:Kh(r,e.node.children,t)})]},e.id)}),(0,Z.jsx)(yh,{block:!0,value:(0,Z.jsx)(`ul`,{className:`local-static-list`,children:p.map(e=>{let t=h.includes(e.id);return(0,Z.jsxs)(`li`,{className:`local-static-list-item`,children:[(0,Z.jsx)(`span`,{className:`local-static-state`,children:g(t)}),(0,Z.jsx)(`span`,{className:`local-static-item${t?` is-checked`:``}`,children:dg(i,e.node.children,o)})]},e.id)})})}),(0,Z.jsx)($h,{message:d?o(`Cannot compute`,`无法计算`):c})]})}function yg(e,t=lp){let n=Math.max(0,Math.floor(e)),r=Math.floor(n/60),i=n%60;return r===0?t(`${i} seconds`,`${i} 秒`):`${r}:${String(i).padStart(2,`0`)}`}function bg({node:e}){let{runtime:t,mode:n}=$(),r=Q(),{write:i,error:a}=Nh(e),o=ch(t,e,`label`,r(`Counter`,`计数`),r),{disabled:s,invalid:c}=Ph(e),l=nh(e),u=ph(t,e,`min`,0),d=ah(e,`max`)===void 0?void 0:ph(t,e,`max`,0),f=ph(t,e,`step`,1),p=mh(t,e),m=typeof p==`number`&&Number.isFinite(p)?p:u,h=Number.isFinite(f)&&f>0?f:1,g=1e-9*Math.max(1,Math.abs(m)),_=m-h>=u-g,v=d===void 0||m+h<=d+g;if(n===`static`)return(0,Z.jsx)(vh,{className:`local-counter`,label:o,value:String(m)});let y=e=>{let t=Number((m+e*h).toFixed(12));i(t)};return(0,Z.jsxs)(`div`,{className:`local-counter`,role:`group`,"aria-label":o,"aria-invalid":l.invalid||void 0,"aria-describedby":l.describedBy,children:[(0,Z.jsx)(`span`,{className:`md-label`,children:o}),(0,Z.jsxs)(`div`,{className:`local-counter-row`,children:[(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-counter-button`,"aria-label":`${o} ${r(`decrease`,`减少`)}`,disabled:s||!_,onClick:()=>y(-1),children:`−`}),(0,Z.jsx)(`span`,{className:`local-counter-value`,"aria-live":`polite`,children:m}),(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-counter-button`,"aria-label":`${o} ${r(`increase`,`增加`)}`,disabled:s||!v,onClick:()=>y(1),children:`+`}),(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-quiet local-counter-reset`,disabled:s,onClick:()=>{try{t.reset(e)}catch{}},children:r(`Reset`,`恢复初值`)})]}),(0,Z.jsx)(yh,{value:String(m)}),(0,Z.jsx)($h,{message:c?r(`Cannot compute`,`无法计算`):a})]})}function xg({node:e,visible:t}){let{runtime:n,mode:r}=$(),i=fp(),a=Q(),o=ch(n,e,`label`,a(`Timer`,`计时器`),a),s=nh(e),c=ph(n,e,`duration`,60),l=Math.floor(c),u=mh(n,e),d=typeof u==`number`&&Number.isFinite(u)?Math.max(0,Math.ceil(u)):l,[f,p]=(0,y.useState)(!1),[m,h]=(0,y.useState)(!1),g=(0,y.useRef)(0),_=(0,y.useRef)(d);_.current=d;let[v,b]=(0,y.useState)(null),x=(0,y.useCallback)(t=>{try{let r=n.set(e,t);r.length&&b(r.map(e=>tt(e,i)).join(`; `))}catch{}},[i,e,n]);return(0,y.useEffect)(()=>{if(!f)return;let e=window.setInterval(()=>{let e=Math.max(0,Math.ceil((g.current-performance.now())/1e3));e!==_.current&&(_.current=e,x(e)),e<=0&&(p(!1),h(!0))},200);return()=>window.clearInterval(e)},[f,x]),(0,y.useEffect)(()=>{if(t||!f)return;let e=Math.max(0,Math.ceil((g.current-performance.now())/1e3));_.current=e,x(e),p(!1)},[t,f,x]),Fh(n,e,()=>{p(!1),h(!1),b(null)}),!Number.isFinite(c)||l<=0?(0,Z.jsx)(Ih,{message:a(`Timer duration must be a positive number of seconds`,`计时时长必须是大于 0 的秒数`)}):r===`static`?(0,Z.jsx)(vh,{className:`local-timer`,label:o,value:yg(d,a)}):(0,Z.jsxs)(`div`,{className:`local-timer`,role:`group`,"aria-label":o,"aria-invalid":s.invalid||void 0,"aria-describedby":s.describedBy,children:[(0,Z.jsxs)(`div`,{className:`local-timer-head`,children:[(0,Z.jsx)(`span`,{className:`md-label`,children:o}),(0,Z.jsx)(`span`,{className:`local-timer-value`,role:`timer`,"aria-label":a(`${d} seconds remaining`,`剩余 ${d} 秒`),children:yg(d,a)})]}),(0,Z.jsxs)(`div`,{className:`local-timer-controls`,children:[(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-primary`,onClick:()=>{if(f)return;let e=d>0?d:l;d<=0&&(_.current=l,x(l)),g.current=performance.now()+e*1e3,h(!1),b(null),p(!0)},disabled:f,children:a(`Start`,`开始`)}),(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary`,onClick:()=>{if(!f)return;let e=Math.max(0,Math.ceil((g.current-performance.now())/1e3));_.current=e,x(e),p(!1)},disabled:!f,children:a(`Pause`,`暂停`)}),(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-quiet`,onClick:()=>{p(!1),h(!1),b(null),_.current=l;try{n.reset(e)}catch{}},children:a(`Reset`,`重置`)})]}),(0,Z.jsx)(`span`,{className:`local-timer-status`,role:`status`,"aria-live":`polite`,children:m?a(`Completed`,`计时完成`):f?a(`Running`,`计时中`):a(`Paused`,`已暂停`)}),(0,Z.jsx)(yh,{value:yg(d,a)}),(0,Z.jsx)($h,{message:v})]})}function Sg({node:e}){let{runtime:t}=$(),n=Q(),r=ch(t,e,`label`,n(`Progress`,`进度`),n),i=ph(t,e,`max`,100),a=oh(t,e,`value`);if(!Number.isFinite(i)||i<=0)return(0,Z.jsx)(Ih,{message:n(`Progress maximum must be positive`,`进度上限必须是正数`)});if(!a.present||!a.ok)return(0,Z.jsx)(Ih,{});let o=a.value,s=typeof o==`number`?o:typeof o==`string`&&o.trim()!==``?Number(o):NaN;if(!Number.isFinite(s))return(0,Z.jsx)(Ih,{});if(s<0||s>i)return(0,Z.jsx)(Ih,{message:n(`Progress value must be between 0 and ${i}`,`进度值需要在 0 到 ${i} 之间`)});let c=s/i*100,l=bh(e);return(0,Z.jsxs)(`div`,{className:`local-progress`,style:l?{"--local-progress-color":l}:void 0,children:[(0,Z.jsxs)(`div`,{className:`local-progress-head`,children:[(0,Z.jsx)(`span`,{className:`md-label`,children:r}),(0,Z.jsxs)(`span`,{className:`local-progress-value`,children:[Math.round(c),`%`]})]}),(0,Z.jsx)(`div`,{className:`local-progress-track`,role:`progressbar`,"aria-label":r||n(`Progress`,`进度`),"aria-valuemin":0,"aria-valuemax":i,"aria-valuenow":s,children:(0,Z.jsx)(`div`,{className:`local-progress-fill`,style:{width:`${c}%`}})})]})}function Cg({node:e,visible:t}){let{runtime:n,render:r,mode:i}=$(),a=Q(),o=ch(n,e,`title`,``,a),s=uh(n,e,`reset`,!0)&&i!==`static`,[c,l]=(0,y.useState)(null);return(0,Z.jsxs)(`section`,{className:`local-panel`,"aria-label":o||a(`Parameter panel`,`参数面板`),children:[o||s?(0,Z.jsxs)(`div`,{className:`local-panel-head`,children:[o?(0,Z.jsx)(`h3`,{className:`local-panel-title`,children:o}):(0,Z.jsx)(`span`,{}),s?(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-quiet local-panel-reset`,onClick:()=>{try{n.reset(e),l(null)}catch(e){l(e instanceof Error?e.message:a(`Cannot reset`,`无法恢复默认`))}},"aria-label":o?a(`Reset ${o}`,`${o} 恢复默认`):a(`Reset`,`恢复默认`),children:a(`Reset`,`恢复默认`)}):null]}):null,(0,Z.jsx)(`div`,{className:`local-panel-body`,children:r(e.children??[],t)}),(0,Z.jsx)($h,{message:c})]})}function wg({node:e,visible:t}){let{runtime:n,render:r}=$(),i=ch(n,e,`title`,``,Q());return(0,Z.jsxs)(`section`,{className:`md-card local-card`,children:[i?(0,Z.jsx)(`h3`,{className:`md-card-title`,children:i}):null,(0,Z.jsx)(`div`,{className:`md-card-body`,children:r(e.children??[],t)})]})}function Tg({node:e,visible:t}){let{runtime:n,render:r}=$(),i=Math.min(4,Math.max(1,Math.floor(ph(n,e,`columns`,2))));return(0,Z.jsx)(`div`,{className:`local-grid`,style:{"--local-grid-columns":String(i)},children:r(e.children??[],t)})}function Eg({node:e,visible:t}){let{render:n}=$();return(0,Z.jsx)(`div`,{className:`local-tabpanel-body`,children:n(e.children??[],t)})}function Dg(){return null}function Og({node:e,visible:t}){let n=(0,y.useId)(),{runtime:r,render:i,mode:a}=$(),o=Q(),{write:s,error:c}=Nh(e),l=ch(r,e,`label`,``,o),u=nh(e),d=(e.children??[]).filter(e=>e.type===`component`&&e.name===`tab`),f=d.map((e,t)=>ah(e,`value`)??`tab-${t+1}`),p=d.map((e,t)=>ch(r,e,`label`,f[t],o)),m=ah(e,`initial`)??f[0]??``,h=ah(e,`bind`)!==void 0,g=mh(r,e),_=typeof g==`string`?g:``,[v,b]=(0,y.useState)(()=>f.includes(m)?m:f[0]??``),x=(0,y.useRef)([]);if(Fh(r,e,()=>{b(f.includes(m)?m:f[0]??``)}),d.length===0)return(0,Z.jsx)(Ih,{message:o(`Tabs requires at least one tab`,`标签页至少需要一个 tab`)});if(a===`static`)return(0,Z.jsxs)(`section`,{className:`local-tabs local-static-tabs`,"aria-label":l||o(`Tabs`,`选项卡`),children:[l?(0,Z.jsx)(`div`,{className:`local-tabs-label`,children:l}):null,d.map((e,n)=>(0,Z.jsxs)(`section`,{className:`local-static-tab`,children:[(0,Z.jsx)(`h4`,{className:`local-static-tab-label`,children:p[n]}),(0,Z.jsx)(`div`,{className:`local-static-tab-body`,children:i(e.children??[],t)})]},e.id))]});let S=h?f.includes(_)?_:f[0]:f.includes(v)?v:f[0],C=Math.max(0,f.indexOf(S)),w=e=>{let t=f[e];t!==void 0&&(h?s(t):b(t),x.current[e]?.focus())};return(0,Z.jsxs)(`section`,{className:`local-tabs`,"aria-label":l||o(`Tabs`,`选项卡`),"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,children:[l?(0,Z.jsx)(`div`,{className:`local-tabs-label`,children:l}):null,(0,Z.jsx)(`div`,{className:`local-tablist`,role:`tablist`,"aria-label":l||o(`Tabs`,`选项卡`),onKeyDown:e=>{let t=-1;e.key===`ArrowRight`?t=(C+1)%d.length:e.key===`ArrowLeft`?t=(C-1+d.length)%d.length:e.key===`Home`?t=0:e.key===`End`&&(t=d.length-1),!(t<0)&&(e.preventDefault(),w(t))},children:d.map((e,t)=>{let r=f[t],i=r===S;return(0,Z.jsx)(`button`,{ref:e=>{x.current[t]=e},id:`${n}-tab-${t}`,type:`button`,role:`tab`,className:`local-tab${i?` is-selected`:``}`,"aria-selected":i,"aria-controls":`${n}-panel-${t}`,tabIndex:i?0:-1,onClick:()=>{h?s(r):b(r)},children:p[t]},e.id)})}),d.map((e,r)=>{let a=f[r]===S;return(0,Z.jsxs)(`div`,{id:`${n}-panel-${r}`,className:`local-tabpanel`,role:`tabpanel`,"aria-labelledby":`${n}-tab-${r}`,tabIndex:0,hidden:!a,children:[(0,Z.jsx)(yh,{block:!0,value:p[r]}),i(e.children??[],t&&a)]},e.id)}),(0,Z.jsx)($h,{message:c})]})}function kg({node:e,visible:t}){let{runtime:n,render:r}=$(),i=Q(),a=ch(n,e,`label`,``,i);return(0,Z.jsxs)(`div`,{className:`local-accordion`,role:`group`,"aria-label":a||i(`Accordion`,`折叠面板`),children:[a?(0,Z.jsx)(`div`,{className:`local-accordion-label`,children:a}):null,r(e.children??[],t)]})}function Ag({node:e,visible:t}){let n=(0,y.useId)(),{runtime:r,render:i,mode:a}=$(),o=Q(),s=ch(r,e,`label`,o(`Details`,`折叠内容`),o),c=uh(r,e,`open`,!1),[l,u]=(0,y.useState)(c);if(Fh(r,e,()=>{u(c)}),a===`static`)return(0,Z.jsxs)(`section`,{className:`local-disclosure local-static-disclosure`,children:[(0,Z.jsx)(`h3`,{className:`local-disclosure-heading`,children:s}),(0,Z.jsx)(`div`,{className:`local-disclosure-panel`,children:i(e.children??[],t)})]});let d=`${n}-disclosure-trigger`,f=`${n}-disclosure-panel`;return(0,Z.jsxs)(`div`,{className:`local-disclosure`,children:[(0,Z.jsxs)(`h3`,{className:`local-disclosure-heading`,children:[(0,Z.jsxs)(`button`,{id:d,type:`button`,className:`local-disclosure-trigger`,"aria-expanded":l,"aria-controls":f,onClick:()=>u(e=>!e),children:[(0,Z.jsx)(`span`,{className:`local-chevron${l?` is-open`:``}`,"aria-hidden":`true`,children:`▸`}),(0,Z.jsx)(`span`,{children:s})]}),(0,Z.jsx)(yh,{value:s})]}),(0,Z.jsx)(`div`,{id:f,className:`local-disclosure-panel`,role:`region`,"aria-labelledby":d,hidden:!l,children:i(e.children??[],t&&l)})]})}function jg({node:e,visible:t}){let{runtime:n,render:r}=$(),i=Q(),a=lh(n,e,`when`,!1),o=a.ok?a.value:!1,s=!a.ok,c=(0,y.useRef)(null),l=(0,y.useRef)(o),u=(0,y.useRef)(!1);return(0,y.useEffect)(()=>{if(l.current&&!o){if(u.current){let e=c.current?.closest(`.local-document`);e&&(e.tabIndex=-1,e.focus({preventScroll:!0}))}u.current=!1}l.current=o},[o]),(0,Z.jsxs)(Z.Fragment,{children:[s?(0,Z.jsx)(Ih,{}):null,(0,Z.jsx)(`div`,{ref:c,className:`local-if md-if`,role:`group`,"aria-label":i(`Conditional content`,`条件内容`),tabIndex:-1,hidden:!o,"aria-hidden":!o,onFocus:()=>{u.current=!0},onBlur:e=>{c.current?.contains(e.relatedTarget)||(u.current=!1)},children:r(e.children??[],t&&o)})]})}function Mg(){let e=Q();return(0,Z.jsx)(`span`,{className:`local-error local-tone-error`,role:`status`,children:e(`Invalid tone; using the default style`,`色调无效,已使用默认样式`)})}function Ng({node:e,visible:t}){let{runtime:n,render:r}=$(),i=ch(n,e,`title`,``,Q()),{tone:a,error:o}=dh(n,e,`tone`,[`info`,`success`,`warning`],`info`),s=a===`warning`?`alert`:`status`;return(0,Z.jsxs)(Z.Fragment,{children:[o?(0,Z.jsx)(Mg,{}):null,(0,Z.jsxs)(`div`,{className:`local-alert local-alert-${a}`,role:s,children:[i?(0,Z.jsx)(`div`,{className:`local-alert-title`,children:i}):null,(0,Z.jsx)(`div`,{className:`local-alert-body`,children:r(e.children??[],t)})]})]})}function Pg({node:e,visible:t}){let n=$(),{runtime:r}=n,{tone:i,error:a}=dh(r,e,`tone`,[`neutral`,`success`,`warning`],`neutral`),o=bh(e);return(0,Z.jsxs)(Z.Fragment,{children:[a?(0,Z.jsx)(Mg,{}):null,(0,Z.jsx)(`span`,{className:`md-badge md-badge-${i} local-badge`,style:o?{color:o}:void 0,children:Kh(n,e.children,t)})]})}function Fg({node:e,visible:t}){let n=(0,y.useId)(),r=$(),{runtime:i,mode:a}=r,o=Q(),s=ch(i,e,`text`,o(`Tooltip`,`提示`),o),[c,l]=(0,y.useState)(!1),u=`${n}-tooltip`;return a===`static`?(0,Z.jsxs)(`span`,{className:`local-tooltip local-static-tooltip`,children:[(0,Z.jsx)(`span`,{className:`local-tooltip-trigger`,children:Kh(r,e.children,t)}),(0,Z.jsx)(`span`,{className:`local-tooltip-bubble is-visible`,role:`note`,children:s})]}):(0,Z.jsxs)(`span`,{className:`local-tooltip`,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[(0,Z.jsx)(`span`,{className:`local-tooltip-trigger`,tabIndex:0,"aria-describedby":u,onFocus:()=>l(!0),onBlur:()=>l(!1),onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),l(!1))},children:Kh(r,e.children,t)}),(0,Z.jsx)(`span`,{id:u,role:`tooltip`,className:`local-tooltip-bubble${c?` is-visible`:``}`,children:s}),(0,Z.jsx)(yh,{value:s})]})}function Ig({node:e,visible:t}){let n=(0,y.useId)(),r=$(),{anchors:i,rootRef:a,runtime:o,urlPolicy:s,mode:c}=r,l=Q(),u=`${n}-jump-feedback`,[d,f]=(0,y.useState)(null),p=ah(e,`to`)??``,m=i.targetId(p),h=ah(e,`appearance`)===`button`?`button`:`link`,g=bh(e),_=m?`#${m}`:`#`,v=m!==void 0;if(v&&s)try{v=s(`#${p}`,`link`)===!0}catch{v=!1}return Fh(o,e,()=>f(null)),c===`static`?v&&m?(0,Z.jsx)(`a`,{href:`#${m}`,className:`local-jump local-jump-link local-jump-static`,style:xh(g),children:Kh(r,e.children,t)}):(0,Z.jsx)(`span`,{className:`local-jump local-jump-static-blocked`,style:xh(g),children:Kh(r,e.children,t)}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`a`,{href:v?_:`#`,className:`local-jump local-jump-${h}`,style:xh(g),"data-local-target-missing":m?void 0:`true`,"data-local-jump-blocked":m&&!v?`true`:void 0,"aria-describedby":d?u:void 0,onClick:e=>{if(!v||!m){e.preventDefault(),f(m?l(`Jump is blocked by the host`,`跳转已被主机策略阻止`):l(`Jump target not found`,`找不到跳转目标`));return}let t=a.current;if(!t||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let n=null;try{n=t.querySelector(`[id="${m}"]`)}catch{n=null}if(!n){e.preventDefault(),f(l(`Jump target not found`,`找不到跳转目标`));return}if(n.closest(`[hidden]`)){e.preventDefault(),f(l(`Jump target is hidden`,`跳转目标当前隐藏`));return}e.preventDefault(),n.hasAttribute(`tabindex`)||(n.tabIndex=-1);try{n.focus({preventScroll:!0})}catch{}let r=`smooth`;try{window.matchMedia(`(prefers-reduced-motion: reduce)`).matches&&(r=`auto`)}catch{r=`auto`}try{n.scrollIntoView({behavior:r,block:`start`})}catch{}f(null)},children:Kh(r,e.children,t)}),d?(0,Z.jsx)(`span`,{id:u,className:`local-jump-feedback`,role:`status`,"aria-live":`polite`,children:d}):null]})}function Lg({node:e}){let{anchors:t}=$(),n=t.anchorIds.get(e);return n?(0,Z.jsx)(`span`,{className:`local-anchor`,id:n,"data-local-anchor":``}):null}function Rg({node:e,visible:t}){let n=$(),r=bh(e);return(0,Z.jsx)(`span`,{className:`local-text`,style:r?{color:r}:void 0,children:Kh(n,e.children,t)})}function zg({node:e,visible:t}){let{render:n}=$(),r=bh(e);return(0,Z.jsx)(`div`,{className:`local-section`,style:r?{color:r}:void 0,children:n(e.children??[],t)})}function Bg({node:e,visible:t}){let n=(0,y.useId)(),r=$(),{runtime:i,mode:a}=r,o=Q(),{write:s,error:c,setError:l}=Nh(e),u=ch(i,e,`label`,o(`Multi select`,`多选`),o),{disabled:d,invalid:f}=Ph(e),p=nh(e),m=ug(e),h=mh(i,e),g=Array.isArray(h)?h.filter(e=>typeof e==`string`):[],_=m.filter(e=>g.includes(e.value)).map(e=>fg(i,e.node,o)||e.value),v=ph(i,e,`max-selected`,m.length),b=Number.isFinite(v)?Math.max(0,Math.floor(v)):m.length,[x,S]=(0,y.useState)(``);if(Fh(i,e,()=>{S(``),l(null)}),m.length===0)return(0,Z.jsx)(Ih,{message:o(`Missing options`,`缺少选项`)});if(a===`static`)return(0,Z.jsx)(vh,{className:`local-multi-select`,label:u,value:_h(_.join(`, `))});let C=new Set(g),w=g.length>=b,T=x.trim().toLocaleLowerCase(),E=T?m.filter(e=>`${dg(i,e.node.children,o)} ${e.value}`.toLocaleLowerCase().includes(T)):m,D=(e,t)=>{let n=new Set(C);if(t){if(!n.has(e)&&n.size>=b)return;n.add(e)}else n.delete(e);s(m.filter(e=>n.has(e.value)).map(e=>e.value))};return(0,Z.jsxs)(`fieldset`,{className:`local-multi-select`,style:xh(bh(e)),disabled:d,"aria-invalid":p.invalid||void 0,"aria-describedby":p.describedBy,children:[(0,Z.jsx)(`legend`,{className:`md-label`,children:u}),(0,Z.jsxs)(`div`,{className:`local-multi-toolbar`,children:[(0,Z.jsx)(`input`,{id:`${n}-multi-search`,type:`search`,className:`md-text-input local-multi-search`,value:x,placeholder:o(`Search options`,`搜索选项`),"aria-label":o(`Search ${u}`,`搜索${u}`),onChange:e=>S(e.target.value)}),(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-quiet local-multi-clear`,onClick:()=>{S(``),g.length>0&&s([])},children:o(`Clear`,`清除`)})]}),(0,Z.jsx)(`div`,{className:`local-multi-list`,role:`group`,"aria-label":u,children:E.length===0?(0,Z.jsx)(`span`,{className:`local-multi-empty`,children:o(`No matching options`,`没有匹配选项`)}):E.map(e=>{let n=C.has(e.value);return(0,Z.jsxs)(`label`,{className:`local-multi-option${n?` is-selected`:``}`,children:[(0,Z.jsx)(`input`,{type:`checkbox`,checked:n,disabled:!n&&w,onChange:t=>D(e.value,t.target.checked)}),(0,Z.jsx)(`span`,{children:Kh(r,e.node.children,t)})]},e.node.id)})}),(0,Z.jsx)(`span`,{className:`local-multi-count`,role:`status`,"aria-live":`polite`,children:o(`${g.length} of ${b} selected`,`已选 ${g.length}/${b}`)}),(0,Z.jsx)(yh,{value:_h(_.join(`, `))}),(0,Z.jsx)($h,{message:f?o(`Cannot compute`,`无法计算`):c})]})}function Vg({node:e}){let{runtime:t,mode:n}=$(),r=Q(),{write:i,error:a,setError:o}=Nh(e),s=ch(t,e,`label`,r(`Range`,`范围`),r),{disabled:c,invalid:l}=Ph(e),u=nh(e),{min:d,max:f,step:p}=Mh(t,e,`min`,`max`,0,100,1),m=Math.floor((f-d)/p+1e-9),h=d,g=kh(d+Math.max(0,m)*p,d,f),_=Ah(jh(t,e,`start`,h),d,f,p),v=Ah(jh(t,e,`end`,g),d,f,p);_>v&&(_=v);let[b,x]=(0,y.useState)(null);Fh(t,e,()=>{x(null),o(null)});let S=r(`Start`,`起点`),C=r(`End`,`终点`),w=`${S}: ${_} · ${C}: ${v}`;if(n===`static`)return(0,Z.jsx)(vh,{className:`local-range-slider`,label:s,value:w});let T=(e,t)=>{let n=Ah(kh(t,d,f),d,f,p);e===`start`&&n>v?x(r(`Start cannot exceed end`,`起点不能超过终点`)):e===`end`&&n<_?x(r(`End cannot be less than start`,`终点不能小于起点`)):(x(null),i(n,e))};return(0,Z.jsxs)(`div`,{className:`md-control local-range-slider`,style:xh(bh(e)),role:`group`,"aria-label":s,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,children:[(0,Z.jsx)(`span`,{className:`md-label`,children:s}),(0,Z.jsxs)(`div`,{className:`local-range-row`,children:[(0,Z.jsx)(`span`,{className:`local-range-name`,children:r(`Start`,`起点`)}),(0,Z.jsx)(`input`,{type:`range`,className:`local-range-input`,min:d,max:v,step:p,value:_,disabled:c,"aria-label":`${s} ${r(`Start`,`起点`)}`,onChange:e=>T(`start`,Number(e.target.value))}),(0,Z.jsx)(`span`,{className:`local-range-value`,"aria-hidden":`true`,children:_})]}),(0,Z.jsxs)(`div`,{className:`local-range-row`,children:[(0,Z.jsx)(`span`,{className:`local-range-name`,children:r(`End`,`终点`)}),(0,Z.jsx)(`input`,{type:`range`,className:`local-range-input`,min:_,max:f,step:p,value:v,disabled:c,"aria-label":`${s} ${r(`End`,`终点`)}`,onChange:e=>T(`end`,Number(e.target.value))}),(0,Z.jsx)(`span`,{className:`local-range-value`,"aria-hidden":`true`,children:v})]}),(0,Z.jsx)(yh,{value:w}),(0,Z.jsx)($h,{message:l?r(`Cannot compute`,`无法计算`):b??a})]})}function Hg({id:e,label:t,value:n,min:r,max:i,step:a,disabled:o,onCommit:s,reset:c}){let[l,u]=(0,y.useState)(()=>String(n)),[d,f]=(0,y.useState)(!1),p=(0,y.useRef)(n);(0,y.useEffect)(()=>{u(String(n)),f(!1)},[c]),(0,y.useEffect)(()=>{p.current!==n&&(p.current=n,d||u(String(n)))},[n,d]);let m=e=>{let t=e.trim();if(t===``||t===`-`||t===`.`||t===`-.`)return null;let n=Number(t);return Number.isFinite(n)?Ah(kh(n,r,i),r,i,a):null};return(0,Z.jsxs)(`div`,{className:`local-number-field`,children:[(0,Z.jsx)(`label`,{className:`md-label`,htmlFor:e,children:t}),(0,Z.jsx)(`input`,{id:e,className:`md-text-input`,type:`text`,inputMode:`decimal`,value:l,disabled:o,onFocus:()=>f(!0),onBlur:()=>{f(!1);let e=m(l);u(String(e??n))},onChange:e=>{let t=e.target.value;u(t);let n=m(t);n!==null&&s(n)}})]})}function Ug({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=$(),i=Q(),{write:a,writeMany:o,error:s,setError:c}=Nh(e),l=ch(n,e,`label`,i(`Coordinate`,`坐标`),i),{disabled:u,invalid:d}=Ph(e),f=nh(e),p=Mh(n,e,`x-min`,`x-max`,-5,5,1),m=Mh(n,e,`y-min`,`y-max`,-5,5,1),h=Ah(0,p.min,p.max,p.step),g=Ah(0,m.min,m.max,m.step),_=Ah(jh(n,e,`x`,h),p.min,p.max,p.step),v=Ah(jh(n,e,`y`,g),m.min,m.max,m.step),b=(0,y.useRef)(null),x=(0,y.useRef)(!1);Fh(n,e,()=>c(null));let S=`X: ${_} · Y: ${v}`;if(r===`static`)return(0,Z.jsx)(vh,{className:`local-coordinate`,label:l,value:S});let C=e=>p.max>p.min?40+(e-p.min)/(p.max-p.min)*320:200,w=e=>m.max>m.min?360-(e-m.min)/(m.max-m.min)*320:200,T=C(_),E=w(v),D=C(kh(0,p.min,p.max)),O=w(kh(0,m.min,m.max)),k=e=>{let t=e.step*Math.max(1,Math.ceil((e.max-e.min)/(e.step*10))),n=Math.min(11,Math.floor((e.max-e.min)/t)+1);return Array.from({length:n},(n,r)=>e.min+r*t)},A=e=>{let t=b.current?.getBoundingClientRect();if(!t||t.width===0||t.height===0)return null;let n=kh(((e.clientX-t.left)/t.width-.1)/.8,0,1),r=kh(((e.clientY-t.top)/t.height-.1)/.8,0,1);return{x:Ah(p.min+n*(p.max-p.min),p.min,p.max,p.step),y:Ah(m.min+(1-r)*(m.max-m.min),m.min,m.max,m.step)}},j=(e,t)=>{(e!==_||t!==v)&&o({x:e,y:t})};return(0,Z.jsxs)(`div`,{className:`local-coordinate`,style:xh(bh(e)),role:`group`,"aria-label":l,"aria-invalid":f.invalid||void 0,"aria-describedby":f.describedBy,children:[(0,Z.jsx)(`span`,{className:`md-label`,children:l}),(0,Z.jsxs)(`div`,{className:`local-coordinate-surface`,children:[(0,Z.jsx)(`div`,{ref:b,className:`local-coordinate-pad`,role:`group`,"aria-label":i(`${l} drag area`,`${l} 拖拽区`),"aria-disabled":u||void 0,tabIndex:u?-1:0,onKeyDown:e=>{if(u)return;let t=_,n=v;switch(e.key){case`ArrowLeft`:t=Ah(_-p.step,p.min,p.max,p.step);break;case`ArrowRight`:t=Ah(_+p.step,p.min,p.max,p.step);break;case`ArrowDown`:n=Ah(v-m.step,m.min,m.max,m.step);break;case`ArrowUp`:n=Ah(v+m.step,m.min,m.max,m.step);break;case`Home`:t=p.min,n=m.min;break;case`End`:t=Ah(p.max,p.min,p.max,p.step),n=Ah(m.max,m.min,m.max,m.step);break;default:return}e.preventDefault(),j(t,n)},onPointerDown:e=>{if(u)return;e.preventDefault(),x.current=!0,b.current?.focus({preventScroll:!0});try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}let t=A(e);t&&j(t.x,t.y)},onPointerMove:e=>{if(!x.current||u)return;let t=A(e);t&&j(t.x,t.y)},onPointerUp:e=>{x.current=!1;try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}},onPointerCancel:()=>{x.current=!1},children:(0,Z.jsxs)(`svg`,{className:`local-coordinate-svg`,viewBox:`0 0 400 400`,"aria-hidden":`true`,focusable:`false`,children:[(0,Z.jsx)(`defs`,{children:(0,Z.jsx)(`marker`,{id:`${t}-coordinate-arrow`,markerWidth:`8`,markerHeight:`8`,refX:`6`,refY:`4`,orient:`auto`,viewBox:`0 0 8 8`,children:(0,Z.jsx)(`path`,{className:`local-coordinate-arrow`,d:`M1 1 L6 4 L1 7`})})}),(0,Z.jsxs)(`g`,{className:`local-coordinate-grid`,children:[(0,Z.jsx)(`rect`,{x:`40`,y:`40`,width:`320`,height:`320`}),k(p).map((e,t)=>(0,Z.jsx)(`line`,{x1:C(e),y1:`40`,x2:C(e),y2:`360`},`x-${t}`)),k(m).map((e,t)=>(0,Z.jsx)(`line`,{x1:`40`,y1:w(e),x2:`360`,y2:w(e)},`y-${t}`))]}),(0,Z.jsxs)(`g`,{className:`local-coordinate-axes`,children:[(0,Z.jsx)(`line`,{className:`local-coordinate-horizontal`,x1:`26`,y1:O,x2:`372`,y2:O,markerEnd:`url(#${t}-coordinate-arrow)`}),(0,Z.jsx)(`line`,{className:`local-coordinate-vertical`,x1:D,y1:`374`,x2:D,y2:`24`,markerEnd:`url(#${t}-coordinate-arrow)`})]}),(0,Z.jsxs)(`g`,{className:`local-coordinate-axis-label`,children:[(0,Z.jsx)(`text`,{x:`358`,y:O-14,children:`x`}),(0,Z.jsx)(`text`,{x:D+12,y:`40`,children:`y`})]}),(0,Z.jsxs)(`g`,{className:`local-coordinate-projection`,children:[(0,Z.jsx)(`line`,{x1:T,y1:E,x2:T,y2:O}),(0,Z.jsx)(`line`,{x1:T,y1:E,x2:D,y2:E})]}),(0,Z.jsx)(`circle`,{className:`local-coordinate-dot`,cx:T,cy:E,r:`10`}),(0,Z.jsx)(`text`,{className:`local-coordinate-value`,x:T,y:E>330?E-22:E+30,textAnchor:T<80?`start`:T>320?`end`:`middle`,children:`(${_}, ${v})`})]})}),(0,Z.jsx)(`span`,{className:`local-coordinate-caption`,children:i(`Draggable coordinate plane`,`可拖动的坐标平面`)})]}),(0,Z.jsx)(`span`,{className:`md-hint local-hint`,children:i(`Arrow keys adjust the point; Home and End jump to the lower or upper bounds.`,`方向键调整坐标;Home 和 End 跳到最小或最大边界。`)}),(0,Z.jsxs)(`div`,{className:`local-coordinate-fields`,children:[(0,Z.jsx)(Hg,{id:`${t}-coordinate-x`,reset:n.resetToken(e),label:`${l} X`,value:_,min:p.min,max:p.max,step:p.step,disabled:u,onCommit:e=>a(e,`x`)}),(0,Z.jsx)(Hg,{id:`${t}-coordinate-y`,reset:n.resetToken(e),label:`${l} Y`,value:v,min:m.min,max:m.max,step:m.step,disabled:u,onCommit:e=>a(e,`y`)})]}),(0,Z.jsx)(yh,{value:S}),(0,Z.jsx)($h,{message:d?i(`Cannot compute`,`无法计算`):s})]})}function Wg({node:e,visible:t}){let n=(0,y.useId)(),r=$(),{runtime:i,mode:a}=r,o=Q(),s=ch(i,e,`label`,o(`Quiz`,`测验`),o),c=ah(e,`type`)===`number`?`number`:`choice`,l=(ah(e,`answer`)??``).trim(),u=ph(i,e,`tolerance`,0),d=Number.isFinite(u)&&u>=0?u:0,{disabled:f,invalid:p}=Ph(e),m=ug(e),h=ch(i,e,`explanation`,``,o),[g,_]=(0,y.useState)(``),[v,b]=(0,y.useState)(null);Fh(i,e,()=>{_(``),b(null)});let x=c===`number`?Number(l):NaN;if(c===`number`&&!Number.isFinite(x))return(0,Z.jsx)(Ih,{message:o(`Quiz answer must be a number`,`测验答案必须是数字`)});if(c===`choice`&&m.length===0)return(0,Z.jsx)(Ih,{message:o(`Missing options`,`缺少选项`)});let S=m.map(e=>fg(i,e.node,o)||e.value);if(a===`static`)return(0,Z.jsxs)(`div`,{className:`local-quiz local-static-quiz`,role:`group`,"aria-label":s,children:[(0,Z.jsx)(`span`,{className:`md-label`,children:s}),c===`choice`?(0,Z.jsx)(`ul`,{className:`local-static-list local-static-quiz-options`,children:m.map(e=>(0,Z.jsx)(`li`,{className:`local-static-list-item`,children:Kh(r,e.node.children,t)},e.node.id))}):(0,Z.jsx)(`span`,{className:`local-static-value`,children:o(`Numeric answer`,`数字作答`)})]});let C=()=>{if(c===`choice`){if(g===``){b(`incomplete`);return}b(g===l?`correct`:`incorrect`);return}let e=g.trim(),t=e===``?NaN:Number(e);b(Number.isFinite(t)?Math.abs(t-x)<=d?`correct`:`incorrect`:`incomplete`)},w=()=>{_(``),b(null)},T=v===null?null:v===`correct`?`${o(`Correct`,`回答正确`)}`:v===`incorrect`?`${o(`Not quite`,`回答不正确`)}`:c===`number`?o(`Enter a number first`,`请先输入数字`):o(`Choose an answer first`,`请先选择答案`),E=v===`correct`?` is-correct`:v===`incorrect`?` is-incorrect`:``;return(0,Z.jsxs)(`div`,{className:`local-quiz`,role:`group`,"aria-label":s,children:[c===`choice`?(0,Z.jsxs)(`fieldset`,{className:`local-quiz-options`,disabled:f,children:[(0,Z.jsx)(`legend`,{className:`md-label`,children:s}),m.map(e=>(0,Z.jsxs)(`label`,{className:`local-radio-option`,children:[(0,Z.jsx)(`input`,{type:`radio`,name:`${n}-quiz`,value:e.value,checked:g===e.value,onChange:()=>{_(e.value),b(null)}}),(0,Z.jsx)(`span`,{children:Kh(r,e.node.children,t)})]},e.node.id))]}):(0,Z.jsxs)(`div`,{className:`local-quiz-number`,children:[(0,Z.jsx)(`label`,{className:`md-label`,htmlFor:`${n}-quiz`,children:s}),(0,Z.jsx)(`input`,{id:`${n}-quiz`,className:`md-text-input local-quiz-input`,type:`text`,inputMode:`decimal`,value:g,disabled:f,"aria-label":s,onChange:e=>{_(e.target.value),b(null)}})]}),(0,Z.jsxs)(`div`,{className:`local-quiz-actions`,children:[(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-primary local-quiz-check`,disabled:f,onClick:C,children:o(`Check answer`,`检查答案`)}),(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-quiz-again`,disabled:f,onClick:w,children:o(`Try again`,`再试一次`)})]}),(0,Z.jsx)(`span`,{className:`local-quiz-feedback${E}`,role:`status`,"aria-live":`polite`,children:T?`${v===`correct`?`✓ `:v===`incorrect`?`✗ `:``}${T}`:``}),v!==null&&h?(0,Z.jsx)(`div`,{className:`local-quiz-explanation`,children:h}):null,(0,Z.jsx)(yh,{block:!0,value:c===`choice`?`${T?`${T} · `:``}${S.join(` · `)}`:T||o(`No answer yet`,`尚未作答`)}),(0,Z.jsx)($h,{message:p?o(`Cannot compute`,`无法计算`):null})]})}function Gg({node:e,visible:t}){let n=(0,y.useId)(),{runtime:r,render:i,mode:a}=$(),o=Q(),{write:s,error:c,setError:l}=Nh(e),u=ch(r,e,`label`,``,o),d=nh(e),f=(e.children??[]).filter(e=>e.type===`component`&&e.name===`step`),p=f.map((e,t)=>ah(e,`value`)??`step-${t+1}`),m=f.map((e,t)=>ch(r,e,`label`,p[t],o)),h=ah(e,`initial`)??``,g=p.includes(h)?h:p[0]??``,_=mh(r,e),v=typeof _==`string`?_:``,b=(0,y.useRef)([]),x=(0,y.useRef)(!1);Fh(r,e,()=>{l(null),x.current=!1});let S=p.includes(v)?v:g,C=Math.max(0,p.indexOf(S));if((0,y.useEffect)(()=>{x.current&&(x.current=!1,b.current[C]?.focus({preventScroll:!0}))},[C,S]),f.length===0)return(0,Z.jsx)(Ih,{message:o(`Steps requires at least one step`,`步骤至少需要一个 step`)});if(a===`static`){let e=f[C];return(0,Z.jsxs)(`section`,{className:`local-steps local-static-steps`,"aria-label":u||o(`Steps`,`步骤`),children:[u?(0,Z.jsx)(`div`,{className:`local-steps-label`,children:u}):null,(0,Z.jsx)(`div`,{className:`local-steps-nav local-static-steps-nav`,children:(0,Z.jsx)(`span`,{className:`local-steps-status`,role:`status`,"aria-live":`polite`,children:o(`Step ${C+1} of ${f.length}`,`第 ${C+1} 步,共 ${f.length} 步`)})}),(0,Z.jsx)(`div`,{className:`local-steps-panel`,role:`group`,"aria-label":m[C],children:i(e.children??[],t)})]})}let w=e=>{let t=p[e];t!==void 0&&(x.current=!0,s(t))};return(0,Z.jsxs)(`section`,{className:`local-steps`,"aria-label":u||o(`Steps`,`步骤`),"aria-invalid":d.invalid||void 0,"aria-describedby":d.describedBy,children:[u?(0,Z.jsx)(`div`,{className:`local-steps-label`,children:u}):null,(0,Z.jsxs)(`div`,{className:`local-steps-nav`,children:[(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-steps-prev`,disabled:C<=0,onClick:()=>w(C-1),children:o(`Previous`,`上一步`)}),(0,Z.jsx)(`span`,{className:`local-steps-status`,role:`status`,"aria-live":`polite`,children:o(`Step ${C+1} of ${f.length}`,`第 ${C+1} 步,共 ${f.length} 步`)}),(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-steps-next`,disabled:C>=f.length-1,onClick:()=>w(C+1),children:o(`Next`,`下一步`)})]}),f.map((e,r)=>{let a=r===C;return(0,Z.jsx)(`div`,{id:`${n}-step-${r}`,ref:e=>{b.current[r]=e},className:`local-steps-panel`,role:`group`,"aria-label":m[r],tabIndex:-1,hidden:!a,children:i(e.children??[],t&&a)},e.id)}),(0,Z.jsx)($h,{message:c})]})}function Kg(){return null}var qg={panel:Cg,card:wg,grid:Tg,tabs:Og,tab:Eg,accordion:kg,disclosure:Ag,if:jg,alert:Ng,badge:Pg,validation:Zh,column:Qh,tooltip:Fg,input:tg,textarea:ng,number:ag,slider:og,toggle:sg,checkbox:cg,date:lg,select:mg,choices:hg,"radio-group":gg,option:pg,node:Eg,edge:Dg,counter:bg,timer:xg,checklist:vg,progress:Sg,jump:Ig,anchor:Lg,text:Rg,section:zg,"multi-select":Bg,"range-slider":Vg,coordinate:Ug,quiz:Wg,steps:Gg,step:Kg};function Jg({document:e,runtime:t,onDiagnostics:n,urlPolicy:r,locale:i=`en`,themes:a,colorScheme:o=`auto`,mode:s=`interactive`,staticFirst:c=!1,imageResolver:l}){let[u,d]=(0,y.useState)(!c);(0,y.useEffect)(()=>{c&&d(!0)},[c]);let f=s===`interactive`&&c&&!u?`static`:s,p=(0,y.useId)(),m=(0,y.useMemo)(()=>(e,t)=>pp(i,e,t),[i]),h=(0,y.useMemo)(()=>rr(e,`local-heading-${p}`),[e,p]),g=(0,y.useMemo)(()=>{try{return Un(e)}catch{return Ln}},[e]),_=(0,y.useRef)(n);_.current=n;let v=(0,y.useRef)(null),b=(0,y.useCallback)(e=>{_.current?.(e)},[]),x=Ch(a),S=(0,y.useMemo)(()=>{try{return Fu(e.theme,a,e.themeRange,e.source)}catch{return{name:Ou.name,diagnostics:[]}}},[e.theme,e.themeRange?.start,e.themeRange?.end,e.source,x]),C=Oh(v,o),w=(0,y.useRef)(``);(0,y.useEffect)(()=>{let e=wh(S.diagnostics);if(e===w.current)return;let t=w.current!==``;w.current=e,(S.diagnostics.length>0||t)&&b(S.diagnostics)},[S,b]);let T=(0,y.useCallback)(e=>{try{return t.subscribe(e)}catch{return()=>{}}},[t]),E=(0,y.useCallback)(()=>{try{return t.snapshot()}catch{return ih}},[t]);(0,y.useSyncExternalStore)(T,E,E);let D=``;if(e.validations?.length)try{D=wh(t.validate())}catch{D=`unavailable`}let O=(0,y.useMemo)(()=>th(e,t,p,m),[e,t,p,m,D]),k=(0,y.useMemo)(()=>({runtime:t,urlPolicy:r,imageResolver:l,anchors:h,t:m,mode:f,dependencies:g}),[t,r,l,h,m,f,g]),A=(0,y.useCallback)((e,t=!0)=>Uh(k,e??[],t),[k]),j=(0,y.useMemo)(()=>({runtime:t,render:A,visible:!0,mode:f,imageResolver:l,validation:O,report:b,urlPolicy:r,anchors:h,rootRef:v,t:m,dependencies:g}),[t,A,b,r,l,f,h,v,m,O,g]);return(0,Z.jsx)(dp,{locale:i,children:(0,Z.jsx)(`article`,{ref:v,className:`md-document local-document${f===`static`?` local-static`:``}`,"data-rmd-theme":S.name,"data-color-scheme":C,"data-render-mode":f,style:{colorScheme:C},"aria-label":f===`static`?m(`Static document`,`静态文档`):m(`Interactive document`,`交互文档`),children:(0,Z.jsx)(qm.Provider,{value:j,children:A(e.nodes,!0)})})})}var Yg=`reactive-md-state/v1`,Xg=1048576,Zg=/^fnv1a32:[0-9a-f]{8}$/,Qg=2166136261,$g=16777619,e_=new Set([`format`,`syntax`,`sourceDigest`,`parameters`,`generator`]),t_=new Set([`name`,`version`]),n_=new TextEncoder;function r_(e,t){return{code:e,message:t.length>2e3?`${t.slice(0,D-1)}…`:t,severity:`error`,range:{start:0,end:0},line:1,column:1}}function i_(e,t,n){e.length<100&&e.push(r_(t,n))}function a_(e){return e instanceof Error?e.message:String(e)}function o_(e){for(let t=0;t<e.length;t+=1){let n=e.charCodeAt(t);if(n>=55296&&n<=56319){let n=e.charCodeAt(t+1);if(n>=56320&&n<=57343){t+=1;continue}return!1}if(n>=56320&&n<=57343)return!1}return!0}function s_(e){if(typeof e!=`string`)throw TypeError(`localSourceDigest requires a source string.`);let t=n_.encode(e),n=Qg;for(let e=0;e<t.length;e+=1)n^=t[e],n=Math.imul(n,$g)>>>0;return`fnv1a32:${n.toString(16).padStart(8,`0`)}`}function c_(e){if(typeof e==`string`)return o_(e)?{ok:!0,value:e}:{ok:!1,message:`contains malformed Unicode.`};if(typeof e==`number`)return Number.isFinite(e)?{ok:!0,value:e}:{ok:!1,message:`must be a finite number.`};if(typeof e==`boolean`||e===null)return{ok:!0,value:e};if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n+=1){let r=e[n];if(typeof r!=`string`)return{ok:!1,message:`must be an array of strings.`};if(!o_(r))return{ok:!1,message:`contains malformed Unicode.`};t.push(r)}return{ok:!0,value:Object.freeze(t)}}return{ok:!1,message:`must be a string, finite number, boolean, null or string array.`}}function l_(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function u_(e){return Object.freeze(e.parameters),e.generator&&Object.freeze(e.generator),Object.freeze(e)}function d_(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`generator must be an object with string name and version.`);if(typeof e.name!=`string`||typeof e.version!=`string`)throw TypeError(`generator must have string name and version.`);if(!o_(e.name)||!o_(e.version))throw TypeError(`generator name and version must be well-formed Unicode strings.`);return Object.freeze({name:e.name,version:e.version})}function f_(e){return typeof e==`string`?`"${e.length>48?`${e.slice(0,48)}…`:e}"`:e===null?`null`:Array.isArray(e)?`an array`:typeof e}function p_(e,t){return e.length>t?e.length:n_.encode(e).byteLength}function m_(e,t){let n;try{let t=JSON.stringify(e);if(typeof t!=`string`)return null;n=t}catch{return null}return p_(n,t)}function h_(e){if(e===void 0)return Xg;if(typeof e!=`object`||!e)throw TypeError(`parseLocalState options must be an object.`);let{maxLength:t}=e;if(t===void 0)return Xg;if(typeof t!=`number`||!Number.isSafeInteger(t)||t<=0)throw RangeError(`maxLength must be a finite positive integer.`);return t}function g_(e,t,n){if(!e||e.syntax!==`local`||typeof e.source!=`string`)throw TypeError(`createLocalStateFile requires a compiled local document.`);if(!t||typeof t!=`object`||Array.isArray(t))throw TypeError(`createLocalStateFile requires a state object.`);let r=Object.keys(e.bindings).filter(e=>!e.startsWith(`@`)).sort(),i=new Set(r),a=new Map;for(let n of Object.keys(t)){if(Object.hasOwn(e.computations??{},n))continue;if(n.startsWith(`@`)){if(!Object.hasOwn(e.bindings,n))throw Error(`Cannot persist parameter "${n}": it is not a binding of this document.`);continue}if(!i.has(n))throw Error(`Cannot persist parameter "${n}": it is not a public binding of this document.`);let r=c_(t[n]);if(!r.ok)throw TypeError(`Cannot persist parameter "${n}": the value ${r.message}`);a.set(n,r.value)}let o={};for(let e of r){if(!a.has(e))throw Error(`Cannot persist the document: parameter "${e}" is missing from the supplied state.`);o[e]=a.get(e)}let s={format:Yg,syntax:au,sourceDigest:s_(e.source),parameters:o};return n!==void 0&&(s.generator=d_(n)),u_(s)}function __(e,t){let n=[],r=(e,t)=>i_(n,e,t),i=e;if(typeof e==`string`){if(p_(e,t)>t)return{ok:!1,diagnostics:[r_(`local.state.size`,`The state payload exceeds the ${t}-byte limit.`)]};if(!o_(e))return{ok:!1,diagnostics:[r_(`local.state.utf`,`The state payload contains malformed Unicode.`)]};try{i=JSON.parse(e)}catch(e){return{ok:!1,diagnostics:[r_(`local.state.json`,`The state payload is not valid JSON: ${a_(e)}`)]}}}else{let n=m_(e,t);if(n===null)return{ok:!1,diagnostics:[r_(`local.state.shape`,`The state payload must be a JSON object.`)]};if(n>t)return{ok:!1,diagnostics:[r_(`local.state.size`,`The state payload exceeds the ${t}-byte limit.`)]}}if(!l_(i))return{ok:!1,diagnostics:[r_(`local.state.shape`,`The state payload must be a JSON object.`)]};Object.getOwnPropertySymbols(i).length>0&&r(`local.state.shape`,`The state payload cannot use symbol keys.`);for(let e of Object.keys(i))e_.has(e)||r(`local.state.key`,`Unknown top-level state key "${e}".`);let a=i.format;a!==`reactive-md-state/v1`&&r(`local.state.format`,`Unsupported state format ${f_(a)}; expected "${Yg}".`);let o=i.syntax;o!==`local-draft-2`&&r(`local.state.syntax`,`Unsupported state syntax ${f_(o)}; expected "${au}".`);let s=i.sourceDigest;typeof s==`string`&&Zg.test(s)||r(`local.state.digest`,`sourceDigest must match "fnv1a32:" followed by 8 lowercase hexadecimal digits.`);let c={},l=i.parameters;if(!l_(l))r(`local.state.parameters`,`parameters must be a JSON object of public binding values.`);else for(let e of Object.keys(l).sort()){if(e===`__proto__`){r(`local.state.parameter.prototype`,`Parameter names cannot be "__proto__".`);continue}if(e.startsWith(`@`)){r(`local.state.parameter.internal`,`Internal parameter "${e}" cannot be persisted.`);continue}let t=c_(l[e]);t.ok?c[e]=t.value:r(`local.state.parameter.value`,`Parameter "${e}" ${t.message}`)}let u;if(Object.hasOwn(i,`generator`)){let e=i.generator;if(!l_(e))r(`local.state.generator`,`generator must be an object with string name and version.`);else{for(let t of Object.keys(e))t_.has(t)||r(`local.state.generator`,`generator has unknown key "${t}".`);typeof e.name!=`string`||typeof e.version!=`string`?r(`local.state.generator`,`generator must have string name and version.`):!o_(e.name)||!o_(e.version)?r(`local.state.utf`,`generator contains malformed Unicode.`):u=Object.freeze({name:e.name,version:e.version})}}if(n.length)return{ok:!1,diagnostics:n};let d={format:Yg,syntax:au,sourceDigest:s,parameters:c};return u&&(d.generator=u),{ok:!0,file:u_(d)}}function v_(e,t){let n=h_(t);try{return __(e,n)}catch(e){return{ok:!1,diagnostics:[r_(`local.state.invalid`,`Cannot read the local state: ${a_(e)}`)]}}}function y_(e){let t=new Map,n=e=>{for(let r of e)t.set(r.id,r),r.children&&n(r.children)};return n(e.nodes),t}function b_(e){let t=y_(e),n=new Map,r=[];for(let[i,a]of Object.entries(e.bindingSlots??{})){let e=t.get(i);if(!e)continue;let o={node:e,slots:[]};for(let[t,r]of Object.entries(a))o.slots.push({slot:t,key:r}),r.startsWith(`@`)||n.set(r,{node:e,slot:t});o.slots.length&&r.push(o)}let i=[];for(let[r,a]of Object.entries(e.bindings)){if(r.startsWith(`@`))continue;let e=n.get(r);if(e){i.push({key:r,binding:a,node:e.node,slot:e.slot});continue}let o=a.owner&&t.has(a.owner)?a.owner:a.nodeIds.find(e=>t.has(e));i.push({key:r,binding:a,node:o?t.get(o):void 0})}return{plans:i,groups:r}}function x_(e,t,n){let r=[];for(let i of t.plans)i.slot===void 0&&Object.hasOwn(n,i.key)&&(i.node?Object.is(e.get(i.node),n[i.key])||r.push(...e.set(i.node,n[i.key])):r.push(r_(`local.state.document`,`The document has no component for parameter "${i.key}".`)));for(let i of t.groups){let t={},a=!1;for(let{slot:e,key:r}of i.slots)Object.hasOwn(n,r)&&(t[e]=n[r],a=!0);a&&r.push(...e.setMany(i.node,t))}return r}function S_(e,t){let n=e.snapshot(),r={};for(let e of t){let t=n.state[e];r[e]=Array.isArray(t)?Object.freeze([...t]):t}return Object.freeze(r)}function C_(e,t,n,r){let i=v_(t,r);if(!i.ok)return i;if(!e||e.syntax!==`local`||typeof e.source!=`string`||!Array.isArray(e.nodes)||!e.bindings)return{ok:!1,diagnostics:[r_(`local.state.document`,`resolveLocalState requires a compiled local document.`)]};if(i.file.syntax!==`local-draft-2`)return{ok:!1,diagnostics:[r_(`local.state.syntax`,`This state file uses syntax "${i.file.syntax}", but this build accepts "${au}".`)]};if(i.file.sourceDigest!==s_(e.source))return{ok:!1,diagnostics:[r_(`local.state.source`,`This state file was created for a different document (source digest mismatch).`)]};let a=b_(e),o=new Set(a.plans.map(e=>e.key)),s=[];for(let e of Object.keys(i.file.parameters))o.has(e)||i_(s,`local.state.parameter.unknown`,`The state contains unknown parameter "${e}" for this document.`);for(let e of o)Object.hasOwn(i.file.parameters,e)||i_(s,`local.state.parameter.missing`,`The state is missing parameter "${e}".`);if(s.length)return{ok:!1,diagnostics:s};let c;try{c=qf(e)}catch(e){return{ok:!1,diagnostics:[r_(`local.state.document`,`Cannot validate this document: ${a_(e)}`)]}}try{if(n){let e=x_(c,a,n);if(e.length)return{ok:!1,diagnostics:e}}let e=x_(c,a,i.file.parameters);if(e.length)return{ok:!1,diagnostics:e};let t=[...o].sort();return{ok:!0,file:i.file,state:S_(c,t)}}finally{c.dispose()}}function w_(e,t,n){try{return C_(e,t,void 0,n)}catch(e){return{ok:!1,diagnostics:[r_(`local.state.invalid`,`Cannot resolve the local state: ${a_(e)}`)]}}}function T_(e,t){return g_(e.document,e.getParameters(),t)}function E_(e,t){return{code:e,message:t,severity:`error`,range:{start:0,end:0},line:1,column:1}}function D_(e,t=8){let n=e.slice(0,t).map(e=>`- [${e.code}] ${e.message} (line ${e.line}, column ${e.column})`);return e.length>n.length&&n.push(`- ${e.length-n.length} more diagnostic(s).`),n.join(`
57
- `)}function O_(e){return e instanceof Error?e.message:String(e)}var k_=class extends Error{diagnostics;constructor(e,t){let n=D_(t);super(n?`${e}\n${n}`:e),this.name=`ReactiveMDMountError`,this.diagnostics=t}};function A_(e,t=`standalone.mount`){if(typeof e==`object`&&e&&Array.isArray(e.diagnostics)){let t=e.diagnostics;if(t.length>0)return t}return[E_(t,O_(e))]}var j_=`reactive-md-diagnostics`,M_=`reactive-md-state-change`,N_=/^[A-Za-z][A-Za-z0-9_-]*$/,P_=256,F_=/^data:image\/(?:png|jpeg|gif|webp);base64,[A-Za-z0-9+/]+={0,2}$/,I_=/[\u0000-\u001f\u007f-\u009f]/,L_=64,R_=4096,z_=41943040;function B_(e,t){if(e===void 0)return;if(!V_(e)){t(`standalone.payload.images`,`images must be a JSON object mapping image URLs to data URLs.`);return}let n=Object.entries(e);if(n.length>L_){t(`standalone.payload.images`,`images cannot contain more than ${L_} entries.`);return}let r=Object.create(null),i=0;for(let[e,a]of n)if(!e||e.length>R_||e===`__proto__`||I_.test(e)||typeof a!=`string`||!F_.test(a))t(`standalone.payload.images`,`Every image entry must use a bounded URL key and a base64 raster data URL.`);else{if(i+=a.length,i>z_){t(`standalone.payload.images`,`The embedded image map exceeds the 40 MiB budget.`);return}r[e]=a}return r}function V_(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function H_(e){let t=[],n=(e,n)=>{t.push(E_(e,n))};if(!V_(e))return{ok:!1,diagnostics:[E_(`standalone.payload.shape`,`The reactive-md payload must be a JSON object.`)]};e.version!==1&&n(`standalone.payload.version`,`The reactive-md payload must use version 1.`);let r=e.target;typeof r!=`string`||r.length===0||r.length>P_?n(`standalone.payload.target`,`The payload target must be an element id of 1-${P_} characters.`):N_.test(r)||n(`standalone.payload.target`,`The payload target must start with a letter and use only letters, digits, underscores or hyphens.`);let i=e.source;typeof i!=`string`&&n(`standalone.payload.source`,`The payload source must be a string.`);let a=e.locale===void 0?`en`:e.locale;a!==`en`&&a!==`zh`&&n(`standalone.payload.locale`,`The payload locale must be "en" or "zh".`);let o=e.colorScheme===void 0?`auto`:e.colorScheme;o!==`light`&&o!==`dark`&&o!==`auto`&&n(`standalone.payload.color-scheme`,`The payload colorScheme must be "light", "dark" or "auto".`);let s=e.hydrate!==void 0&&e.hydrate;typeof s!=`boolean`&&n(`standalone.payload.hydrate`,`The payload hydrate flag must be a boolean.`);let c=e.state;V_(c)||n(`standalone.payload.state`,`The payload state must be a JSON object.`);let l=B_(e.images,n);return t.length>0?{ok:!1,diagnostics:t}:{ok:!0,payload:{version:1,target:r,source:i,state:c,locale:a,colorScheme:o,hydrate:s,...l&&Object.keys(l).length>0?{images:l}:{}}}}function U_(e){try{return H_(e)}catch(e){return{ok:!1,diagnostics:[E_(`standalone.payload.invalid`,`The reactive-md payload could not be read: ${O_(e)}`)]}}}function W_(e){return Array.isArray(e)?e.slice():e}function G_(e,t){let n=w_(e,t);if(!n.ok)return n;let r={};for(let[t,i]of Object.entries(e.bindings))r[t]=Object.hasOwn(n.state,t)?{...i,initial:W_(n.state[t])}:i;let i={...e.initialState};for(let[e,t]of Object.entries(n.state))i[e]=W_(t);return{ok:!0,baseline:{document:{...e,bindings:r,initialState:i},state:n.state}}}function K_(e,t,n){if(typeof e!=`string`)throw new k_(`Cannot mount a Reactive MD document: source must be a string.`,[E_(`standalone.source`,`source must be a string.`)]);let r=Sd(e);if(!r.ok)throw new k_(`Cannot mount a Reactive MD document: the source contains syntax errors.`,r.diagnostics);let i=r.document;if(t!==void 0){let e=v_(t);if(!e.ok)throw new k_(`Cannot mount a Reactive MD document: the state payload is invalid.`,e.diagnostics);let n=G_(i,e.file);if(!n.ok)throw new k_(`Cannot mount a Reactive MD document: the state does not match this source.`,n.diagnostics);i=n.baseline.document}return typeof n==`string`&&n.trim().length>0&&(i={...i,theme:n.trim(),themeRange:void 0}),{document:i,diagnostics:r.diagnostics.slice()}}var q_=`0.4.0`,J_=Object.freeze({name:`reactive-md-standalone`,version:q_}),Y_=`data-reactive-md-mounted`,X_=`script[type="application/reactive-md+json"][data-reactive-md-auto]`,Z_=/^data:image\/(?:png|jpeg|gif|webp);base64,[A-Za-z0-9+/]+={0,2}$/,Q_=64;function $_(e){if(!e)return{};let t=new Map;for(let[n,r]of Object.entries(e).slice(0,Q_))typeof n==`string`&&n.length>0&&typeof r==`string`&&Z_.test(r)&&t.set(n,r);return t.size===0?{}:{urlPolicy:(e,n)=>n===`link`||t.has(e),imageResolver:e=>t.get(e)??null}}var ev=new WeakSet;function tv(e){return ev.has(e)||e.hasAttribute(`data-reactive-md-mounted`)}function nv(e,t){return T_(e,t)}function rv(e){if(e)try{e()}catch{}}function iv(e){let t=()=>{let t=e.querySelector(`article.local-document`);t&&(t.classList.remove(`local-static-first`,`reactive-md-static-first`,`reactive-md-hydrating`),t.removeAttribute(`data-static-first`),t.removeAttribute(`data-reactive-md-static-first`)),e.classList.remove(`local-static-first`,`reactive-md-static-first`),e.removeAttribute(`data-static-first`)};if(typeof requestAnimationFrame!=`function`)return t(),()=>{};let n=0,r=0;return n=requestAnimationFrame(()=>{t(),r=requestAnimationFrame(t)}),()=>{typeof cancelAnimationFrame==`function`&&(cancelAnimationFrame(n),r&&cancelAnimationFrame(r))}}function av(e,t,n={}){if(!e||typeof e!=`object`||!(`nodeType`in e)||!e.hasAttribute)throw new k_(`Cannot mount a Reactive MD document: element must be an HTMLElement.`,[E_(`standalone.element`,`element must be an HTMLElement.`)]);if(tv(e))throw new k_(`Cannot mount a Reactive MD document: this element is already mounted.`,[E_(`standalone.mount`,`The target element already hosts a Reactive MD document.`)]);if(!t||typeof t!=`object`)throw new k_(`Cannot mount a Reactive MD document: options are required.`,[E_(`standalone.options`,`mount requires an options object with a source string.`)]);let r=K_(t.source,t.state,n.theme),i;try{i=qf(r.document)}catch(e){throw new k_(`Cannot mount a Reactive MD document: the interactive runtime could not be created.`,[E_(`standalone.runtime`,O_(e))])}let a=t.generator??J_,o=$_(t.images),s=t.urlPolicy??o.urlPolicy,c=t.imageResolver??o.imageResolver,l=()=>nv(i,a),u;try{u=l()}catch(e){try{i.dispose()}catch{}throw new k_(`Cannot mount a Reactive MD document: the initial state could not be captured.`,[E_(`standalone.state`,O_(e))])}let d=!1,f=e=>{d||rv(n.onDiagnostics?()=>n.onDiagnostics(e):void 0)},p=t.hydrate===!0&&e.hasChildNodes(),m=(0,Z.jsx)(Jg,{document:r.document,runtime:i,onDiagnostics:f,urlPolicy:s,locale:t.locale??`en`,themes:t.themes,colorScheme:t.colorScheme??`auto`,mode:`interactive`,staticFirst:p,imageResolver:c});if(!p)for(;e.firstChild;)e.removeChild(e.firstChild);let h=null;try{h=p?(0,b.hydrateRoot)(e,m):(0,b.createRoot)(e),p||h.render(m)}catch(e){try{h?.unmount()}catch{}try{i.dispose()}catch{}throw new k_(`Cannot mount a Reactive MD document: React could not render the document.`,A_(e,`standalone.render`))}ev.add(e),e.setAttribute(Y_,``);let g=n.onStateChange?i.subscribe(()=>{if(d)return;let e;try{e=l()}catch{return}rv(n.onStateChange?()=>n.onStateChange(e):void 0)}):()=>{};rv(n.onStateChange?()=>n.onStateChange(u):void 0),r.diagnostics.length>0&&f(r.diagnostics);let _=p?iv(e):()=>{};return{element:e,getState(){if(d)throw Error(`This Reactive MD document has been unmounted.`);return l()},unmount:()=>{if(!d){d=!0,g(),_();try{h?.unmount()}catch{}try{i.dispose()}catch{}ev.delete(e),e.getAttribute(`data-reactive-md-mounted`)===``&&e.removeAttribute(Y_)}}}}function ov(e,t){return av(e,t)}function sv(e,t,n){if(typeof console<`u`&&typeof console.error==`function`)try{console.error(`Reactive MD: ${n.map(e=>`[${e.code}] ${e.message}`).join(` `)}`)}catch{}let r=e.defaultView?.CustomEvent;if(typeof r==`function`)try{t.dispatchEvent(new r(j_,{detail:n,bubbles:!0,composed:!0}))}catch{}}function cv(e,t){let n=t.defaultView?.HTMLElement;return n?e instanceof n:e.namespaceURI===`http://www.w3.org/1999/xhtml`}function lv(e){if(typeof document>`u`)return[];let t=e??document,n=t,r=n.nodeType===9?t:n.ownerDocument??document,i=[],a;try{a=Array.from(t.querySelectorAll(X_))}catch{return i}for(let e of a){let a;try{a=U_(JSON.parse(e.textContent??``))}catch(t){sv(r,e,[E_(`standalone.payload.json`,`The reactive-md payload is not valid JSON: ${O_(t)}`)]);continue}if(!a.ok){sv(r,e,a.diagnostics);continue}let o=a.payload,s=t,c=(typeof s.getElementById==`function`?s.getElementById(o.target):null)??r.getElementById(o.target);if(!c)sv(r,e,[E_(`standalone.target.missing`,`The reactive-md payload target "#${o.target}" was not found.`)]);else if(n!==r&&!n.contains(c))sv(r,e,[E_(`standalone.target.scope`,`The reactive-md payload target is outside the scanned root.`)]);else if(!cv(c,r))sv(r,e,[E_(`standalone.target.type`,`The reactive-md payload target must be an HTML element.`)]);else if(!tv(c))try{i.push(ov(c,{source:o.source,state:o.state,locale:o.locale,colorScheme:o.colorScheme,hydrate:o.hydrate,images:o.images}))}catch(e){sv(r,c,A_(e))}}return i}var uv=`reactive-md-doc`,dv=typeof HTMLElement<`u`?HTMLElement:class{};function fv(e){return typeof e==`object`&&!!e&&e.name===`AbortError`}var pv=class extends dv{static observedAttributes=[`src`,`source`,`locale`,`color-scheme`,`theme`];_source;_state;_urlPolicy;_imageResolver;_themes;_connected=!1;_generation=0;_restartScheduled=!1;_session=null;_abort=null;_stateTimer=null;_pendingState=null;_cache=null;connectedCallback(){this._connected||(this._connected=!0,this._start())}disconnectedCallback(){this._connected&&(this._connected=!1,this._generation+=1,this._restartScheduled=!1,this._abortFetch(),this._clearStateTimer(),this._teardown(),this._cache=null)}attributeChangedCallback(e,t,n){t!==n&&(e===`src`&&(this._cache=null),this._requestRestart())}get src(){return this.getAttribute(`src`)??void 0}set src(e){e==null?this.removeAttribute(`src`):this.setAttribute(`src`,e)}get theme(){return this.getAttribute(`theme`)??void 0}set theme(e){e==null?this.removeAttribute(`theme`):this.setAttribute(`theme`,e)}get source(){return this._source===void 0?this.getAttribute(`source`)??void 0:this._source}set source(e){let t=typeof e==`string`?e:void 0;t!==this._source&&(this._source=t,this._requestRestart())}get state(){return this._state}set state(e){e!==this._state&&(this._state=e,this._requestRestart())}get urlPolicy(){return this._urlPolicy}set urlPolicy(e){e!==this._urlPolicy&&(this._urlPolicy=e,this._requestRestart())}get imageResolver(){return this._imageResolver}set imageResolver(e){e!==this._imageResolver&&(this._imageResolver=e,this._requestRestart())}get themes(){return this._themes}set themes(e){e!==this._themes&&(this._themes=e,this._requestRestart())}get _locale(){return this.getAttribute(`locale`)===`zh`?`zh`:`en`}get _colorScheme(){let e=this.getAttribute(`color-scheme`);return e===`light`||e===`dark`?e:`auto`}get _themeOverride(){return this.getAttribute(`theme`)?.trim()||void 0}_requestRestart(){this._connected&&!this._restartScheduled&&(this._restartScheduled=!0,queueMicrotask(()=>{this._restartScheduled=!1,this._connected&&this._start()}))}_start(){this._generation+=1;let e=this._generation;this._abortFetch(),this._clearStateTimer(),this._teardown(),this._load(e)}async _load(e){let t=this.getAttribute(`src`)?.trim()??``,n=this.source;if(t){if(this._cache&&this._cache.src===t)n=this._cache.text;else{let r=null;try{r=typeof AbortController==`function`?new AbortController:null,this._abort=r;let i=await fetch(t,r?{signal:r.signal}:{});if(!i.ok)throw Error(`HTTP ${i.status}${i.statusText?` ${i.statusText}`:``}`);let a=await i.text();if(!this._connected||e!==this._generation)return;this._cache={src:t,text:a},n=a}catch(n){if(!this._connected||e!==this._generation||fv(n))return;this._showError([E_(`standalone.fetch`,`Cannot load "${t}": ${O_(n)}`)]);return}finally{this._abort===r&&(this._abort=null)}}}if(this._connected&&e===this._generation){if(typeof n!=`string`)this._showError([E_(`standalone.source`,`The <reactive-md-doc> element requires a "src" attribute or a "source" attribute/property.`)]);else try{let t=av(this,{source:n,state:this._state,locale:this._locale,colorScheme:this._colorScheme,themes:this._themes,urlPolicy:this._urlPolicy,imageResolver:this._imageResolver},{theme:this._themeOverride,onDiagnostics:e=>this._emitDiagnostics(e),onStateChange:e=>this._queueState(e)});if(!this._connected||e!==this._generation){try{t.unmount()}catch{}return}this._session=t}catch(e){this._session=null,this._showError(A_(e))}}}_teardown(){let e=this._session;if(this._session=null,e)try{e.unmount()}catch{}}_abortFetch(){let e=this._abort;if(this._abort=null,e)try{e.abort()}catch{}}_clearStateTimer(){this._stateTimer!==null&&(clearTimeout(this._stateTimer),this._stateTimer=null),this._pendingState=null}_queueState(e){this._connected&&(this._pendingState=e,this._stateTimer===null&&(this._stateTimer=setTimeout(()=>{this._stateTimer=null;let e=this._pendingState;this._pendingState=null,this._connected&&e&&this._dispatch(M_,e)},0)))}_emitDiagnostics(e){this._connected&&e.length!==0&&this._dispatch(j_,e)}_showError(e){if(!this._connected)return;this._teardown(),this._clearStateTimer();let t=this.ownerDocument;for(;this.firstChild;)this.removeChild(this.firstChild);let n=t.createElement(`div`);n.className=`local-inactive reactive-md-standalone-error`,n.setAttribute(`role`,`alert`),n.setAttribute(`data-reactive-md-error`,``);let r=t.createElement(`p`);if(r.className=`local-inactive-title`,r.textContent=this._locale===`zh`?`无法加载交互文档。`:`This interactive document could not be loaded.`,n.appendChild(r),e.length>0){let r=t.createElement(`ul`);r.className=`local-inactive-list`;for(let n of e.slice(0,12)){let e=t.createElement(`li`);e.textContent=`${n.message} (line ${n.line}, column ${n.column})`,r.appendChild(e)}n.appendChild(r)}this.appendChild(n),this._emitDiagnostics(e)}_dispatch(e,t){if(!this._connected)return;let n=this.ownerDocument.defaultView?.CustomEvent;if(typeof n==`function`)try{this.dispatchEvent(new n(e,{detail:t,bubbles:!0,composed:!0}))}catch{}}};function mv(){typeof customElements<`u`&&(customElements.get(`reactive-md-doc`)||customElements.define(uv,pv))}mv();var hv=!1;function gv(){if(hv||typeof document>`u`)return;hv=!0;let e=()=>{try{lv(document)}catch(e){typeof console<`u`&&typeof console.error==`function`&&console.error(`Reactive MD: automatic mounting failed.`,e)}};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,e,{once:!0}):queueMicrotask(e)}return gv(),e.REACTIVE_MD_DIAGNOSTICS_EVENT=j_,e.REACTIVE_MD_DOC_TAG=uv,e.REACTIVE_MD_MOUNTED_ATTRIBUTE=Y_,e.REACTIVE_MD_STANDALONE_GENERATOR=J_,e.REACTIVE_MD_STANDALONE_VERSION=q_,e.REACTIVE_MD_STATE_CHANGE_EVENT=M_,e.ReactiveMDDocElement=pv,e.ReactiveMDMountError=k_,e.defineReactiveMDDoc=mv,e.diagnosticsFromError=A_,e.isReactiveMDMounted=tv,e.mount=ov,e.mountAll=lv,e.parseMountPayload=U_,e.prepareStandaloneDocument=K_,e})({});
63
+ `;)r+=1;else if(t===`\\`){if(r+1>=e.length){n({kind:`command`,value:`backslash`,offset:r}),r+=1;continue}let t=e[r+1];if(t===`\\`){n({kind:`newline`,value:`\\\\`,offset:r}),r+=2;continue}if(/[A-Za-z]/.test(t)){let t=r+1;for(;t<e.length&&/[A-Za-z]/.test(e[t]);)t+=1;n({kind:`command`,value:e.slice(r+1,t),offset:r}),r=t;continue}n({kind:`command`,value:Object.hasOwn(Vv,t)?Vv[t]:t,offset:r}),r+=2}else if(t>=`0`&&t<=`9`){let t=/^\d+(?:\.\d*)?/.exec(e.slice(r));n({kind:`number`,value:t[0],offset:r}),r+=t[0].length}else if(t===`.`&&e[r+1]>=`0`&&e[r+1]<=`9`){let t=/^(?:\d+(?:\.\d*)?|\.\d+)/.exec(e.slice(r));n({kind:`number`,value:t[0],offset:r}),r+=t[0].length}else/[A-Za-z]/.test(t)?(n({kind:`letter`,value:t,offset:r}),r+=1):(n({kind:`punct`,value:t,offset:r}),r+=1)}return n({kind:`eof`,value:``,offset:e.length}),t}var Jv={alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ϵ`,varepsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,vartheta:`ϑ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,varpi:`ϖ`,rho:`ρ`,varrho:`ϱ`,sigma:`σ`,varsigma:`ς`,tau:`τ`,upsilon:`υ`,phi:`φ`,varphi:`ϕ`,chi:`χ`,psi:`ψ`,omega:`ω`,Gamma:`Γ`,Delta:`Δ`,Theta:`Θ`,Lambda:`Λ`,Xi:`Ξ`,Pi:`Π`,Sigma:`Σ`,Upsilon:`Υ`,Phi:`Φ`,Psi:`Ψ`,Omega:`Ω`},Yv={cdot:`·`,times:`×`,div:`÷`,pm:`±`,mp:`∓`,le:`≤`,leq:`≤`,ge:`≥`,geq:`≥`,ne:`≠`,neq:`≠`,lt:`<`,gt:`>`,approx:`≈`,equiv:`≡`,sim:`∼`,propto:`∝`,infty:`∞`,partial:`∂`,nabla:`∇`,sum:`∑`,prod:`∏`,int:`∫`,iint:`∬`,oint:`∮`,to:`→`,rightarrow:`→`,leftarrow:`←`,Rightarrow:`⇒`,leftrightarrow:`↔`,in:`∈`,notin:`∉`,ni:`∋`,subset:`⊂`,supset:`⊃`,subseteq:`⊆`,supseteq:`⊇`,cup:`∪`,cap:`∩`,emptyset:`∅`,forall:`∀`,exists:`∃`,neg:`¬`,land:`∧`,lor:`∨`,angle:`∠`,perp:`⊥`,parallel:`∥`,degree:`°`,prime:`′`,ldots:`…`,cdots:`⋯`,dots:`…`,langle:`⟨`,rangle:`⟩`,lbrace:`{`,rbrace:`}`,vert:`|`,lvert:`|`,rvert:`|`,lVert:`‖`,rVert:`‖`,backslash:`\\`,percent:`%`,amp:`&`,hash:`#`,underscore:`_`,dollar:`$`,colon:`:`},Xv=new Set([`sin`,`cos`,`tan`,`arcsin`,`arccos`,`arctan`,`exp`,`ln`,`log`,`min`,`max`,`lim`,`det`,`sup`,`inf`,`arg`,`gcd`]),Zv={space:`0.25em`,thinspace:`0.167em`,medspace:`0.222em`,thickspace:`0.278em`,negthinspace:`-0.167em`,quad:`1em`,qquad:`2em`,enspace:`0.5em`},Qv=new Set([`displaystyle`,`textstyle`,`scriptstyle`,`scriptscriptstyle`,`limits`,`nolimits`]),$v=class{tokens;pos=0;source;depth=0;constructor(e){this.source=e,this.tokens=qv(e)}enter(){if(this.depth+=1,this.depth>Wv)throw--this.depth,Error(`Formula is nested too deeply.`)}leave(){--this.depth}render(){let e=this.parseRow({});return e.length===1?e[0]:Q(`mrow`,null,...e)}peek(e=0){return this.tokens[Math.min(this.pos+e,this.tokens.length-1)]}take(){return this.tokens[this.pos++]}atPunct(e){let t=this.peek();return t.kind===`punct`&&t.value===e}atCommand(e){let t=this.peek();return t.kind===`command`&&t.value===e}parseRow(e){this.enter();try{let t=[];for(;;){let n=this.peek();if(n.kind===`eof`||n.kind===`punct`&&e.chars?.has(n.value)||n.kind===`command`&&e.commands?.has(n.value)||n.kind===`newline`&&e.newline)break;t.push(this.parseAtom())}return t}finally{this.leave()}}parseAtom(){this.enter();try{return this.parseAtomBody()}finally{this.leave()}}parseAtomBody(){let e=this.peek(),t;return e.kind===`number`?(this.take(),t=Q(`mn`,null,e.value)):e.kind===`letter`?(this.take(),t=Q(`mi`,null,e.value)):e.kind===`punct`?t=this.parsePunctuation(e):e.kind===`newline`?(this.take(),t=Q(`mspace`,{linebreak:`newline`})):e.kind===`command`?t=this.parseCommand(e):(this.take(),t=Q(`mtext`,null,``)),this.applyScripts(t)}parsePunctuation(e){return this.take(),e.value===`{`?(--this.pos,this.parseBraceGroup()):e.value===`}`||e.value===`&`||e.value===`#`?Q(`mo`,null,e.value):Q(`mo`,e.value===`(`||e.value===`)`||e.value===`[`||e.value===`]`||e.value===`|`?{fence:`true`,stretchy:`true`}:null,e.value)}parseCommand(e){let t=e.value;if(t===`frac`||t===`dfrac`||t===`tfrac`)return this.take(),this.parseFraction();if(t===`sqrt`)return this.take(),this.parseRoot();if(t===`left`)return this.take(),this.parseLeft();if(t===`right`)return this.take(),this.readDelimiter()??Q(`mrow`,null);if(t===`begin`)return this.take(),this.parseEnvironment();if(t===`end`)return this.take(),this.readRawGroup(),Q(`mtext`,null,`\\end`);if(t===`text`||t===`textrm`||t===`mbox`||t===`operatorname`)return this.take(),Q(`mtext`,null,this.readRawGroup());if(t===`mathrm`||t===`mathbf`||t===`mathit`||t===`mathsf`){this.take();let e=this.readRawGroup();return Q(`mtext`,{mathvariant:t===`mathrm`?`normal`:t===`mathbf`?`bold`:t===`mathit`?`italic`:`sans-serif`},e)}if(t===`overline`||t===`bar`||t===`hat`||t===`tilde`||t===`vec`||t===`dot`||t===`ddot`)return this.take(),Q(`mover`,{accent:`true`},this.parseRequiredArgument(),Q(`mo`,{stretchy:`true`},t===`overline`||t===`bar`?`¯`:t===`hat`?`^`:t===`tilde`?`~`:t===`vec`?`→`:t===`dot`?`˙`:`¨`));if(Qv.has(t))return this.take(),Q(`mrow`,null);if(Object.hasOwn(Zv,t))return this.take(),Q(`mspace`,{width:Zv[t]});if(Xv.has(t))return this.take(),Q(`mo`,{mathvariant:`normal`,form:`prefix`},t);if(Object.hasOwn(Jv,t))return this.take(),Q(`mi`,null,Jv[t]);if(Object.hasOwn(Yv,t)){this.take();let e=Yv[t];return Q(`mo`,e===`(`||e===`)`||e===`[`||e===`]`||e===`{`||e===`}`||e===`|`||e===`‖`||e===`⟨`||e===`⟩`?{fence:`true`,stretchy:`true`}:null,e)}return this.take(),Q(`mtext`,null,`\\${t}`)}parseBraceGroup(){if(!this.atPunct(`{`))return Q(`mrow`,null);this.take();let e=this.parseRow({chars:new Set([`}`])});return this.atPunct(`}`)&&this.take(),Q(`mrow`,null,...e)}parseFraction(){return Q(`mfrac`,null,this.parseRequiredArgument(),this.parseRequiredArgument())}parseRoot(){let e=null;if(this.atPunct(`[`)){this.take();let t=this.parseRow({chars:new Set([`]`])});this.atPunct(`]`)&&this.take(),e=Q(`mrow`,null,...t)}let t=this.parseRequiredArgument();return e?Q(`mroot`,null,t,e):Q(`msqrt`,null,t)}parseRequiredArgument(){return this.atPunct(`{`)?this.parseBraceGroup():this.parseAtom()}parseLeft(){let e=this.readDelimiter(),t=this.parseRow({commands:new Set([`right`])}),n=null;return this.atCommand(`right`)&&(this.take(),n=this.readDelimiter()),!e&&!n?Q(`mrow`,null,...t):Q(`mrow`,null,e,...t,n)}readDelimiter(){let e=this.peek();if(e.kind===`punct`)return e.value===`.`?(this.take(),null):`()[]|`.includes(e.value)?(this.take(),Q(`mo`,{fence:`true`,stretchy:`true`},e.value)):null;if(e.kind===`command`){let t={lbrace:`{`,rbrace:`}`,lvert:`|`,rvert:`|`,vert:`|`,lVert:`‖`,rVert:`‖`,Vert:`‖`,langle:`⟨`,rangle:`⟩`},n=Object.hasOwn(t,e.value)?t[e.value]:void 0;if(n)return this.take(),Q(`mo`,{fence:`true`,stretchy:`true`},n)}return null}parseEnvironment(){let e=this.readRawGroup().trim();if(e!==`cases`)return Q(`mtext`,null,`\\begin{${e}}`);let t=[],n=0;for(;!this.atCommand(`end`)&&this.peek().kind!==`eof`&&n<500;){n+=1;let e=[];for(;;){let t=this.parseRow({chars:new Set([`&`]),commands:new Set([`end`]),newline:!0});if(e.push(Q(`mtd`,{columnalign:`left`},...t)),!this.atPunct(`&`))break;this.take()}if(t.push(Q(`mtr`,null,...e)),this.peek().kind===`newline`)this.take();else{if(this.atCommand(`end`)||this.peek().kind===`eof`)break;this.take()}}this.atCommand(`end`)&&(this.take(),this.readRawGroup());let r=Q(`mtable`,{columnalign:`left`,columnspacing:`1em`},...t);return Q(`mrow`,null,Q(`mo`,{fence:`true`,stretchy:`true`},`{`),r)}applyScripts(e){let t=null,n=null,r=!1;for(;;)if(this.atPunct(`^`))this.take(),n=this.parseScriptArgument(),r=!0;else if(this.atPunct(`_`))this.take(),t=this.parseScriptArgument(),r=!0;else break;return r?t!==null&&n!==null?Q(`msubsup`,null,e,t,n):n===null?Q(`msub`,null,e,t):Q(`msup`,null,e,n):e}parseScriptArgument(){return this.atPunct(`{`)?this.parseBraceGroup():this.atPunct(`+`)||this.atPunct(`-`)?Q(`mrow`,null,Q(`mo`,null,this.take().value),this.parseAtom()):this.parseAtom()}readRawGroup(){if(!this.atPunct(`{`))return``;let e=this.take(),t=1,n=this.pos;for(;n<this.tokens.length;n+=1){let e=this.tokens[n];if(e.kind===`eof`)break;if(e.kind===`punct`){if(e.value===`{`)t+=1;else if(e.value===`}`&&(--t,t===0))break}}if(n>=this.tokens.length||this.tokens[n].kind===`eof`)return this.pos=n,this.source.slice(e.offset+1);let r=this.tokens[n];return this.pos=n+1,this.source.slice(e.offset+1,r.offset)}};function ey({source:e,display:t=!1}){let n=Kv(e),r;if(e.length>Hv)r=Q(`mtext`,null,n);else try{r=new $v(e).render()}catch{r=Q(`mtext`,null,n)}let i=e.length>Gv?n:e;return Q(`math`,{display:t?`block`:`inline`,className:t?`local-math local-math-block`:`local-math`,"aria-label":i},Q(`semantics`,null,Q(`mrow`,null,r),Q(`annotation`,{encoding:`application/x-tex`},i)))}var ty=s((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})),$=s(((e,t)=>{t.exports=ty()}))(),ny=e=>e,ry=(0,y.createContext)(`en`);function iy({locale:e=`en`,children:t}){return(0,$.jsx)(ry.Provider,{value:e,children:t})}function ay(){return(0,y.useContext)(ry)}function oy(e,t,n){return e===`zh`?n:t}function sy(){let e=ay();return(0,y.useMemo)(()=>(t,n)=>oy(e,t,n),[e])}var cy=[`var(--chart-1)`,`var(--chart-2)`,`var(--chart-3)`,`var(--chart-4)`,`var(--chart-5)`,`var(--chart-6)`,`var(--chart-7)`,`var(--chart-8)`],ly=520,uy=320,dy=520,fy=320,py=520,my=120,hy=46,gy=150,_y=12.5,vy=10,yy=100,by=2,xy=15,Sy=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,Cy=/^\s*\{\{([\s\S]*)\}\}\s*$/;function wy(e){if(!Number.isFinite(e))return`—`;if(Object.is(e,-0))return`0`;let t=Math.abs(e);return t>=0xe8d4a51000||t>0&&t<1e-4?e.toExponential(3).replace(/(\.\d*?)0+e/,`$1e`).replace(/\.e/,`e`):Number(e.toFixed(6)).toString()}function Ty(e){if(!Number.isFinite(e))return`—`;let t=Math.abs(e);return t>=1e6||t>0&&t<.001?e.toExponential(2):Number(e.toFixed(4)).toString()}function Ey(e){return e instanceof Error?e.message:String(e)}function Dy(e,t,n,r=``){let i=t?.[n];if(i===void 0)return r;try{return e.text(i)}catch{return r}}function Oy(e,t,n,r){let i=t?.[n];if(i===void 0)return r;let a=i.trim();if(!a)return null;let o=Cy.exec(a);try{let t=o?e.evaluate(o[1].trim()):Number(a);return typeof t==`number`&&Number.isFinite(t)?t:null}catch{return null}}function ky(e,t,n,r){let i=t?.[n];if(i===void 0)return r;let a=i.trim();if(!a||a===`true`)return!0;if(a===`false`)return!1;let o=Cy.exec(a);if(!o)return r;try{let t=e.evaluate(o[1].trim());return typeof t==`boolean`?t:r}catch{return r}}function Ay(e,t,n,r){let i=Oy(e,t,n,r);return i===null||!Number.isFinite(i)?r:Math.trunc(i)}function jy(e,t){return e.length>t?`${e.slice(0,Math.max(1,t-1))}…`:e}function My(e,t=8,n=2){if(!e)return[``];let r=[],i=e;for(;i&&r.length<n-1;)r.push(i.slice(0,t)),i=i.slice(t);return(i||r.length===0)&&r.push(i.length>t?`${i.slice(0,Math.max(1,t-1))}…`:i),r}function Ny(e,t){let n=Array.from(e),r=Array.from(t),i=Math.min(n.length,r.length);for(let e=0;e<i;e+=1){let t=(n[e].codePointAt(0)??0)-(r[e].codePointAt(0)??0);if(t!==0)return t}return n.length-r.length}function Py(e,t,n=5){if(!Number.isFinite(e)||!Number.isFinite(t)||t<=e)return[e];let r=(t-e)/Math.max(1,n-1),i=10**Math.floor(Math.log10(r)),a=r/i,o=(a<=1?1:a<=2?2:a<=5?5:10)*i,s=Math.ceil(e/o)*o,c=[];for(let e=s;e<=t+o*1e-9&&c.length<40;e+=o)c.push(Number(e.toFixed(10)));return c}function Fy(e,t){let n=1/0,r=-1/0;for(let t of e)Number.isFinite(t)&&(t<n&&(n=t),t>r&&(r=t));if(!Number.isFinite(n)||!Number.isFinite(r))return{min:0,max:1};if(t&&(n=Math.min(n,0),r=Math.max(r,0)),n===r){let e=Math.abs(n)>0?Math.abs(n)*.15:1;n-=e,r+=e}else{let e=(r-n)*.06;n-=e,r+=e,t&&(n=Math.min(n,0),r=Math.max(r,0))}return{min:n,max:r}}function Iy(e,t){return Math.max(46,...e.map(e=>Ty(e).length*6+(t?24:10)))}function Ly(e,t,n){let r=e.currentTarget,i=r.ownerSVGElement??r.closest(`svg`);if(!i)return;let a=Array.from(i.querySelectorAll(t)),o=a.indexOf(r);o<0||a.length===0||(e.preventDefault(),a[(o+n+a.length)%a.length]?.focus())}function Ry(e){return e.key===`Enter`||e.key===` `||e.key===`Spacebar`}function zy(e,t=ny){return e===null?{text:``,kind:`null`,error:null}:typeof e==`string`?{text:e,kind:`string`,error:null}:typeof e==`number`?Number.isFinite(e)?{text:wy(e),kind:`number`,error:null}:{text:t(`Cannot compute`,`无法计算`),kind:`error`,error:t(`Result is not a finite number`,`结果不是有限数字`)}:typeof e==`boolean`?{text:e?`true`:`false`,kind:`boolean`,error:null}:{text:t(`Cannot compute`,`无法计算`),kind:`array`,error:t(`Arrays must first be converted with a function such as len`,`数组需要先用 len 等函数转换`)}}function By(e,t,n=ny){let r=``,i=null;for(let a of e??[])if(a.type===`text`||a.type===`inlineCode`||a.type===`code`)r+=a.value??``;else if(a.type===`interpolation`)try{let e=zy(t.evaluate((a.value??``).trim()),n);e.error&&(i??=e.error),r+=e.text}catch(e){i??=Ey(e),r+=n(`Cannot compute`,`无法计算`)}else if(a.type===`inlineMath`||a.type===`math`)r+=a.value??``;else if(a.type===`image`)r+=a.alt??``;else if(a.children&&a.children.length>0){let e=By(a.children,t,n);r+=e.text,i??=e.error}else a.value&&(r+=a.value);return{text:r,error:i}}function Vy(e,t,n=ny){let r=e.children??[],i=r.filter(e=>!(e.type===`text`&&!(e.value??``).trim()));if(i.length===1&&i[0].type===`interpolation`)try{let a=t.evaluate((i[0].value??``).trim()),o=zy(a,n);return{node:e,children:r,text:o.text,value:a,kind:o.kind,numeric:o.kind===`number`?a:null,error:o.error}}catch(t){return{node:e,children:r,text:n(`Cannot compute`,`无法计算`),value:void 0,kind:`error`,numeric:null,error:Ey(t)}}let a=By(r,t,n);if(i.length>0&&i.every(e=>e.type===`text`)&&Sy.test(a.text.trim())){let t=Number(a.text.trim());if(Number.isFinite(t))return{node:e,children:r,text:a.text,value:t,kind:`number`,numeric:t,error:null}}let o=!a.text.trim()&&!a.error;return{node:e,children:r,text:a.error?n(`Cannot compute`,`无法计算`):a.text,value:a.text,kind:a.error?`error`:o?`empty`:`string`,numeric:null,error:a.error}}function Hy(e,t=ny){return e?e.error?t(`Cannot compute`,`无法计算`):e.text:``}function Uy(e,t,n=ny){let r=e.children?.find(e=>e.type===`table`);if(!r)return null;let i=r.children?.filter(e=>e.type===`tableRow`)??[];if(i.length===0)return null;let a=(i[0].children??[]).map(e=>Vy(e,t,n));return{tableNode:r,header:a,headerText:a.map(e=>Hy(e,n)),rows:i.slice(1).map((e,r)=>({index:r,cells:(e.children??[]).map(e=>Vy(e,t,n))}))}}function Wy(e,t){let n=!1;for(let r of e.rows){let e=r.cells[t];if(e&&e.kind!==`empty`){if(e.numeric===null)return!1;n=!0}}return n}function Gy(e,t){let n=(e?.key??``).trim();return n?t.findIndex(e=>e.trim()===n):-1}function Ky(e,t,n){return e<0?``:Hy(t.cells[e],n).trim()}function qy(e,t,n){if(!n)return``;try{let n=e.get(t);return typeof n==`string`?n:``}catch{return``}}function Jy({className:e,label:t,children:n}){let r=(0,y.useId)();return(0,$.jsxs)(`figure`,{className:`local-visual ${e}`,"aria-labelledby":r,children:[(0,$.jsx)(`figcaption`,{id:r,className:`local-visual-title`,children:t}),n]})}function Yy({message:e,kind:t=`status`}){return(0,$.jsx)(`p`,{className:`local-visual-message local-visual-${t}`,role:t,children:e})}function Xy({notes:e}){return e.length===0?null:(0,$.jsx)(`ul`,{className:`local-visual-notes`,role:`status`,children:e.map((e,t)=>(0,$.jsx)(`li`,{children:e},`${e}-${t}`))})}function Zy({items:e,hidden:t,onToggle:n,label:r,mode:i}){let a=sy(),o=i!==`static`;return(0,$.jsx)(`div`,{className:`local-visual-legend${o?``:` local-static-legend`}`,role:`group`,"aria-label":o?r:a(`Legend`,`图例`),children:e.map((e,r)=>{let i=t.has(r);return o?(0,$.jsxs)(`button`,{type:`button`,className:`local-visual-legend-item${i?` is-off`:``}`,"aria-pressed":!i,disabled:e.disabled,onClick:()=>n(r),title:i?a(`Show ${e.name}`,`显示 ${e.name}`):a(`Hide ${e.name}`,`隐藏 ${e.name}`),children:[(0,$.jsx)(`span`,{className:`local-visual-swatch`,style:{backgroundColor:e.color},"aria-hidden":`true`}),(0,$.jsxs)(`span`,{className:`local-visual-legend-text`,children:[e.name,e.detail?a(` (${e.detail})`,`(${e.detail})`):``]})]},`${e.name}-${r}`):(0,$.jsxs)(`span`,{className:`local-visual-legend-item local-static-legend-item`,children:[(0,$.jsx)(`span`,{className:`local-visual-swatch`,style:{backgroundColor:e.color},"aria-hidden":`true`}),(0,$.jsxs)(`span`,{className:`local-visual-legend-text`,children:[e.name,e.detail?a(` (${e.detail})`,`(${e.detail})`):``]})]},`${e.name}-${r}`)})})}function Qy({node:e,runtime:t,render:n,mode:r}){let i=sy(),[a,o]=(0,y.useState)(``),[s,c]=(0,y.useState)(null),[l,u]=(0,y.useState)(1),[d,f]=(0,y.useState)(null),p=t.resetToken(e);(0,y.useEffect)(()=>{o(``),c(null),u(1),f(null)},[p]);let m=Dy(t,e.attrs,`label`,i(`Table`,`表格`)),h=ky(t,e.attrs,`searchable`,!0),g=ky(t,e.attrs,`sortable`,!0),_=Ay(t,e.attrs,`page-size`,10),v=Math.max(1,_),b=Uy(e,t,i);if(!b||b.header.length===0)return(0,$.jsx)(Jy,{className:`local-visual-table-block`,label:m,children:(0,$.jsx)(Yy,{message:i(`Table requires a non-empty Markdown table.`,`表格需要一个非空的 Markdown 表格。`),kind:`alert`})});let x=Gy(e.attrs,b.headerText),S=x>=0,C=qy(t,e,S),w=n=>{f(null);try{let r=t.set(e,n);r.length>0&&f(r.map(e=>i(et(e,`en`),et(e,`zh`))).join(`; `))}catch(e){f(Ey(e))}},T=b.header.map((e,t)=>Wy(b,t)),E=a.trim().toLowerCase(),D=[...b.rows.filter(e=>!E||e.cells.some(e=>Hy(e,i).toLowerCase().includes(E)))];if(s){let e=T[s.column];D.sort((t,n)=>{let r=t.cells[s.column],a=n.cells[s.column],o;if(e){let e=r?.numeric??-1/0,t=a?.numeric??-1/0;o=e===t?0:e<t?-1:1}else o=Ny(Hy(r,i),Hy(a,i));return o===0?t.index-n.index:s.direction===`asc`?o:-o})}let O=Math.max(1,Math.ceil(D.length/v)),k=Math.min(l,O),A=D.slice((k-1)*v,k*v),j=e=>{u(1),c(t=>!t||t.column!==e?{column:e,direction:`asc`}:t.direction===`asc`?{column:e,direction:`desc`}:null)},M=e=>!s||s.column!==e?null:(0,$.jsx)(`span`,{className:`local-visual-sort-marker`,"aria-hidden":`true`,children:s.direction===`asc`?`▲`:`▼`});return r===`static`?(0,$.jsxs)(Jy,{className:`local-visual-table-block local-static-table-block`,label:m,children:[(0,$.jsx)(`div`,{className:`local-visual-table-scroll local-static-table-scroll`,children:(0,$.jsxs)(`table`,{className:`local-visual-table local-static-table`,children:[(0,$.jsx)(`caption`,{className:`local-visual-sr-only`,children:m}),(0,$.jsx)(`thead`,{children:(0,$.jsx)(`tr`,{children:b.header.map((e,t)=>(0,$.jsx)(`th`,{scope:`col`,className:T[t]?`is-numeric`:void 0,children:Hy(e,i)},`head-${t}`))})}),(0,$.jsx)(`tbody`,{children:b.rows.map(e=>{let t=S?Ky(x,e,i):``,r=S&&t!==``&&t===C;return(0,$.jsx)(`tr`,{className:r?`is-selected local-static-selected`:void 0,children:b.header.map((t,a)=>{let o=e.cells[a];return(0,$.jsxs)(`td`,{className:T[a]?`is-numeric`:void 0,children:[r&&a===0?(0,$.jsx)(`span`,{className:`local-visual-sr-only`,children:i(`Selected row`,`已选择行`)}):null,o?.error?(0,$.jsx)(`span`,{className:`local-visual-cell-error`,title:o.error,children:i(`Cannot compute`,`无法计算`)}):n(o?.children??[])]},`cell-${e.index}-${a}`)})},`row-${e.index}`)})})]})}),b.rows.length===0?(0,$.jsx)(Yy,{message:i(`No rows to display`,`没有可显示的行`)}):null]}):(0,$.jsxs)(Jy,{className:`local-visual-table-block`,label:m,children:[h?(0,$.jsxs)(`label`,{className:`local-visual-search`,children:[(0,$.jsx)(`span`,{children:i(`Search`,`搜索`)}),(0,$.jsx)(`input`,{type:`search`,value:a,placeholder:i(`Search all columns`,`搜索所有列`),"aria-label":i(`Search ${m}`,`搜索${m}`),onChange:e=>{o(e.target.value),u(1)}})]}):null,(0,$.jsx)(`div`,{className:`local-visual-table-scroll`,children:(0,$.jsxs)(`table`,{className:`local-visual-table`,children:[(0,$.jsx)(`caption`,{className:`local-visual-sr-only`,children:m}),(0,$.jsx)(`thead`,{children:(0,$.jsxs)(`tr`,{children:[S?(0,$.jsx)(`th`,{scope:`col`,className:`local-visual-select-column`,children:(0,$.jsx)(`span`,{className:`local-visual-sr-only`,children:i(`Select`,`选择`)})}):null,b.header.map((e,t)=>{let n=s&&s.column===t?s.direction===`asc`?`ascending`:`descending`:`none`;return(0,$.jsx)(`th`,{scope:`col`,"aria-sort":n,className:T[t]?`is-numeric`:void 0,children:g?(0,$.jsxs)(`button`,{type:`button`,className:`local-visual-sort-button${s&&s.column===t?` is-sorted`:``}`,onClick:()=>j(t),title:i(`Click to cycle ascending, descending and original order`,`点击切换升序、降序和原始顺序`),children:[Hy(e,i),M(t)]}):Hy(e,i)},`head-${t}`)})]})}),(0,$.jsx)(`tbody`,{children:A.map(e=>{let t=S?Ky(x,e,i):``,r=S&&t!==``&&t===C;return(0,$.jsxs)(`tr`,{className:r?`is-selected`:void 0,children:[S?(0,$.jsx)(`td`,{className:`local-visual-select-cell`,children:t?(0,$.jsx)(`button`,{type:`button`,className:`local-visual-select-button${r?` is-selected`:``}`,"aria-pressed":r,"aria-label":i(`Select row ${t}`,`选择行 ${t}`),title:i(`Select row ${t}`,`选择行 ${t}`),onClick:()=>w(t),children:(0,$.jsx)(`span`,{"aria-hidden":`true`,children:r?`●`:`○`})}):null}):null,b.header.map((t,r)=>{let a=e.cells[r];return(0,$.jsx)(`td`,{className:T[r]?`is-numeric`:void 0,children:a?.error?(0,$.jsx)(`span`,{className:`local-visual-cell-error`,title:a.error,children:i(`Cannot compute`,`无法计算`)}):n(a?.children??[])},`cell-${e.index}-${r}`)})]},`row-${e.index}`)})})]})}),d?(0,$.jsx)(Yy,{message:d,kind:`alert`}):null,D.length===0?(0,$.jsx)(Yy,{message:i(`No matching results`,`没有匹配结果`)}):null,O>1?(0,$.jsxs)(`nav`,{className:`local-visual-pagination`,"aria-label":i(`Table pagination`,`表格分页`),children:[(0,$.jsx)(`button`,{type:`button`,disabled:k<=1,onClick:()=>u(e=>Math.max(1,e-1)),children:i(`Previous`,`上一页`)}),(0,$.jsx)(`span`,{children:i(`Page ${k} of ${O} · ${D.length} rows`,`第 ${k} / ${O} 页 · 共 ${D.length} 行`)}),(0,$.jsx)(`button`,{type:`button`,disabled:k>=O,onClick:()=>u(e=>Math.min(O,e+1)),children:i(`Next`,`下一页`)})]}):null]})}var $y=[`bar`,`line`,`area`,`scatter`,`donut`];function eb(e,t,n,r,i,a){let o=(n,r)=>[e+n*Math.cos(r),t+n*Math.sin(r)],[s,c]=o(n,i),[l,u]=o(n,a),[d,f]=o(r,a),[p,m]=o(r,i),h=+(a-i>Math.PI);return[`M ${s} ${c}`,`A ${n} ${n} 0 ${h} 1 ${l} ${u}`,`L ${d} ${f}`,`A ${r} ${r} 0 ${h} 0 ${p} ${m}`,`Z`].join(` `)}function tb({node:e,runtime:t,mode:n}){let r=sy(),i=n===`static`,[a,o]=(0,y.useState)(new Set),[s,c]=(0,y.useState)(new Set),[l,u]=(0,y.useState)(null),[d,f]=(0,y.useState)(null),p=t.resetToken(e);(0,y.useEffect)(()=>{o(new Set),c(new Set),u(null),f(null)},[p]);let m=(0,y.useId)(),h=Dy(t,e.attrs,`title`,``)||Dy(t,e.attrs,`label`,``)||r(`Chart`,`图表`),g=(e.attrs?.kind??`bar`).trim().toLowerCase(),_=$y.includes(g)?g:null,v=Dy(t,e.attrs,`x-label`,``),b=Dy(t,e.attrs,`y-label`,``),x=Uy(e,t,r);if(!x||x.header.length===0)return(0,$.jsx)(Jy,{className:`local-visual-chart`,label:h,children:(0,$.jsx)(Yy,{message:r(`chart body requires a non-empty Markdown table.`,`chart 正文需要一个非空的 Markdown 表格。`),kind:`alert`})});let S=x.headerText.map(e=>e.trim()),C=Gy(e.attrs,S),w=C>=0,T=qy(t,e,w),E=n=>{f(null);try{let i=t.set(e,n);i.length>0&&f(i.map(e=>r(et(e,`en`),et(e,`zh`))).join(`; `))}catch(e){f(Ey(e))}},D=x.rows.map(e=>({index:e.index,cells:e.cells,texts:S.map((t,n)=>Hy(e.cells[n],r)),keyValue:Ky(C,e,r)}));if(!_)return(0,$.jsx)(Jy,{className:`local-visual-chart`,label:h,children:(0,$.jsx)(Yy,{message:r(`Unknown chart type "${g}".`,`未知图表类型“${g}”。`),kind:`alert`})});let O=[],k=[],A=(e.attrs?.x??``).trim(),j=A?S.indexOf(A):0;(j<0||j>=S.length)&&k.push(r(`x column "${A}" does not exist.`,`x 列“${A}”不存在。`));let M=(e.attrs?.y??``).split(`,`).map(e=>e.trim()).filter(Boolean),N=[];if(_===`donut`){if(M.length>1)k.push(r(`donut can only use one numeric column; specify a single column in y.`,`donut 只能使用一个数值列,请在 y 中指定唯一列。`));else if(M.length===1){let e=S.indexOf(M[0]);e<0?k.push(r(`y column "${M[0]}" does not exist.`,`y 列“${M[0]}”不存在。`)):N=[e]}else S.length===2?N=[1]:k.push(r(`A donut chart with more than two columns must use y to specify the single numeric column.`,`donut 多于两列时必须用 y 指定唯一数值列。`))}else if(M.length>0)for(let e of M){let t=S.indexOf(e);t<0?k.push(r(`y column "${e}" does not exist.`,`y 列“${e}”不存在。`)):N.includes(t)||N.push(t)}else N=S.map((e,t)=>t).filter(e=>e!==j);if(k.length===0&&N.length===0&&k.push(r(`Chart requires at least one numeric series.`,`图表至少需要一个数值系列。`)),k.length>0)return(0,$.jsx)(Jy,{className:`local-visual-chart local-visual-chart-${_}`,label:h,children:k.map((e,t)=>(0,$.jsx)(Yy,{message:e,kind:`alert`},`${e}-${t}`))});let P=N.map(e=>S[e]||r(`Series ${e+1}`,`系列 ${e+1}`)),F=0,ee=0,I=D.map(e=>{let t=e.cells[j],n=e.texts[j]||r(`Item ${e.index+1}`,`第 ${e.index+1} 项`),i=t&&t.numeric!==null?t.numeric:null,a=N.map(t=>{let n=e.cells[t];return!n||n.kind===`empty`||n.numeric===null?(F+=1,null):(_===`donut`&&n.numeric<0&&(ee+=1),n.numeric)});return{index:e.index,label:n,xValue:i,values:a,cells:e.cells,keyValue:e.keyValue}});F>0&&O.push(r(`${F} values are empty or cannot be computed; gaps are kept in the chart.`,`${F} 个数值为空或无法计算,图表中保留空缺。`));for(let e of N)Wy(x,e)||O.push(r(`Column "${S[e]}" is not purely numeric; non-numeric values are treated as gaps.`,`列“${S[e]}”不是纯数值列,非数值按空缺处理。`));_===`donut`&&ee>0&&O.push(r(`Donut values must be non-negative; ignored ${ee} negative values.`,`环形图数值必须非负,已忽略 ${ee} 个负值。`)),_===`scatter`&&!Wy(x,j)&&O.push(r(`scatter horizontal axis column "${S[j]}" requires numeric values.`,`scatter 的横轴列“${S[j]}”需要数值。`));let te=e=>{u(null),o(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},ne=e=>{u(null),c(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},re=P.map((e,t)=>({name:e,color:cy[t%cy.length]}));if(_===`donut`){let e=I.map(e=>e.values[0]),t=e.map(e=>e!==null&&e>=0?e:0),a=t.reduce((e,t,n)=>!i&&s.has(n)?e:e+t,0),o=I.map((n,r)=>({name:n.label,color:cy[r%cy.length],detail:e[r]===null?`—`:wy(e[r]),disabled:t[r]<=0}));if(a<=0)return(0,$.jsxs)(Jy,{className:`local-visual-chart local-visual-chart-donut`,label:h,children:[(0,$.jsx)(Yy,{message:r(`No share to display`,`暂无占比`)}),(0,$.jsx)(Xy,{notes:O}),(0,$.jsx)(Zy,{items:o,hidden:s,onToggle:ne,label:r(`Legend`,`图例`),mode:n})]});let c=-Math.PI/2,f=[];I.forEach((e,n)=>{if(!i&&s.has(n))return;let r=t[n];if(r<=0)return;let o=r/a*Math.PI*2,l=c,u=c+o;c=u,f.push({key:`donut:${n}`,label:e.label,value:r,start:l,end:u,color:cy[n%cy.length],x:170,y:120,rowKey:e.keyValue})});let p=l?r(`${l.label}: ${wy(l.value)}`,`${l.label}:${wy(l.value)}`):r(`Focus a slice or legend to view values`,`聚焦扇区或图例查看数值`);return(0,$.jsxs)(Jy,{className:`local-visual-chart local-visual-chart-donut${i?` local-static-chart`:``}`,label:h,children:[i?null:(0,$.jsx)(`div`,{className:`local-visual-readout`,id:m,"aria-live":`polite`,children:p}),(0,$.jsx)(`div`,{className:`local-visual-svg-wrap`,children:(0,$.jsxs)(`svg`,{className:`local-visual-svg`,viewBox:`0 0 340 240`,role:`group`,"aria-label":r(`${h}, donut chart, ${I.length} items`,`${h},环形图,共 ${I.length} 项`),"aria-describedby":i?void 0:m,children:[(0,$.jsxs)(`g`,{className:`local-visual-donut-center`,"aria-hidden":`true`,children:[(0,$.jsx)(`text`,{x:170,y:118,textAnchor:`middle`,className:`local-visual-donut-total`,children:wy(a)}),(0,$.jsx)(`text`,{x:170,y:138,textAnchor:`middle`,className:`local-visual-donut-caption`,children:jy(P[0],14)})]}),f.map(e=>{let t=w&&e.rowKey!==``,n=t&&e.rowKey===T,a={key:e.key,series:P[0],label:e.label,value:e.value,x:e.x,y:e.y,rowKey:e.rowKey,selectable:t,selected:n},o=i?{}:{"data-chart-mark":``,...t?{"data-chart-selectable":``}:{},tabIndex:0,role:t?`button`:`img`,...t?{"aria-pressed":n}:{},"aria-label":r(`${e.label}: ${wy(e.value)}`,`${e.label}:${wy(e.value)}`),onFocus:()=>u(a),onBlur:()=>u(null),onPointerEnter:()=>u(a),onPointerLeave:()=>u(null),onClick:t?()=>E(e.rowKey):void 0,onKeyDown:n=>{t&&Ry(n)?(n.preventDefault(),E(e.rowKey)):n.key===`ArrowRight`||n.key===`ArrowDown`?Ly(n,`[data-chart-mark]`,1):(n.key===`ArrowLeft`||n.key===`ArrowUp`)&&Ly(n,`[data-chart-mark]`,-1)}},s=`local-visual-donut-slice${n?` is-selected`:``}`;return e.end-e.start>=Math.PI*2-1e-6?(0,$.jsx)(`circle`,{className:s,cx:170,cy:120,r:77,fill:`none`,style:{stroke:e.color},strokeWidth:30,...o,children:(0,$.jsx)(`title`,{children:r(`${e.label}: ${wy(e.value)}`,`${e.label}:${wy(e.value)}`)})},e.key):(0,$.jsx)(`path`,{className:s,d:eb(170,120,92,62,e.start,e.end),style:{fill:e.color},...o,children:(0,$.jsx)(`title`,{children:r(`${e.label}: ${wy(e.value)}`,`${e.label}:${wy(e.value)}`)})},e.key)})]})}),(0,$.jsx)(Zy,{items:o,hidden:s,onToggle:ne,label:r(`Legend, toggle slices`,`图例,可开关扇区`),mode:n}),d?(0,$.jsx)(Yy,{message:d,kind:`alert`}):null,(0,$.jsx)(Xy,{notes:O})]})}let ie=P.map((e,t)=>t).filter(e=>i||!a.has(e));if(ie.length===0)return(0,$.jsxs)(Jy,{className:`local-visual-chart local-visual-chart-${_}`,label:h,children:[(0,$.jsx)(Yy,{message:r(`All series are hidden in the legend`,`所有系列已在图例中关闭`)}),(0,$.jsx)(Zy,{items:re,hidden:a,onToggle:te,label:r(`Legend, toggle series`,`图例,可开关系列`),mode:n})]});let ae=Wy(x,j),oe=_===`scatter`?!0:_===`line`||_===`area`?ae:!1,se=oe?I.filter(e=>e.xValue!==null):I;oe&&se.length<I.length&&O.push(r(`${I.length-se.length} rows have an empty or non-numeric horizontal axis and are not plotted.`,`${I.length-se.length} 行横轴为空或不是数值,未参与绘制。`));let ce=[];for(let e of se)for(let t of ie){let n=e.values[t];n!==null&&ce.push(n)}if(se.length===0)return(0,$.jsxs)(Jy,{className:`local-visual-chart local-visual-chart-${_}`,label:h,children:[(0,$.jsx)(Yy,{message:r(`No data rows to plot`,`没有可绘制的数据行`)}),(0,$.jsx)(Xy,{notes:O}),(0,$.jsx)(Zy,{items:re,hidden:a,onToggle:te,label:r(`Legend, toggle series`,`图例,可开关系列`),mode:n})]});if(ce.length===0)return(0,$.jsxs)(Jy,{className:`local-visual-chart local-visual-chart-${_}`,label:h,children:[(0,$.jsx)(Yy,{message:r(`No values to read`,`没有可读取的数值`)}),(0,$.jsx)(Xy,{notes:O}),(0,$.jsx)(Zy,{items:re,hidden:a,onToggle:te,label:r(`Legend, toggle series`,`图例,可开关系列`),mode:n})]});let le=Fy(ce,_===`bar`||_===`area`),ue=Py(le.min,le.max,5),de=Iy(ue,!!b),fe=506-de,pe=e=>16+(le.max-e)/(le.max-le.min)*258,L=pe(Math.max(le.min,Math.min(le.max,0))),R=oe&&se.length>0?Fy(se.map(e=>e.xValue).filter(e=>e!==null),!1):null,me=fe/Math.max(1,I.length),he=e=>de+me*(e+.5),ge=e=>de+(e-R.min)/(R.max-R.min)*fe,_e=(e,t)=>R?e.xValue===null?null:ge(e.xValue):he(t),ve=[];if(R)ve.push(...Py(R.min,R.max,5));else{let e=Math.max(1,Math.ceil(I.length/6));for(let t=0;t<I.length;t+=e)ve.push(t);let t=I.length-1;t>=0&&ve[ve.length-1]!==t&&(ve.length>1&&t-ve[ve.length-1]<e*.6?ve[ve.length-1]=t:ve.push(t))}let ye=e=>R?de+(e-R.min)/(R.max-R.min)*fe:he(e),be=i||!l?null:R?(0,$.jsx)(`line`,{className:`local-visual-guide`,x1:Math.max(de,Math.min(506,l.x)),x2:Math.max(de,Math.min(506,l.x)),y1:16,y2:274}):null,xe=e=>i?{}:{"data-chart-mark":``,...e.selectable?{"data-chart-selectable":``}:{},tabIndex:0,role:e.selectable?`button`:`img`,...e.selectable?{"aria-pressed":e.selected}:{},"aria-label":r(`${e.series}, ${e.label}${e.selectable&&e.rowKey!==e.label?`, ${e.rowKey}`:``}: ${wy(e.value)}`,`${e.series},${e.label}${e.selectable&&e.rowKey!==e.label?`,${e.rowKey}`:``}:${wy(e.value)}`),onFocus:()=>u(e),onBlur:()=>u(null),onPointerEnter:()=>u(e),onPointerLeave:()=>u(null),onClick:e.selectable?()=>E(e.rowKey):void 0,onKeyDown:t=>{e.selectable&&Ry(t)?(t.preventDefault(),E(e.rowKey)):t.key===`ArrowRight`||t.key===`ArrowDown`?Ly(t,`[data-chart-mark]`,1):(t.key===`ArrowLeft`||t.key===`ArrowUp`)&&Ly(t,`[data-chart-mark]`,-1)}},Se=(e,t,n,r,i)=>{let a=w&&t.keyValue!==``;return{key:`${e}:${t.index}`,series:P[e],label:t.label,value:n,x:r,y:i,rowKey:t.keyValue,selectable:a,selected:a&&t.keyValue===T}},Ce=[];if(_===`bar`){let e=me*.76,t=Math.max(1,e/Math.max(1,ie.length));I.forEach((n,i)=>{ie.forEach((a,o)=>{let s=n.values[a];if(s===null)return;let c=de+me*i+(me-e)/2+o*t,l=Math.max(1,Math.abs(pe(s)-L)),u=s>=0?L-l:L,d=Math.max(1.5,t-1),f=Math.min(4,d/2,l/2),p=Se(a,n,s,c+t/2,u+l/2);Ce.push((0,$.jsx)(`rect`,{className:`local-visual-bar${p.selected?` is-selected`:``}`,x:c,y:u,width:d,height:l,rx:f,style:{fill:cy[a%cy.length]},...xe(p),children:(0,$.jsx)(`title`,{children:r(`${p.series}, ${p.label}: ${wy(p.value)}`,`${p.series},${p.label}:${wy(p.value)}`)})},`bar-${a}-${n.index}`))})})}let we=[],Te=[],Ee=[];if(_===`line`||_===`area`)for(let e of ie){let t=[],n=[],i=()=>{n.length>0&&t.push(n),n=[]};I.forEach((t,r)=>{let a=t.values[e],o=_e(t,r);a===null||o===null?i():n.push({row:t,value:a,x:o,y:pe(a)})}),i();for(let n of t){if(n.length>=2){let t=n.map((e,t)=>`${t===0?`M`:`L`} ${e.x} ${e.y}`).join(` `);if(we.push((0,$.jsx)(`path`,{className:`local-visual-line`,d:t,fill:`none`,style:{stroke:cy[e%cy.length]},strokeWidth:2.4,strokeLinejoin:`round`,strokeLinecap:`round`},`line-${e}-${n[0].row.index}`)),_===`area`){let t=L,r=n[0],i=n[n.length-1],a=`M ${r.x} ${t} ${n.map(e=>`L ${e.x} ${e.y}`).join(` `)} L ${i.x} ${t} Z`;Te.push((0,$.jsx)(`path`,{className:`local-visual-area`,d:a,style:{fill:cy[e%cy.length]}},`area-${e}-${r.row.index}`))}}for(let t of n){let n=Se(e,t.row,t.value,t.x,t.y);Ee.push((0,$.jsxs)(`g`,{className:`local-visual-point-group`,children:[(0,$.jsx)(`circle`,{className:`local-visual-hit${n.selected?` is-selected`:``}`,cx:t.x,cy:t.y,r:12,fill:`transparent`,...xe(n),children:(0,$.jsx)(`title`,{children:r(`${n.series}, ${n.label}: ${wy(n.value)}`,`${n.series},${n.label}:${wy(n.value)}`)})}),(0,$.jsx)(`circle`,{className:`local-visual-point${n.selected?` is-selected`:``}`,cx:t.x,cy:t.y,r:4.5,style:{fill:cy[e%cy.length],stroke:`var(--surface)`},strokeWidth:1.5,pointerEvents:`none`})]},`point-${e}-${t.row.index}`))}}}_===`scatter`&&I.forEach((e,t)=>{let n=_e(e,t);n!==null&&ie.forEach(t=>{let i=e.values[t];if(i===null)return;let a=pe(i),o=Se(t,e,i,n,a);Ee.push((0,$.jsxs)(`g`,{className:`local-visual-point-group`,children:[(0,$.jsx)(`circle`,{className:`local-visual-hit${o.selected?` is-selected`:``}`,cx:n,cy:a,r:15,fill:`transparent`,...xe(o),children:(0,$.jsx)(`title`,{children:r(`${o.series}, ${o.label}: ${wy(o.value)}`,`${o.series},${o.label}:${wy(o.value)}`)})}),(0,$.jsx)(`circle`,{className:`local-visual-point${o.selected?` is-selected`:``}`,cx:n,cy:a,r:6,style:{fill:cy[t%cy.length],stroke:`var(--surface)`},strokeWidth:1.5,pointerEvents:`none`})]},`scatter-${t}-${e.index}`))})});let De=l?r(`${l.series} · ${l.label}: ${wy(l.value)}`,`${l.series} · ${l.label}:${wy(l.value)}`):r(`Focus or point at a mark; use arrow keys to change the readout`,`聚焦或指向图形,用方向键切换读数`),Oe=r(`${h}, ${_} chart, ${I.length} items, ${ie.length} series`,`${h},${_} 图,共 ${I.length} 项,${ie.length} 个系列`);return(0,$.jsxs)(Jy,{className:`local-visual-chart local-visual-chart-${_}${i?` local-static-chart`:``}`,label:h,children:[i?null:(0,$.jsx)(`div`,{className:`local-visual-readout`,id:m,"aria-live":`polite`,children:De}),(0,$.jsx)(`div`,{className:`local-visual-svg-wrap`,children:(0,$.jsxs)(`svg`,{className:`local-visual-svg`,viewBox:`0 0 ${ly} ${uy}`,role:`group`,"aria-label":Oe,"aria-describedby":i?void 0:m,children:[ue.map(e=>(0,$.jsxs)(`g`,{children:[(0,$.jsx)(`line`,{className:`local-visual-grid-line`,x1:de,x2:506,y1:pe(e),y2:pe(e)}),(0,$.jsx)(`text`,{className:`local-visual-axis-label`,x:de-6,y:pe(e),textAnchor:`end`,dominantBaseline:`middle`,children:Ty(e)})]},`y-${e}`)),le.min<0&&le.max>0?(0,$.jsx)(`line`,{className:`local-visual-zero-line`,x1:de,x2:506,y1:L,y2:L}):null,(0,$.jsx)(`line`,{className:`local-visual-axis-line`,x1:de,x2:506,y1:274,y2:274}),ve.map(e=>{let t=ye(e),n=R?Ty(e):jy(I[e]?.label??``,8);return(0,$.jsxs)(`g`,{children:[(0,$.jsx)(`line`,{className:`local-visual-tick`,x1:t,x2:t,y1:274,y2:279}),(0,$.jsxs)(`text`,{className:`local-visual-axis-label`,x:t,y:293,textAnchor:`middle`,children:[n,!R&&I[e]?(0,$.jsx)(`title`,{children:I[e].label}):null]})]},`x-${e}`)}),v?(0,$.jsx)(`text`,{className:`local-visual-axis-title`,x:(de+506)/2,y:318,textAnchor:`middle`,children:v}):null,b?(0,$.jsx)(`text`,{className:`local-visual-axis-title`,transform:`translate(12 145) rotate(-90)`,textAnchor:`middle`,children:b}):null,Te,we,be,Ce,Ee]})}),(0,$.jsx)(Zy,{items:re,hidden:a,onToggle:te,label:r(`Legend, toggle series`,`图例,可开关系列`),mode:n}),d?(0,$.jsx)(Yy,{message:d,kind:`alert`}):null,(0,$.jsx)(Xy,{notes:O})]})}var nb=64,rb=new WeakMap,ib=new WeakMap;function ab(e,t){let n=rb.get(e);return n&&n.revision===t||(n={revision:t,requestedPoints:new Map,evaluation:{steps:0,limit:k}},rb.set(e,n)),n}function ob(e){let t=ib.get(e);return t||(t=new Map,ib.set(e,t)),t}function sb(e,t,n){if(e.size>=nb){let t=e.keys().next().value;t!==void 0&&e.delete(t)}return e.set(t,n),n}function cb(e,t,n){return e.map(e=>{let r=/^y\s*=\s*([\s\S]+)$/.exec((e.value??``).trim());if(!r)return`\u0003${n}`;try{let e=Mn(r[1].trim());return JSON.stringify(e.dependencies.map(e=>t[e]??null))}catch{return`\u0003${n}`}}).join(``)}function lb(e,t,n,r,i,a,o,s,c,l=ny){let u=ob(s),d=u.get(t);if(d)return d;let f=ab(s,c),p=e=>sb(u,t,{ok:!1,message:e});if(n.length>16)return p(l(`plot supports at most 16 curves, but has ${n.length}.`,`plot 最多支持 16 条曲线,当前为 ${n.length} 条。`));let m=n.length*o;f.requestedPoints.set(e,m);let h=0;for(let e of f.requestedPoints.values())h+=e;if(h>2e4)return p(l(`The document's plot sample count exceeds the limit: ${h} requested, at most ${O} allowed. Reduce curves or samples.`,`整篇文档的绘图采样点超过上限:已请求 ${h} 个,最多 ${O} 个。请减少曲线或采样数。`));let g=[],_={message:null},v=n.map((e,t)=>{let n=(e.value??``).trim(),s=/^y\s*=\s*([\s\S]+)$/.exec(n);if(!s)return g.push(l(`Curve ${t+1}: cannot compute (each formula block must be written as y = expression).`,`曲线 ${t+1}:无法计算(每块公式需写成 y = 表达式)。`)),{source:n,expression:null,points:[],endpoint:null,error:`formula`};try{let e=Mn(s[1].trim()),t=In(e,r,i,a,o,f.evaluation);return{source:n,expression:e,points:t.points,endpoint:t.endpoint,error:null}}catch(e){return e instanceof B&&e.code===`latex-budget`?(_.message=e.message,{source:n,expression:null,points:[],endpoint:null,error:e.message}):(g.push(l(`Curve ${t+1}: cannot compute (${Ey(e)}).`,`曲线 ${t+1}:无法计算(${Ey(e)})。`)),{source:n,expression:null,points:[],endpoint:null,error:Ey(e)})}});return _.message===null?sb(u,t,{ok:!0,curves:v,notes:g}):p(l(`Plot computation exceeded the shared execution budget: ${_.message}`,`绘图计算超过共享执行预算:${_.message}`))}function ub(e){if(e.length===0)return 0;let t=[...e].sort((e,t)=>e-t),n=Math.floor(t.length/2);return t.length%2==0?(t[n-1]+t[n])/2:t[n]}function db(e,t,n,r){let i=[],a=[],o=(e,i)=>{let a=Math.abs(i.y-e.y),o=e.y*i.y<0&&Math.min(Math.abs(e.y),Math.abs(i.y))>Math.max(1,n*8),s=a>t*.8&&a>Math.max(r,1e-9)*10;return o||s};for(let t of e){if(t.y===null){a.length>0&&i.push(a),a=[];continue}let e={x:t.x,y:t.y},n=a[a.length-1];n&&o(n,e)&&(i.push(a),a=[]),a.push(e)}return a.length>0&&i.push(a),i}function fb({node:e,runtime:t,mode:n}){let r=sy(),i=ay(),a=n===`static`,[o,s]=(0,y.useState)(null),c=t.resetToken(e);(0,y.useEffect)(()=>{s(null)},[c]);let l=(0,y.useId)(),u=Dy(t,e.attrs,`label`,``)||r(`Function plot`,`函数图`),d=Dy(t,e.attrs,`x-label`,`x`),f=Dy(t,e.attrs,`y-label`,`y`),p=Oy(t,e.attrs,`min`,-10),m=Oy(t,e.attrs,`max`,10),h=Math.min(2e3,Math.max(2,Ay(t,e.attrs,`samples`,200))),g=(e.children??[]).filter(e=>e.type===`math`||e.type===`inlineMath`),_=(()=>{try{return{...t.snapshot().state}}catch{return{}}})(),v=0;try{v=t.snapshot().revision}catch{v=0}let b=g.map(e=>`${e.id}\u0000${e.value??``}`).join(``),x=`${e.id}\u0000${p}\u0000${m}\u0000${h}\u0000${i}\u0000${b}`,S=cb(g,_,v),C=`${x}\u0002${S}`,w=(0,y.useMemo)(()=>g.length===0||p===null||m===null||!(m>p)?{ok:!0,curves:[],notes:[]}:lb(e.id,C,g,_,p,m,h,t,v,r),[x,S,e.id,t,r]);if(g.length===0)return(0,$.jsx)(Jy,{className:`local-visual-plot`,label:u,children:(0,$.jsx)(Yy,{message:r(`plot body requires one or more $$ formula blocks.`,`plot 正文需要一个或多个 $$ 公式块。`),kind:`alert`})});if(p===null||m===null||!(m>p))return(0,$.jsx)(Jy,{className:`local-visual-plot`,label:u,children:(0,$.jsx)(Yy,{message:r(`plot min must be less than max.`,`plot 的 min 必须小于 max。`),kind:`alert`})});if(!w.ok)return(0,$.jsx)(Jy,{className:`local-visual-plot`,label:u,children:(0,$.jsx)(Yy,{message:w.message,kind:`alert`})});let{curves:T,notes:E}=w,D=T.flatMap(e=>e.points.filter(e=>e.y!==null&&Number.isFinite(e.y))),O=(0,$.jsx)(`div`,{className:`local-visual-plot-legend`,role:`list`,"aria-label":r(`Curve legend`,`曲线图例`),children:T.map((e,t)=>(0,$.jsxs)(`div`,{className:`local-visual-plot-legend-item`,role:`listitem`,children:[(0,$.jsx)(`span`,{className:`local-visual-swatch`,style:{backgroundColor:cy[t%cy.length]},"aria-hidden":`true`}),(0,$.jsx)(`span`,{className:`local-visual-plot-legend-text`,children:(0,$.jsx)(`span`,{className:`local-visual-plot-formula`,children:(0,$.jsx)(ey,{source:e.source})})})]},`curve-legend-${t}`))});if(D.length===0)return(0,$.jsxs)(Jy,{className:`local-visual-plot`,label:u,children:[(0,$.jsx)(Yy,{message:r(`No plottable values in the current range`,`当前范围内没有可绘制的值`)}),(0,$.jsx)(Xy,{notes:E}),O]});let A=Fy(D.map(e=>e.y),!1),j=Py(A.min,A.max,5),M=Py(p,m,5),N=Iy(j,!!f),P=506-N,F=e=>N+(e-p)/(m-p)*P,ee=e=>16+(A.max-e)/(A.max-A.min)*258,I=ub(D.map(e=>Math.abs(e.y))),te=[];for(let e of T)for(let t=1;t<e.points.length;t+=1){let n=e.points[t-1],r=e.points[t];n.y!==null&&r.y!==null&&te.push(Math.abs(r.y-n.y))}let ne=ub(te),re=A.max-A.min,ie=T.map(e=>db(e.points,re,I,ne)),ae={steps:0,limit:k},oe=(e,t)=>{if(!e.expression)return null;try{let n=e.expression.evaluate(t,_,ae);return typeof n==`number`&&Number.isFinite(n)?n:null}catch{return null}},se=e=>Math.max(p,Math.min(m,e)),ce=(m-p)/100,le=e=>{let t=e.currentTarget.getBoundingClientRect();if(t.width===0)return;let n=Math.max(0,Math.min(1,(e.clientX-t.left)/t.width));s(p+n*(m-p))},ue=e=>{let t=e.shiftKey?10:1,n=o;if(e.key===`ArrowRight`)n=(o??(p+m)/2)+ce*t;else if(e.key===`ArrowLeft`)n=(o??(p+m)/2)-ce*t;else if(e.key===`Home`)n=p;else if(e.key===`End`)n=m;else return;e.preventDefault(),s(se(n))},de=a||o===null?null:se(o),fe=de===null?r(`Range [${wy(p)}, ${wy(m)}] · ${h} samples; use arrow keys or pointer to read values`,`区间 [${wy(p)}, ${wy(m)}] · ${h} 个采样点;用方向键或指针读取数值`):`${r(`x = ${wy(de)}; `,`x = ${wy(de)};`)}${T.map((e,t)=>{let n=oe(e,de),i=e.error?r(`cannot compute`,`无法计算`):n===null?r(`undefined`,`无定义`):wy(n);return r(`Curve ${t+1}: `,`曲线 ${t+1}:`)+i}).join(r(`; `,`;`))}`,pe=de===null?null:T.map((e,t)=>{let n=oe(e,de);return n===null||!e.expression?null:(0,$.jsx)(`circle`,{className:`local-visual-active-point`,cx:F(de),cy:ee(n),r:4.5,style:{fill:cy[t%cy.length],stroke:`var(--surface)`},strokeWidth:1.5},`active-${t}`)});return(0,$.jsxs)(Jy,{className:`local-visual-plot`,label:u,children:[a?null:(0,$.jsx)(`div`,{className:`local-visual-readout`,id:l,"aria-live":`polite`,children:fe}),(0,$.jsx)(`div`,{className:`local-visual-svg-wrap`,children:(0,$.jsxs)(`svg`,{className:`local-visual-svg`,viewBox:`0 0 ${dy} ${fy}`,role:`group`,"aria-label":r(`${u}, range ${wy(p)} to ${wy(m)}, ${h} samples`,`${u},区间 ${wy(p)} 到 ${wy(m)},${h} 个采样点`),"aria-describedby":a?void 0:l,tabIndex:a?void 0:0,onPointerMove:a?void 0:le,onPointerLeave:a?void 0:()=>s(null),onFocus:a?void 0:()=>s(e=>e??(p+m)/2),onBlur:a?void 0:()=>s(null),onKeyDown:a?void 0:ue,children:[j.map(e=>(0,$.jsxs)(`g`,{children:[(0,$.jsx)(`line`,{className:`local-visual-grid-line`,x1:N,x2:506,y1:ee(e),y2:ee(e)}),(0,$.jsx)(`text`,{className:`local-visual-axis-label`,x:N-6,y:ee(e),textAnchor:`end`,dominantBaseline:`middle`,children:Ty(e)})]},`y-${e}`)),A.min<0&&A.max>0?(0,$.jsx)(`line`,{className:`local-visual-zero-line`,x1:N,x2:506,y1:ee(0),y2:ee(0)}):null,(0,$.jsx)(`line`,{className:`local-visual-axis-line`,x1:N,x2:506,y1:274,y2:274}),M.map(e=>(0,$.jsxs)(`g`,{children:[(0,$.jsx)(`line`,{className:`local-visual-tick`,x1:F(e),x2:F(e),y1:274,y2:279}),(0,$.jsx)(`text`,{className:`local-visual-axis-label`,x:F(e),y:293,textAnchor:`middle`,children:Ty(e)})]},`x-${e}`)),d?(0,$.jsx)(`text`,{className:`local-visual-axis-title`,x:(N+506)/2,y:318,textAnchor:`middle`,children:d}):null,f?(0,$.jsx)(`text`,{className:`local-visual-axis-title`,transform:`translate(12 145) rotate(-90)`,textAnchor:`middle`,children:f}):null,ie.map((e,t)=>e.map((e,n)=>{if(e.length<2)return null;let r=e.map((e,t)=>`${t===0?`M`:`L`} ${F(e.x)} ${ee(e.y)}`).join(` `);return(0,$.jsx)(`path`,{className:`local-visual-plot-line`,d:r,fill:`none`,style:{stroke:cy[t%cy.length]},strokeWidth:2.4,strokeLinejoin:`round`,strokeLinecap:`round`},`curve-${t}-${n}`)})),de===null?null:(0,$.jsx)(`line`,{className:`local-visual-guide`,x1:F(de),x2:F(de),y1:16,y2:274}),pe]})}),(0,$.jsx)(Xy,{notes:E}),O]})}var pb={title:`Task`,start:`Start`,duration:`Duration`,notes:`Notes`},mb={title:`事项`,start:`开始`,duration:`时长`,notes:`说明`};function hb(e){let t=t=>e.includes(t.title)&&e.includes(t.start)&&e.includes(t.duration);return t(pb)?pb:t(mb)?mb:null}function gb({node:e,runtime:t,render:n,mode:r}){let i=sy(),a=r!==`static`,[o,s]=(0,y.useState)(null),c=t.resetToken(e);(0,y.useEffect)(()=>{s(null)},[c]);let l=Dy(t,e.attrs,`title`,``)||i(`Timeline`,`时间轴`),u=Dy(t,e.attrs,`unit`,i(`minutes`,`分钟`)),d=Uy(e,t,i);if(!d)return(0,$.jsx)(Jy,{className:`local-visual-timeline`,label:l,children:(0,$.jsx)(Yy,{message:i(`timeline body requires a Markdown table.`,`timeline 正文需要一个 Markdown 表格。`),kind:`alert`})});let f=d.headerText.map(e=>e.trim()),p=hb(f),m=p?f.indexOf(p.title):-1,h=p?f.indexOf(p.start):-1,g=p?f.indexOf(p.duration):-1,_=p?f.indexOf(p.notes):-1;if(!p||m<0||h<0||g<0)return(0,$.jsx)(Jy,{className:`local-visual-timeline`,label:l,children:(0,$.jsx)(Yy,{message:i(`timeline table requires the "Task", "Start" and "Duration" columns.`,`timeline 表格需要“事项”“开始”“时长”三列,或“Task”“Start”“Duration”三列。`),kind:`alert`})});let v=[],b=[],x=[];if(d.rows.forEach((e,t)=>{let n=e.cells[h],r=e.cells[g],a=n?.numeric??null,o=r?.numeric??null;if(a===null||o===null||a<0||o<0){b.push(t+1);return}let s=Hy(e.cells[m],i)||i(`Task ${t+1}`,`事项 ${t+1}`);x.push({key:`item-${e.index}`,title:s,start:a,duration:o,description:_>=0?e.cells[_]?.children??[]:[],sourceIndex:t})}),b.length>0&&v.push(i(`Rows ${b.join(`, `)} have an invalid start or duration (must be non-negative numbers) and are hidden.`,`第 ${b.join(`、`)} 行的开始或时长不是非负数字,未显示。`)),x.length===0)return(0,$.jsxs)(Jy,{className:`local-visual-timeline`,label:l,children:[(0,$.jsx)(Yy,{message:i(`No valid timeline items.`,`没有有效的时间轴事项。`)}),(0,$.jsx)(Xy,{notes:v})]});let S=[...x].sort((e,t)=>e.start-t.start||e.sourceIndex-t.sourceIndex),C=S.reduce((e,t)=>Math.max(e,t.start+t.duration),0),w=Math.max(1,C),T=Py(0,w,5);(T.length===0||T[0]!==0)&&T.unshift(0),T[T.length-1]<w&&T.push(w);let E=u?` ${u}`:``,D=e=>`${wy(e)}${E}`,O=S.find(e=>e.key===o)??null;return(0,$.jsxs)(Jy,{className:`local-visual-timeline${a?``:` local-static-timeline`}`,label:l,children:[(0,$.jsx)(`div`,{className:`local-visual-timeline-axis`,"aria-hidden":`true`,children:T.map((e,t)=>{let n=e/w*100,r=t===T.length-1?{left:`${n}%`,transform:`translateX(-100%)`}:t===0?{left:`0%`}:{left:`${n}%`,transform:`translateX(-50%)`};return(0,$.jsx)(`span`,{className:`local-visual-timeline-tick`,style:r,children:Ty(e)},`tick-${e}`)})}),(0,$.jsx)(`ol`,{className:`local-visual-timeline-list`,children:S.map(e=>{let t=e.start+e.duration,r=e.start/w*100,c=e.duration/w*100,l=S.indexOf(e);return(0,$.jsxs)(`li`,{className:`local-visual-timeline-item${a&&o===e.key?` is-active`:``}${a?``:` local-static-timeline-item`}`,tabIndex:a?0:void 0,"aria-label":a?i(`${e.title}, started ${D(e.start)}, ended ${D(t)}, duration ${D(e.duration)}${e.description.length>0?`, with notes`:``}`,`${e.title},开始 ${D(e.start)},结束 ${D(t)},时长 ${D(e.duration)}${e.description.length>0?`,有说明`:``}`):void 0,onFocus:a?()=>s(e.key):void 0,onBlur:a?()=>s(t=>t===e.key?null:t):void 0,onPointerEnter:a?()=>s(e.key):void 0,onPointerLeave:a?()=>s(t=>t===e.key?null:t):void 0,onKeyDown:a?e=>{e.key===`Escape`&&(e.preventDefault(),s(null))}:void 0,children:[(0,$.jsxs)(`div`,{className:`local-visual-timeline-head`,children:[(0,$.jsxs)(`span`,{className:`local-visual-timeline-title`,children:[(0,$.jsx)(`span`,{className:`local-visual-swatch`,style:{backgroundColor:cy[l%cy.length]},"aria-hidden":`true`}),e.title]}),(0,$.jsxs)(`span`,{className:`local-visual-timeline-times`,children:[i(`Started`,`开始`),` `,D(e.start),` · `,i(`Ended`,`结束`),` `,D(t),` · `,i(`Duration`,`时长`),` `,D(e.duration)]})]}),(0,$.jsx)(`div`,{className:`local-visual-timeline-track`,"aria-hidden":`true`,children:(0,$.jsx)(`span`,{className:`local-visual-timeline-bar${e.duration===0?` is-zero`:``}`,style:{left:`${r}%`,width:`${c}%`,backgroundColor:cy[l%cy.length]}})}),a||e.description.length===0?null:(0,$.jsx)(`div`,{className:`local-visual-timeline-detail local-static-timeline-detail`,children:n(e.description)})]},e.key)})}),a?(0,$.jsx)(`div`,{className:`local-visual-timeline-detail`,"aria-live":`polite`,children:O?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`strong`,{children:O.title}),O.description.length>0?n(O.description):(0,$.jsx)(`span`,{children:i(`No notes.`,`没有说明。`)})]}):(0,$.jsx)(`span`,{children:i(`Focus or point at an item to view its notes.`,`聚焦或指向事项查看说明。`)})}):null,(0,$.jsx)(Xy,{notes:v})]})}var _b=/[\u1100-\u115f\u2e80-\u303f\u3040-\u33ff\u3400-\u4dbf\u4e00-\u9fff\uac00-\ud7af\uf900-\ufaff\ufe30-\ufe4f\uff00-\uff60\uffe0-\uffe6]/u;function vb(e){let t=0;for(let n of e)_b.test(n)?t+=1:/\s/u.test(n)?t+=.3:t+=.58;return t*_y}function yb(e,t){if(vb(e)<=t)return e;let n=``;for(let r of e){if(vb(`${n}${r}…`)>t)break;n+=r}return`${n.trimEnd()}…`}function bb(e){let t=[],n=``;for(let r of e)n&&vb(n+r)>yy?(t.push(n),n=r):n+=r;if(n&&t.push(n),t.length<=by)return t;let r=t.slice(0,by);return r[1]=yb(t.slice(1).join(``),yy),r}function xb(e){let t=bb(e);return{width:t.reduce((e,t)=>Math.max(e,vb(t)),0)+10,height:t.length*xy+6,lines:t}}function Sb(e){let t=new Map;for(let n of e){let e=`${n.from}\u0000${n.to}`;t.set(e,(t.get(e)??0)+1)}let n=new Map,r=new Map;for(let i of e){let e=`${i.from}\u0000${i.to}`,a=t.get(e)??1,o=n.get(e)??0;n.set(e,o+1),r.set(i.key,(o-(a-1)/2)*12)}return r}function Cb(e,t,n){let{width:r,height:i,positions:a}=e,o=Sb(t),s=1/0,c=1/0,l=-1/0,u=-1/0;for(let e of t){if(!e.label)continue;let t=a.get(e.from),r=a.get(e.to);if(!t||!r)continue;let i=Tb(n,t,r,o.get(e.key)??0,e.from===e.to),d=xb(e.label);s=Math.min(s,i.labelX-d.width/2),c=Math.min(c,i.labelY-d.height/2),l=Math.max(l,i.labelX+d.width/2),u=Math.max(u,i.labelY+d.height/2)}if(!Number.isFinite(s))return e;let d=Math.max(0,vy-s),f=Math.max(0,vy-c),p=Math.max(0,l+vy-r),m=Math.max(0,u+vy-i);if(d===0&&f===0&&p===0&&m===0)return e;for(let e of a.values())e.x+=d,e.y+=f;return{width:r+d+p,height:i+f+m,positions:a}}function wb(e,t,n){let r=e.map(e=>e.id),i=new Map(r.map((e,t)=>[e,t])),a=new Set(r),o=new Map(r.map(e=>[e,[]]));for(let e of t)e.from!==e.to&&a.has(e.from)&&a.has(e.to)&&o.get(e.from).push(e.to);let s=new Map,c=new Map,l=new Set,u=[],d=[],f=0,p=e=>{s.set(e,f),c.set(e,f),f+=1,u.push(e),l.add(e);for(let t of o.get(e)??[])s.has(t)?l.has(t)&&c.set(e,Math.min(c.get(e),s.get(t))):(p(t),c.set(e,Math.min(c.get(e),c.get(t))));if(c.get(e)===s.get(e)){let t=[],n;do n=u.pop(),l.delete(n),t.push(n);while(n!==e);d.push(t.reverse())}};for(let e of r)s.has(e)||p(e);let m=new Map;d.forEach((e,t)=>{for(let n of e)m.set(n,t)});let h=d.map(()=>new Set),g=d.map(()=>0);for(let e of t){if(!a.has(e.from)||!a.has(e.to))continue;let t=m.get(e.from),n=m.get(e.to);t===n||h[t].has(n)||(h[t].add(n),g[n]+=1)}let _=d.map((e,t)=>({index:t,order:Math.min(...e.map(e=>i.get(e)??0))})),v=_.filter(e=>g[e.index]===0).map(e=>e.index).sort((e,t)=>_[e].order-_[t].order),y=d.map(()=>0);for(;v.length>0;){let e=v.shift();for(let t of h[e])y[t]=Math.max(y[t],y[e]+1),--g[t],g[t]===0&&v.push(t)}let b=Math.max(1,...y)+1,x=Array.from({length:b},()=>[]);for(let e of r)x[y[m.get(e)]].push(e);let S=x.filter(e=>e.length>0),C=Math.max(1,...S.map(e=>e.length)),w=new Map,T,E;if(n===`down`)T=py,E=Math.max(240,106+(S.length-1)*120),S.forEach((e,t)=>{let n=53+t*120;e.forEach((t,r)=>{let i=e.length===1?T/2:104+r*((T-88-my)/(e.length-1));w.set(t,{x:i,y:n})})});else{let e=t.reduce((e,t)=>t.label?Math.max(e,xb(t.label).width):e,0),n=Math.max(gy,my+(e>0?e+24:0));T=Math.max(py,208+(S.length-1)*n),E=Math.max(240,106+(C-1)*74),S.forEach((e,t)=>{let n=S.length===1?T/2:104+t*((T-88-my)/(S.length-1));e.forEach((t,r)=>{let i=e.length===1?E/2:53+r*((E-60-hy)/(e.length-1));w.set(t,{x:n,y:i})})})}return Cb({width:T,height:E,positions:w},t,n)}function Tb(e,t,n,r,i){let a=my,o=hy;if(i)return e===`right`?{d:`M ${t.x+20} ${t.y-o/2} C ${t.x+64} ${t.y-o/2-64}, ${t.x-64} ${t.y-o/2-64}, ${t.x-20} ${t.y-o/2}`,labelX:t.x,labelY:t.y-o/2-46}:{d:`M ${t.x+a/2} ${t.y-10} C ${t.x+a/2+64} ${t.y-54}, ${t.x+a/2+64} ${t.y+54}, ${t.x+a/2} ${t.y+10}`,labelX:t.x+a/2+44,labelY:t.y};if(e===`right`){if(n.x>t.x){let e=t.x+a/2,i=t.y+r,o=n.x-a/2,s=n.y+r;return{d:`M ${e} ${i} L ${o} ${s}`,labelX:(e+o)/2,labelY:(i+s)/2-12}}let e=t.x+r,i=n.x+r,s=t.y+o/2,c=n.y-o/2,l=Math.max(70,Math.abs(i-e)*.45);return{d:`M ${e} ${s} C ${e+l} ${s+86}, ${i-l} ${c+86}, ${i} ${c}`,labelX:(e+i)/2,labelY:Math.max(s,c)+48}}if(n.y>t.y){let e=t.x+r,i=n.x+r,a=t.y+o/2,s=n.y-o/2;return{d:`M ${e} ${a} L ${i} ${s}`,labelX:(e+i)/2+10,labelY:(a+s)/2}}let s=t.x+a/2,c=n.x-a/2,l=t.y+r,u=n.y+r,d=Math.max(70,Math.abs(u-l)*.45);return{d:`M ${s} ${l} C ${s+86} ${l+d}, ${c+86} ${u-d}, ${c} ${u}`,labelX:Math.max(s,c)+48,labelY:(l+u)/2}}function Eb({node:e,runtime:t,render:n,mode:r}){let i=sy(),a=r!==`static`,[o,s]=(0,y.useState)(null),[c,l]=(0,y.useState)(null),u=t.resetToken(e);(0,y.useEffect)(()=>{s(null),l(null)},[u]);let d=(0,y.useId)().replace(/[^a-zA-Z0-9_-]/g,``),f=`local-diagram-arrow-${d}`,p=`local-diagram-description-${d}`,m=Dy(t,e.attrs,`label`,``)||i(`Diagram`,`图解`),h=(e.attrs?.direction??`right`).trim().toLowerCase()===`down`?`down`:`right`,g=e.children?.filter(e=>e.type===`component`)??[],_=[],v=[],b=new Set;for(let e of g){if(e.name!==`node`)continue;let n=(e.attrs?.id??``).trim();if(!n){_.push(i(`Ignored a node without an id.`,`已忽略缺少 id 的节点。`));continue}if(b.has(n)){_.push(i(`Duplicate node id ${n}; ignored the later node.`,`节点 id 重复(${n}),已忽略后一个节点。`));continue}b.add(n);let r=Dy(t,e.attrs,`tone`,`neutral`).trim(),a=r===`success`||r===`warning`?r:`neutral`;v.push({id:n,label:Dy(t,e.attrs,`label`,n)||n,tone:a,children:e.children??[]})}let x=[],S=new Set;for(let e of g){if(e.name!==`edge`)continue;let n=(e.attrs?.from??``).trim(),r=(e.attrs?.to??``).trim();if(!n||!r||!b.has(n)||!b.has(r)){_.push(i(`Edge ${n||`?`} → ${r||`?`} references a missing endpoint; ignored.`,`连线 ${n||`?`} → ${r||`?`} 缺少端点,已忽略。`));continue}let a=Dy(t,e.attrs,`label`,``),o=`${n}\u0000${r}\u0000${a}`;S.has(o)?_.push(i(`Duplicate edge: ${n} → ${r}${a?` (${a})`:``}; ignored.`,`重复连线:${n} → ${r}${a?`(${a})`:``},已忽略。`)):(S.add(o),x.push({key:o,from:n,to:r,label:a}))}if(v.length===0)return(0,$.jsxs)(Jy,{className:`local-visual-diagram`,label:m,children:[(0,$.jsx)(Yy,{message:`diagram requires at least one node.`,kind:`alert`}),(0,$.jsx)(Xy,{notes:_})]});let C=null;try{let n=t.get(e);typeof n==`string`&&(C=n)}catch{C=null}let w=new Set(v.map(e=>e.id)),T=(e.attrs?.initial??``).trim(),E=T&&w.has(T)?T:v[0].id,D=C&&w.has(C)?C:o&&w.has(o)?o:E,O=v.find(e=>e.id===D)??v[0],k=C&&w.has(C)?C:T&&w.has(T)?T:null,A=n=>{s(n),l(null);try{let r=t.set(e,n);r.length>0&&l(r.map(e=>i(et(e,`en`),et(e,`zh`))).join(`; `))}catch(e){l(Ey(e))}},j=wb(v,x,h),M=Sb(x),N=[],P=[];for(let e of x){let t=j.positions.get(e.from),n=j.positions.get(e.to);if(!t||!n)continue;let r=Tb(h,t,n,M.get(e.key)??0,e.from===e.to);if(N.push((0,$.jsx)(`g`,{className:`local-visual-edge`,children:(0,$.jsx)(`path`,{d:r.d,fill:`none`,style:{stroke:`var(--ink-muted)`},strokeWidth:1.6,markerEnd:`url(#${f})`})},`edge-${e.key}`)),!e.label)continue;let i=xb(e.label);P.push((0,$.jsx)(`g`,{className:`local-visual-edge-label-group`,children:(0,$.jsx)(`text`,{className:`local-visual-edge-label`,x:r.labelX,y:r.labelY,textAnchor:`middle`,dominantBaseline:`middle`,children:i.lines.map((e,t)=>(0,$.jsx)(`tspan`,{x:r.labelX,y:r.labelY+(t-(i.lines.length-1)/2)*xy,children:e},t))})},`edge-label-${e.key}`))}return(0,$.jsxs)(Jy,{className:`local-visual-diagram${a?``:` local-static-diagram`}`,label:m,children:[(0,$.jsx)(`div`,{className:`local-visual-svg-wrap`,children:(0,$.jsxs)(`svg`,{className:`local-visual-svg local-visual-diagram-svg`,viewBox:`0 0 ${j.width} ${j.height}`,role:`group`,"aria-label":a?`${m}, with ${v.length} nodes and ${x.length} edges; press Tab to focus a node and Enter to select`:i(`${m}, with ${v.length} nodes and ${x.length} edges`,`${m},共 ${v.length} 个节点、${x.length} 条连线`),"aria-describedby":p,children:[(0,$.jsx)(`defs`,{children:(0,$.jsx)(`marker`,{id:f,viewBox:`0 0 10 10`,refX:`9`,refY:`5`,markerWidth:`7`,markerHeight:`7`,orient:`auto-start-reverse`,children:(0,$.jsx)(`path`,{d:`M 0 0 L 10 5 L 0 10 z`,style:{fill:`var(--ink-muted)`}})})}),N,v.map(e=>{let t=j.positions.get(e.id);if(!t)return null;let n=a?e.id===D:k!==null&&e.id===k,r=My(e.label,8,2);return(0,$.jsxs)(`g`,{className:`local-visual-node local-visual-node-${e.tone}${n?` is-selected`:``}`,"data-diagram-node":a?``:void 0,transform:`translate(${t.x} ${t.y})`,role:a?`button`:void 0,tabIndex:a?0:void 0,"aria-pressed":a?n:void 0,"aria-label":a?e.label:void 0,onClick:a?()=>A(e.id):void 0,onKeyDown:a?t=>{Ry(t)?(t.preventDefault(),A(e.id)):t.key===`ArrowRight`||t.key===`ArrowDown`?Ly(t,`[data-diagram-node]`,1):(t.key===`ArrowLeft`||t.key===`ArrowUp`)&&Ly(t,`[data-diagram-node]`,-1)}:void 0,children:[(0,$.jsx)(`title`,{children:e.label}),(0,$.jsx)(`rect`,{className:`local-visual-node-shape`,x:-60,y:-23,width:my,height:hy,rx:10}),(0,$.jsx)(`text`,{className:`local-visual-node-text`,textAnchor:`middle`,children:r.map((e,t)=>(0,$.jsx)(`tspan`,{x:0,y:(t-(r.length-1)/2)*16+4,children:e},t))})]},`node-${e.id}`)}),P]})}),a?(0,$.jsx)(`div`,{className:`local-visual-diagram-detail`,"aria-live":`polite`,children:O?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`strong`,{children:O.label}),O.children.length>0?n(O.children):(0,$.jsx)(`span`,{children:i(`This node has no description.`,`此节点没有说明。`)})]}):(0,$.jsx)(`span`,{children:i(`Click a node, or focus it with Tab and press Enter, to view its description.`,`点击节点,或用 Tab 聚焦后按 Enter 查看说明。`)})}):(0,$.jsx)(`div`,{className:`local-visual-diagram-detail local-static-diagram-detail`,children:(0,$.jsx)(`dl`,{className:`local-static-diagram-nodes`,children:v.map(e=>(0,$.jsxs)(`div`,{className:`local-static-diagram-node`,children:[(0,$.jsx)(`dt`,{children:e.label}),(0,$.jsx)(`dd`,{children:e.children.length>0?n(e.children):(0,$.jsx)(`span`,{children:i(`This node has no description.`,`此节点没有说明。`)})})]},`static-node-${e.id}`))})}),(0,$.jsxs)(`ul`,{id:p,className:`local-visual-sr-only`,"aria-label":i(`Nodes and edges`,`节点与连线`),children:[v.map(e=>(0,$.jsx)(`li`,{children:e.label},`description-node-${e.id}`)),x.map(e=>{let t=v.find(t=>t.id===e.from),n=v.find(t=>t.id===e.to);return(0,$.jsxs)(`li`,{children:[t?.label??e.from,` → `,n?.label??e.to,e.label?` (${e.label})`:``]},`description-edge-${e.key}`)})]}),c?(0,$.jsx)(Yy,{message:c,kind:`alert`}):null,(0,$.jsx)(Xy,{notes:_})]})}function Db(e){let t={...e,mode:e.mode??`interactive`};switch(t.node.name){case`table`:return(0,$.jsx)(Qy,{...t});case`chart`:return(0,$.jsx)(tb,{...t});case`plot`:return(0,$.jsx)(fb,{...t});case`timeline`:return(0,$.jsx)(gb,{...t});case`diagram`:return(0,$.jsx)(Eb,{...t});default:return null}}var Ob=class extends Error{failure;constructor(e){super(e),this.name=`DataTableFailureError`,this.failure=e}};function kb(e){return e===null?``:typeof e==`string`?e:typeof e==`number`?Number.isFinite(e)?String(e):null:typeof e==`boolean`?e?`true`:`false`:null}function Ab(e){return typeof e==`string`?e===``?null:`s:${e}`:typeof e==`number`&&Number.isFinite(e)?`n:${e===0?0:e}`:null}function jb(e,t,n){let r={...n};for(let i of t)Object.hasOwn(n,i)||Object.defineProperty(r,i,{enumerable:!0,configurable:!0,get(){return e.evaluate(i)}});return r}function Mb(e){if(e.length===0)return null;let t=typeof e[0];if(t!==`string`&&t!==`number`)return`rows`;for(let n of e)if(typeof n!==t||typeof n==`number`&&!Number.isFinite(n))return`rows`;return null}function Nb(e,t){let n;try{n=Yt(t)}catch{throw new Ob(`rows`)}let r;try{r=n.evaluate(jb(e,n.dependencies,{}))}catch{throw new Ob(`rows`)}if(!Array.isArray(r))throw new Ob(`rows`);let i=Mb(r);if(i)throw new Ob(i);return r}function Pb(e){let{rows:t,columns:n,keyExpression:r,runtime:i}=e,a=e.maxRows??100,o=e.budget??1e5;if(!Number.isSafeInteger(a)||a<=0||a>1e3)return{ok:!1,failure:`max-rows`};if(n.length<1||n.length>20)return{ok:!1,failure:`columns`};let s=Mb(t);if(s)return{ok:!1,failure:s};if(t.length>a)return{ok:!1,failure:`rows-budget`};let c;try{c=Yt(r)}catch{return{ok:!1,failure:`key`}}let l=c.dependencies;if(l.length!==1||l[0]!==`item`)return{ok:!1,failure:`key`};let u=n.map(e=>{try{return{spec:e,expression:Yt(e.value)}}catch{return{spec:e,expression:null}}}),d=0;for(let e of n)d+=e.label.length;if(t.length===0&&(d+=7),d>o)return{ok:!1,failure:`text-budget`};let f=e=>{if(d+=e,d>o)throw new Ob(`text-budget`)},p=new Set,m=[];try{for(let e=0;e<t.length;e+=1){let n={item:t[e],index:e},r=null;try{r=Ab(c.evaluate(n))}catch{return{ok:!1,failure:`key`}}if(r===null||p.has(r))return{ok:!1,failure:`key`};f(r.length),p.add(r);let a=[];for(let e of u){if(!e.expression){f(14),a.push({ok:!1,text:``});continue}let t=null;try{t=kb(e.expression.evaluate(jb(i,e.expression.dependencies,n)))}catch{t=null}t===null?(f(14),a.push({ok:!1,text:``})):(f(t.length),a.push({ok:!0,text:t}))}m.push({key:r,cells:a})}}catch(e){return e instanceof Ob?{ok:!1,failure:e.failure}:{ok:!1,failure:`rows`}}return{ok:!0,model:{columns:n.map(e=>e.label),rows:m,empty:t.length===0}}}function Fb(e,t){switch(t){case`label`:return e(`Data table requires a label.`,`数据表需要标签。`);case`columns`:return e(`Data table requires between 1 and 20 column definitions.`,`数据表需要 1 到 20 个列定义。`);case`max-rows`:return e(`max-rows must be a positive integer no greater than ${A}.`,`max-rows 必须是 1 到 ${A} 之间的整数。`);case`rows`:return e(`Rows must evaluate to a list.`,`行数据必须计算为列表。`);case`rows-budget`:return e(`Too many rows for this table.`,`此数据表的行数超过上限。`);case`key`:return e(`Every row needs a unique, non-empty key.`,`每一行都需要唯一且非空的键。`);case`text-budget`:return e(`The table content exceeds the text budget.`,`数据表内容超过文本上限。`)}}var Ib=/^\s*\{\{([\s\S]*)\}\}\s*$/;function Lb(e){if(e===void 0)return null;let t=Ib.exec(e),n=t?t[1].trim():``;return n===``?null:n}function Rb(e){return e.type===`comment`||e.type===`text`&&(e.value??``).trim()===``||e.type===`paragraph`&&!e.children?.length&&(e.value??``).trim()===``}function zb(e){let t=(e.attrs?.label??``).trim();if(t===``)return{ok:!1,failure:`label`};let n=Lb(e.attrs?.rows);if(!n)return{ok:!1,failure:`rows`};let r=Lb(e.attrs?.key);if(!r)return{ok:!1,failure:`key`};let i=e.attrs?.[`max-rows`],a=100;if(i!==void 0&&(!/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/.test(i.trim())||(a=Number(i.trim()),!Number.isSafeInteger(a)||a<=0||a>1e3)))return{ok:!1,failure:`max-rows`};let o=(e.children??[]).filter(e=>!Rb(e)),s=[];for(let e of o){let t=(e.children??[]).filter(e=>!Rb(e));if(e.type!==`component`||e.name!==`column`||t.length>0)return{ok:!1,failure:`columns`};let n=(e.attrs?.label??``).trim(),r=Lb(e.attrs?.value);if(n===``||!r)return{ok:!1,failure:`columns`};s.push({label:n,value:r})}return s.length<1||s.length>20?{ok:!1,failure:`columns`}:{ok:!0,table:{label:t,rows:n,key:r,maxRows:a,columns:s}}}function Bb({node:e,runtime:t,t:n}){let r=zb(e);if(!r.ok)return(0,$.jsx)(`div`,{className:`local-error local-data-table-error`,role:`alert`,children:Fb(n,r.failure)});let i;try{i=Pb({rows:Nb(t,r.table.rows),columns:r.table.columns,keyExpression:r.table.key,maxRows:r.table.maxRows,runtime:t})}catch(e){i={ok:!1,failure:e instanceof Ob?e.failure:`rows`}}if(!i.ok)return(0,$.jsx)(`div`,{className:`local-error local-data-table-error`,role:`alert`,children:Fb(n,i.failure)});let{model:a}=i;return(0,$.jsx)(`div`,{className:`md-table-scroll local-data-table-scroll`,"data-local-data-table":``,children:(0,$.jsxs)(`table`,{className:`md-table local-data-table`,"aria-label":r.table.label,children:[(0,$.jsx)(`thead`,{children:(0,$.jsx)(`tr`,{children:a.columns.map((e,t)=>(0,$.jsx)(`th`,{scope:`col`,children:e},`column-${t}`))})}),(0,$.jsx)(`tbody`,{children:a.empty?(0,$.jsx)(`tr`,{children:(0,$.jsx)(`td`,{className:`local-data-table-empty`,colSpan:a.columns.length,children:n(`No rows`,`没有数据`)})}):a.rows.map(e=>(0,$.jsx)(`tr`,{children:e.cells.map((e,t)=>(0,$.jsx)(`td`,{children:e.ok?e.text:(0,$.jsx)(`span`,{className:`local-error local-data-table-cell-error`,children:n(`Cannot compute`,`无法计算`)})},`cell-${t}`))},e.key))})]})})}function Vb(e){let t=e.regex,n=e.COMMENT(`//`,`$`,{contains:[{begin:/\\\n/}]}),r=`[a-zA-Z_]\\w*::`,i=`(?!struct)(decltype\\(auto\\)|`+t.optional(r)+`[a-zA-Z_]\\w*`+t.optional(`<[^<>]+>`)+`)`,a={className:`type`,begin:`\\b[a-z\\d_]*_t\\b`},o={className:`string`,variants:[{begin:`(u8?|U|L)?"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]},{begin:`(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)`,end:`'`,illegal:`.`},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},s={className:`number`,variants:[{begin:`[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)`},{begin:`[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)`}],relevance:0},c={className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(o,{className:`string`}),{className:`string`,begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},l={className:`title`,begin:t.optional(r)+e.IDENT_RE,relevance:0},u=t.optional(r)+e.IDENT_RE+`\\s*\\(`,d=`alignas.alignof.and.and_eq.asm.atomic_cancel.atomic_commit.atomic_noexcept.auto.bitand.bitor.break.case.catch.class.co_await.co_return.co_yield.compl.concept.const_cast|10.consteval.constexpr.constinit.continue.decltype.default.delete.do.dynamic_cast|10.else.enum.explicit.export.extern.false.final.for.friend.goto.if.import.inline.module.mutable.namespace.new.noexcept.not.not_eq.nullptr.operator.or.or_eq.override.private.protected.public.reflexpr.register.reinterpret_cast|10.requires.return.sizeof.static_assert.static_cast|10.struct.switch.synchronized.template.this.thread_local.throw.transaction_safe.transaction_safe_dynamic.true.try.typedef.typeid.typename.union.using.virtual.volatile.while.xor.xor_eq`.split(`.`),f=[`bool`,`char`,`char16_t`,`char32_t`,`char8_t`,`double`,`float`,`int`,`long`,`short`,`void`,`wchar_t`,`unsigned`,`signed`,`const`,`static`],p=`any.auto_ptr.barrier.binary_semaphore.bitset.complex.condition_variable.condition_variable_any.counting_semaphore.deque.false_type.flat_map.flat_set.future.imaginary.initializer_list.istringstream.jthread.latch.lock_guard.multimap.multiset.mutex.optional.ostringstream.packaged_task.pair.promise.priority_queue.queue.recursive_mutex.recursive_timed_mutex.scoped_lock.set.shared_future.shared_lock.shared_mutex.shared_timed_mutex.shared_ptr.stack.string_view.stringstream.timed_mutex.thread.true_type.tuple.unique_lock.unique_ptr.unordered_map.unordered_multimap.unordered_multiset.unordered_set.variant.vector.weak_ptr.wstring.wstring_view`.split(`.`),m=`abort.abs.acos.apply.as_const.asin.atan.atan2.calloc.ceil.cerr.cin.clog.cos.cosh.cout.declval.endl.exchange.exit.exp.fabs.floor.fmod.forward.fprintf.fputs.free.frexp.fscanf.future.invoke.isalnum.isalpha.iscntrl.isdigit.isgraph.islower.isprint.ispunct.isspace.isupper.isxdigit.labs.launder.ldexp.log.log10.make_pair.make_shared.make_shared_for_overwrite.make_tuple.make_unique.malloc.memchr.memcmp.memcpy.memset.modf.move.pow.printf.putchar.puts.realloc.scanf.sin.sinh.snprintf.sprintf.sqrt.sscanf.std.stderr.stdin.stdout.strcat.strchr.strcmp.strcpy.strcspn.strlen.strncat.strncmp.strncpy.strpbrk.strrchr.strspn.strstr.swap.tan.tanh.terminate.to_underlying.tolower.toupper.vfprintf.visit.vprintf.vsprintf`.split(`.`),h={type:f,keyword:d,literal:[`NULL`,`false`,`nullopt`,`nullptr`,`true`],built_in:[`_Pragma`],_type_hints:p},g={className:`function.dispatch`,relevance:0,keywords:{_hint:m},begin:t.concat(/\b/,`(?!${d.join(`|`)})`,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},_=[g,c,a,n,e.C_BLOCK_COMMENT_MODE,s,o],v={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:`new throw return else`,end:/;/}],keywords:h,contains:_.concat([{begin:/\(/,end:/\)/,keywords:h,contains:_.concat([`self`]),relevance:0}]),relevance:0},y={className:`function`,begin:`(`+i+`[\\*&\\s]+)+`+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:`decltype\\(auto\\)`,keywords:h,relevance:0},{begin:u,returnBegin:!0,contains:[l],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[o,s]},{relevance:0,match:/,/},{className:`params`,begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,o,s,a,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[`self`,n,e.C_BLOCK_COMMENT_MODE,o,s,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:`C++`,aliases:[`cc`,`c++`,`h++`,`hpp`,`hh`,`hxx`,`cxx`],keywords:h,illegal:`</`,classNameAliases:{"function.dispatch":`built_in`},contains:[].concat(v,y,g,_,[c,{begin:`\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)`,end:`>`,keywords:h,contains:[`self`,a]},{begin:e.IDENT_RE+`::`,keywords:h},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:`keyword`,3:`title.class`}}])}}function Hb(e){let t={type:[`boolean`,`byte`,`word`,`String`],built_in:`KeyboardController.MouseController.SoftwareSerial.EthernetServer.EthernetClient.LiquidCrystal.RobotControl.GSMVoiceCall.EthernetUDP.EsploraTFT.HttpClient.RobotMotor.WiFiClient.GSMScanner.FileSystem.Scheduler.GSMServer.YunClient.YunServer.IPAddress.GSMClient.GSMModem.Keyboard.Ethernet.Console.GSMBand.Esplora.Stepper.Process.WiFiUDP.GSM_SMS.Mailbox.USBHost.Firmata.PImage.Client.Server.GSMPIN.FileIO.Bridge.Serial.EEPROM.Stream.Mouse.Audio.Servo.File.Task.GPRS.WiFi.Wire.TFT.GSM.SPI.SD`.split(`.`),_hints:`setup.loop.runShellCommandAsynchronously.analogWriteResolution.retrieveCallingNumber.printFirmwareVersion.analogReadResolution.sendDigitalPortPair.noListenOnLocalhost.readJoystickButton.setFirmwareVersion.readJoystickSwitch.scrollDisplayRight.getVoiceCallStatus.scrollDisplayLeft.writeMicroseconds.delayMicroseconds.beginTransmission.getSignalStrength.runAsynchronously.getAsynchronously.listenOnLocalhost.getCurrentCarrier.readAccelerometer.messageAvailable.sendDigitalPorts.lineFollowConfig.countryNameWrite.runShellCommand.readStringUntil.rewindDirectory.readTemperature.setClockDivider.readLightSensor.endTransmission.analogReference.detachInterrupt.countryNameRead.attachInterrupt.encryptionType.readBytesUntil.robotNameWrite.readMicrophone.robotNameRead.cityNameWrite.userNameWrite.readJoystickY.readJoystickX.mouseReleased.openNextFile.scanNetworks.noInterrupts.digitalWrite.beginSpeaker.mousePressed.isActionDone.mouseDragged.displayLogos.noAutoscroll.addParameter.remoteNumber.getModifiers.keyboardRead.userNameRead.waitContinue.processInput.parseCommand.printVersion.readNetworks.writeMessage.blinkVersion.cityNameRead.readMessage.setDataMode.parsePacket.isListening.setBitOrder.beginPacket.isDirectory.motorsWrite.drawCompass.digitalRead.clearScreen.serialEvent.rightToLeft.setTextSize.leftToRight.requestFrom.keyReleased.compassRead.analogWrite.interrupts.WiFiServer.disconnect.playMelody.parseFloat.autoscroll.getPINUsed.setPINUsed.setTimeout.sendAnalog.readSlider.analogRead.beginWrite.createChar.motorsStop.keyPressed.tempoWrite.readButton.subnetMask.debugPrint.macAddress.writeGreen.randomSeed.attachGPRS.readString.sendString.remotePort.releaseAll.mouseMoved.background.getXChange.getYChange.answerCall.getResult.voiceCall.endPacket.constrain.getSocket.writeJSON.getButton.available.connected.findUntil.readBytes.exitValue.readGreen.writeBlue.startLoop.IPAddress.isPressed.sendSysex.pauseMode.gatewayIP.setCursor.getOemKey.tuneWrite.noDisplay.loadImage.switchPIN.onRequest.onReceive.changePIN.playFile.noBuffer.parseInt.overflow.checkPIN.knobRead.beginTFT.bitClear.updateIR.bitWrite.position.writeRGB.highByte.writeRed.setSpeed.readBlue.noStroke.remoteIP.transfer.shutdown.hangCall.beginSMS.endWrite.attached.maintain.noCursor.checkReg.checkPUK.shiftOut.isValid.shiftIn.pulseIn.connect.println.localIP.pinMode.getIMEI.display.noBlink.process.getBand.running.beginSD.drawBMP.lowByte.setBand.release.bitRead.prepare.pointTo.readRed.setMode.noFill.remove.listen.stroke.detach.attach.noTone.exists.buffer.height.bitSet.circle.config.cursor.random.IRread.setDNS.endSMS.getKey.micros.millis.begin.print.write.ready.flush.width.isPIN.blink.clear.press.mkdir.rmdir.close.point.yield.image.BSSID.click.delay.read.text.move.peek.beep.rect.line.open.seek.fill.size.turn.stop.home.find.step.tone.sqrt.RSSI.SSID.end.bit.tan.cos.sin.pow.map.abs.max.min.get.run.put`.split(`.`),literal:[`DIGITAL_MESSAGE`,`FIRMATA_STRING`,`ANALOG_MESSAGE`,`REPORT_DIGITAL`,`REPORT_ANALOG`,`INPUT_PULLUP`,`SET_PIN_MODE`,`INTERNAL2V56`,`SYSTEM_RESET`,`LED_BUILTIN`,`INTERNAL1V1`,`SYSEX_START`,`INTERNAL`,`EXTERNAL`,`DEFAULT`,`OUTPUT`,`INPUT`,`HIGH`,`LOW`]},n=Vb(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name=`Arduino`,n.aliases=[`ino`],n.supersetOf=`cpp`,n}function Ub(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:[`self`,{begin:/:-/,contains:[n]}]};Object.assign(n,{className:`variable`,variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,`(?![\\w\\d])(?![$])`)},r]});let i={className:`subst`,begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:`comment`}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:`string`})]}},s={className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);let c={match:/\\"/},l={className:`string`,begin:/'/,end:/'/},u={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:`number`},e.NUMBER_MODE,n]},f=e.SHEBANG({binary:`(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)`,relevance:10}),p={className:`function`,begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=[`if`,`then`,`else`,`elif`,`fi`,`time`,`for`,`while`,`until`,`in`,`do`,`done`,`case`,`esac`,`coproc`,`function`,`select`],h=[`true`,`false`],g={match:/(\/[a-z._-]+)+/},_=[`break`,`cd`,`continue`,`eval`,`exec`,`exit`,`export`,`getopts`,`hash`,`pwd`,`readonly`,`return`,`shift`,`test`,`times`,`trap`,`umask`,`unset`],v=[`alias`,`bind`,`builtin`,`caller`,`command`,`declare`,`echo`,`enable`,`help`,`let`,`local`,`logout`,`mapfile`,`printf`,`read`,`readarray`,`source`,`sudo`,`type`,`typeset`,`ulimit`,`unalias`],y=`autoload.bg.bindkey.bye.cap.chdir.clone.comparguments.compcall.compctl.compdescribe.compfiles.compgroups.compquote.comptags.comptry.compvalues.dirs.disable.disown.echotc.echoti.emulate.fc.fg.float.functions.getcap.getln.history.integer.jobs.kill.limit.log.noglob.popd.print.pushd.pushln.rehash.sched.setcap.setopt.stat.suspend.ttyctl.unfunction.unhash.unlimit.unsetopt.vared.wait.whence.where.which.zcompile.zformat.zftp.zle.zmodload.zparseopts.zprof.zpty.zregexparse.zsocket.zstyle.ztcp`.split(`.`),b=`chcon.chgrp.chown.chmod.cp.dd.df.dir.dircolors.ln.ls.mkdir.mkfifo.mknod.mktemp.mv.realpath.rm.rmdir.shred.sync.touch.truncate.vdir.b2sum.base32.base64.cat.cksum.comm.csplit.cut.expand.fmt.fold.head.join.md5sum.nl.numfmt.od.paste.ptx.pr.sha1sum.sha224sum.sha256sum.sha384sum.sha512sum.shuf.sort.split.sum.tac.tail.tr.tsort.unexpand.uniq.wc.arch.basename.chroot.date.dirname.du.echo.env.expr.factor.groups.hostid.id.link.logname.nice.nohup.nproc.pathchk.pinky.printenv.printf.pwd.readlink.runcon.seq.sleep.stat.stdbuf.stty.tee.test.timeout.tty.uname.unlink.uptime.users.who.whoami.yes`.split(`.`);return{name:`Bash`,aliases:[`sh`,`zsh`],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:h,built_in:[..._,...v,`set`,`shopt`,...y,...b]},contains:[f,e.SHEBANG(),p,d,a,o,g,s,c,l,u,n]}}function Wb(e){let t=e.regex,n=e.COMMENT(`//`,`$`,{contains:[{begin:/\\\n/}]}),r=`[a-zA-Z_]\\w*::`,i=`(decltype\\(auto\\)|`+t.optional(r)+`[a-zA-Z_]\\w*`+t.optional(`<[^<>]+>`)+`)`,a={className:`type`,variants:[{begin:`\\b[a-z\\d_]*_t\\b`},{match:/\batomic_[a-z]{3,6}\b/}]},o={className:`string`,variants:[{begin:`(u8?|U|L)?"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]},{begin:`(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)`,end:`'`,illegal:`.`},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},s={className:`number`,variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},c={className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(o,{className:`string`}),{className:`string`,begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},l={className:`title`,begin:t.optional(r)+e.IDENT_RE,relevance:0},u=t.optional(r)+e.IDENT_RE+`\\s*\\(`,d={keyword:`asm.auto.break.case.continue.default.do.else.enum.extern.for.fortran.goto.if.inline.register.restrict.return.sizeof.typeof.typeof_unqual.struct.switch.typedef.union.volatile.while._Alignas._Alignof._Atomic._Generic._Noreturn._Static_assert._Thread_local.alignas.alignof.noreturn.static_assert.thread_local._Pragma`.split(`.`),type:`float.double.signed.unsigned.int.short.long.char.void._Bool._BitInt._Complex._Imaginary._Decimal32._Decimal64._Decimal96._Decimal128._Decimal64x._Decimal128x._Float16._Float32._Float64._Float128._Float32x._Float64x._Float128x.const.static.constexpr.complex.bool.imaginary`.split(`.`),literal:`true false NULL`,built_in:`std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr`},f=[c,a,n,e.C_BLOCK_COMMENT_MODE,s,o],p={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:`new throw return else`,end:/;/}],keywords:d,contains:f.concat([{begin:/\(/,end:/\)/,keywords:d,contains:f.concat([`self`]),relevance:0}]),relevance:0},m={begin:`(`+i+`[\\*&\\s]+)+`+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:d,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:`decltype\\(auto\\)`,keywords:d,relevance:0},{begin:u,returnBegin:!0,contains:[e.inherit(l,{className:`title.function`})],relevance:0},{relevance:0,match:/,/},{className:`params`,begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,o,s,a,{begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[`self`,n,e.C_BLOCK_COMMENT_MODE,o,s,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:`C`,aliases:[`h`],keywords:d,disableAutodetect:!0,illegal:`</`,contains:[].concat(p,m,f,[c,{begin:e.IDENT_RE+`::`,keywords:d},{className:`class`,beginKeywords:`enum class struct union`,end:/[{;:<>=]/,contains:[{beginKeywords:`final class struct`},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:o,keywords:d}}}function Gb(e){let t=e.regex,n=e.COMMENT(`//`,`$`,{contains:[{begin:/\\\n/}]}),r=`[a-zA-Z_]\\w*::`,i=`(?!struct)(decltype\\(auto\\)|`+t.optional(r)+`[a-zA-Z_]\\w*`+t.optional(`<[^<>]+>`)+`)`,a={className:`type`,begin:`\\b[a-z\\d_]*_t\\b`},o={className:`string`,variants:[{begin:`(u8?|U|L)?"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]},{begin:`(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)`,end:`'`,illegal:`.`},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},s={className:`number`,variants:[{begin:`[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)`},{begin:`[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)`}],relevance:0},c={className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(o,{className:`string`}),{className:`string`,begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},l={className:`title`,begin:t.optional(r)+e.IDENT_RE,relevance:0},u=t.optional(r)+e.IDENT_RE+`\\s*\\(`,d=`alignas.alignof.and.and_eq.asm.atomic_cancel.atomic_commit.atomic_noexcept.auto.bitand.bitor.break.case.catch.class.co_await.co_return.co_yield.compl.concept.const_cast|10.consteval.constexpr.constinit.continue.decltype.default.delete.do.dynamic_cast|10.else.enum.explicit.export.extern.false.final.for.friend.goto.if.import.inline.module.mutable.namespace.new.noexcept.not.not_eq.nullptr.operator.or.or_eq.override.private.protected.public.reflexpr.register.reinterpret_cast|10.requires.return.sizeof.static_assert.static_cast|10.struct.switch.synchronized.template.this.thread_local.throw.transaction_safe.transaction_safe_dynamic.true.try.typedef.typeid.typename.union.using.virtual.volatile.while.xor.xor_eq`.split(`.`),f=[`bool`,`char`,`char16_t`,`char32_t`,`char8_t`,`double`,`float`,`int`,`long`,`short`,`void`,`wchar_t`,`unsigned`,`signed`,`const`,`static`],p=`any.auto_ptr.barrier.binary_semaphore.bitset.complex.condition_variable.condition_variable_any.counting_semaphore.deque.false_type.flat_map.flat_set.future.imaginary.initializer_list.istringstream.jthread.latch.lock_guard.multimap.multiset.mutex.optional.ostringstream.packaged_task.pair.promise.priority_queue.queue.recursive_mutex.recursive_timed_mutex.scoped_lock.set.shared_future.shared_lock.shared_mutex.shared_timed_mutex.shared_ptr.stack.string_view.stringstream.timed_mutex.thread.true_type.tuple.unique_lock.unique_ptr.unordered_map.unordered_multimap.unordered_multiset.unordered_set.variant.vector.weak_ptr.wstring.wstring_view`.split(`.`),m=`abort.abs.acos.apply.as_const.asin.atan.atan2.calloc.ceil.cerr.cin.clog.cos.cosh.cout.declval.endl.exchange.exit.exp.fabs.floor.fmod.forward.fprintf.fputs.free.frexp.fscanf.future.invoke.isalnum.isalpha.iscntrl.isdigit.isgraph.islower.isprint.ispunct.isspace.isupper.isxdigit.labs.launder.ldexp.log.log10.make_pair.make_shared.make_shared_for_overwrite.make_tuple.make_unique.malloc.memchr.memcmp.memcpy.memset.modf.move.pow.printf.putchar.puts.realloc.scanf.sin.sinh.snprintf.sprintf.sqrt.sscanf.std.stderr.stdin.stdout.strcat.strchr.strcmp.strcpy.strcspn.strlen.strncat.strncmp.strncpy.strpbrk.strrchr.strspn.strstr.swap.tan.tanh.terminate.to_underlying.tolower.toupper.vfprintf.visit.vprintf.vsprintf`.split(`.`),h={type:f,keyword:d,literal:[`NULL`,`false`,`nullopt`,`nullptr`,`true`],built_in:[`_Pragma`],_type_hints:p},g={className:`function.dispatch`,relevance:0,keywords:{_hint:m},begin:t.concat(/\b/,`(?!${d.join(`|`)})`,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},_=[g,c,a,n,e.C_BLOCK_COMMENT_MODE,s,o],v={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:`new throw return else`,end:/;/}],keywords:h,contains:_.concat([{begin:/\(/,end:/\)/,keywords:h,contains:_.concat([`self`]),relevance:0}]),relevance:0},y={className:`function`,begin:`(`+i+`[\\*&\\s]+)+`+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:`decltype\\(auto\\)`,keywords:h,relevance:0},{begin:u,returnBegin:!0,contains:[l],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[o,s]},{relevance:0,match:/,/},{className:`params`,begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,o,s,a,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[`self`,n,e.C_BLOCK_COMMENT_MODE,o,s,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:`C++`,aliases:[`cc`,`c++`,`h++`,`hpp`,`hh`,`hxx`,`cxx`],keywords:h,illegal:`</`,classNameAliases:{"function.dispatch":`built_in`},contains:[].concat(v,y,g,_,[c,{begin:`\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)`,end:`>`,keywords:h,contains:[`self`,a]},{begin:e.IDENT_RE+`::`,keywords:h},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:`keyword`,3:`title.class`}}])}}function Kb(e){let t=[`bool`,`byte`,`char`,`decimal`,`delegate`,`double`,`dynamic`,`enum`,`float`,`int`,`long`,`nint`,`nuint`,`object`,`sbyte`,`short`,`string`,`ulong`,`uint`,`ushort`],n=[`public`,`private`,`protected`,`static`,`internal`,`protected`,`abstract`,`async`,`extern`,`override`,`unsafe`,`virtual`,`new`,`sealed`,`partial`],r={keyword:`abstract.as.base.break.case.catch.class.const.continue.do.else.event.explicit.extern.finally.fixed.for.foreach.goto.if.implicit.in.interface.internal.is.lock.namespace.new.operator.out.override.params.private.protected.public.readonly.record.ref.return.scoped.sealed.sizeof.stackalloc.static.struct.switch.this.throw.try.typeof.unchecked.unsafe.using.virtual.void.volatile.while`.split(`.`).concat(`add.alias.and.ascending.args.async.await.by.descending.dynamic.equals.file.from.get.global.group.init.into.join.let.nameof.not.notnull.on.or.orderby.partial.record.remove.required.scoped.select.set.unmanaged.value|0.var.when.where.with.yield`.split(`.`)),built_in:t,literal:[`default`,`false`,`null`,`true`]},i=e.inherit(e.TITLE_MODE,{begin:`[a-zA-Z](\\.?\\w)*`}),a={className:`number`,variants:[{begin:`\\b(0b[01']+)`},{begin:`(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)`},{begin:`(-?)(\\b0[xX][a-fA-F0-9'_]+|(\\b[\\d'_]+(\\.[\\d'_]*)?|\\.[\\d'_]+)([eE][-+]?[\\d'_]+)?)`}],relevance:0},o={className:`string`,begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},s={className:`string`,begin:`@"`,end:`"`,contains:[{begin:`""`}]},c=e.inherit(s,{illegal:/\n/}),l={className:`subst`,begin:/\{/,end:/\}/,keywords:r},u=e.inherit(l,{illegal:/\n/}),d={className:`string`,begin:/\$"/,end:`"`,illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,u]},f={className:`string`,begin:/\$@"/,end:`"`,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:`""`},l]},p=e.inherit(f,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:`""`},u]});l.contains=[f,d,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE],u.contains=[p,d,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];let m={variants:[o,f,d,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},h={begin:`<`,end:`>`,contains:[{beginKeywords:`in out`},i]},g=e.IDENT_RE+`(<`+e.IDENT_RE+`(\\s*,\\s*`+e.IDENT_RE+`)*>)?(\\[\\])?`,_={begin:`@`+e.IDENT_RE,relevance:0};return{name:`C#`,aliases:[`cs`,`c#`],keywords:r,illegal:/::/,contains:[e.COMMENT(`///`,`$`,{returnBegin:!0,contains:[{className:`doctag`,variants:[{begin:`///`,relevance:0},{begin:`<!--|-->`},{begin:`</?`,end:`>`}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:`meta`,begin:`#`,end:`$`,keywords:{keyword:`if else elif endif define undef warning error line region endregion pragma checksum`}},m,a,{beginKeywords:`class interface`,relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:`where class`},i,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`namespace`,relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`record`,relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:`meta`,begin:`^\\s*\\[(?=[\\w])`,excludeBegin:!0,end:`\\]`,excludeEnd:!0,contains:[{className:`string`,begin:/"/,end:/"/}]},{beginKeywords:`new return throw await else`,relevance:0},{className:`function`,begin:`(`+g+`\\s+)+`+e.IDENT_RE+`\\s*(<[^=]+>\\s*)?\\(`,returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:r,contains:[{beginKeywords:n.join(` `),relevance:0},{begin:e.IDENT_RE+`\\s*(<[^=]+>\\s*)?\\(`,returnBegin:!0,contains:[e.TITLE_MODE,h],relevance:0},{match:/\(\)/},{className:`params`,begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,relevance:0,contains:[m,a,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},_]}}var qb=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:`number`,begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Jb=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),Yb=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),Xb=[...Jb,...Yb],Zb=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),Qb=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),$b=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),ex=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.unicode-range.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse();function tx(e){let t=e.regex,n=qb(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i=/@-?\w[\w]*(-\w+)*/,a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:`CSS`,case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:`from to`},classNameAliases:{keyframePosition:`selector-tag`},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:`selector-id`,begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:`selector-class`,begin:`\\.[a-zA-Z-][a-zA-Z0-9_-]*`,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,variants:[{begin:`:(`+Qb.join(`|`)+`)`},{begin:`:(:)?(`+$b.join(`|`)+`)`}]},n.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+ex.join(`|`)+`)\\b`},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,n.UNICODE_RANGE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:`url data-uri`},contains:[...a,{className:`string`,begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:`[{;]`,relevance:0,illegal:/:/,contains:[{className:`keyword`,begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:Zb.join(` `)},contains:[{begin:/[a-z-]+(?=:)/,className:`attribute`},...a,n.CSS_NUMBER_MODE]}]},{className:`selector-tag`,begin:`\\b(`+Xb.join(`|`)+`)\\b`}]}}function nx(e){let t=e.regex;return{name:`Diff`,aliases:[`patch`],contains:[{className:`meta`,relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+,\d+ +\+\d+ +@@/,/^@@ +-\d+ +\+\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:`comment`,variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:`addition`,begin:/^\+/,end:/$/},{className:`deletion`,begin:/^-/,end:/$/},{className:`addition`,begin:/^!/,end:/$/}]}}function rx(e){let t={keyword:[`break`,`case`,`chan`,`const`,`continue`,`default`,`defer`,`else`,`fallthrough`,`for`,`func`,`go`,`goto`,`if`,`import`,`interface`,`map`,`package`,`range`,`return`,`select`,`struct`,`switch`,`type`,`var`],type:[`bool`,`byte`,`complex64`,`complex128`,`error`,`float32`,`float64`,`int8`,`int16`,`int32`,`int64`,`string`,`uint8`,`uint16`,`uint32`,`uint64`,`int`,`uint`,`uintptr`,`rune`],literal:[`true`,`false`,`iota`,`nil`],built_in:[`append`,`cap`,`close`,`complex`,`copy`,`imag`,`len`,`make`,`new`,`panic`,`print`,`println`,`real`,`recover`,`delete`]};return{name:`Go`,aliases:[`golang`],keywords:t,illegal:`</`,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:`string`,variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:`number`,variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:`function`,beginKeywords:`func`,end:`\\s*(\\{|$)`,excludeEnd:!0,contains:[e.TITLE_MODE,{className:`params`,begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}}function ix(e){let t=e.regex;return{name:`GraphQL`,aliases:[`gql`],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:[`query`,`mutation`,`subscription`,`type`,`input`,`schema`,`directive`,`interface`,`union`,`scalar`,`fragment`,`enum`,`on`],literal:[`true`,`false`,`null`]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:`punctuation`,match:/[.]{3}/,relevance:0},{scope:`punctuation`,begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:`variable`,begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:`meta`,match:/@\w+/,excludeEnd:!0},{scope:`symbol`,begin:t.concat(/[_A-Za-z][_0-9A-Za-z]*/,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function ax(e){let t=e.regex,n={className:`number`,relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];let i={className:`variable`,variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},a={className:`literal`,begin:/\bon|off|true|false|yes|no\b/},o={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:`'''`,end:`'''`,relevance:10},{begin:`"""`,end:`"""`,relevance:10},{begin:`"`,end:`"`},{begin:`'`,end:`'`}]},s={begin:/\[/,end:/\]/,contains:[r,a,i,o,n,`self`],relevance:0},c=t.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:`TOML, also INI`,aliases:[`toml`],case_insensitive:!0,illegal:/\S/,contains:[r,{className:`section`,begin:/\[+/,end:/\]+/},{begin:t.concat(c,`(\\s*\\.\\s*`,c,`)*`,t.lookahead(/\s*=\s*[^#\s]/)),className:`attr`,starts:{end:/$/,contains:[r,s,a,i,o,n]}}]}}var ox=`[0-9](_*[0-9])*`,sx=`\\.(${ox})`,cx=`[0-9a-fA-F](_*[0-9a-fA-F])*`,lx={className:`number`,variants:[{begin:`(\\b(${ox})((${sx})|\\.)?|(${sx}))[eE][+-]?(${ox})[fFdD]?\\b`},{begin:`\\b(${ox})((${sx})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${sx})[fFdD]?\\b`},{begin:`\\b(${ox})[fFdD]\\b`},{begin:`\\b0[xX]((${cx})\\.?|(${cx})?\\.(${cx}))[pP][+-]?(${ox})[fFdD]?\\b`},{begin:`\\b(0|[1-9](_*[0-9])*)[lL]?\\b`},{begin:`\\b0[xX](${cx})[lL]?\\b`},{begin:`\\b0(_*[0-7])*[lL]?\\b`},{begin:`\\b0[bB][01](_*[01])*[lL]?\\b`}],relevance:0};function ux(e,t,n){return n===-1?``:e.replace(t,r=>ux(e,t,n-1))}function dx(e){let t=e.regex,n=`[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*`,r=n+ux(`(?:<`+n+`~~~(?:\\s*,\\s*`+n+`~~~)*>)?`,/~~~/g,2),i={keyword:`synchronized.abstract.private.var.static.if.const .for.while.strictfp.finally.protected.import.native.final.void.enum.else.break.transient.catch.instanceof.volatile.case.assert.package.default.public.try.switch.continue.throws.protected.public.private.module.requires.exports.do.sealed.yield.permits.goto.when`.split(`.`),literal:[`false`,`true`,`null`],type:[`char`,`boolean`,`long`,`float`,`int`,`byte`,`short`,`double`],built_in:[`super`,`this`]},a={className:`meta`,begin:`@`+n,contains:[{begin:/\(/,end:/\)/,contains:[`self`]}]},o={className:`params`,begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:`Java`,aliases:[`jsp`],keywords:i,illegal:/<\/|#/,contains:[e.COMMENT(`/\\*\\*`,`\\*/`,{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:`doctag`,begin:`@[A-Za-z]+`}]}),{begin:/import java\.[a-z]+\./,keywords:`import`,relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:`string`,contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:`keyword`,3:`title.class`}},{match:/non-sealed/,scope:`keyword`},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:`type`,3:`variable`,5:`operator`}},{begin:[/record/,/\s+/,n],className:{1:`keyword`,3:`title.class`},contains:[o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`new throw return else`,relevance:0},{begin:[`(?:`+r+`\\s+)`,e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:`title.function`},keywords:i,contains:[{className:`params`,begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[a,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,lx,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},lx,a]}}var fx=`[A-Za-z$_][0-9A-Za-z$_]*`,px=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),mx=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],hx=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),gx=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],_x=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],vx=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],yx=[].concat(_x,hx,gx);function bx(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=fx,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&a.index===0)&&t.ignoreMatch()}},s={$pattern:fx,keyword:px,literal:mx,built_in:yx,"variable.language":vx},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...hx,...gx]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function D(e){return t.concat(`(?!`,e.join(`|`),`)`)}let O={match:t.concat(/\b/,D([..._x,`super`,`import`,`await`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},A={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},j=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(j)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},M,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:j,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},k,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},O,E,S,A,{match:/\$[(.]/}]}}var xx={scope:`number`,match:`([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity`,relevance:0};function Sx(e){let t={className:`attr`,begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:`punctuation`,relevance:0},r=[`true`,`false`,`null`],i={scope:`literal`,beginKeywords:r.join(` `)};return{name:`JSON`,aliases:[`jsonc`,`json5`],keywords:{literal:r},contains:[t,n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,xx,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:`\\S`}}var Cx=`[0-9](_*[0-9])*`,wx=`\\.(${Cx})`,Tx=`[0-9a-fA-F](_*[0-9a-fA-F])*`,Ex={className:`number`,variants:[{begin:`(\\b(${Cx})((${wx})|\\.)?|(${wx}))[eE][+-]?(${Cx})[fFdD]?\\b`},{begin:`\\b(${Cx})((${wx})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${wx})[fFdD]?\\b`},{begin:`\\b(${Cx})[fFdD]\\b`},{begin:`\\b0[xX]((${Tx})\\.?|(${Tx})?\\.(${Tx}))[pP][+-]?(${Cx})[fFdD]?\\b`},{begin:`\\b(0|[1-9](_*[0-9])*)[lL]?\\b`},{begin:`\\b0[xX](${Tx})[lL]?\\b`},{begin:`\\b0(_*[0-7])*[lL]?\\b`},{begin:`\\b0[bB][01](_*[01])*[lL]?\\b`}],relevance:0};function Dx(e){let t={keyword:`abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual`,built_in:`Byte Short Char Int Long Boolean Float Double Void Unit Nothing`,literal:`true false null`},n={className:`keyword`,begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:`symbol`,begin:/@\w+/}]}},r={className:`symbol`,begin:e.UNDERSCORE_IDENT_RE+`@`},i={className:`subst`,begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:`variable`,begin:`\\$`+e.UNDERSCORE_IDENT_RE},o={className:`string`,variants:[{begin:`"""`,end:`"""(?=[^"])`,contains:[a,i]},{begin:`'`,end:`'`,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:`"`,end:`"`,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,i]}]};i.contains.push(o);let s={className:`meta`,begin:`@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*`+e.UNDERSCORE_IDENT_RE+`)?`},c={className:`meta`,begin:`@`+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:`string`}),`self`]}]},l=Ex,u=e.COMMENT(`/\\*`,`\\*/`,{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:`type`,begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:`Kotlin`,aliases:[`kt`,`kts`],keywords:t,contains:[e.COMMENT(`/\\*\\*`,`\\*/`,{relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`}]}),e.C_LINE_COMMENT_MODE,u,n,r,s,c,{className:`function`,beginKeywords:`fun`,end:`[(]|$`,returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+`\\s*\\(`,returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:`type`,begin:/</,end:/>/,keywords:`reified`,relevance:0},{className:`params`,begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,u],relevance:0},e.C_LINE_COMMENT_MODE,u,s,c,o,e.C_NUMBER_MODE]},u]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:`title.class`},keywords:`class interface trait`,end:/[:\{(]|$/,excludeEnd:!0,illegal:`extends implements`,contains:[{beginKeywords:`public protected internal private constructor`},e.UNDERSCORE_TITLE_MODE,{className:`type`,begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,c]},o,{className:`meta`,begin:`^#!/usr/bin/env`,end:`$`,illegal:`
64
+ `},l]}}var Ox=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:`number`,begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),kx=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),Ax=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),jx=[...kx,...Ax],Mx=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),Nx=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),Px=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),Fx=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.unicode-range.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse(),Ix=Nx.concat(Px).sort().reverse();function Lx(e){let t=Ox(e),n=Ix,r=`([\\w-]+|@\\{[\\w-]+\\})`,i=[],a=[],o=function(e){return{className:`string`,begin:`~?`+e+`.*?`+e}},s=function(e,t,n){return{className:e,begin:t,relevance:n}},c={$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:Mx.join(` `)},l={begin:`\\(`,end:`\\)`,contains:a,keywords:c,relevance:0};a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,o(`'`),o(`"`),t.CSS_NUMBER_MODE,{begin:`(url|data-uri)\\(`,starts:{className:`string`,end:`[\\)\\n]`,excludeEnd:!0}},t.UNICODE_RANGE,t.HEXCOLOR,l,s(`variable`,`@@?[\\w-]+`,10),s(`variable`,`@\\{[\\w-]+\\}`),s(`built_in`,"~?`[^`]*?`"),{className:`attribute`,begin:`[\\w-]+\\s*:`,end:`:`,returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:`and not`},t.FUNCTION_DISPATCH);let u=a.concat({begin:/\{/,end:/\}/,contains:i}),d={beginKeywords:`when`,endsWithParent:!0,contains:[{beginKeywords:`and not`}].concat(a)},f={begin:r+`\\s*:`,returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+Fx.join(`|`)+`)\\b`,end:/(?=:)/,starts:{endsWithParent:!0,illegal:`[<=$]`,relevance:0,contains:a}}]},p={className:`keyword`,begin:`@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b`,starts:{end:`[;{}]`,keywords:c,returnEnd:!0,contains:a,relevance:0}},m={className:`variable`,variants:[{begin:`@[\\w-]+\\s*:`,relevance:15},{begin:`@[\\w-]+`}],starts:{end:`[;}]`,returnEnd:!0,contains:u}},h={variants:[{begin:`[\\.#:&\\[>]`,end:`[;{}]`},{begin:r,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d,s(`keyword`,`all\\b`),s(`variable`,`@\\{[\\w-]+\\}`),{begin:`\\b(`+jx.join(`|`)+`)\\b`,className:`selector-tag`},t.CSS_NUMBER_MODE,s(`selector-tag`,r,0),s(`selector-id`,`#`+r),s(`selector-class`,`\\.`+r,0),s(`selector-tag`,`&`,0),t.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,begin:`:(`+Nx.join(`|`)+`)`},{className:`selector-pseudo`,begin:`:(:)?(`+Px.join(`|`)+`)`},{begin:/\(/,end:/\)/,relevance:0,contains:u},{begin:`!important`},t.FUNCTION_DISPATCH]},g={begin:`[\\w-]+:(:)?(${n.join(`|`)})`,returnBegin:!0,contains:[h]};return i.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,m,g,f,h,d,t.FUNCTION_DISPATCH),{name:`Less`,case_insensitive:!0,illegal:`[=>'/<($"]`,contains:i}}function Rx(e){let t=`\\[=*\\[`,n=`\\]=*\\]`,r={begin:t,end:n,contains:[`self`]},i=[e.COMMENT(`--(?!\\[=*\\[)`,`$`),e.COMMENT(`--\\[=*\\[`,n,{contains:[r],relevance:10})];return{name:`Lua`,aliases:[`pluto`],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:`true false nil`,keyword:`and break do else elseif end for goto if in local not or repeat return then until while`,built_in:`_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove`},contains:i.concat([{className:`function`,beginKeywords:`function`,end:`\\)`,contains:[e.inherit(e.TITLE_MODE,{begin:`([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*`}),{className:`params`,begin:`\\(`,endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:`string`,begin:t,end:n,contains:[r],relevance:5}])}}function zx(e){let t={className:`variable`,variants:[{begin:`\\$\\(`+e.UNDERSCORE_IDENT_RE+`\\)`,contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:`variable`,begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:`subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value`},contains:[t,n]},i={begin:`^`+e.UNDERSCORE_IDENT_RE+`\\s*(?=[:+?]?=)`},a={className:`meta`,begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:`.PHONY`}},o={className:`section`,begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:`Makefile`,aliases:[`mk`,`mak`,`make`],keywords:{$pattern:/[\w-]+/,keyword:`define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath`},contains:[e.HASH_COMMENT_MODE,t,n,r,i,a,o]}}function Bx(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:`>`,subLanguage:`xml`,relevance:0},r={begin:`^[-\\*]{3,}`,end:`$`},i={className:`code`,variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:`(~{3,})[^~](.|\\n)*?\\1~*[ ]*`},{begin:"```",end:"```+[ ]*$"},{begin:`~~~`,end:`~~~+[ ]*$`},{begin:"`.+?`"},{begin:`(?=^( {4}|\\t))`,contains:[{begin:`^( {4}|\\t)`,end:`(\\n)$`}],relevance:0}]},a={className:`bullet`,begin:`^[ ]*([*+-]|(\\d+\\.))(?=\\s+)`,end:`\\s+`,excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:`symbol`,begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:`link`,begin:/:\s*/,end:/$/,excludeBegin:!0}]},s={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:`string`,relevance:0,begin:`\\[`,end:`\\]`,excludeBegin:!0,returnEnd:!0},{className:`link`,relevance:0,begin:`\\]\\(`,end:`\\)`,excludeBegin:!0,excludeEnd:!0},{className:`symbol`,relevance:0,begin:`\\]\\[`,end:`\\]`,excludeBegin:!0,excludeEnd:!0}]},c={className:`strong`,contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},l={className:`emphasis`,contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},u=e.inherit(c,{contains:[]}),d=e.inherit(l,{contains:[]});c.contains.push(d),l.contains.push(u);let f=[n,s];return[c,l,u,d].forEach(e=>{e.contains=e.contains.concat(f)}),f=f.concat(c,l),{name:`Markdown`,aliases:[`md`,`mkdown`,`mkd`],contains:[{className:`section`,variants:[{begin:`^#{1,6}`,end:`$`,contains:f},{begin:`(?=^.+?\\n[=-]{2,}$)`,contains:[{begin:`^[=-]*$`},{begin:`^`,end:`\\n`,contains:f}]}]},n,a,c,l,{className:`quote`,begin:`^>\\s+`,contains:f,end:`$`},i,r,s,o,{scope:`literal`,match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function Vx(e){let t={className:`built_in`,begin:`\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+`},n=/[a-zA-Z@][a-zA-Z0-9_]*/,r={"variable.language":[`this`,`super`],$pattern:n,keyword:`while.export.sizeof.typedef.const.struct.for.union.volatile.static.mutable.if.do.return.goto.enum.else.break.extern.asm.case.default.register.explicit.typename.switch.continue.inline.readonly.assign.readwrite.self.@synchronized.id.typeof.nonatomic.IBOutlet.IBAction.strong.weak.copy.in.out.inout.bycopy.byref.oneway.__strong.__weak.__block.__autoreleasing.@private.@protected.@public.@try.@property.@end.@throw.@catch.@finally.@autoreleasepool.@synthesize.@dynamic.@selector.@optional.@required.@encode.@package.@import.@defs.@compatibility_alias.__bridge.__bridge_transfer.__bridge_retained.__bridge_retain.__covariant.__contravariant.__kindof._Nonnull._Nullable._Null_unspecified.__FUNCTION__.__PRETTY_FUNCTION__.__attribute__.getter.setter.retain.unsafe_unretained.nonnull.nullable.null_unspecified.null_resettable.class.instancetype.NS_DESIGNATED_INITIALIZER.NS_UNAVAILABLE.NS_REQUIRES_SUPER.NS_RETURNS_INNER_POINTER.NS_INLINE.NS_AVAILABLE.NS_DEPRECATED.NS_ENUM.NS_OPTIONS.NS_SWIFT_UNAVAILABLE.NS_ASSUME_NONNULL_BEGIN.NS_ASSUME_NONNULL_END.NS_REFINED_FOR_SWIFT.NS_SWIFT_NAME.NS_SWIFT_NOTHROW.NS_DURING.NS_HANDLER.NS_ENDHANDLER.NS_VALUERETURN.NS_VOIDRETURN`.split(`.`),literal:[`false`,`true`,`FALSE`,`TRUE`,`nil`,`YES`,`NO`,`NULL`],built_in:[`dispatch_once_t`,`dispatch_queue_t`,`dispatch_sync`,`dispatch_async`,`dispatch_once`],type:[`int`,`float`,`char`,`unsigned`,`signed`,`short`,`long`,`double`,`wchar_t`,`unichar`,`void`,`bool`,`BOOL`,`id|0`,`_Bool`]},i={$pattern:n,keyword:[`@interface`,`@class`,`@protocol`,`@implementation`]};return{name:`Objective-C`,aliases:[`mm`,`objc`,`obj-c`,`obj-c++`,`objective-c++`],keywords:r,illegal:`</`,contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:`string`,variants:[{begin:`@"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]}]},{className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma ifdef ifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:`string`}),{className:`string`,begin:/<.*?>/,end:/$/,illegal:`\\n`},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:`class`,begin:`(`+i.keyword.join(`|`)+`)\\b`,end:/(\{|$)/,excludeEnd:!0,keywords:i,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:`\\.`+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function Hx(e){let t=e.regex,n=`abs.accept.alarm.and.atan2.bind.binmode.bless.break.caller.chdir.chmod.chomp.chop.chown.chr.chroot.class.close.closedir.connect.continue.cos.crypt.dbmclose.dbmopen.defined.delete.die.do.dump.each.else.elsif.endgrent.endhostent.endnetent.endprotoent.endpwent.endservent.eof.eval.exec.exists.exit.exp.fcntl.field.fileno.flock.for.foreach.fork.format.formline.getc.getgrent.getgrgid.getgrnam.gethostbyaddr.gethostbyname.gethostent.getlogin.getnetbyaddr.getnetbyname.getnetent.getpeername.getpgrp.getpriority.getprotobyname.getprotobynumber.getprotoent.getpwent.getpwnam.getpwuid.getservbyname.getservbyport.getservent.getsockname.getsockopt.given.glob.gmtime.goto.grep.gt.hex.if.index.int.ioctl.join.keys.kill.last.lc.lcfirst.length.link.listen.local.localtime.log.lstat.lt.ma.map.method.mkdir.msgctl.msgget.msgrcv.msgsnd.my.ne.next.no.not.oct.open.opendir.or.ord.our.pack.package.pipe.pop.pos.print.printf.prototype.push.q|0.qq.quotemeta.qw.qx.rand.read.readdir.readline.readlink.readpipe.recv.redo.ref.rename.require.reset.return.reverse.rewinddir.rindex.rmdir.say.scalar.seek.seekdir.select.semctl.semget.semop.send.setgrent.sethostent.setnetent.setpgrp.setpriority.setprotoent.setpwent.setservent.setsockopt.shift.shmctl.shmget.shmread.shmwrite.shutdown.sin.sleep.socket.socketpair.sort.splice.split.sprintf.sqrt.srand.stat.state.study.sub.substr.symlink.syscall.sysopen.sysread.sysseek.system.syswrite.tell.telldir.tie.tied.time.times.tr.truncate.uc.ucfirst.umask.undef.unless.unlink.unpack.unshift.untie.until.use.utime.values.vec.wait.waitpid.wantarray.warn.when.while.write.x|0.xor.y|0`.split(`.`),r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(` `)},a={className:`subst`,begin:`[$@]\\{`,end:`\\}`,keywords:i},o={begin:/->\{/,end:/\}/},s={scope:`attr`,match:/\s+:\s*\w+(\s*\(.*?\))?/},c={scope:`variable`,variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,`(?![A-Za-z])(?![@$%])`)},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[s]},l={className:`number`,variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},u=[e.BACKSLASH_ESCAPE,a,c],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],f=(e,n,i=`\\1`)=>{let a=i===`\\1`?i:t.concat(i,n);return t.concat(t.concat(`(?:`,e,`)`),n,/(?:\\.|[^\\\/])*?/,a,/(?:\\.|[^\\\/])*?/,i,r)},p=(e,n,i)=>t.concat(t.concat(`(?:`,e,`)`),n,/(?:\\.|[^\\\/])*?/,i,r),m=[c,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:`string`,contains:u,variants:[{begin:`q[qwxr]?\\s*\\(`,end:`\\)`,relevance:5},{begin:`q[qwxr]?\\s*\\[`,end:`\\]`,relevance:5},{begin:`q[qwxr]?\\s*\\{`,end:`\\}`,relevance:5},{begin:`q[qwxr]?\\s*\\|`,end:`\\|`,relevance:5},{begin:`q[qwxr]?\\s*<`,end:`>`,relevance:5},{begin:`qw\\s+q`,end:`q`,relevance:5},{begin:`'`,end:`'`,contains:[e.BACKSLASH_ESCAPE]},{begin:`"`,end:`"`},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:`-?\\w+\\s*=>`,relevance:0}]},l,{begin:`(\\/\\/|`+e.RE_STARTERS_RE+`|\\b(split|return|print|reverse|grep)\\b)\\s*`,keywords:`split return print reverse grep`,relevance:0,contains:[e.HASH_COMMENT_MODE,{className:`regexp`,variants:[{begin:f(`s|tr|y`,t.either(...d,{capture:!0}))},{begin:f(`s|tr|y`,`\\(`,`\\)`)},{begin:f(`s|tr|y`,`\\[`,`\\]`)},{begin:f(`s|tr|y`,`\\{`,`\\}`)}],relevance:2},{className:`regexp`,variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p(`(?:m|qr)?`,/\//,/\//)},{begin:p(`m|qr`,t.either(...d,{capture:!0}),/\1/)},{begin:p(`m|qr`,/\(/,/\)/)},{begin:p(`m|qr`,/\[/,/\]/)},{begin:p(`m|qr`,/\{/,/\}/)}]}]},{className:`function`,beginKeywords:`sub method`,end:`(\\s*\\(.*?\\))?[;{]`,excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s]},{className:`class`,beginKeywords:`class`,end:`[;{]`,excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s,l]},{begin:`-\\w\\b`,relevance:0},{begin:`^__DATA__$`,end:`^__END__$`,subLanguage:`mojolicious`,contains:[{begin:`^@@.*`,end:`$`,className:`comment`}]}];return a.contains=m,o.contains=m,{name:`Perl`,aliases:[`pl`,`pm`],keywords:i,contains:m}}function Ux(e){let t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a=t.concat(/[A-Z]+/,n),o={scope:`variable`,match:`\\$+`+r},s={scope:`meta`,variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},c={scope:`subst`,variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=e.inherit(e.APOS_STRING_MODE,{illegal:null}),u=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(c)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(c),"on:begin":(e,t)=>{t.data._beginMatch=e[1]||e[2]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}},f=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[
65
+ ]`,m={scope:`string`,variants:[u,l,d,f]},h={scope:`number`,variants:[{begin:`\\b0[bB][01]+(?:_[01]+)*\\b`},{begin:`\\b0[oO][0-7]+(?:_[0-7]+)*\\b`},{begin:`\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b`},{begin:`(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?`}],relevance:0},g=[`false`,`null`,`true`],_=`__CLASS__.__DIR__.__FILE__.__FUNCTION__.__COMPILER_HALT_OFFSET__.__LINE__.__METHOD__.__NAMESPACE__.__TRAIT__.die.echo.exit.include.include_once.print.require.require_once.array.abstract.and.as.binary.bool.boolean.break.callable.case.catch.class.clone.const.continue.declare.default.do.double.else.elseif.empty.enddeclare.endfor.endforeach.endif.endswitch.endwhile.enum.eval.extends.final.finally.float.for.foreach.from.global.goto.if.implements.instanceof.insteadof.int.integer.interface.isset.iterable.list.match|0.mixed.new.never.object.or.private.protected.public.readonly.real.return.string.switch.throw.trait.try.unset.use.var.void.while.xor.yield`.split(`.`),v=`Error|0.AppendIterator.ArgumentCountError.ArithmeticError.ArrayIterator.ArrayObject.AssertionError.BadFunctionCallException.BadMethodCallException.CachingIterator.CallbackFilterIterator.CompileError.Countable.DirectoryIterator.DivisionByZeroError.DomainException.EmptyIterator.ErrorException.Exception.FilesystemIterator.FilterIterator.GlobIterator.InfiniteIterator.InvalidArgumentException.IteratorIterator.LengthException.LimitIterator.LogicException.MultipleIterator.NoRewindIterator.OutOfBoundsException.OutOfRangeException.OuterIterator.OverflowException.ParentIterator.ParseError.RangeException.RecursiveArrayIterator.RecursiveCachingIterator.RecursiveCallbackFilterIterator.RecursiveDirectoryIterator.RecursiveFilterIterator.RecursiveIterator.RecursiveIteratorIterator.RecursiveRegexIterator.RecursiveTreeIterator.RegexIterator.RuntimeException.SeekableIterator.SplDoublyLinkedList.SplFileInfo.SplFileObject.SplFixedArray.SplHeap.SplMaxHeap.SplMinHeap.SplObjectStorage.SplObserver.SplPriorityQueue.SplQueue.SplStack.SplSubject.SplTempFileObject.TypeError.UnderflowException.UnexpectedValueException.UnhandledMatchError.ArrayAccess.BackedEnum.Closure.Fiber.Generator.Iterator.IteratorAggregate.Serializable.Stringable.Throwable.Traversable.UnitEnum.WeakReference.WeakMap.Directory.__PHP_Incomplete_Class.parent.php_user_filter.self.static.stdClass`.split(`.`),y={keyword:_,literal:(e=>{let t=[];return e.forEach(e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())}),t})(g),built_in:v},b=e=>e.map(e=>e.replace(/\|\d+$/,``)),x={variants:[{match:[/new/,t.concat(p,`+`),t.concat(`(?!`,b(v).join(`\\b|`),`\\b)`),i],scope:{1:`keyword`,4:`title.class`}}]},S=t.concat(r,`\\b(?!\\()`),C={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),S],scope:{2:`variable.constant`}},{match:[/::/,/class/],scope:{2:`variable.language`}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),S],scope:{1:`title.class`,3:`variable.constant`}},{match:[i,t.concat(`::`,t.lookahead(/(?!class\b)/))],scope:{1:`title.class`}},{match:[i,/::/,/class/],scope:{1:`title.class`,3:`variable.language`}}]},w={scope:`attr`,match:t.concat(r,t.lookahead(`:`),t.lookahead(/(?!::)/))},T={relevance:0,begin:/\(/,end:/\)/,keywords:y,contains:[w,o,C,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,m,h,x]},E={relevance:0,match:[/\b/,t.concat(`(?!fn\\b|function\\b|`,b(_).join(`\\b|`),`|`,b(v).join(`\\b|`),`\\b)`),r,t.concat(p,`*`),t.lookahead(/(?=\()/)],scope:{3:`title.function.invoke`},contains:[T]};T.contains.push(E);let D=[w,C,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,m,h,x],O={begin:t.concat(/#\[\s*\\?/,t.either(i,a)),beginScope:`meta`,end:/]/,endScope:`meta`,keywords:{literal:g,keyword:[`new`,`array`]},contains:[{begin:/\[/,end:/]/,keywords:{literal:g,keyword:[`new`,`array`]},contains:[`self`,...D]},...D,{scope:`meta`,variants:[{match:i},{match:a}]}]};return{case_insensitive:!1,keywords:y,contains:[O,e.HASH_COMMENT_MODE,e.COMMENT(`//`,`$`),e.COMMENT(`/\\*`,`\\*/`,{contains:[{scope:`doctag`,match:`@[A-Za-z]+`}]}),{match:/__halt_compiler\(\);/,keywords:`__halt_compiler`,starts:{scope:`comment`,end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:`meta`,endsParent:!0}]}},s,{scope:`variable.language`,match:/\$this\b/},o,E,C,{match:[/const/,/\s/,r],scope:{1:`keyword`,3:`variable.constant`}},x,{scope:`function`,relevance:0,beginKeywords:`fn function`,end:/[;{]/,excludeEnd:!0,illegal:`[$%\\[]`,contains:[{beginKeywords:`use`},e.UNDERSCORE_TITLE_MODE,{begin:`=>`,endsParent:!0},{scope:`params`,begin:`\\(`,end:`\\)`,excludeBegin:!0,excludeEnd:!0,keywords:y,contains:[`self`,O,o,C,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,m,h]}]},{scope:`class`,variants:[{beginKeywords:`enum`,illegal:/[($"]/},{beginKeywords:`class interface trait`,illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:`extends implements`},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:`namespace`,relevance:0,end:`;`,illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:`title.class`})]},{beginKeywords:`use`,relevance:0,end:`;`,contains:[{match:/\b(as|const|function)\b/,scope:`keyword`},e.UNDERSCORE_TITLE_MODE]},m,h]}}function Wx(e){return{name:`PHP template`,subLanguage:`xml`,contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:`php`,contains:[{begin:`/\\*`,end:`\\*/`,skip:!0},{begin:`b"`,end:`"`,skip:!0},{begin:`b'`,end:`'`,skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function Gx(e){return{name:`Plain text`,aliases:[`text`,`txt`],disableAutodetect:!0}}function Kx(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=`and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.match.nonlocal|10.not.or.pass.raise.return.try.while.with.yield`.split(`.`),i={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:`__import__.abs.all.any.ascii.bin.bool.breakpoint.bytearray.bytes.callable.chr.classmethod.compile.complex.delattr.dict.dir.divmod.enumerate.eval.exec.filter.float.format.frozenset.getattr.globals.hasattr.hash.help.hex.id.input.int.isinstance.issubclass.iter.len.list.locals.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.range.repr.reversed.round.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.vars.zip`.split(`.`),literal:[`__debug__`,`Ellipsis`,`False`,`None`,`NotImplemented`,`True`],type:[`Any`,`Callable`,`Coroutine`,`Dict`,`List`,`Literal`,`Generic`,`Optional`,`Sequence`,`Set`,`Tuple`,`Type`,`Union`]},a={className:`meta`,begin:/^(>>>|\.\.\.) /},o={className:`subst`,begin:/\{/,end:/\}/,keywords:i,illegal:/#/},s={begin:/\{\{/,relevance:0},c={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,o]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},l=`[0-9](_?[0-9])*`,u=`(\\b(${l}))?\\.(${l})|\\b(${l})\\.`,d=`\\b|${r.join(`|`)}`,f={className:`number`,relevance:0,variants:[{begin:`(\\b(${l})|(${u}))[eE][+-]?(${l})[jJ]?(?=${d})`},{begin:`(${u})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${l})[jJ](?=${d})`}]},p={className:`comment`,begin:t.lookahead(/# type:/),end:/$/,keywords:i,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={className:`params`,variants:[{className:``,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:[`self`,a,f,c,e.HASH_COMMENT_MODE]}]};return o.contains=[c,f,a],{name:`Python`,aliases:[`py`,`gyp`,`ipython`],unicodeRegex:!0,keywords:i,illegal:/(<\/|\?)|=>/,contains:[a,f,{scope:`variable.language`,match:/\bself\b/},{beginKeywords:`if`,relevance:0},{match:/\bor\b/,scope:`keyword`},c,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:`keyword`,3:`title.function`},contains:[m]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:`keyword`,3:`title.class`,6:`title.class.inherited`}},{className:`meta`,begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[f,m,c]}]}}function qx(e){return{aliases:[`pycon`],contains:[{className:`meta.prompt`,starts:{end:/ |$/,starts:{end:`$`,subLanguage:`python`}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function Jx(e){let t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:`R`,keywords:{$pattern:n,keyword:`function if in break next repeat else for while`,literal:`NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10`,built_in:`LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm`},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:`doctag`,match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:`doctag`,begin:`@param`,end:/$/,contains:[{scope:`variable`,variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:`doctag`,match:/@[a-zA-Z]+/},{scope:`keyword`,match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:`"`,end:`"`,relevance:0},{begin:`'`,end:`'`,relevance:0}]},{relevance:0,variants:[{scope:{1:`operator`,2:`number`},match:[i,r]},{scope:{1:`operator`,2:`number`},match:[/%[^%]*%/,r]},{scope:{1:`punctuation`,2:`number`},match:[a,r]},{scope:{2:`number`},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:`operator`},match:[n,/\s+/,/<-/,/\s+/]},{scope:`operator`,relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:`punctuation`,relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function Yx(e){let t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),a={"variable.constant":[`__FILE__`,`__LINE__`,`__ENCODING__`],"variable.language":[`self`,`super`],keyword:`alias.and.begin.BEGIN.break.case.class.defined.do.else.elsif.end.END.ensure.for.if.in.module.next.not.or.redo.require.rescue.retry.return.then.undef.unless.until.when.while.yield.include.extend.prepend.public.private.protected.raise.throw`.split(`.`),built_in:[`proc`,`lambda`,`attr_accessor`,`attr_reader`,`attr_writer`,`define_method`,`private_constant`,`module_function`],literal:[`true`,`false`,`nil`]},o={className:`doctag`,begin:`@[A-Za-z]+`},s={begin:`#<`,end:`>`},c=[e.COMMENT(`#`,`$`,{contains:[o]}),e.COMMENT(`^=begin`,`^=end`,{contains:[o],relevance:10}),e.COMMENT(`^__END__`,e.MATCH_NOTHING_RE)],l={className:`subst`,begin:/#\{/,end:/\}/,keywords:a},u={className:`string`,contains:[e.BACKSLASH_ESCAPE,l],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,l]})]}]},d=`[0-9](_?[0-9])*`,f={className:`number`,relevance:0,variants:[{begin:`\\b([1-9](_?[0-9])*|0)(\\.(${d}))?([eE][+-]?(${d})|r)?i?\\b`},{begin:`\\b0[dD][0-9](_?[0-9])*r?i?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*r?i?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*r?i?\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b`},{begin:`\\b0(_?[0-7])+r?i?\\b`}]},p={variants:[{match:/\(\)/},{className:`params`,begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},m=[u,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:`title.class`,4:`title.class.inherited`},keywords:a},{match:[/(include|extend)\s+/,i],scope:{2:`title.class`},keywords:a},{relevance:0,match:[i,/\.new[. (]/],scope:{1:`title.class`}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`},{relevance:0,match:r,scope:`title.class`},{match:[/def/,/\s+/,n],scope:{1:`keyword`,3:`title.function`},contains:[p]},{begin:e.IDENT_RE+`::`},{className:`symbol`,begin:e.UNDERSCORE_IDENT_RE+`(!|\\?)?:`,relevance:0},{className:`symbol`,begin:`:(?!\\s)`,contains:[u,{begin:n}],relevance:0},f,{className:`variable`,begin:`(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])`},{className:`params`,begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:a},{begin:`(`+e.RE_STARTERS_RE+`|unless)\\s*`,keywords:`unless`,contains:[{className:`regexp`,contains:[e.BACKSLASH_ESCAPE,l],illegal:/\n/,variants:[{begin:`/`,end:`/[a-z]*`},{begin:/%r\{/,end:/\}[a-z]*/},{begin:`%r\\(`,end:`\\)[a-z]*`},{begin:`%r!`,end:`![a-z]*`},{begin:`%r\\[`,end:`\\][a-z]*`}]}].concat(s,c),relevance:0}].concat(s,c);l.contains=m,p.contains=m;let h=[{begin:/^\s*=>/,starts:{end:`$`,contains:m}},{className:`meta.prompt`,begin:`^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])`,starts:{end:`$`,keywords:a,contains:m}}];return c.unshift(s),{name:`Ruby`,aliases:[`rb`,`gemspec`,`podspec`,`thor`,`irb`],keywords:a,illegal:/\/\*/,contains:[e.SHEBANG({binary:`ruby`})].concat(h,c,m)}}function Xx(e){let t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),i=t.concat(n,e.IDENT_RE),a={className:`title.function.invoke`,relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,t.lookahead(/\s*\(/))},o=`([ui](8|16|32|64|128|size)|f(32|64))?`,s=`abstract.as.async.await.become.box.break.const.continue.crate.do.dyn.else.enum.extern.false.final.fn.for.if.impl.in.let.loop.macro.match.mod.move.mut.override.priv.pub.ref.return.self.Self.static.struct.super.trait.true.try.type.typeof.union.unsafe.unsized.use.virtual.where.while.yield`.split(`.`),c=[`true`,`false`,`Some`,`None`,`Ok`,`Err`],l=`drop .Copy.Send.Sized.Sync.Drop.Fn.FnMut.FnOnce.ToOwned.Clone.Debug.PartialEq.PartialOrd.Eq.Ord.AsRef.AsMut.Into.From.Default.Iterator.Extend.IntoIterator.DoubleEndedIterator.ExactSizeIterator.SliceConcatExt.ToString.assert!.assert_eq!.bitflags!.bytes!.cfg!.col!.concat!.concat_idents!.debug_assert!.debug_assert_eq!.env!.eprintln!.panic!.file!.format!.format_args!.include_bytes!.include_str!.line!.local_data_key!.module_path!.option_env!.print!.println!.select!.stringify!.try!.unimplemented!.unreachable!.vec!.write!.writeln!.macro_rules!.assert_ne!.debug_assert_ne!`.split(`.`),u=[`i8`,`i16`,`i32`,`i64`,`i128`,`isize`,`u8`,`u16`,`u32`,`u64`,`u128`,`usize`,`f32`,`f64`,`str`,`char`,`bool`,`Box`,`Option`,`Result`,`String`,`Vec`];return{name:`Rust`,aliases:[`rs`],keywords:{$pattern:e.IDENT_RE+`!?`,type:u,keyword:s,literal:c,built_in:l},illegal:`</`,contains:[e.C_LINE_COMMENT_MODE,e.COMMENT(`/\\*`,`\\*/`,{contains:[`self`]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:`symbol`,begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:`string`,variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:`char.escape`,match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:`number`,variants:[{begin:`\\b0b([01_]+)`+o},{begin:`\\b0o([0-7_]+)`+o},{begin:`\\b0x([A-Fa-f0-9_]+)`+o},{begin:`\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)`+o}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:`keyword`,3:`title.function`}},{className:`meta`,begin:`#!?\\[`,end:`\\]`,contains:[{className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:`keyword`,3:`keyword`,4:`variable`}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:`keyword`,3:`variable`,5:`keyword`}},{begin:[/type/,/\s+/,r],className:{1:`keyword`,3:`title.class`}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:`keyword`,3:`title.class`}},{begin:e.IDENT_RE+`::`,keywords:{keyword:`Self`,built_in:l,type:u}},{className:`punctuation`,begin:`->`},a]}}var Zx=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:`number`,begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Qx=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),$x=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),eS=[...Qx,...$x],tS=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),nS=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),rS=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),iS=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.unicode-range.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse();function aS(e){let t=Zx(e),n=rS,r=nS,i=`@[a-z-]+`,a={className:`variable`,begin:`(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b`,relevance:0};return{name:`SCSS`,case_insensitive:!0,illegal:`[=/|']`,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:`selector-id`,begin:`#[A-Za-z0-9_-]+`,relevance:0},{className:`selector-class`,begin:`\\.[A-Za-z0-9_-]+`,relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:`selector-tag`,begin:`\\b(`+eS.join(`|`)+`)\\b`,relevance:0},{className:`selector-pseudo`,begin:`:(`+r.join(`|`)+`)`},{className:`selector-pseudo`,begin:`:(:)?(`+n.join(`|`)+`)`},a,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+iS.join(`|`)+`)\\b`},{begin:`\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b`},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,a,t.HEXCOLOR,t.CSS_NUMBER_MODE,t.UNICODE_RANGE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:`@(page|font-face)`,keywords:{$pattern:i,keyword:`@page @font-face`}},{begin:`@`,end:`[{;]`,returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:tS.join(` `)},contains:[{begin:i,className:`keyword`},{begin:/[a-z-]+(?=:)/,className:`attribute`},a,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function oS(e){return{name:`Shell Session`,aliases:[`console`,`shellsession`],contains:[{className:`meta.prompt`,begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:`bash`}}]}}function sS(e){let t=e.regex,n=e.COMMENT(`--`,`$`),r={scope:`string`,variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},a=[`true`,`false`,`unknown`],o=[`double precision`,`large object`,`with timezone`,`without timezone`],s=`bigint.binary.blob.boolean.char.character.clob.date.dec.decfloat.decimal.float.int.integer.interval.nchar.nclob.national.numeric.real.row.smallint.time.timestamp.varchar.varying.varbinary`.split(`.`),c=[`add`,`asc`,`collation`,`desc`,`final`,`first`,`last`,`view`],l=`abs.acos.all.allocate.alter.and.any.are.array.array_agg.array_max_cardinality.as.asensitive.asin.asymmetric.at.atan.atomic.authorization.avg.begin.begin_frame.begin_partition.between.bigint.binary.blob.boolean.both.by.call.called.cardinality.cascaded.case.cast.ceil.ceiling.char.char_length.character.character_length.check.classifier.clob.close.coalesce.collate.collect.column.commit.condition.connect.constraint.contains.convert.copy.corr.corresponding.cos.cosh.count.covar_pop.covar_samp.create.cross.cube.cume_dist.current.current_catalog.current_date.current_default_transform_group.current_path.current_role.current_row.current_schema.current_time.current_timestamp.current_path.current_role.current_transform_group_for_type.current_user.cursor.cycle.date.day.deallocate.dec.decimal.decfloat.declare.default.define.delete.dense_rank.deref.describe.deterministic.disconnect.distinct.double.drop.dynamic.each.element.else.empty.end.end_frame.end_partition.end-exec.equals.escape.every.except.exec.execute.exists.exp.external.extract.false.fetch.filter.first_value.float.floor.for.foreign.frame_row.free.from.full.function.fusion.get.global.grant.group.grouping.groups.having.hold.hour.identity.in.indicator.initial.inner.inout.insensitive.insert.int.integer.intersect.intersection.interval.into.is.join.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.language.large.last_value.lateral.lead.leading.left.like.like_regex.listagg.ln.local.localtime.localtimestamp.log.log10.lower.match.match_number.match_recognize.matches.max.member.merge.method.min.minute.mod.modifies.module.month.multiset.national.natural.nchar.nclob.new.no.none.normalize.not.nth_value.ntile.null.nullif.numeric.octet_length.occurrences_regex.of.offset.old.omit.on.one.only.open.or.order.out.outer.over.overlaps.overlay.parameter.partition.pattern.per.percent.percent_rank.percentile_cont.percentile_disc.period.portion.position.position_regex.power.precedes.precision.prepare.primary.procedure.ptf.range.rank.reads.real.recursive.ref.references.referencing.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.release.result.return.returns.revoke.right.rollback.rollup.row.row_number.rows.running.savepoint.scope.scroll.search.second.seek.select.sensitive.session_user.set.show.similar.sin.sinh.skip.smallint.some.specific.specifictype.sql.sqlexception.sqlstate.sqlwarning.sqrt.start.static.stddev_pop.stddev_samp.submultiset.subset.substring.substring_regex.succeeds.sum.symmetric.system.system_time.system_user.table.tablesample.tan.tanh.then.time.timestamp.timezone_hour.timezone_minute.to.trailing.translate.translate_regex.translation.treat.trigger.trim.trim_array.true.truncate.uescape.union.unique.unknown.unnest.update.upper.user.using.value.values.value_of.var_pop.var_samp.varbinary.varchar.varying.versioning.when.whenever.where.width_bucket.window.with.within.without.year`.split(`.`),u=`abs.acos.array_agg.asin.atan.avg.cast.ceil.ceiling.coalesce.corr.cos.cosh.count.covar_pop.covar_samp.cume_dist.dense_rank.deref.element.exp.extract.first_value.floor.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.last_value.lead.listagg.ln.log.log10.lower.max.min.mod.nth_value.ntile.nullif.percent_rank.percentile_cont.percentile_disc.position.position_regex.power.rank.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.row_number.sin.sinh.sqrt.stddev_pop.stddev_samp.substring.substring_regex.sum.tan.tanh.translate.translate_regex.treat.trim.trim_array.unnest.upper.value_of.var_pop.var_samp.width_bucket`.split(`.`),d=[`current_catalog`,`current_date`,`current_default_transform_group`,`current_path`,`current_role`,`current_schema`,`current_transform_group_for_type`,`current_user`,`session_user`,`system_time`,`system_user`,`current_time`,`localtime`,`current_timestamp`,`localtimestamp`],f=[`create table`,`insert into`,`primary key`,`foreign key`,`not null`,`alter table`,`add constraint`,`grouping sets`,`on overflow`,`character set`,`respect nulls`,`ignore nulls`,`nulls first`,`nulls last`,`depth first`,`breadth first`],p=u,m=[...l,...c].filter(e=>!u.includes(e)),h={scope:`variable`,match:/@[a-z0-9][a-z0-9_]*/},g={scope:`operator`,match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function v(e){return t.concat(/\b/,t.either(...e.map(e=>e.replace(/\s+/,`\\s+`))),/\b/)}let y={scope:`keyword`,match:v(f),relevance:0};function b(e,{exceptions:t,when:n}={}){let r=n;return t||=[],e.map(e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e)}return{name:`SQL`,case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:b(m,{when:e=>e.length<3}),literal:a,type:s,built_in:d},contains:[{scope:`type`,match:v(o)},y,_,h,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,g]}}function cS(e){return e?typeof e==`string`?e:e.source:null}function lS(e){return uS(`(?=`,e,`)`)}function uS(...e){return e.map(e=>cS(e)).join(``)}function dS(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function fS(...e){return`(`+(dS(e).capture?``:`?:`)+e.map(e=>cS(e)).join(`|`)+`)`}var pS=e=>uS(/\b/,e,/\w$/.test(e)?/\b/:/\B/),mS=[`Protocol`,`Type`].map(pS),hS=[`init`,`self`].map(pS),gS=[`Any`,`Self`],_S=[`actor`,`any`,`associatedtype`,`async`,`await`,/as\?/,/as!/,`as`,`borrowing`,`break`,`case`,`catch`,`class`,`consume`,`consuming`,`continue`,`convenience`,`copy`,`default`,`defer`,`deinit`,`didSet`,`distributed`,`do`,`dynamic`,`each`,`else`,`enum`,`extension`,`fallthrough`,/fileprivate\(set\)/,`fileprivate`,`final`,`for`,`func`,`get`,`guard`,`if`,`import`,`indirect`,`infix`,/init\?/,/init!/,`inout`,/internal\(set\)/,`internal`,`in`,`is`,`isolated`,`nonisolated`,`lazy`,`let`,`macro`,`mutating`,`nonmutating`,/open\(set\)/,`open`,`operator`,`optional`,`override`,`package`,`postfix`,`precedencegroup`,`prefix`,/private\(set\)/,`private`,`protocol`,/public\(set\)/,`public`,`repeat`,`required`,`rethrows`,`return`,`set`,`some`,`static`,`struct`,`subscript`,`super`,`switch`,`throws`,`throw`,/try\?/,/try!/,`try`,`typealias`,/unowned\(safe\)/,/unowned\(unsafe\)/,`unowned`,`var`,`weak`,`where`,`while`,`willSet`],vS=[`false`,`nil`,`true`],yS=[`assignment`,`associativity`,`higherThan`,`left`,`lowerThan`,`none`,`right`],bS=[`#colorLiteral`,`#column`,`#dsohandle`,`#else`,`#elseif`,`#endif`,`#error`,`#file`,`#fileID`,`#fileLiteral`,`#filePath`,`#function`,`#if`,`#imageLiteral`,`#keyPath`,`#line`,`#selector`,`#sourceLocation`,`#warning`],xS=`abs.all.any.assert.assertionFailure.debugPrint.dump.fatalError.getVaList.isKnownUniquelyReferenced.max.min.numericCast.pointwiseMax.pointwiseMin.precondition.preconditionFailure.print.readLine.repeatElement.sequence.stride.swap.swift_unboxFromSwiftValueWithType.transcode.type.unsafeBitCast.unsafeDowncast.withExtendedLifetime.withUnsafeMutablePointer.withUnsafePointer.withVaList.withoutActuallyEscaping.zip`.split(`.`),SS=fS(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),CS=fS(SS,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),wS=uS(SS,CS,`*`),TS=fS(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),ES=fS(TS,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),DS=uS(TS,ES,`*`),OS=uS(/[A-Z]/,ES,`*`),kS=[`attached`,`autoclosure`,uS(/convention\(/,fS(`swift`,`block`,`c`),/\)/),`discardableResult`,`dynamicCallable`,`dynamicMemberLookup`,`escaping`,`freestanding`,`frozen`,`GKInspectable`,`IBAction`,`IBDesignable`,`IBInspectable`,`IBOutlet`,`IBSegueAction`,`inlinable`,`main`,`nonobjc`,`NSApplicationMain`,`NSCopying`,`NSManaged`,uS(/objc\(/,DS,/\)/),`objc`,`objcMembers`,`propertyWrapper`,`requires_stored_property_inits`,`resultBuilder`,`Sendable`,`testable`,`UIApplicationMain`,`unchecked`,`unknown`,`usableFromInline`,`warn_unqualified_access`],AS=[`iOS`,`iOSApplicationExtension`,`macOS`,`macOSApplicationExtension`,`macCatalyst`,`macCatalystApplicationExtension`,`watchOS`,`watchOSApplicationExtension`,`tvOS`,`tvOSApplicationExtension`,`swift`];function jS(e){let t={match:/\s+/,relevance:0},n=e.COMMENT(`/\\*`,`\\*/`,{contains:[`self`]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,fS(...mS,...hS)],className:{2:`keyword`}},a={match:uS(/\./,fS(..._S)),relevance:0},o=_S.filter(e=>typeof e==`string`).concat([`_|0`]),s={variants:[{className:`keyword`,match:fS(..._S.filter(e=>typeof e!=`string`).concat(gS).map(pS),...hS)}]},c={$pattern:fS(/\b\w+/,/#\w+/),keyword:o.concat(bS),literal:vS},l=[i,a,s],u=[{match:uS(/\./,fS(...xS)),relevance:0},{className:`built_in`,match:uS(/\b/,fS(...xS),/(?=\()/)}],d={match:/->/,relevance:0},f=[d,{className:`operator`,relevance:0,variants:[{match:wS},{match:`\\.(\\.|${CS})+`}]}],p=`([0-9]_*)+`,m=`([0-9a-fA-F]_*)+`,h={className:`number`,relevance:0,variants:[{match:`\\b(${p})(\\.(${p}))?([eE][+-]?(${p}))?\\b`},{match:`\\b0x(${m})(\\.(${m}))?([pP][+-]?(${p}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},g=(e=``)=>({className:`subst`,variants:[{match:uS(/\\/,e,/[0\\tnr"']/)},{match:uS(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),_=(e=``)=>({className:`subst`,match:uS(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),v=(e=``)=>({className:`subst`,label:`interpol`,begin:uS(/\\/,e,/\(/),end:/\)/}),y=(e=``)=>({begin:uS(e,/"""/),end:uS(/"""/,e),contains:[g(e),_(e),v(e)]}),b=(e=``)=>({begin:uS(e,/"/),end:uS(/"/,e),contains:[g(e),v(e)]}),x={className:`string`,variants:[y(),y(`#`),y(`##`),y(`###`),b(),b(`#`),b(`##`),b(`###`)]},S=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],C={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:S},w=e=>{let t=uS(e,/\//),n=uS(/\//,e);return{begin:t,end:n,contains:[...S,{scope:`comment`,begin:`#(?!.*${n})`,end:/$/}]}},T={scope:`regexp`,variants:[w(`###`),w(`##`),w(`#`),C]},E={match:uS(/`/,DS,/`/)},D=[E,{className:`variable`,match:/\$\d+/},{className:`variable`,match:`\\$${ES}+`}],O=[{match:/(@|#(un)?)available/,scope:`keyword`,starts:{contains:[{begin:/\(/,end:/\)/,keywords:AS,contains:[...f,h,x]}]}},{scope:`keyword`,match:uS(/@/,fS(...kS),lS(fS(/\(/,/\s+/)))},{scope:`meta`,match:uS(/@/,DS)}],k={match:lS(/\b[A-Z]/),relevance:0,contains:[{className:`type`,match:uS(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,ES,`+`)},{className:`type`,match:OS,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:uS(/\s+&\s+/,lS(OS)),relevance:0}]},A={begin:/</,end:/>/,keywords:c,contains:[...r,...l,...O,d,k]};k.contains.push(A);let j={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:[`self`,{match:uS(DS,/\s*:/),keywords:`_|0`,relevance:0},...r,T,...l,...u,...f,h,x,...D,...O,k]},M={begin:/</,end:/>/,keywords:`repeat each`,contains:[...r,k]},N={begin:/\(/,end:/\)/,keywords:c,contains:[{begin:fS(lS(uS(DS,/\s*:/)),lS(uS(DS,/\s+/,DS,/\s*:/))),end:/:/,relevance:0,contains:[{className:`keyword`,match:/\b_\b/},{className:`params`,match:DS}]},...r,...l,...f,h,x,...O,k,j],endsParent:!0,illegal:/["']/},P={match:[/(func|macro)/,/\s+/,fS(E.match,DS,wS)],className:{1:`keyword`,3:`title.function`},contains:[M,N,t],illegal:[/\[/,/%/]},F={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:`keyword`},contains:[M,N,t],illegal:/\[|%/},ee={match:[/operator/,/\s+/,wS],className:{1:`keyword`,3:`title`}},I={begin:[/precedencegroup/,/\s+/,OS],className:{1:`keyword`,3:`title`},contains:[k],keywords:[...yS,...vS],end:/}/},te={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:`keyword`,3:`keyword`,5:`title.function`}},ne={match:[/class\b/,/\s+/,/var\b/],scope:{1:`keyword`,3:`keyword`}},re={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,DS,/\s*/],beginScope:{1:`keyword`,3:`title.class`},keywords:c,contains:[M,...l,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:`title.class.inherited`,match:OS},...l],relevance:0}]};for(let e of x.variants){let t=e.contains.find(e=>e.label===`interpol`);t.keywords=c;let n=[...l,...u,...f,h,x,...D];t.contains=[...n,{begin:/\(/,end:/\)/,contains:[`self`,...n]}]}return{name:`Swift`,keywords:c,contains:[...r,P,F,te,ne,re,ee,I,{beginKeywords:`import`,end:/$/,contains:[...r],relevance:0},T,...l,...u,...f,h,x,...D,...O,k,j]}}var MS=`[A-Za-z$_][0-9A-Za-z$_]*`,NS=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),PS=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],FS=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),IS=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],LS=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],RS=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],zS=[].concat(LS,FS,IS);function BS(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=MS,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&a.index===0)&&t.ignoreMatch()}},s={$pattern:MS,keyword:NS,literal:PS,built_in:zS,"variable.language":RS},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...FS,...IS]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function D(e){return t.concat(`(?!`,e.join(`|`),`)`)}let O={match:t.concat(/\b/,D([...LS,`super`,`import`,`await`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},A={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},j=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(j)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},M,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:j,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},k,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},O,E,S,A,{match:/\$[(.]/}]}}function VS(e){let t=e.regex,n=BS(e),r=MS,i=[`any`,`void`,`number`,`boolean`,`string`,`object`,`never`,`symbol`,`bigint`,`unknown`],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:`keyword`,3:`title.class`}},o={beginKeywords:`interface`,end:/\{/,excludeEnd:!0,keywords:{keyword:`interface extends`,built_in:i},contains:[n.exports.CLASS_REFERENCE]},s={className:`meta`,relevance:10,begin:/^\s*['"]use strict['"]/},c={$pattern:MS,keyword:NS.concat([`type`,`interface`,`public`,`private`,`protected`,`implements`,`declare`,`abstract`,`readonly`,`enum`,`override`,`satisfies`]),literal:PS,built_in:zS.concat(i),"variable.language":RS},l={className:`meta`,begin:`@`+r},u=(e,t,n)=>{let r=e.contains.findIndex(e=>e.label===t);if(r===-1)throw Error(`can not find mode to replace`);e.contains.splice(r,1,n)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(l);let d=n.contains.find(e=>e.scope===`attr`),f=Object.assign({},d,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,d,f]),n.contains=n.contains.concat([l,a,o,f]),u(n,`shebang`,e.SHEBANG()),u(n,`use_strict`,s);let p=n.contains.find(e=>e.label===`func.def`);return p.relevance=0,Object.assign(n,{name:`TypeScript`,aliases:[`ts`,`tsx`,`mts`,`cts`]}),n}function HS(e){let t=e.regex,n={className:`string`,begin:/"(""|[^/n])"C\b/},r={className:`string`,begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,s=/\d{1,2}(:\d{1,2}){1,2}/,c={className:`literal`,variants:[{begin:t.concat(/# */,t.either(a,i),/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(a,i),/ +/,t.either(o,s),/ *#/)}]},l={className:`number`,relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},u={className:`label`,begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:`doctag`,begin:/<\/?/,end:/>/}]}),f=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:`Visual Basic .NET`,aliases:[`vb`],case_insensitive:!0,classNameAliases:{label:`symbol`},keywords:{keyword:`addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield`,built_in:`addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort`,type:`boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort`,literal:`true false nothing`},illegal:`//|\\{|\\}|endif|gosub|variant|wend|^\\$ `,contains:[n,r,c,l,u,d,f,{className:`meta`,begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:`const disable else elseif enable end externalsource if region then`},contains:[f]}]}}function US(e){e.regex;let t=e.COMMENT(/\(;/,/;\)/);return t.contains.push(`self`),{name:`WebAssembly`,keywords:{$pattern:/[\w.]+/,keyword:`anyfunc,block,br,br_if,br_table,call,call_indirect,data,drop,elem,else,end,export,func,global.get,global.set,local.get,local.set,local.tee,get_global,get_local,global,if,import,local,loop,memory,memory.grow,memory.size,module,mut,nop,offset,param,result,return,select,set_global,set_local,start,table,tee_local,then,type,unreachable`.split(`,`)},contains:[e.COMMENT(/;;/,/$/),t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:`keyword`,3:`operator`}},{className:`variable`,begin:/\$[\w_]+/},{match:/(\((?!;)|\))+/,className:`punctuation`,relevance:0},{begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:`keyword`,3:`title.function`}},e.QUOTE_STRING_MODE,{match:/(i32|i64|f32|f64)(?!\.)/,className:`type`},{className:`keyword`,match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/},{className:`number`,relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/}]}}function WS(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:`symbol`,begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:`keyword`,begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(a,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:`string`}),c=e.inherit(e.QUOTE_STRING_MODE,{className:`string`}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:`attr`,begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:`string`,endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:`HTML, XML`,aliases:[`html`,`xhtml`,`rss`,`atom`,`xjb`,`xsd`,`xsl`,`plist`,`wsf`,`svg`],case_insensitive:!0,unicodeRegex:!0,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,c,s,o,{begin:/\[/,end:/\]/,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,contains:[a,o,c,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:`meta`,end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:`tag`,begin:/<style(?=\s|>)/,end:/>/,keywords:{name:`style`},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:[`css`,`xml`]}},{className:`tag`,begin:/<script(?=\s|>)/,end:/>/,keywords:{name:`script`},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:[`javascript`,`handlebars`,`xml`]}},{className:`tag`,begin:/<>|<\/>/},{className:`tag`,begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:`name`,begin:n,relevance:0,starts:l}]},{className:`tag`,begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:`name`,begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function GS(e){let t=`true false yes no null`,n=`[\\w#;/?:@&=+$,.~*'()[\\]]+`,r={className:`attr`,variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:`template-variable`,variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:`string`,relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:`char.escape`,relevance:0}]},o={className:`string`,relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},s=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),c={className:`number`,begin:`\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b`},l={end:`,`,endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},u={begin:/\{/,end:/\}/,contains:[l],illegal:`\\n`,relevance:0},d={begin:`\\[`,end:`\\]`,contains:[l],illegal:`\\n`,relevance:0},f=[r,{className:`meta`,begin:`^---\\s*$`,relevance:10},{className:`string`,begin:`[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*`},{begin:`<%[%=-]?`,end:`[%-]?%>`,subLanguage:`ruby`,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:`!\\w+!`+n},{className:`type`,begin:`!<`+n+`>`},{className:`type`,begin:`!`+n},{className:`type`,begin:`!!`+n},{className:`meta`,begin:`&`+e.UNDERSCORE_IDENT_RE+`$`},{className:`meta`,begin:`\\*`+e.UNDERSCORE_IDENT_RE+`$`},{className:`bullet`,begin:`-(?=[ ]|$)`,relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},c,{className:`number`,begin:e.C_NUMBER_RE+`\\b`,relevance:0},u,d,a,o],p=[...f];return p.pop(),p.push(s),l.contains=p,{name:`YAML`,case_insensitive:!0,aliases:[`yml`],contains:f}}var KS={arduino:Hb,bash:Ub,c:Wb,cpp:Gb,csharp:Kb,css:tx,diff:nx,go:rx,graphql:ix,ini:ax,java:dx,javascript:bx,json:Sx,kotlin:Dx,less:Lx,lua:Rx,makefile:zx,markdown:Bx,objectivec:Vx,perl:Hx,php:Ux,"php-template":Wx,plaintext:Gx,python:Kx,"python-repl":qx,r:Jx,ruby:Yx,rust:Xx,scss:aS,shell:oS,sql:sS,swift:jS,typescript:VS,vbnet:HS,wasm:US,xml:WS,yaml:GS},qS=u(s(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let r=e[t],i=typeof r;i!==`object`&&i!==`function`||Object.isFrozen(r)||n(r)}),e}var r=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function i(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#x27;`)}function a(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}var o=`</span>`,s=e=>!!e.scope,c=(e,{prefix:t})=>{if(e.startsWith(`language:`))return e.replace(`language:`,`language-`);if(e.includes(`.`)){let n=e.split(`.`);return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${`_`.repeat(t+1)}`)].join(` `)}return`${t}${e}`},l=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!s(e))return;let t=c(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){s(e)&&(this.buffer+=o)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}},u=(e={})=>{let t={children:[]};return Object.assign(t,e),t},d=class e{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=u({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},f=class extends d{constructor(e){super(),this.options=e}addText(e){e!==``&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function p(e){return e?typeof e==`string`?e:e.source:null}function m(e){return _(`(?=`,e,`)`)}function h(e){return _(`(?:`,e,`)*`)}function g(e){return _(`(?:`,e,`)?`)}function _(...e){return e.map(e=>p(e)).join(``)}function v(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function y(...e){return`(`+(v(e).capture?``:`?:`)+e.map(e=>p(e)).join(`|`)+`)`}function b(e){return RegExp(e.toString()+`|`).exec(``).length-1}function x(e,t){let n=e&&e.exec(t);return n&&n.index===0}var S=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function C(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;let t=n,r=p(e),i=``;for(;r.length>0;){let e=S.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],e[0]===`(`&&n++)}return i}).map(e=>`(${e})`).join(t)}var w=/\b\B/,T=`[a-zA-Z]\\w*`,E=`[a-zA-Z_]\\w*`,D=`\\b\\d+(\\.\\d+)?`,O=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,k=`\\b(0b[01]+)`,A=`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,j=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=_(t,/.*\b/,e.binary,/\b.*/)),a({scope:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},M={begin:`\\\\[\\s\\S]`,relevance:0},N={scope:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[M]},P={scope:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[M]},F={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ee=function(e,t,n={}){let r=a({scope:`comment`,begin:e,end:t,contains:[]},n);r.contains.push({scope:`doctag`,begin:`[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)`,end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=y(`I`,`a`,`is`,`so`,`us`,`to`,`at`,`if`,`in`,`it`,`on`,/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:_(/[ ]+/,`(`,i,/[.]?[:]?([.][ ]|[ ])/,`){3}`)}),r},I=ee(`//`,`$`),te=ee(`/\\*`,`\\*/`),ne=ee(`#`,`$`),re=Object.freeze({__proto__:null,APOS_STRING_MODE:N,BACKSLASH_ESCAPE:M,BINARY_NUMBER_MODE:{scope:`number`,begin:k,relevance:0},BINARY_NUMBER_RE:k,COMMENT:ee,C_BLOCK_COMMENT_MODE:te,C_LINE_COMMENT_MODE:I,C_NUMBER_MODE:{scope:`number`,begin:O,relevance:0},C_NUMBER_RE:O,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:ne,IDENT_RE:T,MATCH_NOTHING_RE:w,METHOD_GUARD:{begin:`\\.\\s*[a-zA-Z_]\\w*`,relevance:0},NUMBER_MODE:{scope:`number`,begin:D,relevance:0},NUMBER_RE:D,PHRASAL_WORDS_MODE:F,QUOTE_STRING_MODE:P,REGEXP_MODE:{scope:`regexp`,begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[M,{begin:/\[/,end:/\]/,relevance:0,contains:[M]}]},RE_STARTERS_RE:A,SHEBANG:j,TITLE_MODE:{scope:`title`,begin:T,relevance:0},UNDERSCORE_IDENT_RE:E,UNDERSCORE_TITLE_MODE:{scope:`title`,begin:E,relevance:0}});function ie(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function ae(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function oe(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=ie,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function se(e,t){Array.isArray(e.illegal)&&(e.illegal=y(...e.illegal))}function ce(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function le(e,t){e.relevance===void 0&&(e.relevance=1)}var ue=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error(`beforeMatch cannot be used with starts`);let n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=_(n.beforeMatch,m(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},de=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`],fe=`keyword`;function pe(e,t,n=fe){let r=Object.create(null);return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,pe(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,L(n[0],n[1])]})}}function L(e,t){return t?Number(t):+!R(e)}function R(e){return de.includes(e.toLowerCase())}var me={},he=e=>{console.error(e)},ge=(e,...t)=>{console.log(`WARN: ${e}`,...t)},_e=(e,t)=>{me[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),me[`${e}/${t}`]=!0)},ve=Error();function ye(e,t,{key:n}){let r=0,i=e[n],a={},o={};for(let e=1;e<=t.length;e++)o[e+r]=i[e],a[e+r]=!0,r+=b(t[e-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function be(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw he(`skip, excludeBegin, returnBegin not compatible with beginScope: {}`),ve;if(typeof e.beginScope!=`object`||e.beginScope===null)throw he(`beginScope must be object`),ve;ye(e,e.begin,{key:`beginScope`}),e.begin=C(e.begin,{joinWith:``})}}function xe(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw he(`skip, excludeEnd, returnEnd not compatible with endScope: {}`),ve;if(typeof e.endScope!=`object`||e.endScope===null)throw he(`endScope must be object`),ve;ye(e,e.end,{key:`endScope`}),e.end=C(e.end,{joinWith:``})}}function Se(e){e.scope&&typeof e.scope==`object`&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Ce(e){Se(e),typeof e.beginScope==`string`&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope==`string`&&(e.endScope={_wrap:e.endScope}),be(e),xe(e)}function we(e){function t(t,n){return new RegExp(p(t),`m`+(e.case_insensitive?`i`:``)+(e.unicodeRegex?`u`:``)+(n?`g`:``))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=b(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let e=this.regexes.map(e=>e[1]);this.matcherRe=t(C(e,{joinWith:`|`}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){let t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function o(n,r){let a=n;if(n.isCompiled)return a;[ae,ce,Ce,ue].forEach(e=>e(n,r)),e.compilerExtensions.forEach(e=>e(n,r)),n.__beforeBegin=null,[oe,se,le].forEach(e=>e(n,r)),n.isCompiled=!0;let s=null;return typeof n.keywords==`object`&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),s=n.keywords.$pattern,delete n.keywords.$pattern),s||=/\w+/,n.keywords&&=pe(n.keywords,e.case_insensitive),a.keywordPatternRe=t(s,!0),r&&(n.begin||=/\B|\b/,a.beginRe=t(a.begin),!n.end&&!n.endsWithParent&&(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=p(a.end)||``,n.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(n.end?`|`:``)+r.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||=[],n.contains=[].concat(...n.contains.map(function(e){return Ee(e===`self`?n:e)})),n.contains.forEach(function(e){o(e,a)}),n.starts&&o(n.starts,r),a.matcher=i(a),a}if(e.compilerExtensions||=[],e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),o(e)}function Te(e){return e?e.endsWithParent||Te(e.starts):!1}function Ee(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return a(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Te(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var De=`11.11.2`,Oe=class extends Error{constructor(e,t){super(e),this.name=`HTMLInjectionError`,this.html=t}},ke=i,Ae=a,je=Symbol(`nomatch`),Me=7,Ne=function(e){let t=Object.create(null),i=Object.create(null),a=[],o=!0,s=`Could not find the language '{}', did you forget to load/include a language module?`,c={disableAutodetect:!0,name:`Plain text`,contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,cssSelector:`pre code`,languages:null,__emitter:f};function u(e){return l.noHighlightRe.test(e)}function d(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=l.languageDetectRe.exec(t);if(n){let t=N(n[1]);return t||(ge(s.replace(`{}`,n[1])),ge(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>u(e)||N(e))}function p(e,t,n){let r=``,i=``;typeof t==`object`?(r=e,n=t.ignoreIllegals,i=t.language):(_e(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),_e(`10.7.0`,`Please use highlight(code, options) instead.
66
+ https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(n=!0);let a={code:r,language:i};ne(`before:highlight`,a);let o=a.result?a.result:v(a.language,a.code,n);return o.code=a.code,ne(`after:highlight`,o),o}function v(e,n,i,a){let c=Object.create(null);function u(e,t){return e.keywords[t]}function d(){if(!A.keywords){M.addText(P);return}let e=0;A.keywordPatternRe.lastIndex=0;let t=A.keywordPatternRe.exec(P),n=``;for(;t;){n+=P.substring(e,t.index);let r=D.case_insensitive?t[0].toLowerCase():t[0],i=u(A,r);if(i){let[e,a]=i;if(M.addText(n),n=``,c[r]=(c[r]||0)+1,c[r]<=Me&&(F+=a),e.startsWith(`_`))n+=t[0];else{let n=D.classNameAliases[e]||e;m(t[0],n)}}else n+=t[0];e=A.keywordPatternRe.lastIndex,t=A.keywordPatternRe.exec(P)}n+=P.substring(e),M.addText(n)}function f(){if(P===``)return;let e=null;if(typeof A.subLanguage==`string`){if(!t[A.subLanguage]){M.addText(P);return}e=v(A.subLanguage,P,!0,j[A.subLanguage]),j[A.subLanguage]=e._top}else e=S(P,A.subLanguage.length?A.subLanguage:null);A.relevance>0&&(F+=e.relevance),M.__addSublanguage(e._emitter,e.language)}function p(){A.subLanguage==null?d():f(),P=``}function m(e,t){e!==``&&(M.startScope(t),M.addText(e),M.endScope())}function h(e,t){let n=1,r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}let r=D.classNameAliases[e[n]]||e[n],i=t[n];r?m(i,r):(P=i,d(),P=``),n++}}function g(e,t){return e.scope&&typeof e.scope==`string`&&M.openNode(D.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(m(P,D.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),P=``):e.beginScope._multi&&(h(e.beginScope,t),P=``)),A=Object.create(e,{parent:{value:A}}),A}function _(e,t,n){let i=x(e.endRe,n);if(i){if(e[`on:end`]){let n=new r(e);e[`on:end`](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return _(e.parent,t,n)}function y(e){return A.matcher.regexIndex===0?(P+=e[0],1):(te=!0,0)}function b(e){let t=e[0],n=e.rule,i=new r(n),a=[n.__beforeBegin,n[`on:begin`]];for(let n of a)if(n&&(n(e,i),i.isMatchIgnored))return y(t);return n.skip?P+=t:(n.excludeBegin&&(P+=t),p(),!n.returnBegin&&!n.excludeBegin&&(P=t)),g(n,e),n.returnBegin?0:t.length}function C(e){let t=e[0],r=n.substring(e.index),i=_(A,e,r);if(!i)return je;let a=A;A.endScope&&A.endScope._wrap?(p(),m(t,A.endScope._wrap)):A.endScope&&A.endScope._multi?(p(),h(A.endScope,e)):a.skip?P+=t:(a.returnEnd||a.excludeEnd||(P+=t),p(),a.excludeEnd&&(P=t));do A.scope&&M.closeNode(),!A.skip&&!A.subLanguage&&(F+=A.relevance),A=A.parent;while(A!==i.parent);return i.starts&&g(i.starts,e),a.returnEnd?0:t.length}function w(){let e=[];for(let t=A;t!==D;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>M.openNode(e))}let T={};function E(t,r){let a=r&&r[0];if(P+=t,a==null)return p(),0;if(T.type===`begin`&&r.type===`end`&&T.index===r.index&&a===``){if(P+=n.slice(r.index,r.index+1),!o){let t=Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=T.rule,t}return 1}if(T=r,r.type===`begin`)return b(r);if(r.type===`illegal`&&!i){let e=Error(`Illegal lexeme "`+a+`" for mode "`+(A.scope||`<unnamed>`)+`"`);throw e.mode=A,e}if(r.type===`end`){let e=C(r);if(e!==je)return e}if(r.type===`illegal`&&a===``)return r.index===n.length||(P+=`
67
+ `),1;if(I>1e5&&I>r.index*3)throw Error(`potential infinite loop, way more iterations than matches`);return P+=a,a.length}let D=N(e);if(!D)throw he(s.replace(`{}`,e)),Error(`Unknown language: "`+e+`"`);let O=we(D),k=``,A=a||O,j={},M=new l.__emitter(l);w();let P=``,F=0,ee=0,I=0,te=!1;try{if(D.__emitTokens)D.__emitTokens(n,M);else{for(A.matcher.considerAll();;){I++,te?te=!1:A.matcher.considerAll(),A.matcher.lastIndex=ee;let e=A.matcher.exec(n);if(!e)break;let t=E(n.substring(ee,e.index),e);ee=e.index+t}E(n.substring(ee))}return M.finalize(),k=M.toHTML(),{language:e,value:k,relevance:F,illegal:!1,_emitter:M,_top:A}}catch(t){if(t.message&&t.message.includes(`Illegal`))return{language:e,value:ke(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:ee,context:n.slice(ee-100,ee+100),mode:t.mode,resultSoFar:k},_emitter:M};if(o)return{language:e,value:ke(n),illegal:!1,relevance:0,errorRaised:t,_emitter:M,_top:A};throw t}}function b(e){let t={value:ke(e),illegal:!1,relevance:0,_top:c,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}function S(e,n){n=n||l.languages||Object.keys(t);let r=b(e),i=n.filter(N).filter(F).map(t=>v(t,e,!1));i.unshift(r);let[a,o]=i.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(N(e.language).supersetOf===t.language)return 1;if(N(t.language).supersetOf===e.language)return-1}return 0}),s=a;return s.secondBest=o,s}function C(e,t,n){let r=t&&i[t]||n;e.classList.add(`hljs`),e.classList.add(`language-${r}`)}function w(e){let t=null,n=d(e);if(u(n))return;if(ne(`before:highlightElement`,{el:e,language:n}),e.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);return}if(e.children.length>0&&(l.ignoreUnescapedHTML||(console.warn(`One of your code blocks includes unescaped HTML. This is a potentially serious security risk.`),console.warn(`https://github.com/highlightjs/highlight.js/wiki/security`),console.warn(`The element with unescaped HTML:`),console.warn(e)),l.throwUnescapedHTML))throw new Oe(`One of your code blocks includes unescaped HTML.`,e.innerHTML);t=e;let r=t.textContent,i=n?p(r,{language:n,ignoreIllegals:!0}):S(r);e.innerHTML=i.value,e.dataset.highlighted=`yes`,C(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),ne(`after:highlightElement`,{el:e,result:i,text:r})}function T(e){l=Ae(l,e)}let E=()=>{k(),_e(`10.6.0`,`initHighlighting() deprecated. Use highlightAll() now.`)};function D(){k(),_e(`10.6.0`,`initHighlightingOnLoad() deprecated. Use highlightAll() now.`)}let O=!1;function k(){function e(){k()}document.readyState===`loading`?(O||window.addEventListener(`DOMContentLoaded`,e,!1),O=!0):document.querySelectorAll(l.cssSelector).forEach(w)}function A(n,r){let i=null;try{i=r(e)}catch(e){if(he(`Language definition for '{}' could not be registered.`.replace(`{}`,n)),o)he(e);else throw e;i=c}i.name||(i.name=n),t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&P(i.aliases,{languageName:n})}function j(e){delete t[e];for(let t of Object.keys(i))i[t]===e&&delete i[t]}function M(){return Object.keys(t)}function N(e){return e=(e||``).toLowerCase(),t[e]||t[i[e]]}function P(e,{languageName:t}){typeof e==`string`&&(e=[e]),e.forEach(e=>{i[e.toLowerCase()]=t})}function F(e){let t=N(e);return t&&!t.disableAutodetect}function ee(e){e[`before:highlightBlock`]&&!e[`before:highlightElement`]&&(e[`before:highlightElement`]=t=>{e[`before:highlightBlock`](Object.assign({block:t.el},t))}),e[`after:highlightBlock`]&&!e[`after:highlightElement`]&&(e[`after:highlightElement`]=t=>{e[`after:highlightBlock`](Object.assign({block:t.el},t))})}function I(e){ee(e),a.push(e)}function te(e){let t=a.indexOf(e);t!==-1&&a.splice(t,1)}function ne(e,t){let n=e;a.forEach(function(e){e[n]&&e[n](t)})}function ie(e){return _e(`10.7.0`,`highlightBlock will be removed entirely in v12.0`),_e(`10.7.0`,`Please use highlightElement now.`),w(e)}Object.assign(e,{highlight:p,highlightAuto:S,highlightAll:k,highlightElement:w,highlightBlock:ie,configure:T,initHighlighting:E,initHighlightingOnLoad:D,registerLanguage:A,unregisterLanguage:j,listLanguages:M,getLanguage:N,registerAliases:P,autoDetection:F,inherit:Ae,addPlugin:I,removePlugin:te}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=De,e.regex={concat:_,lookahead:m,either:y,optional:g,anyNumberOfTimes:h};for(let e in re)typeof re[e]==`object`&&n(re[e]);return Object.assign(e,re),e},Pe=Ne({});Pe.newInstance=()=>Ne({}),t.exports=Pe,Pe.HighlightJS=Pe,Pe.default=Pe}))()).default,JS={},YS=`hljs-`;function XS(e){let t=qS.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:i,register:a,registerAlias:o,registered:s};function n(e,n,r){let i=r||JS,a=typeof i.prefix==`string`?i.prefix:YS;if(!t.getLanguage(e))throw Error("Unknown language: `"+e+"` is not registered");t.configure({__emitter:ZS,classPrefix:a});let o=t.highlight(n,{ignoreIllegals:!0,language:e});if(o.errorRaised)throw Error("Could not highlight with `Highlight.js`",{cause:o.errorRaised});let s=o._emitter.root,c=s.data;return c.language=o.language,c.relevance=o.relevance,s}function r(e,r){let a=(r||JS).subset||i(),o=-1,s=0,c;for(;++o<a.length;){let i=a[o];if(!t.getLanguage(i))continue;let l=n(i,e,r);l.data&&l.data.relevance!==void 0&&l.data.relevance>s&&(s=l.data.relevance,c=l)}return c||{type:`root`,children:[],data:{language:void 0,relevance:s}}}function i(){return t.listLanguages()}function a(e,n){if(typeof e==`string`)t.registerLanguage(e,n);else{let n;for(n in e)Object.hasOwn(e,n)&&t.registerLanguage(n,e[n])}}function o(e,n){if(typeof e==`string`)t.registerAliases(typeof n==`string`?n:[...n],{languageName:e});else{let n;for(n in e)if(Object.hasOwn(e,n)){let r=e[n];t.registerAliases(typeof r==`string`?r:[...r],{languageName:n})}}}function s(e){return!!t.getLanguage(e)}}var ZS=class{constructor(e){this.options=e,this.root={type:`root`,children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(e){if(e===``)return;let t=this.stack[this.stack.length-1],n=t.children[t.children.length-1];n&&n.type===`text`?n.value+=e:t.children.push({type:`text`,value:e})}startScope(e){this.openNode(String(e))}endScope(){this.closeNode()}__addSublanguage(e,t){let n=this.stack[this.stack.length-1],r=e.root.children;t?n.children.push({type:`element`,tagName:`span`,properties:{className:[t]},children:r}):n.children.push(...r)}openNode(e){let t=this,n=e.split(`.`).map(function(e,n){return n?e+`_`.repeat(n):t.options.classPrefix+e}),r=this.stack[this.stack.length-1],i={type:`element`,tagName:`span`,properties:{className:n},children:[]};r.children.push(i),this.stack.push(i)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return``}},QS=2e4,$S=100,eC=2e3,tC=XS(KS),nC={js:`javascript`,jsx:`javascript`,mjs:`javascript`,cjs:`javascript`,ts:`typescript`,tsx:`typescript`,py:`python`,sh:`bash`,shell:`bash`,zsh:`bash`,html:`xml`,htm:`xml`,svg:`xml`,xml:`xml`,json:`json`,jsonc:`json`,json5:`json`,css:`css`,md:`markdown`,markdown:`markdown`,yml:`yaml`,yaml:`yaml`};function rC(e){if(e===void 0)return null;let t=e.trim().toLowerCase();return t.startsWith(`language-`)&&(t=t.slice(9)),t===``?null:t}function iC(e){let t=Object.hasOwn(nC,e)?nC[e]:void 0;return t!==void 0&&tC.registered(t)?t:tC.registered(e)?e:null}function aC(e){let t=e.className,n=(Array.isArray(t)?t:typeof t==`string`?[t]:[]).filter(e=>typeof e==`string`&&/^[A-Za-z0-9_-]+$/.test(e));return n.length>0?n.join(` `):void 0}function oC(e){let t=``,n=0,r=[...e].reverse();for(;r.length>0;){let e=r.pop();if(n+=1,n>QS)return null;if(e.type===`text`)t+=e.value;else{if(e.type!==`element`||e.tagName!==`span`)return null;for(let t=e.children.length-1;t>=0;--t)r.push(e.children[t])}}return t}function sC(e,t=0){if(t>$S)throw Error(`Code token tree is nested too deeply.`);return e.map((e,n)=>e.type===`text`?e.value:e.type===`element`&&e.tagName===`span`?(0,$.jsx)(`span`,{className:aC(e.properties),children:sC(e.children,t+1)},n):null)}function cC(e,t){let n=rC(t);if(n===null||e===``||e.length>2e4)return{nodes:null,highlighted:!1};let r=iC(n);if(r===null)return{nodes:null,highlighted:!1};try{let t=tC.highlight(r,e);if(oC(t.children)!==e)return{nodes:null,highlighted:!1};let n=sC(t.children);return n.length===0&&e!==``?{nodes:null,highlighted:!1}:{nodes:n,highlighted:!0}}catch{return{nodes:null,highlighted:!1}}}function lC(e){if(typeof document>`u`||document.body===null)return!1;let t=document.activeElement,n=typeof window>`u`?null:window.getSelection(),r=[];if(n!==null)for(let e=0;e<n.rangeCount;e+=1)r.push(n.getRangeAt(e).cloneRange());let i=document.createElement(`textarea`);i.value=e,i.setAttribute(`readonly`,``),i.setAttribute(`aria-hidden`,`true`),i.tabIndex=-1,i.style.position=`fixed`,i.style.top=`-1000px`,i.style.left=`-1000px`,i.style.opacity=`0`,document.body.appendChild(i);let a=!1;try{i.focus({preventScroll:!0}),i.select(),i.setSelectionRange(0,i.value.length),a=typeof document.execCommand==`function`&&document.execCommand(`copy`)}catch{a=!1}finally{if(i.remove(),t!==null&&typeof t.focus==`function`)try{t.focus({preventScroll:!0})}catch{}if(n!==null){n.removeAllRanges();for(let e of r)n.addRange(e)}}return a}async function uC(e){if(typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`)try{return await navigator.clipboard.writeText(e),!0}catch{return lC(e)}return lC(e)}var dC=/^[a-z0-9][a-z0-9+#._-]*$/;function fC({value:e,language:t,mode:n,htmlProps:r}){let i=sy(),a=(0,y.useMemo)(()=>cC(e,t),[e,t]),[o,s]=(0,y.useState)({value:e,state:`idle`}),c=(0,y.useRef)(e),l=(0,y.useRef)(null),u=(0,y.useRef)(!0);c.current=e;let d=o.value===e?o.state:`idle`;(0,y.useEffect)(()=>(u.current=!0,()=>{u.current=!1,l.current!==null&&(clearTimeout(l.current),l.current=null)}),[]),(0,y.useEffect)(()=>{l.current!==null&&(clearTimeout(l.current),l.current=null),s({value:e,state:`idle`})},[e]);let f=(0,y.useCallback)(async()=>{let t=e;l.current!==null&&(clearTimeout(l.current),l.current=null);let n=await uC(t);u.current&&c.current===t&&(s({value:t,state:n?`success`:`error`}),l.current=setTimeout(()=>{l.current=null,u.current&&s(e=>e.value===t?{value:t,state:`idle`}:e)},eC))},[e]),p=rC(t),m=t!==void 0&&t.trim()!==``?t.trim():i(`Text`,`文本`),h=[a.highlighted?`hljs`:``,p!==null&&dC.test(p)?`language-${p}`:``].filter(e=>e!==``).join(` `)||void 0,g=d===`success`?i(`Copied`,`已复制`):d===`error`?i(`Copy failed`,`复制失败`):``;return(0,$.jsxs)(`div`,{className:`md-code-block`,"data-code-mode":n,children:[(0,$.jsxs)(`div`,{className:`md-code-block-toolbar`,children:[(0,$.jsx)(`span`,{className:`md-code-block-language`,children:m}),n===`interactive`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{className:`md-code-block-feedback`,"data-state":d,role:`status`,"aria-live":`polite`,children:g}),(0,$.jsx)(`button`,{type:`button`,className:`md-code-block-copy`,"aria-label":i(`Copy code`,`复制代码`),onClick:()=>{f()},children:i(`Copy`,`复制`)})]})]}),(0,$.jsx)(`pre`,{className:`md-code`,...r,children:(0,$.jsx)(`code`,{className:h,children:a.nodes??e})})]})}var pC=g();function mC({src:e,alt:t,title:n,mode:r,rootRef:i,imageProps:a}){let o=sy(),s=(0,y.useRef)(null),c=(0,y.useRef)(null),l=(0,y.useRef)(!1),u=(0,y.useRef)(e),[d,f]=(0,y.useState)(!1),[p,m]=(0,y.useState)(!1),[h,g]=(0,y.useState)(null),[_,v]=(0,y.useState)(null),b=(0,y.useCallback)(()=>{let e=s.current;if(e&&e.isConnected)try{e.focus({preventScroll:!0})}catch{e.focus()}},[]),x=(0,y.useCallback)(()=>{l.current&&(l.current=!1,m(!1),b())},[b]),S=(0,y.useCallback)(()=>{let e=c.current;if(e?.open)try{e.close()}catch{}x()},[x]),C=(0,y.useCallback)(()=>{let t=i.current;t&&!l.current&&(v(e),g(t),l.current=!0,m(!0))},[i,e]);(0,y.useEffect)(()=>{if(r!==`interactive`){f(!1),S();return}let e=s.current;f(e!==null&&e.closest(`a`)===null)},[r,e,S]),(0,y.useEffect)(()=>{u.current!==e&&(u.current=e,l.current&&S())},[e,S]),(0,y.useEffect)(()=>{if(!p)return;let e=c.current;if(e&&!e.open){if(typeof e.showModal!=`function`)x();else try{e.showModal()}catch{x()}}},[p,x]);let w=d?{role:`button`,tabIndex:0,"aria-haspopup":`dialog`,"aria-label":t?void 0:o(`View image`,`查看图片`),"data-zoomable":`true`,onClick:e=>{e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.currentTarget.closest(`a`)||C()},onKeyDown:e=>{e.key!==`Enter`&&e.key!==` `&&e.key!==`Spacebar`||e.currentTarget.closest(`a`)||(e.preventDefault(),C())}}:{},T=(0,$.jsx)(`img`,{ref:s,className:`md-image`,...a,src:e,alt:t,title:n,loading:`lazy`,referrerPolicy:`no-referrer`,...w}),E=t||n?o(`Image preview: ${t||n}`,`图片预览:${t||n}`):o(`Image preview`,`图片预览`),D=!!(t||n),O=n&&n!==t?n:void 0;return(0,$.jsxs)($.Fragment,{children:[T,p&&h&&_===e?(0,pC.createPortal)((0,$.jsxs)(`dialog`,{ref:c,className:`md-image-zoom`,"aria-label":E,onClose:x,onKeyDown:e=>{e.key===`Tab`&&(e.preventDefault(),e.currentTarget.querySelector(`button`)?.focus())},onCancel:e=>{e.preventDefault(),S()},onClick:e=>{e.target===e.currentTarget&&S()},children:[(0,$.jsx)(`button`,{type:`button`,className:`md-image-zoom-close`,"aria-label":o(`Close image preview`,`关闭图片预览`),onClick:S,children:(0,$.jsx)(`span`,{"aria-hidden":`true`,children:`×`})}),(0,$.jsxs)(`figure`,{className:`md-image-zoom-figure`,children:[(0,$.jsx)(`img`,{className:`md-image-zoom-full`,src:e,alt:t,title:n,referrerPolicy:`no-referrer`}),D?(0,$.jsxs)(`figcaption`,{className:`md-image-zoom-caption`,children:[t?(0,$.jsx)(`span`,{children:t}):null,O?(0,$.jsx)(`span`,{className:`md-image-zoom-title`,children:O}):null]}):null]})]}),h):null]})}var hC=(0,y.createContext)(null);function gC(){let e=(0,y.useContext)(hC);if(!e)throw Error(`LocalViewContext is not initialized`);return e}var _C=`local.validation.failed`,vC=`local.validation.expression`,yC=2e3,bC={invalid:!1},xC={hintFor:()=>null,fieldFor:()=>bC};function SC(e){return`${e.start}:${e.end}`}function CC(e){return e.length>yC?`${e.slice(0,1999)}…`:e}function wC(e,t,n,r){let i=Array.isArray(e.validations)?e.validations:[];if(i.length===0)return xC;let a=null;try{typeof t.validate==`function`&&(a=t.validate())}catch{a=null}let o=new Map;for(let e of a??[])(e.code===_C||e.code===vC)&&o.set(SC(e.range),e);let s=new Map,c=new Map,l=new Map,u=r(`This rule cannot be evaluated`,`无法计算此规则`),d=r(`Validation failed.`,`校验未通过。`);for(let[t,r]of i.entries()){let i=SC(r.range),f=o.get(i),p=a===null||f?.code===vC,m=f?.code===_C,h=m?CC(f?.message||r.message||d):p?f?.message?`${u}: ${CC(f.message)}`:u:``,g={id:`${n}-validation-${t}`,failed:m,error:p,message:h};if(s.set(r.nodeId,g),c.set(i,g),m||p)for(let t of r.fields??[]){let n=Object.hasOwn(e.bindings,t)?e.bindings[t]:void 0;if(n)for(let e of n.nodeIds??[]){let t=l.get(e);t?t.includes(g.id)||t.push(g.id):l.set(e,[g.id])}}}return{hintFor(e){return c.get(SC(e.range))??s.get(e.id)??null},fieldFor(e){let t=l.get(e.id);return t&&t.length>0?{describedBy:t.join(` `),invalid:!0}:bC}}}function TC(e){return gC().validation.fieldFor(e)}var EC=/^\s*\{\{([\s\S]*)\}\}\s*$/,DC={revision:0,state:{}};function OC(e,t){return e.attrs?.[t]}function kC(e,t,n){let r=OC(t,n);if(r===void 0)return{present:!1};let i=EC.exec(r);if(!i)return{present:!0,ok:!0,value:r};try{return{present:!0,ok:!0,value:e.evaluate(i[1])}}catch{return{present:!0,ok:!1}}}function AC(e){return e===null?``:typeof e==`string`?e:typeof e==`number`?Number.isFinite(e)?String(e):null:typeof e==`boolean`?e?`true`:`false`:null}function jC(e,t,n,r=``,i=ny){let a=OC(t,n);if(a===void 0)return r;let o=EC.exec(a);try{return o?AC(e.evaluate(o[1]))??i(`Cannot compute`,`无法计算`):e.text(a)}catch{return i(`Cannot compute`,`无法计算`)}}function MC(e,t,n,r){let i=OC(t,n);if(i===void 0)return{ok:!0,value:r};let a=EC.exec(i);if(!a)return{ok:!0,value:i===`true`};try{let t=e.evaluate(a[1]);return typeof t==`boolean`?{ok:!0,value:t}:{ok:!1}}catch{return{ok:!1}}}function NC(e,t,n,r=!1){let i=MC(e,t,n,r);return i.ok?i.value:r}function PC(e,t,n,r,i){let a=OC(t,n);if(a===void 0)return{tone:i,error:!1};let o=EC.exec(a);if(!o){let e=a.trim();return{tone:r.includes(e)?e:i,error:!1}}try{let t=e.evaluate(o[1]);return typeof t==`string`&&r.includes(t)?{tone:t,error:!1}:{tone:i,error:!0}}catch{return{tone:i,error:!0}}}function FC(e){try{return e.snapshot().revision}catch{return 0}}function IC(e,t,n,r){let i=OC(t,n);if(i===void 0)return r;let a=EC.exec(i);try{let t=a?e.evaluate(a[1]):Number(i);return typeof t==`number`&&Number.isFinite(t)?t:r}catch{return r}}function LC(e,t){try{return e.get(t)}catch{return null}}function RC(e){return AC(e)??``}var zC=`—`;function BC(e){return e.trim()===``?zC:e}function VC({label:e,value:t,hint:n,className:r=``,multiline:i=!1}){return(0,$.jsxs)(`div`,{className:`md-control local-static-control ${r}`.trim(),children:[(0,$.jsx)(`span`,{className:`md-label`,children:e}),(0,$.jsx)(`span`,{className:`local-static-value${i?` local-static-multiline`:``}`,"data-local-static-value":``,children:t}),n?(0,$.jsx)(`span`,{className:`md-hint`,children:n}):null]})}function HC({value:e,block:t=!1}){return t?(0,$.jsx)(`div`,{className:`local-print-value local-print-block`,"aria-hidden":`true`,"data-local-print-value":``,children:e}):(0,$.jsx)(`span`,{className:`local-print-value`,"aria-hidden":`true`,"data-local-print-value":``,children:e})}function UC(e){let t=OC(e,`color`);if(t===void 0)return;let n=t.trim();return n!==``&&qn(n)?n:void 0}function WC(e){if(e)return{"--local-accent":e,"--local-accent-soft":`color-mix(in srgb, ${e} 14%, var(--surface))`,"--local-accent-strong":e}}var GC=`(prefers-color-scheme: dark)`;function KC(e){if(!Array.isArray(e)||e.length===0)return``;try{return e.map(e=>{if(!e||typeof e!=`object`)return``;let t=Array.isArray(e.colorSchemes)?e.colorSchemes.join(``):``;return`${e.name}\u0000${e.protocol}\u0000${t}`}).join(``)}catch{return``}}function qC(e){return e.map(e=>`${e.code}\u0000${e.range.start}\u0000${e.range.end}\u0000${e.message}`).join(``)}function JC(e){return e===`light`||e===`dark`?e:null}function YC(e){let t=JC(e.getAttribute(`data-theme`));if(t)return t;let n=e.parentElement;for(;n;){let e=JC(n.getAttribute(`data-color-scheme`))??JC(n.getAttribute(`data-theme`));if(e)return e;n=n.parentElement}return null}function XC(){if(typeof window>`u`||typeof window.matchMedia!=`function`)return null;try{return window.matchMedia(GC).matches?`dark`:`light`}catch{return null}}function ZC(e,t){let n=JC(t),[r,i]=(0,y.useState)(`light`);return(0,y.useEffect)(()=>{if(n){i(n);return}let t=e.current;if(!t||typeof window>`u`){i(`light`);return}let r=()=>i(YC(t)??XC()??`light`);r();let a=[];if(typeof MutationObserver==`function`)try{let e=(e,t)=>{let n=new MutationObserver(r);n.observe(e,{attributes:!0,attributeFilter:t}),a.push(n)};e(t,[`data-theme`]);let n=t.parentElement;for(;n;)e(n,[`data-color-scheme`,`data-theme`]),n=n.parentElement}catch{for(let e of a)e.disconnect();a=[]}let o=()=>r(),s=null;if(typeof window.matchMedia==`function`)try{s=window.matchMedia(GC),typeof s.addEventListener==`function`?s.addEventListener(`change`,o):typeof s.addListener==`function`&&s.addListener(o)}catch{s=null}return()=>{for(let e of a)e.disconnect();s&&(typeof s.removeEventListener==`function`?s.removeEventListener(`change`,o):typeof s.removeListener==`function`&&s.removeListener(o))}},[n,e]),n??r}function QC(e,t,n){return Math.min(n,Math.max(t,e))}function $C(e,t,n,r){let i=Number.isFinite(r)&&r>0?r:1,a=Math.max(0,Math.floor((n-t)/i+1e-9)),o=t+Math.max(0,Math.min(a,Math.round((e-t)/i)))*i;return Number(o.toPrecision(15))}function ew(e,t,n,r){try{let i=e.get(t,n);return typeof i==`number`&&Number.isFinite(i)?i:r}catch{return r}}function tw(e,t,n,r,i,a,o=1){let s=IC(e,t,n,i),c=IC(e,t,r,a);s>c&&([s,c]=[c,s]);let l=IC(e,t,`step`,o);return{min:s,max:c,step:Number.isFinite(l)&&l>0?l:1}}function nw(e){let{runtime:t,report:n}=gC(),r=ay(),i=sy(),[a,o]=(0,y.useState)(null);return{write:(0,y.useCallback)((a,s)=>{try{let i=t.set(e,a,s);return i.length?(o(i.map(e=>et(e,r)).join(`; `)),n(i),!1):(o(null),!0)}catch(e){return o(e instanceof Error?e.message:i(`Cannot write`,`无法写入`)),!1}},[r,e,n,t,i]),writeMany:(0,y.useCallback)(a=>{try{let i=t.setMany(e,a);return i.length?(o(i.map(e=>et(e,r)).join(`; `)),n(i),!1):(o(null),!0)}catch(e){return o(e instanceof Error?e.message:i(`Cannot write`,`无法写入`)),!1}},[r,e,n,t,i]),error:a,setError:o}}function rw(e){let{runtime:t}=gC(),n=MC(t,e,`disabled`,!1);return n.ok?{disabled:n.value,invalid:!1}:{disabled:!0,invalid:!0}}function iw(e,t,n){let r=0;try{r=e.resetToken(t)}catch{r=0}let i=(0,y.useRef)(r),a=(0,y.useRef)(n);a.current=n,(0,y.useEffect)(()=>{i.current!==r&&(i.current=r,a.current())},[r])}function aw({message:e}){let t=sy();return(0,$.jsx)(`span`,{className:`local-error`,role:`alert`,children:e??t(`Cannot compute`,`无法计算`)})}var ow=class extends y.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidUpdate(e){this.state.failed&&e.revision!==this.props.revision&&this.setState({failed:!1})}render(){return this.state.failed?(0,$.jsx)(aw,{}):this.props.children}},sw=new Set([`table`,`chart`,`plot`,`timeline`,`diagram`]);function cw(e,t,n){if(!e)return null;let r=e.trim();if(!r)return null;let i=r.replace(/[\u0000- ]+/g,``),a=/^([a-z][a-z0-9+.-]*):/i.exec(i);if(a){let e=a[1].toLowerCase();if(!(t===`image`?e===`http`||e===`https`:e===`http`||e===`https`||e===`mailto`||e===`tel`))return null}if(!n)return t===`image`?null:r;try{return n(r,t)?r:null}catch{return null}}function lw(e){return`h${Math.min(6,Math.max(1,e??1))}`}var uw=/^(?:aria|data)-[a-z0-9_.:-]+$/,dw=new Set([`aria-labelledby`,`aria-describedby`,`aria-controls`,`aria-owns`,`aria-details`,`aria-errormessage`,`aria-flowto`,`aria-activedescendant`]);function fw(e,t){let n=t.attrs;if(!n)return{};let r={},i=e.anchors.ids.get(t)??e.anchors.htmlIds.get(t);i&&(r.id=i);for(let[t,i]of Object.entries(n)){let n=t.toLowerCase();if(n!==`id`){if(n===`title`||n===`lang`)r[n]=i;else if(n===`dir`){let e=i.trim().toLowerCase();(e===`ltr`||e===`rtl`||e===`auto`)&&(r.dir=e)}else uw.test(n)&&(r[n]=dw.has(n)?i.trim().split(/\s+/).filter(Boolean).map(t=>e.anchors.referenceId(t)).join(` `):i)}}return r}function pw(e,t){if(e.node!==t.node||e.visible!==t.visible||e.resetToken!==t.resetToken||e.env!==t.env||e.depValues===null||t.depValues===null||e.depValues.length!==t.depValues.length)return!1;for(let n=0;n<e.depValues.length;n+=1)if(!Object.is(e.depValues[n],t.depValues[n]))return!1;return!0}var mw=(0,y.memo)(function({node:e,index:t,visible:n,env:r}){return bw(r,e,t,n,!0)},pw);function hw(e,t,n,r=!0){if(!t||t.length===0)return null;if(!r)return t.map((t,r)=>bw(e,t,r,n,!1));let i=null,a=null;try{i=e.runtime.snapshot().state,a=Vn(e.runtime)}catch{i=null}let o=i;return t.map((t,r)=>{let i=e.dependencies.get(t.id),s=i==null||o===null||a===null?null:i.map(e=>o[e]),c=a?.get(t.id)??0;return(0,$.jsx)(mw,{node:t,index:r,visible:n,env:e,depValues:s,resetToken:c},t.id||`${t.type}-${r}`)})}function gw(e,t){if(typeof t.value==`string`)return t.value;let{start:n,end:r}=t.range;return Number.isInteger(n)&&Number.isInteger(r)&&n>=0&&r>=n?e.runtime.document.source.slice(n,r):``}function _w(e,t,n,r){return(0,$.jsx)(`span`,{className:r?`local-fallback local-fallback-block`:`local-fallback local-fallback-inline`,title:e.t(`Unsupported syntax shown as source`,`未支持的语法,已按源码原样显示`),"data-local-fallback":``,children:gw(e,t)},n)}function vw(e,t,n){return!t||t.length===0?null:t.map((t,r)=>t.type===`paragraph`||t.type===`root`?(0,$.jsx)(`span`,{children:hw(e,t.children,n,!1)},t.id||`inline-${r}`):bw(e,t,r,n,!1))}function yw(e,t,n){let r=e.footnotes.siteFor(t);if(!r||!r.entry){let i=r?.label||wh(t)||`?`;return(0,$.jsx)(`span`,{className:`local-footnote-missing`,title:e.t(`Undefined footnote`,`未定义的脚注`),"data-local-footnote-missing":``,children:`[^${i}]`},n)}let i=r.entry;return(0,$.jsx)(`sup`,{className:`local-footnote-ref`,children:(0,$.jsx)(`a`,{id:r.id,href:`#${i.id}`,className:`local-footnote-ref-link`,role:`doc-noteref`,"data-local-footnote-number":i.number,"aria-label":e.t(`Footnote ${i.number}`,`脚注 ${i.number}`),children:i.number})},n)}function bw(e,t,n,r,i=!0){let a=t.id||`${t.type}-${n}`;if(t.type===`component`)return(0,$.jsx)(ow,{revision:FC(e.runtime),children:Sw(t,r,e.runtime,e.t)},a);switch(t.type){case`root`:return(0,$.jsx)(`div`,{children:hw(e,t.children,r)},a);case`heading`:return(0,y.createElement)(lw(t.depth),{key:a,id:e.anchors.ids.get(t),...fw(e,t)},hw(e,t.children,r,!1));case`paragraph`:return(0,$.jsx)(`p`,{...fw(e,t),children:hw(e,t.children,r,!1)},a);case`text`:return(0,$.jsx)(`span`,{children:t.value??``},a);case`emphasis`:return(0,$.jsx)(`em`,{...fw(e,t),children:hw(e,t.children,r,!1)},a);case`strong`:return(0,$.jsx)(`strong`,{...fw(e,t),children:hw(e,t.children,r,!1)},a);case`delete`:return(0,$.jsx)(`del`,{...fw(e,t),children:hw(e,t.children,r,!1)},a);case`underline`:return(0,$.jsx)(`u`,{...fw(e,t),children:hw(e,t.children,r,!1)},a);case`mark`:return(0,$.jsx)(`mark`,{...fw(e,t),children:hw(e,t.children,r,!1)},a);case`sup`:return(0,$.jsx)(`sup`,{...fw(e,t),children:hw(e,t.children,r,!1)},a);case`sub`:return(0,$.jsx)(`sub`,{...fw(e,t),children:hw(e,t.children,r,!1)},a);case`span`:return(0,$.jsx)(`span`,{...fw(e,t),children:hw(e,t.children,r,!1)},a);case`div`:return(0,$.jsx)(`div`,{...fw(e,t),children:hw(e,t.children,r)},a);case`summary`:return(0,$.jsx)(`span`,{...fw(e,t),children:hw(e,t.children,r,!1)},a);case`details`:return(0,$.jsx)(rT,{node:t,visible:r},a);case`inlineCode`:return(0,$.jsx)(`code`,{className:`md-inline-code`,...fw(e,t),children:t.value??``},a);case`code`:return(0,$.jsx)(fC,{value:t.value??``,language:t.lang??void 0,mode:e.mode,htmlProps:fw(e,t)},a);case`blockquote`:return(0,$.jsx)(`blockquote`,{...fw(e,t),children:hw(e,t.children,r)},a);case`break`:return(0,$.jsx)(`br`,{...fw(e,t)},a);case`thematicBreak`:return(0,$.jsx)(`hr`,{...fw(e,t)},a);case`list`:return t.ordered?(0,$.jsx)(`ol`,{start:t.start??1,className:`md-list`,...fw(e,t),children:hw(e,t.children,r)},a):(0,$.jsx)(`ul`,{className:`md-list`,...fw(e,t),children:hw(e,t.children,r)},a);case`listItem`:{let n=typeof t.checked==`boolean`;return(0,$.jsxs)(`li`,{className:n?`md-list-item md-task-item`:`md-list-item`,...fw(e,t),children:[n?e.mode===`static`?(0,$.jsx)(`span`,{className:`md-task-marker`,role:`img`,"aria-label":t.checked?e.t(`Completed`,`已完成`):e.t(`Not completed`,`未完成`),children:t.checked?`✓`:`☐`}):(0,$.jsx)(`input`,{type:`checkbox`,className:`md-task-checkbox`,checked:t.checked===!0,readOnly:!0,tabIndex:-1,"aria-label":t.checked?e.t(`Completed`,`已完成`):e.t(`Not completed`,`未完成`)}):null,hw(e,t.children,r)]},a)}case`link`:{let n=cw(t.url,`link`,e.urlPolicy);if(!n)return(0,y.createElement)(`span`,{...fw(e,t),className:`md-link-rejected`,key:a,title:e.t(`Unsafe link URL rejected`,`已拒绝不安全的链接地址`)},hw(e,t.children,r,!1));let i=e.anchors.resolve(n),o=/^https?:/i.test(i);return(0,$.jsx)(`a`,{...fw(e,t),href:i,title:t.title??void 0,target:o?`_blank`:void 0,rel:o?`noopener noreferrer`:void 0,children:hw(e,t.children,r,!1)},a)}case`image`:{let n=cw(t.url,`image`,e.urlPolicy),r=n;if(n&&e.imageResolver)try{let t=e.imageResolver(n);r=typeof t==`string`&&t.trim()!==``?t:null}catch{r=null}if(!r){let n=e.t(`Unsafe image rejected`,`已拒绝不安全的图片`),r=t.alt?e.t(`: ${t.alt}`,`:${t.alt}`):``;return(0,$.jsxs)(`span`,{className:`md-image-rejected`,...fw(e,t),children:[`[`,n,r,`]`]},a)}return(0,$.jsx)(mC,{src:r,alt:t.alt??``,title:t.title??void 0,mode:e.mode,rootRef:e.rootRef,imageProps:t.attrs===void 0?void 0:{...fw(e,t),width:t.width,height:t.height}},a)}case`table`:{let[n,...i]=t.children??[];return(0,$.jsx)(`div`,{className:`md-table-scroll`,children:(0,$.jsxs)(`table`,{className:`md-table`,children:[n?(0,$.jsx)(`thead`,{children:(0,$.jsx)(`tr`,{children:xw(e,n,`th`,t.align,r)})}):null,i.length?(0,$.jsx)(`tbody`,{children:i.map((n,i)=>(0,$.jsx)(`tr`,{children:xw(e,n,`td`,t.align,r)},n.id||`${a}-row-${i}`))}):null]})},a)}case`tableRow`:return(0,$.jsx)(`tr`,{children:xw(e,t,`td`,void 0,r)},a);case`tableCell`:{let n=t.align?.[0]??void 0;return(0,$.jsx)(`td`,{style:{textAlign:n??void 0},children:hw(e,t.children,r,!1)},a)}case`interpolation`:try{let n=AC(e.runtime.evaluate(t.value??``));if(n===null)throw Error(`Cannot display an array`);return(0,$.jsx)(`span`,{className:`local-interpolation`,children:n},a)}catch{return(0,$.jsx)(aw,{},a)}case`math`:case`inlineMath`:{let n=t.type===`math`;return(0,$.jsx)(`span`,{className:n?`local-math-display`:`local-math-inline`,children:(0,$.jsx)(ow,{revision:FC(e.runtime),children:(0,$.jsx)(ey,{source:t.value??``,display:n})})},a)}case`html`:return(0,$.jsx)(`span`,{className:`md-raw-html`,children:t.value??``},a);case`fallback`:return _w(e,t,a,i);case`footnoteReference`:return yw(e,t,a);case`footnoteDefinition`:return null;case`comment`:case`definition`:return null;default:return t.children&&t.children.length?(0,$.jsx)(`span`,{children:hw(e,t.children,r,i)},a):typeof t.value==`string`?(0,$.jsx)(`span`,{children:t.value},a):null}}function xw(e,t,n,r,i){return(t.children??[]).map((a,o)=>{let s=a.align?.[0]??t.align?.[o]??r?.[o]??void 0;return n===`th`?(0,$.jsx)(`th`,{style:{textAlign:s??void 0},children:hw(e,a.children,i,!1)},a.id||`${t.id}-h-${o}`):(0,$.jsx)(`td`,{style:{textAlign:s??void 0},children:hw(e,a.children,i,!1)},a.id||`${t.id}-c-${o}`)})}function Sw(e,t,n,r){let i=e.name??``;if(i===`computed`||i===`const`)return null;if(i===`data-table`)return(0,$.jsx)(Bb,{node:e,visible:t,runtime:n,t:r});if(sw.has(i))return(0,$.jsx)(Cw,{node:e,visible:t});let a=xT[i];return a?(0,$.jsx)(a,{node:e,visible:t}):(0,$.jsxs)(`span`,{className:`component-error`,children:[r(`Unknown component "`,`未知组件“`),i||r(`(missing name)`,`(缺少名称)`),r(`"`,`”`)]})}function Cw({node:e,visible:t}){let{runtime:n,render:r,mode:i}=gC(),a=sy(),o=TC(e),s=(0,$.jsx)(Db,{node:e,runtime:n,render:r,visible:t,mode:i});if(!n.document.validations?.some(t=>t.fields.some(t=>Object.hasOwn(n.document.bindings,t)&&n.document.bindings[t].nodeIds.includes(e.id))))return s;let c=jC(n,e,`label`,jC(n,e,`title`,a(`Selection`,`选择`),a),a);return(0,$.jsx)(`div`,{role:`group`,"aria-label":c,"aria-invalid":o.invalid||void 0,"aria-describedby":o.describedBy,children:s})}function ww({node:e,visible:t}){let{validation:n}=gC(),r=n.hintFor(e);if(!r)return null;let i=r.failed||r.error,a=t&&i;return(0,$.jsx)(`span`,{id:r.id,className:`local-validation-hint`,"data-local-validation":r.error?`error`:r.failed?`failed`:`passed`,role:a?`status`:void 0,"aria-live":a?`polite`:void 0,children:i?r.message:null})}function Tw(){return null}function Ew({message:e}){return e?(0,$.jsx)(`span`,{className:`field-error`,role:`alert`,children:e}):null}function Dw(e,t,n=ny){if(t.required&&e.length===0)return n(`This field is required`,`请填写此字段`);if(e.length>1e5)return n(`At most ${w} characters`,`最多允许 ${w} 个字符`);if(t.email&&e!==``&&!N(e))return n(`Enter a valid email address`,`请输入有效的邮箱地址`);let r=tt(e);return t.minLength!==void 0&&t.minLength>0&&e!==``&&r<t.minLength?n(`At least ${t.minLength} characters`,`至少需要 ${t.minLength} 个字符`):t.maxLength!==void 0&&t.maxLength>=0&&r>t.maxLength?n(`At most ${t.maxLength} characters`,`最多允许 ${t.maxLength} 个字符`):null}function Ow({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=gC(),i=sy(),{write:a,error:o,setError:s}=nw(e),c=jC(n,e,`label`,e.name??i(`Input`,`输入`),i),l=jC(n,e,`placeholder`,``,i),u=(OC(e,`type`)??`text`)===`email`,d=NC(n,e,`required`,!1),{disabled:f,invalid:p}=rw(e),m=TC(e),h=OC(e,`min-length`),g=OC(e,`max-length`),_=h===void 0?void 0:Math.max(0,Math.floor(IC(n,e,`min-length`,0))),v=g===void 0?void 0:Math.max(0,Math.floor(IC(n,e,`max-length`,0))),b=RC(LC(n,e)),[x,S]=(0,y.useState)(b),[C,w]=(0,y.useState)(!1),[T,E]=(0,y.useState)(!1),[D,O]=(0,y.useState)(null),k=(0,y.useRef)(!1),A=(0,y.useRef)(b),j=(0,y.useRef)(b);if(j.current=b,(0,y.useEffect)(()=>{A.current!==b&&(A.current=b,!C&&!k.current&&S(b))},[b,C]),iw(n,e,()=>{k.current=!1,S(j.current),E(!1),O(null),s(null)}),r===`static`)return(0,$.jsx)(VC,{className:`local-input${u?` local-input-email`:``}`,label:c,value:BC(b)});let M=e=>Dw(e,{required:d,minLength:_,maxLength:v,email:u},i);return(0,$.jsxs)(`div`,{className:`md-control local-input${u?` local-input-email`:``}`,children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-input`,children:c}),(0,$.jsx)(`input`,{id:`${t}-input`,className:`md-text-input`,type:u?`email`:`text`,value:x,placeholder:l||void 0,disabled:f,required:d,"aria-invalid":D||o||m.invalid?!0:void 0,"aria-describedby":m.describedBy,onFocus:()=>w(!0),onBlur:()=>{w(!1),E(!0);let e=M(x);O(e),!e&&x!==b&&a(x)},onChange:e=>{let t=e.target.value;S(t),s(null),T&&O(M(t)),!k.current&&M(t)===null&&a(t)},onCompositionStart:()=>{k.current=!0},onCompositionEnd:e=>{k.current=!1;let t=e.currentTarget.value;S(t),T&&O(M(t)),M(t)===null&&a(t)}}),(0,$.jsx)(HC,{value:BC(b)}),(0,$.jsx)(Ew,{message:p?i(`Cannot compute`,`无法计算`):D??o})]})}function kw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=gC(),i=sy(),{write:a,error:o,setError:s}=nw(e),c=jC(n,e,`label`,i(`Text`,`文本`),i),l=jC(n,e,`placeholder`,``,i),u=Math.min(40,Math.max(1,Math.floor(IC(n,e,`rows`,4)))),d=NC(n,e,`required`,!1),{disabled:f,invalid:p}=rw(e),m=TC(e),h=OC(e,`min-length`),g=OC(e,`max-length`),_=h===void 0?void 0:Math.max(0,Math.floor(IC(n,e,`min-length`,0))),v=g===void 0?void 0:Math.max(0,Math.floor(IC(n,e,`max-length`,0))),b=RC(LC(n,e)),[x,S]=(0,y.useState)(b),[C,w]=(0,y.useState)(!1),[T,E]=(0,y.useState)(!1),[D,O]=(0,y.useState)(null),k=(0,y.useRef)(!1),A=(0,y.useRef)(b),j=(0,y.useRef)(b);if(j.current=b,(0,y.useEffect)(()=>{A.current!==b&&(A.current=b,!C&&!k.current&&S(b))},[b,C]),iw(n,e,()=>{k.current=!1,S(j.current),E(!1),O(null),s(null)}),r===`static`)return(0,$.jsx)(VC,{className:`local-textarea`,label:c,value:BC(b),multiline:!0});let M=e=>Dw(e,{required:d,minLength:_,maxLength:v},i);return(0,$.jsxs)(`div`,{className:`md-control local-textarea`,children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-textarea`,children:c}),(0,$.jsx)(`textarea`,{id:`${t}-textarea`,className:`md-text-input`,rows:u,value:x,placeholder:l||void 0,disabled:f,required:d,"aria-invalid":D||o||m.invalid?!0:void 0,"aria-describedby":m.describedBy,onFocus:()=>w(!0),onBlur:()=>{w(!1),E(!0);let e=M(x);O(e),!e&&x!==b&&a(x)},onChange:e=>{let t=e.target.value;S(t),s(null),T&&O(M(t)),!k.current&&M(t)===null&&a(t)},onCompositionStart:()=>{k.current=!0},onCompositionEnd:e=>{k.current=!1;let t=e.currentTarget.value;S(t),T&&O(M(t)),M(t)===null&&a(t)}}),(0,$.jsx)(HC,{value:BC(b),block:!0}),(0,$.jsx)(Ew,{message:p?i(`Cannot compute`,`无法计算`):D??o})]})}function Aw(e){let t=e.trim();if(t===``||t===`-`||t===`+`||t===`.`||t===`-.`)return{kind:`empty`};let n=Number(t);return Number.isFinite(n)?{kind:`valid`,value:n}:{kind:`invalid`}}function jw(e,t,n,r,i=ny){let a=1e-9*Math.max(1,Math.abs(e));if(t!==void 0&&e<t-a)return i(`Must be at least ${t}`,`不能小于 ${t}`);if(n!==void 0&&e>n+a)return i(`Must be at most ${n}`,`不能大于 ${n}`);if(!Number.isFinite(r)||r<=0)return i(`Step must be greater than 0`,`步长必须大于 0`);let o=(e-(t??0))/r;return Math.abs(o-Math.round(o))>1e-9*Math.max(1,Math.abs(o))?i(`Must be a multiple of ${r}`,`需要按步长 ${r} 取值`):null}function Mw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=gC(),i=sy(),{write:a,error:o,setError:s}=nw(e),c=jC(n,e,`label`,i(`Number`,`数字`),i),{disabled:l,invalid:u}=rw(e),d=TC(e),f=OC(e,`min`)!==void 0,p=OC(e,`max`)!==void 0,m=f?IC(n,e,`min`,0):void 0,h=p?IC(n,e,`max`,0):void 0,g=IC(n,e,`step`,1),_=LC(n,e),v=typeof _==`number`&&Number.isFinite(_)?String(_):``,[b,x]=(0,y.useState)(v),[S,C]=(0,y.useState)(!1),[w,T]=(0,y.useState)(!1),[E,D]=(0,y.useState)(null),O=(0,y.useRef)(!1),k=(0,y.useRef)(v),A=(0,y.useRef)(v);A.current=v,(0,y.useEffect)(()=>{k.current!==v&&(k.current=v,!S&&!O.current&&x(v))},[v,S]),iw(n,e,()=>{O.current=!1,x(A.current),T(!1),D(null),s(null)});let j=(0,$.jsxs)($.Fragment,{children:[m===void 0?``:i(`Min ${m}`,`最小 ${m}`),m!==void 0&&h!==void 0?` · `:``,h===void 0?``:i(`Max ${h}`,`最大 ${h}`),g===void 0?``:i(` · Step ${g}`,` · 步长 ${g}`)]});if(r===`static`)return(0,$.jsx)(VC,{className:`local-number`,label:c,value:BC(v),hint:j});let M=(e,t)=>{let n=Aw(e);if(n.kind!==`valid`)return t&&D(i(`Enter a valid number`,`请输入有效数字`)),!1;let r=jw(n.value,m,h,g,i);return r?(t&&D(r),!1):(D(null),a(n.value))};return(0,$.jsxs)(`div`,{className:`md-control local-number`,children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-number`,children:c}),(0,$.jsx)(`input`,{id:`${t}-number`,className:`md-text-input`,type:`text`,inputMode:`decimal`,value:b,disabled:l,"aria-invalid":E||o||d.invalid?!0:void 0,"aria-describedby":d.describedBy,onFocus:()=>C(!0),onBlur:()=>{C(!1),T(!0),M(b,!0)},onChange:e=>{let t=e.target.value;x(t),s(null),O.current||M(t,w)},onCompositionStart:()=>{O.current=!0},onCompositionEnd:e=>{O.current=!1,M(e.currentTarget.value,w)}}),(0,$.jsx)(HC,{value:BC(v)}),m!==void 0||h!==void 0||g!==void 0?(0,$.jsx)(`span`,{className:`md-hint`,children:j}):null,(0,$.jsx)(Ew,{message:u?i(`Cannot compute`,`无法计算`):E??o})]})}function Nw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=gC(),i=sy(),{write:a,error:o}=nw(e),s=jC(n,e,`label`,i(`Slider`,`滑块`),i),{disabled:c,invalid:l}=rw(e),u=TC(e),d=IC(n,e,`min`,0),f=IC(n,e,`max`,100),p=IC(n,e,`step`,1),m=LC(n,e),h=Math.min(f,Math.max(d,typeof m==`number`&&Number.isFinite(m)?m:d));return r===`static`?(0,$.jsx)(VC,{className:`md-slider local-slider`,label:s,value:String(h)}):(0,$.jsxs)(`div`,{className:`md-control md-slider local-slider`,style:WC(UC(e)),children:[(0,$.jsxs)(`label`,{className:`md-label`,htmlFor:`${t}-slider`,children:[(0,$.jsx)(`span`,{children:s}),(0,$.jsx)(`span`,{className:`md-slider-value`,"aria-hidden":`true`,children:h})]}),(0,$.jsx)(`input`,{id:`${t}-slider`,type:`range`,min:d,max:f,step:p,value:h,disabled:c,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,onChange:e=>a(Number(e.target.value))}),(0,$.jsx)(HC,{value:String(h)}),(0,$.jsx)(Ew,{message:l?i(`Cannot compute`,`无法计算`):o})]})}function Pw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=gC(),i=sy(),{write:a,error:o}=nw(e),s=jC(n,e,`label`,i(`Toggle`,`开关`),i),{disabled:c,invalid:l}=rw(e),u=TC(e),d=LC(n,e)===!0,f=d?i(`On`,`开`):i(`Off`,`关`);return r===`static`?(0,$.jsx)(VC,{className:`md-toggle local-toggle`,label:s,value:f}):(0,$.jsxs)(`div`,{className:`md-control md-toggle local-toggle`,style:WC(UC(e)),children:[(0,$.jsxs)(`label`,{className:`md-toggle-label`,htmlFor:`${t}-toggle`,children:[(0,$.jsx)(`input`,{id:`${t}-toggle`,type:`checkbox`,checked:d,disabled:c,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,onChange:e=>a(e.target.checked)}),(0,$.jsx)(`span`,{children:s})]}),(0,$.jsx)(HC,{value:f}),(0,$.jsx)(Ew,{message:l?i(`Cannot compute`,`无法计算`):o})]})}function Fw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=gC(),i=sy(),{write:a,error:o}=nw(e),s=jC(n,e,`label`,i(`Checkbox`,`勾选`),i),{disabled:c,invalid:l}=rw(e),u=TC(e),d=LC(n,e)===!0,f=d?i(`Checked`,`已勾选`):i(`Unchecked`,`未勾选`);return r===`static`?(0,$.jsx)(VC,{className:`local-checkbox`,label:s,value:f}):(0,$.jsxs)(`div`,{className:`md-control local-checkbox`,style:WC(UC(e)),children:[(0,$.jsxs)(`label`,{className:`md-toggle-label`,htmlFor:`${t}-checkbox`,children:[(0,$.jsx)(`input`,{id:`${t}-checkbox`,type:`checkbox`,checked:d,disabled:c,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,onChange:e=>a(e.target.checked)}),(0,$.jsx)(`span`,{children:s})]}),(0,$.jsx)(HC,{value:f}),(0,$.jsx)(Ew,{message:l?i(`Cannot compute`,`无法计算`):o})]})}function Iw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=gC(),i=sy(),{write:a,error:o}=nw(e),s=jC(n,e,`label`,i(`Date`,`日期`),i),{disabled:c,invalid:l}=rw(e),u=TC(e),d=NC(n,e,`required`,!1),f=jC(n,e,`min`,``,i),p=jC(n,e,`max`,``,i),m=LC(n,e),h=typeof m==`string`?m:``,[g,_]=(0,y.useState)(!1),v=g&&d&&h===``?i(`Select a date`,`请选择日期`):null;return r===`static`?(0,$.jsx)(VC,{className:`local-date`,label:s,value:BC(h)}):(0,$.jsxs)(`div`,{className:`md-control local-date`,children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-date`,children:s}),(0,$.jsx)(`input`,{id:`${t}-date`,className:`md-text-input`,type:`date`,value:h,min:f||void 0,max:p||void 0,required:d,disabled:c,"aria-invalid":v||o||u.invalid?!0:void 0,"aria-describedby":u.describedBy,onBlur:()=>_(!0),onChange:e=>{_(!0),a(e.target.value)}}),(0,$.jsx)(HC,{value:BC(h)}),(0,$.jsx)(Ew,{message:l?i(`Cannot compute`,`无法计算`):v??o})]})}function Lw(e){return(e.children??[]).filter(e=>e.type===`component`&&e.name===`option`).map((e,t)=>({value:OC(e,`value`)??`option-${t+1}`,node:e}))}function Rw(e,t,n=ny){if(!t)return``;let r=``;for(let i of t)if(i.type===`text`||i.type===`inlineCode`)r+=i.value??``;else if(i.type===`fallback`)r+=i.value??``;else if(i.type===`interpolation`)try{r+=AC(e.evaluate(i.value??``))??``}catch{r+=n(`Cannot compute`,`无法计算`)}else i.type===`break`?r+=` `:r+=Rw(e,i.children,n);return r}function zw(e,t,n=ny){return Rw(e,t.children,n)||OC(t,`value`)||``}function Bw(){return null}function Vw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=gC(),i=sy(),{write:a,error:o}=nw(e),s=jC(n,e,`label`,i(`Select`,`选择`),i),{disabled:c,invalid:l}=rw(e),u=TC(e),d=Lw(e),f=LC(n,e),p=typeof f==`string`?f:``,m=d.some(e=>e.value===p)?p:d[0]?.value??``,h=d.find(e=>e.value===m),g=h?zw(n,h.node,i)||m:``;return d.length===0?(0,$.jsx)(aw,{message:i(`Missing options`,`缺少选项`)}):r===`static`?(0,$.jsx)(VC,{className:`md-select local-select`,label:s,value:BC(g)}):(0,$.jsxs)(`div`,{className:`md-control md-select local-select`,style:WC(UC(e)),children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-select`,children:s}),(0,$.jsx)(`select`,{id:`${t}-select`,className:`md-select-input`,value:m,disabled:c,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,onChange:e=>a(e.target.value),children:d.map(e=>(0,$.jsx)(`option`,{value:e.value,children:zw(n,e.node,i)||e.value},e.node.id))}),(0,$.jsx)(HC,{value:BC(g)}),(0,$.jsx)(Ew,{message:l?i(`Cannot compute`,`无法计算`):o})]})}function Hw({node:e,visible:t}){let n=(0,y.useId)(),r=gC(),{runtime:i,mode:a}=r,o=sy(),{write:s,error:c}=nw(e),l=jC(i,e,`label`,o(`Options`,`选项`),o),{disabled:u,invalid:d}=rw(e),f=TC(e),p=Lw(e),m=LC(i,e),h=typeof m==`string`?m:``,g=p.findIndex(e=>e.value===h),_=g>=0?g:0,v=g>=0?p[g]:void 0,b=v?zw(i,v.node,o):``,x=(0,y.useRef)([]);if(p.length===0)return(0,$.jsx)(aw,{message:o(`Missing options`,`缺少选项`)});if(a===`static`)return(0,$.jsx)(VC,{className:`local-choices`,label:l,value:BC(b)});let S=e=>{let t=p[e];t&&(s(t.value),x.current[e]?.focus())},C=(e,t)=>{let n=-1;e.key===`ArrowRight`||e.key===`ArrowDown`?n=(t+1)%p.length:e.key===`ArrowLeft`||e.key===`ArrowUp`?n=(t-1+p.length)%p.length:e.key===`Home`?n=0:e.key===`End`&&(n=p.length-1),!(n<0)&&(e.preventDefault(),S(n))};return(0,$.jsxs)(`div`,{className:`md-control local-choices`,style:WC(UC(e)),children:[(0,$.jsx)(`span`,{className:`md-label`,id:`${n}-choices-label`,children:l}),(0,$.jsx)(`div`,{className:`local-choice-list`,role:`radiogroup`,"aria-labelledby":`${n}-choices-label`,"aria-disabled":u||void 0,"aria-invalid":f.invalid||void 0,"aria-describedby":f.describedBy,children:p.map((e,n)=>{let i=e.value===h;return(0,$.jsx)(`button`,{ref:e=>{x.current[n]=e},type:`button`,role:`radio`,"aria-checked":i,tabIndex:n===_?0:-1,disabled:u,className:`local-choice${i?` is-selected`:``}`,onClick:()=>s(e.value),onKeyDown:e=>C(e,n),children:vw(r,e.node.children,t)},e.node.id)})}),(0,$.jsx)(HC,{value:BC(b)}),(0,$.jsx)(Ew,{message:d?o(`Cannot compute`,`无法计算`):c})]})}function Uw({node:e,visible:t}){let n=(0,y.useId)(),r=gC(),{runtime:i,mode:a}=r,o=sy(),{write:s,error:c}=nw(e),l=jC(i,e,`label`,o(`Options`,`选项`),o),{disabled:u,invalid:d}=rw(e),f=TC(e),p=Lw(e),m=LC(i,e),h=typeof m==`string`?m:``,g=n,_=p.find(e=>e.value===h),v=_?zw(i,_.node,o):``;return p.length===0?(0,$.jsx)(aw,{message:o(`Missing options`,`缺少选项`)}):a===`static`?(0,$.jsx)(VC,{className:`local-radio-group`,label:l,value:BC(v)}):(0,$.jsxs)(`fieldset`,{className:`md-control local-radio-group`,style:WC(UC(e)),disabled:u,"aria-invalid":f.invalid||void 0,"aria-describedby":f.describedBy,children:[(0,$.jsx)(`legend`,{className:`md-label`,children:l}),p.map(e=>(0,$.jsxs)(`label`,{className:`local-radio-option`,children:[(0,$.jsx)(`input`,{type:`radio`,name:g,value:e.value,checked:h===e.value,onChange:()=>s(e.value)}),(0,$.jsx)(`span`,{children:vw(r,e.node.children,t)})]},e.node.id)),(0,$.jsx)(HC,{value:BC(v)}),(0,$.jsx)(Ew,{message:d?o(`Cannot compute`,`无法计算`):c})]})}function Ww(e){return((e.children??[]).find(e=>e.type===`list`)?.children??[]).filter(e=>e.type===`listItem`).map((e,t)=>({id:`item-${t+1}`,node:e}))}function Gw({node:e,visible:t}){let n=(0,y.useId)(),r=gC(),{runtime:i,mode:a}=r,o=sy(),{write:s,error:c}=nw(e),l=jC(i,e,`label`,o(`Checklist`,`清单`),o),{disabled:u,invalid:d}=rw(e),f=TC(e),p=Ww(e),m=LC(i,e),h=Array.isArray(m)?m.filter(e=>typeof e==`string`):[];if(p.length===0)return(0,$.jsx)(aw,{message:o(`Checklist requires a task list`,`清单需要任务列表`)});let g=e=>e?o(`Checked`,`已勾选`):o(`Unchecked`,`未勾选`);if(a===`static`)return(0,$.jsxs)(`div`,{className:`local-checklist local-static-checklist`,style:WC(UC(e)),role:`group`,"aria-label":l,children:[(0,$.jsx)(`span`,{className:`md-label`,children:l}),(0,$.jsx)(`ul`,{className:`local-static-list`,children:p.map(e=>{let n=h.includes(e.id);return(0,$.jsxs)(`li`,{className:`local-static-list-item`,children:[(0,$.jsx)(`span`,{className:`local-static-state`,children:g(n)}),(0,$.jsx)(`span`,{className:`local-static-item${n?` is-checked`:``}`,children:vw(r,e.node.children,t)})]},e.id)})})]});let _=(e,t)=>{let n=new Set(h);t?n.add(e):n.delete(e),s(p.filter(e=>n.has(e.id)).map(e=>e.id))};return(0,$.jsxs)(`fieldset`,{className:`local-checklist`,style:WC(UC(e)),disabled:u,"aria-invalid":f.invalid||void 0,"aria-describedby":f.describedBy,children:[(0,$.jsx)(`legend`,{className:`md-label`,children:l}),p.map(e=>{let i=h.includes(e.id);return(0,$.jsxs)(`div`,{className:`local-checklist-item`,children:[(0,$.jsx)(`input`,{id:`${n}-${e.id}`,type:`checkbox`,checked:i,onChange:t=>_(e.id,t.target.checked)}),(0,$.jsx)(`label`,{className:`local-checklist-text${i?` is-checked`:``}`,htmlFor:`${n}-${e.id}`,children:vw(r,e.node.children,t)})]},e.id)}),(0,$.jsx)(HC,{block:!0,value:(0,$.jsx)(`ul`,{className:`local-static-list`,children:p.map(e=>{let t=h.includes(e.id);return(0,$.jsxs)(`li`,{className:`local-static-list-item`,children:[(0,$.jsx)(`span`,{className:`local-static-state`,children:g(t)}),(0,$.jsx)(`span`,{className:`local-static-item${t?` is-checked`:``}`,children:Rw(i,e.node.children,o)})]},e.id)})})}),(0,$.jsx)(Ew,{message:d?o(`Cannot compute`,`无法计算`):c})]})}function Kw(e,t=ny){let n=Math.max(0,Math.floor(e)),r=Math.floor(n/60),i=n%60;return r===0?t(`${i} seconds`,`${i} 秒`):`${r}:${String(i).padStart(2,`0`)}`}function qw({node:e}){let{runtime:t,mode:n}=gC(),r=sy(),{write:i,error:a}=nw(e),o=jC(t,e,`label`,r(`Counter`,`计数`),r),{disabled:s,invalid:c}=rw(e),l=TC(e),u=IC(t,e,`min`,0),d=OC(e,`max`)===void 0?void 0:IC(t,e,`max`,0),f=IC(t,e,`step`,1),p=LC(t,e),m=typeof p==`number`&&Number.isFinite(p)?p:u,h=Number.isFinite(f)&&f>0?f:1,g=1e-9*Math.max(1,Math.abs(m)),_=m-h>=u-g,v=d===void 0||m+h<=d+g;if(n===`static`)return(0,$.jsx)(VC,{className:`local-counter`,label:o,value:String(m)});let y=e=>{let t=Number((m+e*h).toFixed(12));i(t)};return(0,$.jsxs)(`div`,{className:`local-counter`,role:`group`,"aria-label":o,"aria-invalid":l.invalid||void 0,"aria-describedby":l.describedBy,children:[(0,$.jsx)(`span`,{className:`md-label`,children:o}),(0,$.jsxs)(`div`,{className:`local-counter-row`,children:[(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-counter-button`,"aria-label":`${o} ${r(`decrease`,`减少`)}`,disabled:s||!_,onClick:()=>y(-1),children:`−`}),(0,$.jsx)(`span`,{className:`local-counter-value`,"aria-live":`polite`,children:m}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-counter-button`,"aria-label":`${o} ${r(`increase`,`增加`)}`,disabled:s||!v,onClick:()=>y(1),children:`+`}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-quiet local-counter-reset`,disabled:s,onClick:()=>{try{t.reset(e)}catch{}},children:r(`Reset`,`恢复初值`)})]}),(0,$.jsx)(HC,{value:String(m)}),(0,$.jsx)(Ew,{message:c?r(`Cannot compute`,`无法计算`):a})]})}function Jw({node:e,visible:t}){let{runtime:n,mode:r}=gC(),i=ay(),a=sy(),o=jC(n,e,`label`,a(`Timer`,`计时器`),a),s=TC(e),c=IC(n,e,`duration`,60),l=Math.floor(c),u=LC(n,e),d=typeof u==`number`&&Number.isFinite(u)?Math.max(0,Math.ceil(u)):l,[f,p]=(0,y.useState)(!1),[m,h]=(0,y.useState)(!1),g=(0,y.useRef)(0),_=(0,y.useRef)(d);_.current=d;let[v,b]=(0,y.useState)(null),x=(0,y.useCallback)(t=>{try{let r=n.set(e,t);r.length&&b(r.map(e=>et(e,i)).join(`; `))}catch{}},[i,e,n]);return(0,y.useEffect)(()=>{if(!f)return;let e=window.setInterval(()=>{let e=Math.max(0,Math.ceil((g.current-performance.now())/1e3));e!==_.current&&(_.current=e,x(e)),e<=0&&(p(!1),h(!0))},200);return()=>window.clearInterval(e)},[f,x]),(0,y.useEffect)(()=>{if(t||!f)return;let e=Math.max(0,Math.ceil((g.current-performance.now())/1e3));_.current=e,x(e),p(!1)},[t,f,x]),iw(n,e,()=>{p(!1),h(!1),b(null)}),!Number.isFinite(c)||l<=0?(0,$.jsx)(aw,{message:a(`Timer duration must be a positive number of seconds`,`计时时长必须是大于 0 的秒数`)}):r===`static`?(0,$.jsx)(VC,{className:`local-timer`,label:o,value:Kw(d,a)}):(0,$.jsxs)(`div`,{className:`local-timer`,role:`group`,"aria-label":o,"aria-invalid":s.invalid||void 0,"aria-describedby":s.describedBy,children:[(0,$.jsxs)(`div`,{className:`local-timer-head`,children:[(0,$.jsx)(`span`,{className:`md-label`,children:o}),(0,$.jsx)(`span`,{className:`local-timer-value`,role:`timer`,"aria-label":a(`${d} seconds remaining`,`剩余 ${d} 秒`),children:Kw(d,a)})]}),(0,$.jsxs)(`div`,{className:`local-timer-controls`,children:[(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-primary`,onClick:()=>{if(f)return;let e=d>0?d:l;d<=0&&(_.current=l,x(l)),g.current=performance.now()+e*1e3,h(!1),b(null),p(!0)},disabled:f,children:a(`Start`,`开始`)}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary`,onClick:()=>{if(!f)return;let e=Math.max(0,Math.ceil((g.current-performance.now())/1e3));_.current=e,x(e),p(!1)},disabled:!f,children:a(`Pause`,`暂停`)}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-quiet`,onClick:()=>{p(!1),h(!1),b(null),_.current=l;try{n.reset(e)}catch{}},children:a(`Reset`,`重置`)})]}),(0,$.jsx)(`span`,{className:`local-timer-status`,role:`status`,"aria-live":`polite`,children:m?a(`Completed`,`计时完成`):f?a(`Running`,`计时中`):a(`Paused`,`已暂停`)}),(0,$.jsx)(HC,{value:Kw(d,a)}),(0,$.jsx)(Ew,{message:v})]})}function Yw({node:e}){let{runtime:t}=gC(),n=sy(),r=jC(t,e,`label`,n(`Progress`,`进度`),n),i=IC(t,e,`max`,100),a=kC(t,e,`value`);if(!Number.isFinite(i)||i<=0)return(0,$.jsx)(aw,{message:n(`Progress maximum must be positive`,`进度上限必须是正数`)});if(!a.present||!a.ok)return(0,$.jsx)(aw,{});let o=a.value,s=typeof o==`number`?o:typeof o==`string`&&o.trim()!==``?Number(o):NaN;if(!Number.isFinite(s))return(0,$.jsx)(aw,{});if(s<0||s>i)return(0,$.jsx)(aw,{message:n(`Progress value must be between 0 and ${i}`,`进度值需要在 0 到 ${i} 之间`)});let c=s/i*100,l=UC(e);return(0,$.jsxs)(`div`,{className:`local-progress`,style:l?{"--local-progress-color":l}:void 0,children:[(0,$.jsxs)(`div`,{className:`local-progress-head`,children:[(0,$.jsx)(`span`,{className:`md-label`,children:r}),(0,$.jsxs)(`span`,{className:`local-progress-value`,children:[Math.round(c),`%`]})]}),(0,$.jsx)(`div`,{className:`local-progress-track`,role:`progressbar`,"aria-label":r||n(`Progress`,`进度`),"aria-valuemin":0,"aria-valuemax":i,"aria-valuenow":s,children:(0,$.jsx)(`div`,{className:`local-progress-fill`,style:{width:`${c}%`}})})]})}function Xw({node:e,visible:t}){let{runtime:n,render:r,mode:i}=gC(),a=sy(),o=jC(n,e,`title`,``,a),s=NC(n,e,`reset`,!0)&&i!==`static`,[c,l]=(0,y.useState)(null);return(0,$.jsxs)(`section`,{className:`local-panel`,"aria-label":o||a(`Parameter panel`,`参数面板`),children:[o||s?(0,$.jsxs)(`div`,{className:`local-panel-head`,children:[o?(0,$.jsx)(`h3`,{className:`local-panel-title`,children:o}):(0,$.jsx)(`span`,{}),s?(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-quiet local-panel-reset`,onClick:()=>{try{n.reset(e),l(null)}catch(e){l(e instanceof Error?e.message:a(`Cannot reset`,`无法恢复默认`))}},"aria-label":o?a(`Reset ${o}`,`${o} 恢复默认`):a(`Reset`,`恢复默认`),children:a(`Reset`,`恢复默认`)}):null]}):null,(0,$.jsx)(`div`,{className:`local-panel-body`,children:r(e.children??[],t)}),(0,$.jsx)(Ew,{message:c})]})}function Zw({node:e,visible:t}){let{runtime:n,render:r}=gC(),i=jC(n,e,`title`,``,sy());return(0,$.jsxs)(`section`,{className:`md-card local-card`,children:[i?(0,$.jsx)(`h3`,{className:`md-card-title`,children:i}):null,(0,$.jsx)(`div`,{className:`md-card-body`,children:r(e.children??[],t)})]})}function Qw({node:e,visible:t}){let{runtime:n,render:r}=gC(),i=Math.min(4,Math.max(1,Math.floor(IC(n,e,`columns`,2))));return(0,$.jsx)(`div`,{className:`local-grid`,style:{"--local-grid-columns":String(i)},children:r(e.children??[],t)})}function $w({node:e,visible:t}){let{render:n}=gC();return(0,$.jsx)(`div`,{className:`local-tabpanel-body`,children:n(e.children??[],t)})}function eT(){return null}function tT({node:e,visible:t}){let n=(0,y.useId)(),{runtime:r,render:i,mode:a}=gC(),o=sy(),{write:s,error:c}=nw(e),l=jC(r,e,`label`,``,o),u=TC(e),d=(e.children??[]).filter(e=>e.type===`component`&&e.name===`tab`),f=d.map((e,t)=>OC(e,`value`)??`tab-${t+1}`),p=d.map((e,t)=>jC(r,e,`label`,f[t],o)),m=OC(e,`initial`)??f[0]??``,h=OC(e,`bind`)!==void 0,g=LC(r,e),_=typeof g==`string`?g:``,[v,b]=(0,y.useState)(()=>f.includes(m)?m:f[0]??``),x=(0,y.useRef)([]);if(iw(r,e,()=>{b(f.includes(m)?m:f[0]??``)}),d.length===0)return(0,$.jsx)(aw,{message:o(`Tabs requires at least one tab`,`标签页至少需要一个 tab`)});if(a===`static`)return(0,$.jsxs)(`section`,{className:`local-tabs local-static-tabs`,"aria-label":l||o(`Tabs`,`选项卡`),children:[l?(0,$.jsx)(`div`,{className:`local-tabs-label`,children:l}):null,d.map((e,n)=>(0,$.jsxs)(`section`,{className:`local-static-tab`,children:[(0,$.jsx)(`h4`,{className:`local-static-tab-label`,children:p[n]}),(0,$.jsx)(`div`,{className:`local-static-tab-body`,children:i(e.children??[],t)})]},e.id))]});let S=h?f.includes(_)?_:f[0]:f.includes(v)?v:f[0],C=Math.max(0,f.indexOf(S)),w=e=>{let t=f[e];t!==void 0&&(h?s(t):b(t),x.current[e]?.focus())};return(0,$.jsxs)(`section`,{className:`local-tabs`,"aria-label":l||o(`Tabs`,`选项卡`),"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,children:[l?(0,$.jsx)(`div`,{className:`local-tabs-label`,children:l}):null,(0,$.jsx)(`div`,{className:`local-tablist`,role:`tablist`,"aria-label":l||o(`Tabs`,`选项卡`),onKeyDown:e=>{let t=-1;e.key===`ArrowRight`?t=(C+1)%d.length:e.key===`ArrowLeft`?t=(C-1+d.length)%d.length:e.key===`Home`?t=0:e.key===`End`&&(t=d.length-1),!(t<0)&&(e.preventDefault(),w(t))},children:d.map((e,t)=>{let r=f[t],i=r===S;return(0,$.jsx)(`button`,{ref:e=>{x.current[t]=e},id:`${n}-tab-${t}`,type:`button`,role:`tab`,className:`local-tab${i?` is-selected`:``}`,"aria-selected":i,"aria-controls":`${n}-panel-${t}`,tabIndex:i?0:-1,onClick:()=>{h?s(r):b(r)},children:p[t]},e.id)})}),d.map((e,r)=>{let a=f[r]===S;return(0,$.jsxs)(`div`,{id:`${n}-panel-${r}`,className:`local-tabpanel`,role:`tabpanel`,"aria-labelledby":`${n}-tab-${r}`,tabIndex:0,hidden:!a,children:[(0,$.jsx)(HC,{block:!0,value:p[r]}),i(e.children??[],t&&a)]},e.id)}),(0,$.jsx)(Ew,{message:c})]})}function nT({node:e,visible:t}){let{runtime:n,render:r}=gC(),i=sy(),a=jC(n,e,`label`,``,i);return(0,$.jsxs)(`div`,{className:`local-accordion`,role:`group`,"aria-label":a||i(`Accordion`,`折叠面板`),children:[a?(0,$.jsx)(`div`,{className:`local-accordion-label`,children:a}):null,r(e.children??[],t)]})}function rT({node:e,visible:t}){let n=(0,y.useId)(),r=gC(),{render:i,mode:a}=r,o=sy(),s=e.children??[],c=s.find(e=>e.type===`summary`),l=s.findIndex(e=>e.type===`paragraph`&&e.children?.length===1&&e.children[0].type===`summary`),u=c??(l>=0?s[l].children[0]:void 0),d=s.filter((e,t)=>e!==u&&t!==l),f=u?(0,$.jsx)(`span`,{...fw(r,u),children:vw(r,u.children,t)}):o(`Details`,`折叠内容`),p=e.attrs!==void 0&&Object.hasOwn(e.attrs,`open`),[m,h]=(0,y.useState)(p);if(iw(r.runtime,e,()=>h(p)),a===`static`)return(0,$.jsxs)(`section`,{className:`local-disclosure local-static-disclosure local-html-details`,...fw(r,e),children:[(0,$.jsx)(`h3`,{className:`local-disclosure-heading`,children:f}),(0,$.jsx)(`div`,{className:`local-disclosure-panel`,children:i(d,t)})]});let g=`${n}-html-details-trigger`,_=`${n}-html-details-panel`;return(0,$.jsxs)(`div`,{className:`local-disclosure local-html-details`,...fw(r,e),children:[(0,$.jsx)(`h3`,{className:`local-disclosure-heading`,children:(0,$.jsxs)(`button`,{id:g,type:`button`,className:`local-disclosure-trigger`,"aria-expanded":m,"aria-controls":_,onClick:()=>h(e=>!e),children:[(0,$.jsx)(`span`,{className:`local-chevron${m?` is-open`:``}`,"aria-hidden":`true`,children:`▸`}),(0,$.jsx)(`span`,{children:f})]})}),(0,$.jsx)(`div`,{id:_,className:`local-disclosure-panel`,role:`region`,"aria-labelledby":g,hidden:!m,children:i(d,t&&m)})]})}function iT({node:e,visible:t}){let n=(0,y.useId)(),{runtime:r,render:i,mode:a}=gC(),o=sy(),s=jC(r,e,`label`,o(`Details`,`折叠内容`),o),c=NC(r,e,`open`,!1),[l,u]=(0,y.useState)(c);if(iw(r,e,()=>{u(c)}),a===`static`)return(0,$.jsxs)(`section`,{className:`local-disclosure local-static-disclosure`,children:[(0,$.jsx)(`h3`,{className:`local-disclosure-heading`,children:s}),(0,$.jsx)(`div`,{className:`local-disclosure-panel`,children:i(e.children??[],t)})]});let d=`${n}-disclosure-trigger`,f=`${n}-disclosure-panel`;return(0,$.jsxs)(`div`,{className:`local-disclosure`,children:[(0,$.jsxs)(`h3`,{className:`local-disclosure-heading`,children:[(0,$.jsxs)(`button`,{id:d,type:`button`,className:`local-disclosure-trigger`,"aria-expanded":l,"aria-controls":f,onClick:()=>u(e=>!e),children:[(0,$.jsx)(`span`,{className:`local-chevron${l?` is-open`:``}`,"aria-hidden":`true`,children:`▸`}),(0,$.jsx)(`span`,{children:s})]}),(0,$.jsx)(HC,{value:s})]}),(0,$.jsx)(`div`,{id:f,className:`local-disclosure-panel`,role:`region`,"aria-labelledby":d,hidden:!l,children:i(e.children??[],t&&l)})]})}function aT({node:e,visible:t}){let{runtime:n,render:r}=gC(),i=sy(),a=MC(n,e,`when`,!1),o=a.ok?a.value:!1,s=!a.ok,c=(0,y.useRef)(null),l=(0,y.useRef)(o),u=(0,y.useRef)(!1);return(0,y.useEffect)(()=>{if(l.current&&!o){if(u.current){let e=c.current?.closest(`.local-document`);e&&(e.tabIndex=-1,e.focus({preventScroll:!0}))}u.current=!1}l.current=o},[o]),(0,$.jsxs)($.Fragment,{children:[s?(0,$.jsx)(aw,{}):null,(0,$.jsx)(`div`,{ref:c,className:`local-if md-if`,role:`group`,"aria-label":i(`Conditional content`,`条件内容`),tabIndex:-1,hidden:!o,"aria-hidden":!o,onFocus:()=>{u.current=!0},onBlur:e=>{c.current?.contains(e.relatedTarget)||(u.current=!1)},children:r(e.children??[],t&&o)})]})}function oT(){let e=sy();return(0,$.jsx)(`span`,{className:`local-error local-tone-error`,role:`status`,children:e(`Invalid tone; using the default style`,`色调无效,已使用默认样式`)})}function sT({node:e,visible:t}){let{runtime:n,render:r}=gC(),i=jC(n,e,`title`,``,sy()),{tone:a,error:o}=PC(n,e,`tone`,[`info`,`success`,`warning`],`info`),s=a===`warning`?`alert`:`status`;return(0,$.jsxs)($.Fragment,{children:[o?(0,$.jsx)(oT,{}):null,(0,$.jsxs)(`div`,{className:`local-alert local-alert-${a}`,role:s,children:[i?(0,$.jsx)(`div`,{className:`local-alert-title`,children:i}):null,(0,$.jsx)(`div`,{className:`local-alert-body`,children:r(e.children??[],t)})]})]})}function cT({node:e,visible:t}){let n=gC(),{runtime:r}=n,{tone:i,error:a}=PC(r,e,`tone`,[`neutral`,`success`,`warning`],`neutral`),o=UC(e);return(0,$.jsxs)($.Fragment,{children:[a?(0,$.jsx)(oT,{}):null,(0,$.jsx)(`span`,{className:`md-badge md-badge-${i} local-badge`,style:o?{color:o}:void 0,children:vw(n,e.children,t)})]})}function lT({node:e,visible:t}){let n=(0,y.useId)(),r=gC(),{runtime:i,mode:a}=r,o=sy(),s=jC(i,e,`text`,o(`Tooltip`,`提示`),o),[c,l]=(0,y.useState)(!1),u=`${n}-tooltip`;return a===`static`?(0,$.jsxs)(`span`,{className:`local-tooltip local-static-tooltip`,children:[(0,$.jsx)(`span`,{className:`local-tooltip-trigger`,children:vw(r,e.children,t)}),(0,$.jsx)(`span`,{className:`local-tooltip-bubble is-visible`,role:`note`,children:s})]}):(0,$.jsxs)(`span`,{className:`local-tooltip`,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[(0,$.jsx)(`span`,{className:`local-tooltip-trigger`,tabIndex:0,"aria-describedby":u,onFocus:()=>l(!0),onBlur:()=>l(!1),onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),l(!1))},children:vw(r,e.children,t)}),(0,$.jsx)(`span`,{id:u,role:`tooltip`,className:`local-tooltip-bubble${c?` is-visible`:``}`,children:s}),(0,$.jsx)(HC,{value:s})]})}function uT({node:e,visible:t}){let n=(0,y.useId)(),r=gC(),{anchors:i,rootRef:a,runtime:o,urlPolicy:s,mode:c}=r,l=sy(),u=`${n}-jump-feedback`,[d,f]=(0,y.useState)(null),p=OC(e,`to`)??``,m=i.targetId(p),h=OC(e,`appearance`)===`button`?`button`:`link`,g=UC(e),_=m?`#${m}`:`#`,v=m!==void 0;if(v&&s)try{v=s(`#${p}`,`link`)===!0}catch{v=!1}return iw(o,e,()=>f(null)),c===`static`?v&&m?(0,$.jsx)(`a`,{href:`#${m}`,className:`local-jump local-jump-link local-jump-static`,style:WC(g),children:vw(r,e.children,t)}):(0,$.jsx)(`span`,{className:`local-jump local-jump-static-blocked`,style:WC(g),children:vw(r,e.children,t)}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`a`,{href:v?_:`#`,className:`local-jump local-jump-${h}`,style:WC(g),"data-local-target-missing":m?void 0:`true`,"data-local-jump-blocked":m&&!v?`true`:void 0,"aria-describedby":d?u:void 0,onClick:e=>{if(!v||!m){e.preventDefault(),f(m?l(`Jump is blocked by the host`,`跳转已被主机策略阻止`):l(`Jump target not found`,`找不到跳转目标`));return}let t=a.current;if(!t||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let n=null;try{n=t.querySelector(`[id="${m}"]`)}catch{n=null}if(!n){e.preventDefault(),f(l(`Jump target not found`,`找不到跳转目标`));return}if(n.closest(`[hidden]`)){e.preventDefault(),f(l(`Jump target is hidden`,`跳转目标当前隐藏`));return}e.preventDefault(),n.hasAttribute(`tabindex`)||(n.tabIndex=-1);try{n.focus({preventScroll:!0})}catch{}let r=`smooth`;try{window.matchMedia(`(prefers-reduced-motion: reduce)`).matches&&(r=`auto`)}catch{r=`auto`}try{n.scrollIntoView({behavior:r,block:`start`})}catch{}f(null)},children:vw(r,e.children,t)}),d?(0,$.jsx)(`span`,{id:u,className:`local-jump-feedback`,role:`status`,"aria-live":`polite`,children:d}):null]})}function dT({node:e}){let{anchors:t}=gC(),n=t.anchorIds.get(e);return n?(0,$.jsx)(`span`,{className:`local-anchor`,id:n,"data-local-anchor":``}):null}function fT({node:e,visible:t}){let n=gC(),r=UC(e);return(0,$.jsx)(`span`,{className:`local-text`,style:r?{color:r}:void 0,children:vw(n,e.children,t)})}function pT({node:e,visible:t}){let{render:n}=gC(),r=UC(e);return(0,$.jsx)(`div`,{className:`local-section`,style:r?{color:r}:void 0,children:n(e.children??[],t)})}function mT({node:e,visible:t}){let n=(0,y.useId)(),r=gC(),{runtime:i,mode:a}=r,o=sy(),{write:s,error:c,setError:l}=nw(e),u=jC(i,e,`label`,o(`Multi select`,`多选`),o),{disabled:d,invalid:f}=rw(e),p=TC(e),m=Lw(e),h=LC(i,e),g=Array.isArray(h)?h.filter(e=>typeof e==`string`):[],_=m.filter(e=>g.includes(e.value)).map(e=>zw(i,e.node,o)||e.value),v=IC(i,e,`max-selected`,m.length),b=Number.isFinite(v)?Math.max(0,Math.floor(v)):m.length,[x,S]=(0,y.useState)(``);if(iw(i,e,()=>{S(``),l(null)}),m.length===0)return(0,$.jsx)(aw,{message:o(`Missing options`,`缺少选项`)});if(a===`static`)return(0,$.jsx)(VC,{className:`local-multi-select`,label:u,value:BC(_.join(`, `))});let C=new Set(g),w=g.length>=b,T=x.trim().toLocaleLowerCase(),E=T?m.filter(e=>`${Rw(i,e.node.children,o)} ${e.value}`.toLocaleLowerCase().includes(T)):m,D=(e,t)=>{let n=new Set(C);if(t){if(!n.has(e)&&n.size>=b)return;n.add(e)}else n.delete(e);s(m.filter(e=>n.has(e.value)).map(e=>e.value))};return(0,$.jsxs)(`fieldset`,{className:`local-multi-select`,style:WC(UC(e)),disabled:d,"aria-invalid":p.invalid||void 0,"aria-describedby":p.describedBy,children:[(0,$.jsx)(`legend`,{className:`md-label`,children:u}),(0,$.jsxs)(`div`,{className:`local-multi-toolbar`,children:[(0,$.jsx)(`input`,{id:`${n}-multi-search`,type:`search`,className:`md-text-input local-multi-search`,value:x,placeholder:o(`Search options`,`搜索选项`),"aria-label":o(`Search ${u}`,`搜索${u}`),onChange:e=>S(e.target.value)}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-quiet local-multi-clear`,onClick:()=>{S(``),g.length>0&&s([])},children:o(`Clear`,`清除`)})]}),(0,$.jsx)(`div`,{className:`local-multi-list`,role:`group`,"aria-label":u,children:E.length===0?(0,$.jsx)(`span`,{className:`local-multi-empty`,children:o(`No matching options`,`没有匹配选项`)}):E.map(e=>{let n=C.has(e.value);return(0,$.jsxs)(`label`,{className:`local-multi-option${n?` is-selected`:``}`,children:[(0,$.jsx)(`input`,{type:`checkbox`,checked:n,disabled:!n&&w,onChange:t=>D(e.value,t.target.checked)}),(0,$.jsx)(`span`,{children:vw(r,e.node.children,t)})]},e.node.id)})}),(0,$.jsx)(`span`,{className:`local-multi-count`,role:`status`,"aria-live":`polite`,children:o(`${g.length} of ${b} selected`,`已选 ${g.length}/${b}`)}),(0,$.jsx)(HC,{value:BC(_.join(`, `))}),(0,$.jsx)(Ew,{message:f?o(`Cannot compute`,`无法计算`):c})]})}function hT({node:e}){let{runtime:t,mode:n}=gC(),r=sy(),{write:i,error:a,setError:o}=nw(e),s=jC(t,e,`label`,r(`Range`,`范围`),r),{disabled:c,invalid:l}=rw(e),u=TC(e),{min:d,max:f,step:p}=tw(t,e,`min`,`max`,0,100,1),m=Math.floor((f-d)/p+1e-9),h=d,g=QC(d+Math.max(0,m)*p,d,f),_=$C(ew(t,e,`start`,h),d,f,p),v=$C(ew(t,e,`end`,g),d,f,p);_>v&&(_=v);let[b,x]=(0,y.useState)(null);iw(t,e,()=>{x(null),o(null)});let S=r(`Start`,`起点`),C=r(`End`,`终点`),w=`${S}: ${_} · ${C}: ${v}`;if(n===`static`)return(0,$.jsx)(VC,{className:`local-range-slider`,label:s,value:w});let T=(e,t)=>{let n=$C(QC(t,d,f),d,f,p);e===`start`&&n>v?x(r(`Start cannot exceed end`,`起点不能超过终点`)):e===`end`&&n<_?x(r(`End cannot be less than start`,`终点不能小于起点`)):(x(null),i(n,e))};return(0,$.jsxs)(`div`,{className:`md-control local-range-slider`,style:WC(UC(e)),role:`group`,"aria-label":s,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,children:[(0,$.jsx)(`span`,{className:`md-label`,children:s}),(0,$.jsxs)(`div`,{className:`local-range-row`,children:[(0,$.jsx)(`span`,{className:`local-range-name`,children:r(`Start`,`起点`)}),(0,$.jsx)(`input`,{type:`range`,className:`local-range-input`,min:d,max:v,step:p,value:_,disabled:c,"aria-label":`${s} ${r(`Start`,`起点`)}`,onChange:e=>T(`start`,Number(e.target.value))}),(0,$.jsx)(`span`,{className:`local-range-value`,"aria-hidden":`true`,children:_})]}),(0,$.jsxs)(`div`,{className:`local-range-row`,children:[(0,$.jsx)(`span`,{className:`local-range-name`,children:r(`End`,`终点`)}),(0,$.jsx)(`input`,{type:`range`,className:`local-range-input`,min:_,max:f,step:p,value:v,disabled:c,"aria-label":`${s} ${r(`End`,`终点`)}`,onChange:e=>T(`end`,Number(e.target.value))}),(0,$.jsx)(`span`,{className:`local-range-value`,"aria-hidden":`true`,children:v})]}),(0,$.jsx)(HC,{value:w}),(0,$.jsx)(Ew,{message:l?r(`Cannot compute`,`无法计算`):b??a})]})}function gT({id:e,label:t,value:n,min:r,max:i,step:a,disabled:o,onCommit:s,reset:c}){let[l,u]=(0,y.useState)(()=>String(n)),[d,f]=(0,y.useState)(!1),p=(0,y.useRef)(n);(0,y.useEffect)(()=>{u(String(n)),f(!1)},[c]),(0,y.useEffect)(()=>{p.current!==n&&(p.current=n,d||u(String(n)))},[n,d]);let m=e=>{let t=e.trim();if(t===``||t===`-`||t===`.`||t===`-.`)return null;let n=Number(t);return Number.isFinite(n)?$C(QC(n,r,i),r,i,a):null};return(0,$.jsxs)(`div`,{className:`local-number-field`,children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:e,children:t}),(0,$.jsx)(`input`,{id:e,className:`md-text-input`,type:`text`,inputMode:`decimal`,value:l,disabled:o,onFocus:()=>f(!0),onBlur:()=>{f(!1);let e=m(l);u(String(e??n))},onChange:e=>{let t=e.target.value;u(t);let n=m(t);n!==null&&s(n)}})]})}function _T({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=gC(),i=sy(),{write:a,writeMany:o,error:s,setError:c}=nw(e),l=jC(n,e,`label`,i(`Coordinate`,`坐标`),i),{disabled:u,invalid:d}=rw(e),f=TC(e),p=tw(n,e,`x-min`,`x-max`,-5,5,1),m=tw(n,e,`y-min`,`y-max`,-5,5,1),h=$C(0,p.min,p.max,p.step),g=$C(0,m.min,m.max,m.step),_=$C(ew(n,e,`x`,h),p.min,p.max,p.step),v=$C(ew(n,e,`y`,g),m.min,m.max,m.step),b=(0,y.useRef)(null),x=(0,y.useRef)(!1);iw(n,e,()=>c(null));let S=`X: ${_} · Y: ${v}`;if(r===`static`)return(0,$.jsx)(VC,{className:`local-coordinate`,label:l,value:S});let C=e=>p.max>p.min?40+(e-p.min)/(p.max-p.min)*320:200,w=e=>m.max>m.min?360-(e-m.min)/(m.max-m.min)*320:200,T=C(_),E=w(v),D=C(QC(0,p.min,p.max)),O=w(QC(0,m.min,m.max)),k=e=>{let t=e.step*Math.max(1,Math.ceil((e.max-e.min)/(e.step*10))),n=Math.min(11,Math.floor((e.max-e.min)/t)+1);return Array.from({length:n},(n,r)=>e.min+r*t)},A=e=>{let t=b.current?.getBoundingClientRect();if(!t||t.width===0||t.height===0)return null;let n=QC(((e.clientX-t.left)/t.width-.1)/.8,0,1),r=QC(((e.clientY-t.top)/t.height-.1)/.8,0,1);return{x:$C(p.min+n*(p.max-p.min),p.min,p.max,p.step),y:$C(m.min+(1-r)*(m.max-m.min),m.min,m.max,m.step)}},j=(e,t)=>{(e!==_||t!==v)&&o({x:e,y:t})};return(0,$.jsxs)(`div`,{className:`local-coordinate`,style:WC(UC(e)),role:`group`,"aria-label":l,"aria-invalid":f.invalid||void 0,"aria-describedby":f.describedBy,children:[(0,$.jsx)(`span`,{className:`md-label`,children:l}),(0,$.jsxs)(`div`,{className:`local-coordinate-surface`,children:[(0,$.jsx)(`div`,{ref:b,className:`local-coordinate-pad`,role:`group`,"aria-label":i(`${l} drag area`,`${l} 拖拽区`),"aria-disabled":u||void 0,tabIndex:u?-1:0,onKeyDown:e=>{if(u)return;let t=_,n=v;switch(e.key){case`ArrowLeft`:t=$C(_-p.step,p.min,p.max,p.step);break;case`ArrowRight`:t=$C(_+p.step,p.min,p.max,p.step);break;case`ArrowDown`:n=$C(v-m.step,m.min,m.max,m.step);break;case`ArrowUp`:n=$C(v+m.step,m.min,m.max,m.step);break;case`Home`:t=p.min,n=m.min;break;case`End`:t=$C(p.max,p.min,p.max,p.step),n=$C(m.max,m.min,m.max,m.step);break;default:return}e.preventDefault(),j(t,n)},onPointerDown:e=>{if(u)return;e.preventDefault(),x.current=!0,b.current?.focus({preventScroll:!0});try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}let t=A(e);t&&j(t.x,t.y)},onPointerMove:e=>{if(!x.current||u)return;let t=A(e);t&&j(t.x,t.y)},onPointerUp:e=>{x.current=!1;try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}},onPointerCancel:()=>{x.current=!1},children:(0,$.jsxs)(`svg`,{className:`local-coordinate-svg`,viewBox:`0 0 400 400`,"aria-hidden":`true`,focusable:`false`,children:[(0,$.jsx)(`defs`,{children:(0,$.jsx)(`marker`,{id:`${t}-coordinate-arrow`,markerWidth:`8`,markerHeight:`8`,refX:`6`,refY:`4`,orient:`auto`,viewBox:`0 0 8 8`,children:(0,$.jsx)(`path`,{className:`local-coordinate-arrow`,d:`M1 1 L6 4 L1 7`})})}),(0,$.jsxs)(`g`,{className:`local-coordinate-grid`,children:[(0,$.jsx)(`rect`,{x:`40`,y:`40`,width:`320`,height:`320`}),k(p).map((e,t)=>(0,$.jsx)(`line`,{x1:C(e),y1:`40`,x2:C(e),y2:`360`},`x-${t}`)),k(m).map((e,t)=>(0,$.jsx)(`line`,{x1:`40`,y1:w(e),x2:`360`,y2:w(e)},`y-${t}`))]}),(0,$.jsxs)(`g`,{className:`local-coordinate-axes`,children:[(0,$.jsx)(`line`,{className:`local-coordinate-horizontal`,x1:`26`,y1:O,x2:`372`,y2:O,markerEnd:`url(#${t}-coordinate-arrow)`}),(0,$.jsx)(`line`,{className:`local-coordinate-vertical`,x1:D,y1:`374`,x2:D,y2:`24`,markerEnd:`url(#${t}-coordinate-arrow)`})]}),(0,$.jsxs)(`g`,{className:`local-coordinate-axis-label`,children:[(0,$.jsx)(`text`,{x:`358`,y:O-14,children:`x`}),(0,$.jsx)(`text`,{x:D+12,y:`40`,children:`y`})]}),(0,$.jsxs)(`g`,{className:`local-coordinate-projection`,children:[(0,$.jsx)(`line`,{x1:T,y1:E,x2:T,y2:O}),(0,$.jsx)(`line`,{x1:T,y1:E,x2:D,y2:E})]}),(0,$.jsx)(`circle`,{className:`local-coordinate-dot`,cx:T,cy:E,r:`10`}),(0,$.jsx)(`text`,{className:`local-coordinate-value`,x:T,y:E>330?E-22:E+30,textAnchor:T<80?`start`:T>320?`end`:`middle`,children:`(${_}, ${v})`})]})}),(0,$.jsx)(`span`,{className:`local-coordinate-caption`,children:i(`Draggable coordinate plane`,`可拖动的坐标平面`)})]}),(0,$.jsx)(`span`,{className:`md-hint local-hint`,children:i(`Arrow keys adjust the point; Home and End jump to the lower or upper bounds.`,`方向键调整坐标;Home 和 End 跳到最小或最大边界。`)}),(0,$.jsxs)(`div`,{className:`local-coordinate-fields`,children:[(0,$.jsx)(gT,{id:`${t}-coordinate-x`,reset:n.resetToken(e),label:`${l} X`,value:_,min:p.min,max:p.max,step:p.step,disabled:u,onCommit:e=>a(e,`x`)}),(0,$.jsx)(gT,{id:`${t}-coordinate-y`,reset:n.resetToken(e),label:`${l} Y`,value:v,min:m.min,max:m.max,step:m.step,disabled:u,onCommit:e=>a(e,`y`)})]}),(0,$.jsx)(HC,{value:S}),(0,$.jsx)(Ew,{message:d?i(`Cannot compute`,`无法计算`):s})]})}function vT({node:e,visible:t}){let n=(0,y.useId)(),r=gC(),{runtime:i,mode:a}=r,o=sy(),s=jC(i,e,`label`,o(`Quiz`,`测验`),o),c=OC(e,`type`)===`number`?`number`:`choice`,l=(OC(e,`answer`)??``).trim(),u=IC(i,e,`tolerance`,0),d=Number.isFinite(u)&&u>=0?u:0,{disabled:f,invalid:p}=rw(e),m=Lw(e),h=jC(i,e,`explanation`,``,o),[g,_]=(0,y.useState)(``),[v,b]=(0,y.useState)(null);iw(i,e,()=>{_(``),b(null)});let x=c===`number`?Number(l):NaN;if(c===`number`&&!Number.isFinite(x))return(0,$.jsx)(aw,{message:o(`Quiz answer must be a number`,`测验答案必须是数字`)});if(c===`choice`&&m.length===0)return(0,$.jsx)(aw,{message:o(`Missing options`,`缺少选项`)});let S=m.map(e=>zw(i,e.node,o)||e.value);if(a===`static`)return(0,$.jsxs)(`div`,{className:`local-quiz local-static-quiz`,role:`group`,"aria-label":s,children:[(0,$.jsx)(`span`,{className:`md-label`,children:s}),c===`choice`?(0,$.jsx)(`ul`,{className:`local-static-list local-static-quiz-options`,children:m.map(e=>(0,$.jsx)(`li`,{className:`local-static-list-item`,children:vw(r,e.node.children,t)},e.node.id))}):(0,$.jsx)(`span`,{className:`local-static-value`,children:o(`Numeric answer`,`数字作答`)})]});let C=()=>{if(c===`choice`){if(g===``){b(`incomplete`);return}b(g===l?`correct`:`incorrect`);return}let e=g.trim(),t=e===``?NaN:Number(e);b(Number.isFinite(t)?Math.abs(t-x)<=d?`correct`:`incorrect`:`incomplete`)},w=()=>{_(``),b(null)},T=v===null?null:v===`correct`?`${o(`Correct`,`回答正确`)}`:v===`incorrect`?`${o(`Not quite`,`回答不正确`)}`:c===`number`?o(`Enter a number first`,`请先输入数字`):o(`Choose an answer first`,`请先选择答案`),E=v===`correct`?` is-correct`:v===`incorrect`?` is-incorrect`:``;return(0,$.jsxs)(`div`,{className:`local-quiz`,role:`group`,"aria-label":s,children:[c===`choice`?(0,$.jsxs)(`fieldset`,{className:`local-quiz-options`,disabled:f,children:[(0,$.jsx)(`legend`,{className:`md-label`,children:s}),m.map(e=>(0,$.jsxs)(`label`,{className:`local-radio-option`,children:[(0,$.jsx)(`input`,{type:`radio`,name:`${n}-quiz`,value:e.value,checked:g===e.value,onChange:()=>{_(e.value),b(null)}}),(0,$.jsx)(`span`,{children:vw(r,e.node.children,t)})]},e.node.id))]}):(0,$.jsxs)(`div`,{className:`local-quiz-number`,children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:`${n}-quiz`,children:s}),(0,$.jsx)(`input`,{id:`${n}-quiz`,className:`md-text-input local-quiz-input`,type:`text`,inputMode:`decimal`,value:g,disabled:f,"aria-label":s,onChange:e=>{_(e.target.value),b(null)}})]}),(0,$.jsxs)(`div`,{className:`local-quiz-actions`,children:[(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-primary local-quiz-check`,disabled:f,onClick:C,children:o(`Check answer`,`检查答案`)}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-quiz-again`,disabled:f,onClick:w,children:o(`Try again`,`再试一次`)})]}),(0,$.jsx)(`span`,{className:`local-quiz-feedback${E}`,role:`status`,"aria-live":`polite`,children:T?`${v===`correct`?`✓ `:v===`incorrect`?`✗ `:``}${T}`:``}),v!==null&&h?(0,$.jsx)(`div`,{className:`local-quiz-explanation`,children:h}):null,(0,$.jsx)(HC,{block:!0,value:c===`choice`?`${T?`${T} · `:``}${S.join(` · `)}`:T||o(`No answer yet`,`尚未作答`)}),(0,$.jsx)(Ew,{message:p?o(`Cannot compute`,`无法计算`):null})]})}function yT({node:e,visible:t}){let n=(0,y.useId)(),{runtime:r,render:i,mode:a}=gC(),o=sy(),{write:s,error:c,setError:l}=nw(e),u=jC(r,e,`label`,``,o),d=TC(e),f=(e.children??[]).filter(e=>e.type===`component`&&e.name===`step`),p=f.map((e,t)=>OC(e,`value`)??`step-${t+1}`),m=f.map((e,t)=>jC(r,e,`label`,p[t],o)),h=OC(e,`initial`)??``,g=p.includes(h)?h:p[0]??``,_=LC(r,e),v=typeof _==`string`?_:``,b=(0,y.useRef)([]),x=(0,y.useRef)(!1);iw(r,e,()=>{l(null),x.current=!1});let S=p.includes(v)?v:g,C=Math.max(0,p.indexOf(S));if((0,y.useEffect)(()=>{x.current&&(x.current=!1,b.current[C]?.focus({preventScroll:!0}))},[C,S]),f.length===0)return(0,$.jsx)(aw,{message:o(`Steps requires at least one step`,`步骤至少需要一个 step`)});if(a===`static`){let e=f[C];return(0,$.jsxs)(`section`,{className:`local-steps local-static-steps`,"aria-label":u||o(`Steps`,`步骤`),children:[u?(0,$.jsx)(`div`,{className:`local-steps-label`,children:u}):null,(0,$.jsx)(`div`,{className:`local-steps-nav local-static-steps-nav`,children:(0,$.jsx)(`span`,{className:`local-steps-status`,role:`status`,"aria-live":`polite`,children:o(`Step ${C+1} of ${f.length}`,`第 ${C+1} 步,共 ${f.length} 步`)})}),(0,$.jsx)(`div`,{className:`local-steps-panel`,role:`group`,"aria-label":m[C],children:i(e.children??[],t)})]})}let w=e=>{let t=p[e];t!==void 0&&(x.current=!0,s(t))};return(0,$.jsxs)(`section`,{className:`local-steps`,"aria-label":u||o(`Steps`,`步骤`),"aria-invalid":d.invalid||void 0,"aria-describedby":d.describedBy,children:[u?(0,$.jsx)(`div`,{className:`local-steps-label`,children:u}):null,(0,$.jsxs)(`div`,{className:`local-steps-nav`,children:[(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-steps-prev`,disabled:C<=0,onClick:()=>w(C-1),children:o(`Previous`,`上一步`)}),(0,$.jsx)(`span`,{className:`local-steps-status`,role:`status`,"aria-live":`polite`,children:o(`Step ${C+1} of ${f.length}`,`第 ${C+1} 步,共 ${f.length} 步`)}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-steps-next`,disabled:C>=f.length-1,onClick:()=>w(C+1),children:o(`Next`,`下一步`)})]}),f.map((e,r)=>{let a=r===C;return(0,$.jsx)(`div`,{id:`${n}-step-${r}`,ref:e=>{b.current[r]=e},className:`local-steps-panel`,role:`group`,"aria-label":m[r],tabIndex:-1,hidden:!a,children:i(e.children??[],t&&a)},e.id)}),(0,$.jsx)(Ew,{message:c})]})}function bT(){return null}var xT={panel:Xw,card:Zw,grid:Qw,tabs:tT,tab:$w,accordion:nT,disclosure:iT,if:aT,alert:sT,badge:cT,validation:ww,column:Tw,tooltip:lT,input:Ow,textarea:kw,number:Mw,slider:Nw,toggle:Pw,checkbox:Fw,date:Iw,select:Vw,choices:Hw,"radio-group":Uw,option:Bw,node:$w,edge:eT,counter:qw,timer:Jw,checklist:Gw,progress:Yw,jump:uT,anchor:dT,text:fT,section:pT,"multi-select":mT,"range-slider":hT,coordinate:_T,quiz:vT,steps:yT,step:bT};function ST(e,t){let n=t.definition.children;return n&&n.length>0?hw(e,n,!0):typeof t.definition.value==`string`&&t.definition.value!==``?(0,$.jsx)(`p`,{children:t.definition.value}):null}function CT({entries:e,env:t,t:n,titleId:r}){return(0,$.jsxs)(`section`,{className:`local-footnotes`,role:`doc-endnotes`,"aria-labelledby":r,"data-local-footnotes":``,children:[(0,$.jsx)(`h2`,{id:r,className:`local-footnotes-title`,children:n(`Footnotes`,`脚注`)}),(0,$.jsx)(`ol`,{className:`local-footnotes-list`,children:e.map(e=>{let r=e.references.length>1;return(0,$.jsxs)(`li`,{id:e.id,className:`local-footnote`,"data-local-footnote-number":e.number,children:[(0,$.jsx)(`div`,{className:`local-footnote-body`,children:ST(t,e)}),(0,$.jsx)(`span`,{className:`local-footnote-backlinks`,children:e.references.map((t,i)=>(0,$.jsx)(`a`,{href:`#${t.id}`,className:`local-footnote-backlink`,role:`doc-backlink`,"aria-label":r?n(`Back to reference ${e.number} (${i+1} of ${e.references.length})`,`返回脚注 ${e.number} 的第 ${i+1} 处引用`):n(`Back to reference ${e.number}`,`返回脚注 ${e.number}`),children:`↩`},t.id))})]},e.id)})})]})}function wT({document:e,mode:t=`interactive`,staticFirst:n=!1,locale:r=`en`,onDiagnostics:i}){let[a,o]=(0,y.useState)(!n);(0,y.useEffect)(()=>{n&&o(!0)},[n]);let s=t===`interactive`&&n&&!a?`static`:t,c=e.html?.enableCss===!0,l=s===`interactive`&&e.html?.enableJavaScript===!0,u=e.html?.enableExtendedHtml===!0,d=(0,y.useMemo)(()=>({enableCss:c,enableJavaScript:l,enableExtendedHtml:u}),[c,l,u]),f=(0,y.useMemo)(()=>qg(e.source,d,Math.max(C,e.source.length*2+10)),[e.source,d]),p=(0,y.useRef)(i);return p.current=i,(0,y.useEffect)(()=>{p.current?.(f.diagnostics)},[f]),f.diagnostics.some(e=>e.severity===`error`)?(0,$.jsx)(`div`,{className:`md-document local-document local-inactive`,role:`alert`,children:oy(r,`HTML rendering failed.`,`HTML 渲染失败。`)}):(0,$.jsx)(`article`,{className:`md-document local-document reactive-md-native-document${s===`static`?` local-static`:``}`,"data-source-mode":`html`,"data-render-mode":s,children:(0,$.jsx)(`iframe`,{className:`reactive-md-native-frame`,title:oy(r,`HTML document`,`HTML 文档`),sandbox:Fg(d),referrerPolicy:`no-referrer`,srcDoc:f.markup,style:{display:`block`,width:`100%`,minHeight:`60vh`,border:0,background:`#fff`,colorScheme:`light`}},`${Number(c)}${Number(l)}${Number(u)}:${e.source}`)})}function TT(e){return e.document.html?(0,$.jsx)(wT,{...e}):(0,$.jsx)(ET,{...e})}function ET({document:e,runtime:t,onDiagnostics:n,urlPolicy:r,locale:i=`en`,themes:a,colorScheme:o=`auto`,mode:s=`interactive`,staticFirst:c=!1,imageResolver:l}){let[u,d]=(0,y.useState)(!c);(0,y.useEffect)(()=>{c&&d(!0)},[c]);let f=s===`interactive`&&c&&!u?`static`:s,p=(0,y.useId)(),m=(0,y.useMemo)(()=>(e,t)=>oy(i,e,t),[i]),h=(0,y.useMemo)(()=>ir(e,`local-heading-${p}`),[e,p]),g=(0,y.useMemo)(()=>Th(e,p),[e,p]),_=(0,y.useMemo)(()=>{try{return Un(e)}catch{return Ln}},[e]),v=(0,y.useRef)(n);v.current=n;let b=(0,y.useRef)(null),x=(0,y.useCallback)(e=>{v.current?.(e)},[]),S=KC(a),C=(0,y.useMemo)(()=>{try{return gh(e.theme,a,e.themeRange,e.source)}catch{return{name:lh.name,diagnostics:[]}}},[e.theme,e.themeRange?.start,e.themeRange?.end,e.source,S]),w=ZC(b,o),T=(0,y.useRef)(``);(0,y.useEffect)(()=>{let e=qC(C.diagnostics);if(e===T.current)return;let t=T.current!==``;T.current=e,(C.diagnostics.length>0||t)&&x(C.diagnostics)},[C,x]);let E=(0,y.useCallback)(e=>{try{return t.subscribe(e)}catch{return()=>{}}},[t]),D=(0,y.useCallback)(()=>{try{return t.snapshot()}catch{return DC}},[t]);(0,y.useSyncExternalStore)(E,D,D);let O=``;if(e.validations?.length)try{O=qC(t.validate())}catch{O=`unavailable`}let k=(0,y.useMemo)(()=>wC(e,t,p,m),[e,t,p,m,O]),A=(0,y.useMemo)(()=>({runtime:t,rootRef:b,urlPolicy:r,imageResolver:l,anchors:h,t:m,mode:f,dependencies:_,footnotes:g}),[t,b,r,l,h,m,f,_,g]),j=(0,y.useCallback)((e,t=!0)=>hw(A,e??[],t),[A]),M=(0,y.useMemo)(()=>({runtime:t,render:j,visible:!0,mode:f,imageResolver:l,validation:k,report:x,urlPolicy:r,anchors:h,rootRef:b,t:m,dependencies:_,footnotes:g}),[t,j,x,r,l,f,h,b,m,k,_,g]);return(0,$.jsx)(iy,{locale:i,children:(0,$.jsx)(`article`,{ref:b,className:`md-document local-document${f===`static`?` local-static`:``}`,"data-rmd-theme":C.name,"data-color-scheme":w,"data-render-mode":f,style:{colorScheme:w},"aria-label":f===`static`?m(`Static document`,`静态文档`):m(`Interactive document`,`交互文档`),children:(0,$.jsxs)(hC.Provider,{value:M,children:[j(e.nodes,!0),g.entries.length>0?(0,$.jsx)(CT,{entries:g.entries,env:A,t:m,titleId:`${p}-footnotes-title`}):null]})})})}var DT=`reactive-md-state/v1`,OT=1048576,kT=/^fnv1a32:[0-9a-f]{8}$/,AT=2166136261,jT=16777619,MT=new Set([`format`,`syntax`,`sourceDigest`,`parameters`,`generator`]),NT=new Set([`name`,`version`]),PT=new TextEncoder;function FT(e,t){return{code:e,message:t.length>2e3?`${t.slice(0,D-1)}…`:t,severity:`error`,range:{start:0,end:0},line:1,column:1}}function IT(e,t,n){e.length<100&&e.push(FT(t,n))}function LT(e){return e instanceof Error?e.message:String(e)}function RT(e){for(let t=0;t<e.length;t+=1){let n=e.charCodeAt(t);if(n>=55296&&n<=56319){let n=e.charCodeAt(t+1);if(n>=56320&&n<=57343){t+=1;continue}return!1}if(n>=56320&&n<=57343)return!1}return!0}function zT(e){if(typeof e!=`string`)throw TypeError(`localSourceDigest requires a source string.`);let t=PT.encode(e),n=AT;for(let e=0;e<t.length;e+=1)n^=t[e],n=Math.imul(n,jT)>>>0;return`fnv1a32:${n.toString(16).padStart(8,`0`)}`}function BT(e){if(typeof e==`string`)return RT(e)?{ok:!0,value:e}:{ok:!1,message:`contains malformed Unicode.`};if(typeof e==`number`)return Number.isFinite(e)?{ok:!0,value:e}:{ok:!1,message:`must be a finite number.`};if(typeof e==`boolean`||e===null)return{ok:!0,value:e};if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n+=1){let r=e[n];if(typeof r!=`string`)return{ok:!1,message:`must be an array of strings.`};if(!RT(r))return{ok:!1,message:`contains malformed Unicode.`};t.push(r)}return{ok:!0,value:Object.freeze(t)}}return{ok:!1,message:`must be a string, finite number, boolean, null or string array.`}}function VT(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function HT(e){return Object.freeze(e.parameters),e.generator&&Object.freeze(e.generator),Object.freeze(e)}function UT(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`generator must be an object with string name and version.`);if(typeof e.name!=`string`||typeof e.version!=`string`)throw TypeError(`generator must have string name and version.`);if(!RT(e.name)||!RT(e.version))throw TypeError(`generator name and version must be well-formed Unicode strings.`);return Object.freeze({name:e.name,version:e.version})}function WT(e){return typeof e==`string`?`"${e.length>48?`${e.slice(0,48)}…`:e}"`:e===null?`null`:Array.isArray(e)?`an array`:typeof e}function GT(e,t){return e.length>t?e.length:PT.encode(e).byteLength}function KT(e,t){let n;try{let t=JSON.stringify(e);if(typeof t!=`string`)return null;n=t}catch{return null}return GT(n,t)}function qT(e){if(e===void 0)return OT;if(typeof e!=`object`||!e)throw TypeError(`parseLocalState options must be an object.`);let{maxLength:t}=e;if(t===void 0)return OT;if(typeof t!=`number`||!Number.isSafeInteger(t)||t<=0)throw RangeError(`maxLength must be a finite positive integer.`);return t}function JT(e,t,n){if(!e||e.syntax!==`local`||typeof e.source!=`string`)throw TypeError(`createLocalStateFile requires a compiled local document.`);if(!t||typeof t!=`object`||Array.isArray(t))throw TypeError(`createLocalStateFile requires a state object.`);let r=Object.keys(e.bindings).filter(e=>!e.startsWith(`@`)).sort(),i=new Set(r),a=new Map;for(let n of Object.keys(t)){if(Object.hasOwn(e.computations??{},n))continue;if(n.startsWith(`@`)){if(!Object.hasOwn(e.bindings,n))throw Error(`Cannot persist parameter "${n}": it is not a binding of this document.`);continue}if(!i.has(n))throw Error(`Cannot persist parameter "${n}": it is not a public binding of this document.`);let r=BT(t[n]);if(!r.ok)throw TypeError(`Cannot persist parameter "${n}": the value ${r.message}`);a.set(n,r.value)}let o={};for(let e of r){if(!a.has(e))throw Error(`Cannot persist the document: parameter "${e}" is missing from the supplied state.`);o[e]=a.get(e)}let s={format:DT,syntax:Bm,sourceDigest:zT(e.source),parameters:o};return n!==void 0&&(s.generator=UT(n)),HT(s)}function YT(e,t){let n=[],r=(e,t)=>IT(n,e,t),i=e;if(typeof e==`string`){if(GT(e,t)>t)return{ok:!1,diagnostics:[FT(`local.state.size`,`The state payload exceeds the ${t}-byte limit.`)]};if(!RT(e))return{ok:!1,diagnostics:[FT(`local.state.utf`,`The state payload contains malformed Unicode.`)]};try{i=JSON.parse(e)}catch(e){return{ok:!1,diagnostics:[FT(`local.state.json`,`The state payload is not valid JSON: ${LT(e)}`)]}}}else{let n=KT(e,t);if(n===null)return{ok:!1,diagnostics:[FT(`local.state.shape`,`The state payload must be a JSON object.`)]};if(n>t)return{ok:!1,diagnostics:[FT(`local.state.size`,`The state payload exceeds the ${t}-byte limit.`)]}}if(!VT(i))return{ok:!1,diagnostics:[FT(`local.state.shape`,`The state payload must be a JSON object.`)]};Object.getOwnPropertySymbols(i).length>0&&r(`local.state.shape`,`The state payload cannot use symbol keys.`);for(let e of Object.keys(i))MT.has(e)||r(`local.state.key`,`Unknown top-level state key "${e}".`);let a=i.format;a!==`reactive-md-state/v1`&&r(`local.state.format`,`Unsupported state format ${WT(a)}; expected "${DT}".`);let o=i.syntax;o!==`local-draft-2`&&r(`local.state.syntax`,`Unsupported state syntax ${WT(o)}; expected "${Bm}".`);let s=i.sourceDigest;typeof s==`string`&&kT.test(s)||r(`local.state.digest`,`sourceDigest must match "fnv1a32:" followed by 8 lowercase hexadecimal digits.`);let c={},l=i.parameters;if(!VT(l))r(`local.state.parameters`,`parameters must be a JSON object of public binding values.`);else for(let e of Object.keys(l).sort()){if(e===`__proto__`){r(`local.state.parameter.prototype`,`Parameter names cannot be "__proto__".`);continue}if(e.startsWith(`@`)){r(`local.state.parameter.internal`,`Internal parameter "${e}" cannot be persisted.`);continue}let t=BT(l[e]);t.ok?c[e]=t.value:r(`local.state.parameter.value`,`Parameter "${e}" ${t.message}`)}let u;if(Object.hasOwn(i,`generator`)){let e=i.generator;if(!VT(e))r(`local.state.generator`,`generator must be an object with string name and version.`);else{for(let t of Object.keys(e))NT.has(t)||r(`local.state.generator`,`generator has unknown key "${t}".`);typeof e.name!=`string`||typeof e.version!=`string`?r(`local.state.generator`,`generator must have string name and version.`):!RT(e.name)||!RT(e.version)?r(`local.state.utf`,`generator contains malformed Unicode.`):u=Object.freeze({name:e.name,version:e.version})}}if(n.length)return{ok:!1,diagnostics:n};let d={format:DT,syntax:Bm,sourceDigest:s,parameters:c};return u&&(d.generator=u),{ok:!0,file:HT(d)}}function XT(e,t){let n=qT(t);try{return YT(e,n)}catch(e){return{ok:!1,diagnostics:[FT(`local.state.invalid`,`Cannot read the local state: ${LT(e)}`)]}}}function ZT(e){let t=new Map,n=e=>{for(let r of e)t.set(r.id,r),r.children&&n(r.children)};return n(e.nodes),t}function QT(e){let t=ZT(e),n=new Map,r=[];for(let[i,a]of Object.entries(e.bindingSlots??{})){let e=t.get(i);if(!e)continue;let o={node:e,slots:[]};for(let[t,r]of Object.entries(a))o.slots.push({slot:t,key:r}),r.startsWith(`@`)||n.set(r,{node:e,slot:t});o.slots.length&&r.push(o)}let i=[];for(let[r,a]of Object.entries(e.bindings)){if(r.startsWith(`@`))continue;let e=n.get(r);if(e){i.push({key:r,binding:a,node:e.node,slot:e.slot});continue}let o=a.owner&&t.has(a.owner)?a.owner:a.nodeIds.find(e=>t.has(e));i.push({key:r,binding:a,node:o?t.get(o):void 0})}return{plans:i,groups:r}}function $T(e,t,n){let r=[];for(let i of t.plans)i.slot===void 0&&Object.hasOwn(n,i.key)&&(i.node?Object.is(e.get(i.node),n[i.key])||r.push(...e.set(i.node,n[i.key])):r.push(FT(`local.state.document`,`The document has no component for parameter "${i.key}".`)));for(let i of t.groups){let t={},a=!1;for(let{slot:e,key:r}of i.slots)Object.hasOwn(n,r)&&(t[e]=n[r],a=!0);a&&r.push(...e.setMany(i.node,t))}return r}function eE(e,t){let n=e.snapshot(),r={};for(let e of t){let t=n.state[e];r[e]=Array.isArray(t)?Object.freeze([...t]):t}return Object.freeze(r)}function tE(e,t,n,r){let i=XT(t,r);if(!i.ok)return i;if(!e||e.syntax!==`local`||typeof e.source!=`string`||!Array.isArray(e.nodes)||!e.bindings)return{ok:!1,diagnostics:[FT(`local.state.document`,`resolveLocalState requires a compiled local document.`)]};if(i.file.syntax!==`local-draft-2`)return{ok:!1,diagnostics:[FT(`local.state.syntax`,`This state file uses syntax "${i.file.syntax}", but this build accepts "${Bm}".`)]};if(i.file.sourceDigest!==zT(e.source))return{ok:!1,diagnostics:[FT(`local.state.source`,`This state file was created for a different document (source digest mismatch).`)]};let a=QT(e),o=new Set(a.plans.map(e=>e.key)),s=[];for(let e of Object.keys(i.file.parameters))o.has(e)||IT(s,`local.state.parameter.unknown`,`The state contains unknown parameter "${e}" for this document.`);for(let e of o)Object.hasOwn(i.file.parameters,e)||IT(s,`local.state.parameter.missing`,`The state is missing parameter "${e}".`);if(s.length)return{ok:!1,diagnostics:s};let c;try{c=Bv(e)}catch(e){return{ok:!1,diagnostics:[FT(`local.state.document`,`Cannot validate this document: ${LT(e)}`)]}}try{if(n){let e=$T(c,a,n);if(e.length)return{ok:!1,diagnostics:e}}let e=$T(c,a,i.file.parameters);if(e.length)return{ok:!1,diagnostics:e};let t=[...o].sort();return{ok:!0,file:i.file,state:eE(c,t)}}finally{c.dispose()}}function nE(e,t,n){try{return tE(e,t,void 0,n)}catch(e){return{ok:!1,diagnostics:[FT(`local.state.invalid`,`Cannot resolve the local state: ${LT(e)}`)]}}}function rE(e,t){return JT(e.document,e.getParameters(),t)}function iE(e,t){return{code:e,message:t,severity:`error`,range:{start:0,end:0},line:1,column:1}}function aE(e,t=8){let n=e.slice(0,t).map(e=>`- [${e.code}] ${e.message} (line ${e.line}, column ${e.column})`);return e.length>n.length&&n.push(`- ${e.length-n.length} more diagnostic(s).`),n.join(`
68
+ `)}function oE(e){return e instanceof Error?e.message:String(e)}var sE=class extends Error{diagnostics;constructor(e,t){let n=aE(t);super(n?`${e}\n${n}`:e),this.name=`ReactiveMDMountError`,this.diagnostics=t}};function cE(e,t=`standalone.mount`){if(typeof e==`object`&&e&&Array.isArray(e.diagnostics)){let t=e.diagnostics;if(t.length>0)return t}return[iE(t,oE(e))]}var lE=`reactive-md-diagnostics`,uE=`reactive-md-state-change`,dE=/^[A-Za-z][A-Za-z0-9_-]*$/,fE=256,pE=/^data:image\/(?:png|jpeg|gif|webp);base64,[A-Za-z0-9+/]+={0,2}$/,mE=/[\u0000-\u001f\u007f-\u009f]/,hE=64,gE=4096,_E=41943040;function vE(e,t){if(e===void 0)return;if(!bE(e)){t(`standalone.payload.images`,`images must be a JSON object mapping image URLs to data URLs.`);return}let n=Object.entries(e);if(n.length>hE){t(`standalone.payload.images`,`images cannot contain more than ${hE} entries.`);return}let r=Object.create(null),i=0;for(let[e,a]of n)if(!e||e.length>gE||e===`__proto__`||mE.test(e)||typeof a!=`string`||!pE.test(a))t(`standalone.payload.images`,`Every image entry must use a bounded URL key and a base64 raster data URL.`);else{if(i+=a.length,i>_E){t(`standalone.payload.images`,`The embedded image map exceeds the 40 MiB budget.`);return}r[e]=a}return r}function yE(e,t){if(e===void 0)return;let n=Oh(e);if(!n.ok){t(`standalone.payload.compile-options`,`The payload compile options are invalid: ${n.message}`);return}let r={enableCss:n.html.enableCss,enableJavaScript:n.html.enableJavaScript,enableExtendedHtml:n.html.enableExtendedHtml},i=e.limits;return bE(i)&&i.maxSyntaxNodes!==void 0&&(r.limits={maxSyntaxNodes:n.maxSyntaxNodes}),r}function bE(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function xE(e){let t=[],n=(e,n)=>{t.push(iE(e,n))};if(!bE(e))return{ok:!1,diagnostics:[iE(`standalone.payload.shape`,`The reactive-md payload must be a JSON object.`)]};e.version!==1&&n(`standalone.payload.version`,`The reactive-md payload must use version 1.`);let r=e.target;typeof r!=`string`||r.length===0||r.length>fE?n(`standalone.payload.target`,`The payload target must be an element id of 1-${fE} characters.`):dE.test(r)||n(`standalone.payload.target`,`The payload target must start with a letter and use only letters, digits, underscores or hyphens.`);let i=e.source;typeof i!=`string`&&n(`standalone.payload.source`,`The payload source must be a string.`);let a=e.locale===void 0?`en`:e.locale;a!==`en`&&a!==`zh`&&n(`standalone.payload.locale`,`The payload locale must be "en" or "zh".`);let o=e.colorScheme===void 0?`auto`:e.colorScheme;o!==`light`&&o!==`dark`&&o!==`auto`&&n(`standalone.payload.color-scheme`,`The payload colorScheme must be "light", "dark" or "auto".`);let s=e.hydrate!==void 0&&e.hydrate;typeof s!=`boolean`&&n(`standalone.payload.hydrate`,`The payload hydrate flag must be a boolean.`);let c=e.state;bE(c)||n(`standalone.payload.state`,`The payload state must be a JSON object.`);let l=yE(e.compileOptions,n),u=vE(e.images,n);return t.length>0?{ok:!1,diagnostics:t}:{ok:!0,payload:{version:1,target:r,source:i,state:c,locale:a,colorScheme:o,hydrate:s,...l===void 0?{}:{compileOptions:l},...u&&Object.keys(u).length>0?{images:u}:{}}}}function SE(e){try{return xE(e)}catch(e){return{ok:!1,diagnostics:[iE(`standalone.payload.invalid`,`The reactive-md payload could not be read: ${oE(e)}`)]}}}function CE(e){return Array.isArray(e)?e.slice():e}function wE(e,t){let n=nE(e,t);if(!n.ok)return n;let r={};for(let[t,i]of Object.entries(e.bindings))r[t]=Object.hasOwn(n.state,t)?{...i,initial:CE(n.state[t])}:i;let i={...e.initialState};for(let[e,t]of Object.entries(n.state))i[e]=CE(t);return{ok:!0,baseline:{document:{...e,bindings:r,initialState:i},state:n.state}}}function TE(e,t,n,r){if(typeof e!=`string`)throw new sE(`Cannot mount a Reactive MD document: source must be a string.`,[iE(`standalone.source`,`source must be a string.`)]);let i=h_(e,r);if(!i.ok)throw new sE(`Cannot mount a Reactive MD document: the source contains syntax errors.`,i.diagnostics);let a=i.document;if(t!==void 0){let e=XT(t);if(!e.ok)throw new sE(`Cannot mount a Reactive MD document: the state payload is invalid.`,e.diagnostics);let n=wE(a,e.file);if(!n.ok)throw new sE(`Cannot mount a Reactive MD document: the state does not match this source.`,n.diagnostics);a=n.baseline.document}return typeof n==`string`&&n.trim().length>0&&(a={...a,theme:n.trim(),themeRange:void 0}),{document:a,diagnostics:i.diagnostics.slice()}}var EE=`0.4.0`,DE=Object.freeze({name:`reactive-md-standalone`,version:EE}),OE=`data-reactive-md-mounted`,kE=`script[type="application/reactive-md+json"][data-reactive-md-auto]`,AE=/^data:image\/(?:png|jpeg|gif|webp);base64,[A-Za-z0-9+/]+={0,2}$/,jE=64;function ME(e){if(!e)return{};let t=new Map;for(let[n,r]of Object.entries(e).slice(0,jE))typeof n==`string`&&n.length>0&&typeof r==`string`&&AE.test(r)&&t.set(n,r);return t.size===0?{}:{urlPolicy:(e,n)=>n===`link`||t.has(e),imageResolver:e=>t.get(e)??null}}var NE=new WeakSet;function PE(e){return NE.has(e)||e.hasAttribute(`data-reactive-md-mounted`)}function FE(e,t){return rE(e,t)}function IE(e){if(e)try{e()}catch{}}function LE(e){let t=()=>{let t=e.querySelector(`article.local-document`);t&&(t.classList.remove(`local-static-first`,`reactive-md-static-first`,`reactive-md-hydrating`),t.removeAttribute(`data-static-first`),t.removeAttribute(`data-reactive-md-static-first`)),e.classList.remove(`local-static-first`,`reactive-md-static-first`),e.removeAttribute(`data-static-first`)};if(typeof requestAnimationFrame!=`function`)return t(),()=>{};let n=0,r=0;return n=requestAnimationFrame(()=>{t(),r=requestAnimationFrame(t)}),()=>{typeof cancelAnimationFrame==`function`&&(cancelAnimationFrame(n),r&&cancelAnimationFrame(r))}}function RE(e,t,n={}){if(!e||typeof e!=`object`||!(`nodeType`in e)||!e.hasAttribute)throw new sE(`Cannot mount a Reactive MD document: element must be an HTMLElement.`,[iE(`standalone.element`,`element must be an HTMLElement.`)]);if(PE(e))throw new sE(`Cannot mount a Reactive MD document: this element is already mounted.`,[iE(`standalone.mount`,`The target element already hosts a Reactive MD document.`)]);if(!t||typeof t!=`object`)throw new sE(`Cannot mount a Reactive MD document: options are required.`,[iE(`standalone.options`,`mount requires an options object with a source string.`)]);let r=TE(t.source,t.state,n.theme,t.compileOptions),i;try{i=Bv(r.document)}catch(e){throw new sE(`Cannot mount a Reactive MD document: the interactive runtime could not be created.`,[iE(`standalone.runtime`,oE(e))])}let a=t.generator??DE,o=ME(t.images),s=t.urlPolicy??o.urlPolicy,c=t.imageResolver??o.imageResolver,l=()=>FE(i,a),u;try{u=l()}catch(e){try{i.dispose()}catch{}throw new sE(`Cannot mount a Reactive MD document: the initial state could not be captured.`,[iE(`standalone.state`,oE(e))])}let d=!1,f=e=>{d||IE(n.onDiagnostics?()=>n.onDiagnostics(e):void 0)},p=t.hydrate===!0&&e.hasChildNodes(),m=(0,$.jsx)(TT,{document:r.document,runtime:i,onDiagnostics:f,urlPolicy:s,locale:t.locale??`en`,themes:t.themes,colorScheme:t.colorScheme??`auto`,mode:`interactive`,staticFirst:p,imageResolver:c});if(!p)for(;e.firstChild;)e.removeChild(e.firstChild);let h=null;try{h=p?(0,b.hydrateRoot)(e,m):(0,b.createRoot)(e),p||h.render(m)}catch(e){try{h?.unmount()}catch{}try{i.dispose()}catch{}throw new sE(`Cannot mount a Reactive MD document: React could not render the document.`,cE(e,`standalone.render`))}NE.add(e),e.setAttribute(OE,``);let g=n.onStateChange?i.subscribe(()=>{if(d)return;let e;try{e=l()}catch{return}IE(n.onStateChange?()=>n.onStateChange(e):void 0)}):()=>{};IE(n.onStateChange?()=>n.onStateChange(u):void 0),r.diagnostics.length>0&&f(r.diagnostics);let _=p?LE(e):()=>{};return{element:e,getState(){if(d)throw Error(`This Reactive MD document has been unmounted.`);return l()},unmount:()=>{if(!d){d=!0,g(),_();try{h?.unmount()}catch{}try{i.dispose()}catch{}NE.delete(e),e.getAttribute(`data-reactive-md-mounted`)===``&&e.removeAttribute(OE)}}}}function zE(e,t){return RE(e,t)}function BE(e,t,n){if(typeof console<`u`&&typeof console.error==`function`)try{console.error(`Reactive MD: ${n.map(e=>`[${e.code}] ${e.message}`).join(` `)}`)}catch{}let r=e.defaultView?.CustomEvent;if(typeof r==`function`)try{t.dispatchEvent(new r(lE,{detail:n,bubbles:!0,composed:!0}))}catch{}}function VE(e,t){let n=t.defaultView?.HTMLElement;return n?e instanceof n:e.namespaceURI===`http://www.w3.org/1999/xhtml`}function HE(e){if(typeof document>`u`)return[];let t=e??document,n=t,r=n.nodeType===9?t:n.ownerDocument??document,i=[],a;try{a=Array.from(t.querySelectorAll(kE))}catch{return i}for(let e of a){let a;try{a=SE(JSON.parse(e.textContent??``))}catch(t){BE(r,e,[iE(`standalone.payload.json`,`The reactive-md payload is not valid JSON: ${oE(t)}`)]);continue}if(!a.ok){BE(r,e,a.diagnostics);continue}let o=a.payload,s=t,c=(typeof s.getElementById==`function`?s.getElementById(o.target):null)??r.getElementById(o.target);if(!c)BE(r,e,[iE(`standalone.target.missing`,`The reactive-md payload target "#${o.target}" was not found.`)]);else if(n!==r&&!n.contains(c))BE(r,e,[iE(`standalone.target.scope`,`The reactive-md payload target is outside the scanned root.`)]);else if(!VE(c,r))BE(r,e,[iE(`standalone.target.type`,`The reactive-md payload target must be an HTML element.`)]);else if(!PE(c))try{i.push(zE(c,{source:o.source,state:o.state,locale:o.locale,colorScheme:o.colorScheme,hydrate:o.hydrate,images:o.images,compileOptions:o.compileOptions}))}catch(e){BE(r,c,cE(e))}}return i}var UE=`reactive-md-doc`,WE=typeof HTMLElement<`u`?HTMLElement:class{};function GE(e){return typeof e==`object`&&!!e&&e.name===`AbortError`}var KE=class extends WE{static observedAttributes=[`src`,`source`,`locale`,`color-scheme`,`theme`];_source;_state;_urlPolicy;_imageResolver;_themes;_connected=!1;_generation=0;_restartScheduled=!1;_session=null;_abort=null;_stateTimer=null;_pendingState=null;_cache=null;connectedCallback(){this._connected||(this._connected=!0,this._start())}disconnectedCallback(){this._connected&&(this._connected=!1,this._generation+=1,this._restartScheduled=!1,this._abortFetch(),this._clearStateTimer(),this._teardown(),this._cache=null)}attributeChangedCallback(e,t,n){t!==n&&(e===`src`&&(this._cache=null),this._requestRestart())}get src(){return this.getAttribute(`src`)??void 0}set src(e){e==null?this.removeAttribute(`src`):this.setAttribute(`src`,e)}get theme(){return this.getAttribute(`theme`)??void 0}set theme(e){e==null?this.removeAttribute(`theme`):this.setAttribute(`theme`,e)}get source(){return this._source===void 0?this.getAttribute(`source`)??void 0:this._source}set source(e){let t=typeof e==`string`?e:void 0;t!==this._source&&(this._source=t,this._requestRestart())}get state(){return this._state}set state(e){e!==this._state&&(this._state=e,this._requestRestart())}get urlPolicy(){return this._urlPolicy}set urlPolicy(e){e!==this._urlPolicy&&(this._urlPolicy=e,this._requestRestart())}get imageResolver(){return this._imageResolver}set imageResolver(e){e!==this._imageResolver&&(this._imageResolver=e,this._requestRestart())}get themes(){return this._themes}set themes(e){e!==this._themes&&(this._themes=e,this._requestRestart())}get _locale(){return this.getAttribute(`locale`)===`zh`?`zh`:`en`}get _colorScheme(){let e=this.getAttribute(`color-scheme`);return e===`light`||e===`dark`?e:`auto`}get _themeOverride(){return this.getAttribute(`theme`)?.trim()||void 0}_requestRestart(){this._connected&&!this._restartScheduled&&(this._restartScheduled=!0,queueMicrotask(()=>{this._restartScheduled=!1,this._connected&&this._start()}))}_start(){this._generation+=1;let e=this._generation;this._abortFetch(),this._clearStateTimer(),this._teardown(),this._load(e)}async _load(e){let t=this.getAttribute(`src`)?.trim()??``,n=this.source;if(t){if(this._cache&&this._cache.src===t)n=this._cache.text;else{let r=null;try{r=typeof AbortController==`function`?new AbortController:null,this._abort=r;let i=await fetch(t,r?{signal:r.signal}:{});if(!i.ok)throw Error(`HTTP ${i.status}${i.statusText?` ${i.statusText}`:``}`);let a=await i.text();if(!this._connected||e!==this._generation)return;this._cache={src:t,text:a},n=a}catch(n){if(!this._connected||e!==this._generation||GE(n))return;this._showError([iE(`standalone.fetch`,`Cannot load "${t}": ${oE(n)}`)]);return}finally{this._abort===r&&(this._abort=null)}}}if(this._connected&&e===this._generation){if(typeof n!=`string`)this._showError([iE(`standalone.source`,`The <reactive-md-doc> element requires a "src" attribute or a "source" attribute/property.`)]);else try{let t=RE(this,{source:n,state:this._state,locale:this._locale,colorScheme:this._colorScheme,themes:this._themes,urlPolicy:this._urlPolicy,imageResolver:this._imageResolver},{theme:this._themeOverride,onDiagnostics:e=>this._emitDiagnostics(e),onStateChange:e=>this._queueState(e)});if(!this._connected||e!==this._generation){try{t.unmount()}catch{}return}this._session=t}catch(e){this._session=null,this._showError(cE(e))}}}_teardown(){let e=this._session;if(this._session=null,e)try{e.unmount()}catch{}}_abortFetch(){let e=this._abort;if(this._abort=null,e)try{e.abort()}catch{}}_clearStateTimer(){this._stateTimer!==null&&(clearTimeout(this._stateTimer),this._stateTimer=null),this._pendingState=null}_queueState(e){this._connected&&(this._pendingState=e,this._stateTimer===null&&(this._stateTimer=setTimeout(()=>{this._stateTimer=null;let e=this._pendingState;this._pendingState=null,this._connected&&e&&this._dispatch(uE,e)},0)))}_emitDiagnostics(e){this._connected&&e.length!==0&&this._dispatch(lE,e)}_showError(e){if(!this._connected)return;this._teardown(),this._clearStateTimer();let t=this.ownerDocument;for(;this.firstChild;)this.removeChild(this.firstChild);let n=t.createElement(`div`);n.className=`local-inactive reactive-md-standalone-error`,n.setAttribute(`role`,`alert`),n.setAttribute(`data-reactive-md-error`,``);let r=t.createElement(`p`);if(r.className=`local-inactive-title`,r.textContent=this._locale===`zh`?`无法加载交互文档。`:`This interactive document could not be loaded.`,n.appendChild(r),e.length>0){let r=t.createElement(`ul`);r.className=`local-inactive-list`;for(let n of e.slice(0,12)){let e=t.createElement(`li`);e.textContent=`${n.message} (line ${n.line}, column ${n.column})`,r.appendChild(e)}n.appendChild(r)}this.appendChild(n),this._emitDiagnostics(e)}_dispatch(e,t){if(!this._connected)return;let n=this.ownerDocument.defaultView?.CustomEvent;if(typeof n==`function`)try{this.dispatchEvent(new n(e,{detail:t,bubbles:!0,composed:!0}))}catch{}}};function qE(){typeof customElements<`u`&&(customElements.get(`reactive-md-doc`)||customElements.define(UE,KE))}qE();var JE=!1;function YE(){if(JE||typeof document>`u`)return;JE=!0;let e=()=>{try{HE(document)}catch(e){typeof console<`u`&&typeof console.error==`function`&&console.error(`Reactive MD: automatic mounting failed.`,e)}};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,e,{once:!0}):queueMicrotask(e)}return YE(),e.REACTIVE_MD_DIAGNOSTICS_EVENT=lE,e.REACTIVE_MD_DOC_TAG=UE,e.REACTIVE_MD_MOUNTED_ATTRIBUTE=OE,e.REACTIVE_MD_STANDALONE_GENERATOR=DE,e.REACTIVE_MD_STANDALONE_VERSION=EE,e.REACTIVE_MD_STATE_CHANGE_EVENT=uE,e.ReactiveMDDocElement=KE,e.ReactiveMDMountError=sE,e.defineReactiveMDDoc=qE,e.diagnosticsFromError=cE,e.isReactiveMDMounted=PE,e.mount=zE,e.mountAll=HE,e.parseMountPayload=SE,e.prepareStandaloneDocument=TE,e})({});