@cursor/july 0.1.20 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/agent-serve.js +0 -0
- package/dist/channels/github/instrument.d.ts +20 -0
- package/dist/channels/github/instrument.d.ts.map +1 -0
- package/dist/channels/slack/api.d.ts +2 -0
- package/dist/channels/slack/api.d.ts.map +1 -1
- package/dist/channels/slack/api.js +3 -0
- package/dist/channels/slack/bot-mentions.d.ts +106 -0
- package/dist/channels/slack/bot-mentions.d.ts.map +1 -0
- package/dist/channels/slack/bot-mentions.js +243 -0
- package/dist/channels/slack/dispatch.d.ts +6 -0
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +24 -3
- package/dist/channels/slack/inbound.d.ts +10 -1
- package/dist/channels/slack/inbound.d.ts.map +1 -1
- package/dist/channels/slack/inbound.js +12 -4
- package/dist/channels/slack/index.d.ts +1 -0
- package/dist/channels/slack/index.d.ts.map +1 -1
- package/dist/channels/slack/index.js +1 -0
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +61 -22
- package/dist/channels/slack/types.d.ts +58 -0
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/docs/404.html +1 -1
- package/dist/docs/ab.html +2 -2
- package/dist/docs/assets/{app.T-5ImnM3.js → app.jDxLzWv4.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.DoJHJjqF.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.OMGMWH6H.js → VPLocalSearchBox.Y6bDR1-a.js} +1 -1
- package/dist/docs/assets/chunks/{theme.DLg4yB4D.js → theme.CLazCWlJ.js} +2 -2
- package/dist/docs/building-with-agents.html +2 -2
- package/dist/docs/concepts.html +2 -2
- package/dist/docs/deployment.html +2 -2
- package/dist/docs/evals.html +2 -2
- package/dist/docs/example-agents/approval-buddy.html +2 -2
- package/dist/docs/example-agents/benny.html +2 -2
- package/dist/docs/example-agents/bugbot.html +2 -2
- package/dist/docs/example-agents/codebase-wiki.html +2 -2
- package/dist/docs/example-agents/codeowners-review.html +2 -2
- package/dist/docs/example-agents/concierge.html +2 -2
- package/dist/docs/example-agents/fsd.html +2 -2
- package/dist/docs/example-agents/index.html +2 -2
- package/dist/docs/example-agents/knowledge-base.html +2 -2
- package/dist/docs/example-agents/oncall.html +2 -2
- package/dist/docs/example-agents/security-reviewer.html +2 -2
- package/dist/docs/example-agents/slack-agent.html +2 -2
- package/dist/docs/example-agents/weather-agent.html +2 -2
- package/dist/docs/guides/agent-to-agent.html +2 -2
- package/dist/docs/guides/cloud-runtime.html +2 -2
- package/dist/docs/guides/github.html +2 -2
- package/dist/docs/guides/human-in-the-loop.html +2 -2
- package/dist/docs/guides/mcp-oauth.html +2 -2
- package/dist/docs/guides/slack.html +2 -2
- package/dist/docs/guides/webhooks.html +2 -2
- package/dist/docs/hillclimbing.html +2 -2
- package/dist/docs/index.html +2 -2
- package/dist/docs/quickstart.html +2 -2
- package/dist/docs/reference/agent-config.html +2 -2
- package/dist/docs/reference/channels.html +2 -2
- package/dist/docs/reference/cli.html +2 -2
- package/dist/docs/reference/connections.html +2 -2
- package/dist/docs/reference/hooks.html +2 -2
- package/dist/docs/reference/http-api.html +2 -2
- package/dist/docs/reference/instructions.html +2 -2
- package/dist/docs/reference/playground.html +2 -2
- package/dist/docs/reference/project-layout.html +2 -2
- package/dist/docs/reference/prompt.html +2 -2
- package/dist/docs/reference/schedules.html +2 -2
- package/dist/docs/reference/sessions.html +2 -2
- package/dist/docs/reference/skills.html +2 -2
- package/dist/docs/reference/subagents.html +2 -2
- package/dist/docs/reference/tools.html +2 -2
- package/dist/docs/scaffolding-agents.html +2 -2
- package/dist/docs/storage.html +2 -2
- package/dist/docs/troubleshooting.html +2 -2
- package/dist/internal/json-dir-store.d.ts +32 -0
- package/dist/internal/json-dir-store.d.ts.map +1 -0
- package/dist/internal/json-dir-store.js +100 -0
- package/dist/internal/resolved-connections.d.ts +1 -1
- package/dist/internal/resolved-connections.d.ts.map +1 -1
- package/dist/internal/resolved-connections.js +10 -0
- package/dist/internal/session-engine.d.ts +4 -1
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +13 -2
- package/dist/playground/assets/index-CjOQ4hN9.css +1 -0
- package/dist/playground/assets/index-dshZQJCp.js +85 -0
- package/dist/playground/index.html +2 -2
- package/dist/types.d.ts +7 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +9 -0
- package/package.json +24 -24
- package/src/bin/agent-serve.version.test.ts +62 -0
- package/src/channels/github/api.test.ts +64 -0
- package/src/channels/github/auth.test.ts +105 -0
- package/src/channels/github/cursor-account.test.ts +204 -0
- package/src/channels/github/forward.test.ts +457 -0
- package/src/channels/github/github.test.ts +937 -0
- package/src/channels/github/replay.test.ts +179 -0
- package/src/channels/slack/api.post-message.test.ts +148 -0
- package/src/channels/slack/api.ts +5 -0
- package/src/channels/slack/approvals.test.ts +328 -0
- package/src/channels/slack/block-actions.test.ts +452 -0
- package/src/channels/slack/bot-mentions.test.ts +217 -0
- package/src/channels/slack/bot-mentions.ts +315 -0
- package/src/channels/slack/channel-watch.test.ts +363 -0
- package/src/channels/slack/cursor-account.test.ts +253 -0
- package/src/channels/slack/defaults.final-post.test.ts +182 -0
- package/src/channels/slack/dispatch.test.ts +795 -0
- package/src/channels/slack/dispatch.ts +27 -1
- package/src/channels/slack/eval-directive.test.ts +273 -0
- package/src/channels/slack/inbound.ts +25 -4
- package/src/channels/slack/index.ts +1 -0
- package/src/channels/slack/message-body.test.ts +54 -0
- package/src/channels/slack/nudge-store.test.ts +143 -0
- package/src/channels/slack/slack-channel.ts +66 -8
- package/src/channels/slack/slack.test.ts +391 -0
- package/src/channels/slack/stop.test.ts +23 -0
- package/src/channels/slack/thread-context.test.ts +202 -0
- package/src/channels/slack/types.ts +60 -0
- package/src/evals/assertions.test.ts +580 -0
- package/src/evals/expect.test.ts +144 -0
- package/src/evals/judge.test.ts +181 -0
- package/src/evals/loaders.test.ts +132 -0
- package/src/evals/matchers.test.ts +95 -0
- package/src/evals/reporters.test.ts +303 -0
- package/src/evals/run-facts.test.ts +259 -0
- package/src/internal/ab-snapshot.test.ts +325 -0
- package/src/internal/approval-gate.test.ts +49 -0
- package/src/internal/approvals.integration.test.ts +383 -0
- package/src/internal/authored-loaders.test.ts +31 -0
- package/src/internal/builtin-tools/reminders.test.ts +201 -0
- package/src/internal/channel-route-schema.test.ts +294 -0
- package/src/internal/chat-attach.test.ts +262 -0
- package/src/internal/cli-deploy.test.ts +1991 -0
- package/src/internal/cli-mcp.test.ts +789 -0
- package/src/internal/cli-skills.test.ts +133 -0
- package/src/internal/cli-slack.test.ts +1647 -0
- package/src/internal/cloud-merge.test.ts +74 -0
- package/src/internal/cron.test.ts +22 -0
- package/src/internal/cursor/account-mcp.test.ts +807 -0
- package/src/internal/cursor/backend-client.test.ts +591 -0
- package/src/internal/cursor/credentials.test.ts +351 -0
- package/src/internal/cursor/github-credentials.test.ts +136 -0
- package/src/internal/cursor-account-mcp-auth.test.ts +310 -0
- package/src/internal/cursor-account.integration.test.ts +441 -0
- package/src/internal/cursor-event-relay.test.ts +746 -0
- package/src/internal/cursor-github-credentials.integration.test.ts +271 -0
- package/src/internal/cursor-slack-relay.test.ts +525 -0
- package/src/internal/deploy-source.test.ts +111 -0
- package/src/internal/discovery.builtin-tools.test.ts +94 -0
- package/src/internal/discovery.concurrency.test.ts +60 -0
- package/src/internal/discovery.cursor-account.test.ts +133 -0
- package/src/internal/discovery.cwd.test.ts +83 -0
- package/src/internal/discovery.hosting.test.ts +80 -0
- package/src/internal/discovery.identity.test.ts +44 -0
- package/src/internal/docs-site.test.ts +66 -0
- package/src/internal/duration.test.ts +29 -0
- package/src/internal/eval-judge-model.test.ts +187 -0
- package/src/internal/eval-run-store.cancel.test.ts +142 -0
- package/src/internal/eval-run-store.storage.test.ts +211 -0
- package/src/internal/eval-runner.http.test.ts +403 -0
- package/src/internal/eval-runner.run.test.ts +928 -0
- package/src/internal/evals-client.test.ts +307 -0
- package/src/internal/event-mapper.test.ts +243 -0
- package/src/internal/github-fanout.test.ts +213 -0
- package/src/internal/handleAgentServeTrigger.test.ts +179 -0
- package/src/internal/host-kv.test.ts +82 -0
- package/src/internal/host-platforms.test.ts +126 -0
- package/src/internal/http-channel.test.ts +402 -0
- package/src/internal/init-project.test.ts +269 -0
- package/src/internal/install-cursor-skills.test.ts +262 -0
- package/src/internal/local-env.test.ts +100 -0
- package/src/internal/log-ring.test.ts +31 -0
- package/src/internal/logs-client.test.ts +350 -0
- package/src/internal/mcp-endpoint.test.ts +436 -0
- package/src/internal/mcp-host.test.ts +298 -0
- package/src/internal/mcp-oauth.test.ts +148 -0
- package/src/internal/net.test.ts +17 -0
- package/src/internal/peer-connections.test.ts +128 -0
- package/src/internal/peer-mcp.integration.test.ts +289 -0
- package/src/internal/playground/toolchain.test.ts +53 -0
- package/src/internal/playground-cli.test.ts +187 -0
- package/src/internal/playground-proxy.test.ts +376 -0
- package/src/internal/prompt-context.integration.test.ts +232 -0
- package/src/internal/prompt-context.test.ts +127 -0
- package/src/internal/reminder-runner.test.ts +390 -0
- package/src/internal/reminder-store.test.ts +53 -0
- package/src/internal/request-headers.test.ts +27 -0
- package/src/internal/resolve-prod-target.test.ts +787 -0
- package/src/internal/resolved-connections.test.ts +295 -0
- package/src/internal/resolved-connections.ts +18 -1
- package/src/internal/router.test.ts +57 -0
- package/src/internal/sdk-runner.test.ts +290 -0
- package/src/internal/session-engine.coalesce.test.ts +169 -0
- package/src/internal/session-engine.concurrency.test.ts +250 -0
- package/src/internal/session-engine.host-oauth-mcp.test.ts +110 -0
- package/src/internal/session-engine.interrupt.test.ts +577 -0
- package/src/internal/session-engine.storage.test.ts +547 -0
- package/src/internal/session-engine.ts +15 -1
- package/src/internal/session-urls.test.ts +28 -0
- package/src/internal/sessions-client.test.ts +518 -0
- package/src/internal/storage-coordinator.test.ts +517 -0
- package/src/internal/tool-call.test.ts +458 -0
- package/src/internal/tool-result.test.ts +52 -0
- package/src/internal/trajectory.approvals.test.ts +83 -0
- package/src/internal/trajectory.subagents.test.ts +198 -0
- package/src/internal/turn-governor.test.ts +137 -0
- package/src/internal/update-check.test.ts +485 -0
- package/src/internal/workspace.test.ts +81 -0
- package/src/storage-backends/cursor-hosted.test.ts +121 -0
- package/src/types.ts +12 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.CvejISXF.js +0 -1
- package/dist/playground/assets/index-CidizGZv.css +0 -1
- package/dist/playground/assets/index-CuiAKZaP.js +0 -85
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
function mz(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const a=Object.getOwnPropertyDescriptor(r,s);a&&Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();function uh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var eb={exports:{}},Mu={};var Ow;function gz(){if(Ow)return Mu;Ow=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,s,a){var l=null;if(a!==void 0&&(l=""+a),s.key!==void 0&&(l=""+s.key),"key"in s){a={};for(var c in s)c!=="key"&&(a[c]=s[c])}else a=s;return s=a.ref,{$$typeof:e,type:r,key:l,ref:s!==void 0?s:null,props:a}}return Mu.Fragment=t,Mu.jsx=n,Mu.jsxs=n,Mu}var Mw;function bz(){return Mw||(Mw=1,eb.exports=gz()),eb.exports}var v=bz(),tb={exports:{}},Tt={};var Iw;function yz(){if(Iw)return Tt;Iw=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.iterator;function b($){return $===null||typeof $!="object"?null:($=g&&$[g]||$["@@iterator"],typeof $=="function"?$:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,_={};function E($,G,O){this.props=$,this.context=G,this.refs=_,this.updater=O||x}E.prototype.isReactComponent={},E.prototype.setState=function($,G){if(typeof $!="object"&&typeof $!="function"&&$!=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,$,G,"setState")},E.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function R(){}R.prototype=E.prototype;function T($,G,O){this.props=$,this.context=G,this.refs=_,this.updater=O||x}var C=T.prototype=new R;C.constructor=T,w(C,E.prototype),C.isPureReactComponent=!0;var A=Array.isArray;function N(){}var I={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function V($,G,O){var J=O.ref;return{$$typeof:e,type:$,key:G,ref:J!==void 0?J:null,props:O}}function j($,G){return V($.type,G,$.props)}function q($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function Z($){var G={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(O){return G[O]})}var B=/\/+/g;function z($,G){return typeof $=="object"&&$!==null&&$.key!=null?Z(""+$.key):G.toString(36)}function L($){switch($.status){case"fulfilled":return $.value;case"rejected":throw $.reason;default:switch(typeof $.status=="string"?$.then(N,N):($.status="pending",$.then(function(G){$.status==="pending"&&($.status="fulfilled",$.value=G)},function(G){$.status==="pending"&&($.status="rejected",$.reason=G)})),$.status){case"fulfilled":return $.value;case"rejected":throw $.reason}}throw $}function H($,G,O,J,ee){var ie=typeof $;(ie==="undefined"||ie==="boolean")&&($=null);var he=!1;if($===null)he=!0;else switch(ie){case"bigint":case"string":case"number":he=!0;break;case"object":switch($.$$typeof){case e:case t:he=!0;break;case h:return he=$._init,H(he($._payload),G,O,J,ee)}}if(he)return ee=ee($),he=J===""?"."+z($,0):J,A(ee)?(O="",he!=null&&(O=he.replace(B,"$&/")+"/"),H(ee,G,O,"",function(Te){return Te})):ee!=null&&(q(ee)&&(ee=j(ee,O+(ee.key==null||$&&$.key===ee.key?"":(""+ee.key).replace(B,"$&/")+"/")+he)),G.push(ee)),1;he=0;var le=J===""?".":J+":";if(A($))for(var ke=0;ke<$.length;ke++)J=$[ke],ie=le+z(J,ke),he+=H(J,G,O,ie,ee);else if(ke=b($),typeof ke=="function")for($=ke.call($),ke=0;!(J=$.next()).done;)J=J.value,ie=le+z(J,ke++),he+=H(J,G,O,ie,ee);else if(ie==="object"){if(typeof $.then=="function")return H(L($),G,O,J,ee);throw G=String($),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return he}function U($,G,O){if($==null)return $;var J=[],ee=0;return H($,J,"","",function(ie){return G.call(O,ie,ee++)}),J}function P($){if($._status===-1){var G=$._result;G=G(),G.then(function(O){($._status===0||$._status===-1)&&($._status=1,$._result=O)},function(O){($._status===0||$._status===-1)&&($._status=2,$._result=O)}),$._status===-1&&($._status=0,$._result=G)}if($._status===1)return $._result.default;throw $._result}var Y=typeof reportError=="function"?reportError:function($){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof $=="object"&&$!==null&&typeof $.message=="string"?String($.message):String($),error:$});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",$);return}console.error($)},D={map:U,forEach:function($,G,O){U($,function(){G.apply(this,arguments)},O)},count:function($){var G=0;return U($,function(){G++}),G},toArray:function($){return U($,function(G){return G})||[]},only:function($){if(!q($))throw Error("React.Children.only expected to receive a single React element child.");return $}};return Tt.Activity=m,Tt.Children=D,Tt.Component=E,Tt.Fragment=n,Tt.Profiler=s,Tt.PureComponent=T,Tt.StrictMode=r,Tt.Suspense=p,Tt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,Tt.__COMPILER_RUNTIME={__proto__:null,c:function($){return I.H.useMemoCache($)}},Tt.cache=function($){return function(){return $.apply(null,arguments)}},Tt.cacheSignal=function(){return null},Tt.cloneElement=function($,G,O){if($==null)throw Error("The argument must be a React element, but you passed "+$+".");var J=w({},$.props),ee=$.key;if(G!=null)for(ie in G.key!==void 0&&(ee=""+G.key),G)!F.call(G,ie)||ie==="key"||ie==="__self"||ie==="__source"||ie==="ref"&&G.ref===void 0||(J[ie]=G[ie]);var ie=arguments.length-2;if(ie===1)J.children=O;else if(1<ie){for(var he=Array(ie),le=0;le<ie;le++)he[le]=arguments[le+2];J.children=he}return V($.type,ee,J)},Tt.createContext=function($){return $={$$typeof:l,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null},$.Provider=$,$.Consumer={$$typeof:a,_context:$},$},Tt.createElement=function($,G,O){var J,ee={},ie=null;if(G!=null)for(J in G.key!==void 0&&(ie=""+G.key),G)F.call(G,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ee[J]=G[J]);var he=arguments.length-2;if(he===1)ee.children=O;else if(1<he){for(var le=Array(he),ke=0;ke<he;ke++)le[ke]=arguments[ke+2];ee.children=le}if($&&$.defaultProps)for(J in he=$.defaultProps,he)ee[J]===void 0&&(ee[J]=he[J]);return V($,ie,ee)},Tt.createRef=function(){return{current:null}},Tt.forwardRef=function($){return{$$typeof:c,render:$}},Tt.isValidElement=q,Tt.lazy=function($){return{$$typeof:h,_payload:{_status:-1,_result:$},_init:P}},Tt.memo=function($,G){return{$$typeof:f,type:$,compare:G===void 0?null:G}},Tt.startTransition=function($){var G=I.T,O={};I.T=O;try{var J=$(),ee=I.S;ee!==null&&ee(O,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(N,Y)}catch(ie){Y(ie)}finally{G!==null&&O.types!==null&&(G.types=O.types),I.T=G}},Tt.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Tt.use=function($){return I.H.use($)},Tt.useActionState=function($,G,O){return I.H.useActionState($,G,O)},Tt.useCallback=function($,G){return I.H.useCallback($,G)},Tt.useContext=function($){return I.H.useContext($)},Tt.useDebugValue=function(){},Tt.useDeferredValue=function($,G){return I.H.useDeferredValue($,G)},Tt.useEffect=function($,G){return I.H.useEffect($,G)},Tt.useEffectEvent=function($){return I.H.useEffectEvent($)},Tt.useId=function(){return I.H.useId()},Tt.useImperativeHandle=function($,G,O){return I.H.useImperativeHandle($,G,O)},Tt.useInsertionEffect=function($,G){return I.H.useInsertionEffect($,G)},Tt.useLayoutEffect=function($,G){return I.H.useLayoutEffect($,G)},Tt.useMemo=function($,G){return I.H.useMemo($,G)},Tt.useOptimistic=function($,G){return I.H.useOptimistic($,G)},Tt.useReducer=function($,G,O){return I.H.useReducer($,G,O)},Tt.useRef=function($){return I.H.useRef($)},Tt.useState=function($){return I.H.useState($)},Tt.useSyncExternalStore=function($,G,O){return I.H.useSyncExternalStore($,G,O)},Tt.useTransition=function(){return I.H.useTransition()},Tt.version="19.2.6",Tt}var Dw;function zc(){return Dw||(Dw=1,tb.exports=yz()),tb.exports}var k=zc();const Vu=uh(k),ch=mz({__proto__:null,default:Vu},[k]);var nb={exports:{}},Iu={},rb={exports:{}},ib={};var zw;function vz(){return zw||(zw=1,(function(e){function t(H,U){var P=H.length;H.push(U);e:for(;0<P;){var Y=P-1>>>1,D=H[Y];if(0<s(D,U))H[Y]=U,H[P]=D,P=Y;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var U=H[0],P=H.pop();if(P!==U){H[0]=P;e:for(var Y=0,D=H.length,$=D>>>1;Y<$;){var G=2*(Y+1)-1,O=H[G],J=G+1,ee=H[J];if(0>s(O,P))J<D&&0>s(ee,O)?(H[Y]=ee,H[J]=P,Y=J):(H[Y]=O,H[G]=P,Y=G);else if(J<D&&0>s(ee,P))H[Y]=ee,H[J]=P,Y=J;else break e}}return U}function s(H,U){var P=H.sortIndex-U.sortIndex;return P!==0?P:H.id-U.id}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 l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var p=[],f=[],h=1,m=null,g=3,b=!1,x=!1,w=!1,_=!1,E=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function C(H){for(var U=n(f);U!==null;){if(U.callback===null)r(f);else if(U.startTime<=H)r(f),U.sortIndex=U.expirationTime,t(p,U);else break;U=n(f)}}function A(H){if(w=!1,C(H),!x)if(n(p)!==null)x=!0,N||(N=!0,Z());else{var U=n(f);U!==null&&L(A,U.startTime-H)}}var N=!1,I=-1,F=5,V=-1;function j(){return _?!0:!(e.unstable_now()-V<F)}function q(){if(_=!1,N){var H=e.unstable_now();V=H;var U=!0;try{e:{x=!1,w&&(w=!1,R(I),I=-1),b=!0;var P=g;try{t:{for(C(H),m=n(p);m!==null&&!(m.expirationTime>H&&j());){var Y=m.callback;if(typeof Y=="function"){m.callback=null,g=m.priorityLevel;var D=Y(m.expirationTime<=H);if(H=e.unstable_now(),typeof D=="function"){m.callback=D,C(H),U=!0;break t}m===n(p)&&r(p),C(H)}else r(p);m=n(p)}if(m!==null)U=!0;else{var $=n(f);$!==null&&L(A,$.startTime-H),U=!1}}break e}finally{m=null,g=P,b=!1}U=void 0}}finally{U?Z():N=!1}}}var Z;if(typeof T=="function")Z=function(){T(q)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,z=B.port2;B.port1.onmessage=q,Z=function(){z.postMessage(null)}}else Z=function(){E(q,0)};function L(H,U){I=E(function(){H(e.unstable_now())},U)}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(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(H){switch(g){case 1:case 2:case 3:var U=3;break;default:U=g}var P=g;g=U;try{return H()}finally{g=P}},e.unstable_requestPaint=function(){_=!0},e.unstable_runWithPriority=function(H,U){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var P=g;g=H;try{return U()}finally{g=P}},e.unstable_scheduleCallback=function(H,U,P){var Y=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?Y+P:Y):P=Y,H){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=P+D,H={id:h++,callback:U,priorityLevel:H,startTime:P,expirationTime:D,sortIndex:-1},P>Y?(H.sortIndex=P,t(f,H),n(p)===null&&H===n(f)&&(w?(R(I),I=-1):w=!0,L(A,P-Y))):(H.sortIndex=D,t(p,H),x||b||(x=!0,N||(N=!0,Z()))),H},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(H){var U=g;return function(){var P=g;g=U;try{return H.apply(this,arguments)}finally{g=P}}}})(ib)),ib}var jw;function kz(){return jw||(jw=1,rb.exports=vz()),rb.exports}var sb={exports:{}},ur={};var Lw;function xz(){if(Lw)return ur;Lw=1;var e=zc();function t(p){var f="https://react.dev/errors/"+p;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+p+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function a(p,f,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:m==null?null:""+m,children:p,containerInfo:f,implementation:h}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(p,f){if(p==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return ur.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ur.createPortal=function(p,f){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return a(p,f,null,h)},ur.flushSync=function(p){var f=l.T,h=r.p;try{if(l.T=null,r.p=2,p)return p()}finally{l.T=f,r.p=h,r.d.f()}},ur.preconnect=function(p,f){typeof p=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(p,f))},ur.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},ur.preinit=function(p,f){if(typeof p=="string"&&f&&typeof f.as=="string"){var h=f.as,m=c(h,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,b=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(p,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:b}):h==="script"&&r.d.X(p,{crossOrigin:m,integrity:g,fetchPriority:b,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},ur.preinitModule=function(p,f){if(typeof p=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=c(f.as,f.crossOrigin);r.d.M(p,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(p)},ur.preload=function(p,f){if(typeof p=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,m=c(h,f.crossOrigin);r.d.L(p,h,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},ur.preloadModule=function(p,f){if(typeof p=="string")if(f){var h=c(f.as,f.crossOrigin);r.d.m(p,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(p)},ur.requestFormReset=function(p){r.d.r(p)},ur.unstable_batchedUpdates=function(p,f){return p(f)},ur.useFormState=function(p,f,h){return l.H.useFormState(p,f,h)},ur.useFormStatus=function(){return l.H.useHostTransitionStatus()},ur.version="19.2.6",ur}var Pw;function W_(){if(Pw)return sb.exports;Pw=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),sb.exports=xz(),sb.exports}var $w;function Sz(){if($w)return Iu;$w=1;var e=kz(),t=zc(),n=W_();function r(i){var o="https://react.dev/errors/"+i;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function a(i){var o=i,u=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(u=o.return),i=o.return;while(i)}return o.tag===3?u:null}function l(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function c(i){if(i.tag===31){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function p(i){if(a(i)!==i)throw Error(r(188))}function f(i){var o=i.alternate;if(!o){if(o=a(i),o===null)throw Error(r(188));return o!==i?null:i}for(var u=i,d=o;;){var y=u.return;if(y===null)break;var S=y.alternate;if(S===null){if(d=y.return,d!==null){u=d;continue}break}if(y.child===S.child){for(S=y.child;S;){if(S===u)return p(y),i;if(S===d)return p(y),o;S=S.sibling}throw Error(r(188))}if(u.return!==d.return)u=y,d=S;else{for(var M=!1,K=y.child;K;){if(K===u){M=!0,u=y,d=S;break}if(K===d){M=!0,d=y,u=S;break}K=K.sibling}if(!M){for(K=S.child;K;){if(K===u){M=!0,u=S,d=y;break}if(K===d){M=!0,d=S,u=y;break}K=K.sibling}if(!M)throw Error(r(189))}}if(u.alternate!==d)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?i:o}function h(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i;for(i=i.child;i!==null;){if(o=h(i),o!==null)return o;i=i.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),T=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function Z(i){return i===null||typeof i!="object"?null:(i=q&&i[q]||i["@@iterator"],typeof i=="function"?i:null)}var B=Symbol.for("react.client.reference");function z(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===B?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case w:return"Fragment";case E:return"Profiler";case _:return"StrictMode";case A:return"Suspense";case N:return"SuspenseList";case V:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case x:return"Portal";case T:return i.displayName||"Context";case R:return(i._context.displayName||"Context")+".Consumer";case C:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case I:return o=i.displayName||null,o!==null?o:z(i.type)||"Memo";case F:o=i._payload,i=i._init;try{return z(i(o))}catch{}}return null}var L=Array.isArray,H=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},Y=[],D=-1;function $(i){return{current:i}}function G(i){0>D||(i.current=Y[D],Y[D]=null,D--)}function O(i,o){D++,Y[D]=i.current,i.current=o}var J=$(null),ee=$(null),ie=$(null),he=$(null);function le(i,o){switch(O(ie,o),O(ee,i),O(J,null),o.nodeType){case 9:case 11:i=(i=o.documentElement)&&(i=i.namespaceURI)?ew(i):0;break;default:if(i=o.tagName,o=o.namespaceURI)o=ew(o),i=tw(o,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}G(J),O(J,i)}function ke(){G(J),G(ee),G(ie)}function Te(i){i.memoizedState!==null&&O(he,i);var o=J.current,u=tw(o,i.type);o!==u&&(O(ee,i),O(J,u))}function Pe(i){ee.current===i&&(G(J),G(ee)),he.current===i&&(G(he),Cu._currentValue=P)}var ue,Ee;function Ce(i){if(ue===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);ue=o&&o[1]||"",Ee=-1<u.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+ue+i+Ee}var Me=!1;function ve(i,o){if(!i||Me)return"";Me=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(o){var Re=function(){throw Error()};if(Object.defineProperty(Re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Re,[])}catch(ye){var me=ye}Reflect.construct(i,[],Re)}else{try{Re.call()}catch(ye){me=ye}i.call(Re.prototype)}}else{try{throw Error()}catch(ye){me=ye}(Re=i())&&typeof Re.catch=="function"&&Re.catch(function(){})}}catch(ye){if(ye&&me&&typeof ye.stack=="string")return[ye.stack,me.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var S=d.DetermineComponentFrameRoot(),M=S[0],K=S[1];if(M&&K){var X=M.split(`
|
|
4
|
-
`),pe=K.split(`
|
|
5
|
-
`);for(y=d=0;d<X.length&&!X[d].includes("DetermineComponentFrameRoot");)d++;for(;y<pe.length&&!pe[y].includes("DetermineComponentFrameRoot");)y++;if(d===X.length||y===pe.length)for(d=X.length-1,y=pe.length-1;1<=d&&0<=y&&X[d]!==pe[y];)y--;for(;1<=d&&0<=y;d--,y--)if(X[d]!==pe[y]){if(d!==1||y!==1)do if(d--,y--,0>y||X[d]!==pe[y]){var Se=`
|
|
6
|
-
`+X[d].replace(" at new "," at ");return i.displayName&&Se.includes("<anonymous>")&&(Se=Se.replace("<anonymous>",i.displayName)),Se}while(1<=d&&0<=y);break}}}finally{Me=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?Ce(u):""}function xe(i,o){switch(i.tag){case 26:case 27:case 5:return Ce(i.type);case 16:return Ce("Lazy");case 13:return i.child!==o&&o!==null?Ce("Suspense Fallback"):Ce("Suspense");case 19:return Ce("SuspenseList");case 0:case 15:return ve(i.type,!1);case 11:return ve(i.type.render,!1);case 1:return ve(i.type,!0);case 31:return Ce("Activity");default:return""}}function De(i){try{var o="",u=null;do o+=xe(i,u),u=i,i=i.return;while(i);return o}catch(d){return`
|
|
7
|
-
Error generating stack: `+d.message+`
|
|
8
|
-
`+d.stack}}var Ne=Object.prototype.hasOwnProperty,Ie=e.unstable_scheduleCallback,ge=e.unstable_cancelCallback,fe=e.unstable_shouldYield,se=e.unstable_requestPaint,ne=e.unstable_now,_e=e.unstable_getCurrentPriorityLevel,te=e.unstable_ImmediatePriority,ae=e.unstable_UserBlockingPriority,ze=e.unstable_NormalPriority,Ue=e.unstable_LowPriority,Ge=e.unstable_IdlePriority,Ye=e.log,rt=e.unstable_setDisableYieldValue,st=null,ot=null;function Et(i){if(typeof Ye=="function"&&rt(i),ot&&typeof ot.setStrictMode=="function")try{ot.setStrictMode(st,i)}catch{}}var it=Math.clz32?Math.clz32:Dt,vt=Math.log,Xe=Math.LN2;function Dt(i){return i>>>=0,i===0?32:31-(vt(i)/Xe|0)|0}var Fe=256,Ze=262144,ft=4194304;function Qe(i){var o=i&42;if(o!==0)return o;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function W(i,o,u){var d=i.pendingLanes;if(d===0)return 0;var y=0,S=i.suspendedLanes,M=i.pingedLanes;i=i.warmLanes;var K=d&134217727;return K!==0?(d=K&~S,d!==0?y=Qe(d):(M&=K,M!==0?y=Qe(M):u||(u=K&~i,u!==0&&(y=Qe(u))))):(K=d&~S,K!==0?y=Qe(K):M!==0?y=Qe(M):u||(u=d&~i,u!==0&&(y=Qe(u)))),y===0?0:o!==0&&o!==y&&(o&S)===0&&(S=y&-y,u=o&-o,S>=u||S===32&&(u&4194048)!==0)?o:y}function ce(i,o){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&o)===0}function Ae(i,o){switch(i){case 1:case 2:case 4:case 8:case 64:return o+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 o+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 Ve(){var i=ft;return ft<<=1,(ft&62914560)===0&&(ft=4194304),i}function St(i){for(var o=[],u=0;31>u;u++)o.push(i);return o}function At(i,o){i.pendingLanes|=o,o!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function qe(i,o,u,d,y,S){var M=i.pendingLanes;i.pendingLanes=u,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=u,i.entangledLanes&=u,i.errorRecoveryDisabledLanes&=u,i.shellSuspendCounter=0;var K=i.entanglements,X=i.expirationTimes,pe=i.hiddenUpdates;for(u=M&~u;0<u;){var Se=31-it(u),Re=1<<Se;K[Se]=0,X[Se]=-1;var me=pe[Se];if(me!==null)for(pe[Se]=null,Se=0;Se<me.length;Se++){var ye=me[Se];ye!==null&&(ye.lane&=-536870913)}u&=~Re}d!==0&&$e(i,d,0),S!==0&&y===0&&i.tag!==0&&(i.suspendedLanes|=S&~(M&~o))}function $e(i,o,u){i.pendingLanes|=o,i.suspendedLanes&=~o;var d=31-it(o);i.entangledLanes|=o,i.entanglements[d]=i.entanglements[d]|1073741824|u&261930}function be(i,o){var u=i.entangledLanes|=o;for(i=i.entanglements;u;){var d=31-it(u),y=1<<d;y&o|i[d]&o&&(i[d]|=o),u&=~y}}function Nt(i,o){var u=o&-o;return u=(u&42)!==0?1:We(u),(u&(i.suspendedLanes|o))!==0?0:u}function We(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function ht(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Qt(){var i=U.p;return i!==0?i:(i=window.event,i===void 0?32:Ew(i.type))}function Jt(i,o){var u=U.p;try{return U.p=i,o()}finally{U.p=u}}var Gt=Math.random().toString(36).slice(2),wt="__reactFiber$"+Gt,Kn="__reactProps$"+Gt,vi="__reactContainer$"+Gt,xo="__reactEvents$"+Gt,cf="__reactListeners$"+Gt,ha="__reactHandles$"+Gt,ff="__reactResources$"+Gt,So="__reactMarker$"+Gt;function Bl(i){delete i[wt],delete i[Kn],delete i[xo],delete i[cf],delete i[ha]}function yr(i){var o=i[wt];if(o)return o;for(var u=i.parentNode;u;){if(o=u[vi]||u[wt]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(i=lw(i);i!==null;){if(u=i[wt])return u;i=lw(i)}return o}i=u,u=i.parentNode}return null}function Vi(i){if(i=i[wt]||i[vi]){var o=i.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return i}return null}function As(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i.stateNode;throw Error(r(33))}function Ns(i){var o=i[ff];return o||(o=i[ff]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Pn(i){i[So]=!0}var df=new Set,wo={};function Ki(i,o){je(i,o),je(i+"Capture",o)}function je(i,o){for(wo[i]=o,i=0;i<o.length;i++)df.add(o[i])}var at=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]*$"),zt={},en={};function In(i){return Ne.call(en,i)?!0:Ne.call(zt,i)?!1:at.test(i)?en[i]=!0:(zt[i]=!0,!1)}function lr(i,o,u){if(In(o))if(u===null)i.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":i.removeAttribute(o);return;case"boolean":var d=o.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){i.removeAttribute(o);return}}i.setAttribute(o,""+u)}}function Br(i,o,u){if(u===null)i.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(o);return}i.setAttribute(o,""+u)}}function Tr(i,o,u,d){if(d===null)i.removeAttribute(u);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttributeNS(o,u,""+d)}}function hn(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Fr(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function pf(i,o,u){var d=Object.getOwnPropertyDescriptor(i.constructor.prototype,o);if(!i.hasOwnProperty(o)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var y=d.get,S=d.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return y.call(this)},set:function(M){u=""+M,S.call(this,M)}}),Object.defineProperty(i,o,{enumerable:d.enumerable}),{getValue:function(){return u},setValue:function(M){u=""+M},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function ma(i){if(!i._valueTracker){var o=Fr(i)?"checked":"value";i._valueTracker=pf(i,o,""+i[o])}}function Fl(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var u=o.getValue(),d="";return i&&(d=Fr(i)?i.checked?"true":"false":i.value),i=d,i!==u?(o.setValue(i),!0):!1}function ga(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var Jh=/[\n"\\]/g;function _r(i){return i.replace(Jh,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Ul(i,o,u,d,y,S,M,K){i.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?i.type=M:i.removeAttribute("type"),o!=null?M==="number"?(o===0&&i.value===""||i.value!=o)&&(i.value=""+hn(o)):i.value!==""+hn(o)&&(i.value=""+hn(o)):M!=="submit"&&M!=="reset"||i.removeAttribute("value"),o!=null?ba(i,M,hn(o)):u!=null?ba(i,M,hn(u)):d!=null&&i.removeAttribute("value"),y==null&&S!=null&&(i.defaultChecked=!!S),y!=null&&(i.checked=y&&typeof y!="function"&&typeof y!="symbol"),K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?i.name=""+hn(K):i.removeAttribute("name")}function Eo(i,o,u,d,y,S,M,K){if(S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(i.type=S),o!=null||u!=null){if(!(S!=="submit"&&S!=="reset"||o!=null)){ma(i);return}u=u!=null?""+hn(u):"",o=o!=null?""+hn(o):u,K||o===i.value||(i.value=o),i.defaultValue=o}d=d??y,d=typeof d!="function"&&typeof d!="symbol"&&!!d,i.checked=K?i.checked:!!d,i.defaultChecked=!!d,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(i.name=M),ma(i)}function ba(i,o,u){o==="number"&&ga(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function er(i,o,u,d){if(i=i.options,o){o={};for(var y=0;y<u.length;y++)o["$"+u[y]]=!0;for(u=0;u<i.length;u++)y=o.hasOwnProperty("$"+i[u].value),i[u].selected!==y&&(i[u].selected=y),y&&d&&(i[u].defaultSelected=!0)}else{for(u=""+hn(u),o=null,y=0;y<i.length;y++){if(i[y].value===u){i[y].selected=!0,d&&(i[y].defaultSelected=!0);return}o!==null||i[y].disabled||(o=i[y])}o!==null&&(o.selected=!0)}}function hf(i,o,u){if(o!=null&&(o=""+hn(o),o!==i.value&&(i.value=o),u==null)){i.defaultValue!==o&&(i.defaultValue=o);return}i.defaultValue=u!=null?""+hn(u):""}function ya(i,o,u,d){if(o==null){if(d!=null){if(u!=null)throw Error(r(92));if(L(d)){if(1<d.length)throw Error(r(93));d=d[0]}u=d}u==null&&(u=""),o=u}u=hn(o),i.defaultValue=u,d=i.textContent,d===u&&d!==""&&d!==null&&(i.value=d),ma(i)}function mt(i,o){if(o){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=o;return}}i.textContent=o}var mf=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 $n(i,o,u){var d=o.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?d?i.setProperty(o,""):o==="float"?i.cssFloat="":i[o]="":d?i.setProperty(o,u):typeof u!="number"||u===0||mf.has(o)?o==="float"?i.cssFloat=u:i[o]=(""+u).trim():i[o]=u+"px"}function tn(i,o,u){if(o!=null&&typeof o!="object")throw Error(r(62));if(i=i.style,u!=null){for(var d in u)!u.hasOwnProperty(d)||o!=null&&o.hasOwnProperty(d)||(d.indexOf("--")===0?i.setProperty(d,""):d==="float"?i.cssFloat="":i[d]="");for(var y in o)d=o[y],o.hasOwnProperty(y)&&u[y]!==d&&$n(i,y,d)}else for(var S in o)o.hasOwnProperty(S)&&$n(i,S,o[S])}function Os(i){if(i.indexOf("-")===-1)return!1;switch(i){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 Zi=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"],["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"]]),ql=/^[\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 Ms(i){return ql.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Be(){}var et=null;function _t(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Bt=null,Tn=null;function Jr(i){var o=Vi(i);if(o&&(i=o.stateNode)){var u=i[Kn]||null;e:switch(i=o.stateNode,o.type){case"input":if(Ul(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),o=u.name,u.type==="radio"&&o!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+_r(""+o)+'"][type="radio"]'),o=0;o<u.length;o++){var d=u[o];if(d!==i&&d.form===i.form){var y=d[Kn]||null;if(!y)throw Error(r(90));Ul(d,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(o=0;o<u.length;o++)d=u[o],d.form===i.form&&Fl(d)}break e;case"textarea":hf(i,u.value,u.defaultValue);break e;case"select":o=u.value,o!=null&&er(i,!!u.multiple,o,!1)}}}var Hl=!1;function gf(i,o,u){if(Hl)return i(o,u);Hl=!0;try{var d=i(o);return d}finally{if(Hl=!1,(Bt!==null||Tn!==null)&&(rd(),Bt&&(o=Bt,i=Tn,Tn=Bt=null,Jr(o),i)))for(o=0;o<i.length;o++)Jr(i[o])}}function Gl(i,o){var u=i.stateNode;if(u===null)return null;var d=u[Kn]||null;if(d===null)return null;u=d[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(i=i.type,d=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!d;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(r(231,o,typeof u));return u}var Wi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),em=!1;if(Wi)try{var Vl={};Object.defineProperty(Vl,"passive",{get:function(){em=!0}}),window.addEventListener("test",Vl,Vl),window.removeEventListener("test",Vl,Vl)}catch{em=!1}var Is=null,tm=null,bf=null;function tx(){if(bf)return bf;var i,o=tm,u=o.length,d,y="value"in Is?Is.value:Is.textContent,S=y.length;for(i=0;i<u&&o[i]===y[i];i++);var M=u-i;for(d=1;d<=M&&o[u-d]===y[S-d];d++);return bf=y.slice(i,1<d?1-d:void 0)}function yf(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function vf(){return!0}function nx(){return!1}function Rr(i){function o(u,d,y,S,M){this._reactName=u,this._targetInst=y,this.type=d,this.nativeEvent=S,this.target=M,this.currentTarget=null;for(var K in i)i.hasOwnProperty(K)&&(u=i[K],this[K]=u?u(S):S[K]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?vf:nx,this.isPropagationStopped=nx,this}return m(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=vf)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=vf)},persist:function(){},isPersistent:vf}),o}var To={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},kf=Rr(To),Kl=m({},To,{view:0,detail:0}),pI=Rr(Kl),nm,rm,Zl,xf=m({},Kl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:sm,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Zl&&(Zl&&i.type==="mousemove"?(nm=i.screenX-Zl.screenX,rm=i.screenY-Zl.screenY):rm=nm=0,Zl=i),nm)},movementY:function(i){return"movementY"in i?i.movementY:rm}}),rx=Rr(xf),hI=m({},xf,{dataTransfer:0}),mI=Rr(hI),gI=m({},Kl,{relatedTarget:0}),im=Rr(gI),bI=m({},To,{animationName:0,elapsedTime:0,pseudoElement:0}),yI=Rr(bI),vI=m({},To,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),kI=Rr(vI),xI=m({},To,{data:0}),ix=Rr(xI),SI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wI={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"},EI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function TI(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=EI[i])?!!o[i]:!1}function sm(){return TI}var _I=m({},Kl,{key:function(i){if(i.key){var o=SI[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=yf(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?wI[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:sm,charCode:function(i){return i.type==="keypress"?yf(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?yf(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),RI=Rr(_I),CI=m({},xf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sx=Rr(CI),AI=m({},Kl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:sm}),NI=Rr(AI),OI=m({},To,{propertyName:0,elapsedTime:0,pseudoElement:0}),MI=Rr(OI),II=m({},xf,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),DI=Rr(II),zI=m({},To,{newState:0,oldState:0}),jI=Rr(zI),LI=[9,13,27,32],om=Wi&&"CompositionEvent"in window,Wl=null;Wi&&"documentMode"in document&&(Wl=document.documentMode);var PI=Wi&&"TextEvent"in window&&!Wl,ox=Wi&&(!om||Wl&&8<Wl&&11>=Wl),ax=" ",lx=!1;function ux(i,o){switch(i){case"keyup":return LI.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cx(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var va=!1;function $I(i,o){switch(i){case"compositionend":return cx(o);case"keypress":return o.which!==32?null:(lx=!0,ax);case"textInput":return i=o.data,i===ax&&lx?null:i;default:return null}}function BI(i,o){if(va)return i==="compositionend"||!om&&ux(i,o)?(i=tx(),bf=tm=Is=null,va=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return ox&&o.locale!=="ko"?null:o.data;default:return null}}var FI={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 fx(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!FI[i.type]:o==="textarea"}function dx(i,o,u,d){Bt?Tn?Tn.push(d):Tn=[d]:Bt=d,o=cd(o,"onChange"),0<o.length&&(u=new kf("onChange","change",null,u,d),i.push({event:u,listeners:o}))}var Yl=null,Xl=null;function UI(i){ZS(i,0)}function Sf(i){var o=As(i);if(Fl(o))return i}function px(i,o){if(i==="change")return o}var hx=!1;if(Wi){var am;if(Wi){var lm="oninput"in document;if(!lm){var mx=document.createElement("div");mx.setAttribute("oninput","return;"),lm=typeof mx.oninput=="function"}am=lm}else am=!1;hx=am&&(!document.documentMode||9<document.documentMode)}function gx(){Yl&&(Yl.detachEvent("onpropertychange",bx),Xl=Yl=null)}function bx(i){if(i.propertyName==="value"&&Sf(Xl)){var o=[];dx(o,Xl,i,_t(i)),gf(UI,o)}}function qI(i,o,u){i==="focusin"?(gx(),Yl=o,Xl=u,Yl.attachEvent("onpropertychange",bx)):i==="focusout"&&gx()}function HI(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Sf(Xl)}function GI(i,o){if(i==="click")return Sf(o)}function VI(i,o){if(i==="input"||i==="change")return Sf(o)}function KI(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Ur=typeof Object.is=="function"?Object.is:KI;function Ql(i,o){if(Ur(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var u=Object.keys(i),d=Object.keys(o);if(u.length!==d.length)return!1;for(d=0;d<u.length;d++){var y=u[d];if(!Ne.call(o,y)||!Ur(i[y],o[y]))return!1}return!0}function yx(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function vx(i,o){var u=yx(i);i=0;for(var d;u;){if(u.nodeType===3){if(d=i+u.textContent.length,i<=o&&d>=o)return{node:u,offset:o-i};i=d}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=yx(u)}}function kx(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?kx(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function xx(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=ga(i.document);o instanceof i.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)i=o.contentWindow;else break;o=ga(i.document)}return o}function um(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}var ZI=Wi&&"documentMode"in document&&11>=document.documentMode,ka=null,cm=null,Jl=null,fm=!1;function Sx(i,o,u){var d=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;fm||ka==null||ka!==ga(d)||(d=ka,"selectionStart"in d&&um(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Jl&&Ql(Jl,d)||(Jl=d,d=cd(cm,"onSelect"),0<d.length&&(o=new kf("onSelect","select",null,o,u),i.push({event:o,listeners:d}),o.target=ka)))}function _o(i,o){var u={};return u[i.toLowerCase()]=o.toLowerCase(),u["Webkit"+i]="webkit"+o,u["Moz"+i]="moz"+o,u}var xa={animationend:_o("Animation","AnimationEnd"),animationiteration:_o("Animation","AnimationIteration"),animationstart:_o("Animation","AnimationStart"),transitionrun:_o("Transition","TransitionRun"),transitionstart:_o("Transition","TransitionStart"),transitioncancel:_o("Transition","TransitionCancel"),transitionend:_o("Transition","TransitionEnd")},dm={},wx={};Wi&&(wx=document.createElement("div").style,"AnimationEvent"in window||(delete xa.animationend.animation,delete xa.animationiteration.animation,delete xa.animationstart.animation),"TransitionEvent"in window||delete xa.transitionend.transition);function Ro(i){if(dm[i])return dm[i];if(!xa[i])return i;var o=xa[i],u;for(u in o)if(o.hasOwnProperty(u)&&u in wx)return dm[i]=o[u];return i}var Ex=Ro("animationend"),Tx=Ro("animationiteration"),_x=Ro("animationstart"),WI=Ro("transitionrun"),YI=Ro("transitionstart"),XI=Ro("transitioncancel"),Rx=Ro("transitionend"),Cx=new Map,pm="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");pm.push("scrollEnd");function ki(i,o){Cx.set(i,o),Ki(o,[i])}var wf=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},ei=[],Sa=0,hm=0;function Ef(){for(var i=Sa,o=hm=Sa=0;o<i;){var u=ei[o];ei[o++]=null;var d=ei[o];ei[o++]=null;var y=ei[o];ei[o++]=null;var S=ei[o];if(ei[o++]=null,d!==null&&y!==null){var M=d.pending;M===null?y.next=y:(y.next=M.next,M.next=y),d.pending=y}S!==0&&Ax(u,y,S)}}function Tf(i,o,u,d){ei[Sa++]=i,ei[Sa++]=o,ei[Sa++]=u,ei[Sa++]=d,hm|=d,i.lanes|=d,i=i.alternate,i!==null&&(i.lanes|=d)}function mm(i,o,u,d){return Tf(i,o,u,d),_f(i)}function Co(i,o){return Tf(i,null,null,o),_f(i)}function Ax(i,o,u){i.lanes|=u;var d=i.alternate;d!==null&&(d.lanes|=u);for(var y=!1,S=i.return;S!==null;)S.childLanes|=u,d=S.alternate,d!==null&&(d.childLanes|=u),S.tag===22&&(i=S.stateNode,i===null||i._visibility&1||(y=!0)),i=S,S=S.return;return i.tag===3?(S=i.stateNode,y&&o!==null&&(y=31-it(u),i=S.hiddenUpdates,d=i[y],d===null?i[y]=[o]:d.push(o),o.lane=u|536870912),S):null}function _f(i){if(50<xu)throw xu=0,Eg=null,Error(r(185));for(var o=i.return;o!==null;)i=o,o=i.return;return i.tag===3?i.stateNode:null}var wa={};function QI(i,o,u,d){this.tag=i,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qr(i,o,u,d){return new QI(i,o,u,d)}function gm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Yi(i,o){var u=i.alternate;return u===null?(u=qr(i.tag,o,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=o,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&65011712,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,o=i.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.refCleanup=i.refCleanup,u}function Nx(i,o){i.flags&=65011714;var u=i.alternate;return u===null?(i.childLanes=0,i.lanes=o,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,o=u.dependencies,i.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),i}function Rf(i,o,u,d,y,S){var M=0;if(d=i,typeof i=="function")gm(i)&&(M=1);else if(typeof i=="string")M=rz(i,u,J.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case V:return i=qr(31,u,o,y),i.elementType=V,i.lanes=S,i;case w:return Ao(u.children,y,S,o);case _:M=8,y|=24;break;case E:return i=qr(12,u,o,y|2),i.elementType=E,i.lanes=S,i;case A:return i=qr(13,u,o,y),i.elementType=A,i.lanes=S,i;case N:return i=qr(19,u,o,y),i.elementType=N,i.lanes=S,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:M=10;break e;case R:M=9;break e;case C:M=11;break e;case I:M=14;break e;case F:M=16,d=null;break e}M=29,u=Error(r(130,i===null?"null":typeof i,"")),d=null}return o=qr(M,u,o,y),o.elementType=i,o.type=d,o.lanes=S,o}function Ao(i,o,u,d){return i=qr(7,i,d,o),i.lanes=u,i}function bm(i,o,u){return i=qr(6,i,null,o),i.lanes=u,i}function Ox(i){var o=qr(18,null,null,0);return o.stateNode=i,o}function ym(i,o,u){return o=qr(4,i.children!==null?i.children:[],i.key,o),o.lanes=u,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}var Mx=new WeakMap;function ti(i,o){if(typeof i=="object"&&i!==null){var u=Mx.get(i);return u!==void 0?u:(o={value:i,source:o,stack:De(o)},Mx.set(i,o),o)}return{value:i,source:o,stack:De(o)}}var Ea=[],Ta=0,Cf=null,eu=0,ni=[],ri=0,Ds=null,Ni=1,Oi="";function Xi(i,o){Ea[Ta++]=eu,Ea[Ta++]=Cf,Cf=i,eu=o}function Ix(i,o,u){ni[ri++]=Ni,ni[ri++]=Oi,ni[ri++]=Ds,Ds=i;var d=Ni;i=Oi;var y=32-it(d)-1;d&=~(1<<y),u+=1;var S=32-it(o)+y;if(30<S){var M=y-y%5;S=(d&(1<<M)-1).toString(32),d>>=M,y-=M,Ni=1<<32-it(o)+y|u<<y|d,Oi=S+i}else Ni=1<<S|u<<y|d,Oi=i}function vm(i){i.return!==null&&(Xi(i,1),Ix(i,1,0))}function km(i){for(;i===Cf;)Cf=Ea[--Ta],Ea[Ta]=null,eu=Ea[--Ta],Ea[Ta]=null;for(;i===Ds;)Ds=ni[--ri],ni[ri]=null,Oi=ni[--ri],ni[ri]=null,Ni=ni[--ri],ni[ri]=null}function Dx(i,o){ni[ri++]=Ni,ni[ri++]=Oi,ni[ri++]=Ds,Ni=o.id,Oi=o.overflow,Ds=i}var tr=null,yn=null,Ht=!1,zs=null,ii=!1,xm=Error(r(519));function js(i){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw tu(ti(o,i)),xm}function zx(i){var o=i.stateNode,u=i.type,d=i.memoizedProps;switch(o[wt]=i,o[Kn]=d,u){case"dialog":Pt("cancel",o),Pt("close",o);break;case"iframe":case"object":case"embed":Pt("load",o);break;case"video":case"audio":for(u=0;u<wu.length;u++)Pt(wu[u],o);break;case"source":Pt("error",o);break;case"img":case"image":case"link":Pt("error",o),Pt("load",o);break;case"details":Pt("toggle",o);break;case"input":Pt("invalid",o),Eo(o,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":Pt("invalid",o);break;case"textarea":Pt("invalid",o),ya(o,d.value,d.defaultValue,d.children)}u=d.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||o.textContent===""+u||d.suppressHydrationWarning===!0||QS(o.textContent,u)?(d.popover!=null&&(Pt("beforetoggle",o),Pt("toggle",o)),d.onScroll!=null&&Pt("scroll",o),d.onScrollEnd!=null&&Pt("scrollend",o),d.onClick!=null&&(o.onclick=Be),o=!0):o=!1,o||js(i,!0)}function jx(i){for(tr=i.return;tr;)switch(tr.tag){case 5:case 31:case 13:ii=!1;return;case 27:case 3:ii=!0;return;default:tr=tr.return}}function _a(i){if(i!==tr)return!1;if(!Ht)return jx(i),Ht=!0,!1;var o=i.tag,u;if((u=o!==3&&o!==27)&&((u=o===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||$g(i.type,i.memoizedProps)),u=!u),u&&yn&&js(i),jx(i),o===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));yn=aw(i)}else if(o===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));yn=aw(i)}else o===27?(o=yn,Ys(i.type)?(i=Hg,Hg=null,yn=i):yn=o):yn=tr?oi(i.stateNode.nextSibling):null;return!0}function No(){yn=tr=null,Ht=!1}function Sm(){var i=zs;return i!==null&&(Or===null?Or=i:Or.push.apply(Or,i),zs=null),i}function tu(i){zs===null?zs=[i]:zs.push(i)}var wm=$(null),Oo=null,Qi=null;function Ls(i,o,u){O(wm,o._currentValue),o._currentValue=u}function Ji(i){i._currentValue=wm.current,G(wm)}function Em(i,o,u){for(;i!==null;){var d=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,d!==null&&(d.childLanes|=o)):d!==null&&(d.childLanes&o)!==o&&(d.childLanes|=o),i===u)break;i=i.return}}function Tm(i,o,u,d){var y=i.child;for(y!==null&&(y.return=i);y!==null;){var S=y.dependencies;if(S!==null){var M=y.child;S=S.firstContext;e:for(;S!==null;){var K=S;S=y;for(var X=0;X<o.length;X++)if(K.context===o[X]){S.lanes|=u,K=S.alternate,K!==null&&(K.lanes|=u),Em(S.return,u,i),d||(M=null);break e}S=K.next}}else if(y.tag===18){if(M=y.return,M===null)throw Error(r(341));M.lanes|=u,S=M.alternate,S!==null&&(S.lanes|=u),Em(M,u,i),M=null}else M=y.child;if(M!==null)M.return=y;else for(M=y;M!==null;){if(M===i){M=null;break}if(y=M.sibling,y!==null){y.return=M.return,M=y;break}M=M.return}y=M}}function Ra(i,o,u,d){i=null;for(var y=o,S=!1;y!==null;){if(!S){if((y.flags&524288)!==0)S=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var M=y.alternate;if(M===null)throw Error(r(387));if(M=M.memoizedProps,M!==null){var K=y.type;Ur(y.pendingProps.value,M.value)||(i!==null?i.push(K):i=[K])}}else if(y===he.current){if(M=y.alternate,M===null)throw Error(r(387));M.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(i!==null?i.push(Cu):i=[Cu])}y=y.return}i!==null&&Tm(o,i,u,d),o.flags|=262144}function Af(i){for(i=i.firstContext;i!==null;){if(!Ur(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Mo(i){Oo=i,Qi=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function nr(i){return Lx(Oo,i)}function Nf(i,o){return Oo===null&&Mo(i),Lx(i,o)}function Lx(i,o){var u=o._currentValue;if(o={context:o,memoizedValue:u,next:null},Qi===null){if(i===null)throw Error(r(308));Qi=o,i.dependencies={lanes:0,firstContext:o},i.flags|=524288}else Qi=Qi.next=o;return u}var JI=typeof AbortController<"u"?AbortController:function(){var i=[],o=this.signal={aborted:!1,addEventListener:function(u,d){i.push(d)}};this.abort=function(){o.aborted=!0,i.forEach(function(u){return u()})}},eD=e.unstable_scheduleCallback,tD=e.unstable_NormalPriority,Bn={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _m(){return{controller:new JI,data:new Map,refCount:0}}function nu(i){i.refCount--,i.refCount===0&&eD(tD,function(){i.controller.abort()})}var ru=null,Rm=0,Ca=0,Aa=null;function nD(i,o){if(ru===null){var u=ru=[];Rm=0,Ca=Ng(),Aa={status:"pending",value:void 0,then:function(d){u.push(d)}}}return Rm++,o.then(Px,Px),o}function Px(){if(--Rm===0&&ru!==null){Aa!==null&&(Aa.status="fulfilled");var i=ru;ru=null,Ca=0,Aa=null;for(var o=0;o<i.length;o++)(0,i[o])()}}function rD(i,o){var u=[],d={status:"pending",value:null,reason:null,then:function(y){u.push(y)}};return i.then(function(){d.status="fulfilled",d.value=o;for(var y=0;y<u.length;y++)(0,u[y])(o)},function(y){for(d.status="rejected",d.reason=y,y=0;y<u.length;y++)(0,u[y])(void 0)}),d}var $x=H.S;H.S=function(i,o){SS=ne(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&nD(i,o),$x!==null&&$x(i,o)};var Io=$(null);function Cm(){var i=Io.current;return i!==null?i:fn.pooledCache}function Of(i,o){o===null?O(Io,Io.current):O(Io,o.pool)}function Bx(){var i=Cm();return i===null?null:{parent:Bn._currentValue,pool:i}}var Na=Error(r(460)),Am=Error(r(474)),Mf=Error(r(542)),If={then:function(){}};function Fx(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Ux(i,o,u){switch(u=i[u],u===void 0?i.push(o):u!==o&&(o.then(Be,Be),o=u),o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,Hx(i),i;default:if(typeof o.status=="string")o.then(Be,Be);else{if(i=fn,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=o,i.status="pending",i.then(function(d){if(o.status==="pending"){var y=o;y.status="fulfilled",y.value=d}},function(d){if(o.status==="pending"){var y=o;y.status="rejected",y.reason=d}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,Hx(i),i}throw zo=o,Na}}function Do(i){try{var o=i._init;return o(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(zo=u,Na):u}}var zo=null;function qx(){if(zo===null)throw Error(r(459));var i=zo;return zo=null,i}function Hx(i){if(i===Na||i===Mf)throw Error(r(483))}var Oa=null,iu=0;function Df(i){var o=iu;return iu+=1,Oa===null&&(Oa=[]),Ux(Oa,i,o)}function su(i,o){o=o.props.ref,i.ref=o!==void 0?o:null}function zf(i,o){throw o.$$typeof===g?Error(r(525)):(i=Object.prototype.toString.call(o),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i)))}function Gx(i){function o(oe,re){if(i){var de=oe.deletions;de===null?(oe.deletions=[re],oe.flags|=16):de.push(re)}}function u(oe,re){if(!i)return null;for(;re!==null;)o(oe,re),re=re.sibling;return null}function d(oe){for(var re=new Map;oe!==null;)oe.key!==null?re.set(oe.key,oe):re.set(oe.index,oe),oe=oe.sibling;return re}function y(oe,re){return oe=Yi(oe,re),oe.index=0,oe.sibling=null,oe}function S(oe,re,de){return oe.index=de,i?(de=oe.alternate,de!==null?(de=de.index,de<re?(oe.flags|=67108866,re):de):(oe.flags|=67108866,re)):(oe.flags|=1048576,re)}function M(oe){return i&&oe.alternate===null&&(oe.flags|=67108866),oe}function K(oe,re,de,we){return re===null||re.tag!==6?(re=bm(de,oe.mode,we),re.return=oe,re):(re=y(re,de),re.return=oe,re)}function X(oe,re,de,we){var ct=de.type;return ct===w?Se(oe,re,de.props.children,we,de.key):re!==null&&(re.elementType===ct||typeof ct=="object"&&ct!==null&&ct.$$typeof===F&&Do(ct)===re.type)?(re=y(re,de.props),su(re,de),re.return=oe,re):(re=Rf(de.type,de.key,de.props,null,oe.mode,we),su(re,de),re.return=oe,re)}function pe(oe,re,de,we){return re===null||re.tag!==4||re.stateNode.containerInfo!==de.containerInfo||re.stateNode.implementation!==de.implementation?(re=ym(de,oe.mode,we),re.return=oe,re):(re=y(re,de.children||[]),re.return=oe,re)}function Se(oe,re,de,we,ct){return re===null||re.tag!==7?(re=Ao(de,oe.mode,we,ct),re.return=oe,re):(re=y(re,de),re.return=oe,re)}function Re(oe,re,de){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return re=bm(""+re,oe.mode,de),re.return=oe,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case b:return de=Rf(re.type,re.key,re.props,null,oe.mode,de),su(de,re),de.return=oe,de;case x:return re=ym(re,oe.mode,de),re.return=oe,re;case F:return re=Do(re),Re(oe,re,de)}if(L(re)||Z(re))return re=Ao(re,oe.mode,de,null),re.return=oe,re;if(typeof re.then=="function")return Re(oe,Df(re),de);if(re.$$typeof===T)return Re(oe,Nf(oe,re),de);zf(oe,re)}return null}function me(oe,re,de,we){var ct=re!==null?re.key:null;if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return ct!==null?null:K(oe,re,""+de,we);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case b:return de.key===ct?X(oe,re,de,we):null;case x:return de.key===ct?pe(oe,re,de,we):null;case F:return de=Do(de),me(oe,re,de,we)}if(L(de)||Z(de))return ct!==null?null:Se(oe,re,de,we,null);if(typeof de.then=="function")return me(oe,re,Df(de),we);if(de.$$typeof===T)return me(oe,re,Nf(oe,de),we);zf(oe,de)}return null}function ye(oe,re,de,we,ct){if(typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint")return oe=oe.get(de)||null,K(re,oe,""+we,ct);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case b:return oe=oe.get(we.key===null?de:we.key)||null,X(re,oe,we,ct);case x:return oe=oe.get(we.key===null?de:we.key)||null,pe(re,oe,we,ct);case F:return we=Do(we),ye(oe,re,de,we,ct)}if(L(we)||Z(we))return oe=oe.get(de)||null,Se(re,oe,we,ct,null);if(typeof we.then=="function")return ye(oe,re,de,Df(we),ct);if(we.$$typeof===T)return ye(oe,re,de,Nf(re,we),ct);zf(re,we)}return null}function Je(oe,re,de,we){for(var ct=null,Kt=null,tt=re,Ot=re=0,Ut=null;tt!==null&&Ot<de.length;Ot++){tt.index>Ot?(Ut=tt,tt=null):Ut=tt.sibling;var Zt=me(oe,tt,de[Ot],we);if(Zt===null){tt===null&&(tt=Ut);break}i&&tt&&Zt.alternate===null&&o(oe,tt),re=S(Zt,re,Ot),Kt===null?ct=Zt:Kt.sibling=Zt,Kt=Zt,tt=Ut}if(Ot===de.length)return u(oe,tt),Ht&&Xi(oe,Ot),ct;if(tt===null){for(;Ot<de.length;Ot++)tt=Re(oe,de[Ot],we),tt!==null&&(re=S(tt,re,Ot),Kt===null?ct=tt:Kt.sibling=tt,Kt=tt);return Ht&&Xi(oe,Ot),ct}for(tt=d(tt);Ot<de.length;Ot++)Ut=ye(tt,oe,Ot,de[Ot],we),Ut!==null&&(i&&Ut.alternate!==null&&tt.delete(Ut.key===null?Ot:Ut.key),re=S(Ut,re,Ot),Kt===null?ct=Ut:Kt.sibling=Ut,Kt=Ut);return i&&tt.forEach(function(to){return o(oe,to)}),Ht&&Xi(oe,Ot),ct}function pt(oe,re,de,we){if(de==null)throw Error(r(151));for(var ct=null,Kt=null,tt=re,Ot=re=0,Ut=null,Zt=de.next();tt!==null&&!Zt.done;Ot++,Zt=de.next()){tt.index>Ot?(Ut=tt,tt=null):Ut=tt.sibling;var to=me(oe,tt,Zt.value,we);if(to===null){tt===null&&(tt=Ut);break}i&&tt&&to.alternate===null&&o(oe,tt),re=S(to,re,Ot),Kt===null?ct=to:Kt.sibling=to,Kt=to,tt=Ut}if(Zt.done)return u(oe,tt),Ht&&Xi(oe,Ot),ct;if(tt===null){for(;!Zt.done;Ot++,Zt=de.next())Zt=Re(oe,Zt.value,we),Zt!==null&&(re=S(Zt,re,Ot),Kt===null?ct=Zt:Kt.sibling=Zt,Kt=Zt);return Ht&&Xi(oe,Ot),ct}for(tt=d(tt);!Zt.done;Ot++,Zt=de.next())Zt=ye(tt,oe,Ot,Zt.value,we),Zt!==null&&(i&&Zt.alternate!==null&&tt.delete(Zt.key===null?Ot:Zt.key),re=S(Zt,re,Ot),Kt===null?ct=Zt:Kt.sibling=Zt,Kt=Zt);return i&&tt.forEach(function(hz){return o(oe,hz)}),Ht&&Xi(oe,Ot),ct}function an(oe,re,de,we){if(typeof de=="object"&&de!==null&&de.type===w&&de.key===null&&(de=de.props.children),typeof de=="object"&&de!==null){switch(de.$$typeof){case b:e:{for(var ct=de.key;re!==null;){if(re.key===ct){if(ct=de.type,ct===w){if(re.tag===7){u(oe,re.sibling),we=y(re,de.props.children),we.return=oe,oe=we;break e}}else if(re.elementType===ct||typeof ct=="object"&&ct!==null&&ct.$$typeof===F&&Do(ct)===re.type){u(oe,re.sibling),we=y(re,de.props),su(we,de),we.return=oe,oe=we;break e}u(oe,re);break}else o(oe,re);re=re.sibling}de.type===w?(we=Ao(de.props.children,oe.mode,we,de.key),we.return=oe,oe=we):(we=Rf(de.type,de.key,de.props,null,oe.mode,we),su(we,de),we.return=oe,oe=we)}return M(oe);case x:e:{for(ct=de.key;re!==null;){if(re.key===ct)if(re.tag===4&&re.stateNode.containerInfo===de.containerInfo&&re.stateNode.implementation===de.implementation){u(oe,re.sibling),we=y(re,de.children||[]),we.return=oe,oe=we;break e}else{u(oe,re);break}else o(oe,re);re=re.sibling}we=ym(de,oe.mode,we),we.return=oe,oe=we}return M(oe);case F:return de=Do(de),an(oe,re,de,we)}if(L(de))return Je(oe,re,de,we);if(Z(de)){if(ct=Z(de),typeof ct!="function")throw Error(r(150));return de=ct.call(de),pt(oe,re,de,we)}if(typeof de.then=="function")return an(oe,re,Df(de),we);if(de.$$typeof===T)return an(oe,re,Nf(oe,de),we);zf(oe,de)}return typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint"?(de=""+de,re!==null&&re.tag===6?(u(oe,re.sibling),we=y(re,de),we.return=oe,oe=we):(u(oe,re),we=bm(de,oe.mode,we),we.return=oe,oe=we),M(oe)):u(oe,re)}return function(oe,re,de,we){try{iu=0;var ct=an(oe,re,de,we);return Oa=null,ct}catch(tt){if(tt===Na||tt===Mf)throw tt;var Kt=qr(29,tt,null,oe.mode);return Kt.lanes=we,Kt.return=oe,Kt}}}var jo=Gx(!0),Vx=Gx(!1),Ps=!1;function Nm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Om(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function $s(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Bs(i,o,u){var d=i.updateQueue;if(d===null)return null;if(d=d.shared,(Xt&2)!==0){var y=d.pending;return y===null?o.next=o:(o.next=y.next,y.next=o),d.pending=o,o=_f(i),Ax(i,null,u),o}return Tf(i,d,o,u),_f(i)}function ou(i,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194048)!==0)){var d=o.lanes;d&=i.pendingLanes,u|=d,o.lanes=u,be(i,u)}}function Mm(i,o){var u=i.updateQueue,d=i.alternate;if(d!==null&&(d=d.updateQueue,u===d)){var y=null,S=null;if(u=u.firstBaseUpdate,u!==null){do{var M={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};S===null?y=S=M:S=S.next=M,u=u.next}while(u!==null);S===null?y=S=o:S=S.next=o}else y=S=o;u={baseState:d.baseState,firstBaseUpdate:y,lastBaseUpdate:S,shared:d.shared,callbacks:d.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=o:i.next=o,u.lastBaseUpdate=o}var Im=!1;function au(){if(Im){var i=Aa;if(i!==null)throw i}}function lu(i,o,u,d){Im=!1;var y=i.updateQueue;Ps=!1;var S=y.firstBaseUpdate,M=y.lastBaseUpdate,K=y.shared.pending;if(K!==null){y.shared.pending=null;var X=K,pe=X.next;X.next=null,M===null?S=pe:M.next=pe,M=X;var Se=i.alternate;Se!==null&&(Se=Se.updateQueue,K=Se.lastBaseUpdate,K!==M&&(K===null?Se.firstBaseUpdate=pe:K.next=pe,Se.lastBaseUpdate=X))}if(S!==null){var Re=y.baseState;M=0,Se=pe=X=null,K=S;do{var me=K.lane&-536870913,ye=me!==K.lane;if(ye?(Ft&me)===me:(d&me)===me){me!==0&&me===Ca&&(Im=!0),Se!==null&&(Se=Se.next={lane:0,tag:K.tag,payload:K.payload,callback:null,next:null});e:{var Je=i,pt=K;me=o;var an=u;switch(pt.tag){case 1:if(Je=pt.payload,typeof Je=="function"){Re=Je.call(an,Re,me);break e}Re=Je;break e;case 3:Je.flags=Je.flags&-65537|128;case 0:if(Je=pt.payload,me=typeof Je=="function"?Je.call(an,Re,me):Je,me==null)break e;Re=m({},Re,me);break e;case 2:Ps=!0}}me=K.callback,me!==null&&(i.flags|=64,ye&&(i.flags|=8192),ye=y.callbacks,ye===null?y.callbacks=[me]:ye.push(me))}else ye={lane:me,tag:K.tag,payload:K.payload,callback:K.callback,next:null},Se===null?(pe=Se=ye,X=Re):Se=Se.next=ye,M|=me;if(K=K.next,K===null){if(K=y.shared.pending,K===null)break;ye=K,K=ye.next,ye.next=null,y.lastBaseUpdate=ye,y.shared.pending=null}}while(!0);Se===null&&(X=Re),y.baseState=X,y.firstBaseUpdate=pe,y.lastBaseUpdate=Se,S===null&&(y.shared.lanes=0),Gs|=M,i.lanes=M,i.memoizedState=Re}}function Kx(i,o){if(typeof i!="function")throw Error(r(191,i));i.call(o)}function Zx(i,o){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)Kx(u[i],o)}var Ma=$(null),jf=$(0);function Wx(i,o){i=ls,O(jf,i),O(Ma,o),ls=i|o.baseLanes}function Dm(){O(jf,ls),O(Ma,Ma.current)}function zm(){ls=jf.current,G(Ma),G(jf)}var Hr=$(null),si=null;function Fs(i){var o=i.alternate;O(Dn,Dn.current&1),O(Hr,i),si===null&&(o===null||Ma.current!==null||o.memoizedState!==null)&&(si=i)}function jm(i){O(Dn,Dn.current),O(Hr,i),si===null&&(si=i)}function Yx(i){i.tag===22?(O(Dn,Dn.current),O(Hr,i),si===null&&(si=i)):Us()}function Us(){O(Dn,Dn.current),O(Hr,Hr.current)}function Gr(i){G(Hr),si===i&&(si=null),G(Dn)}var Dn=$(0);function Lf(i){for(var o=i;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Ug(u)||qg(u)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var es=0,Ct=null,sn=null,Fn=null,Pf=!1,Ia=!1,Lo=!1,$f=0,uu=0,Da=null,iD=0;function An(){throw Error(r(321))}function Lm(i,o){if(o===null)return!1;for(var u=0;u<o.length&&u<i.length;u++)if(!Ur(i[u],o[u]))return!1;return!0}function Pm(i,o,u,d,y,S){return es=S,Ct=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,H.H=i===null||i.memoizedState===null?I0:Jm,Lo=!1,S=u(d,y),Lo=!1,Ia&&(S=Qx(o,u,d,y)),Xx(i),S}function Xx(i){H.H=du;var o=sn!==null&&sn.next!==null;if(es=0,Fn=sn=Ct=null,Pf=!1,uu=0,Da=null,o)throw Error(r(300));i===null||Un||(i=i.dependencies,i!==null&&Af(i)&&(Un=!0))}function Qx(i,o,u,d){Ct=i;var y=0;do{if(Ia&&(Da=null),uu=0,Ia=!1,25<=y)throw Error(r(301));if(y+=1,Fn=sn=null,i.updateQueue!=null){var S=i.updateQueue;S.lastEffect=null,S.events=null,S.stores=null,S.memoCache!=null&&(S.memoCache.index=0)}H.H=D0,S=o(u,d)}while(Ia);return S}function sD(){var i=H.H,o=i.useState()[0];return o=typeof o.then=="function"?cu(o):o,i=i.useState()[0],(sn!==null?sn.memoizedState:null)!==i&&(Ct.flags|=1024),o}function $m(){var i=$f!==0;return $f=0,i}function Bm(i,o,u){o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~u}function Fm(i){if(Pf){for(i=i.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}Pf=!1}es=0,Fn=sn=Ct=null,Ia=!1,uu=$f=0,Da=null}function vr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fn===null?Ct.memoizedState=Fn=i:Fn=Fn.next=i,Fn}function zn(){if(sn===null){var i=Ct.alternate;i=i!==null?i.memoizedState:null}else i=sn.next;var o=Fn===null?Ct.memoizedState:Fn.next;if(o!==null)Fn=o,sn=i;else{if(i===null)throw Ct.alternate===null?Error(r(467)):Error(r(310));sn=i,i={memoizedState:sn.memoizedState,baseState:sn.baseState,baseQueue:sn.baseQueue,queue:sn.queue,next:null},Fn===null?Ct.memoizedState=Fn=i:Fn=Fn.next=i}return Fn}function Bf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cu(i){var o=uu;return uu+=1,Da===null&&(Da=[]),i=Ux(Da,i,o),o=Ct,(Fn===null?o.memoizedState:Fn.next)===null&&(o=o.alternate,H.H=o===null||o.memoizedState===null?I0:Jm),i}function Ff(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return cu(i);if(i.$$typeof===T)return nr(i)}throw Error(r(438,String(i)))}function Um(i){var o=null,u=Ct.updateQueue;if(u!==null&&(o=u.memoCache),o==null){var d=Ct.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(o={data:d.data.map(function(y){return y.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),u===null&&(u=Bf(),Ct.updateQueue=u),u.memoCache=o,u=o.data[o.index],u===void 0)for(u=o.data[o.index]=Array(i),d=0;d<i;d++)u[d]=j;return o.index++,u}function ts(i,o){return typeof o=="function"?o(i):o}function Uf(i){var o=zn();return qm(o,sn,i)}function qm(i,o,u){var d=i.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=u;var y=i.baseQueue,S=d.pending;if(S!==null){if(y!==null){var M=y.next;y.next=S.next,S.next=M}o.baseQueue=y=S,d.pending=null}if(S=i.baseState,y===null)i.memoizedState=S;else{o=y.next;var K=M=null,X=null,pe=o,Se=!1;do{var Re=pe.lane&-536870913;if(Re!==pe.lane?(Ft&Re)===Re:(es&Re)===Re){var me=pe.revertLane;if(me===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null}),Re===Ca&&(Se=!0);else if((es&me)===me){pe=pe.next,me===Ca&&(Se=!0);continue}else Re={lane:0,revertLane:pe.revertLane,gesture:null,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null},X===null?(K=X=Re,M=S):X=X.next=Re,Ct.lanes|=me,Gs|=me;Re=pe.action,Lo&&u(S,Re),S=pe.hasEagerState?pe.eagerState:u(S,Re)}else me={lane:Re,revertLane:pe.revertLane,gesture:pe.gesture,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null},X===null?(K=X=me,M=S):X=X.next=me,Ct.lanes|=Re,Gs|=Re;pe=pe.next}while(pe!==null&&pe!==o);if(X===null?M=S:X.next=K,!Ur(S,i.memoizedState)&&(Un=!0,Se&&(u=Aa,u!==null)))throw u;i.memoizedState=S,i.baseState=M,i.baseQueue=X,d.lastRenderedState=S}return y===null&&(d.lanes=0),[i.memoizedState,d.dispatch]}function Hm(i){var o=zn(),u=o.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var d=u.dispatch,y=u.pending,S=o.memoizedState;if(y!==null){u.pending=null;var M=y=y.next;do S=i(S,M.action),M=M.next;while(M!==y);Ur(S,o.memoizedState)||(Un=!0),o.memoizedState=S,o.baseQueue===null&&(o.baseState=S),u.lastRenderedState=S}return[S,d]}function Jx(i,o,u){var d=Ct,y=zn(),S=Ht;if(S){if(u===void 0)throw Error(r(407));u=u()}else u=o();var M=!Ur((sn||y).memoizedState,u);if(M&&(y.memoizedState=u,Un=!0),y=y.queue,Km(n0.bind(null,d,y,i),[i]),y.getSnapshot!==o||M||Fn!==null&&Fn.memoizedState.tag&1){if(d.flags|=2048,za(9,{destroy:void 0},t0.bind(null,d,y,u,o),null),fn===null)throw Error(r(349));S||(es&127)!==0||e0(d,o,u)}return u}function e0(i,o,u){i.flags|=16384,i={getSnapshot:o,value:u},o=Ct.updateQueue,o===null?(o=Bf(),Ct.updateQueue=o,o.stores=[i]):(u=o.stores,u===null?o.stores=[i]:u.push(i))}function t0(i,o,u,d){o.value=u,o.getSnapshot=d,r0(o)&&i0(i)}function n0(i,o,u){return u(function(){r0(o)&&i0(i)})}function r0(i){var o=i.getSnapshot;i=i.value;try{var u=o();return!Ur(i,u)}catch{return!0}}function i0(i){var o=Co(i,2);o!==null&&Mr(o,i,2)}function Gm(i){var o=vr();if(typeof i=="function"){var u=i;if(i=u(),Lo){Et(!0);try{u()}finally{Et(!1)}}}return o.memoizedState=o.baseState=i,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:i},o}function s0(i,o,u,d){return i.baseState=u,qm(i,sn,typeof d=="function"?d:ts)}function oD(i,o,u,d,y){if(Gf(i))throw Error(r(485));if(i=o.action,i!==null){var S={payload:y,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){S.listeners.push(M)}};H.T!==null?u(!0):S.isTransition=!1,d(S),u=o.pending,u===null?(S.next=o.pending=S,o0(o,S)):(S.next=u.next,o.pending=u.next=S)}}function o0(i,o){var u=o.action,d=o.payload,y=i.state;if(o.isTransition){var S=H.T,M={};H.T=M;try{var K=u(y,d),X=H.S;X!==null&&X(M,K),a0(i,o,K)}catch(pe){Vm(i,o,pe)}finally{S!==null&&M.types!==null&&(S.types=M.types),H.T=S}}else try{S=u(y,d),a0(i,o,S)}catch(pe){Vm(i,o,pe)}}function a0(i,o,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(d){l0(i,o,d)},function(d){return Vm(i,o,d)}):l0(i,o,u)}function l0(i,o,u){o.status="fulfilled",o.value=u,u0(o),i.state=u,o=i.pending,o!==null&&(u=o.next,u===o?i.pending=null:(u=u.next,o.next=u,o0(i,u)))}function Vm(i,o,u){var d=i.pending;if(i.pending=null,d!==null){d=d.next;do o.status="rejected",o.reason=u,u0(o),o=o.next;while(o!==d)}i.action=null}function u0(i){i=i.listeners;for(var o=0;o<i.length;o++)(0,i[o])()}function c0(i,o){return o}function f0(i,o){if(Ht){var u=fn.formState;if(u!==null){e:{var d=Ct;if(Ht){if(yn){t:{for(var y=yn,S=ii;y.nodeType!==8;){if(!S){y=null;break t}if(y=oi(y.nextSibling),y===null){y=null;break t}}S=y.data,y=S==="F!"||S==="F"?y:null}if(y){yn=oi(y.nextSibling),d=y.data==="F!";break e}}js(d)}d=!1}d&&(o=u[0])}}return u=vr(),u.memoizedState=u.baseState=o,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:c0,lastRenderedState:o},u.queue=d,u=N0.bind(null,Ct,d),d.dispatch=u,d=Gm(!1),S=Qm.bind(null,Ct,!1,d.queue),d=vr(),y={state:o,dispatch:null,action:i,pending:null},d.queue=y,u=oD.bind(null,Ct,y,S,u),y.dispatch=u,d.memoizedState=i,[o,u,!1]}function d0(i){var o=zn();return p0(o,sn,i)}function p0(i,o,u){if(o=qm(i,o,c0)[0],i=Uf(ts)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var d=cu(o)}catch(M){throw M===Na?Mf:M}else d=o;o=zn();var y=o.queue,S=y.dispatch;return u!==o.memoizedState&&(Ct.flags|=2048,za(9,{destroy:void 0},aD.bind(null,y,u),null)),[d,S,i]}function aD(i,o){i.action=o}function h0(i){var o=zn(),u=sn;if(u!==null)return p0(o,u,i);zn(),o=o.memoizedState,u=zn();var d=u.queue.dispatch;return u.memoizedState=i,[o,d,!1]}function za(i,o,u,d){return i={tag:i,create:u,deps:d,inst:o,next:null},o=Ct.updateQueue,o===null&&(o=Bf(),Ct.updateQueue=o),u=o.lastEffect,u===null?o.lastEffect=i.next=i:(d=u.next,u.next=i,i.next=d,o.lastEffect=i),i}function m0(){return zn().memoizedState}function qf(i,o,u,d){var y=vr();Ct.flags|=i,y.memoizedState=za(1|o,{destroy:void 0},u,d===void 0?null:d)}function Hf(i,o,u,d){var y=zn();d=d===void 0?null:d;var S=y.memoizedState.inst;sn!==null&&d!==null&&Lm(d,sn.memoizedState.deps)?y.memoizedState=za(o,S,u,d):(Ct.flags|=i,y.memoizedState=za(1|o,S,u,d))}function g0(i,o){qf(8390656,8,i,o)}function Km(i,o){Hf(2048,8,i,o)}function lD(i){Ct.flags|=4;var o=Ct.updateQueue;if(o===null)o=Bf(),Ct.updateQueue=o,o.events=[i];else{var u=o.events;u===null?o.events=[i]:u.push(i)}}function b0(i){var o=zn().memoizedState;return lD({ref:o,nextImpl:i}),function(){if((Xt&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function y0(i,o){return Hf(4,2,i,o)}function v0(i,o){return Hf(4,4,i,o)}function k0(i,o){if(typeof o=="function"){i=i();var u=o(i);return function(){typeof u=="function"?u():o(null)}}if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function x0(i,o,u){u=u!=null?u.concat([i]):null,Hf(4,4,k0.bind(null,o,i),u)}function Zm(){}function S0(i,o){var u=zn();o=o===void 0?null:o;var d=u.memoizedState;return o!==null&&Lm(o,d[1])?d[0]:(u.memoizedState=[i,o],i)}function w0(i,o){var u=zn();o=o===void 0?null:o;var d=u.memoizedState;if(o!==null&&Lm(o,d[1]))return d[0];if(d=i(),Lo){Et(!0);try{i()}finally{Et(!1)}}return u.memoizedState=[d,o],d}function Wm(i,o,u){return u===void 0||(es&1073741824)!==0&&(Ft&261930)===0?i.memoizedState=o:(i.memoizedState=u,i=ES(),Ct.lanes|=i,Gs|=i,u)}function E0(i,o,u,d){return Ur(u,o)?u:Ma.current!==null?(i=Wm(i,u,d),Ur(i,o)||(Un=!0),i):(es&42)===0||(es&1073741824)!==0&&(Ft&261930)===0?(Un=!0,i.memoizedState=u):(i=ES(),Ct.lanes|=i,Gs|=i,o)}function T0(i,o,u,d,y){var S=U.p;U.p=S!==0&&8>S?S:8;var M=H.T,K={};H.T=K,Qm(i,!1,o,u);try{var X=y(),pe=H.S;if(pe!==null&&pe(K,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var Se=rD(X,d);fu(i,o,Se,Zr(i))}else fu(i,o,d,Zr(i))}catch(Re){fu(i,o,{then:function(){},status:"rejected",reason:Re},Zr())}finally{U.p=S,M!==null&&K.types!==null&&(M.types=K.types),H.T=M}}function uD(){}function Ym(i,o,u,d){if(i.tag!==5)throw Error(r(476));var y=_0(i).queue;T0(i,y,o,P,u===null?uD:function(){return R0(i),u(d)})}function _0(i){var o=i.memoizedState;if(o!==null)return o;o={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:P},next:null};var u={};return o.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:u},next:null},i.memoizedState=o,i=i.alternate,i!==null&&(i.memoizedState=o),o}function R0(i){var o=_0(i);o.next===null&&(o=i.alternate.memoizedState),fu(i,o.next.queue,{},Zr())}function Xm(){return nr(Cu)}function C0(){return zn().memoizedState}function A0(){return zn().memoizedState}function cD(i){for(var o=i.return;o!==null;){switch(o.tag){case 24:case 3:var u=Zr();i=$s(u);var d=Bs(o,i,u);d!==null&&(Mr(d,o,u),ou(d,o,u)),o={cache:_m()},i.payload=o;return}o=o.return}}function fD(i,o,u){var d=Zr();u={lane:d,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Gf(i)?O0(o,u):(u=mm(i,o,u,d),u!==null&&(Mr(u,i,d),M0(u,o,d)))}function N0(i,o,u){var d=Zr();fu(i,o,u,d)}function fu(i,o,u,d){var y={lane:d,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Gf(i))O0(o,y);else{var S=i.alternate;if(i.lanes===0&&(S===null||S.lanes===0)&&(S=o.lastRenderedReducer,S!==null))try{var M=o.lastRenderedState,K=S(M,u);if(y.hasEagerState=!0,y.eagerState=K,Ur(K,M))return Tf(i,o,y,0),fn===null&&Ef(),!1}catch{}if(u=mm(i,o,y,d),u!==null)return Mr(u,i,d),M0(u,o,d),!0}return!1}function Qm(i,o,u,d){if(d={lane:2,revertLane:Ng(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Gf(i)){if(o)throw Error(r(479))}else o=mm(i,u,d,2),o!==null&&Mr(o,i,2)}function Gf(i){var o=i.alternate;return i===Ct||o!==null&&o===Ct}function O0(i,o){Ia=Pf=!0;var u=i.pending;u===null?o.next=o:(o.next=u.next,u.next=o),i.pending=o}function M0(i,o,u){if((u&4194048)!==0){var d=o.lanes;d&=i.pendingLanes,u|=d,o.lanes=u,be(i,u)}}var du={readContext:nr,use:Ff,useCallback:An,useContext:An,useEffect:An,useImperativeHandle:An,useLayoutEffect:An,useInsertionEffect:An,useMemo:An,useReducer:An,useRef:An,useState:An,useDebugValue:An,useDeferredValue:An,useTransition:An,useSyncExternalStore:An,useId:An,useHostTransitionStatus:An,useFormState:An,useActionState:An,useOptimistic:An,useMemoCache:An,useCacheRefresh:An};du.useEffectEvent=An;var I0={readContext:nr,use:Ff,useCallback:function(i,o){return vr().memoizedState=[i,o===void 0?null:o],i},useContext:nr,useEffect:g0,useImperativeHandle:function(i,o,u){u=u!=null?u.concat([i]):null,qf(4194308,4,k0.bind(null,o,i),u)},useLayoutEffect:function(i,o){return qf(4194308,4,i,o)},useInsertionEffect:function(i,o){qf(4,2,i,o)},useMemo:function(i,o){var u=vr();o=o===void 0?null:o;var d=i();if(Lo){Et(!0);try{i()}finally{Et(!1)}}return u.memoizedState=[d,o],d},useReducer:function(i,o,u){var d=vr();if(u!==void 0){var y=u(o);if(Lo){Et(!0);try{u(o)}finally{Et(!1)}}}else y=o;return d.memoizedState=d.baseState=y,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:y},d.queue=i,i=i.dispatch=fD.bind(null,Ct,i),[d.memoizedState,i]},useRef:function(i){var o=vr();return i={current:i},o.memoizedState=i},useState:function(i){i=Gm(i);var o=i.queue,u=N0.bind(null,Ct,o);return o.dispatch=u,[i.memoizedState,u]},useDebugValue:Zm,useDeferredValue:function(i,o){var u=vr();return Wm(u,i,o)},useTransition:function(){var i=Gm(!1);return i=T0.bind(null,Ct,i.queue,!0,!1),vr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,o,u){var d=Ct,y=vr();if(Ht){if(u===void 0)throw Error(r(407));u=u()}else{if(u=o(),fn===null)throw Error(r(349));(Ft&127)!==0||e0(d,o,u)}y.memoizedState=u;var S={value:u,getSnapshot:o};return y.queue=S,g0(n0.bind(null,d,S,i),[i]),d.flags|=2048,za(9,{destroy:void 0},t0.bind(null,d,S,u,o),null),u},useId:function(){var i=vr(),o=fn.identifierPrefix;if(Ht){var u=Oi,d=Ni;u=(d&~(1<<32-it(d)-1)).toString(32)+u,o="_"+o+"R_"+u,u=$f++,0<u&&(o+="H"+u.toString(32)),o+="_"}else u=iD++,o="_"+o+"r_"+u.toString(32)+"_";return i.memoizedState=o},useHostTransitionStatus:Xm,useFormState:f0,useActionState:f0,useOptimistic:function(i){var o=vr();o.memoizedState=o.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=u,o=Qm.bind(null,Ct,!0,u),u.dispatch=o,[i,o]},useMemoCache:Um,useCacheRefresh:function(){return vr().memoizedState=cD.bind(null,Ct)},useEffectEvent:function(i){var o=vr(),u={impl:i};return o.memoizedState=u,function(){if((Xt&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},Jm={readContext:nr,use:Ff,useCallback:S0,useContext:nr,useEffect:Km,useImperativeHandle:x0,useInsertionEffect:y0,useLayoutEffect:v0,useMemo:w0,useReducer:Uf,useRef:m0,useState:function(){return Uf(ts)},useDebugValue:Zm,useDeferredValue:function(i,o){var u=zn();return E0(u,sn.memoizedState,i,o)},useTransition:function(){var i=Uf(ts)[0],o=zn().memoizedState;return[typeof i=="boolean"?i:cu(i),o]},useSyncExternalStore:Jx,useId:C0,useHostTransitionStatus:Xm,useFormState:d0,useActionState:d0,useOptimistic:function(i,o){var u=zn();return s0(u,sn,i,o)},useMemoCache:Um,useCacheRefresh:A0};Jm.useEffectEvent=b0;var D0={readContext:nr,use:Ff,useCallback:S0,useContext:nr,useEffect:Km,useImperativeHandle:x0,useInsertionEffect:y0,useLayoutEffect:v0,useMemo:w0,useReducer:Hm,useRef:m0,useState:function(){return Hm(ts)},useDebugValue:Zm,useDeferredValue:function(i,o){var u=zn();return sn===null?Wm(u,i,o):E0(u,sn.memoizedState,i,o)},useTransition:function(){var i=Hm(ts)[0],o=zn().memoizedState;return[typeof i=="boolean"?i:cu(i),o]},useSyncExternalStore:Jx,useId:C0,useHostTransitionStatus:Xm,useFormState:h0,useActionState:h0,useOptimistic:function(i,o){var u=zn();return sn!==null?s0(u,sn,i,o):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:Um,useCacheRefresh:A0};D0.useEffectEvent=b0;function eg(i,o,u,d){o=i.memoizedState,u=u(d,o),u=u==null?o:m({},o,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var tg={enqueueSetState:function(i,o,u){i=i._reactInternals;var d=Zr(),y=$s(d);y.payload=o,u!=null&&(y.callback=u),o=Bs(i,y,d),o!==null&&(Mr(o,i,d),ou(o,i,d))},enqueueReplaceState:function(i,o,u){i=i._reactInternals;var d=Zr(),y=$s(d);y.tag=1,y.payload=o,u!=null&&(y.callback=u),o=Bs(i,y,d),o!==null&&(Mr(o,i,d),ou(o,i,d))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var u=Zr(),d=$s(u);d.tag=2,o!=null&&(d.callback=o),o=Bs(i,d,u),o!==null&&(Mr(o,i,u),ou(o,i,u))}};function z0(i,o,u,d,y,S,M){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(d,S,M):o.prototype&&o.prototype.isPureReactComponent?!Ql(u,d)||!Ql(y,S):!0}function j0(i,o,u,d){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,d),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,d),o.state!==i&&tg.enqueueReplaceState(o,o.state,null)}function Po(i,o){var u=o;if("ref"in o){u={};for(var d in o)d!=="ref"&&(u[d]=o[d])}if(i=i.defaultProps){u===o&&(u=m({},u));for(var y in i)u[y]===void 0&&(u[y]=i[y])}return u}function L0(i){wf(i)}function P0(i){console.error(i)}function $0(i){wf(i)}function Vf(i,o){try{var u=i.onUncaughtError;u(o.value,{componentStack:o.stack})}catch(d){setTimeout(function(){throw d})}}function B0(i,o,u){try{var d=i.onCaughtError;d(u.value,{componentStack:u.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function ng(i,o,u){return u=$s(u),u.tag=3,u.payload={element:null},u.callback=function(){Vf(i,o)},u}function F0(i){return i=$s(i),i.tag=3,i}function U0(i,o,u,d){var y=u.type.getDerivedStateFromError;if(typeof y=="function"){var S=d.value;i.payload=function(){return y(S)},i.callback=function(){B0(o,u,d)}}var M=u.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(i.callback=function(){B0(o,u,d),typeof y!="function"&&(Vs===null?Vs=new Set([this]):Vs.add(this));var K=d.stack;this.componentDidCatch(d.value,{componentStack:K!==null?K:""})})}function dD(i,o,u,d,y){if(u.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(o=u.alternate,o!==null&&Ra(o,u,y,!0),u=Hr.current,u!==null){switch(u.tag){case 31:case 13:return si===null?id():u.alternate===null&&Nn===0&&(Nn=3),u.flags&=-257,u.flags|=65536,u.lanes=y,d===If?u.flags|=16384:(o=u.updateQueue,o===null?u.updateQueue=new Set([d]):o.add(d),Rg(i,d,y)),!1;case 22:return u.flags|=65536,d===If?u.flags|=16384:(o=u.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([d])},u.updateQueue=o):(u=o.retryQueue,u===null?o.retryQueue=new Set([d]):u.add(d)),Rg(i,d,y)),!1}throw Error(r(435,u.tag))}return Rg(i,d,y),id(),!1}if(Ht)return o=Hr.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=y,d!==xm&&(i=Error(r(422),{cause:d}),tu(ti(i,u)))):(d!==xm&&(o=Error(r(423),{cause:d}),tu(ti(o,u))),i=i.current.alternate,i.flags|=65536,y&=-y,i.lanes|=y,d=ti(d,u),y=ng(i.stateNode,d,y),Mm(i,y),Nn!==4&&(Nn=2)),!1;var S=Error(r(520),{cause:d});if(S=ti(S,u),ku===null?ku=[S]:ku.push(S),Nn!==4&&(Nn=2),o===null)return!0;d=ti(d,u),u=o;do{switch(u.tag){case 3:return u.flags|=65536,i=y&-y,u.lanes|=i,i=ng(u.stateNode,d,i),Mm(u,i),!1;case 1:if(o=u.type,S=u.stateNode,(u.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(Vs===null||!Vs.has(S))))return u.flags|=65536,y&=-y,u.lanes|=y,y=F0(y),U0(y,i,u,d),Mm(u,y),!1}u=u.return}while(u!==null);return!1}var rg=Error(r(461)),Un=!1;function rr(i,o,u,d){o.child=i===null?Vx(o,null,u,d):jo(o,i.child,u,d)}function q0(i,o,u,d,y){u=u.render;var S=o.ref;if("ref"in d){var M={};for(var K in d)K!=="ref"&&(M[K]=d[K])}else M=d;return Mo(o),d=Pm(i,o,u,M,S,y),K=$m(),i!==null&&!Un?(Bm(i,o,y),ns(i,o,y)):(Ht&&K&&vm(o),o.flags|=1,rr(i,o,d,y),o.child)}function H0(i,o,u,d,y){if(i===null){var S=u.type;return typeof S=="function"&&!gm(S)&&S.defaultProps===void 0&&u.compare===null?(o.tag=15,o.type=S,G0(i,o,S,d,y)):(i=Rf(u.type,null,d,o,o.mode,y),i.ref=o.ref,i.return=o,o.child=i)}if(S=i.child,!fg(i,y)){var M=S.memoizedProps;if(u=u.compare,u=u!==null?u:Ql,u(M,d)&&i.ref===o.ref)return ns(i,o,y)}return o.flags|=1,i=Yi(S,d),i.ref=o.ref,i.return=o,o.child=i}function G0(i,o,u,d,y){if(i!==null){var S=i.memoizedProps;if(Ql(S,d)&&i.ref===o.ref)if(Un=!1,o.pendingProps=d=S,fg(i,y))(i.flags&131072)!==0&&(Un=!0);else return o.lanes=i.lanes,ns(i,o,y)}return ig(i,o,u,d,y)}function V0(i,o,u,d){var y=d.children,S=i!==null?i.memoizedState:null;if(i===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((o.flags&128)!==0){if(S=S!==null?S.baseLanes|u:u,i!==null){for(d=o.child=i.child,y=0;d!==null;)y=y|d.lanes|d.childLanes,d=d.sibling;d=y&~S}else d=0,o.child=null;return K0(i,o,S,u,d)}if((u&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},i!==null&&Of(o,S!==null?S.cachePool:null),S!==null?Wx(o,S):Dm(),Yx(o);else return d=o.lanes=536870912,K0(i,o,S!==null?S.baseLanes|u:u,u,d)}else S!==null?(Of(o,S.cachePool),Wx(o,S),Us(),o.memoizedState=null):(i!==null&&Of(o,null),Dm(),Us());return rr(i,o,y,u),o.child}function pu(i,o){return i!==null&&i.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function K0(i,o,u,d,y){var S=Cm();return S=S===null?null:{parent:Bn._currentValue,pool:S},o.memoizedState={baseLanes:u,cachePool:S},i!==null&&Of(o,null),Dm(),Yx(o),i!==null&&Ra(i,o,d,!0),o.childLanes=y,null}function Kf(i,o){return o=Wf({mode:o.mode,children:o.children},i.mode),o.ref=i.ref,i.child=o,o.return=i,o}function Z0(i,o,u){return jo(o,i.child,null,u),i=Kf(o,o.pendingProps),i.flags|=2,Gr(o),o.memoizedState=null,i}function pD(i,o,u){var d=o.pendingProps,y=(o.flags&128)!==0;if(o.flags&=-129,i===null){if(Ht){if(d.mode==="hidden")return i=Kf(o,d),o.lanes=536870912,pu(null,i);if(jm(o),(i=yn)?(i=ow(i,ii),i=i!==null&&i.data==="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Ds!==null?{id:Ni,overflow:Oi}:null,retryLane:536870912,hydrationErrors:null},u=Ox(i),u.return=o,o.child=u,tr=o,yn=null)):i=null,i===null)throw js(o);return o.lanes=536870912,null}return Kf(o,d)}var S=i.memoizedState;if(S!==null){var M=S.dehydrated;if(jm(o),y)if(o.flags&256)o.flags&=-257,o=Z0(i,o,u);else if(o.memoizedState!==null)o.child=i.child,o.flags|=128,o=null;else throw Error(r(558));else if(Un||Ra(i,o,u,!1),y=(u&i.childLanes)!==0,Un||y){if(d=fn,d!==null&&(M=Nt(d,u),M!==0&&M!==S.retryLane))throw S.retryLane=M,Co(i,M),Mr(d,i,M),rg;id(),o=Z0(i,o,u)}else i=S.treeContext,yn=oi(M.nextSibling),tr=o,Ht=!0,zs=null,ii=!1,i!==null&&Dx(o,i),o=Kf(o,d),o.flags|=4096;return o}return i=Yi(i.child,{mode:d.mode,children:d.children}),i.ref=o.ref,o.child=i,i.return=o,i}function Zf(i,o){var u=o.ref;if(u===null)i!==null&&i.ref!==null&&(o.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(i===null||i.ref!==u)&&(o.flags|=4194816)}}function ig(i,o,u,d,y){return Mo(o),u=Pm(i,o,u,d,void 0,y),d=$m(),i!==null&&!Un?(Bm(i,o,y),ns(i,o,y)):(Ht&&d&&vm(o),o.flags|=1,rr(i,o,u,y),o.child)}function W0(i,o,u,d,y,S){return Mo(o),o.updateQueue=null,u=Qx(o,d,u,y),Xx(i),d=$m(),i!==null&&!Un?(Bm(i,o,S),ns(i,o,S)):(Ht&&d&&vm(o),o.flags|=1,rr(i,o,u,S),o.child)}function Y0(i,o,u,d,y){if(Mo(o),o.stateNode===null){var S=wa,M=u.contextType;typeof M=="object"&&M!==null&&(S=nr(M)),S=new u(d,S),o.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=tg,o.stateNode=S,S._reactInternals=o,S=o.stateNode,S.props=d,S.state=o.memoizedState,S.refs={},Nm(o),M=u.contextType,S.context=typeof M=="object"&&M!==null?nr(M):wa,S.state=o.memoizedState,M=u.getDerivedStateFromProps,typeof M=="function"&&(eg(o,u,M,d),S.state=o.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(M=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),M!==S.state&&tg.enqueueReplaceState(S,S.state,null),lu(o,d,S,y),au(),S.state=o.memoizedState),typeof S.componentDidMount=="function"&&(o.flags|=4194308),d=!0}else if(i===null){S=o.stateNode;var K=o.memoizedProps,X=Po(u,K);S.props=X;var pe=S.context,Se=u.contextType;M=wa,typeof Se=="object"&&Se!==null&&(M=nr(Se));var Re=u.getDerivedStateFromProps;Se=typeof Re=="function"||typeof S.getSnapshotBeforeUpdate=="function",K=o.pendingProps!==K,Se||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(K||pe!==M)&&j0(o,S,d,M),Ps=!1;var me=o.memoizedState;S.state=me,lu(o,d,S,y),au(),pe=o.memoizedState,K||me!==pe||Ps?(typeof Re=="function"&&(eg(o,u,Re,d),pe=o.memoizedState),(X=Ps||z0(o,u,X,d,me,pe,M))?(Se||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(o.flags|=4194308)):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=d,o.memoizedState=pe),S.props=d,S.state=pe,S.context=M,d=X):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),d=!1)}else{S=o.stateNode,Om(i,o),M=o.memoizedProps,Se=Po(u,M),S.props=Se,Re=o.pendingProps,me=S.context,pe=u.contextType,X=wa,typeof pe=="object"&&pe!==null&&(X=nr(pe)),K=u.getDerivedStateFromProps,(pe=typeof K=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(M!==Re||me!==X)&&j0(o,S,d,X),Ps=!1,me=o.memoizedState,S.state=me,lu(o,d,S,y),au();var ye=o.memoizedState;M!==Re||me!==ye||Ps||i!==null&&i.dependencies!==null&&Af(i.dependencies)?(typeof K=="function"&&(eg(o,u,K,d),ye=o.memoizedState),(Se=Ps||z0(o,u,Se,d,me,ye,X)||i!==null&&i.dependencies!==null&&Af(i.dependencies))?(pe||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(d,ye,X),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(d,ye,X)),typeof S.componentDidUpdate=="function"&&(o.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof S.componentDidUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=1024),o.memoizedProps=d,o.memoizedState=ye),S.props=d,S.state=ye,S.context=X,d=Se):(typeof S.componentDidUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=1024),d=!1)}return S=d,Zf(i,o),d=(o.flags&128)!==0,S||d?(S=o.stateNode,u=d&&typeof u.getDerivedStateFromError!="function"?null:S.render(),o.flags|=1,i!==null&&d?(o.child=jo(o,i.child,null,y),o.child=jo(o,null,u,y)):rr(i,o,u,y),o.memoizedState=S.state,i=o.child):i=ns(i,o,y),i}function X0(i,o,u,d){return No(),o.flags|=256,rr(i,o,u,d),o.child}var sg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function og(i){return{baseLanes:i,cachePool:Bx()}}function ag(i,o,u){return i=i!==null?i.childLanes&~u:0,o&&(i|=Kr),i}function Q0(i,o,u){var d=o.pendingProps,y=!1,S=(o.flags&128)!==0,M;if((M=S)||(M=i!==null&&i.memoizedState===null?!1:(Dn.current&2)!==0),M&&(y=!0,o.flags&=-129),M=(o.flags&32)!==0,o.flags&=-33,i===null){if(Ht){if(y?Fs(o):Us(),(i=yn)?(i=ow(i,ii),i=i!==null&&i.data!=="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Ds!==null?{id:Ni,overflow:Oi}:null,retryLane:536870912,hydrationErrors:null},u=Ox(i),u.return=o,o.child=u,tr=o,yn=null)):i=null,i===null)throw js(o);return qg(i)?o.lanes=32:o.lanes=536870912,null}var K=d.children;return d=d.fallback,y?(Us(),y=o.mode,K=Wf({mode:"hidden",children:K},y),d=Ao(d,y,u,null),K.return=o,d.return=o,K.sibling=d,o.child=K,d=o.child,d.memoizedState=og(u),d.childLanes=ag(i,M,u),o.memoizedState=sg,pu(null,d)):(Fs(o),lg(o,K))}var X=i.memoizedState;if(X!==null&&(K=X.dehydrated,K!==null)){if(S)o.flags&256?(Fs(o),o.flags&=-257,o=ug(i,o,u)):o.memoizedState!==null?(Us(),o.child=i.child,o.flags|=128,o=null):(Us(),K=d.fallback,y=o.mode,d=Wf({mode:"visible",children:d.children},y),K=Ao(K,y,u,null),K.flags|=2,d.return=o,K.return=o,d.sibling=K,o.child=d,jo(o,i.child,null,u),d=o.child,d.memoizedState=og(u),d.childLanes=ag(i,M,u),o.memoizedState=sg,o=pu(null,d));else if(Fs(o),qg(K)){if(M=K.nextSibling&&K.nextSibling.dataset,M)var pe=M.dgst;M=pe,d=Error(r(419)),d.stack="",d.digest=M,tu({value:d,source:null,stack:null}),o=ug(i,o,u)}else if(Un||Ra(i,o,u,!1),M=(u&i.childLanes)!==0,Un||M){if(M=fn,M!==null&&(d=Nt(M,u),d!==0&&d!==X.retryLane))throw X.retryLane=d,Co(i,d),Mr(M,i,d),rg;Ug(K)||id(),o=ug(i,o,u)}else Ug(K)?(o.flags|=192,o.child=i.child,o=null):(i=X.treeContext,yn=oi(K.nextSibling),tr=o,Ht=!0,zs=null,ii=!1,i!==null&&Dx(o,i),o=lg(o,d.children),o.flags|=4096);return o}return y?(Us(),K=d.fallback,y=o.mode,X=i.child,pe=X.sibling,d=Yi(X,{mode:"hidden",children:d.children}),d.subtreeFlags=X.subtreeFlags&65011712,pe!==null?K=Yi(pe,K):(K=Ao(K,y,u,null),K.flags|=2),K.return=o,d.return=o,d.sibling=K,o.child=d,pu(null,d),d=o.child,K=i.child.memoizedState,K===null?K=og(u):(y=K.cachePool,y!==null?(X=Bn._currentValue,y=y.parent!==X?{parent:X,pool:X}:y):y=Bx(),K={baseLanes:K.baseLanes|u,cachePool:y}),d.memoizedState=K,d.childLanes=ag(i,M,u),o.memoizedState=sg,pu(i.child,d)):(Fs(o),u=i.child,i=u.sibling,u=Yi(u,{mode:"visible",children:d.children}),u.return=o,u.sibling=null,i!==null&&(M=o.deletions,M===null?(o.deletions=[i],o.flags|=16):M.push(i)),o.child=u,o.memoizedState=null,u)}function lg(i,o){return o=Wf({mode:"visible",children:o},i.mode),o.return=i,i.child=o}function Wf(i,o){return i=qr(22,i,null,o),i.lanes=0,i}function ug(i,o,u){return jo(o,i.child,null,u),i=lg(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function J0(i,o,u){i.lanes|=o;var d=i.alternate;d!==null&&(d.lanes|=o),Em(i.return,o,u)}function cg(i,o,u,d,y,S){var M=i.memoizedState;M===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:d,tail:u,tailMode:y,treeForkCount:S}:(M.isBackwards=o,M.rendering=null,M.renderingStartTime=0,M.last=d,M.tail=u,M.tailMode=y,M.treeForkCount=S)}function eS(i,o,u){var d=o.pendingProps,y=d.revealOrder,S=d.tail;d=d.children;var M=Dn.current,K=(M&2)!==0;if(K?(M=M&1|2,o.flags|=128):M&=1,O(Dn,M),rr(i,o,d,u),d=Ht?eu:0,!K&&i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&J0(i,u,o);else if(i.tag===19)J0(i,u,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(y){case"forwards":for(u=o.child,y=null;u!==null;)i=u.alternate,i!==null&&Lf(i)===null&&(y=u),u=u.sibling;u=y,u===null?(y=o.child,o.child=null):(y=u.sibling,u.sibling=null),cg(o,!1,y,u,S,d);break;case"backwards":case"unstable_legacy-backwards":for(u=null,y=o.child,o.child=null;y!==null;){if(i=y.alternate,i!==null&&Lf(i)===null){o.child=y;break}i=y.sibling,y.sibling=u,u=y,y=i}cg(o,!0,u,null,S,d);break;case"together":cg(o,!1,null,null,void 0,d);break;default:o.memoizedState=null}return o.child}function ns(i,o,u){if(i!==null&&(o.dependencies=i.dependencies),Gs|=o.lanes,(u&o.childLanes)===0)if(i!==null){if(Ra(i,o,u,!1),(u&o.childLanes)===0)return null}else return null;if(i!==null&&o.child!==i.child)throw Error(r(153));if(o.child!==null){for(i=o.child,u=Yi(i,i.pendingProps),o.child=u,u.return=o;i.sibling!==null;)i=i.sibling,u=u.sibling=Yi(i,i.pendingProps),u.return=o;u.sibling=null}return o.child}function fg(i,o){return(i.lanes&o)!==0?!0:(i=i.dependencies,!!(i!==null&&Af(i)))}function hD(i,o,u){switch(o.tag){case 3:le(o,o.stateNode.containerInfo),Ls(o,Bn,i.memoizedState.cache),No();break;case 27:case 5:Te(o);break;case 4:le(o,o.stateNode.containerInfo);break;case 10:Ls(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,jm(o),null;break;case 13:var d=o.memoizedState;if(d!==null)return d.dehydrated!==null?(Fs(o),o.flags|=128,null):(u&o.child.childLanes)!==0?Q0(i,o,u):(Fs(o),i=ns(i,o,u),i!==null?i.sibling:null);Fs(o);break;case 19:var y=(i.flags&128)!==0;if(d=(u&o.childLanes)!==0,d||(Ra(i,o,u,!1),d=(u&o.childLanes)!==0),y){if(d)return eS(i,o,u);o.flags|=128}if(y=o.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),O(Dn,Dn.current),d)break;return null;case 22:return o.lanes=0,V0(i,o,u,o.pendingProps);case 24:Ls(o,Bn,i.memoizedState.cache)}return ns(i,o,u)}function tS(i,o,u){if(i!==null)if(i.memoizedProps!==o.pendingProps)Un=!0;else{if(!fg(i,u)&&(o.flags&128)===0)return Un=!1,hD(i,o,u);Un=(i.flags&131072)!==0}else Un=!1,Ht&&(o.flags&1048576)!==0&&Ix(o,eu,o.index);switch(o.lanes=0,o.tag){case 16:e:{var d=o.pendingProps;if(i=Do(o.elementType),o.type=i,typeof i=="function")gm(i)?(d=Po(i,d),o.tag=1,o=Y0(null,o,i,d,u)):(o.tag=0,o=ig(null,o,i,d,u));else{if(i!=null){var y=i.$$typeof;if(y===C){o.tag=11,o=q0(null,o,i,d,u);break e}else if(y===I){o.tag=14,o=H0(null,o,i,d,u);break e}}throw o=z(i)||i,Error(r(306,o,""))}}return o;case 0:return ig(i,o,o.type,o.pendingProps,u);case 1:return d=o.type,y=Po(d,o.pendingProps),Y0(i,o,d,y,u);case 3:e:{if(le(o,o.stateNode.containerInfo),i===null)throw Error(r(387));d=o.pendingProps;var S=o.memoizedState;y=S.element,Om(i,o),lu(o,d,null,u);var M=o.memoizedState;if(d=M.cache,Ls(o,Bn,d),d!==S.cache&&Tm(o,[Bn],u,!0),au(),d=M.element,S.isDehydrated)if(S={element:d,isDehydrated:!1,cache:M.cache},o.updateQueue.baseState=S,o.memoizedState=S,o.flags&256){o=X0(i,o,d,u);break e}else if(d!==y){y=ti(Error(r(424)),o),tu(y),o=X0(i,o,d,u);break e}else for(i=o.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,yn=oi(i.firstChild),tr=o,Ht=!0,zs=null,ii=!0,u=Vx(o,null,d,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(No(),d===y){o=ns(i,o,u);break e}rr(i,o,d,u)}o=o.child}return o;case 26:return Zf(i,o),i===null?(u=dw(o.type,null,o.pendingProps,null))?o.memoizedState=u:Ht||(u=o.type,i=o.pendingProps,d=fd(ie.current).createElement(u),d[wt]=o,d[Kn]=i,ir(d,u,i),Pn(d),o.stateNode=d):o.memoizedState=dw(o.type,i.memoizedProps,o.pendingProps,i.memoizedState),null;case 27:return Te(o),i===null&&Ht&&(d=o.stateNode=uw(o.type,o.pendingProps,ie.current),tr=o,ii=!0,y=yn,Ys(o.type)?(Hg=y,yn=oi(d.firstChild)):yn=y),rr(i,o,o.pendingProps.children,u),Zf(i,o),i===null&&(o.flags|=4194304),o.child;case 5:return i===null&&Ht&&((y=d=yn)&&(d=HD(d,o.type,o.pendingProps,ii),d!==null?(o.stateNode=d,tr=o,yn=oi(d.firstChild),ii=!1,y=!0):y=!1),y||js(o)),Te(o),y=o.type,S=o.pendingProps,M=i!==null?i.memoizedProps:null,d=S.children,$g(y,S)?d=null:M!==null&&$g(y,M)&&(o.flags|=32),o.memoizedState!==null&&(y=Pm(i,o,sD,null,null,u),Cu._currentValue=y),Zf(i,o),rr(i,o,d,u),o.child;case 6:return i===null&&Ht&&((i=u=yn)&&(u=GD(u,o.pendingProps,ii),u!==null?(o.stateNode=u,tr=o,yn=null,i=!0):i=!1),i||js(o)),null;case 13:return Q0(i,o,u);case 4:return le(o,o.stateNode.containerInfo),d=o.pendingProps,i===null?o.child=jo(o,null,d,u):rr(i,o,d,u),o.child;case 11:return q0(i,o,o.type,o.pendingProps,u);case 7:return rr(i,o,o.pendingProps,u),o.child;case 8:return rr(i,o,o.pendingProps.children,u),o.child;case 12:return rr(i,o,o.pendingProps.children,u),o.child;case 10:return d=o.pendingProps,Ls(o,o.type,d.value),rr(i,o,d.children,u),o.child;case 9:return y=o.type._context,d=o.pendingProps.children,Mo(o),y=nr(y),d=d(y),o.flags|=1,rr(i,o,d,u),o.child;case 14:return H0(i,o,o.type,o.pendingProps,u);case 15:return G0(i,o,o.type,o.pendingProps,u);case 19:return eS(i,o,u);case 31:return pD(i,o,u);case 22:return V0(i,o,u,o.pendingProps);case 24:return Mo(o),d=nr(Bn),i===null?(y=Cm(),y===null&&(y=fn,S=_m(),y.pooledCache=S,S.refCount++,S!==null&&(y.pooledCacheLanes|=u),y=S),o.memoizedState={parent:d,cache:y},Nm(o),Ls(o,Bn,y)):((i.lanes&u)!==0&&(Om(i,o),lu(o,null,null,u),au()),y=i.memoizedState,S=o.memoizedState,y.parent!==d?(y={parent:d,cache:d},o.memoizedState=y,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=y),Ls(o,Bn,d)):(d=S.cache,Ls(o,Bn,d),d!==y.cache&&Tm(o,[Bn],u,!0))),rr(i,o,o.pendingProps.children,u),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function rs(i){i.flags|=4}function dg(i,o,u,d,y){if((o=(i.mode&32)!==0)&&(o=!1),o){if(i.flags|=16777216,(y&335544128)===y)if(i.stateNode.complete)i.flags|=8192;else if(CS())i.flags|=8192;else throw zo=If,Am}else i.flags&=-16777217}function nS(i,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!bw(o))if(CS())i.flags|=8192;else throw zo=If,Am}function Yf(i,o){o!==null&&(i.flags|=4),i.flags&16384&&(o=i.tag!==22?Ve():536870912,i.lanes|=o,$a|=o)}function hu(i,o){if(!Ht)switch(i.tailMode){case"hidden":o=i.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:d.sibling=null}}function vn(i){var o=i.alternate!==null&&i.alternate.child===i.child,u=0,d=0;if(o)for(var y=i.child;y!==null;)u|=y.lanes|y.childLanes,d|=y.subtreeFlags&65011712,d|=y.flags&65011712,y.return=i,y=y.sibling;else for(y=i.child;y!==null;)u|=y.lanes|y.childLanes,d|=y.subtreeFlags,d|=y.flags,y.return=i,y=y.sibling;return i.subtreeFlags|=d,i.childLanes=u,o}function mD(i,o,u){var d=o.pendingProps;switch(km(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vn(o),null;case 1:return vn(o),null;case 3:return u=o.stateNode,d=null,i!==null&&(d=i.memoizedState.cache),o.memoizedState.cache!==d&&(o.flags|=2048),Ji(Bn),ke(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(_a(o)?rs(o):i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Sm())),vn(o),null;case 26:var y=o.type,S=o.memoizedState;return i===null?(rs(o),S!==null?(vn(o),nS(o,S)):(vn(o),dg(o,y,null,d,u))):S?S!==i.memoizedState?(rs(o),vn(o),nS(o,S)):(vn(o),o.flags&=-16777217):(i=i.memoizedProps,i!==d&&rs(o),vn(o),dg(o,y,i,d,u)),null;case 27:if(Pe(o),u=ie.current,y=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==d&&rs(o);else{if(!d){if(o.stateNode===null)throw Error(r(166));return vn(o),null}i=J.current,_a(o)?zx(o):(i=uw(y,d,u),o.stateNode=i,rs(o))}return vn(o),null;case 5:if(Pe(o),y=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==d&&rs(o);else{if(!d){if(o.stateNode===null)throw Error(r(166));return vn(o),null}if(S=J.current,_a(o))zx(o);else{var M=fd(ie.current);switch(S){case 1:S=M.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:S=M.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":S=M.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":S=M.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":S=M.createElement("div"),S.innerHTML="<script><\/script>",S=S.removeChild(S.firstChild);break;case"select":S=typeof d.is=="string"?M.createElement("select",{is:d.is}):M.createElement("select"),d.multiple?S.multiple=!0:d.size&&(S.size=d.size);break;default:S=typeof d.is=="string"?M.createElement(y,{is:d.is}):M.createElement(y)}}S[wt]=o,S[Kn]=d;e:for(M=o.child;M!==null;){if(M.tag===5||M.tag===6)S.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===o)break e;for(;M.sibling===null;){if(M.return===null||M.return===o)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}o.stateNode=S;e:switch(ir(S,y,d),y){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&rs(o)}}return vn(o),dg(o,o.type,i===null?null:i.memoizedProps,o.pendingProps,u),null;case 6:if(i&&o.stateNode!=null)i.memoizedProps!==d&&rs(o);else{if(typeof d!="string"&&o.stateNode===null)throw Error(r(166));if(i=ie.current,_a(o)){if(i=o.stateNode,u=o.memoizedProps,d=null,y=tr,y!==null)switch(y.tag){case 27:case 5:d=y.memoizedProps}i[wt]=o,i=!!(i.nodeValue===u||d!==null&&d.suppressHydrationWarning===!0||QS(i.nodeValue,u)),i||js(o,!0)}else i=fd(i).createTextNode(d),i[wt]=o,o.stateNode=i}return vn(o),null;case 31:if(u=o.memoizedState,i===null||i.memoizedState!==null){if(d=_a(o),u!==null){if(i===null){if(!d)throw Error(r(318));if(i=o.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[wt]=o}else No(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;vn(o),i=!1}else u=Sm(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return o.flags&256?(Gr(o),o):(Gr(o),null);if((o.flags&128)!==0)throw Error(r(558))}return vn(o),null;case 13:if(d=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(y=_a(o),d!==null&&d.dehydrated!==null){if(i===null){if(!y)throw Error(r(318));if(y=o.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[wt]=o}else No(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;vn(o),y=!1}else y=Sm(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=y),y=!0;if(!y)return o.flags&256?(Gr(o),o):(Gr(o),null)}return Gr(o),(o.flags&128)!==0?(o.lanes=u,o):(u=d!==null,i=i!==null&&i.memoizedState!==null,u&&(d=o.child,y=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(y=d.alternate.memoizedState.cachePool.pool),S=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(S=d.memoizedState.cachePool.pool),S!==y&&(d.flags|=2048)),u!==i&&u&&(o.child.flags|=8192),Yf(o,o.updateQueue),vn(o),null);case 4:return ke(),i===null&&Dg(o.stateNode.containerInfo),vn(o),null;case 10:return Ji(o.type),vn(o),null;case 19:if(G(Dn),d=o.memoizedState,d===null)return vn(o),null;if(y=(o.flags&128)!==0,S=d.rendering,S===null)if(y)hu(d,!1);else{if(Nn!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(S=Lf(i),S!==null){for(o.flags|=128,hu(d,!1),i=S.updateQueue,o.updateQueue=i,Yf(o,i),o.subtreeFlags=0,i=u,u=o.child;u!==null;)Nx(u,i),u=u.sibling;return O(Dn,Dn.current&1|2),Ht&&Xi(o,d.treeForkCount),o.child}i=i.sibling}d.tail!==null&&ne()>td&&(o.flags|=128,y=!0,hu(d,!1),o.lanes=4194304)}else{if(!y)if(i=Lf(S),i!==null){if(o.flags|=128,y=!0,i=i.updateQueue,o.updateQueue=i,Yf(o,i),hu(d,!0),d.tail===null&&d.tailMode==="hidden"&&!S.alternate&&!Ht)return vn(o),null}else 2*ne()-d.renderingStartTime>td&&u!==536870912&&(o.flags|=128,y=!0,hu(d,!1),o.lanes=4194304);d.isBackwards?(S.sibling=o.child,o.child=S):(i=d.last,i!==null?i.sibling=S:o.child=S,d.last=S)}return d.tail!==null?(i=d.tail,d.rendering=i,d.tail=i.sibling,d.renderingStartTime=ne(),i.sibling=null,u=Dn.current,O(Dn,y?u&1|2:u&1),Ht&&Xi(o,d.treeForkCount),i):(vn(o),null);case 22:case 23:return Gr(o),zm(),d=o.memoizedState!==null,i!==null?i.memoizedState!==null!==d&&(o.flags|=8192):d&&(o.flags|=8192),d?(u&536870912)!==0&&(o.flags&128)===0&&(vn(o),o.subtreeFlags&6&&(o.flags|=8192)):vn(o),u=o.updateQueue,u!==null&&Yf(o,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==u&&(o.flags|=2048),i!==null&&G(Io),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),Ji(Bn),vn(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function gD(i,o){switch(km(o),o.tag){case 1:return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Ji(Bn),ke(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 26:case 27:case 5:return Pe(o),null;case 31:if(o.memoizedState!==null){if(Gr(o),o.alternate===null)throw Error(r(340));No()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 13:if(Gr(o),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(r(340));No()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return G(Dn),null;case 4:return ke(),null;case 10:return Ji(o.type),null;case 22:case 23:return Gr(o),zm(),i!==null&&G(Io),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 24:return Ji(Bn),null;case 25:return null;default:return null}}function rS(i,o){switch(km(o),o.tag){case 3:Ji(Bn),ke();break;case 26:case 27:case 5:Pe(o);break;case 4:ke();break;case 31:o.memoizedState!==null&&Gr(o);break;case 13:Gr(o);break;case 19:G(Dn);break;case 10:Ji(o.type);break;case 22:case 23:Gr(o),zm(),i!==null&&G(Io);break;case 24:Ji(Bn)}}function mu(i,o){try{var u=o.updateQueue,d=u!==null?u.lastEffect:null;if(d!==null){var y=d.next;u=y;do{if((u.tag&i)===i){d=void 0;var S=u.create,M=u.inst;d=S(),M.destroy=d}u=u.next}while(u!==y)}}catch(K){rn(o,o.return,K)}}function qs(i,o,u){try{var d=o.updateQueue,y=d!==null?d.lastEffect:null;if(y!==null){var S=y.next;d=S;do{if((d.tag&i)===i){var M=d.inst,K=M.destroy;if(K!==void 0){M.destroy=void 0,y=o;var X=u,pe=K;try{pe()}catch(Se){rn(y,X,Se)}}}d=d.next}while(d!==S)}}catch(Se){rn(o,o.return,Se)}}function iS(i){var o=i.updateQueue;if(o!==null){var u=i.stateNode;try{Zx(o,u)}catch(d){rn(i,i.return,d)}}}function sS(i,o,u){u.props=Po(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(d){rn(i,o,d)}}function gu(i,o){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var d=i.stateNode;break;case 30:d=i.stateNode;break;default:d=i.stateNode}typeof u=="function"?i.refCleanup=u(d):u.current=d}}catch(y){rn(i,o,y)}}function Mi(i,o){var u=i.ref,d=i.refCleanup;if(u!==null)if(typeof d=="function")try{d()}catch(y){rn(i,o,y)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(y){rn(i,o,y)}else u.current=null}function oS(i){var o=i.type,u=i.memoizedProps,d=i.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":u.autoFocus&&d.focus();break e;case"img":u.src?d.src=u.src:u.srcSet&&(d.srcset=u.srcSet)}}catch(y){rn(i,i.return,y)}}function pg(i,o,u){try{var d=i.stateNode;PD(d,i.type,u,o),d[Kn]=o}catch(y){rn(i,i.return,y)}}function aS(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Ys(i.type)||i.tag===4}function hg(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||aS(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Ys(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function mg(i,o,u){var d=i.tag;if(d===5||d===6)i=i.stateNode,o?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(i,o):(o=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,o.appendChild(i),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=Be));else if(d!==4&&(d===27&&Ys(i.type)&&(u=i.stateNode,o=null),i=i.child,i!==null))for(mg(i,o,u),i=i.sibling;i!==null;)mg(i,o,u),i=i.sibling}function Xf(i,o,u){var d=i.tag;if(d===5||d===6)i=i.stateNode,o?u.insertBefore(i,o):u.appendChild(i);else if(d!==4&&(d===27&&Ys(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(Xf(i,o,u),i=i.sibling;i!==null;)Xf(i,o,u),i=i.sibling}function lS(i){var o=i.stateNode,u=i.memoizedProps;try{for(var d=i.type,y=o.attributes;y.length;)o.removeAttributeNode(y[0]);ir(o,d,u),o[wt]=i,o[Kn]=u}catch(S){rn(i,i.return,S)}}var is=!1,qn=!1,gg=!1,uS=typeof WeakSet=="function"?WeakSet:Set,Yn=null;function bD(i,o){if(i=i.containerInfo,Lg=yd,i=xx(i),um(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var d=u.getSelection&&u.getSelection();if(d&&d.rangeCount!==0){u=d.anchorNode;var y=d.anchorOffset,S=d.focusNode;d=d.focusOffset;try{u.nodeType,S.nodeType}catch{u=null;break e}var M=0,K=-1,X=-1,pe=0,Se=0,Re=i,me=null;t:for(;;){for(var ye;Re!==u||y!==0&&Re.nodeType!==3||(K=M+y),Re!==S||d!==0&&Re.nodeType!==3||(X=M+d),Re.nodeType===3&&(M+=Re.nodeValue.length),(ye=Re.firstChild)!==null;)me=Re,Re=ye;for(;;){if(Re===i)break t;if(me===u&&++pe===y&&(K=M),me===S&&++Se===d&&(X=M),(ye=Re.nextSibling)!==null)break;Re=me,me=Re.parentNode}Re=ye}u=K===-1||X===-1?null:{start:K,end:X}}else u=null}u=u||{start:0,end:0}}else u=null;for(Pg={focusedElem:i,selectionRange:u},yd=!1,Yn=o;Yn!==null;)if(o=Yn,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Yn=i;else for(;Yn!==null;){switch(o=Yn,S=o.alternate,i=o.flags,o.tag){case 0:if((i&4)!==0&&(i=o.updateQueue,i=i!==null?i.events:null,i!==null))for(u=0;u<i.length;u++)y=i[u],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&S!==null){i=void 0,u=o,y=S.memoizedProps,S=S.memoizedState,d=u.stateNode;try{var Je=Po(u.type,y);i=d.getSnapshotBeforeUpdate(Je,S),d.__reactInternalSnapshotBeforeUpdate=i}catch(pt){rn(u,u.return,pt)}}break;case 3:if((i&1024)!==0){if(i=o.stateNode.containerInfo,u=i.nodeType,u===9)Fg(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Fg(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=o.sibling,i!==null){i.return=o.return,Yn=i;break}Yn=o.return}}function cS(i,o,u){var d=u.flags;switch(u.tag){case 0:case 11:case 15:os(i,u),d&4&&mu(5,u);break;case 1:if(os(i,u),d&4)if(i=u.stateNode,o===null)try{i.componentDidMount()}catch(M){rn(u,u.return,M)}else{var y=Po(u.type,o.memoizedProps);o=o.memoizedState;try{i.componentDidUpdate(y,o,i.__reactInternalSnapshotBeforeUpdate)}catch(M){rn(u,u.return,M)}}d&64&&iS(u),d&512&&gu(u,u.return);break;case 3:if(os(i,u),d&64&&(i=u.updateQueue,i!==null)){if(o=null,u.child!==null)switch(u.child.tag){case 27:case 5:o=u.child.stateNode;break;case 1:o=u.child.stateNode}try{Zx(i,o)}catch(M){rn(u,u.return,M)}}break;case 27:o===null&&d&4&&lS(u);case 26:case 5:os(i,u),o===null&&d&4&&oS(u),d&512&&gu(u,u.return);break;case 12:os(i,u);break;case 31:os(i,u),d&4&&pS(i,u);break;case 13:os(i,u),d&4&&hS(i,u),d&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=_D.bind(null,u),VD(i,u))));break;case 22:if(d=u.memoizedState!==null||is,!d){o=o!==null&&o.memoizedState!==null||qn,y=is;var S=qn;is=d,(qn=o)&&!S?as(i,u,(u.subtreeFlags&8772)!==0):os(i,u),is=y,qn=S}break;case 30:break;default:os(i,u)}}function fS(i){var o=i.alternate;o!==null&&(i.alternate=null,fS(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&Bl(o)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var kn=null,Cr=!1;function ss(i,o,u){for(u=u.child;u!==null;)dS(i,o,u),u=u.sibling}function dS(i,o,u){if(ot&&typeof ot.onCommitFiberUnmount=="function")try{ot.onCommitFiberUnmount(st,u)}catch{}switch(u.tag){case 26:qn||Mi(u,o),ss(i,o,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:qn||Mi(u,o);var d=kn,y=Cr;Ys(u.type)&&(kn=u.stateNode,Cr=!1),ss(i,o,u),Tu(u.stateNode),kn=d,Cr=y;break;case 5:qn||Mi(u,o);case 6:if(d=kn,y=Cr,kn=null,ss(i,o,u),kn=d,Cr=y,kn!==null)if(Cr)try{(kn.nodeType===9?kn.body:kn.nodeName==="HTML"?kn.ownerDocument.body:kn).removeChild(u.stateNode)}catch(S){rn(u,o,S)}else try{kn.removeChild(u.stateNode)}catch(S){rn(u,o,S)}break;case 18:kn!==null&&(Cr?(i=kn,iw(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),Ka(i)):iw(kn,u.stateNode));break;case 4:d=kn,y=Cr,kn=u.stateNode.containerInfo,Cr=!0,ss(i,o,u),kn=d,Cr=y;break;case 0:case 11:case 14:case 15:qs(2,u,o),qn||qs(4,u,o),ss(i,o,u);break;case 1:qn||(Mi(u,o),d=u.stateNode,typeof d.componentWillUnmount=="function"&&sS(u,o,d)),ss(i,o,u);break;case 21:ss(i,o,u);break;case 22:qn=(d=qn)||u.memoizedState!==null,ss(i,o,u),qn=d;break;default:ss(i,o,u)}}function pS(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Ka(i)}catch(u){rn(o,o.return,u)}}}function hS(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Ka(i)}catch(u){rn(o,o.return,u)}}function yD(i){switch(i.tag){case 31:case 13:case 19:var o=i.stateNode;return o===null&&(o=i.stateNode=new uS),o;case 22:return i=i.stateNode,o=i._retryCache,o===null&&(o=i._retryCache=new uS),o;default:throw Error(r(435,i.tag))}}function Qf(i,o){var u=yD(i);o.forEach(function(d){if(!u.has(d)){u.add(d);var y=RD.bind(null,i,d);d.then(y,y)}})}function Ar(i,o){var u=o.deletions;if(u!==null)for(var d=0;d<u.length;d++){var y=u[d],S=i,M=o,K=M;e:for(;K!==null;){switch(K.tag){case 27:if(Ys(K.type)){kn=K.stateNode,Cr=!1;break e}break;case 5:kn=K.stateNode,Cr=!1;break e;case 3:case 4:kn=K.stateNode.containerInfo,Cr=!0;break e}K=K.return}if(kn===null)throw Error(r(160));dS(S,M,y),kn=null,Cr=!1,S=y.alternate,S!==null&&(S.return=null),y.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)mS(o,i),o=o.sibling}var xi=null;function mS(i,o){var u=i.alternate,d=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Ar(o,i),Nr(i),d&4&&(qs(3,i,i.return),mu(3,i),qs(5,i,i.return));break;case 1:Ar(o,i),Nr(i),d&512&&(qn||u===null||Mi(u,u.return)),d&64&&is&&(i=i.updateQueue,i!==null&&(d=i.callbacks,d!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?d:u.concat(d))));break;case 26:var y=xi;if(Ar(o,i),Nr(i),d&512&&(qn||u===null||Mi(u,u.return)),d&4){var S=u!==null?u.memoizedState:null;if(d=i.memoizedState,u===null)if(d===null)if(i.stateNode===null){e:{d=i.type,u=i.memoizedProps,y=y.ownerDocument||y;t:switch(d){case"title":S=y.getElementsByTagName("title")[0],(!S||S[So]||S[wt]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=y.createElement(d),y.head.insertBefore(S,y.querySelector("head > title"))),ir(S,d,u),S[wt]=i,Pn(S),d=S;break e;case"link":var M=mw("link","href",y).get(d+(u.href||""));if(M){for(var K=0;K<M.length;K++)if(S=M[K],S.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&S.getAttribute("rel")===(u.rel==null?null:u.rel)&&S.getAttribute("title")===(u.title==null?null:u.title)&&S.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){M.splice(K,1);break t}}S=y.createElement(d),ir(S,d,u),y.head.appendChild(S);break;case"meta":if(M=mw("meta","content",y).get(d+(u.content||""))){for(K=0;K<M.length;K++)if(S=M[K],S.getAttribute("content")===(u.content==null?null:""+u.content)&&S.getAttribute("name")===(u.name==null?null:u.name)&&S.getAttribute("property")===(u.property==null?null:u.property)&&S.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&S.getAttribute("charset")===(u.charSet==null?null:u.charSet)){M.splice(K,1);break t}}S=y.createElement(d),ir(S,d,u),y.head.appendChild(S);break;default:throw Error(r(468,d))}S[wt]=i,Pn(S),d=S}i.stateNode=d}else gw(y,i.type,i.stateNode);else i.stateNode=hw(y,d,i.memoizedProps);else S!==d?(S===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):S.count--,d===null?gw(y,i.type,i.stateNode):hw(y,d,i.memoizedProps)):d===null&&i.stateNode!==null&&pg(i,i.memoizedProps,u.memoizedProps)}break;case 27:Ar(o,i),Nr(i),d&512&&(qn||u===null||Mi(u,u.return)),u!==null&&d&4&&pg(i,i.memoizedProps,u.memoizedProps);break;case 5:if(Ar(o,i),Nr(i),d&512&&(qn||u===null||Mi(u,u.return)),i.flags&32){y=i.stateNode;try{mt(y,"")}catch(Je){rn(i,i.return,Je)}}d&4&&i.stateNode!=null&&(y=i.memoizedProps,pg(i,y,u!==null?u.memoizedProps:y)),d&1024&&(gg=!0);break;case 6:if(Ar(o,i),Nr(i),d&4){if(i.stateNode===null)throw Error(r(162));d=i.memoizedProps,u=i.stateNode;try{u.nodeValue=d}catch(Je){rn(i,i.return,Je)}}break;case 3:if(hd=null,y=xi,xi=dd(o.containerInfo),Ar(o,i),xi=y,Nr(i),d&4&&u!==null&&u.memoizedState.isDehydrated)try{Ka(o.containerInfo)}catch(Je){rn(i,i.return,Je)}gg&&(gg=!1,gS(i));break;case 4:d=xi,xi=dd(i.stateNode.containerInfo),Ar(o,i),Nr(i),xi=d;break;case 12:Ar(o,i),Nr(i);break;case 31:Ar(o,i),Nr(i),d&4&&(d=i.updateQueue,d!==null&&(i.updateQueue=null,Qf(i,d)));break;case 13:Ar(o,i),Nr(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(ed=ne()),d&4&&(d=i.updateQueue,d!==null&&(i.updateQueue=null,Qf(i,d)));break;case 22:y=i.memoizedState!==null;var X=u!==null&&u.memoizedState!==null,pe=is,Se=qn;if(is=pe||y,qn=Se||X,Ar(o,i),qn=Se,is=pe,Nr(i),d&8192)e:for(o=i.stateNode,o._visibility=y?o._visibility&-2:o._visibility|1,y&&(u===null||X||is||qn||$o(i)),u=null,o=i;;){if(o.tag===5||o.tag===26){if(u===null){X=u=o;try{if(S=X.stateNode,y)M=S.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{K=X.stateNode;var Re=X.memoizedProps.style,me=Re!=null&&Re.hasOwnProperty("display")?Re.display:null;K.style.display=me==null||typeof me=="boolean"?"":(""+me).trim()}}catch(Je){rn(X,X.return,Je)}}}else if(o.tag===6){if(u===null){X=o;try{X.stateNode.nodeValue=y?"":X.memoizedProps}catch(Je){rn(X,X.return,Je)}}}else if(o.tag===18){if(u===null){X=o;try{var ye=X.stateNode;y?sw(ye,!0):sw(X.stateNode,!1)}catch(Je){rn(X,X.return,Je)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===i)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break e;for(;o.sibling===null;){if(o.return===null||o.return===i)break e;u===o&&(u=null),o=o.return}u===o&&(u=null),o.sibling.return=o.return,o=o.sibling}d&4&&(d=i.updateQueue,d!==null&&(u=d.retryQueue,u!==null&&(d.retryQueue=null,Qf(i,u))));break;case 19:Ar(o,i),Nr(i),d&4&&(d=i.updateQueue,d!==null&&(i.updateQueue=null,Qf(i,d)));break;case 30:break;case 21:break;default:Ar(o,i),Nr(i)}}function Nr(i){var o=i.flags;if(o&2){try{for(var u,d=i.return;d!==null;){if(aS(d)){u=d;break}d=d.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var y=u.stateNode,S=hg(i);Xf(i,S,y);break;case 5:var M=u.stateNode;u.flags&32&&(mt(M,""),u.flags&=-33);var K=hg(i);Xf(i,K,M);break;case 3:case 4:var X=u.stateNode.containerInfo,pe=hg(i);mg(i,pe,X);break;default:throw Error(r(161))}}catch(Se){rn(i,i.return,Se)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function gS(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var o=i;gS(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),i=i.sibling}}function os(i,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)cS(i,o.alternate,o),o=o.sibling}function $o(i){for(i=i.child;i!==null;){var o=i;switch(o.tag){case 0:case 11:case 14:case 15:qs(4,o,o.return),$o(o);break;case 1:Mi(o,o.return);var u=o.stateNode;typeof u.componentWillUnmount=="function"&&sS(o,o.return,u),$o(o);break;case 27:Tu(o.stateNode);case 26:case 5:Mi(o,o.return),$o(o);break;case 22:o.memoizedState===null&&$o(o);break;case 30:$o(o);break;default:$o(o)}i=i.sibling}}function as(i,o,u){for(u=u&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var d=o.alternate,y=i,S=o,M=S.flags;switch(S.tag){case 0:case 11:case 15:as(y,S,u),mu(4,S);break;case 1:if(as(y,S,u),d=S,y=d.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(pe){rn(d,d.return,pe)}if(d=S,y=d.updateQueue,y!==null){var K=d.stateNode;try{var X=y.shared.hiddenCallbacks;if(X!==null)for(y.shared.hiddenCallbacks=null,y=0;y<X.length;y++)Kx(X[y],K)}catch(pe){rn(d,d.return,pe)}}u&&M&64&&iS(S),gu(S,S.return);break;case 27:lS(S);case 26:case 5:as(y,S,u),u&&d===null&&M&4&&oS(S),gu(S,S.return);break;case 12:as(y,S,u);break;case 31:as(y,S,u),u&&M&4&&pS(y,S);break;case 13:as(y,S,u),u&&M&4&&hS(y,S);break;case 22:S.memoizedState===null&&as(y,S,u),gu(S,S.return);break;case 30:break;default:as(y,S,u)}o=o.sibling}}function bg(i,o){var u=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),i=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(i=o.memoizedState.cachePool.pool),i!==u&&(i!=null&&i.refCount++,u!=null&&nu(u))}function yg(i,o){i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&nu(i))}function Si(i,o,u,d){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)bS(i,o,u,d),o=o.sibling}function bS(i,o,u,d){var y=o.flags;switch(o.tag){case 0:case 11:case 15:Si(i,o,u,d),y&2048&&mu(9,o);break;case 1:Si(i,o,u,d);break;case 3:Si(i,o,u,d),y&2048&&(i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&nu(i)));break;case 12:if(y&2048){Si(i,o,u,d),i=o.stateNode;try{var S=o.memoizedProps,M=S.id,K=S.onPostCommit;typeof K=="function"&&K(M,o.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(X){rn(o,o.return,X)}}else Si(i,o,u,d);break;case 31:Si(i,o,u,d);break;case 13:Si(i,o,u,d);break;case 23:break;case 22:S=o.stateNode,M=o.alternate,o.memoizedState!==null?S._visibility&2?Si(i,o,u,d):bu(i,o):S._visibility&2?Si(i,o,u,d):(S._visibility|=2,ja(i,o,u,d,(o.subtreeFlags&10256)!==0||!1)),y&2048&&bg(M,o);break;case 24:Si(i,o,u,d),y&2048&&yg(o.alternate,o);break;default:Si(i,o,u,d)}}function ja(i,o,u,d,y){for(y=y&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var S=i,M=o,K=u,X=d,pe=M.flags;switch(M.tag){case 0:case 11:case 15:ja(S,M,K,X,y),mu(8,M);break;case 23:break;case 22:var Se=M.stateNode;M.memoizedState!==null?Se._visibility&2?ja(S,M,K,X,y):bu(S,M):(Se._visibility|=2,ja(S,M,K,X,y)),y&&pe&2048&&bg(M.alternate,M);break;case 24:ja(S,M,K,X,y),y&&pe&2048&&yg(M.alternate,M);break;default:ja(S,M,K,X,y)}o=o.sibling}}function bu(i,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var u=i,d=o,y=d.flags;switch(d.tag){case 22:bu(u,d),y&2048&&bg(d.alternate,d);break;case 24:bu(u,d),y&2048&&yg(d.alternate,d);break;default:bu(u,d)}o=o.sibling}}var yu=8192;function La(i,o,u){if(i.subtreeFlags&yu)for(i=i.child;i!==null;)yS(i,o,u),i=i.sibling}function yS(i,o,u){switch(i.tag){case 26:La(i,o,u),i.flags&yu&&i.memoizedState!==null&&iz(u,xi,i.memoizedState,i.memoizedProps);break;case 5:La(i,o,u);break;case 3:case 4:var d=xi;xi=dd(i.stateNode.containerInfo),La(i,o,u),xi=d;break;case 22:i.memoizedState===null&&(d=i.alternate,d!==null&&d.memoizedState!==null?(d=yu,yu=16777216,La(i,o,u),yu=d):La(i,o,u));break;default:La(i,o,u)}}function vS(i){var o=i.alternate;if(o!==null&&(i=o.child,i!==null)){o.child=null;do o=i.sibling,i.sibling=null,i=o;while(i!==null)}}function vu(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var d=o[u];Yn=d,xS(d,i)}vS(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)kS(i),i=i.sibling}function kS(i){switch(i.tag){case 0:case 11:case 15:vu(i),i.flags&2048&&qs(9,i,i.return);break;case 3:vu(i);break;case 12:vu(i);break;case 22:var o=i.stateNode;i.memoizedState!==null&&o._visibility&2&&(i.return===null||i.return.tag!==13)?(o._visibility&=-3,Jf(i)):vu(i);break;default:vu(i)}}function Jf(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var d=o[u];Yn=d,xS(d,i)}vS(i)}for(i=i.child;i!==null;){switch(o=i,o.tag){case 0:case 11:case 15:qs(8,o,o.return),Jf(o);break;case 22:u=o.stateNode,u._visibility&2&&(u._visibility&=-3,Jf(o));break;default:Jf(o)}i=i.sibling}}function xS(i,o){for(;Yn!==null;){var u=Yn;switch(u.tag){case 0:case 11:case 15:qs(8,u,o);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var d=u.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:nu(u.memoizedState.cache)}if(d=u.child,d!==null)d.return=u,Yn=d;else e:for(u=i;Yn!==null;){d=Yn;var y=d.sibling,S=d.return;if(fS(d),d===u){Yn=null;break e}if(y!==null){y.return=S,Yn=y;break e}Yn=S}}}var vD={getCacheForType:function(i){var o=nr(Bn),u=o.data.get(i);return u===void 0&&(u=i(),o.data.set(i,u)),u},cacheSignal:function(){return nr(Bn).controller.signal}},kD=typeof WeakMap=="function"?WeakMap:Map,Xt=0,fn=null,Lt=null,Ft=0,nn=0,Vr=null,Hs=!1,Pa=!1,vg=!1,ls=0,Nn=0,Gs=0,Bo=0,kg=0,Kr=0,$a=0,ku=null,Or=null,xg=!1,ed=0,SS=0,td=1/0,nd=null,Vs=null,Zn=0,Ks=null,Ba=null,us=0,Sg=0,wg=null,wS=null,xu=0,Eg=null;function Zr(){return(Xt&2)!==0&&Ft!==0?Ft&-Ft:H.T!==null?Ng():Qt()}function ES(){if(Kr===0)if((Ft&536870912)===0||Ht){var i=Ze;Ze<<=1,(Ze&3932160)===0&&(Ze=262144),Kr=i}else Kr=536870912;return i=Hr.current,i!==null&&(i.flags|=32),Kr}function Mr(i,o,u){(i===fn&&(nn===2||nn===9)||i.cancelPendingCommit!==null)&&(Fa(i,0),Zs(i,Ft,Kr,!1)),At(i,u),((Xt&2)===0||i!==fn)&&(i===fn&&((Xt&2)===0&&(Bo|=u),Nn===4&&Zs(i,Ft,Kr,!1)),Ii(i))}function TS(i,o,u){if((Xt&6)!==0)throw Error(r(327));var d=!u&&(o&127)===0&&(o&i.expiredLanes)===0||ce(i,o),y=d?wD(i,o):_g(i,o,!0),S=d;do{if(y===0){Pa&&!d&&Zs(i,o,0,!1);break}else{if(u=i.current.alternate,S&&!xD(u)){y=_g(i,o,!1),S=!1;continue}if(y===2){if(S=o,i.errorRecoveryDisabledLanes&S)var M=0;else M=i.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){o=M;e:{var K=i;y=ku;var X=K.current.memoizedState.isDehydrated;if(X&&(Fa(K,M).flags|=256),M=_g(K,M,!1),M!==2){if(vg&&!X){K.errorRecoveryDisabledLanes|=S,Bo|=S,y=4;break e}S=Or,Or=y,S!==null&&(Or===null?Or=S:Or.push.apply(Or,S))}y=M}if(S=!1,y!==2)continue}}if(y===1){Fa(i,0),Zs(i,o,0,!0);break}e:{switch(d=i,S=y,S){case 0:case 1:throw Error(r(345));case 4:if((o&4194048)!==o)break;case 6:Zs(d,o,Kr,!Hs);break e;case 2:Or=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(y=ed+300-ne(),10<y)){if(Zs(d,o,Kr,!Hs),W(d,0,!0)!==0)break e;us=o,d.timeoutHandle=nw(_S.bind(null,d,u,Or,nd,xg,o,Kr,Bo,$a,Hs,S,"Throttled",-0,0),y);break e}_S(d,u,Or,nd,xg,o,Kr,Bo,$a,Hs,S,null,-0,0)}}break}while(!0);Ii(i)}function _S(i,o,u,d,y,S,M,K,X,pe,Se,Re,me,ye){if(i.timeoutHandle=-1,Re=o.subtreeFlags,Re&8192||(Re&16785408)===16785408){Re={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Be},yS(o,S,Re);var Je=(S&62914560)===S?ed-ne():(S&4194048)===S?SS-ne():0;if(Je=sz(Re,Je),Je!==null){us=S,i.cancelPendingCommit=Je(DS.bind(null,i,o,S,u,d,y,M,K,X,Se,Re,null,me,ye)),Zs(i,S,M,!pe);return}}DS(i,o,S,u,d,y,M,K,X)}function xD(i){for(var o=i;;){var u=o.tag;if((u===0||u===11||u===15)&&o.flags&16384&&(u=o.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var d=0;d<u.length;d++){var y=u[d],S=y.getSnapshot;y=y.value;try{if(!Ur(S(),y))return!1}catch{return!1}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Zs(i,o,u,d){o&=~kg,o&=~Bo,i.suspendedLanes|=o,i.pingedLanes&=~o,d&&(i.warmLanes|=o),d=i.expirationTimes;for(var y=o;0<y;){var S=31-it(y),M=1<<S;d[S]=-1,y&=~M}u!==0&&$e(i,u,o)}function rd(){return(Xt&6)===0?(Su(0),!1):!0}function Tg(){if(Lt!==null){if(nn===0)var i=Lt.return;else i=Lt,Qi=Oo=null,Fm(i),Oa=null,iu=0,i=Lt;for(;i!==null;)rS(i.alternate,i),i=i.return;Lt=null}}function Fa(i,o){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,FD(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),us=0,Tg(),fn=i,Lt=u=Yi(i.current,null),Ft=o,nn=0,Vr=null,Hs=!1,Pa=ce(i,o),vg=!1,$a=Kr=kg=Bo=Gs=Nn=0,Or=ku=null,xg=!1,(o&8)!==0&&(o|=o&32);var d=i.entangledLanes;if(d!==0)for(i=i.entanglements,d&=o;0<d;){var y=31-it(d),S=1<<y;o|=i[y],d&=~S}return ls=o,Ef(),u}function RS(i,o){Ct=null,H.H=du,o===Na||o===Mf?(o=qx(),nn=3):o===Am?(o=qx(),nn=4):nn=o===rg?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Vr=o,Lt===null&&(Nn=1,Vf(i,ti(o,i.current)))}function CS(){var i=Hr.current;return i===null?!0:(Ft&4194048)===Ft?si===null:(Ft&62914560)===Ft||(Ft&536870912)!==0?i===si:!1}function AS(){var i=H.H;return H.H=du,i===null?du:i}function NS(){var i=H.A;return H.A=vD,i}function id(){Nn=4,Hs||(Ft&4194048)!==Ft&&Hr.current!==null||(Pa=!0),(Gs&134217727)===0&&(Bo&134217727)===0||fn===null||Zs(fn,Ft,Kr,!1)}function _g(i,o,u){var d=Xt;Xt|=2;var y=AS(),S=NS();(fn!==i||Ft!==o)&&(nd=null,Fa(i,o)),o=!1;var M=Nn;e:do try{if(nn!==0&&Lt!==null){var K=Lt,X=Vr;switch(nn){case 8:Tg(),M=6;break e;case 3:case 2:case 9:case 6:Hr.current===null&&(o=!0);var pe=nn;if(nn=0,Vr=null,Ua(i,K,X,pe),u&&Pa){M=0;break e}break;default:pe=nn,nn=0,Vr=null,Ua(i,K,X,pe)}}SD(),M=Nn;break}catch(Se){RS(i,Se)}while(!0);return o&&i.shellSuspendCounter++,Qi=Oo=null,Xt=d,H.H=y,H.A=S,Lt===null&&(fn=null,Ft=0,Ef()),M}function SD(){for(;Lt!==null;)OS(Lt)}function wD(i,o){var u=Xt;Xt|=2;var d=AS(),y=NS();fn!==i||Ft!==o?(nd=null,td=ne()+500,Fa(i,o)):Pa=ce(i,o);e:do try{if(nn!==0&&Lt!==null){o=Lt;var S=Vr;t:switch(nn){case 1:nn=0,Vr=null,Ua(i,o,S,1);break;case 2:case 9:if(Fx(S)){nn=0,Vr=null,MS(o);break}o=function(){nn!==2&&nn!==9||fn!==i||(nn=7),Ii(i)},S.then(o,o);break e;case 3:nn=7;break e;case 4:nn=5;break e;case 7:Fx(S)?(nn=0,Vr=null,MS(o)):(nn=0,Vr=null,Ua(i,o,S,7));break;case 5:var M=null;switch(Lt.tag){case 26:M=Lt.memoizedState;case 5:case 27:var K=Lt;if(M?bw(M):K.stateNode.complete){nn=0,Vr=null;var X=K.sibling;if(X!==null)Lt=X;else{var pe=K.return;pe!==null?(Lt=pe,sd(pe)):Lt=null}break t}}nn=0,Vr=null,Ua(i,o,S,5);break;case 6:nn=0,Vr=null,Ua(i,o,S,6);break;case 8:Tg(),Nn=6;break e;default:throw Error(r(462))}}ED();break}catch(Se){RS(i,Se)}while(!0);return Qi=Oo=null,H.H=d,H.A=y,Xt=u,Lt!==null?0:(fn=null,Ft=0,Ef(),Nn)}function ED(){for(;Lt!==null&&!fe();)OS(Lt)}function OS(i){var o=tS(i.alternate,i,ls);i.memoizedProps=i.pendingProps,o===null?sd(i):Lt=o}function MS(i){var o=i,u=o.alternate;switch(o.tag){case 15:case 0:o=W0(u,o,o.pendingProps,o.type,void 0,Ft);break;case 11:o=W0(u,o,o.pendingProps,o.type.render,o.ref,Ft);break;case 5:Fm(o);default:rS(u,o),o=Lt=Nx(o,ls),o=tS(u,o,ls)}i.memoizedProps=i.pendingProps,o===null?sd(i):Lt=o}function Ua(i,o,u,d){Qi=Oo=null,Fm(o),Oa=null,iu=0;var y=o.return;try{if(dD(i,y,o,u,Ft)){Nn=1,Vf(i,ti(u,i.current)),Lt=null;return}}catch(S){if(y!==null)throw Lt=y,S;Nn=1,Vf(i,ti(u,i.current)),Lt=null;return}o.flags&32768?(Ht||d===1?i=!0:Pa||(Ft&536870912)!==0?i=!1:(Hs=i=!0,(d===2||d===9||d===3||d===6)&&(d=Hr.current,d!==null&&d.tag===13&&(d.flags|=16384))),IS(o,i)):sd(o)}function sd(i){var o=i;do{if((o.flags&32768)!==0){IS(o,Hs);return}i=o.return;var u=mD(o.alternate,o,ls);if(u!==null){Lt=u;return}if(o=o.sibling,o!==null){Lt=o;return}Lt=o=i}while(o!==null);Nn===0&&(Nn=5)}function IS(i,o){do{var u=gD(i.alternate,i);if(u!==null){u.flags&=32767,Lt=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!o&&(i=i.sibling,i!==null)){Lt=i;return}Lt=i=u}while(i!==null);Nn=6,Lt=null}function DS(i,o,u,d,y,S,M,K,X){i.cancelPendingCommit=null;do od();while(Zn!==0);if((Xt&6)!==0)throw Error(r(327));if(o!==null){if(o===i.current)throw Error(r(177));if(S=o.lanes|o.childLanes,S|=hm,qe(i,u,S,M,K,X),i===fn&&(Lt=fn=null,Ft=0),Ba=o,Ks=i,us=u,Sg=S,wg=y,wS=d,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,CD(ze,function(){return $S(),null})):(i.callbackNode=null,i.callbackPriority=0),d=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||d){d=H.T,H.T=null,y=U.p,U.p=2,M=Xt,Xt|=4;try{bD(i,o,u)}finally{Xt=M,U.p=y,H.T=d}}Zn=1,zS(),jS(),LS()}}function zS(){if(Zn===1){Zn=0;var i=Ks,o=Ba,u=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||u){u=H.T,H.T=null;var d=U.p;U.p=2;var y=Xt;Xt|=4;try{mS(o,i);var S=Pg,M=xx(i.containerInfo),K=S.focusedElem,X=S.selectionRange;if(M!==K&&K&&K.ownerDocument&&kx(K.ownerDocument.documentElement,K)){if(X!==null&&um(K)){var pe=X.start,Se=X.end;if(Se===void 0&&(Se=pe),"selectionStart"in K)K.selectionStart=pe,K.selectionEnd=Math.min(Se,K.value.length);else{var Re=K.ownerDocument||document,me=Re&&Re.defaultView||window;if(me.getSelection){var ye=me.getSelection(),Je=K.textContent.length,pt=Math.min(X.start,Je),an=X.end===void 0?pt:Math.min(X.end,Je);!ye.extend&&pt>an&&(M=an,an=pt,pt=M);var oe=vx(K,pt),re=vx(K,an);if(oe&&re&&(ye.rangeCount!==1||ye.anchorNode!==oe.node||ye.anchorOffset!==oe.offset||ye.focusNode!==re.node||ye.focusOffset!==re.offset)){var de=Re.createRange();de.setStart(oe.node,oe.offset),ye.removeAllRanges(),pt>an?(ye.addRange(de),ye.extend(re.node,re.offset)):(de.setEnd(re.node,re.offset),ye.addRange(de))}}}}for(Re=[],ye=K;ye=ye.parentNode;)ye.nodeType===1&&Re.push({element:ye,left:ye.scrollLeft,top:ye.scrollTop});for(typeof K.focus=="function"&&K.focus(),K=0;K<Re.length;K++){var we=Re[K];we.element.scrollLeft=we.left,we.element.scrollTop=we.top}}yd=!!Lg,Pg=Lg=null}finally{Xt=y,U.p=d,H.T=u}}i.current=o,Zn=2}}function jS(){if(Zn===2){Zn=0;var i=Ks,o=Ba,u=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||u){u=H.T,H.T=null;var d=U.p;U.p=2;var y=Xt;Xt|=4;try{cS(i,o.alternate,o)}finally{Xt=y,U.p=d,H.T=u}}Zn=3}}function LS(){if(Zn===4||Zn===3){Zn=0,se();var i=Ks,o=Ba,u=us,d=wS;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Zn=5:(Zn=0,Ba=Ks=null,PS(i,i.pendingLanes));var y=i.pendingLanes;if(y===0&&(Vs=null),ht(u),o=o.stateNode,ot&&typeof ot.onCommitFiberRoot=="function")try{ot.onCommitFiberRoot(st,o,void 0,(o.current.flags&128)===128)}catch{}if(d!==null){o=H.T,y=U.p,U.p=2,H.T=null;try{for(var S=i.onRecoverableError,M=0;M<d.length;M++){var K=d[M];S(K.value,{componentStack:K.stack})}}finally{H.T=o,U.p=y}}(us&3)!==0&&od(),Ii(i),y=i.pendingLanes,(u&261930)!==0&&(y&42)!==0?i===Eg?xu++:(xu=0,Eg=i):xu=0,Su(0)}}function PS(i,o){(i.pooledCacheLanes&=o)===0&&(o=i.pooledCache,o!=null&&(i.pooledCache=null,nu(o)))}function od(){return zS(),jS(),LS(),$S()}function $S(){if(Zn!==5)return!1;var i=Ks,o=Sg;Sg=0;var u=ht(us),d=H.T,y=U.p;try{U.p=32>u?32:u,H.T=null,u=wg,wg=null;var S=Ks,M=us;if(Zn=0,Ba=Ks=null,us=0,(Xt&6)!==0)throw Error(r(331));var K=Xt;if(Xt|=4,kS(S.current),bS(S,S.current,M,u),Xt=K,Su(0,!1),ot&&typeof ot.onPostCommitFiberRoot=="function")try{ot.onPostCommitFiberRoot(st,S)}catch{}return!0}finally{U.p=y,H.T=d,PS(i,o)}}function BS(i,o,u){o=ti(u,o),o=ng(i.stateNode,o,2),i=Bs(i,o,2),i!==null&&(At(i,2),Ii(i))}function rn(i,o,u){if(i.tag===3)BS(i,i,u);else for(;o!==null;){if(o.tag===3){BS(o,i,u);break}else if(o.tag===1){var d=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Vs===null||!Vs.has(d))){i=ti(u,i),u=F0(2),d=Bs(o,u,2),d!==null&&(U0(u,d,o,i),At(d,2),Ii(d));break}}o=o.return}}function Rg(i,o,u){var d=i.pingCache;if(d===null){d=i.pingCache=new kD;var y=new Set;d.set(o,y)}else y=d.get(o),y===void 0&&(y=new Set,d.set(o,y));y.has(u)||(vg=!0,y.add(u),i=TD.bind(null,i,o,u),o.then(i,i))}function TD(i,o,u){var d=i.pingCache;d!==null&&d.delete(o),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,fn===i&&(Ft&u)===u&&(Nn===4||Nn===3&&(Ft&62914560)===Ft&&300>ne()-ed?(Xt&2)===0&&Fa(i,0):kg|=u,$a===Ft&&($a=0)),Ii(i)}function FS(i,o){o===0&&(o=Ve()),i=Co(i,o),i!==null&&(At(i,o),Ii(i))}function _D(i){var o=i.memoizedState,u=0;o!==null&&(u=o.retryLane),FS(i,u)}function RD(i,o){var u=0;switch(i.tag){case 31:case 13:var d=i.stateNode,y=i.memoizedState;y!==null&&(u=y.retryLane);break;case 19:d=i.stateNode;break;case 22:d=i.stateNode._retryCache;break;default:throw Error(r(314))}d!==null&&d.delete(o),FS(i,u)}function CD(i,o){return Ie(i,o)}var ad=null,qa=null,Cg=!1,ld=!1,Ag=!1,Ws=0;function Ii(i){i!==qa&&i.next===null&&(qa===null?ad=qa=i:qa=qa.next=i),ld=!0,Cg||(Cg=!0,ND())}function Su(i,o){if(!Ag&&ld){Ag=!0;do for(var u=!1,d=ad;d!==null;){if(i!==0){var y=d.pendingLanes;if(y===0)var S=0;else{var M=d.suspendedLanes,K=d.pingedLanes;S=(1<<31-it(42|i)+1)-1,S&=y&~(M&~K),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(u=!0,GS(d,S))}else S=Ft,S=W(d,d===fn?S:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(S&3)===0||ce(d,S)||(u=!0,GS(d,S));d=d.next}while(u);Ag=!1}}function AD(){US()}function US(){ld=Cg=!1;var i=0;Ws!==0&&BD()&&(i=Ws);for(var o=ne(),u=null,d=ad;d!==null;){var y=d.next,S=qS(d,o);S===0?(d.next=null,u===null?ad=y:u.next=y,y===null&&(qa=u)):(u=d,(i!==0||(S&3)!==0)&&(ld=!0)),d=y}Zn!==0&&Zn!==5||Su(i),Ws!==0&&(Ws=0)}function qS(i,o){for(var u=i.suspendedLanes,d=i.pingedLanes,y=i.expirationTimes,S=i.pendingLanes&-62914561;0<S;){var M=31-it(S),K=1<<M,X=y[M];X===-1?((K&u)===0||(K&d)!==0)&&(y[M]=Ae(K,o)):X<=o&&(i.expiredLanes|=K),S&=~K}if(o=fn,u=Ft,u=W(i,i===o?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),d=i.callbackNode,u===0||i===o&&(nn===2||nn===9)||i.cancelPendingCommit!==null)return d!==null&&d!==null&&ge(d),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||ce(i,u)){if(o=u&-u,o===i.callbackPriority)return o;switch(d!==null&&ge(d),ht(u)){case 2:case 8:u=ae;break;case 32:u=ze;break;case 268435456:u=Ge;break;default:u=ze}return d=HS.bind(null,i),u=Ie(u,d),i.callbackPriority=o,i.callbackNode=u,o}return d!==null&&d!==null&&ge(d),i.callbackPriority=2,i.callbackNode=null,2}function HS(i,o){if(Zn!==0&&Zn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(od()&&i.callbackNode!==u)return null;var d=Ft;return d=W(i,i===fn?d:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),d===0?null:(TS(i,d,o),qS(i,ne()),i.callbackNode!=null&&i.callbackNode===u?HS.bind(null,i):null)}function GS(i,o){if(od())return null;TS(i,o,!0)}function ND(){UD(function(){(Xt&6)!==0?Ie(te,AD):US()})}function Ng(){if(Ws===0){var i=Ca;i===0&&(i=Fe,Fe<<=1,(Fe&261888)===0&&(Fe=256)),Ws=i}return Ws}function VS(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Ms(""+i)}function KS(i,o){var u=o.ownerDocument.createElement("input");return u.name=o.name,u.value=o.value,i.id&&u.setAttribute("form",i.id),o.parentNode.insertBefore(u,o),i=new FormData(i),u.parentNode.removeChild(u),i}function OD(i,o,u,d,y){if(o==="submit"&&u&&u.stateNode===y){var S=VS((y[Kn]||null).action),M=d.submitter;M&&(o=(o=M[Kn]||null)?VS(o.formAction):M.getAttribute("formAction"),o!==null&&(S=o,M=null));var K=new kf("action","action",null,d,y);i.push({event:K,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(Ws!==0){var X=M?KS(y,M):new FormData(y);Ym(u,{pending:!0,data:X,method:y.method,action:S},null,X)}}else typeof S=="function"&&(K.preventDefault(),X=M?KS(y,M):new FormData(y),Ym(u,{pending:!0,data:X,method:y.method,action:S},S,X))},currentTarget:y}]})}}for(var Og=0;Og<pm.length;Og++){var Mg=pm[Og],MD=Mg.toLowerCase(),ID=Mg[0].toUpperCase()+Mg.slice(1);ki(MD,"on"+ID)}ki(Ex,"onAnimationEnd"),ki(Tx,"onAnimationIteration"),ki(_x,"onAnimationStart"),ki("dblclick","onDoubleClick"),ki("focusin","onFocus"),ki("focusout","onBlur"),ki(WI,"onTransitionRun"),ki(YI,"onTransitionStart"),ki(XI,"onTransitionCancel"),ki(Rx,"onTransitionEnd"),je("onMouseEnter",["mouseout","mouseover"]),je("onMouseLeave",["mouseout","mouseover"]),je("onPointerEnter",["pointerout","pointerover"]),je("onPointerLeave",["pointerout","pointerover"]),Ki("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ki("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ki("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ki("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ki("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ki("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wu="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(" "),DD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wu));function ZS(i,o){o=(o&4)!==0;for(var u=0;u<i.length;u++){var d=i[u],y=d.event;d=d.listeners;e:{var S=void 0;if(o)for(var M=d.length-1;0<=M;M--){var K=d[M],X=K.instance,pe=K.currentTarget;if(K=K.listener,X!==S&&y.isPropagationStopped())break e;S=K,y.currentTarget=pe;try{S(y)}catch(Se){wf(Se)}y.currentTarget=null,S=X}else for(M=0;M<d.length;M++){if(K=d[M],X=K.instance,pe=K.currentTarget,K=K.listener,X!==S&&y.isPropagationStopped())break e;S=K,y.currentTarget=pe;try{S(y)}catch(Se){wf(Se)}y.currentTarget=null,S=X}}}}function Pt(i,o){var u=o[xo];u===void 0&&(u=o[xo]=new Set);var d=i+"__bubble";u.has(d)||(WS(o,i,2,!1),u.add(d))}function Ig(i,o,u){var d=0;o&&(d|=4),WS(u,i,d,o)}var ud="_reactListening"+Math.random().toString(36).slice(2);function Dg(i){if(!i[ud]){i[ud]=!0,df.forEach(function(u){u!=="selectionchange"&&(DD.has(u)||Ig(u,!1,i),Ig(u,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[ud]||(o[ud]=!0,Ig("selectionchange",!1,o))}}function WS(i,o,u,d){switch(Ew(o)){case 2:var y=lz;break;case 8:y=uz;break;default:y=Wg}u=y.bind(null,o,u,i),y=void 0,!em||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(y=!0),d?y!==void 0?i.addEventListener(o,u,{capture:!0,passive:y}):i.addEventListener(o,u,!0):y!==void 0?i.addEventListener(o,u,{passive:y}):i.addEventListener(o,u,!1)}function zg(i,o,u,d,y){var S=d;if((o&1)===0&&(o&2)===0&&d!==null)e:for(;;){if(d===null)return;var M=d.tag;if(M===3||M===4){var K=d.stateNode.containerInfo;if(K===y)break;if(M===4)for(M=d.return;M!==null;){var X=M.tag;if((X===3||X===4)&&M.stateNode.containerInfo===y)return;M=M.return}for(;K!==null;){if(M=yr(K),M===null)return;if(X=M.tag,X===5||X===6||X===26||X===27){d=S=M;continue e}K=K.parentNode}}d=d.return}gf(function(){var pe=S,Se=_t(u),Re=[];e:{var me=Cx.get(i);if(me!==void 0){var ye=kf,Je=i;switch(i){case"keypress":if(yf(u)===0)break e;case"keydown":case"keyup":ye=RI;break;case"focusin":Je="focus",ye=im;break;case"focusout":Je="blur",ye=im;break;case"beforeblur":case"afterblur":ye=im;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ye=rx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ye=mI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ye=NI;break;case Ex:case Tx:case _x:ye=yI;break;case Rx:ye=MI;break;case"scroll":case"scrollend":ye=pI;break;case"wheel":ye=DI;break;case"copy":case"cut":case"paste":ye=kI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ye=sx;break;case"toggle":case"beforetoggle":ye=jI}var pt=(o&4)!==0,an=!pt&&(i==="scroll"||i==="scrollend"),oe=pt?me!==null?me+"Capture":null:me;pt=[];for(var re=pe,de;re!==null;){var we=re;if(de=we.stateNode,we=we.tag,we!==5&&we!==26&&we!==27||de===null||oe===null||(we=Gl(re,oe),we!=null&&pt.push(Eu(re,we,de))),an)break;re=re.return}0<pt.length&&(me=new ye(me,Je,null,u,Se),Re.push({event:me,listeners:pt}))}}if((o&7)===0){e:{if(me=i==="mouseover"||i==="pointerover",ye=i==="mouseout"||i==="pointerout",me&&u!==et&&(Je=u.relatedTarget||u.fromElement)&&(yr(Je)||Je[vi]))break e;if((ye||me)&&(me=Se.window===Se?Se:(me=Se.ownerDocument)?me.defaultView||me.parentWindow:window,ye?(Je=u.relatedTarget||u.toElement,ye=pe,Je=Je?yr(Je):null,Je!==null&&(an=a(Je),pt=Je.tag,Je!==an||pt!==5&&pt!==27&&pt!==6)&&(Je=null)):(ye=null,Je=pe),ye!==Je)){if(pt=rx,we="onMouseLeave",oe="onMouseEnter",re="mouse",(i==="pointerout"||i==="pointerover")&&(pt=sx,we="onPointerLeave",oe="onPointerEnter",re="pointer"),an=ye==null?me:As(ye),de=Je==null?me:As(Je),me=new pt(we,re+"leave",ye,u,Se),me.target=an,me.relatedTarget=de,we=null,yr(Se)===pe&&(pt=new pt(oe,re+"enter",Je,u,Se),pt.target=de,pt.relatedTarget=an,we=pt),an=we,ye&&Je)t:{for(pt=zD,oe=ye,re=Je,de=0,we=oe;we;we=pt(we))de++;we=0;for(var ct=re;ct;ct=pt(ct))we++;for(;0<de-we;)oe=pt(oe),de--;for(;0<we-de;)re=pt(re),we--;for(;de--;){if(oe===re||re!==null&&oe===re.alternate){pt=oe;break t}oe=pt(oe),re=pt(re)}pt=null}else pt=null;ye!==null&&YS(Re,me,ye,pt,!1),Je!==null&&an!==null&&YS(Re,an,Je,pt,!0)}}e:{if(me=pe?As(pe):window,ye=me.nodeName&&me.nodeName.toLowerCase(),ye==="select"||ye==="input"&&me.type==="file")var Kt=px;else if(fx(me))if(hx)Kt=VI;else{Kt=HI;var tt=qI}else ye=me.nodeName,!ye||ye.toLowerCase()!=="input"||me.type!=="checkbox"&&me.type!=="radio"?pe&&Os(pe.elementType)&&(Kt=px):Kt=GI;if(Kt&&(Kt=Kt(i,pe))){dx(Re,Kt,u,Se);break e}tt&&tt(i,me,pe),i==="focusout"&&pe&&me.type==="number"&&pe.memoizedProps.value!=null&&ba(me,"number",me.value)}switch(tt=pe?As(pe):window,i){case"focusin":(fx(tt)||tt.contentEditable==="true")&&(ka=tt,cm=pe,Jl=null);break;case"focusout":Jl=cm=ka=null;break;case"mousedown":fm=!0;break;case"contextmenu":case"mouseup":case"dragend":fm=!1,Sx(Re,u,Se);break;case"selectionchange":if(ZI)break;case"keydown":case"keyup":Sx(Re,u,Se)}var Ot;if(om)e:{switch(i){case"compositionstart":var Ut="onCompositionStart";break e;case"compositionend":Ut="onCompositionEnd";break e;case"compositionupdate":Ut="onCompositionUpdate";break e}Ut=void 0}else va?ux(i,u)&&(Ut="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(Ut="onCompositionStart");Ut&&(ox&&u.locale!=="ko"&&(va||Ut!=="onCompositionStart"?Ut==="onCompositionEnd"&&va&&(Ot=tx()):(Is=Se,tm="value"in Is?Is.value:Is.textContent,va=!0)),tt=cd(pe,Ut),0<tt.length&&(Ut=new ix(Ut,i,null,u,Se),Re.push({event:Ut,listeners:tt}),Ot?Ut.data=Ot:(Ot=cx(u),Ot!==null&&(Ut.data=Ot)))),(Ot=PI?$I(i,u):BI(i,u))&&(Ut=cd(pe,"onBeforeInput"),0<Ut.length&&(tt=new ix("onBeforeInput","beforeinput",null,u,Se),Re.push({event:tt,listeners:Ut}),tt.data=Ot)),OD(Re,i,pe,u,Se)}ZS(Re,o)})}function Eu(i,o,u){return{instance:i,listener:o,currentTarget:u}}function cd(i,o){for(var u=o+"Capture",d=[];i!==null;){var y=i,S=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||S===null||(y=Gl(i,u),y!=null&&d.unshift(Eu(i,y,S)),y=Gl(i,o),y!=null&&d.push(Eu(i,y,S))),i.tag===3)return d;i=i.return}return[]}function zD(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function YS(i,o,u,d,y){for(var S=o._reactName,M=[];u!==null&&u!==d;){var K=u,X=K.alternate,pe=K.stateNode;if(K=K.tag,X!==null&&X===d)break;K!==5&&K!==26&&K!==27||pe===null||(X=pe,y?(pe=Gl(u,S),pe!=null&&M.unshift(Eu(u,pe,X))):y||(pe=Gl(u,S),pe!=null&&M.push(Eu(u,pe,X)))),u=u.return}M.length!==0&&i.push({event:o,listeners:M})}var jD=/\r\n?/g,LD=/\u0000|\uFFFD/g;function XS(i){return(typeof i=="string"?i:""+i).replace(jD,`
|
|
9
|
-
`).replace(LD,"")}function QS(i,o){return o=XS(o),XS(i)===o}function on(i,o,u,d,y,S){switch(u){case"children":typeof d=="string"?o==="body"||o==="textarea"&&d===""||mt(i,d):(typeof d=="number"||typeof d=="bigint")&&o!=="body"&&mt(i,""+d);break;case"className":Br(i,"class",d);break;case"tabIndex":Br(i,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":Br(i,u,d);break;case"style":tn(i,d,S);break;case"data":if(o!=="object"){Br(i,"data",d);break}case"src":case"href":if(d===""&&(o!=="a"||u!=="href")){i.removeAttribute(u);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){i.removeAttribute(u);break}d=Ms(""+d),i.setAttribute(u,d);break;case"action":case"formAction":if(typeof d=="function"){i.setAttribute(u,"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}else typeof S=="function"&&(u==="formAction"?(o!=="input"&&on(i,o,"name",y.name,y,null),on(i,o,"formEncType",y.formEncType,y,null),on(i,o,"formMethod",y.formMethod,y,null),on(i,o,"formTarget",y.formTarget,y,null)):(on(i,o,"encType",y.encType,y,null),on(i,o,"method",y.method,y,null),on(i,o,"target",y.target,y,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){i.removeAttribute(u);break}d=Ms(""+d),i.setAttribute(u,d);break;case"onClick":d!=null&&(i.onclick=Be);break;case"onScroll":d!=null&&Pt("scroll",i);break;case"onScrollEnd":d!=null&&Pt("scrollend",i);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(r(61));if(u=d.__html,u!=null){if(y.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"multiple":i.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":i.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){i.removeAttribute("xlink:href");break}u=Ms(""+d),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?i.setAttribute(u,""+d):i.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":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":d&&typeof d!="function"&&typeof d!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":d===!0?i.setAttribute(u,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?i.setAttribute(u,d):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?i.setAttribute(u,d):i.removeAttribute(u);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?i.removeAttribute(u):i.setAttribute(u,d);break;case"popover":Pt("beforetoggle",i),Pt("toggle",i),lr(i,"popover",d);break;case"xlinkActuate":Tr(i,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":Tr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":Tr(i,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":Tr(i,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":Tr(i,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":Tr(i,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":Tr(i,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":Tr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":Tr(i,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":lr(i,"is",d);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=Zi.get(u)||u,lr(i,u,d))}}function jg(i,o,u,d,y,S){switch(u){case"style":tn(i,d,S);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(r(61));if(u=d.__html,u!=null){if(y.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"children":typeof d=="string"?mt(i,d):(typeof d=="number"||typeof d=="bigint")&&mt(i,""+d);break;case"onScroll":d!=null&&Pt("scroll",i);break;case"onScrollEnd":d!=null&&Pt("scrollend",i);break;case"onClick":d!=null&&(i.onclick=Be);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wo.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(y=u.endsWith("Capture"),o=u.slice(2,y?u.length-7:void 0),S=i[Kn]||null,S=S!=null?S[u]:null,typeof S=="function"&&i.removeEventListener(o,S,y),typeof d=="function")){typeof S!="function"&&S!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(o,d,y);break e}u in i?i[u]=d:d===!0?i.setAttribute(u,""):lr(i,u,d)}}}function ir(i,o,u){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Pt("error",i),Pt("load",i);var d=!1,y=!1,S;for(S in u)if(u.hasOwnProperty(S)){var M=u[S];if(M!=null)switch(S){case"src":d=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:on(i,o,S,M,u,null)}}y&&on(i,o,"srcSet",u.srcSet,u,null),d&&on(i,o,"src",u.src,u,null);return;case"input":Pt("invalid",i);var K=S=M=y=null,X=null,pe=null;for(d in u)if(u.hasOwnProperty(d)){var Se=u[d];if(Se!=null)switch(d){case"name":y=Se;break;case"type":M=Se;break;case"checked":X=Se;break;case"defaultChecked":pe=Se;break;case"value":S=Se;break;case"defaultValue":K=Se;break;case"children":case"dangerouslySetInnerHTML":if(Se!=null)throw Error(r(137,o));break;default:on(i,o,d,Se,u,null)}}Eo(i,S,K,X,pe,M,y,!1);return;case"select":Pt("invalid",i),d=M=S=null;for(y in u)if(u.hasOwnProperty(y)&&(K=u[y],K!=null))switch(y){case"value":S=K;break;case"defaultValue":M=K;break;case"multiple":d=K;default:on(i,o,y,K,u,null)}o=S,u=M,i.multiple=!!d,o!=null?er(i,!!d,o,!1):u!=null&&er(i,!!d,u,!0);return;case"textarea":Pt("invalid",i),S=y=d=null;for(M in u)if(u.hasOwnProperty(M)&&(K=u[M],K!=null))switch(M){case"value":d=K;break;case"defaultValue":y=K;break;case"children":S=K;break;case"dangerouslySetInnerHTML":if(K!=null)throw Error(r(91));break;default:on(i,o,M,K,u,null)}ya(i,d,y,S);return;case"option":for(X in u)u.hasOwnProperty(X)&&(d=u[X],d!=null)&&(X==="selected"?i.selected=d&&typeof d!="function"&&typeof d!="symbol":on(i,o,X,d,u,null));return;case"dialog":Pt("beforetoggle",i),Pt("toggle",i),Pt("cancel",i),Pt("close",i);break;case"iframe":case"object":Pt("load",i);break;case"video":case"audio":for(d=0;d<wu.length;d++)Pt(wu[d],i);break;case"image":Pt("error",i),Pt("load",i);break;case"details":Pt("toggle",i);break;case"embed":case"source":case"link":Pt("error",i),Pt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(pe in u)if(u.hasOwnProperty(pe)&&(d=u[pe],d!=null))switch(pe){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:on(i,o,pe,d,u,null)}return;default:if(Os(o)){for(Se in u)u.hasOwnProperty(Se)&&(d=u[Se],d!==void 0&&jg(i,o,Se,d,u,void 0));return}}for(K in u)u.hasOwnProperty(K)&&(d=u[K],d!=null&&on(i,o,K,d,u,null))}function PD(i,o,u,d){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,S=null,M=null,K=null,X=null,pe=null,Se=null;for(ye in u){var Re=u[ye];if(u.hasOwnProperty(ye)&&Re!=null)switch(ye){case"checked":break;case"value":break;case"defaultValue":X=Re;default:d.hasOwnProperty(ye)||on(i,o,ye,null,d,Re)}}for(var me in d){var ye=d[me];if(Re=u[me],d.hasOwnProperty(me)&&(ye!=null||Re!=null))switch(me){case"type":S=ye;break;case"name":y=ye;break;case"checked":pe=ye;break;case"defaultChecked":Se=ye;break;case"value":M=ye;break;case"defaultValue":K=ye;break;case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(r(137,o));break;default:ye!==Re&&on(i,o,me,ye,d,Re)}}Ul(i,M,K,X,pe,Se,S,y);return;case"select":ye=M=K=me=null;for(S in u)if(X=u[S],u.hasOwnProperty(S)&&X!=null)switch(S){case"value":break;case"multiple":ye=X;default:d.hasOwnProperty(S)||on(i,o,S,null,d,X)}for(y in d)if(S=d[y],X=u[y],d.hasOwnProperty(y)&&(S!=null||X!=null))switch(y){case"value":me=S;break;case"defaultValue":K=S;break;case"multiple":M=S;default:S!==X&&on(i,o,y,S,d,X)}o=K,u=M,d=ye,me!=null?er(i,!!u,me,!1):!!d!=!!u&&(o!=null?er(i,!!u,o,!0):er(i,!!u,u?[]:"",!1));return;case"textarea":ye=me=null;for(K in u)if(y=u[K],u.hasOwnProperty(K)&&y!=null&&!d.hasOwnProperty(K))switch(K){case"value":break;case"children":break;default:on(i,o,K,null,d,y)}for(M in d)if(y=d[M],S=u[M],d.hasOwnProperty(M)&&(y!=null||S!=null))switch(M){case"value":me=y;break;case"defaultValue":ye=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==S&&on(i,o,M,y,d,S)}hf(i,me,ye);return;case"option":for(var Je in u)me=u[Je],u.hasOwnProperty(Je)&&me!=null&&!d.hasOwnProperty(Je)&&(Je==="selected"?i.selected=!1:on(i,o,Je,null,d,me));for(X in d)me=d[X],ye=u[X],d.hasOwnProperty(X)&&me!==ye&&(me!=null||ye!=null)&&(X==="selected"?i.selected=me&&typeof me!="function"&&typeof me!="symbol":on(i,o,X,me,d,ye));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 pt in u)me=u[pt],u.hasOwnProperty(pt)&&me!=null&&!d.hasOwnProperty(pt)&&on(i,o,pt,null,d,me);for(pe in d)if(me=d[pe],ye=u[pe],d.hasOwnProperty(pe)&&me!==ye&&(me!=null||ye!=null))switch(pe){case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(r(137,o));break;default:on(i,o,pe,me,d,ye)}return;default:if(Os(o)){for(var an in u)me=u[an],u.hasOwnProperty(an)&&me!==void 0&&!d.hasOwnProperty(an)&&jg(i,o,an,void 0,d,me);for(Se in d)me=d[Se],ye=u[Se],!d.hasOwnProperty(Se)||me===ye||me===void 0&&ye===void 0||jg(i,o,Se,me,d,ye);return}}for(var oe in u)me=u[oe],u.hasOwnProperty(oe)&&me!=null&&!d.hasOwnProperty(oe)&&on(i,o,oe,null,d,me);for(Re in d)me=d[Re],ye=u[Re],!d.hasOwnProperty(Re)||me===ye||me==null&&ye==null||on(i,o,Re,me,d,ye)}function JS(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $D(){if(typeof performance.getEntriesByType=="function"){for(var i=0,o=0,u=performance.getEntriesByType("resource"),d=0;d<u.length;d++){var y=u[d],S=y.transferSize,M=y.initiatorType,K=y.duration;if(S&&K&&JS(M)){for(M=0,K=y.responseEnd,d+=1;d<u.length;d++){var X=u[d],pe=X.startTime;if(pe>K)break;var Se=X.transferSize,Re=X.initiatorType;Se&&JS(Re)&&(X=X.responseEnd,M+=Se*(X<K?1:(K-pe)/(X-pe)))}if(--d,o+=8*(S+M)/(y.duration/1e3),i++,10<i)break}}if(0<i)return o/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var Lg=null,Pg=null;function fd(i){return i.nodeType===9?i:i.ownerDocument}function ew(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function tw(i,o){if(i===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&o==="foreignObject"?0:i}function $g(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Bg=null;function BD(){var i=window.event;return i&&i.type==="popstate"?i===Bg?!1:(Bg=i,!0):(Bg=null,!1)}var nw=typeof setTimeout=="function"?setTimeout:void 0,FD=typeof clearTimeout=="function"?clearTimeout:void 0,rw=typeof Promise=="function"?Promise:void 0,UD=typeof queueMicrotask=="function"?queueMicrotask:typeof rw<"u"?function(i){return rw.resolve(null).then(i).catch(qD)}:nw;function qD(i){setTimeout(function(){throw i})}function Ys(i){return i==="head"}function iw(i,o){var u=o,d=0;do{var y=u.nextSibling;if(i.removeChild(u),y&&y.nodeType===8)if(u=y.data,u==="/$"||u==="/&"){if(d===0){i.removeChild(y),Ka(o);return}d--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")d++;else if(u==="html")Tu(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,Tu(u);for(var S=u.firstChild;S;){var M=S.nextSibling,K=S.nodeName;S[So]||K==="SCRIPT"||K==="STYLE"||K==="LINK"&&S.rel.toLowerCase()==="stylesheet"||u.removeChild(S),S=M}}else u==="body"&&Tu(i.ownerDocument.body);u=y}while(u);Ka(o)}function sw(i,o){var u=i;i=0;do{var d=u.nextSibling;if(u.nodeType===1?o?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(o?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),d&&d.nodeType===8)if(u=d.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=d}while(u)}function Fg(i){var o=i.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var u=o;switch(o=o.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":Fg(u),Bl(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function HD(i,o,u,d){for(;i.nodeType===1;){var y=u;if(i.nodeName.toLowerCase()!==o.toLowerCase()){if(!d&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(d){if(!i[So])switch(o){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(S=i.getAttribute("rel"),S==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(S!==y.rel||i.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||i.getAttribute("title")!==(y.title==null?null:y.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(S=i.getAttribute("src"),(S!==(y.src==null?null:y.src)||i.getAttribute("type")!==(y.type==null?null:y.type)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&S&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(o==="input"&&i.type==="hidden"){var S=y.name==null?null:""+y.name;if(y.type==="hidden"&&i.getAttribute("name")===S)return i}else return i;if(i=oi(i.nextSibling),i===null)break}return null}function GD(i,o,u){if(o==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=oi(i.nextSibling),i===null))return null;return i}function ow(i,o){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=oi(i.nextSibling),i===null))return null;return i}function Ug(i){return i.data==="$?"||i.data==="$~"}function qg(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function VD(i,o){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=o;else if(i.data!=="$?"||u.readyState!=="loading")o();else{var d=function(){o(),u.removeEventListener("DOMContentLoaded",d)};u.addEventListener("DOMContentLoaded",d),i._reactRetry=d}}function oi(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return i}var Hg=null;function aw(i){i=i.nextSibling;for(var o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(o===0)return oi(i.nextSibling);o--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||o++}i=i.nextSibling}return null}function lw(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(o===0)return i;o--}else u!=="/$"&&u!=="/&"||o++}i=i.previousSibling}return null}function uw(i,o,u){switch(o=fd(u),i){case"html":if(i=o.documentElement,!i)throw Error(r(452));return i;case"head":if(i=o.head,!i)throw Error(r(453));return i;case"body":if(i=o.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function Tu(i){for(var o=i.attributes;o.length;)i.removeAttributeNode(o[0]);Bl(i)}var ai=new Map,cw=new Set;function dd(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var cs=U.d;U.d={f:KD,r:ZD,D:WD,C:YD,L:XD,m:QD,X:ez,S:JD,M:tz};function KD(){var i=cs.f(),o=rd();return i||o}function ZD(i){var o=Vi(i);o!==null&&o.tag===5&&o.type==="form"?R0(o):cs.r(i)}var Ha=typeof document>"u"?null:document;function fw(i,o,u){var d=Ha;if(d&&typeof o=="string"&&o){var y=_r(o);y='link[rel="'+i+'"][href="'+y+'"]',typeof u=="string"&&(y+='[crossorigin="'+u+'"]'),cw.has(y)||(cw.add(y),i={rel:i,crossOrigin:u,href:o},d.querySelector(y)===null&&(o=d.createElement("link"),ir(o,"link",i),Pn(o),d.head.appendChild(o)))}}function WD(i){cs.D(i),fw("dns-prefetch",i,null)}function YD(i,o){cs.C(i,o),fw("preconnect",i,o)}function XD(i,o,u){cs.L(i,o,u);var d=Ha;if(d&&i&&o){var y='link[rel="preload"][as="'+_r(o)+'"]';o==="image"&&u&&u.imageSrcSet?(y+='[imagesrcset="'+_r(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(y+='[imagesizes="'+_r(u.imageSizes)+'"]')):y+='[href="'+_r(i)+'"]';var S=y;switch(o){case"style":S=Ga(i);break;case"script":S=Va(i)}ai.has(S)||(i=m({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:i,as:o},u),ai.set(S,i),d.querySelector(y)!==null||o==="style"&&d.querySelector(_u(S))||o==="script"&&d.querySelector(Ru(S))||(o=d.createElement("link"),ir(o,"link",i),Pn(o),d.head.appendChild(o)))}}function QD(i,o){cs.m(i,o);var u=Ha;if(u&&i){var d=o&&typeof o.as=="string"?o.as:"script",y='link[rel="modulepreload"][as="'+_r(d)+'"][href="'+_r(i)+'"]',S=y;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=Va(i)}if(!ai.has(S)&&(i=m({rel:"modulepreload",href:i},o),ai.set(S,i),u.querySelector(y)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Ru(S)))return}d=u.createElement("link"),ir(d,"link",i),Pn(d),u.head.appendChild(d)}}}function JD(i,o,u){cs.S(i,o,u);var d=Ha;if(d&&i){var y=Ns(d).hoistableStyles,S=Ga(i);o=o||"default";var M=y.get(S);if(!M){var K={loading:0,preload:null};if(M=d.querySelector(_u(S)))K.loading=5;else{i=m({rel:"stylesheet",href:i,"data-precedence":o},u),(u=ai.get(S))&&Gg(i,u);var X=M=d.createElement("link");Pn(X),ir(X,"link",i),X._p=new Promise(function(pe,Se){X.onload=pe,X.onerror=Se}),X.addEventListener("load",function(){K.loading|=1}),X.addEventListener("error",function(){K.loading|=2}),K.loading|=4,pd(M,o,d)}M={type:"stylesheet",instance:M,count:1,state:K},y.set(S,M)}}}function ez(i,o){cs.X(i,o);var u=Ha;if(u&&i){var d=Ns(u).hoistableScripts,y=Va(i),S=d.get(y);S||(S=u.querySelector(Ru(y)),S||(i=m({src:i,async:!0},o),(o=ai.get(y))&&Vg(i,o),S=u.createElement("script"),Pn(S),ir(S,"link",i),u.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},d.set(y,S))}}function tz(i,o){cs.M(i,o);var u=Ha;if(u&&i){var d=Ns(u).hoistableScripts,y=Va(i),S=d.get(y);S||(S=u.querySelector(Ru(y)),S||(i=m({src:i,async:!0,type:"module"},o),(o=ai.get(y))&&Vg(i,o),S=u.createElement("script"),Pn(S),ir(S,"link",i),u.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},d.set(y,S))}}function dw(i,o,u,d){var y=(y=ie.current)?dd(y):null;if(!y)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(o=Ga(u.href),u=Ns(y).hoistableStyles,d=u.get(o),d||(d={type:"style",instance:null,count:0,state:null},u.set(o,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=Ga(u.href);var S=Ns(y).hoistableStyles,M=S.get(i);if(M||(y=y.ownerDocument||y,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(i,M),(S=y.querySelector(_u(i)))&&!S._p&&(M.instance=S,M.state.loading=5),ai.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},ai.set(i,u),S||nz(y,i,u,M.state))),o&&d===null)throw Error(r(528,""));return M}if(o&&d!==null)throw Error(r(529,""));return null;case"script":return o=u.async,u=u.src,typeof u=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Va(u),u=Ns(y).hoistableScripts,d=u.get(o),d||(d={type:"script",instance:null,count:0,state:null},u.set(o,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function Ga(i){return'href="'+_r(i)+'"'}function _u(i){return'link[rel="stylesheet"]['+i+"]"}function pw(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function nz(i,o,u,d){i.querySelector('link[rel="preload"][as="style"]['+o+"]")?d.loading=1:(o=i.createElement("link"),d.preload=o,o.addEventListener("load",function(){return d.loading|=1}),o.addEventListener("error",function(){return d.loading|=2}),ir(o,"link",u),Pn(o),i.head.appendChild(o))}function Va(i){return'[src="'+_r(i)+'"]'}function Ru(i){return"script[async]"+i}function hw(i,o,u){if(o.count++,o.instance===null)switch(o.type){case"style":var d=i.querySelector('style[data-href~="'+_r(u.href)+'"]');if(d)return o.instance=d,Pn(d),d;var y=m({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return d=(i.ownerDocument||i).createElement("style"),Pn(d),ir(d,"style",y),pd(d,u.precedence,i),o.instance=d;case"stylesheet":y=Ga(u.href);var S=i.querySelector(_u(y));if(S)return o.state.loading|=4,o.instance=S,Pn(S),S;d=pw(u),(y=ai.get(y))&&Gg(d,y),S=(i.ownerDocument||i).createElement("link"),Pn(S);var M=S;return M._p=new Promise(function(K,X){M.onload=K,M.onerror=X}),ir(S,"link",d),o.state.loading|=4,pd(S,u.precedence,i),o.instance=S;case"script":return S=Va(u.src),(y=i.querySelector(Ru(S)))?(o.instance=y,Pn(y),y):(d=u,(y=ai.get(S))&&(d=m({},u),Vg(d,y)),i=i.ownerDocument||i,y=i.createElement("script"),Pn(y),ir(y,"link",d),i.head.appendChild(y),o.instance=y);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(d=o.instance,o.state.loading|=4,pd(d,u.precedence,i));return o.instance}function pd(i,o,u){for(var d=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=d.length?d[d.length-1]:null,S=y,M=0;M<d.length;M++){var K=d[M];if(K.dataset.precedence===o)S=K;else if(S!==y)break}S?S.parentNode.insertBefore(i,S.nextSibling):(o=u.nodeType===9?u.head:u,o.insertBefore(i,o.firstChild))}function Gg(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.title==null&&(i.title=o.title)}function Vg(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.integrity==null&&(i.integrity=o.integrity)}var hd=null;function mw(i,o,u){if(hd===null){var d=new Map,y=hd=new Map;y.set(u,d)}else y=hd,d=y.get(u),d||(d=new Map,y.set(u,d));if(d.has(i))return d;for(d.set(i,null),u=u.getElementsByTagName(i),y=0;y<u.length;y++){var S=u[y];if(!(S[So]||S[wt]||i==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var M=S.getAttribute(o)||"";M=i+M;var K=d.get(M);K?K.push(S):d.set(M,[S])}}return d}function gw(i,o,u){i=i.ownerDocument||i,i.head.insertBefore(u,o==="title"?i.querySelector("head > title"):null)}function rz(i,o,u){if(u===1||o.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(i=o.disabled,typeof o.precedence=="string"&&i==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function bw(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function iz(i,o,u,d){if(u.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var y=Ga(d.href),S=o.querySelector(_u(y));if(S){o=S._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(i.count++,i=md.bind(i),o.then(i,i)),u.state.loading|=4,u.instance=S,Pn(S);return}S=o.ownerDocument||o,d=pw(d),(y=ai.get(y))&&Gg(d,y),S=S.createElement("link"),Pn(S);var M=S;M._p=new Promise(function(K,X){M.onload=K,M.onerror=X}),ir(S,"link",d),u.instance=S}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=md.bind(i),o.addEventListener("load",u),o.addEventListener("error",u))}}var Kg=0;function sz(i,o){return i.stylesheets&&i.count===0&&bd(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var d=setTimeout(function(){if(i.stylesheets&&bd(i,i.stylesheets),i.unsuspend){var S=i.unsuspend;i.unsuspend=null,S()}},6e4+o);0<i.imgBytes&&Kg===0&&(Kg=62500*$D());var y=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&bd(i,i.stylesheets),i.unsuspend)){var S=i.unsuspend;i.unsuspend=null,S()}},(i.imgBytes>Kg?50:800)+o);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(d),clearTimeout(y)}}:null}function md(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)bd(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var gd=null;function bd(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,gd=new Map,o.forEach(oz,i),gd=null,md.call(i))}function oz(i,o){if(!(o.state.loading&4)){var u=gd.get(i);if(u)var d=u.get(null);else{u=new Map,gd.set(i,u);for(var y=i.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<y.length;S++){var M=y[S];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(u.set(M.dataset.precedence,M),d=M)}d&&u.set(null,d)}y=o.instance,M=y.getAttribute("data-precedence"),S=u.get(M)||d,S===d&&u.set(null,y),u.set(M,y),this.count++,d=md.bind(this),y.addEventListener("load",d),y.addEventListener("error",d),S?S.parentNode.insertBefore(y,S.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(y,i.firstChild)),o.state.loading|=4}}var Cu={$$typeof:T,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function az(i,o,u,d,y,S,M,K,X){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=St(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=St(0),this.hiddenUpdates=St(null),this.identifierPrefix=d,this.onUncaughtError=y,this.onCaughtError=S,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function yw(i,o,u,d,y,S,M,K,X,pe,Se,Re){return i=new az(i,o,u,M,X,pe,Se,Re,K),o=1,S===!0&&(o|=24),S=qr(3,null,null,o),i.current=S,S.stateNode=i,o=_m(),o.refCount++,i.pooledCache=o,o.refCount++,S.memoizedState={element:d,isDehydrated:u,cache:o},Nm(S),i}function vw(i){return i?(i=wa,i):wa}function kw(i,o,u,d,y,S){y=vw(y),d.context===null?d.context=y:d.pendingContext=y,d=$s(o),d.payload={element:u},S=S===void 0?null:S,S!==null&&(d.callback=S),u=Bs(i,d,o),u!==null&&(Mr(u,i,o),ou(u,i,o))}function xw(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<o?u:o}}function Zg(i,o){xw(i,o),(i=i.alternate)&&xw(i,o)}function Sw(i){if(i.tag===13||i.tag===31){var o=Co(i,67108864);o!==null&&Mr(o,i,67108864),Zg(i,67108864)}}function ww(i){if(i.tag===13||i.tag===31){var o=Zr();o=We(o);var u=Co(i,o);u!==null&&Mr(u,i,o),Zg(i,o)}}var yd=!0;function lz(i,o,u,d){var y=H.T;H.T=null;var S=U.p;try{U.p=2,Wg(i,o,u,d)}finally{U.p=S,H.T=y}}function uz(i,o,u,d){var y=H.T;H.T=null;var S=U.p;try{U.p=8,Wg(i,o,u,d)}finally{U.p=S,H.T=y}}function Wg(i,o,u,d){if(yd){var y=Yg(d);if(y===null)zg(i,o,d,vd,u),Tw(i,d);else if(fz(y,i,o,u,d))d.stopPropagation();else if(Tw(i,d),o&4&&-1<cz.indexOf(i)){for(;y!==null;){var S=Vi(y);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var M=Qe(S.pendingLanes);if(M!==0){var K=S;for(K.pendingLanes|=2,K.entangledLanes|=2;M;){var X=1<<31-it(M);K.entanglements[1]|=X,M&=~X}Ii(S),(Xt&6)===0&&(td=ne()+500,Su(0))}}break;case 31:case 13:K=Co(S,2),K!==null&&Mr(K,S,2),rd(),Zg(S,2)}if(S=Yg(d),S===null&&zg(i,o,d,vd,u),S===y)break;y=S}y!==null&&d.stopPropagation()}else zg(i,o,d,null,u)}}function Yg(i){return i=_t(i),Xg(i)}var vd=null;function Xg(i){if(vd=null,i=yr(i),i!==null){var o=a(i);if(o===null)i=null;else{var u=o.tag;if(u===13){if(i=l(o),i!==null)return i;i=null}else if(u===31){if(i=c(o),i!==null)return i;i=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return vd=i,null}function Ew(i){switch(i){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"resize":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"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"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(_e()){case te:return 2;case ae:return 8;case ze:case Ue:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var Qg=!1,Xs=null,Qs=null,Js=null,Au=new Map,Nu=new Map,eo=[],cz="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 Tw(i,o){switch(i){case"focusin":case"focusout":Xs=null;break;case"dragenter":case"dragleave":Qs=null;break;case"mouseover":case"mouseout":Js=null;break;case"pointerover":case"pointerout":Au.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nu.delete(o.pointerId)}}function Ou(i,o,u,d,y,S){return i===null||i.nativeEvent!==S?(i={blockedOn:o,domEventName:u,eventSystemFlags:d,nativeEvent:S,targetContainers:[y]},o!==null&&(o=Vi(o),o!==null&&Sw(o)),i):(i.eventSystemFlags|=d,o=i.targetContainers,y!==null&&o.indexOf(y)===-1&&o.push(y),i)}function fz(i,o,u,d,y){switch(o){case"focusin":return Xs=Ou(Xs,i,o,u,d,y),!0;case"dragenter":return Qs=Ou(Qs,i,o,u,d,y),!0;case"mouseover":return Js=Ou(Js,i,o,u,d,y),!0;case"pointerover":var S=y.pointerId;return Au.set(S,Ou(Au.get(S)||null,i,o,u,d,y)),!0;case"gotpointercapture":return S=y.pointerId,Nu.set(S,Ou(Nu.get(S)||null,i,o,u,d,y)),!0}return!1}function _w(i){var o=yr(i.target);if(o!==null){var u=a(o);if(u!==null){if(o=u.tag,o===13){if(o=l(u),o!==null){i.blockedOn=o,Jt(i.priority,function(){ww(u)});return}}else if(o===31){if(o=c(u),o!==null){i.blockedOn=o,Jt(i.priority,function(){ww(u)});return}}else if(o===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function kd(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var u=Yg(i.nativeEvent);if(u===null){u=i.nativeEvent;var d=new u.constructor(u.type,u);et=d,u.target.dispatchEvent(d),et=null}else return o=Vi(u),o!==null&&Sw(o),i.blockedOn=u,!1;o.shift()}return!0}function Rw(i,o,u){kd(i)&&u.delete(o)}function dz(){Qg=!1,Xs!==null&&kd(Xs)&&(Xs=null),Qs!==null&&kd(Qs)&&(Qs=null),Js!==null&&kd(Js)&&(Js=null),Au.forEach(Rw),Nu.forEach(Rw)}function xd(i,o){i.blockedOn===o&&(i.blockedOn=null,Qg||(Qg=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,dz)))}var Sd=null;function Cw(i){Sd!==i&&(Sd=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Sd===i&&(Sd=null);for(var o=0;o<i.length;o+=3){var u=i[o],d=i[o+1],y=i[o+2];if(typeof d!="function"){if(Xg(d||u)===null)continue;break}var S=Vi(u);S!==null&&(i.splice(o,3),o-=3,Ym(S,{pending:!0,data:y,method:u.method,action:d},d,y))}}))}function Ka(i){function o(X){return xd(X,i)}Xs!==null&&xd(Xs,i),Qs!==null&&xd(Qs,i),Js!==null&&xd(Js,i),Au.forEach(o),Nu.forEach(o);for(var u=0;u<eo.length;u++){var d=eo[u];d.blockedOn===i&&(d.blockedOn=null)}for(;0<eo.length&&(u=eo[0],u.blockedOn===null);)_w(u),u.blockedOn===null&&eo.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(d=0;d<u.length;d+=3){var y=u[d],S=u[d+1],M=y[Kn]||null;if(typeof S=="function")M||Cw(u);else if(M){var K=null;if(S&&S.hasAttribute("formAction")){if(y=S,M=S[Kn]||null)K=M.formAction;else if(Xg(y)!==null)continue}else K=M.action;typeof K=="function"?u[d+1]=K:(u.splice(d,3),d-=3),Cw(u)}}}function Aw(){function i(S){S.canIntercept&&S.info==="react-transition"&&S.intercept({handler:function(){return new Promise(function(M){return y=M})},focusReset:"manual",scroll:"manual"})}function o(){y!==null&&(y(),y=null),d||setTimeout(u,20)}function u(){if(!d&&!navigation.transition){var S=navigation.currentEntry;S&&S.url!=null&&navigation.navigate(S.url,{state:S.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,y=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(u,100),function(){d=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),y!==null&&(y(),y=null)}}}function Jg(i){this._internalRoot=i}wd.prototype.render=Jg.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(r(409));var u=o.current,d=Zr();kw(u,d,i,o,null,null)},wd.prototype.unmount=Jg.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;kw(i.current,2,null,i,null,null),rd(),o[vi]=null}};function wd(i){this._internalRoot=i}wd.prototype.unstable_scheduleHydration=function(i){if(i){var o=Qt();i={blockedOn:null,target:i,priority:o};for(var u=0;u<eo.length&&o!==0&&o<eo[u].priority;u++);eo.splice(u,0,i),u===0&&_w(i)}};var Nw=t.version;if(Nw!=="19.2.6")throw Error(r(527,Nw,"19.2.6"));U.findDOMNode=function(i){var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=f(o),i=i!==null?h(i):null,i=i===null?null:i.stateNode,i};var pz={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ed=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ed.isDisabled&&Ed.supportsFiber)try{st=Ed.inject(pz),ot=Ed}catch{}}return Iu.createRoot=function(i,o){if(!s(i))throw Error(r(299));var u=!1,d="",y=L0,S=P0,M=$0;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(d=o.identifierPrefix),o.onUncaughtError!==void 0&&(y=o.onUncaughtError),o.onCaughtError!==void 0&&(S=o.onCaughtError),o.onRecoverableError!==void 0&&(M=o.onRecoverableError)),o=yw(i,1,!1,null,null,u,d,null,y,S,M,Aw),i[vi]=o.current,Dg(i),new Jg(o)},Iu.hydrateRoot=function(i,o,u){if(!s(i))throw Error(r(299));var d=!1,y="",S=L0,M=P0,K=$0,X=null;return u!=null&&(u.unstable_strictMode===!0&&(d=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onUncaughtError!==void 0&&(S=u.onUncaughtError),u.onCaughtError!==void 0&&(M=u.onCaughtError),u.onRecoverableError!==void 0&&(K=u.onRecoverableError),u.formState!==void 0&&(X=u.formState)),o=yw(i,1,!0,o,u??null,d,y,X,S,M,K,Aw),o.context=vw(null),u=o.current,d=Zr(),d=We(d),y=$s(d),y.callback=null,Bs(u,y,d),u=d,o.current.lanes=u,At(o,u),Ii(o),i[vi]=o.current,Dg(i),new wd(o)},Iu.version="19.2.6",Iu}var Bw;function wz(){if(Bw)return nb.exports;Bw=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),nb.exports=Sz(),nb.exports}var Ez=wz(),Du={},Fw;function Tz(){if(Fw)return Du;Fw=1,Object.defineProperty(Du,"__esModule",{value:!0}),Du.styleq=void 0;var e=new WeakMap,t="$$css";function n(s){var a,l,c;return s!=null&&(a=s.disableCache===!0,l=s.disableMix===!0,c=s.transform),function(){for(var f=[],h="",m=null,g="",b=a?null:e,x=new Array(arguments.length),w=0;w<arguments.length;w++)x[w]=arguments[w];for(;x.length>0;){var _=x.pop();if(!(_==null||_===!1)){if(Array.isArray(_)){for(var E=0;E<_.length;E++)x.push(_[E]);continue}var R=c!=null?c(_):_;if(R.$$css!=null){var T="";if(b!=null&&b.has(R)){var C=b.get(R);C!=null&&(T=C[0],g=C[2],f.push.apply(f,C[1]),b=C[3])}else{var A=[];for(var N in R){var I=R[N];if(N===t){var F=R[N];F!==!0&&(g=g?F+"; "+g:F);continue}typeof I=="string"||I===null?f.includes(N)||(f.push(N),b!=null&&A.push(N),typeof I=="string"&&(T+=T?" "+I:I)):console.error("styleq: ".concat(N," typeof ").concat(String(I),' is not "string" or "null".'))}if(b!=null){var V=new WeakMap;b.set(R,[T,A,g,V]),b=V}}T&&(h=h?T+" "+h:T)}else if(l)m==null&&(m={}),m=Object.assign({},R,m);else{var j=null;for(var q in R){var Z=R[q];Z!==void 0&&(f.includes(q)||(Z!=null&&(m==null&&(m={}),j==null&&(j={}),j[q]=Z),f.push(q),b=null))}j!=null&&(m=Object.assign(j,m))}}}var B=[h,m,g];return B}}var r=Du.styleq=n();return r.factory=n,Du}var _z=Tz();function dn(...e){const[t,n,r]=_z.styleq(e),s={};return t!=null&&t!==""&&(s.className=t),n!=null&&Object.keys(n).length>0&&(s.style=n),r!=null&&r!==""&&(s["data-style-src"]=r),s}function Y_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Y_(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Rz(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Y_(e))&&(r&&(r+=" "),r+=t);return r}function _n(...e){return Rz(e)}function Rn({rootClass:e,stylexStyles:t,className:n,style:r}){const s=dn(t);return{className:_n(e,s.className,n),style:{...s.style,...r}}}const Ei={base:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",khDVqt:"ui-uxw1ft",kMv6JI:"ui-1acoasx",kIxVMA:"ui-1rlb8dw",ksF3WI:"ui-tg4lcy",kYm2EN:"ui-10zfh2d",kqGeR4:"ui-ipogy4",kGuDYH:"ui-1wm8ruf",kLWn49:"ui-spwq11",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0},sizeSm:{kLKAdn:"ui-exx8yu",kpe85a:"ui-1jg1sa",kGO01o:"ui-18d9i69",kE3dHu:"ui-1rplcre",$$css:!0},sizeBase:{kLKAdn:"ui-493x5y",kpe85a:"ui-g31tg3",kGO01o:"ui-b6dno7",kE3dHu:"ui-43mhey",$$css:!0},pill:{kIxVMA:"ui-c8ce4q",ksF3WI:"ui-j5toj7",kYm2EN:"ui-16ti9za",kqGeR4:"ui-11hym3f",$$css:!0},pillSizeSm:{kLKAdn:"ui-493x5y",kpe85a:"ui-1yxiud8",kGO01o:"ui-b6dno7",kE3dHu:"ui-yab65l",$$css:!0},pillSizeBase:{kLKAdn:"ui-5pb957",kpe85a:"ui-17v7654",kGO01o:"ui-1mmyrcj",kE3dHu:"ui-1lfpczk",$$css:!0},variantAccent:{kMwMTN:"ui-kbann2",kWkggS:"ui-gsjhps",$$css:!0},variantNeutral:{kMwMTN:"ui-19aaqeu",kWkggS:"ui-i07v4r",$$css:!0},variantSuccess:{kMwMTN:"ui-1w5rjie",kWkggS:"ui-1buh4up",$$css:!0},variantWarn:{kMwMTN:"ui-1izesbo",kWkggS:"ui-1xvwvse",$$css:!0},variantDanger:{kMwMTN:"ui-1jh5svw",kWkggS:"ui-1xnwcy6",$$css:!0}};function Cz({pill:e,size:t,variant:n}){return[Ei.base,t==="sm"?Ei.sizeSm:Ei.sizeBase,e?[Ei.pill,t==="sm"?Ei.pillSizeSm:Ei.pillSizeBase]:null,Az(n)]}function Az(e){switch(e){case"accent":return Ei.variantAccent;case"neutral":return Ei.variantNeutral;case"success":return Ei.variantSuccess;case"warn":return Ei.variantWarn;case"danger":return Ei.variantDanger}}function sa({children:e,variant:t="neutral",size:n="base",pill:r=!1,as:s="span",className:a,style:l,...c}){const p=Rn({rootClass:"ui-status-badge",stylexStyles:Cz({pill:r,size:n,variant:t}),className:a,style:l});return v.jsx(s,{className:p.className,style:p.style,"data-variant":t,"data-size":n,"data-pill":r||void 0,...c,children:e})}function Nz(e,t){return function(r,...s){const a=new URL(e);return a.searchParams.set("code",r.toString()),s.forEach(l=>a.searchParams.append("args[]",l)),`${t} error #${r}; visit ${a} for the full message.`}}const Jn=Nz("https://base-ui.com/production-error","Base UI"),Uw={};function wr(e,t){const n=k.useRef(Uw);return n.current===Uw&&(n.current=e(t)),n}function xs(e,t,n,r){const s=wr(X_).current;return Mz(s,e,t,n,r)&&Q_(s,[e,t,n,r]),s.callback}function Oz(e){const t=wr(X_).current;return Iz(t,e)&&Q_(t,e),t.callback}function X_(){return{callback:null,cleanup:null,refs:[]}}function Mz(e,t,n,r,s){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==s}function Iz(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function Q_(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let s=0;s<t.length;s+=1){const a=t[s];if(a!=null)switch(typeof a){case"function":{const l=a(n);typeof l=="function"&&(r[s]=l);break}case"object":{a.current=n;break}}}e.cleanup=()=>{for(let s=0;s<t.length;s+=1){const a=t[s];if(a!=null)switch(typeof a){case"function":{const l=r[s];typeof l=="function"?l():a(null);break}case"object":{a.current=null;break}}}}}}}const Dz=parseInt(k.version,10);function kv(e){return Dz>=e}function qw(e){if(!k.isValidElement(e))return null;const t=e,n=t.props;return(kv(19)?n?.ref:t.ref)??null}function my(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function zz(e,t){const n={};for(const r in e){const s=e[r];if(t?.hasOwnProperty(r)){const a=t[r](s);a!=null&&Object.assign(n,a);continue}s===!0?n[`data-${r.toLowerCase()}`]="":s&&(n[`data-${r.toLowerCase()}`]=s.toString())}return n}function jz(e,t){return typeof e=="function"?e(t):e}function Lz(e,t){return typeof e=="function"?e(t):e}const xv={};function jc(e,t,n,r,s){if(!n&&!r&&!s&&!e)return Tp(t);let a=Tp(e);return t&&(a=Ku(a,t)),n&&(a=Ku(a,n)),r&&(a=Ku(a,r)),s&&(a=Ku(a,s)),a}function Pz(e){if(e.length===0)return xv;if(e.length===1)return Tp(e[0]);let t=Tp(e[0]);for(let n=1;n<e.length;n+=1)t=Ku(t,e[n]);return t}function Tp(e){return Sv(e)?{...eR(e,xv)}:$z(e)}function Ku(e,t){return Sv(t)?eR(t,e):Bz(e,t)}function $z(e){const t={...e};for(const n in t){const r=t[n];J_(n,r)&&(t[n]=tR(r))}return t}function Bz(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=my(e.style,r);break}case"className":{e[n]=nR(e.className,r);break}default:J_(n,r)?e[n]=Fz(e[n],r):e[n]=r}}return e}function J_(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),s=e.charCodeAt(2);return n===111&&r===110&&s>=65&&s<=90&&(typeof t=="function"||typeof t>"u")}function Sv(e){return typeof e=="function"}function eR(e,t){return Sv(e)?e(t):e??xv}function Fz(e,t){return t?e?n=>{if(rR(n)){const s=n;_p(s);const a=t(s);return s.baseUIHandlerPrevented||e?.(s),a}const r=t(n);return e?.(n),r}:tR(t):e}function tR(e){return e&&(t=>(rR(t)&&_p(t),e(t)))}function _p(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function nR(e,t){return t?e?t+" "+e:t:e}function rR(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function ar(){}const cc=Object.freeze([]),hr=Object.freeze({}),Uz={style:{transition:"none"}},qz="data-base-ui-click-trigger",Hz={fallbackAxisSide:"none"},Gz={fallbackAxisSide:"end"},Vz={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function wn(e,t,n={}){const r=t.render,s=Kz(t,n);if(n.enabled===!1)return null;const a=n.state??hr;return Yz(e,r,s,a)}function Kz(e,t={}){const{className:n,style:r,render:s}=e,{state:a=hr,ref:l,props:c,stateAttributesMapping:p,enabled:f=!0}=t,h=f?jz(n,a):void 0,m=f?Lz(r,a):void 0,g=f?zz(a,p):hr,b=f&&c?Zz(c):void 0,x=f?my(g,b)??{}:hr;return typeof document<"u"&&(f?Array.isArray(l)?x.ref=Oz([x.ref,qw(s),...l]):x.ref=xs(x.ref,qw(s),l):xs(null,null)),f?(h!==void 0&&(x.className=nR(x.className,h)),m!==void 0&&(x.style=my(x.style,m)),x):hr}function Zz(e){return Array.isArray(e)?Pz(e):jc(void 0,e)}const Wz=Symbol.for("react.lazy");function Yz(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const s=jc(n,t.props);s.ref=n.ref;let a=t;return a?.$$typeof===Wz&&(a=k.Children.toArray(t)[0]),k.cloneElement(a,s)}if(e&&typeof e=="string")return Xz(e,n);throw new Error(Jn(8))}function Xz(e,t){return e==="button"?k.createElement("button",{type:"button",...t,key:t.key}):e==="img"?k.createElement("img",{alt:"",...t,key:t.key}):k.createElement(e,t)}let Xo=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Qz={[Xo.startingStyle]:""},Jz={[Xo.endingStyle]:""},oa={transitionStatus(e){return e==="starting"?Qz:e==="ending"?Jz:null}};let wv=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Xo.startingStyle]="startingStyle",e[e.endingStyle=Xo.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),Rp=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const e2={[Rp.popupOpen]:""},t2={[Rp.popupOpen]:"",[Rp.pressed]:""},n2={[wv.open]:""},r2={[wv.closed]:""},i2={[wv.anchorHidden]:""},s2={open(e){return e?e2:null}},o2={open(e){return e?t2:null}},fh={open(e){return e?n2:r2},anchorHidden(e){return e?i2:null}};function dh(){return typeof window<"u"}function Qn(e){return ph(e)?(e.nodeName||"").toLowerCase():"#document"}function Sn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qi(e){var t;return(t=(ph(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ph(e){return dh()?e instanceof Node||e instanceof Sn(e).Node:!1}function yt(e){return dh()?e instanceof Element||e instanceof Sn(e).Element:!1}function jt(e){return dh()?e instanceof HTMLElement||e instanceof Sn(e).HTMLElement:!1}function fo(e){return!dh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Sn(e).ShadowRoot}function mo(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Er(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function a2(e){return/^(table|td|th)$/.test(Qn(e))}function hh(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const l2=/transform|translate|scale|rotate|perspective|filter/,u2=/paint|layout|strict|content/,Fo=e=>!!e&&e!=="none";let ob;function Ev(e){const t=yt(e)?Er(e):e;return Fo(t.transform)||Fo(t.translate)||Fo(t.scale)||Fo(t.rotate)||Fo(t.perspective)||!Lc()&&(Fo(t.backdropFilter)||Fo(t.filter))||l2.test(t.willChange||"")||u2.test(t.contain||"")}function c2(e){let t=Ui(e);for(;jt(t)&&!mi(t);){if(Ev(t))return t;if(hh(t))return null;t=Ui(t)}return null}function Lc(){return ob==null&&(ob=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ob}function mi(e){return/^(html|body|#document)$/.test(Qn(e))}function Er(e){return Sn(e).getComputedStyle(e)}function mh(e){return yt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ui(e){if(Qn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fo(e)&&e.host||qi(e);return fo(t)?t.host:t}function iR(e){const t=Ui(e);return mi(t)?e.ownerDocument?e.ownerDocument.body:e.body:jt(t)&&mo(t)?t:iR(t)}function ao(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=iR(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),l=Sn(s);if(a){const c=gy(l);return t.concat(l,l.visualViewport||[],mo(s)?s:[],c&&n?ao(c):[])}else return t.concat(s,ao(s,[],n))}function gy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const ab=ch[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],f2=ab&&ab!==k.useLayoutEffect?ab:e=>e();function Ke(e){const t=wr(d2).current;return t.next=e,f2(t.effect),t.trampoline}function d2(){const e={next:void 0,callback:p2,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function p2(){}const h2={...ch},m2=()=>{},He=typeof document<"u"?k.useLayoutEffect:m2,sR=k.createContext(void 0);function oR(e=!1){const t=k.useContext(sR);if(t===void 0&&!e)throw new Error(Jn(16));return t}function g2(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:s=0,isNativeButton:a}=e,l=r&&t!==!1,c=r&&t===!1;return{props:k.useMemo(()=>{const f={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(f.tabIndex=s,!a&&n&&(f.tabIndex=t?s:-1)),(a&&(t||l)||!a&&n)&&(f["aria-disabled"]=n),a&&(!t||c)&&(f.disabled=n),f},[r,n,t,l,c,a,s])}}function Pc(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:s=!0,composite:a}=e,l=k.useRef(null),c=oR(!0),p=a??c!==void 0,{props:f}=g2({focusableWhenDisabled:n,disabled:t,composite:p,tabIndex:r,isNativeButton:s}),h=k.useCallback(()=>{const b=l.current;lb(b)&&p&&t&&f.disabled===void 0&&b.disabled&&(b.disabled=!1)},[t,f.disabled,p]);He(h,[h]);const m=k.useCallback((b={})=>{const{onClick:x,onMouseDown:w,onKeyUp:_,onKeyDown:E,onPointerDown:R,...T}=b;return jc({type:s?"button":void 0,onClick(A){if(t){A.preventDefault();return}x?.(A)},onMouseDown(A){t||w?.(A)},onKeyDown(A){if(t||(_p(A),E?.(A),A.baseUIHandlerPrevented))return;const N=A.target===A.currentTarget,I=A.currentTarget,F=lb(I),V=!s&&b2(I),j=N&&(s?F:!V),q=A.key==="Enter",Z=A.key===" ",B=I.getAttribute("role"),z=B?.startsWith("menuitem")||B==="option"||B==="gridcell";if(N&&p&&Z){if(A.defaultPrevented&&z)return;A.preventDefault(),V||s&&F?(I.click(),A.preventBaseUIHandler()):j&&(x?.(A),A.preventBaseUIHandler());return}j&&(!s&&(Z||q)&&A.preventDefault(),!s&&q&&x?.(A))},onKeyUp(A){if(!t){if(_p(A),_?.(A),A.target===A.currentTarget&&s&&p&&lb(A.currentTarget)&&A.key===" "){A.preventDefault();return}A.baseUIHandlerPrevented||A.target===A.currentTarget&&!s&&!p&&A.key===" "&&x?.(A)}},onPointerDown(A){if(t){A.preventDefault();return}R?.(A)}},s?void 0:{role:"button"},f,T)},[t,f,p,s]),g=Ke(b=>{l.current=b,h()});return{getButtonProps:m,buttonRef:g}}function lb(e){return jt(e)&&e.tagName==="BUTTON"}function b2(e){return!!(e?.tagName==="A"&&e?.href)}const Ss="none",yl="trigger-press",ci="trigger-hover",hp="trigger-focus",Tv="outside-press",ub="item-press",gh="focus-out",_v="escape-key",cb="list-navigation",y2="cancel-open",v2="disabled",by="imperative-action",k2="window-resize";function Rt(e,t,n,r){let s=!1,a=!1;const l=r??hr;return{reason:e,event:t??new Event("base-ui"),cancel(){s=!0},allowPropagation(){a=!0},get isCanceled(){return s},get isPropagationAllowed(){return a},trigger:n,...l}}let Hw=0;function x2(e,t="mui"){const[n,r]=k.useState(e),s=e||n;return k.useEffect(()=>{n==null&&(Hw+=1,r(`${t}-${Hw}`))},[n,t]),s}const Gw=h2.useId;function bh(e,t){if(Gw!==void 0){const n=Gw();return e??(t?`${t}-${n}`:n)}return x2(e,t)}function yh(e){return bh(e,"base-ui")}const S2=[];function vh(e){k.useEffect(e,S2)}const zu=0;class _i{static create(){return new _i}currentId=zu;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=zu,n()},t)}isStarted(){return this.currentId!==zu}clear=()=>{this.currentId!==zu&&(clearTimeout(this.currentId),this.currentId=zu)};disposeEffect=()=>this.clear}function di(){const e=wr(_i.create).current;return vh(e.disposeEffect),e}const Ml=typeof navigator<"u",fb=E2(),aR=_2(),lR=T2(),Rv=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),uR=fb.platform==="MacIntel"&&fb.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(fb.platform),cR=Ml&&/apple/i.test(navigator.vendor),yy=Ml&&/android/i.test(aR)||/android/i.test(lR),w2=Ml&&aR.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,fR=lR.includes("jsdom/");function E2(){if(!Ml)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function T2(){if(!Ml)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function _2(){if(!Ml)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}function Yr(e){e.preventDefault(),e.stopPropagation()}function R2(e){return"nativeEvent"in e}function dR(e){return e.pointerType===""&&e.isTrusted?!0:yy&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function pR(e){return fR?!1:!yy&&e.width===0&&e.height===0||yy&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function vl(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function hR(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function C2(e,t){return t!=null&&!vl(t)?0:typeof e=="function"?e():e}function Cp(e,t,n){const r=C2(e,n);return typeof r=="number"?r:r?.[t]}function Vw(e){return typeof e=="function"?e():e}function mR(e,t){return t||e==="click"||e==="mousedown"}const A2=k.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new _i,currentIdRef:{current:null},currentContextRef:{current:null}});function N2(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{open:s}=t,a=k.useContext(A2),{currentIdRef:l,delayRef:c,timeoutMs:p,initialDelayRef:f,currentContextRef:h,hasProvider:m,timeout:g}=a,[b,x]=k.useState(!1);return He(()=>{function w(){x(!1),h.current?.setIsInstantPhase(!1),l.current=null,h.current=null,c.current=f.current}if(l.current&&!s&&l.current===r){if(x(!1),p){const _=r;return g.start(p,()=>{n.select("open")||l.current&&l.current!==_||w()}),()=>{g.clear()}}w()}},[s,r,l,c,p,f,h,g,n]),He(()=>{if(!s)return;const w=h.current,_=l.current;g.clear(),h.current={onOpenChange:n.setOpen,setIsInstantPhase:x},l.current=r,c.current={open:0,close:Cp(f.current,"close")},_!==null&&_!==r?(x(!0),w?.setIsInstantPhase(!0),w?.onOpenChange(!1,Rt(Ss))):(x(!1),w?.setIsInstantPhase(!1))},[s,r,n,l,c,p,f,h,g]),He(()=>()=>{h.current=null},[h]),k.useMemo(()=>({hasProvider:m,delayRef:c,isInstantPhase:b}),[m,c,b])}function It(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Pi(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function Gn(e){const t=wr(O2,e).current;return t.next=e,He(t.effect),t}function O2(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const Td=null;class M2{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let s=0;s<n.length;s+=1)n[s]?.(t)};request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const _d=new M2;class On{static create(){return new On}static request(t){return _d.request(t)}static cancel(t){return _d.cancel(t)}currentId=Td;request(t){this.cancel(),this.currentId=_d.request(()=>{this.currentId=Td,t()})}cancel=()=>{this.currentId!==Td&&(_d.cancel(this.currentId),this.currentId=Td)};disposeEffect=()=>this.cancel}function $c(){const e=wr(On.create).current;return vh(e.disposeEffect),e}function qt(e){return e?.ownerDocument||document}const gR={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},bR={...gR,position:"fixed",top:0,left:0},I2={...gR,position:"absolute"},Ap=k.forwardRef(function(t,n){const[r,s]=k.useState();He(()=>{cR&&s("button")},[]);const a={tabIndex:0,role:r};return v.jsx("span",{...t,ref:n,style:bR,"aria-hidden":r?void 0:!0,...a,"data-base-ui-focus-guard":""})}),vy="data-base-ui-focusable",yR="active",vR="selected",kR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",lo="ArrowLeft",uo="ArrowRight",Cv="ArrowUp",Bc="ArrowDown";function Dr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function kt(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&fo(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function gr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Np(e,t){if(!yt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(kt(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function wi(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function D2(e){return e.matches("html,body")}function kh(e){return jt(e)&&e.matches(kR)}function z2(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${kR}`)!=null}function ky(e){return e?e.getAttribute("role")==="combobox"&&kh(e):!1}function j2(e){if(!e||fR)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Op(e){return e?e.hasAttribute(vy)?e:e.querySelector(`[${vy}]`)||e:null}const L2=["top","right","bottom","left"],kl=Math.min,Xr=Math.max,xl=Math.round,vs=Math.floor,$i=e=>({x:e,y:e}),P2={left:"right",right:"left",bottom:"top",top:"bottom"};function xy(e,t,n){return Xr(e,kl(t,n))}function ws(e,t){return typeof e=="function"?e(t):e}function Pr(e){return e.split("-")[0]}function go(e){return e.split("-")[1]}function Av(e){return e==="x"?"y":"x"}function Nv(e){return e==="y"?"height":"width"}function pi(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ov(e){return Av(pi(e))}function $2(e,t,n){n===void 0&&(n=!1);const r=go(e),s=Ov(e),a=Nv(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=Mp(l)),[l,Mp(l)]}function B2(e){const t=Mp(e);return[Sy(e),t,Sy(t)]}function Sy(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Kw=["left","right"],Zw=["right","left"],F2=["top","bottom"],U2=["bottom","top"];function q2(e,t,n){switch(e){case"top":case"bottom":return n?t?Zw:Kw:t?Kw:Zw;case"left":case"right":return t?F2:U2;default:return[]}}function H2(e,t,n,r){const s=go(e);let a=q2(Pr(e),n==="start",r);return s&&(a=a.map(l=>l+"-"+s),t&&(a=a.concat(a.map(Sy)))),a}function Mp(e){const t=Pr(e);return P2[t]+e.slice(t.length)}function G2(e){return{top:0,right:0,bottom:0,left:0,...e}}function xR(e){return typeof e!="number"?G2(e):{top:e,right:e,bottom:e,left:e}}function fc(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function Rd(e,t,n){return Math.floor(e/t)!==n}function dc(e,t){return t<0||t>=e.length}function mp(e,t){return dr(e.current,{disabledIndices:t})}function wy(e,t){return dr(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function dr(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:s=1}={}){let a=t;do a+=n?-s:s;while(a>=0&&a<=e.length-1&&ks(e,a,r));return a}function SR(e,{event:t,orientation:n,loopFocus:r,onLoop:s,rtl:a,cols:l,disabledIndices:c,minIndex:p,maxIndex:f,prevIndex:h,stopEvent:m=!1}){let g=h,b;if(t.key===Cv?b="up":t.key===Bc&&(b="down"),b){const x=[],w=[];let _=!1,E=0;{let V=null,j=-1;e.forEach((q,Z)=>{if(q==null)return;E+=1;const B=q.closest('[role="row"]');B&&(_=!0),(B!==V||j===-1)&&(V=B,j+=1,x[j]=[]),x[j].push(Z),w[Z]=j})}let R=!1,T=0;if(_)for(const V of x){const j=V.length;j>T&&(T=j),j!==l&&(R=!0)}const C=R&&E<e.length,A=T||l,N=V=>{if(!R||h===-1)return;const j=w[h];if(j==null)return;const q=x[j].indexOf(h),Z=V==="up"?-1:1;for(let B=j+Z,z=0;z<x.length;z+=1,B+=Z){if(B<0||B>=x.length){if(!r||C)return;if(B=B<0?x.length-1:0,s){const H=Math.min(q,x[B].length-1),U=x[B][H]??x[B][0],P=s(t,h,U);B=w[P]??B}}const L=x[B];for(let H=Math.min(q,L.length-1);H>=0;H-=1){const U=L[H];if(!ks(e,U,c))return U}}},I=V=>{if(!C||h===-1)return;const j=h%A,q=V==="up"?-A:A,Z=f-f%A,B=vs(f/A)+1;for(let z=h-j+q,L=0;L<B;L+=1,z+=q){if(z<0||z>f){if(!r)return;z=z<0?Z:0}const H=Math.min(z+A-1,f);for(let U=Math.min(z+j,H);U>=z;U-=1)if(!ks(e,U,c))return U}};m&&Yr(t);const F=N(b)??I(b);if(F!==void 0)g=F;else if(h===-1)g=b==="up"?f:p;else if(g=dr(e,{startingIndex:h,amount:A,decrement:b==="up",disabledIndices:c}),r){if(b==="up"&&(h-A<p||g<0)){const V=h%A,j=f%A,q=f-(j-V);j===V?g=f:g=j>V?q:q-A,s&&(g=s(t,h,g))}b==="down"&&h+A>f&&(g=dr(e,{startingIndex:h%A-A,amount:A,disabledIndices:c}),s&&(g=s(t,h,g)))}dc(e,g)&&(g=h)}if(n==="both"){const x=vs(h/l);t.key===(a?lo:uo)&&(m&&Yr(t),h%l!==l-1?(g=dr(e,{startingIndex:h,disabledIndices:c}),r&&Rd(g,l,x)&&(g=dr(e,{startingIndex:h-h%l-1,disabledIndices:c}),s&&(g=s(t,h,g)))):r&&(g=dr(e,{startingIndex:h-h%l-1,disabledIndices:c}),s&&(g=s(t,h,g))),Rd(g,l,x)&&(g=h)),t.key===(a?uo:lo)&&(m&&Yr(t),h%l!==0?(g=dr(e,{startingIndex:h,decrement:!0,disabledIndices:c}),r&&Rd(g,l,x)&&(g=dr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c}),s&&(g=s(t,h,g)))):r&&(g=dr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c}),s&&(g=s(t,h,g))),Rd(g,l,x)&&(g=h));const w=vs(f/l)===x;dc(e,g)&&(r&&w?(g=t.key===(a?uo:lo)?f:dr(e,{startingIndex:h-h%l-1,disabledIndices:c}),s&&(g=s(t,h,g))):g=h)}return g}function wR(e,t,n){const r=[];let s=0;return e.forEach(({width:a,height:l},c)=>{let p=!1;for(n&&(s=0);!p;){const f=[];for(let h=0;h<a;h+=1)for(let m=0;m<l;m+=1)f.push(s+h+m*t);s%t+a<=t&&f.every(h=>r[h]==null)?(f.forEach(h=>{r[h]=c}),p=!0):s+=1}}),[...r]}function ER(e,t,n,r,s){if(e===-1)return-1;const a=n.indexOf(e),l=t[e];switch(s){case"tl":return a;case"tr":return l?a+l.width-1:a;case"bl":return l?a+(l.height-1)*r:a;case"br":return n.lastIndexOf(e);default:return-1}}function TR(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ks(e,t,n){if(typeof n=="function"?n(t):n?.includes(t)??!1)return!0;const s=e[t];return s?xh(s)?!n&&(s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true"):!0:!1}function xh(e){return typeof e.checkVisibility=="function"?e.checkVisibility():Er(e).display!=="none"}const V2='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function K2(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return fo(n)?n.host:null}function Ey(e){for(const t of Array.from(e.children))if(Qn(t)==="summary")return t;return null}function Z2(e,t){const n=Ey(t);return!!n&&(e===n||kt(n,e))}function _R(e){const t=e?Qn(e):"";return e!=null&&e.matches(V2)&&(t!=="summary"||e.parentElement!=null&&Qn(e.parentElement)==="details"&&Ey(e.parentElement)===e)&&(t!=="details"||Ey(e)==null)&&(t!=="input"||e.type!=="hidden")}function RR(e){if(!_R(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=K2(t)){const n=Qn(t)==="slot";if(t.hasAttribute("inert")||t!==e&&Qn(t)==="details"&&!t.open&&!Z2(e,t)||t.hasAttribute("hidden")||!n&&!xh(t))return!1}return!0}function CR(e){const t=e.tabIndex;if(t<0){const n=Qn(e);if(n==="details"||n==="audio"||n==="video"||jt(e)&&e.isContentEditable)return 0}return t}function db(e){if(Qn(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function W2(e,t){const n=db(e);if(!n)return!0;const r=t.find(s=>{const a=db(s);return a?.name===n.name&&a.form===n.form&&a.checked});return r?r===n:t.find(s=>{const a=db(s);return a?.name===n.name&&a.form===n.form})===n}function AR(e){if(jt(e)&&Qn(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return jt(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function NR(e,t){AR(e).forEach(n=>{_R(n)&&t.push(n),NR(n,t)})}function OR(e,t,n){AR(e).forEach(r=>{jt(r)&&r.matches(t)&&n.push(r),OR(r,t,n)})}function Mv(e){return RR(e)&&CR(e)>=0}function MR(e){const t=[];return NR(e,t),t.filter(RR)}function Sh(e){const t=MR(e);return t.filter(n=>CR(n)>=0&&W2(n,t))}function IR(e,t){const n=Sh(e),r=n.length;if(r===0)return;const s=Dr(qt(e)),a=n.indexOf(s),l=a===-1?t===1?0:r-1:a+t;return n[l]}function DR(e){return IR(qt(e).body,1)||e}function zR(e){return IR(qt(e).body,-1)||e}function Qu(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!kt(n,r)}function Y2(e){Sh(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Ww(e){const t=[];OR(e,"[data-tabindex]",t),t.forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Bi(e,t,n=!0){return e.filter(s=>s.parentId===t).flatMap(s=>[...!n||s.context?.open?[s]:[],...Bi(e,s.id,n)])}function Yw(e,t){let n=[],r=e.find(s=>s.id===t)?.parentId;for(;r;){const s=e.find(a=>a.id===r);r=s?.parentId,s&&(n=n.concat(s))}return n}function pc(e){return`data-base-ui-${e}`}let Cd=0;function gp(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=t;r&&cancelAnimationFrame(Cd);const a=()=>e?.focus({preventScroll:n});if(s)return a(),ar;const l=requestAnimationFrame(a);return Cd=l,()=>{Cd===l&&(cancelAnimationFrame(l),Cd=0)}}const pb={inert:new WeakMap,"aria-hidden":new WeakMap},Xw="data-base-ui-inert",Ty={inert:new WeakSet,"aria-hidden":new WeakSet};let ju=new WeakMap,hb=0;function X2(e){return Ty[e]}function jR(e){return e?fo(e)?e.host:jR(e.parentNode):null}const mb=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=jR(n);return e.contains(r)?r:null}).filter(n=>n!=null),Qw=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},Jw=(e,t,n)=>{const r=[],s=a=>{!a||n.has(a)||Array.from(a.children).forEach(l=>{Qn(l)!=="script"&&(t.has(l)?s(l):r.push(l))})};return s(e),r};function Q2(e,t,n,r,{mark:s=!0,markerIgnoreElements:a=[]}){const l=r?"inert":n?"aria-hidden":null;let c=null,p=null;const f=mb(t,e),h=s?mb(t,a):[],m=new Set(h),g=s?Jw(t,Qw(f),new Set(f)).filter(w=>!m.has(w)):[],b=[],x=[];if(l){const w=pb[l],_=X2(l);p=_,c=w;const E=mb(t,Array.from(t.querySelectorAll("[aria-live]"))),R=f.concat(E);Jw(t,Qw(R),new Set(R)).forEach(C=>{const A=C.getAttribute(l),N=A!==null&&A!=="false",I=(w.get(C)||0)+1;w.set(C,I),b.push(C),I===1&&N&&_.add(C),N||C.setAttribute(l,l==="inert"?"":"true")})}return s&&g.forEach(w=>{const _=(ju.get(w)||0)+1;ju.set(w,_),x.push(w),_===1&&w.setAttribute(Xw,"")}),hb+=1,()=>{c&&b.forEach(w=>{const E=(c.get(w)||0)-1;c.set(w,E),E||(!p?.has(w)&&l&&w.removeAttribute(l),p?.delete(w))}),s&&x.forEach(w=>{const _=(ju.get(w)||0)-1;ju.set(w,_),_||w.removeAttribute(Xw)}),hb-=1,hb||(pb.inert=new WeakMap,pb["aria-hidden"]=new WeakMap,Ty.inert=new WeakSet,Ty["aria-hidden"]=new WeakSet,ju=new WeakMap)}}function e1(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:s=!0,markerIgnoreElements:a=[]}=t,l=qt(e[0]).body;return Q2(e,l,n,r,{mark:s,markerIgnoreElements:a})}var Ci=W_();const LR=k.createContext(null),PR=()=>k.useContext(LR),J2=pc("portal");function $R(e={}){const{ref:t,container:n,componentProps:r=hr,elementProps:s}=e,a=bh(),c=PR()?.portalNode,[p,f]=k.useState(null),[h,m]=k.useState(null),g=Ke(_=>{_!==null&&m(_)}),b=k.useRef(null);He(()=>{if(n===null){b.current&&(b.current=null,m(null),f(null));return}if(a==null)return;const _=(n&&(ph(n)?n:n.current))??c??document.body;if(_==null){b.current&&(b.current=null,m(null),f(null));return}b.current!==_&&(b.current=_,m(null),f(_))},[n,c,a]);const x=wn("div",r,{ref:[t,g],props:[{id:a,[J2]:""},s]});return{portalNode:h,portalSubtree:p&&x?Ci.createPortal(x,p):null}}const ej=k.forwardRef(function(t,n){const{children:r,container:s,className:a,render:l,renderGuards:c,style:p,...f}=t,{portalNode:h,portalSubtree:m}=$R({container:s,ref:n,componentProps:t,elementProps:f}),g=k.useRef(null),b=k.useRef(null),x=k.useRef(null),w=k.useRef(null),[_,E]=k.useState(null),R=k.useRef(!1),T=_?.modal,C=_?.open,A=typeof c=="boolean"?c:!!_&&!_.modal&&_.open&&!!h;k.useEffect(()=>{if(!h||T)return;function I(F){h&&F.relatedTarget&&Qu(F)&&(F.type==="focusin"?R.current&&(Ww(h),R.current=!1):(Y2(h),R.current=!0))}return Pi(It(h,"focusin",I,!0),It(h,"focusout",I,!0))},[h,T]),k.useEffect(()=>{!h||C!==!1||(Ww(h),R.current=!1)},[C,h]);const N=k.useMemo(()=>({beforeOutsideRef:g,afterOutsideRef:b,beforeInsideRef:x,afterInsideRef:w,portalNode:h,setFocusManagerState:E}),[h]);return v.jsxs(k.Fragment,{children:[m,v.jsxs(LR.Provider,{value:N,children:[A&&h&&v.jsx(Ap,{"data-type":"outside",ref:g,onFocus:I=>{if(Qu(I,h))x.current?.focus();else{const F=_?_.domReference:null;zR(F)?.focus()}}}),A&&h&&v.jsx("span",{"aria-owns":h.id,style:Vz}),h&&Ci.createPortal(r,h),A&&h&&v.jsx(Ap,{"data-type":"outside",ref:b,onFocus:I=>{if(Qu(I,h))w.current?.focus();else{const F=_?_.domReference:null;DR(F)?.focus(),_?.closeOnFocusOut&&_?.onOpenChange(!1,Rt(gh,I.nativeEvent))}}})]})]})});function tj(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}const nj=k.createContext(null),rj=k.createContext(null),wh=()=>k.useContext(nj)?.id||null,Il=e=>{const t=k.useContext(rj);return e??t};function ps(e){return e==null?e:"current"in e?e.current:e}function ij(e,t){const n=Sn(gr(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const t1=20;let so=[];function Iv(){so=so.filter(e=>e.deref()?.isConnected)}function sj(e){Iv(),e&&Qn(e)!=="body"&&(so.push(new WeakRef(e)),so.length>t1&&(so=so.slice(-t1)))}function gb(){return Iv(),so[so.length-1]?.deref()}function oj(e){return e?Mv(e)?e:Sh(e)[0]||e:null}function aj(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():xh(e)}function n1(e,t){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const r=MR(e).filter(a=>{const l=a.getAttribute("data-tabindex")||"";return Mv(a)||a.hasAttribute("data-tabindex")&&!l.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||r.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function lj(e){const{context:t,children:n,disabled:r=!1,initialFocus:s=!0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,closeOnFocusOut:p=!0,openInteractionType:f="",nextFocusableElement:h,previousFocusableElement:m,beforeContentFocusGuardRef:g,externalTree:b,getInsideElements:x}=e,w="rootStore"in t?t.rootStore:t,_=w.useState("open"),E=w.useState("domReferenceElement"),R=w.useState("floatingElement"),{events:T,dataRef:C}=w.context,A=Ke(()=>C.current.floatingContext?.nodeId),N=s===!1,I=ky(E)&&N,F=k.useRef(["content"]),V=Gn(s),j=Gn(a),q=Gn(f),Z=Il(b),B=PR(),z=k.useRef(!1),L=k.useRef(!1),H=k.useRef(!1),U=k.useRef(null),P=k.useRef(""),Y=k.useRef(""),D=k.useRef(null),$=k.useRef(null),G=xs(D,g,B?.beforeInsideRef),O=xs($,B?.afterInsideRef),J=di(),ee=di(),ie=$c(),he=B!=null,le=Op(R),ke=Ke((ue=le)=>ue?Sh(ue):[]),Te=Ke(()=>x?.().filter(ue=>ue!=null)??[]);k.useEffect(()=>{if(r||!c)return;function ue(Ce){Ce.key==="Tab"&&kt(le,Dr(qt(le)))&&ke().length===0&&!I&&Yr(Ce)}const Ee=qt(le);return It(Ee,"keydown",ue)},[r,E,le,c,F,I,ke]),k.useEffect(()=>{if(r||!_)return;const ue=qt(le);function Ee(){H.current=!1}function Ce(ve){const xe=gr(ve),De=Te(),Ne=kt(R,xe)||kt(E,xe)||kt(B?.portalNode,xe)||De.some(Ie=>Ie===xe||kt(Ie,xe));H.current=!Ne,Y.current=ve.pointerType||"keyboard",xe?.closest(`[${qz}]`)&&(L.current=!0)}function Me(){Y.current="keyboard"}return Pi(It(ue,"pointerdown",Ce,!0),It(ue,"pointerup",Ee,!0),It(ue,"pointercancel",Ee,!0),It(ue,"keydown",Me,!0))},[r,R,E,le,_,B,Te]),k.useEffect(()=>{if(r||!p)return;const ue=qt(le);function Ee(){L.current=!0,ee.start(0,()=>{L.current=!1})}function Ce(De){const Ne=gr(De);Mv(Ne)&&(U.current=Ne)}function Me(De){const Ne=De.relatedTarget,Ie=De.currentTarget,ge=gr(De);queueMicrotask(()=>{const fe=A(),se=w.context.triggerElements,ne=Te(),_e=Ne?.hasAttribute(pc("focus-guard"))&&[D.current,$.current,B?.beforeInsideRef.current,B?.afterInsideRef.current,B?.beforeOutsideRef.current,B?.afterOutsideRef.current,ps(m),ps(h)].includes(Ne),te=!(kt(E,Ne)||kt(R,Ne)||kt(Ne,R)||kt(B?.portalNode,Ne)||ne.some(ae=>ae===Ne||kt(ae,Ne))||Ne!=null&&se.hasElement(Ne)||se.hasMatchingElement(ae=>kt(ae,Ne))||_e||Z&&(Bi(Z.nodesRef.current,fe).find(ae=>kt(ae.context?.elements.floating,Ne)||kt(ae.context?.elements.domReference,Ne))||Yw(Z.nodesRef.current,fe).find(ae=>[ae.context?.elements.floating,Op(ae.context?.elements.floating)].includes(Ne)||ae.context?.elements.domReference===Ne)));if(Ie===E&&le&&n1(le,F),l&&Ie!==E&&!aj(ge)&&Dr(ue)===ue.body){if(jt(le)&&(le.focus(),l==="popup")){ie.request(()=>{le.focus()});return}const ae=ke(),ze=U.current,Ue=(ze&&ae.includes(ze)?ze:null)||ae[ae.length-1]||le;jt(Ue)&&Ue.focus()}if(C.current.insideReactTree){C.current.insideReactTree=!1;return}(I||!c)&&Ne&&te&&!L.current&&(I||Ne!==gb())&&(z.current=!0,w.setOpen(!1,Rt(gh,De)))})}function ve(){H.current||(C.current.insideReactTree=!0,J.start(0,()=>{C.current.insideReactTree=!1}))}const xe=jt(E)?E:null;if(!(!R&&!xe))return Pi(xe&&It(xe,"focusout",Me),xe&&It(xe,"pointerdown",Ee),R&&It(R,"focusin",Ce),R&&It(R,"focusout",Me),R&&B&&It(R,"focusout",ve,!0))},[r,E,R,le,c,Z,B,w,p,l,ke,I,A,F,C,J,ee,ie,h,m,Te]),k.useEffect(()=>{if(r||!R||!_)return;const ue=Array.from(B?.portalNode?.querySelectorAll(`[${pc("portal")}]`)||[]),Ce=(Z?Yw(Z.nodesRef.current,A()):[]).find(Ie=>ky(Ie.context?.elements.domReference||null))?.context?.elements.domReference,ve=[...[R,...ue,D.current,$.current,B?.beforeOutsideRef.current,B?.afterOutsideRef.current,...Te()],Ce,ps(m),ps(h),I?E:null].filter(Ie=>Ie!=null),xe=e1(ve,{ariaHidden:c||I,mark:!1}),De=[R,...ue].filter(Ie=>Ie!=null),Ne=e1(De);return()=>{Ne(),xe()}},[_,r,E,R,c,F,B,I,Z,A,h,m,Te]),He(()=>{if(!_||r||!jt(le))return;const ue=qt(le),Ee=Dr(ue);queueMicrotask(()=>{const Ce=V.current,Me=typeof Ce=="function"?Ce(q.current||""):Ce;if(Me===void 0||Me===!1||kt(le,Ee))return;let xe=null;const De=()=>(xe==null&&(xe=ke(le)),xe[0]||le);let Ne;Me===!0||Me===null?Ne=De():Ne=ps(Me),Ne=Ne||De(),gp(Ne,{preventScroll:Ne===le})})},[r,_,le,N,ke,V,q]),He(()=>{if(r||!le)return;const ue=qt(le),Ee=Dr(ue);sj(Ee);function Ce(ve){if(ve.open||(P.current=ij(ve.nativeEvent,Y.current)),ve.reason===ci&&ve.nativeEvent.type==="mouseleave"&&(z.current=!0),ve.reason===Tv)if(ve.nested)z.current=!1;else if(dR(ve.nativeEvent)||pR(ve.nativeEvent))z.current=!1;else{let xe=!1;qt(le).createElement("div").focus({get preventScroll(){return xe=!0,!1}}),xe?z.current=!1:z.current=!0}}T.on("openchange",Ce);function Me(){const ve=j.current;let xe=typeof ve=="function"?ve(P.current):ve;if(xe===void 0||xe===!1)return null;if(xe===null&&(xe=!0),typeof xe=="boolean"){const Ne=E||gb();return Ne&&Ne.isConnected?Ne:null}const De=E||gb();return ps(xe)||De||null}return()=>{T.off("openchange",Ce);const ve=Dr(ue),xe=Te(),De=kt(R,ve)||xe.some(ge=>ge===ve||kt(ge,ve))||Z&&Bi(Z.nodesRef.current,A(),!1).some(ge=>kt(ge.context?.elements.floating,ve)),Ne=j.current,Ie=Me();queueMicrotask(()=>{const ge=oj(Ie),fe=typeof Ne!="boolean";Ne&&!z.current&&jt(ge)&&(!(!fe&&ge!==ve&&ve!==ue.body)||De)&&ge.focus({preventScroll:!0}),z.current=!1})}},[r,R,le,j,C,T,Z,E,A,Te]),He(()=>{if(!Rv||_||!R)return;const ue=Dr(qt(R));!jt(ue)||!kh(ue)||kt(R,ue)&&ue.blur()},[_,R]),He(()=>{if(!(r||!B))return B.setFocusManagerState({modal:c,closeOnFocusOut:p,open:_,onOpenChange:w.setOpen,domReference:E}),()=>{B.setFocusManagerState(null)}},[r,B,c,_,w,p,E]),He(()=>{if(!(r||!le))return n1(le,F),()=>{queueMicrotask(Iv)}},[r,le,F]);const Pe=!r&&(c?!I:!0)&&(he||c);return v.jsxs(k.Fragment,{children:[Pe&&v.jsx(Ap,{"data-type":"inside",ref:G,onFocus:ue=>{if(c){const Ee=ke();gp(Ee[Ee.length-1])}else B?.portalNode&&(z.current=!1,Qu(ue,B.portalNode)?DR(E)?.focus():ps(m??B.beforeOutsideRef)?.focus())}}),n,Pe&&v.jsx(Ap,{"data-type":"inside",ref:O,onFocus:ue=>{c?gp(ke()[0]):B?.portalNode&&(p&&(z.current=!0),Qu(ue,B.portalNode)?zR(E)?.focus():ps(h??B.afterOutsideRef)?.focus())}})]})}function uj(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,stickIfOpen:p=!0,touchOpenDelay:f=0,reason:h=yl}=t,m=k.useRef(void 0),g=$c(),b=di(),x=k.useMemo(()=>({onPointerDown(w){m.current=w.pointerType},onMouseDown(w){const _=m.current,E=w.nativeEvent,R=n.select("open");if(w.button!==0||a==="click"||vl(_,!0)&&c)return;const T=r.current.openEvent,C=T?.type,A=n.select("domReferenceElement")!==w.currentTarget,N=R&&A||!(R&&l&&(!(T&&p)||C==="click"||C==="mousedown")),I=gr(E);if(kh(I)){const V=Rt(h,E,I);N&&_==="touch"&&f>0?b.start(f,()=>{n.setOpen(!0,V)}):n.setOpen(N,V);return}const F=w.currentTarget;g.request(()=>{const V=Rt(h,E,F);N&&_==="touch"&&f>0?b.start(f,()=>{n.setOpen(!0,V)}):n.setOpen(N,V)})},onClick(w){if(a==="mousedown-only")return;const _=m.current;if(a==="mousedown"&&_){m.current=void 0;return}if(vl(_,!0)&&c)return;const E=n.select("open"),R=r.current.openEvent,T=n.select("domReferenceElement")!==w.currentTarget,C=E&&T||!(E&&l&&(!(R&&p)||hR(R))),A=Rt(h,w.nativeEvent,w.currentTarget);C&&_==="touch"&&f>0?b.start(f,()=>{n.setOpen(!0,A)}):n.setOpen(C,A)},onKeyDown(){m.current=void 0}}),[r,a,c,n,p,l,g,b,f,h]);return k.useMemo(()=>s?{reference:x}:hr,[s,x])}function cj(e,t){let n=null,r=null,s=!1;return{contextElement:e||void 0,getBoundingClientRect(){const a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},l=t.axis==="x"||t.axis==="both",c=t.axis==="y"||t.axis==="both",p=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let f=a.width,h=a.height,m=a.x,g=a.y;return n==null&&t.x&&l&&(n=a.x-t.x),r==null&&t.y&&c&&(r=a.y-t.y),m-=n||0,g-=r||0,f=0,h=0,!s||p?(f=t.axis==="y"?a.width:0,h=t.axis==="x"?a.height:0,m=l&&t.x!=null?t.x:m,g=c&&t.y!=null?t.y:g):s&&!p&&(h=t.axis==="x"?a.height:h,f=t.axis==="y"?a.width:f),s=!0,{width:f,height:h,x:m,y:g,top:g,right:m+f,bottom:g+h,left:m}}}}function r1(e){return e!=null&&e.clientX!=null}function fj(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),s=n.useState("floatingElement"),a=n.useState("domReferenceElement"),l=n.context.dataRef,{enabled:c=!0,axis:p="both"}=t,f=k.useRef(!1),h=k.useRef(null),[m,g]=k.useState(),[b,x]=k.useState([]),w=Ke((C,A,N)=>{f.current||l.current.openEvent&&!r1(l.current.openEvent)||n.set("positionReference",cj(N??a,{x:C,y:A,axis:p,dataRef:l,pointerType:m}))}),_=Ke(C=>{r?h.current||x([]):w(C.clientX,C.clientY,C.currentTarget)}),E=vl(m)?s:r,R=k.useCallback(()=>{if(!E||!c)return;const C=Sn(s);function A(N){const I=gr(N);kt(s,I)?(h.current?.(),h.current=null):w(N.clientX,N.clientY)}if(!l.current.openEvent||r1(l.current.openEvent)){const N=()=>{h.current?.(),h.current=null};return h.current=It(C,"mousemove",A),N}n.set("positionReference",a)},[E,c,s,l,a,n,w]);k.useEffect(()=>R(),[R,b]),k.useEffect(()=>{c&&!s&&(f.current=!1)},[c,s]),k.useEffect(()=>{!c&&r&&(f.current=!0)},[c,r]);const T=k.useMemo(()=>{function C(A){g(A.pointerType)}return{onPointerDown:C,onPointerEnter:C,onMouseMove:_,onMouseEnter:_}},[_]);return k.useMemo(()=>c?{reference:T,trigger:T}:{},[c,T])}const dj={intentional:"onClick",sloppy:"onPointerDown"};function pj(){return!1}function hj(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function BR(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),s=n.useState("floatingElement"),{dataRef:a}=n.context,{enabled:l=!0,escapeKey:c=!0,outsidePress:p=!0,outsidePressEvent:f="sloppy",referencePress:h=pj,referencePressEvent:m="sloppy",bubbles:g,externalTree:b}=t,x=Il(b),w=Ke(typeof p=="function"?p:()=>!1),_=typeof p=="function"?w:p,E=_!==!1,R=Ke(()=>f),T=k.useRef(!1),C=k.useRef(!1),A=k.useRef(!1),{escapeKey:N,outsidePress:I}=hj(g),F=k.useRef(null),V=di(),j=di(),q=Ke(()=>{j.clear(),a.current.insideReactTree=!1}),Z=k.useRef(!1),B=k.useRef(""),z=Ke(h),L=Ke($=>{if(!r||!l||!c||$.key!=="Escape"||Z.current)return;const G=a.current.floatingContext?.nodeId,O=x?Bi(x.nodesRef.current,G):[];if(!N&&O.length>0){let ie=!0;if(O.forEach(he=>{he.context?.open&&!he.context.dataRef.current.__escapeKeyBubbles&&(ie=!1)}),!ie)return}const J=R2($)?$.nativeEvent:$,ee=Rt(_v,J);n.setOpen(!1,ee),!N&&!ee.isPropagationAllowed&&$.stopPropagation()}),H=Ke(()=>{a.current.insideReactTree=!0,j.start(0,q)});k.useEffect(()=>{if(!r||!l)return;a.current.__escapeKeyBubbles=N,a.current.__outsidePressBubbles=I;const $=new _i,G=new _i;function O(){$.clear(),Z.current=!0}function J(){$.start(Lc()?5:0,()=>{Z.current=!1})}function ee(){A.current=!0,G.start(0,()=>{A.current=!1})}function ie(){T.current=!1,C.current=!1}function he(){const se=B.current,ne=se==="pen"||!se?"mouse":se,_e=R(),te=typeof _e=="function"?_e():_e;return typeof te=="string"?te:te[ne]}function le(se){const ne=he();return ne==="intentional"&&se.type!=="click"||ne==="sloppy"&&se.type==="click"}function ke(se){const ne=a.current.floatingContext?.nodeId,_e=x&&Bi(x.nodesRef.current,ne).some(te=>wi(se,te.context?.elements.floating));return wi(se,n.select("floatingElement"))||wi(se,n.select("domReferenceElement"))||_e}function Te(se){if(le(se)){q();return}if(a.current.insideReactTree){q();return}const ne=gr(se),_e=`[${pc("inert")}]`,te=yt(ne)?ne.getRootNode():null,ae=Array.from((fo(te)?te:qt(n.select("floatingElement"))).querySelectorAll(_e)),ze=n.context.triggerElements;if(ne&&(ze.hasElement(ne)||ze.hasMatchingElement(rt=>kt(rt,ne))))return;let Ue=yt(ne)?ne:null;for(;Ue&&!mi(Ue);){const rt=Ui(Ue);if(mi(rt)||!yt(rt))break;Ue=rt}if(ae.length&&yt(ne)&&!D2(ne)&&!kt(ne,n.select("floatingElement"))&&ae.every(rt=>!kt(Ue,rt)))return;if(jt(ne)&&!("touches"in se)){const rt=mi(ne),st=Er(ne),ot=/auto|scroll/,Et=rt||ot.test(st.overflowX),it=rt||ot.test(st.overflowY),vt=Et&&ne.clientWidth>0&&ne.scrollWidth>ne.clientWidth,Xe=it&&ne.clientHeight>0&&ne.scrollHeight>ne.clientHeight,Dt=st.direction==="rtl",Fe=Xe&&(Dt?se.offsetX<=ne.offsetWidth-ne.clientWidth:se.offsetX>ne.clientWidth),Ze=vt&&se.offsetY>ne.clientHeight;if(Fe||Ze)return}if(ke(se))return;if(he()==="intentional"&&A.current){G.clear(),A.current=!1;return}if(typeof _=="function"&&!_(se))return;const Ge=a.current.floatingContext?.nodeId,Ye=x?Bi(x.nodesRef.current,Ge):[];if(Ye.length>0){let rt=!0;if(Ye.forEach(st=>{st.context?.open&&!st.context.dataRef.current.__outsidePressBubbles&&(rt=!1)}),!rt)return}n.setOpen(!1,Rt(Tv,se)),q()}function Pe(se){he()!=="sloppy"||se.pointerType==="touch"||!n.select("open")||!l||wi(se,n.select("floatingElement"))||wi(se,n.select("domReferenceElement"))||Te(se)}function ue(se){if(he()!=="sloppy"||!n.select("open")||!l||wi(se,n.select("floatingElement"))||wi(se,n.select("domReferenceElement")))return;const ne=se.touches[0];ne&&(F.current={startTime:Date.now(),startX:ne.clientX,startY:ne.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},V.start(1e3,()=>{F.current&&(F.current.dismissOnTouchEnd=!1,F.current.dismissOnMouseDown=!1)}))}function Ee(se,ne){const _e=gr(se);if(!_e)return;const te=It(_e,se.type,()=>{ne(se),te()})}function Ce(se){B.current="touch",Ee(se,ue)}function Me(se){V.clear(),se.type==="pointerdown"&&(B.current=se.pointerType),!(se.type==="mousedown"&&F.current&&!F.current.dismissOnMouseDown)&&Ee(se,ne=>{ne.type==="pointerdown"?Pe(ne):Te(ne)})}function ve(se){if(!T.current)return;const ne=C.current;if(ie(),he()==="intentional"){if(se.type==="pointercancel"){ne&&ee();return}if(!ke(se)){if(ne){ee();return}typeof _=="function"&&!_(se)||(G.clear(),A.current=!0,q())}}}function xe(se){if(he()!=="sloppy"||!F.current||wi(se,n.select("floatingElement"))||wi(se,n.select("domReferenceElement")))return;const ne=se.touches[0];if(!ne)return;const _e=Math.abs(ne.clientX-F.current.startX),te=Math.abs(ne.clientY-F.current.startY),ae=Math.sqrt(_e*_e+te*te);ae>5&&(F.current.dismissOnTouchEnd=!0),ae>10&&(Te(se),V.clear(),F.current=null)}function De(se){Ee(se,xe)}function Ne(se){he()!=="sloppy"||!F.current||wi(se,n.select("floatingElement"))||wi(se,n.select("domReferenceElement"))||(F.current.dismissOnTouchEnd&&Te(se),V.clear(),F.current=null)}function Ie(se){Ee(se,Ne)}const ge=qt(s),fe=Pi(c&&Pi(It(ge,"keydown",L),It(ge,"compositionstart",O),It(ge,"compositionend",J)),E&&Pi(It(ge,"click",Me,!0),It(ge,"pointerdown",Me,!0),It(ge,"pointerup",ve,!0),It(ge,"pointercancel",ve,!0),It(ge,"mousedown",Me,!0),It(ge,"mouseup",ve,!0),It(ge,"touchstart",Ce,!0),It(ge,"touchmove",De,!0),It(ge,"touchend",Ie,!0)));return()=>{fe(),$.clear(),G.clear(),ie(),A.current=!1}},[a,s,c,E,_,r,l,N,I,L,q,R,x,n,V]),k.useEffect(q,[_,q]);const U=k.useMemo(()=>({onKeyDown:L,[dj[m]]:$=>{z()&&n.setOpen(!1,Rt(yl,$.nativeEvent))},...m!=="intentional"&&{onClick($){z()&&n.setOpen(!1,Rt(yl,$.nativeEvent))}}}),[L,n,m,z]),P=Ke($=>{if(!r||!l||$.button!==0)return;const G=gr($.nativeEvent);kt(n.select("floatingElement"),G)&&(T.current||(T.current=!0,C.current=!1))}),Y=Ke($=>{!r||!l||($.defaultPrevented||$.nativeEvent.defaultPrevented)&&T.current&&(C.current=!0)}),D=k.useMemo(()=>({onKeyDown:L,onPointerDown:Y,onMouseDown:Y,onClickCapture:H,onMouseDownCapture($){H(),P($)},onPointerDownCapture($){H(),P($)},onMouseUpCapture:H,onTouchEndCapture:H,onTouchMoveCapture:H}),[L,H,P,Y]);return k.useMemo(()=>l?{reference:U,floating:D,trigger:U}:{},[l,U,D])}function i1(e,t,n){let{reference:r,floating:s}=e;const a=pi(t),l=Ov(t),c=Nv(l),p=Pr(t),f=a==="y",h=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,g=r[c]/2-s[c]/2;let b;switch(p){case"top":b={x:h,y:r.y-s.height};break;case"bottom":b={x:h,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:m};break;case"left":b={x:r.x-s.width,y:m};break;default:b={x:r.x,y:r.y}}switch(go(t)){case"start":b[l]-=g*(n&&f?-1:1);break;case"end":b[l]+=g*(n&&f?-1:1);break}return b}async function mj(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:l,elements:c,strategy:p}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:m="floating",altBoundary:g=!1,padding:b=0}=ws(t,e),x=xR(b),_=c[g?m==="floating"?"reference":"floating":m],E=fc(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(_)))==null||n?_:_.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:h,strategy:p})),R=m==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),C=await(a.isElement==null?void 0:a.isElement(T))?await(a.getScale==null?void 0:a.getScale(T))||{x:1,y:1}:{x:1,y:1},A=fc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:R,offsetParent:T,strategy:p}):R);return{top:(E.top-A.top+x.top)/C.y,bottom:(A.bottom-E.bottom+x.bottom)/C.y,left:(E.left-A.left+x.left)/C.x,right:(A.right-E.right+x.right)/C.x}}const gj=50,bj=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:mj},p=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:m}=i1(f,r,p),g=r,b=0;const x={};for(let w=0;w<a.length;w++){const _=a[w];if(!_)continue;const{name:E,fn:R}=_,{x:T,y:C,data:A,reset:N}=await R({x:h,y:m,initialPlacement:r,placement:g,strategy:s,middlewareData:x,rects:f,platform:c,elements:{reference:e,floating:t}});h=T??h,m=C??m,x[E]={...x[E],...A},N&&b<gj&&(b++,typeof N=="object"&&(N.placement&&(g=N.placement),N.rects&&(f=N.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):N.rects),{x:h,y:m}=i1(f,g,p)),w=-1)}return{x:h,y:m,placement:g,strategy:s,middlewareData:x}},yj=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:a,rects:l,initialPlacement:c,platform:p,elements:f}=t,{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:w=!0,..._}=ws(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const E=Pr(s),R=pi(c),T=Pr(c)===c,C=await(p.isRTL==null?void 0:p.isRTL(f.floating)),A=g||(T||!w?[Mp(c)]:B2(c)),N=x!=="none";!g&&N&&A.push(...H2(c,w,x,C));const I=[c,...A],F=await p.detectOverflow(t,_),V=[];let j=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&V.push(F[E]),m){const z=$2(s,l,C);V.push(F[z[0]],F[z[1]])}if(j=[...j,{placement:s,overflows:V}],!V.every(z=>z<=0)){var q,Z;const z=(((q=a.flip)==null?void 0:q.index)||0)+1,L=I[z];if(L&&(!(m==="alignment"?R!==pi(L):!1)||j.every(P=>pi(P.placement)===R?P.overflows[0]>0:!0)))return{data:{index:z,overflows:j},reset:{placement:L}};let H=(Z=j.filter(U=>U.overflows[0]<=0).sort((U,P)=>U.overflows[1]-P.overflows[1])[0])==null?void 0:Z.placement;if(!H)switch(b){case"bestFit":{var B;const U=(B=j.filter(P=>{if(N){const Y=pi(P.placement);return Y===R||Y==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(Y=>Y>0).reduce((Y,D)=>Y+D,0)]).sort((P,Y)=>P[1]-Y[1])[0])==null?void 0:B[0];U&&(H=U);break}case"initialPlacement":H=c;break}if(s!==H)return{reset:{placement:H}}}return{}}}};function s1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function o1(e){return L2.some(t=>e[t]>=0)}const vj=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:s="referenceHidden",...a}=ws(e,t);switch(s){case"referenceHidden":{const l=await r.detectOverflow(t,{...a,elementContext:"reference"}),c=s1(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:o1(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...a,altBoundary:!0}),c=s1(l,n.floating);return{data:{escapedOffsets:c,escaped:o1(c)}}}default:return{}}}}},FR=new Set(["left","top"]);async function kj(e,t){const{placement:n,platform:r,elements:s}=e,a=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=Pr(n),c=go(n),p=pi(n)==="y",f=FR.has(l)?-1:1,h=a&&p?-1:1,m=ws(t,e);let{mainAxis:g,crossAxis:b,alignmentAxis:x}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof x=="number"&&(b=c==="end"?x*-1:x),p?{x:b*h,y:g*f}:{x:g*f,y:b*h}}const xj=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:a,placement:l,middlewareData:c}=t,p=await kj(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:s+p.x,y:a+p.y,data:{...p,placement:l}}}}},Sj=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s,platform:a}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:p={fn:E=>{let{x:R,y:T}=E;return{x:R,y:T}}},...f}=ws(e,t),h={x:n,y:r},m=await a.detectOverflow(t,f),g=pi(Pr(s)),b=Av(g);let x=h[b],w=h[g];if(l){const E=b==="y"?"top":"left",R=b==="y"?"bottom":"right",T=x+m[E],C=x-m[R];x=xy(T,x,C)}if(c){const E=g==="y"?"top":"left",R=g==="y"?"bottom":"right",T=w+m[E],C=w-m[R];w=xy(T,w,C)}const _=p.fn({...t,[b]:x,[g]:w});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[b]:l,[g]:c}}}}}},wj=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:a,middlewareData:l}=t,{offset:c=0,mainAxis:p=!0,crossAxis:f=!0}=ws(e,t),h={x:n,y:r},m=pi(s),g=Av(m);let b=h[g],x=h[m];const w=ws(c,t),_=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(p){const T=g==="y"?"height":"width",C=a.reference[g]-a.floating[T]+_.mainAxis,A=a.reference[g]+a.reference[T]-_.mainAxis;b<C?b=C:b>A&&(b=A)}if(f){var E,R;const T=g==="y"?"width":"height",C=FR.has(Pr(s)),A=a.reference[m]-a.floating[T]+(C&&((E=l.offset)==null?void 0:E[m])||0)+(C?0:_.crossAxis),N=a.reference[m]+a.reference[T]+(C?0:((R=l.offset)==null?void 0:R[m])||0)-(C?_.crossAxis:0);x<A?x=A:x>N&&(x=N)}return{[g]:b,[m]:x}}}},Ej=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:a,platform:l,elements:c}=t,{apply:p=()=>{},...f}=ws(e,t),h=await l.detectOverflow(t,f),m=Pr(s),g=go(s),b=pi(s)==="y",{width:x,height:w}=a.floating;let _,E;m==="top"||m==="bottom"?(_=m,E=g===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(E=m,_=g==="end"?"top":"bottom");const R=w-h.top-h.bottom,T=x-h.left-h.right,C=kl(w-h[_],R),A=kl(x-h[E],T),N=!t.middlewareData.shift;let I=C,F=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(F=T),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=R),N&&!g){const j=Xr(h.left,0),q=Xr(h.right,0),Z=Xr(h.top,0),B=Xr(h.bottom,0);b?F=x-2*(j!==0||q!==0?j+q:Xr(h.left,h.right)):I=w-2*(Z!==0||B!==0?Z+B:Xr(h.top,h.bottom))}await p({...t,availableWidth:F,availableHeight:I});const V=await l.getDimensions(c.floating);return x!==V.width||w!==V.height?{reset:{rects:!0}}:{}}}};function UR(e){const t=Er(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=jt(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:r,c=xl(n)!==a||xl(r)!==l;return c&&(n=a,r=l),{width:n,height:r,$:c}}function Dv(e){return yt(e)?e:e.contextElement}function ll(e){const t=Dv(e);if(!jt(t))return $i(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=UR(t);let l=(a?xl(n.width):n.width)/r,c=(a?xl(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const Tj=$i(0);function qR(e){const t=Sn(e);return!Lc()||!t.visualViewport?Tj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _j(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Sn(e)?!1:t}function Qo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Dv(e);let l=$i(1);t&&(r?yt(r)&&(l=ll(r)):l=ll(e));const c=_j(a,n,r)?qR(a):$i(0);let p=(s.left+c.x)/l.x,f=(s.top+c.y)/l.y,h=s.width/l.x,m=s.height/l.y;if(a){const g=Sn(a),b=r&&yt(r)?Sn(r):r;let x=g,w=gy(x);for(;w&&r&&b!==x;){const _=ll(w),E=w.getBoundingClientRect(),R=Er(w),T=E.left+(w.clientLeft+parseFloat(R.paddingLeft))*_.x,C=E.top+(w.clientTop+parseFloat(R.paddingTop))*_.y;p*=_.x,f*=_.y,h*=_.x,m*=_.y,p+=T,f+=C,x=Sn(w),w=gy(x)}}return fc({width:h,height:m,x:p,y:f})}function Eh(e,t){const n=mh(e).scrollLeft;return t?t.left+n:Qo(qi(e)).left+n}function HR(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Eh(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function Rj(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",l=qi(r),c=t?hh(t.floating):!1;if(r===l||c&&a)return n;let p={scrollLeft:0,scrollTop:0},f=$i(1);const h=$i(0),m=jt(r);if((m||!m&&!a)&&((Qn(r)!=="body"||mo(l))&&(p=mh(r)),m)){const b=Qo(r);f=ll(r),h.x=b.x+r.clientLeft,h.y=b.y+r.clientTop}const g=l&&!m&&!a?HR(l,p):$i(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-p.scrollLeft*f.x+h.x+g.x,y:n.y*f.y-p.scrollTop*f.y+h.y+g.y}}function Cj(e){return Array.from(e.getClientRects())}function Aj(e){const t=qi(e),n=mh(e),r=e.ownerDocument.body,s=Xr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Xr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Eh(e);const c=-n.scrollTop;return Er(r).direction==="rtl"&&(l+=Xr(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:l,y:c}}const a1=25;function Nj(e,t){const n=Sn(e),r=qi(e),s=n.visualViewport;let a=r.clientWidth,l=r.clientHeight,c=0,p=0;if(s){a=s.width,l=s.height;const h=Lc();(!h||h&&t==="fixed")&&(c=s.offsetLeft,p=s.offsetTop)}const f=Eh(r);if(f<=0){const h=r.ownerDocument,m=h.body,g=getComputedStyle(m),b=h.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,x=Math.abs(r.clientWidth-m.clientWidth-b);x<=a1&&(a-=x)}else f<=a1&&(a+=f);return{width:a,height:l,x:c,y:p}}function Oj(e,t){const n=Qo(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=jt(e)?ll(e):$i(1),l=e.clientWidth*a.x,c=e.clientHeight*a.y,p=s*a.x,f=r*a.y;return{width:l,height:c,x:p,y:f}}function l1(e,t,n){let r;if(t==="viewport")r=Nj(e,n);else if(t==="document")r=Aj(qi(e));else if(yt(t))r=Oj(t,n);else{const s=qR(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return fc(r)}function GR(e,t){const n=Ui(e);return n===t||!yt(n)||mi(n)?!1:Er(n).position==="fixed"||GR(n,t)}function Mj(e,t){const n=t.get(e);if(n)return n;let r=ao(e,[],!1).filter(c=>yt(c)&&Qn(c)!=="body"),s=null;const a=Er(e).position==="fixed";let l=a?Ui(e):e;for(;yt(l)&&!mi(l);){const c=Er(l),p=Ev(l);!p&&c.position==="fixed"&&(s=null),(a?!p&&!s:!p&&c.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||mo(l)&&!p&&GR(e,l))?r=r.filter(h=>h!==l):s=c,l=Ui(l)}return t.set(e,r),r}function Ij(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?hh(t)?[]:Mj(t,this._c):[].concat(n),r],c=l1(t,l[0],s);let p=c.top,f=c.right,h=c.bottom,m=c.left;for(let g=1;g<l.length;g++){const b=l1(t,l[g],s);p=Xr(b.top,p),f=kl(b.right,f),h=kl(b.bottom,h),m=Xr(b.left,m)}return{width:f-m,height:h-p,x:m,y:p}}function Dj(e){const{width:t,height:n}=UR(e);return{width:t,height:n}}function zj(e,t,n){const r=jt(t),s=qi(t),a=n==="fixed",l=Qo(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const p=$i(0);function f(){p.x=Eh(s)}if(r||!r&&!a)if((Qn(t)!=="body"||mo(s))&&(c=mh(t)),r){const b=Qo(t,!0,a,t);p.x=b.x+t.clientLeft,p.y=b.y+t.clientTop}else s&&f();a&&!r&&s&&f();const h=s&&!r&&!a?HR(s,c):$i(0),m=l.left+c.scrollLeft-p.x-h.x,g=l.top+c.scrollTop-p.y-h.y;return{x:m,y:g,width:l.width,height:l.height}}function bb(e){return Er(e).position==="static"}function u1(e,t){if(!jt(e)||Er(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return qi(e)===n&&(n=n.ownerDocument.body),n}function VR(e,t){const n=Sn(e);if(hh(e))return n;if(!jt(e)){let s=Ui(e);for(;s&&!mi(s);){if(yt(s)&&!bb(s))return s;s=Ui(s)}return n}let r=u1(e,t);for(;r&&a2(r)&&bb(r);)r=u1(r,t);return r&&mi(r)&&bb(r)&&!Ev(r)?n:r||c2(e)||n}const jj=async function(e){const t=this.getOffsetParent||VR,n=this.getDimensions,r=await n(e.floating);return{reference:zj(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Lj(e){return Er(e).direction==="rtl"}const KR={convertOffsetParentRelativeRectToViewportRelativeRect:Rj,getDocumentElement:qi,getClippingRect:Ij,getOffsetParent:VR,getElementRects:jj,getClientRects:Cj,getDimensions:Dj,getScale:ll,isElement:yt,isRTL:Lj};function ZR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Pj(e,t){let n=null,r;const s=qi(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,p){c===void 0&&(c=!1),p===void 0&&(p=1),a();const f=e.getBoundingClientRect(),{left:h,top:m,width:g,height:b}=f;if(c||t(),!g||!b)return;const x=vs(m),w=vs(s.clientWidth-(h+g)),_=vs(s.clientHeight-(m+b)),E=vs(h),T={rootMargin:-x+"px "+-w+"px "+-_+"px "+-E+"px",threshold:Xr(0,kl(1,p))||1};let C=!0;function A(N){const I=N[0].intersectionRatio;if(I!==p){if(!C)return l();I?l(!1,I):r=setTimeout(()=>{l(!1,1e-7)},1e3)}I===1&&!ZR(f,e.getBoundingClientRect())&&l(),C=!1}try{n=new IntersectionObserver(A,{...T,root:s.ownerDocument})}catch{n=new IntersectionObserver(A,T)}n.observe(e)}return l(!0),a}function Ip(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:p=!1}=r,f=Dv(e),h=s||a?[...f?ao(f):[],...t?ao(t):[]]:[];h.forEach(E=>{s&&E.addEventListener("scroll",n,{passive:!0}),a&&E.addEventListener("resize",n)});const m=f&&c?Pj(f,n):null;let g=-1,b=null;l&&(b=new ResizeObserver(E=>{let[R]=E;R&&R.target===f&&b&&t&&(b.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var T;(T=b)==null||T.observe(t)})),n()}),f&&!p&&b.observe(f),t&&b.observe(t));let x,w=p?Qo(e):null;p&&_();function _(){const E=Qo(e);w&&!ZR(w,E)&&n(),w=E,x=requestAnimationFrame(_)}return n(),()=>{var E;h.forEach(R=>{s&&R.removeEventListener("scroll",n),a&&R.removeEventListener("resize",n)}),m?.(),(E=b)==null||E.disconnect(),b=null,p&&cancelAnimationFrame(x)}}const $j=xj,Bj=Sj,Fj=yj,Uj=Ej,qj=vj,Hj=wj,Gj=(e,t,n)=>{const r=new Map,s={platform:KR,...n},a={...s.platform,_c:r};return bj(e,t,{...s,platform:a})};var Vj=typeof document<"u",Kj=function(){},bp=Vj?k.useLayoutEffect:Kj;function Dp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Dp(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const a=s[r];if(!(a==="_owner"&&e.$$typeof)&&!Dp(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function WR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function c1(e,t){const n=WR(e);return Math.round(t*n)/n}function yb(e){const t=k.useRef(e);return bp(()=>{t.current=e}),t}function YR(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:p,open:f}=e,[h,m]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,b]=k.useState(r);Dp(g,r)||b(r);const[x,w]=k.useState(null),[_,E]=k.useState(null),R=k.useCallback(P=>{P!==N.current&&(N.current=P,w(P))},[]),T=k.useCallback(P=>{P!==I.current&&(I.current=P,E(P))},[]),C=a||x,A=l||_,N=k.useRef(null),I=k.useRef(null),F=k.useRef(h),V=p!=null,j=yb(p),q=yb(s),Z=yb(f),B=k.useCallback(()=>{if(!N.current||!I.current)return;const P={placement:t,strategy:n,middleware:g};q.current&&(P.platform=q.current),Gj(N.current,I.current,P).then(Y=>{const D={...Y,isPositioned:Z.current!==!1};z.current&&!Dp(F.current,D)&&(F.current=D,Ci.flushSync(()=>{m(D)}))})},[g,t,n,q,Z]);bp(()=>{f===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,m(P=>({...P,isPositioned:!1})))},[f]);const z=k.useRef(!1);bp(()=>(z.current=!0,()=>{z.current=!1}),[]),bp(()=>{if(C&&(N.current=C),A&&(I.current=A),C&&A){if(j.current)return j.current(C,A,B);B()}},[C,A,B,j,V]);const L=k.useMemo(()=>({reference:N,floating:I,setReference:R,setFloating:T}),[R,T]),H=k.useMemo(()=>({reference:C,floating:A}),[C,A]),U=k.useMemo(()=>{const P={position:n,left:0,top:0};if(!H.floating)return P;const Y=c1(H.floating,h.x),D=c1(H.floating,h.y);return c?{...P,transform:"translate("+Y+"px, "+D+"px)",...WR(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Y,top:D}},[n,c,H.floating,h.x,h.y]);return k.useMemo(()=>({...h,update:B,refs:L,elements:H,floatingStyles:U}),[h,B,L,H,U])}const zv=(e,t)=>{const n=$j(e);return{name:n.name,fn:n.fn,options:[e,t]}},jv=(e,t)=>{const n=Bj(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zj=(e,t)=>({fn:Hj(e).fn,options:[e,t]}),Lv=(e,t)=>{const n=Fj(e);return{name:n.name,fn:n.fn,options:[e,t]}},Pv=(e,t)=>{const n=Uj(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wj=(e,t)=>{const n=qj(e);return{name:n.name,fn:n.fn,options:[e,t]}},nt=(e,t,n,r,s,a,...l)=>{if(l.length>0)throw new Error(Jn(1));let c;if(e)c=e;else throw new Error("Missing arguments");return c};var vb={exports:{}},kb={};var f1;function Yj(){if(f1)return kb;f1=1;var e=zc();function t(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,s=e.useEffect,a=e.useLayoutEffect,l=e.useDebugValue;function c(m,g){var b=g(),x=r({inst:{value:b,getSnapshot:g}}),w=x[0].inst,_=x[1];return a(function(){w.value=b,w.getSnapshot=g,p(w)&&_({inst:w})},[m,b,g]),s(function(){return p(w)&&_({inst:w}),m(function(){p(w)&&_({inst:w})})},[m]),l(b),b}function p(m){var g=m.getSnapshot;m=m.value;try{var b=g();return!n(m,b)}catch{return!0}}function f(m,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return kb.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,kb}var d1;function XR(){return d1||(d1=1,vb.exports=Yj()),vb.exports}var $v=XR(),xb={exports:{}},Sb={};var p1;function Xj(){if(p1)return Sb;p1=1;var e=zc(),t=XR();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,a=e.useRef,l=e.useEffect,c=e.useMemo,p=e.useDebugValue;return Sb.useSyncExternalStoreWithSelector=function(f,h,m,g,b){var x=a(null);if(x.current===null){var w={hasValue:!1,value:null};x.current=w}else w=x.current;x=c(function(){function E(N){if(!R){if(R=!0,T=N,N=g(N),b!==void 0&&w.hasValue){var I=w.value;if(b(I,N))return C=I}return C=N}if(I=C,r(T,N))return I;var F=g(N);return b!==void 0&&b(I,F)?(T=N,I):(T=N,C=F)}var R=!1,T,C,A=m===void 0?null:m;return[function(){return E(h())},A===null?void 0:function(){return E(A())}]},[h,m,g,b]);var _=s(f,x[0],x[1]);return l(function(){w.hasValue=!0,w.value=_},[_]),p(_),_},Sb}var h1;function Qj(){return h1||(h1=1,xb.exports=Xj()),xb.exports}var Jj=Qj();const _y=[];let Ry;function eL(){return Ry}function tL(e){_y.push(e)}function QR(e){const t=(n,r)=>{const s=wr(rL).current;let a;try{Ry=s;for(const l of _y)l.before(s);a=e(n,r);for(const l of _y)l.after(s);s.didInitialize=!0}finally{Ry=void 0}return a};return t.displayName=e.displayName||e.name,t}function nL(e){return k.forwardRef(QR(e))}function rL(){return{didInitialize:!1}}const iL=kv(19),sL=iL?aL:lL;function bt(e,t,n,r,s){return sL(e,t,n,r,s)}function oL(e,t,n,r,s){const a=k.useCallback(()=>t(e.getSnapshot(),n,r,s),[e,t,n,r,s]);return $v.useSyncExternalStore(e.subscribe,a,a)}tL({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],s=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,s))&&(t=!0,r.value=s,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const s of e.syncHooks)n.add(s.store);const r=[];for(const s of n)r.push(s.subscribe(t));return()=>{for(const s of r)s()}}),$v.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function aL(e,t,n,r,s){const a=eL();if(!a)return oL(e,t,n,r,s);const l=a.syncIndex;a.syncIndex+=1;let c;return a.didInitialize?(c=a.syncHooks[l],(c.store!==e||c.selector!==t||!Object.is(c.a1,n)||!Object.is(c.a2,r)||!Object.is(c.a3,s))&&(c.store!==e&&(a.didChangeStore=!0),c.store=e,c.selector=t,c.a1=n,c.a2=r,c.a3=s,c.didChange=!0)):(c={store:e,selector:t,a1:n,a2:r,a3:s,value:t(e.getSnapshot(),n,r,s),didChange:!1},a.syncHooks.push(c)),c.value}function lL(e,t,n,r,s){return Jj.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a=>t(a,n,r,s))}class JR{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,s){return bt(this,t,n,r,s)}}class eC extends JR{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){k.useDebugValue(t),He(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;He(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);He(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){k.useDebugValue(t);const r=n!==void 0;He(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r])}select(t,n,r,s){const a=this.selectors[t];return a(this.state,n,r,s)}useState(t,n,r,s){return k.useDebugValue(t),bt(this,this.selectors[t],n,r,s)}useContextCallback(t,n){k.useDebugValue(t);const r=Ke(n??ar);this.context[t]=r}useStateSetter(t){const n=k.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let s=r(this.state);return n(s,s,this),this.subscribe(a=>{const l=r(a);if(!Object.is(s,l)){const c=s;s=l,n(l,c,this)}})}}function uL(){const[,e]=k.useState({});return k.useCallback(()=>{e({})},[])}const cL={open:nt(e=>e.open),transitionStatus:nt(e=>e.transitionStatus),domReferenceElement:nt(e=>e.domReferenceElement),referenceElement:nt(e=>e.positionReference??e.referenceElement),floatingElement:nt(e=>e.floatingElement),floatingId:nt(e=>e.floatingId)};class Bv extends eC{constructor(t){const{syncOnly:n,nested:r,onOpenChange:s,triggerElements:a,...l}=t;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:tj(),nested:r,triggerElements:a},cL),this.syncOnly=n}syncOpenEvent=(t,n)=>{(!t||!this.state.open||n!=null&&hR(n))&&(this.context.dataRef.current.openEvent=t?n:void 0)};dispatchOpenChange=(t,n)=>{this.syncOpenEvent(t,n.event);const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)};setOpen=(t,n)=>{if(this.syncOnly){this.context.onOpenChange?.(t,n);return}this.dispatchOpenChange(t,n),this.context.onOpenChange?.(t,n)}}function Fc(e,t=!1,n=!1){const[r,s]=k.useState(e&&t?"idle":void 0),[a,l]=k.useState(e);return e&&!a&&(l(!0),s("starting")),!e&&a&&r!=="ending"&&!n&&s("ending"),!e&&!a&&r==="ending"&&s(void 0),He(()=>{if(!e&&a&&r!=="ending"&&n){const c=On.request(()=>{s("ending")});return()=>{On.cancel(c)}}},[e,a,r,n]),He(()=>{if(!e||t)return;const c=On.request(()=>{s(void 0)});return()=>{On.cancel(c)}},[t,e]),He(()=>{if(!e||!t)return;e&&a&&r!=="idle"&&s("starting");const c=On.request(()=>{s("idle")});return()=>{On.cancel(c)}},[t,e,a,r]),{mounted:a,setMounted:l,transitionStatus:r}}function tC(e,t=!1,n=!0){const r=$c();return Ke((s,a=null)=>{r.cancel();const l=ps(e);if(l==null)return;const c=l,p=()=>{Ci.flushSync(s)};if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){s();return}function f(){Promise.all(c.getAnimations().map(h=>h.finished)).then(()=>{a?.aborted||p()}).catch(()=>{if(n){a?.aborted||p();return}const h=c.getAnimations();!a?.aborted&&h.length>0&&h.some(m=>m.pending||m.playState!=="finished")&&f()})}if(t){const h=Xo.startingStyle;if(!c.hasAttribute(h)){r.request(f);return}const m=new MutationObserver(()=>{c.hasAttribute(h)||(m.disconnect(),f())});m.observe(c,{attributes:!0,attributeFilter:[h]}),a?.addEventListener("abort",()=>m.disconnect(),{once:!0});return}r.request(f)})}function aa(e){const{enabled:t=!0,open:n,ref:r,onComplete:s}=e,a=Ke(s),l=tC(r,n,!1);k.useEffect(()=>{if(!t)return;const c=new AbortController;return l(a,c.signal),()=>{c.abort()}},[t,n,a,l])}function fL(e,t){const n=k.useRef(null),r=k.useRef(null);return k.useCallback(s=>{if(e!==void 0){if(n.current!==null){const a=n.current,l=r.current,c=t.context.triggerElements.getById(a);l&&c===l&&t.context.triggerElements.delete(a),n.current=null,r.current=null}s!==null&&(n.current=e,r.current=s,t.context.triggerElements.add(e,s))}},[t,e])}function dL(e,t,n,r){const s=n.useState("isMountedByTrigger",e),a=fL(e,n),l=Ke(c=>{if(a(c),!c||!n.select("open"))return;const p=n.select("activeTriggerId");if(p===e){n.update({activeTriggerElement:c,...r});return}p==null&&n.update({activeTriggerId:e,activeTriggerElement:c,...r})});return He(()=>{s&&n.update({activeTriggerElement:t.current,...r})},[s,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:s}}function pL(e){const t=e.useState("open");He(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,s]=n.value;e.update({activeTriggerId:r,activeTriggerElement:s})}}},[t,e])}function hL(e,t,n){const{mounted:r,setMounted:s,transitionStatus:a}=Fc(e);t.useSyncedValues({mounted:r,transitionStatus:a});const l=Ke(()=>{s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),t.context.onOpenChangeComplete?.(!1)}),c=t.useState("preventUnmountingOnClose");return aa({enabled:!c,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:a}}class Fv{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function mL(){return new Bv({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Fv,floatingId:"",syncOnly:!1,nested:!1,onOpenChange:void 0})}function gL(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:mL(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:hr,inactiveTriggerProps:hr,popupProps:hr}}const Ad=nt(e=>e.triggerIdProp??e.activeTriggerId),bL={open:nt(e=>e.openProp??e.open),mounted:nt(e=>e.mounted),transitionStatus:nt(e=>e.transitionStatus),floatingRootContext:nt(e=>e.floatingRootContext),preventUnmountingOnClose:nt(e=>e.preventUnmountingOnClose),payload:nt(e=>e.payload),activeTriggerId:Ad,activeTriggerElement:nt(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:nt((e,t)=>t!==void 0&&Ad(e)===t),isOpenedByTrigger:nt((e,t)=>t!==void 0&&Ad(e)===t&&e.open),isMountedByTrigger:nt((e,t)=>t!==void 0&&Ad(e)===t&&e.mounted),triggerProps:nt((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:nt(e=>e.popupProps),popupElement:nt(e=>e.popupElement),positionerElement:nt(e=>e.positionerElement)};function nC(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,s=bh(),a=wh()!=null,l=wr(()=>new Bv({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Fv,floatingId:s,syncOnly:!1,nested:a})).current;return He(()=>{const c={open:t,floatingId:s};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=yt(r.reference)?r.reference:null),r.floating!==void 0&&(c.floatingElement=r.floating),l.update(c)},[t,s,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=a,l}function yL(e={}){const{nodeId:t,externalTree:n}=e,r=nC(e),s=e.rootContext||r,a={reference:s.useState("referenceElement"),floating:s.useState("floatingElement"),domReference:s.useState("domReferenceElement")},[l,c]=k.useState(null),p=k.useRef(null),f=Il(n);He(()=>{a.domReference&&(p.current=a.domReference)},[a.domReference]);const h=YR({...e,elements:{...a,...l&&{reference:l}}}),m=k.useCallback(F=>{const V=yt(F)?{getBoundingClientRect:()=>F.getBoundingClientRect(),getClientRects:()=>F.getClientRects(),contextElement:F}:F;c(V),h.refs.setReference(V)},[h.refs]),[g,b]=k.useState(void 0),[x,w]=k.useState(null);s.useSyncedValue("referenceElement",g??null);const _=yt(g)?g:null;s.useSyncedValue("domReferenceElement",g===void 0?a.domReference:_),s.useSyncedValue("floatingElement",x);const E=k.useCallback(F=>{(yt(F)||F===null)&&(p.current=F,b(F)),(yt(h.refs.reference.current)||h.refs.reference.current===null||F!==null&&!yt(F))&&h.refs.setReference(F)},[h.refs,b]),R=k.useCallback(F=>{w(F),h.refs.setFloating(F)},[h.refs]),T=k.useMemo(()=>({...h.refs,setReference:E,setFloating:R,setPositionReference:m,domReference:p}),[h.refs,E,R,m]),C=k.useMemo(()=>({...h.elements,domReference:a.domReference}),[h.elements,a.domReference]),A=s.useState("open"),N=s.useState("floatingId"),I=k.useMemo(()=>({...h,dataRef:s.context.dataRef,open:A,onOpenChange:s.setOpen,events:s.context.events,floatingId:N,refs:T,elements:C,nodeId:t,rootStore:s}),[h,T,C,t,s,A,N]);return He(()=>{s.context.dataRef.current.floatingContext=I;const F=f?.nodesRef.current.find(V=>V.id===t);F&&(F.context=I)}),k.useMemo(()=>({...h,context:I,refs:T,elements:C,rootStore:s}),[h,T,C,I,s])}function vL(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,onOpenChange:r}=e,s=bh(),a=wh()!=null,l=t.useState("open"),c=t.useState("activeTriggerElement"),p=t.useState(n?"popupElement":"positionerElement"),f=t.context.triggerElements,h=wr(()=>new Bv({open:l,transitionStatus:void 0,referenceElement:c,floatingElement:p,triggerElements:f,onOpenChange:r,floatingId:s,syncOnly:!0,nested:a})).current;return He(()=>{const m={open:l,floatingId:s,referenceElement:c,floatingElement:p};yt(c)&&(m.domReferenceElement=c),h.state.positionReference===h.state.referenceElement&&(m.positionReference=c),h.update(m)},[l,s,c,p,h]),h.context.onOpenChange=r,h.context.nested=a,h}const wb=w2&&cR;function kL(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:s}=n.context,{enabled:a=!0,delay:l}=t,c=k.useRef(!1),p=k.useRef(null),f=di(),h=k.useRef(!0);k.useEffect(()=>{const g=n.select("domReferenceElement");if(!a)return;const b=Sn(g);function x(){const E=n.select("domReferenceElement");!n.select("open")&&jt(E)&&E===Dr(qt(E))&&(c.current=!0)}function w(){h.current=!0}function _(){h.current=!1}return Pi(It(b,"blur",x),wb&&It(b,"keydown",w,!0),wb&&It(b,"pointerdown",_,!0))},[n,a]),k.useEffect(()=>{if(!a)return;function g(b){if(b.reason===yl||b.reason===_v){const x=n.select("domReferenceElement");yt(x)&&(p.current=x,c.current=!0)}}return r.on("openchange",g),()=>{r.off("openchange",g)}},[r,a,n]);const m=k.useMemo(()=>({onMouseLeave(){c.current=!1,p.current=null},onFocus(g){const b=g.currentTarget;if(c.current){if(p.current===b)return;c.current=!1,p.current=null}const x=gr(g.nativeEvent);if(yt(x)){if(wb&&!g.relatedTarget){if(!h.current&&!kh(x))return}else if(!j2(x))return}const w=Np(g.relatedTarget,n.context.triggerElements),{nativeEvent:_,currentTarget:E}=g,R=typeof l=="function"?l():l;if(n.select("open")&&w||R===0||R===void 0){n.setOpen(!0,Rt(hp,_,E));return}f.start(R,()=>{c.current||n.setOpen(!0,Rt(hp,_,E))})},onBlur(g){c.current=!1,p.current=null;const b=g.relatedTarget,x=g.nativeEvent,w=yt(b)&&b.hasAttribute(pc("focus-guard"))&&b.getAttribute("data-type")==="outside";f.start(0,()=>{const _=n.select("domReferenceElement"),E=Dr(qt(_));!b&&E===_||kt(s.current.floatingContext?.refs.floating.current,E)||kt(_,E)||w||Np(b??E,n.context.triggerElements)||n.setOpen(!1,Rt(hp,x))})}}),[s,n,f,l]);return k.useMemo(()=>a?{reference:m,trigger:m}:{},[a,m])}class Uv{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new _i,this.restTimeout=new _i,this.handleCloseOptions=void 0}static create(){return new Uv}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const zp=new WeakMap;function jp(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&zp.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),zp.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function rC(e,t){const{scopeElement:n,referenceElement:r,floatingElement:s}=t,a=zp.get(n);a&&a!==e&&jp(a),jp(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=s,zp.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",s.style.pointerEvents="auto"}function iC(e){const t=wr(Uv.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),vh(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function xL(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),s=n.useState("floatingElement"),a=n.useState("domReferenceElement"),{dataRef:l}=n.context,{enabled:c=!0,closeDelay:p=0,nodeId:f}=t,h=iC(n),m=Il(),g=wh(),b=Ke(()=>mR(l.current.openEvent?.type,h.interactedInside)),x=Ke(()=>{const C=l.current.openEvent?.type;return C?.includes("mouse")&&C!=="mousedown"}),w=Ke(C=>Np(C,n.context.triggerElements)),_=k.useCallback(C=>{const A=Cp(p,"close",h.pointerType),N=()=>{n.setOpen(!1,Rt(ci,C)),m?.events.emit("floating.closed",C)};A?h.openChangeTimeout.start(A,N):(h.openChangeTimeout.clear(),N())},[p,n,h,m]),E=Ke(()=>{jp(h)}),R=Ke(C=>{const A=gr(C);if(!z2(A)){h.interactedInside=!1;return}h.interactedInside=A?.closest("[aria-haspopup]")!=null});He(()=>{r||(h.pointerType=void 0,h.restTimeoutPending=!1,h.interactedInside=!1,E())},[r,h,E]),k.useEffect(()=>E,[E]),He(()=>{if(c&&r&&h.handleCloseOptions?.blockPointerEvents&&x()&&yt(a)&&s){const C=a,A=s,N=qt(s),I=m?.nodesRef.current.find(V=>V.id===g)?.context?.elements.floating;I&&(I.style.pointerEvents="");const F=h.handleCloseOptions?.getScope?.()??h.pointerEventsScopeElement??I??C.closest("[data-rootownerid]")??N.body;return rC(h,{scopeElement:F,referenceElement:C,floatingElement:A}),()=>{E()}}},[c,r,a,s,h,x,m,g,E]);const T=di();k.useEffect(()=>{if(!c)return;function C(){h.openChangeTimeout.clear(),T.clear(),m?.events.off("floating.closed",N),E()}function A(F){if(m&&g&&Bi(m.nodesRef.current,g).length>0){m.events.on("floating.closed",N);return}if(w(F.relatedTarget))return;const V=l.current.floatingContext?.nodeId??f,j=F.relatedTarget;if(!(m&&V&&yt(j)&&Bi(m.nodesRef.current,V,!1).some(Z=>kt(Z.context?.elements.floating,j)))){if(h.handler){h.handler(F);return}E(),b()||_(F)}}function N(F){!m||!g||Bi(m.nodesRef.current,g).length>0||T.start(0,()=>{m.events.off("floating.closed",N),n.setOpen(!1,Rt(ci,F)),m.events.emit("floating.closed",F)})}const I=s;return Pi(I&&It(I,"mouseenter",C),I&&It(I,"mouseleave",A),I&&It(I,"pointerdown",R,!0),()=>{m?.events.off("floating.closed",N)})},[c,s,n,l,f,b,w,_,E,R,h,m,g,T])}const SL={current:null};function wL(e,t={}){const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:s}=n.context,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:p=!1,restMs:f=0,move:h=!0,triggerElementRef:m=SL,externalTree:g,isActiveTrigger:b=!0,getHandleCloseContext:x,isClosing:w}=t,_=Il(g),E=iC(n),R=k.useRef(!1),T=Gn(c),C=Gn(l),A=Gn(f),N=Gn(a),I=Gn(w);b&&(E.handleCloseOptions=T.current?.__options);const F=Ke(()=>mR(r.current.openEvent?.type,E.interactedInside)),V=Ke(z=>Np(z,n.context.triggerElements)),j=Ke((z,L,H)=>{const U=n.context.triggerElements;if(U.hasElement(L))return!z||!kt(z,L);if(!yt(H))return!1;const P=H;return U.hasMatchingElement(Y=>kt(Y,P))&&(!z||!kt(z,P))}),q=Ke((z,L=!0)=>{const H=Cp(C.current,"close",E.pointerType);H?E.openChangeTimeout.start(H,()=>{n.setOpen(!1,Rt(ci,z)),_?.events.emit("floating.closed",z)}):L&&(E.openChangeTimeout.clear(),n.setOpen(!1,Rt(ci,z)),_?.events.emit("floating.closed",z))}),Z=Ke(()=>{if(!E.handler)return;qt(n.select("domReferenceElement")).removeEventListener("mousemove",E.handler),E.handler=void 0}),B=Ke(()=>{jp(E)});return k.useEffect(()=>Z,[Z]),k.useEffect(()=>{if(!a)return;function z(L){L.open?R.current=!1:(R.current=L.reason===ci,Z(),E.openChangeTimeout.clear(),E.restTimeout.clear(),E.blockMouseMove=!0,E.restTimeoutPending=!1)}return s.on("openchange",z),()=>{s.off("openchange",z)}},[a,s,E,Z]),k.useEffect(()=>{if(!a)return;const z=m.current??(b?n.select("domReferenceElement"):null);if(!yt(z))return;function L(U){if(E.openChangeTimeout.clear(),E.blockMouseMove=!1,p&&!vl(E.pointerType))return;const P=Vw(A.current),Y=Cp(C.current,"open",E.pointerType),D=gr(U),$=U.currentTarget??null,G=n.select("domReferenceElement");let O=$;if(yt(D)&&!n.context.triggerElements.hasElement(D)){for(const ue of n.context.triggerElements.elements())if(kt(ue,D)){O=ue;break}}yt($)&&yt(G)&&!n.context.triggerElements.hasElement($)&&kt($,G)&&(O=G);const J=O==null?!1:j(G,O,D),ee=n.select("open"),ie=I.current?.()??n.select("transitionStatus")==="ending",he=!ee&&ie&&R.current,le=!J&&yt(O)&&yt(G)&&kt(G,O)&&he,ke=P>0&&!Y,Te=J&&(ee||he)||le,Pe=!ee||J;if(Te){n.setOpen(!0,Rt(ci,U,O));return}ke||(Y?E.openChangeTimeout.start(Y,()=>{Pe&&n.setOpen(!0,Rt(ci,U,O))}):Pe&&n.setOpen(!0,Rt(ci,U,O)))}function H(U){if(F()){B();return}Z();const P=n.select("domReferenceElement"),Y=qt(P);E.restTimeout.clear(),E.restTimeoutPending=!1;const D=r.current.floatingContext??x?.();if(V(U.relatedTarget))return;if(T.current&&D){n.select("open")||E.openChangeTimeout.clear();const O=m.current;E.handler=T.current({...D,tree:_,x:U.clientX,y:U.clientY,onClose(){B(),Z(),N.current&&!F()&&O===n.select("domReferenceElement")&&q(U,!0)}}),Y.addEventListener("mousemove",E.handler),E.handler(U);return}(E.pointerType!=="touch"||!kt(n.select("floatingElement"),U.relatedTarget))&&q(U)}return h?Pi(It(z,"mousemove",L,{once:!0}),It(z,"mouseenter",L),It(z,"mouseleave",H)):Pi(It(z,"mouseenter",L),It(z,"mouseleave",H))},[Z,B,r,C,q,n,a,T,E,b,j,F,V,p,h,A,m,_,N,x,I]),k.useMemo(()=>{if(!a)return;function z(L){E.pointerType=L.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(L){const{nativeEvent:H}=L,U=L.currentTarget,P=n.select("domReferenceElement"),Y=n.select("open"),D=j(P,U,L.target);if(p&&!vl(E.pointerType))return;if(Y&&D&&E.handleCloseOptions?.blockPointerEvents){const O=n.select("floatingElement");if(O){const J=E.handleCloseOptions?.getScope?.()??U.ownerDocument.body;rC(E,{scopeElement:J,referenceElement:U,floatingElement:O})}}const $=Vw(A.current);if(Y&&!D||$===0||!D&&E.restTimeoutPending&&L.movementX**2+L.movementY**2<2)return;E.restTimeout.clear();function G(){if(E.restTimeoutPending=!1,F())return;const O=n.select("open");!E.blockMouseMove&&(!O||D)&&n.setOpen(!0,Rt(ci,H,U))}E.pointerType==="touch"?Ci.flushSync(()=>{G()}):D&&Y?G():(E.restTimeoutPending=!0,E.restTimeout.start($,G))}}},[a,E,F,j,p,n,A])}function sC(e=[]){const t=e.map(f=>f?.reference),n=e.map(f=>f?.floating),r=e.map(f=>f?.item),s=e.map(f=>f?.trigger),a=k.useCallback(f=>Nd(f,e,"reference"),t),l=k.useCallback(f=>Nd(f,e,"floating"),n),c=k.useCallback(f=>Nd(f,e,"item"),r),p=k.useCallback(f=>Nd(f,e,"trigger"),s);return k.useMemo(()=>({getReferenceProps:a,getFloatingProps:l,getItemProps:c,getTriggerProps:p}),[a,l,c,p])}function Nd(e,t,n){const r=new Map,s=n==="item",a={};n==="floating"&&(a.tabIndex=-1,a[vy]="");for(const l in e)s&&e&&(l===yR||l===vR)||(a[l]=e[l]);for(let l=0;l<t.length;l+=1){let c;const p=t[l]?.[n];typeof p=="function"?c=e?p(e):null:c=p,c&&m1(a,c,s,r)}return m1(a,e,s,r),a}function m1(e,t,n,r){for(const s in t){const a=t[s];n&&(s===yR||s===vR)||(s.startsWith("on")?(r.has(s)||r.set(s,[]),typeof a=="function"&&(r.get(s)?.push(a),e[s]=(...l)=>r.get(s)?.map(c=>c(...l)).find(c=>c!==void 0))):e[s]=a)}}function EL(e){const t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}const TL="Escape";function Th(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Od(e,t){return Th(t,e===Cv||e===Bc,e===lo||e===uo)}function Eb(e,t,n){return Th(t,e===Bc,n?e===lo:e===uo)||e==="Enter"||e===" "||e===""}function _L(e,t,n){return Th(t,n?e===lo:e===uo,e===Bc)}function RL(e,t,n,r){const s=n?e===uo:e===lo,a=e===Cv;return t==="both"||t==="horizontal"&&r&&r>1?e===TL:Th(t,s,a)}function CL(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),s=n.useState("floatingElement"),a=n.useState("domReferenceElement"),l=n.context.dataRef,{listRef:c,activeIndex:p,onNavigate:f=()=>{},enabled:h=!0,selectedIndex:m=null,allowEscape:g=!1,loopFocus:b=!1,nested:x=!1,rtl:w=!1,virtual:_=!1,focusItemOnOpen:E="auto",focusItemOnHover:R=!0,openOnArrowKeyDown:T=!0,disabledIndices:C=void 0,orientation:A="vertical",parentOrientation:N,cols:I=1,id:F,resetOnPointerLeave:V=!0,externalTree:j}=t,q=Op(s),Z=Gn(q),B=wh(),z=Il(j);He(()=>{l.current.orientation=A},[l,A]);const L=ky(a),H=k.useRef(E),U=k.useRef(m??-1),P=k.useRef(null),Y=k.useRef(!0),D=Ke(ge=>{f(U.current===-1?null:U.current,ge)}),$=k.useRef(D),G=k.useRef(!!s),O=k.useRef(r),J=k.useRef(!1),ee=k.useRef(!1),ie=k.useRef(null),he=Gn(C),le=Gn(r),ke=Gn(m),Te=Gn(V),Pe=Ke(()=>{function ge(_e){_?z?.events.emit("virtualfocus",_e):ie.current=gp(_e,{sync:J.current,preventScroll:!0})}const fe=c.current[U.current],se=ee.current;fe&&ge(fe),(J.current?_e=>_e():requestAnimationFrame)(()=>{const _e=c.current[U.current]||fe;if(!_e)return;fe||ge(_e),Ce&&(se||!Y.current)&&_e.scrollIntoView?.({block:"nearest",inline:"nearest"})})});He(()=>{h&&(r&&s?(U.current=m??-1,H.current&&m!=null&&(ee.current=!0,D())):G.current&&(U.current=-1,$.current()))},[h,r,s,m,D]),He(()=>{if(h){if(!r){J.current=!1;return}if(s)if(p==null){if(J.current=!1,ke.current!=null)return;if(G.current&&(U.current=-1,Pe()),(!O.current||!G.current)&&H.current&&(P.current!=null||H.current===!0&&P.current==null)){let ge=0;const fe=()=>{c.current[0]==null?(ge<2&&(ge?requestAnimationFrame:queueMicrotask)(fe),ge+=1):(U.current=P.current==null||Eb(P.current,A,w)||x?mp(c):wy(c),P.current=null,D())};fe()}}else dc(c.current,p)||(U.current=p,Pe(),ee.current=!1)}},[h,r,s,p,ke,x,c,A,w,D,Pe,he]),He(()=>{if(!h||s||!z||_||!G.current)return;const ge=z.nodesRef.current,fe=ge.find(_e=>_e.id===B)?.context?.elements.floating,se=Dr(qt(s)),ne=ge.some(_e=>_e.context&&kt(_e.context.elements.floating,se));fe&&!ne&&Y.current&&fe.focus({preventScroll:!0})},[h,s,z,B,_]),He(()=>{$.current=D,O.current=r,G.current=!!s}),He(()=>{r||(P.current=null,H.current=E)},[r,E]);const ue=p!=null,Ee=Ke(ge=>{if(!le.current)return;const fe=c.current.indexOf(ge.currentTarget);fe!==-1&&(U.current!==fe||p!==fe)&&(U.current=fe,D(ge))}),Ce=k.useMemo(()=>({onFocus(fe){J.current=!0,Ee(fe)},onClick:({currentTarget:fe})=>fe.focus({preventScroll:!0}),onMouseMove(fe){J.current=!0,ee.current=!1,R&&Ee(fe)},onPointerLeave(fe){if(!le.current||!Y.current||fe.pointerType==="touch")return;J.current=!0;const se=fe.relatedTarget;if(!EL(fe)&&!(!R||c.current.includes(se))&&Te.current&&(ie.current?.(),ie.current=null,U.current=-1,D(fe),!_)){const ne=Z.current,_e=Dr(qt(ne));ne&&kt(ne,_e)&&ne.focus({preventScroll:!0})}}}),[Ee,le,Z,R,c,D,Te,_]),Me=k.useCallback(()=>N??z?.nodesRef.current.find(ge=>ge.id===B)?.context?.dataRef?.current.orientation,[B,z,N]),ve=Ke(ge=>{if(Y.current=!1,J.current=!0,ge.which===229||!le.current&&ge.currentTarget===Z.current)return;if(x&&RL(ge.key,A,w,I)){Od(ge.key,Me())||Yr(ge),n.setOpen(!1,Rt(cb,ge.nativeEvent)),jt(a)&&(_?z?.events.emit("virtualfocus",a):a.focus());return}const fe=U.current,se=mp(c,C),ne=wy(c,C);if(L||(ge.key==="Home"&&(Yr(ge),U.current=se,D(ge)),ge.key==="End"&&(Yr(ge),U.current=ne,D(ge))),I>1){const _e=Array.from({length:c.current.length},()=>({width:1,height:1})),te=wR(_e,I,!1),ae=te.findIndex(Ge=>Ge!=null&&!ks(c.current,Ge,C)),ze=te.reduce((Ge,Ye,rt)=>Ye!=null&&!ks(c.current,Ye,C)?rt:Ge,-1),Ue=te[SR(te.map(Ge=>Ge!=null?c.current[Ge]:null),{event:ge,orientation:A,loopFocus:b,rtl:w,cols:I,disabledIndices:TR([...(typeof C!="function"?C:null)||c.current.map((Ge,Ye)=>ks(c.current,Ye,C)?Ye:void 0),void 0],te),minIndex:ae,maxIndex:ze,prevIndex:ER(U.current>ne?se:U.current,_e,te,I,ge.key===Bc?"bl":ge.key===(w?lo:uo)?"tr":"tl"),stopEvent:!0})];if(Ue!=null&&(U.current=Ue,D(ge)),A==="both")return}if(Od(ge.key,A)){if(Yr(ge),r&&!_&&Dr(ge.currentTarget.ownerDocument)===ge.currentTarget){U.current=Eb(ge.key,A,w)?se:ne,D(ge);return}Eb(ge.key,A,w)?b?fe>=ne?g&&fe!==c.current.length?U.current=-1:(J.current=!1,U.current=se):U.current=dr(c.current,{startingIndex:fe,disabledIndices:C}):U.current=Math.min(ne,dr(c.current,{startingIndex:fe,disabledIndices:C})):b?fe<=se?g&&fe!==-1?U.current=c.current.length:(J.current=!1,U.current=ne):U.current=dr(c.current,{startingIndex:fe,decrement:!0,disabledIndices:C}):U.current=Math.max(se,dr(c.current,{startingIndex:fe,decrement:!0,disabledIndices:C})),dc(c.current,U.current)&&(U.current=-1),D(ge)}}),xe=k.useMemo(()=>_&&r&&ue&&{"aria-activedescendant":`${F}-${p}`},[_,r,ue,F,p]),De=k.useMemo(()=>({"aria-orientation":A==="both"?void 0:A,...L?{}:xe,onKeyDown(ge){if(ge.key==="Tab"&&ge.shiftKey&&r&&!_){const fe=gr(ge.nativeEvent);if(fe&&!kt(Z.current,fe))return;Yr(ge),n.setOpen(!1,Rt(gh,ge.nativeEvent)),jt(a)&&a.focus();return}ve(ge)},onPointerMove(){Y.current=!0}}),[xe,ve,Z,A,L,n,r,_,a]),Ne=k.useMemo(()=>{function ge(se){E==="auto"&&dR(se.nativeEvent)&&(H.current=!_)}function fe(se){H.current=E,E==="auto"&&pR(se.nativeEvent)&&(H.current=!0)}return{onKeyDown(se){const ne=n.select("open");Y.current=!1;const _e=se.key.startsWith("Arrow"),te=_L(se.key,Me(),w),ae=Od(se.key,A),ze=(x?te:ae)||se.key==="Enter"||se.key.trim()==="";if(_&&ne)return ve(se);if(!(!ne&&!T&&_e)){if(ze){const Ue=Od(se.key,Me());P.current=x&&Ue?null:se.key}if(x){te&&(Yr(se),ne?(U.current=mp(c,he.current),D(se)):n.setOpen(!0,Rt(cb,se.nativeEvent,se.currentTarget)));return}ae&&(ke.current!=null&&(U.current=ke.current),Yr(se),!ne&&T?n.setOpen(!0,Rt(cb,se.nativeEvent,se.currentTarget)):ve(se),ne&&D(se))}},onFocus(se){n.select("open")&&!_&&(U.current=-1,D(se))},onPointerDown:fe,onPointerEnter:fe,onMouseDown:ge,onClick:ge}},[ve,he,E,c,x,D,n,T,A,Me,w,ke,_]),Ie=k.useMemo(()=>({...xe,...Ne}),[xe,Ne]);return k.useMemo(()=>h?{reference:Ie,floating:De,item:Ce,trigger:Ne}:{},[h,Ie,De,Ne,Ce])}function AL(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,s=n.useState("open"),{listRef:a,elementsRef:l,activeIndex:c,onMatch:p,onTypingChange:f,enabled:h=!0,resetMs:m=750,selectedIndex:g=null}=t,b=di(),x=k.useRef(""),w=k.useRef(g??c??-1),_=k.useRef(null);He(()=>{!s&&g!==null||(b.clear(),_.current=null,x.current!==""&&(x.current=""))},[s,g,b]),He(()=>{s&&x.current===""&&(w.current=g??c??-1)},[s,g,c]);const E=Ke(N=>{N?r.current.typing||(r.current.typing=N,f?.(N)):r.current.typing&&(r.current.typing=N,f?.(N))}),R=Ke(N=>{function I(L){const H=l?.current[L];return!H||xh(H)}function F(L,H,U=0){if(L.length===0)return-1;const P=(U%L.length+L.length)%L.length,Y=H.toLocaleLowerCase();for(let D=0;D<L.length;D+=1){const $=(P+D)%L.length;if(!(!L[$]?.toLocaleLowerCase().startsWith(Y)||!I($)))return $}return-1}const V=a.current;if(x.current.length>0&&N.key===" "&&(Yr(N),E(!0)),x.current.length>0&&x.current[0]!==" "&&F(V,x.current)===-1&&N.key!==" "&&E(!1),V==null||N.key.length!==1||N.ctrlKey||N.metaKey||N.altKey)return;s&&N.key!==" "&&(Yr(N),E(!0));const j=x.current==="";j&&(w.current=g??c??-1),V.every(L=>L?L[0]?.toLocaleLowerCase()!==L[1]?.toLocaleLowerCase():!0)&&x.current===N.key&&(x.current="",w.current=_.current),x.current+=N.key,b.start(m,()=>{x.current="",w.current=_.current,E(!1)});const B=((j?g??c??-1:w.current)??0)+1,z=F(V,x.current,B);z!==-1?(p?.(z),_.current=z):N.key!==" "&&(x.current="",E(!1))}),T=Ke(N=>{const I=N.relatedTarget,F=n.select("domReferenceElement"),V=n.select("floatingElement"),j=kt(F,I),q=kt(V,I);j||q||(b.clear(),x.current="",w.current=_.current,E(!1))}),C=k.useMemo(()=>({onKeyDown:R,onBlur:T}),[R,T]),A=k.useMemo(()=>({onKeyDown:R,onBlur:T}),[R,T]);return k.useMemo(()=>h?{reference:C,floating:A}:{},[h,C,A])}const g1=.1,NL=g1*g1,ln=.5;function Md(e,t,n,r,s,a){return r>=t!=a>=t&&e<=(s-n)*(t-r)/(a-r)+n}function Id(e,t,n,r,s,a,l,c,p,f){let h=!1;return Md(e,t,n,r,s,a)&&(h=!h),Md(e,t,s,a,l,c)&&(h=!h),Md(e,t,l,c,p,f)&&(h=!h),Md(e,t,p,f,n,r)&&(h=!h),h}function OL(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Dd(e,t,n,r,s,a){const l=Math.min(n,s),c=Math.max(n,s),p=Math.min(r,a),f=Math.max(r,a);return e>=l&&e<=c&&t>=p&&t<=f}function ML(e={}){const{blockPointerEvents:t=!1}=e,n=new _i,r=({x:s,y:a,placement:l,elements:c,onClose:p,nodeId:f,tree:h})=>{const m=l?.split("-")[0];let g=!1,b=null,x=null,w=typeof performance<"u"?performance.now():0;function _(R,T){const C=performance.now(),A=C-w;if(b===null||x===null||A===0)return b=R,x=T,w=C,!1;const N=R-b,I=T-x,F=N*N+I*I,V=A*A*NL;return b=R,x=T,w=C,F<V}function E(){n.clear(),p()}return function(T){n.clear();const C=c.domReference,A=c.floating;if(!C||!A||m==null||s==null||a==null)return;const{clientX:N,clientY:I}=T,F=gr(T),V=T.type==="mouseleave",j=kt(A,F),q=kt(C,F);if(j&&(g=!0,!V))return;if(q&&(g=!1,!V)){g=!0;return}if(V&&yt(T.relatedTarget)&&kt(A,T.relatedTarget))return;function Z(){return!!(h&&Bi(h.nodesRef.current,f).length>0)}function B(){Z()||E()}if(Z())return;const z=C.getBoundingClientRect(),L=A.getBoundingClientRect(),H=s>L.right-L.width/2,U=a>L.bottom-L.height/2,P=L.width>z.width,Y=L.height>z.height,D=(P?z:L).left,$=(P?z:L).right,G=(Y?z:L).top,O=(Y?z:L).bottom;if(m==="top"&&a>=z.bottom-1||m==="bottom"&&a<=z.top+1||m==="left"&&s>=z.right-1||m==="right"&&s<=z.left+1){B();return}let J=!1;switch(m){case"top":J=Dd(N,I,D,z.top+1,$,L.bottom-1);break;case"bottom":J=Dd(N,I,D,L.top+1,$,z.bottom-1);break;case"left":J=Dd(N,I,L.right-1,O,z.left+1,G);break;case"right":J=Dd(N,I,z.right-1,O,L.left+1,G);break}if(J)return;if(g&&!OL(N,I,z)){B();return}if(!V&&_(N,I)){B();return}let ee=!1;switch(m){case"top":{const ie=P?ln/2:ln*4,he=P||H?s+ie:s-ie,le=P?s-ie:H?s+ie:s-ie,ke=a+ln+1,Te=H||P?L.bottom-ln:L.top,Pe=H?P?L.bottom-ln:L.top:L.bottom-ln;ee=Id(N,I,he,ke,le,ke,L.left,Te,L.right,Pe);break}case"bottom":{const ie=P?ln/2:ln*4,he=P||H?s+ie:s-ie,le=P?s-ie:H?s+ie:s-ie,ke=a-ln,Te=H||P?L.top+ln:L.bottom,Pe=H?P?L.top+ln:L.bottom:L.top+ln;ee=Id(N,I,he,ke,le,ke,L.left,Te,L.right,Pe);break}case"left":{const ie=Y?ln/2:ln*4,he=Y||U?a+ie:a-ie,le=Y?a-ie:U?a+ie:a-ie,ke=s+ln+1,Te=U||Y?L.right-ln:L.left,Pe=U?Y?L.right-ln:L.left:L.right-ln;ee=Id(N,I,Te,L.top,Pe,L.bottom,ke,he,ke,le);break}case"right":{const ie=Y?ln/2:ln*4,he=Y||U?a+ie:a-ie,le=Y?a-ie:U?a+ie:a-ie,ke=s-ln,Te=U||Y?L.left+ln:L.right,Pe=U?Y?L.left+ln:L.right:L.left+ln;ee=Id(N,I,ke,he,ke,le,Te,L.top,Pe,L.bottom);break}}ee?g||n.start(40,B):B()}};return r.__options={...e,blockPointerEvents:t},r}const ul="ArrowUp",Go="ArrowDown",hc="ArrowLeft",cl="ArrowRight",Uc="Home",qc="End",oC=new Set([hc,cl]),IL=new Set([hc,cl,Uc,qc]),aC=new Set([ul,Go]),DL=new Set([ul,Go,Uc,qc]),lC=new Set([...oC,...aC]),zL=new Set([...lC,Uc,qc]),jL=new Set([ul,Go,hc,cl,Uc,qc]),LL="Shift",PL="Control",$L="Alt",BL="Meta",FL=new Set([LL,PL,$L,BL]);function UL(e){return jt(e)&&e.tagName==="INPUT"}function b1(e){return!!(UL(e)&&e.selectionStart!=null||jt(e)&&e.tagName==="TEXTAREA")}function y1(e,t,n,r){if(!e||!t||!t.scrollTo)return;let s=e.scrollLeft,a=e.scrollTop;const l=e.clientWidth<e.scrollWidth,c=e.clientHeight<e.scrollHeight;if(l&&r!=="vertical"){const p=v1(e,t,"left"),f=zd(e),h=zd(t);n==="ltr"&&(p+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-f.scrollPaddingRight?s=p+t.offsetWidth+h.scrollMarginRight-e.clientWidth+f.scrollPaddingRight:p-h.scrollMarginLeft<e.scrollLeft+f.scrollPaddingLeft&&(s=p-h.scrollMarginLeft-f.scrollPaddingLeft)),n==="rtl"&&(p-h.scrollMarginRight<e.scrollLeft+f.scrollPaddingLeft?s=p-h.scrollMarginLeft-f.scrollPaddingLeft:p+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-f.scrollPaddingRight&&(s=p+t.offsetWidth+h.scrollMarginRight-e.clientWidth+f.scrollPaddingRight))}if(c&&r!=="horizontal"){const p=v1(e,t,"top"),f=zd(e),h=zd(t);p-h.scrollMarginTop<e.scrollTop+f.scrollPaddingTop?a=p-h.scrollMarginTop-f.scrollPaddingTop:p+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-f.scrollPaddingBottom&&(a=p+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+f.scrollPaddingBottom)}e.scrollTo({left:s,top:a,behavior:"auto"})}function v1(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let s=0;for(;t.offsetParent&&(s+=t[r],t.offsetParent!==e);)t=t.offsetParent;return s}function zd(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}function qL(e){return kv(19)?e:e?"true":void 0}const HL=k.forwardRef(function(t,n){const{cutout:r,...s}=t;let a;if(r){const l=r.getBoundingClientRect();a=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${l.left}px ${l.top}px,${l.left}px ${l.bottom}px,${l.right}px ${l.bottom}px,${l.right}px ${l.top}px,${l.left}px ${l.top}px)`}return v.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:a}})});function uC(e){const t=k.useRef(!0);t.current&&(t.current=!1,e())}let k1={},x1={},S1="";function GL(e){if(typeof document>"u")return!1;const t=qt(e);return Sn(t).innerWidth-t.documentElement.clientWidth>0}function VL(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=qt(e),r=n.documentElement,s=n.body,a=mo(r)?r:s,l=a.style.overflowY,c=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",a.style.overflowY="scroll";const p=a.offsetWidth;a.style.overflowY="hidden";const f=a.offsetWidth;return a.style.overflowY=l,r.style.scrollbarGutter=c,p===f}function KL(e){const t=qt(e),n=t.documentElement,r=t.body,s=mo(n)?n:r,a={overflowY:s.style.overflowY,overflowX:s.style.overflowX};return Object.assign(s.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(s.style,a)}}function ZL(e){const t=qt(e),n=t.documentElement,r=t.body,s=Sn(n);let a=0,l=0,c=!1;const p=On.create();if(Rv&&(s.visualViewport?.scale??1)!==1)return()=>{};function f(){const b=s.getComputedStyle(n),x=s.getComputedStyle(r),E=(b.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";a=n.scrollTop,l=n.scrollLeft,k1={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},S1=n.style.scrollBehavior,x1={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const R=n.scrollHeight>n.clientHeight,T=n.scrollWidth>n.clientWidth,C=b.overflowY==="scroll"||x.overflowY==="scroll",A=b.overflowX==="scroll"||x.overflowX==="scroll",N=Math.max(0,s.innerWidth-r.clientWidth),I=Math.max(0,s.innerHeight-r.clientHeight),F=parseFloat(x.marginTop)+parseFloat(x.marginBottom),V=parseFloat(x.marginLeft)+parseFloat(x.marginRight),j=mo(n)?n:r;if(c=VL(e),c){n.style.scrollbarGutter=E,j.style.overflowY="hidden",j.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:E,overflowY:"hidden",overflowX:"hidden"}),(R||C)&&(n.style.overflowY="scroll"),(T||A)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:F||I?`calc(100dvh - ${F+I}px)`:"100dvh",width:V||N?`calc(100vw - ${V+N}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=a,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,k1),Object.assign(r.style,x1),c||(n.scrollTop=a,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=S1)}function m(){h(),p.request(f)}f();const g=It(s,"resize",m);return()=>{p.cancel(),h(),typeof s.removeEventListener=="function"&&g()}}class WL{lockCount=0;restore=null;timeoutLock=_i.create();timeoutUnlock=_i.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=qt(t).documentElement,s=Sn(r).getComputedStyle(r).overflowY;if(s==="hidden"||s==="clip"){this.restore=ar;return}const a=uR||!GL(t);this.restore=a?KL(t):ZL(t)}}const YL=new WL;function XL(e=!0,t=null){He(()=>{if(e)return YL.acquire(t)},[e,t])}function QL(e){const t=k.useRef(""),n=k.useCallback(s=>{s.defaultPrevented||(t.current=s.pointerType,e(s,s.pointerType))},[e]);return{onClick:k.useCallback(s=>{if(s.detail===0){e(s,"keyboard");return}"pointerType"in s?e(s,s.pointerType):e(s,t.current),t.current=""},[e]),onPointerDown:n}}function cC(e,t){const n=k.useRef(e),r=Ke(t);He(()=>{n.current!==e&&r(n.current)},[e,r]),He(()=>{n.current=e},[e])}function JL(e){const[t,n]=k.useState(null),r=Ke((l,c)=>{e||n(c||(uR?"touch":""))});cC(e,l=>{l&&!e&&n(null)});const{onClick:s,onPointerDown:a}=QL(r);return k.useMemo(()=>({openMethod:t,triggerProps:{onClick:s,onPointerDown:a}}),[t,s,a])}const eP={account:"",add:"",agent:"","agent-circle":"","agent-square":"",agents:"","agents-swarm":"","alarm-clock":"",alert:"",archive:"","army-base":"","arrow-block-down":"","arrow-block-left":"","arrow-block-line-down":"","arrow-block-line-left":"","arrow-block-line-right":"","arrow-block-line-up":"","arrow-block-right":"","arrow-block-up":"","arrow-bracket-from-down":"","arrow-bracket-from-left":"","arrow-bracket-from-right":"","arrow-bracket-from-up":"","arrow-bracket-from-up-dashed":"","arrow-bracket-to-down":"","arrow-bracket-to-left":"","arrow-bracket-to-right":"","arrow-bracket-to-up":"","arrow-ccw":"","arrow-circle-down":"","arrow-circle-left":"","arrow-circle-right":"","arrow-circle-up":"","arrow-cw":"","arrow-down":"","arrow-left":"","arrow-left-down":"","arrow-left-up":"","arrow-right":"","arrow-right-down":"","arrow-right-up":"","arrow-square-down":"","arrow-square-from-down":"","arrow-square-from-left":"","arrow-square-from-right":"","arrow-square-from-up":"","arrow-square-left":"","arrow-square-left-down":"","arrow-square-left-top":"","arrow-square-left-up":"","arrow-square-right":"","arrow-square-right-down":"","arrow-square-right-top":"","arrow-square-right-up":"","arrow-square-to-down":"","arrow-square-to-left":"","arrow-square-to-right":"","arrow-square-to-up":"","arrow-square-up":"","arrow-swap":"","arrow-u-up-left":"","arrow-u-up-right":"","arrow-up":"","arrows-both-horizontal":"","arrows-both-vertical":"","arrows-ccw":"","arrows-ccw-angular":"","arrows-contract":"","arrows-contract-simple":"","arrows-cw":"","arrows-down-up":"","arrows-expand":"","arrows-expand-simple":"","arrows-left-right":"","arrows-out-cardinal":"",asterisk:"",at:"",atom:"",bandaid:"",banknote:"","banknotes-stack":"",barbell:"",basketball:"","beach-umbrella":"",beaker:"","beaker-stop":"",beehouse:"",bell:"","bell-dot":"","bell-slash":"",binary:"",binoculars:"",bluetooth:"","board-kanban":"",book:"","book-open":"",bookmark:"",books:"",bowtie:"",bracket:"","bracket-dot":"","bracket-error":"","brackets-curly":"","brackets-curly-dot":"","brackets-curly-x":"","brackets-square":"",brain:"","brain-hourglass":"","brain-simple":"","brain-simplest":"","brain-slash":"",briefcase:"",browser:"",browsers:"",brush:"",bug:"",bugbot:"",building:"",buildings:"",bullseye:"",calculator:"",calendar:"","calendar-hourglass":"",camera:"",car:"",cardholder:"",castle:"",cd:"","chart-bars":"","chart-line":"","chart-pie":"","chart-pyramid":"","chart-scatter":"","chat-bubble":"","chat-bubble-chevrons-left-right":"","chat-bubble-ellipsis":"","chat-bubble-exclamation":"","chat-bubble-pencil":"","chat-bubble-question":"","chat-bubbles":"","chat-bubbles-grid":"",chatBubble:"","chatBubble-ellipsis":"","chatBubble-exclamation":"","chatBubble-question":"",chatBubbles:"",check:"","check-circle":"","check-square":"",checks:"","chef-hat":"","chess-king":"","chess-tower":"","chevron-circle-down":"","chevron-circle-left":"","chevron-circle-right":"","chevron-circle-up":"","chevron-down":"","chevron-down-small":"","chevron-left":"","chevron-left-small":"","chevron-right":"","chevron-right-small":"","chevron-up":"","chevron-up-small":"","chevrons-down":"","chevrons-down-up":"","chevrons-left":"","chevrons-left-right":"","chevrons-right":"","chevrons-right-dotted-left":"","chevrons-up":"","chevrons-up-down":"",chip:"","chip-simple":"",circle:"","circle-circle":"","circle-dashed":"",circles:"","circles-check":"",clipboard:"",clock:"",clone:"",close:"",cloud:"","cloud-arrow-down":"","cloud-arrow-up":"","cloud-download":"","cloud-upload":"",code:"","code-brackets":"","code-simple":"",cog:"",collection:"","collection-plus":"","color-mode":"",command:"",comment:"","comment-dashed":"","comment-discussion":"","comment-dot":"",comments:"",compass:"","compass-check":"","compass-dot":"",conversation:"",cookie:"",copilot:"",copy:"","corners-in":"","corners-out":"","corners-out-check":"","corners-out-sparkle":"","cost-high":"","cost-low":"","cost-medium":"","credit-card":"","cross-medical":"",crosshair:"",crown:"","crystal-ball":"",cube:"","cube-coordinates":"","cube-nodes":"","cube-transparent":"","currency-btc":"","currency-dollar":"","currency-eth":"","cursor-logo":"","cursor-text":"",cutlery:"",cylinder:"",dashboard:"",database:"","database-network":"","debug-pause":"","debug-restart":"","debug-start":"","debug-stop":"","deckchair-umbrella":"","desktop-download":"","device-camera":"","device-camera-video":"","device-desktop":"","device-mobile":"",diagram:"",diff:"","diff-added":"","diff-ignored":"","diff-modified":"","diff-multiple":"","diff-removed":"","diff-renamed":"","diff-single":"","diff-single-arrow-right-up":"","diff-single-dot":"",discard:"",display:"","display-check":"","display-circle":"","display-connect":"","display-play":"","display-waves":"",displays:"","dots-3-horizontal":"","dots-3-vertical":"",drop:"",easel:"",edit:"",elephant:"",ellipsis:"",envelope:"","envelope-open":"",eraser:"",error:"","exclamation-circle":"","exclamation-triangle":"","execution-parallel":"","execution-sequential":"",extensions:"",eye:"","eye-closed":"","eye-slash":"","fast-backward":"","fast-forward":"",feedback:"",file:"","file-add":"","file-arrow-right-up":"","file-binary":"","file-chevrons-left-right":"","file-code":"","file-directory":"","file-directory-create":"","file-image":"","file-list":"","file-lock":"","file-media":"","file-pdf":"","file-plus":"","file-text":"","file-type-adobe-illustrator":"","file-type-adobe-photoshop":"","file-type-babel":"","file-type-bazel":"","file-type-bevy":"","file-type-bicep":"","file-type-biomejs":"","file-type-bower":"","file-type-bun":"","file-type-c-plus-plus":"","file-type-c-sharp":"","file-type-clojure":"","file-type-crystal":"","file-type-cuda":"","file-type-dart":"","file-type-docker":"","file-type-ejs":"","file-type-elixir":"","file-type-eslint":"","file-type-f-sharp":"","file-type-firebase":"","file-type-geckodriver":"","file-type-git-meta":"","file-type-go":"","file-type-godot":"","file-type-grails":"","file-type-graphql":"","file-type-groovy":"","file-type-grunt":"","file-type-gulp":"","file-type-haml":"","file-type-handlebars":"","file-type-haskell":"","file-type-ionic":"","file-type-java":"","file-type-javascript":"","file-type-julia":"","file-type-jupyter":"","file-type-karma":"","file-type-kotlin":"","file-type-latex":"","file-type-liquid":"","file-type-maven":"","file-type-mustache":"","file-type-npm":"","file-type-nunjucks":"","file-type-ocaml":"","file-type-odata":"","file-type-pdf":"","file-type-perl":"","file-type-platformio":"","file-type-powershell":"","file-type-prettier":"","file-type-prisma":"","file-type-prolog":"","file-type-puppet":"","file-type-python":"","file-type-reason":"","file-type-rescript":"","file-type-rollup":"","file-type-rust":"","file-type-sass":"","file-type-sbt":"","file-type-scala":"","file-type-slim":"","file-type-stylus":"","file-type-sublime":"","file-type-svelte":"","file-type-swift":"","file-type-terraform":"","file-type-typescript":"","file-type-vala":"","file-type-vite":"","file-type-vsc":"","file-type-vue":"","file-type-web-assembly":"","file-type-webpack":"","file-type-windows":"","file-type-yarn":"","file-type-zig":"","file-zip":"",files:"","film-reel":"","film-strip":"",filter:"",flag:"","flag-hill":"",flame:"",flask:"","flask-slash-circle":"","floppy-disc":"","focus-window":"","fold-dashed":"",folder:"","folder-active":"","folder-arrow-right-up":"","folder-check":"","folder-dashed":"","folder-library":"","folder-open":"","folder-opened":"","folder-plus":"",folders:"",fork:"",funnel:"","funnel-simple":"","game-controller":"","game-controller-retro":"",gauge:"",gear:"",gem:"",gift:"","git-branch":"","git-commit":"","git-commit-horizontal":"","git-compare":"","git-fetch":"","git-fork":"","git-merge":"","git-pull":"","git-pull-request":"","git-pull-request-closed":"","git-pull-request-create":"","git-pull-request-done":"","git-pull-request-draft":"","git-push":"",github:"","github-actions":"",globe:"","graduation-cap":"",graph:"","graph-line":"","graph-scatter":"",grid:"","grid-plus":"","grid-sparkle":"",gripper:"",hamburger:"",hammer:"",hash:"",hat:"",headphones:"",headset:"",heart:"",hexagon:"",history:"",home:"",hourglass:"",house:"","i-circle":"",image:"","image-square":"",inbox:"",infinity:"",info:"",inspect:"",issue:"","issue-closed":"","issue-draft":"",issues:"",joystick:"",json:"","kebab-horizontal":"","kebab-vertical":"",key:"",keyboard:"","keyboard-tab":"",laptop:"",layers:"","layout-dialog":"","layout-empty":"","layout-floating-window":"","layout-panel-bottom":"","layout-panel-bottom-dock":"","layout-panel-bottom-on":"","layout-panel-bottom-undock":"","layout-panel-off":"","layout-sidebar-left":"","layout-sidebar-left-dock":"","layout-sidebar-left-off":"","layout-sidebar-left-on":"","layout-sidebar-left-undock":"","layout-sidebar-right":"","layout-sidebar-right-dock":"","layout-sidebar-right-off":"","layout-sidebar-right-on":"","layout-sidebar-right-undock":"","layout-split-horizontal":"","layout-split-horizontal-dashed":"","layout-split-horizontal-right-dock":"","layout-split-horizontal-right-undock":"","layout-split-vertical":"",leaf:"",lego:"",library:"",lightbulb:"","lightbulb-sparkle":"",lightning:"",link:"","link-external":"","list-bullets":"","list-checks":"","list-filter":"","list-ordered":"","list-todo":"","list-todo-subtask":"","list-x":"",loading:"",location:"",lock:"","lock-locked":"","lock-unlocked":"","logo-azure":"","logo-azure-devops":"","logo-figma":"","logo-github":"","logo-gitlab":"","logo-jira":"","logo-linear":"","logo-markdown":"","logo-mcp":"","logo-microsoft-teams":"","logo-notion":"","logo-python":"","logo-sentry":"","logo-slack":"","logo-vscode":"","logo-vscode-insiders":"","logo-x":"","mac-mini":"","magic-wand":"",magnet:"","magnifying-glass":"","magnifying-glass-fuzzy":"","magnifying-glass-minus":"","magnifying-glass-plus":"","magnifying-glass-slash-circle":"","magnifying-glass-sparkle":"",magnifyingGlass:"","magnifyingGlass-minus":"","magnifyingGlass-plus":"","magnifyingGlass-slash-circle":"",mail:"",map:"","map-pin":"","mark-github":"",markdown:"","mask-happy":"","masks-happy":"",mcp:"",megaphone:"",mention:"",menu:"",merge:"",mic:"",microscope:"",minus:"","minus-circle":"","minus-small":"",mobile:"",moon:"","moon-sparkle":"","moon-z":"",more:"",music:"",mute:"","new-file":"","new-folder":"",newspaper:"",note:"","one-circle":"",organization:"","organization-filled":"",owl:"",package:"","package-zipper":"","paint-roller":"",palette:"",paperclip:"",paperplane:"",paragraph:"",pass:"",pause:"","pause-circle":"",paw:"","pen-nib":"",pencil:"","pencil-square":"",pentagon:"",people:"","people-3":"",percent:"",person:"","person-add":"","person-chat-bubble":"","person-circle":"","person-follow":"","person-plus":"",piano:"","pie-chart":"",pilcrow:"",pin:"","pin-slash":"",pipe:"",plan:"",plane:"",play:"","play-bug":"","play-circle":"","play-slow":"","play-super-fast":"","playback-loop":"","plays-bug":"",plug:"","plug-slash":"",plus:"","plus-circle":"","plus-minus":"","pointer-arrow":"",pug:"",pulse:"","puzzle-piece":"",question:"","question-circle":"",quote:"",radar:"","radio-tower":"","rect-magnifying-glass":"","rect-magnifyingGlass":"",redo:"",refresh:"",regex:"","remote-control":"",remove:"","remove-close":"",replace:"","replace-all":"",report:"",return:"",review:"",robot:"",rocket:"","rocking-chair":"",rss:"",ruler:"",rules:"",run:"",satellite:"",scales:"",seal:"","seal-check":"","seal-question":"",search:"","search-stop":"",send:"",server:"",servers:"",settings:"","settings-gear":"","shapes-square-circle":"",share:"",shield:"","shield-check":"","shield-question":"","shield-x":"","shoe-fast":"","shopping-bag":"","shopping-basket":"",signal:"",skills:"","skills-capability":"","slash-circle":"",sliders:"",smartwatch:"","smiley-happy":"","smiley-happy-square":"","smiley-neutral":"","smiley-plus":"","smiley-sad":"",snowflake:"","soccer-ball":"","sort-ascending":"","sort-descending":"","source-control":"",sparkle:"",sparkles:"","speaker-hifi":"","speaker-waves":"","speaker-x":"",spinner:"",split:"","split-horizontal":"","split-vertical":"",sprint:"",square:"","square-dashed":"","square-dot":"",squares:"","squares-minus":"","squares-plus":"","squares-x":"",stack:"",star:"","star-empty":"","star-full":"","status-done":"","status-draft":"","status-needs-attention":"",stop:"","stop-circle":"",stopwatch:"",storefront:"",sun:"",swatches:"","symbol-folder":"",sync:"","t-shirt":"",table:"",tabs:"",tag:"","tags-chevron-down":"","tags-chevron-left":"","tags-chevron-right":"","tags-chevron-up":"",target:"",terminal:"","terminal-rectangle":"","text-aa":"","text-ab":"","text-b":"","text-c":"","text-d":"","text-italic":"","text-j":"","text-r":"","text-s":"","text-strikethrough":"","text-t":"","text-t-square":"","text-tt":"","text-y":"","thinking-high":"","thinking-low":"","thinking-medium":"","threads-parallel":"","threads-single":"","three-bars":"","thumbs-down":"","thumbs-up":"",thumbsdown:"",thumbsup:"","traffic-cone":"",trafficCone:"",trash:"",trashcan:"",tray:"","treasure-chest":"","trending-down":"","trending-up":"","triangle-small-down":"","triangle-small-left":"","triangle-small-right":"","triangle-small-up":"",twig:"","unfold-dashed":"",unlock:"",unmute:"",unverified:"",vault:"",verified:"",versions:"","video-camera":"",vm:"",vr:"","vr-headset":"","vr-headset-head":"",wallet:"",wand:"",warning:"",watch:"",waveform:"","whole-word":"",window:"","window-pointer-arrow":"",windows:"",wrench:"",x:"","x-circle":"",yarn:"",zap:"",zipper:"","zoom-in":"","zoom-out":"",zzz:""},tP={account:"",add:"",agent:"","agent-circle":"","agent-square":"",agents:"","agents-swarm":"","alarm-clock":"",alert:"",archive:"","army-base":"","arrow-block-down":"","arrow-block-left":"","arrow-block-line-down":"","arrow-block-line-left":"","arrow-block-line-right":"","arrow-block-line-up":"","arrow-block-right":"","arrow-block-up":"","arrow-bracket-from-down":"","arrow-bracket-from-left":"","arrow-bracket-from-right":"","arrow-bracket-from-up":"","arrow-bracket-from-up-dashed":"","arrow-bracket-to-down":"","arrow-bracket-to-left":"","arrow-bracket-to-right":"","arrow-bracket-to-up":"","arrow-ccw":"","arrow-circle-down":"","arrow-circle-left":"","arrow-circle-right":"","arrow-circle-up":"","arrow-cw":"","arrow-down":"","arrow-left":"","arrow-left-down":"","arrow-left-up":"","arrow-right":"","arrow-right-down":"","arrow-right-up":"","arrow-square-down":"","arrow-square-from-down":"","arrow-square-from-left":"","arrow-square-from-right":"","arrow-square-from-up":"","arrow-square-left":"","arrow-square-left-down":"","arrow-square-left-top":"","arrow-square-left-up":"","arrow-square-right":"","arrow-square-right-down":"","arrow-square-right-top":"","arrow-square-right-up":"","arrow-square-to-down":"","arrow-square-to-left":"","arrow-square-to-right":"","arrow-square-to-up":"","arrow-square-up":"","arrow-swap":"","arrow-u-up-left":"","arrow-u-up-right":"","arrow-up":"","arrows-both-horizontal":"","arrows-both-vertical":"","arrows-ccw":"","arrows-ccw-angular":"","arrows-contract":"","arrows-contract-simple":"","arrows-cw":"","arrows-down-up":"","arrows-expand":"","arrows-expand-simple":"","arrows-left-right":"","arrows-out-cardinal":"",asterisk:"",at:"",atom:"",bandaid:"",banknote:"","banknotes-stack":"",barbell:"",basketball:"","beach-umbrella":"",beaker:"","beaker-stop":"",beehouse:"",bell:"","bell-dot":"","bell-slash":"",binary:"",binoculars:"",bluetooth:"","board-kanban":"",book:"","book-open":"",bookmark:"",books:"",bowtie:"",bracket:"","bracket-dot":"","bracket-error":"","brackets-curly":"","brackets-curly-dot":"","brackets-curly-x":"","brackets-square":"",brain:"","brain-hourglass":"","brain-simple":"","brain-simplest":"","brain-slash":"",briefcase:"",browser:"",browsers:"",brush:"",bug:"",bugbot:"",building:"",buildings:"",bullseye:"",calculator:"",calendar:"","calendar-hourglass":"",camera:"",car:"",cardholder:"",castle:"",cd:"","chart-bars":"","chart-line":"","chart-pie":"","chart-pyramid":"","chart-scatter":"","chat-bubble":"","chat-bubble-chevrons-left-right":"","chat-bubble-ellipsis":"","chat-bubble-exclamation":"","chat-bubble-pencil":"","chat-bubble-question":"","chat-bubbles":"","chat-bubbles-grid":"",chatBubble:"","chatBubble-ellipsis":"","chatBubble-exclamation":"","chatBubble-question":"",chatBubbles:"",check:"","check-circle":"","check-square":"",checks:"","chef-hat":"","chess-king":"","chess-tower":"","chevron-circle-down":"","chevron-circle-left":"","chevron-circle-right":"","chevron-circle-up":"","chevron-down":"","chevron-down-small":"","chevron-left":"","chevron-left-small":"","chevron-right":"","chevron-right-small":"","chevron-up":"","chevron-up-small":"","chevrons-down":"","chevrons-down-up":"","chevrons-left":"","chevrons-left-right":"","chevrons-right":"","chevrons-right-dotted-left":"","chevrons-up":"","chevrons-up-down":"",chip:"","chip-simple":"",circle:"","circle-circle":"","circle-dashed":"",circles:"","circles-check":"",clipboard:"",clock:"",clone:"",close:"",cloud:"","cloud-arrow-down":"","cloud-arrow-up":"","cloud-download":"","cloud-upload":"",code:"","code-brackets":"","code-simple":"",cog:"",collection:"","collection-plus":"","color-mode":"",command:"",comment:"","comment-dashed":"","comment-discussion":"","comment-dot":"",comments:"",compass:"","compass-check":"","compass-dot":"",conversation:"",cookie:"",copilot:"",copy:"","corners-in":"","corners-out":"","corners-out-check":"","corners-out-sparkle":"","cost-high":"","cost-low":"","cost-medium":"","credit-card":"","cross-medical":"",crosshair:"",crown:"","crystal-ball":"",cube:"","cube-coordinates":"","cube-nodes":"","cube-transparent":"","currency-btc":"","currency-dollar":"","currency-eth":"","cursor-logo":"","cursor-text":"",cutlery:"",cylinder:"",dashboard:"",database:"","database-network":"","debug-pause":"","debug-restart":"","debug-start":"","debug-stop":"","deckchair-umbrella":"","desktop-download":"","device-camera":"","device-camera-video":"","device-desktop":"","device-mobile":"",diagram:"",diff:"","diff-added":"","diff-ignored":"","diff-modified":"","diff-multiple":"","diff-removed":"","diff-renamed":"","diff-single":"","diff-single-arrow-right-up":"","diff-single-dot":"",discard:"",display:"","display-check":"","display-circle":"","display-connect":"","display-play":"","display-waves":"",displays:"","dots-3-horizontal":"","dots-3-vertical":"",drop:"",easel:"",edit:"",elephant:"",ellipsis:"",envelope:"","envelope-open":"",eraser:"",error:"","exclamation-circle":"","exclamation-triangle":"","execution-parallel":"","execution-sequential":"",extensions:"",eye:"","eye-closed":"","eye-slash":"","fast-backward":"","fast-forward":"",feedback:"",file:"","file-add":"","file-arrow-right-up":"","file-binary":"","file-chevrons-left-right":"","file-code":"","file-directory":"","file-directory-create":"","file-image":"","file-list":"","file-lock":"","file-media":"","file-pdf":"","file-plus":"","file-text":"","file-type-adobe-illustrator":"","file-type-adobe-photoshop":"","file-type-babel":"","file-type-bazel":"","file-type-bevy":"","file-type-bicep":"","file-type-biomejs":"","file-type-bower":"","file-type-bun":"","file-type-c-plus-plus":"","file-type-c-sharp":"","file-type-clojure":"","file-type-crystal":"","file-type-cuda":"","file-type-dart":"","file-type-docker":"","file-type-ejs":"","file-type-elixir":"","file-type-eslint":"","file-type-f-sharp":"","file-type-firebase":"","file-type-geckodriver":"","file-type-git-meta":"","file-type-go":"","file-type-godot":"","file-type-grails":"","file-type-graphql":"","file-type-groovy":"","file-type-grunt":"","file-type-gulp":"","file-type-haml":"","file-type-handlebars":"","file-type-haskell":"","file-type-ionic":"","file-type-java":"","file-type-javascript":"","file-type-julia":"","file-type-jupyter":"","file-type-karma":"","file-type-kotlin":"","file-type-latex":"","file-type-liquid":"","file-type-maven":"","file-type-mustache":"","file-type-npm":"","file-type-nunjucks":"","file-type-ocaml":"","file-type-odata":"","file-type-pdf":"","file-type-perl":"","file-type-platformio":"","file-type-powershell":"","file-type-prettier":"","file-type-prisma":"","file-type-prolog":"","file-type-puppet":"","file-type-python":"","file-type-reason":"","file-type-rescript":"","file-type-rollup":"","file-type-rust":"","file-type-sass":"","file-type-sbt":"","file-type-scala":"","file-type-slim":"","file-type-stylus":"","file-type-sublime":"","file-type-svelte":"","file-type-swift":"","file-type-terraform":"","file-type-typescript":"","file-type-vala":"","file-type-vite":"","file-type-vsc":"","file-type-vue":"","file-type-web-assembly":"","file-type-webpack":"","file-type-windows":"","file-type-yarn":"","file-type-zig":"","file-zip":"",files:"","film-reel":"","film-strip":"",filter:"",flag:"","flag-hill":"",flame:"",flask:"","flask-slash-circle":"","floppy-disc":"","focus-window":"","fold-dashed":"",folder:"","folder-active":"","folder-arrow-right-up":"","folder-check":"","folder-dashed":"","folder-library":"","folder-open":"","folder-opened":"","folder-plus":"",folders:"",fork:"",funnel:"","funnel-simple":"","game-controller":"","game-controller-retro":"",gauge:"",gear:"",gem:"",gift:"","git-branch":"","git-commit":"","git-commit-horizontal":"","git-compare":"","git-fetch":"","git-fork":"","git-merge":"","git-pull":"","git-pull-request":"","git-pull-request-closed":"","git-pull-request-create":"","git-pull-request-done":"","git-pull-request-draft":"","git-push":"",github:"","github-actions":"",globe:"","graduation-cap":"",graph:"","graph-line":"","graph-scatter":"",grid:"","grid-plus":"","grid-sparkle":"",gripper:"",hamburger:"",hammer:"",hash:"",hat:"",headphones:"",headset:"",heart:"",hexagon:"",history:"",home:"",hourglass:"",house:"","i-circle":"",image:"","image-square":"",inbox:"",infinity:"",info:"",inspect:"",issue:"","issue-closed":"","issue-draft":"",issues:"",joystick:"",json:"","kebab-horizontal":"","kebab-vertical":"",key:"",keyboard:"","keyboard-tab":"",laptop:"",layers:"","layout-dialog":"","layout-empty":"","layout-floating-window":"","layout-panel-bottom":"","layout-panel-bottom-dock":"","layout-panel-bottom-on":"","layout-panel-bottom-undock":"","layout-panel-off":"","layout-sidebar-left":"","layout-sidebar-left-dock":"","layout-sidebar-left-off":"","layout-sidebar-left-on":"","layout-sidebar-left-undock":"","layout-sidebar-right":"","layout-sidebar-right-dock":"","layout-sidebar-right-off":"","layout-sidebar-right-on":"","layout-sidebar-right-undock":"","layout-split-horizontal":"","layout-split-horizontal-dashed":"","layout-split-horizontal-right-dock":"","layout-split-horizontal-right-undock":"","layout-split-vertical":"",leaf:"",lego:"",library:"",lightbulb:"","lightbulb-sparkle":"",lightning:"",link:"","link-external":"","list-bullets":"","list-checks":"","list-filter":"","list-ordered":"","list-todo":"","list-todo-subtask":"","list-x":"",loading:"",location:"",lock:"","lock-locked":"","lock-unlocked":"","logo-azure":"","logo-azure-devops":"","logo-figma":"","logo-github":"","logo-gitlab":"","logo-jira":"","logo-linear":"","logo-markdown":"","logo-mcp":"","logo-microsoft-teams":"","logo-notion":"","logo-python":"","logo-sentry":"","logo-slack":"","logo-vscode":"","logo-vscode-insiders":"","logo-x":"","mac-mini":"","magic-wand":"",magnet:"","magnifying-glass":"","magnifying-glass-fuzzy":"","magnifying-glass-minus":"","magnifying-glass-plus":"","magnifying-glass-slash-circle":"","magnifying-glass-sparkle":"",magnifyingGlass:"","magnifyingGlass-minus":"","magnifyingGlass-plus":"","magnifyingGlass-slash-circle":"",mail:"",map:"","map-pin":"","mark-github":"",markdown:"","mask-happy":"","masks-happy":"",mcp:"",megaphone:"",mention:"",menu:"",merge:"",mic:"",microscope:"",minus:"","minus-circle":"","minus-small":"",mobile:"",moon:"","moon-sparkle":"","moon-z":"",more:"",music:"",mute:"","new-file":"","new-folder":"",newspaper:"",note:"","one-circle":"",organization:"","organization-filled":"",owl:"",package:"","package-zipper":"","paint-roller":"",palette:"",paperclip:"",paperplane:"",paragraph:"",pass:"",pause:"","pause-circle":"",paw:"","pen-nib":"",pencil:"","pencil-square":"",pentagon:"",people:"","people-3":"",percent:"",person:"","person-add":"","person-chat-bubble":"","person-circle":"","person-follow":"","person-plus":"",piano:"","pie-chart":"",pilcrow:"",pin:"","pin-slash":"",pipe:"",plan:"",plane:"",play:"","play-bug":"","play-circle":"","play-slow":"","play-super-fast":"","playback-loop":"","plays-bug":"",plug:"","plug-slash":"",plus:"","plus-circle":"","plus-minus":"","pointer-arrow":"",pug:"",pulse:"","puzzle-piece":"",question:"","question-circle":"",quote:"",radar:"","radio-tower":"","rect-magnifying-glass":"","rect-magnifyingGlass":"",redo:"",refresh:"",regex:"","remote-control":"",remove:"","remove-close":"",replace:"","replace-all":"",report:"",return:"",review:"",robot:"",rocket:"","rocking-chair":"",rss:"",ruler:"",rules:"",run:"",satellite:"",scales:"",seal:"","seal-check":"","seal-question":"",search:"","search-stop":"",send:"",server:"",servers:"",settings:"","settings-gear":"","shapes-square-circle":"",share:"",shield:"","shield-check":"","shield-question":"","shield-x":"","shoe-fast":"","shopping-bag":"","shopping-basket":"",signal:"",skills:"","skills-capability":"","slash-circle":"",sliders:"",smartwatch:"","smiley-happy":"","smiley-happy-square":"","smiley-neutral":"","smiley-plus":"","smiley-sad":"",snowflake:"","soccer-ball":"","sort-ascending":"","sort-descending":"","source-control":"",sparkle:"",sparkles:"","speaker-hifi":"","speaker-waves":"","speaker-x":"",spinner:"",split:"","split-horizontal":"","split-vertical":"",sprint:"",square:"","square-dashed":"","square-dot":"",squares:"","squares-minus":"","squares-plus":"","squares-x":"",stack:"",star:"","star-empty":"","star-full":"","status-done":"","status-draft":"","status-needs-attention":"",stop:"","stop-circle":"",stopwatch:"",storefront:"",sun:"",swatches:"","symbol-folder":"",sync:"","t-shirt":"",table:"",tabs:"",tag:"","tags-chevron-down":"","tags-chevron-left":"","tags-chevron-right":"","tags-chevron-up":"",target:"",terminal:"","terminal-rectangle":"","text-aa":"","text-ab":"","text-b":"","text-c":"","text-d":"","text-italic":"","text-j":"","text-r":"","text-s":"","text-strikethrough":"","text-t":"","text-t-square":"","text-tt":"","text-y":"","thinking-high":"","thinking-low":"","thinking-medium":"","threads-parallel":"","threads-single":"","three-bars":"","thumbs-down":"","thumbs-up":"",thumbsdown:"",thumbsup:"","traffic-cone":"",trafficCone:"",trash:"",trashcan:"",tray:"","treasure-chest":"","trending-down":"","trending-up":"","triangle-small-down":"","triangle-small-left":"","triangle-small-right":"","triangle-small-up":"",twig:"","unfold-dashed":"",unlock:"",unmute:"",unverified:"",vault:"",verified:"",versions:"","video-camera":"",vm:"",vr:"","vr-headset":"","vr-headset-head":"",wallet:"",wand:"",warning:"",watch:"",waveform:"","whole-word":"",window:"","window-pointer-arrow":"",windows:"",wrench:"",x:"","x-circle":"",yarn:"",zap:"",zipper:"","zoom-in":"","zoom-out":"",zzz:""};function nP(e,t="outline"){return t==="filled"?tP[e]:eP[e]}const rP=new Set(["ui-progress-spin","cursor-icon-spin"]);function iP(e){if(!(!e||typeof CSSAnimation>"u"))for(const t of e.getAnimations({subtree:!0}))t instanceof CSSAnimation&&rP.has(t.animationName)&&(t.startTime=0)}const Cy=k.createContext(void 0);function _s({iconSize:e,iconButtonSize:t,iconButtonSubtleHover:n,buttonSize:r,buttonVariant:s,menuSize:a,disabled:l,children:c}){const p=k.useContext(Cy),f=k.useMemo(()=>({iconSize:e??p?.iconSize,iconButtonSize:t??p?.iconButtonSize,iconButtonSubtleHover:n??p?.iconButtonSubtleHover,buttonSize:r??p?.buttonSize,buttonVariant:s??p?.buttonVariant,menuSize:a??p?.menuSize,disabled:l??p?.disabled}),[r,s,l,t,n,e,a,p]);return v.jsx(Cy.Provider,{value:f,children:c})}function Dl(){return k.useContext(Cy)}const sP="sm",Wt={base:{kKX8nH:"ui-1j61x8r",k63SB2:"ui-etm3q0",kGuDYH:"ui-1tachi3",kMv6JI:"ui-1qt6sjn",kLWn49:"ui-o5v014",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kMwMTN:"ui-1heor9g",kzqmXN:"ui-1oai4fc",kZKoxP:"ui-higkf7",kXLuUW:"ui-xymvpz",kMnn75:"ui-krqix3",kJwUce:"ui-1403hyl",k9WMMc:"ui-2b8uid",kP9fke:"ui-6mezaz",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",kfSwDN:"ui-87ps6o",kO7zv1:"ui-1winvzj","--icon-size":"ui-1u4itkb","--icon-weight":"ui-1q5xvfy",kgeoSG:"ui-1yj7g93",$$css:!0},noPresetSize:{$$css:!0},sizeXs:{"--icon-size":"ui-aiyo0p",$$css:!0},sizeSm:{"--icon-size":"ui-1u4itkb",$$css:!0},sizeBase:{"--icon-size":"ui-xfpx3u",$$css:!0},sizeLg:{"--icon-size":"ui-1qxde8p",$$css:!0},sizeXl:{"--icon-size":"ui-dyy2ci",$$css:!0},size2xl:{"--icon-size":"ui-7lg4th",$$css:!0},noColor:{$$css:!0},colorPrimary:{kMwMTN:"ui-1nqczng",$$css:!0},colorSecondary:{kMwMTN:"ui-1mh7f6w",$$css:!0},colorTertiary:{kMwMTN:"ui-1lbmi28",$$css:!0},colorQuaternary:{kMwMTN:"ui-1qh17o",$$css:!0},colorGitAdded:{kMwMTN:"ui-15wwr8d",$$css:!0},colorGitModified:{kMwMTN:"ui-eedwss",$$css:!0},colorGitRemoved:{kMwMTN:"ui-fowoju",$$css:!0},colorGitUntracked:{kMwMTN:"ui-1p7vtww",$$css:!0},colorCyan:{kMwMTN:"ui-1rbygr4",$$css:!0},colorBlue:{kMwMTN:"ui-101qeuz",$$css:!0},colorRed:{kMwMTN:"ui-ku4wcm",$$css:!0},colorGreen:{kMwMTN:"ui-p6nzhx",$$css:!0},colorYellow:{kMwMTN:"ui-1hn9r2r",$$css:!0},colorMagenta:{kMwMTN:"ui-pwp9en",$$css:!0},colorOrange:{kMwMTN:"ui-4qtrdv",$$css:!0},colorPurple:{kMwMTN:"ui-1b0hn6l",$$css:!0},colorAccent:{kMwMTN:"ui-scuw3h",$$css:!0},colorBrand:{kMwMTN:"ui-v3vxec",$$css:!0},noModifier:{$$css:!0},modifierSpin:{kKVMdj:"ui-138fvbv",k44tkh:"ui-lmf4m6",kyAemX:"ui-1esw782",ko0y90:"ui-a4qsjk",$$css:!0},modifierDisabled:{kSiTet:"ui-ti2d7y",$$css:!0},modifierHidden:{k33iCy:"ui-lshs6z",$$css:!0},capTrim:{kQypYc:"ui-14ymb62",$$css:!0}};function oP(e,t,n){return[Wt.base,aP(e),lP(t),uP(n)]}function aP(e){if(typeof e=="number")return Wt.noPresetSize;switch(e){case"xs":return Wt.sizeXs;case"sm":return Wt.sizeSm;case"base":return Wt.sizeBase;case"lg":return Wt.sizeLg;case"xl":return Wt.sizeXl;case"2xl":return Wt.size2xl}}function lP(e){switch(e){case"primary":return Wt.colorPrimary;case"secondary":return Wt.colorSecondary;case"tertiary":return Wt.colorTertiary;case"quaternary":return Wt.colorQuaternary;case"git-added":return Wt.colorGitAdded;case"git-modified":return Wt.colorGitModified;case"git-removed":return Wt.colorGitRemoved;case"git-untracked":return Wt.colorGitUntracked;case"cyan":return Wt.colorCyan;case"blue":return Wt.colorBlue;case"red":return Wt.colorRed;case"green":return Wt.colorGreen;case"yellow":return Wt.colorYellow;case"magenta":return Wt.colorMagenta;case"orange":return Wt.colorOrange;case"purple":return Wt.colorPurple;case"accent":return Wt.colorAccent;case"brand":return Wt.colorBrand;case void 0:return Wt.noColor}}function uP(e){switch(e){case"spin":return Wt.modifierSpin;case"disabled":return Wt.modifierDisabled;case"hidden":return Wt.modifierHidden;case void 0:return Wt.noModifier}}function Mn({name:e,modifier:t,syncSpin:n=!0,variant:r="outline",size:s,color:a,capTrim:l=!1,className:c,rootStyle:p,style:f,title:h,"aria-label":m,"aria-hidden":g,ref:b}){const x=Dl(),w=k.useCallback(A=>{typeof b=="function"?b(A):b&&(b.current=A),A&&t==="spin"&&n&&iP(A)},[b,t,n]),_=s??x?.iconSize??sP,E=typeof _=="number",R=nP(e,r),T={...R?{"--cursor-icon-content":`"${R}"`}:{},...E?{"--icon-size":`${_}px`}:{},...f},C=Rn({rootClass:"ui-icon",stylexStyles:[oP(_,a,t),l&&Wt.capTrim,p],className:_n("cursor-icon",c),style:T});return v.jsx("i",{ref:w,className:C.className,"data-icon-name":e,"data-size":E?void 0:_,"data-color":a,style:C.style,title:h??m,"aria-hidden":g??(m?void 0:!0)})}const cP=k.createContext({root:null});function zl(){return k.useContext(cP).root}const fP={dropdown:"--ui-portal-layer-z-index-dropdown",tooltip:"--ui-portal-layer-z-index-tooltip",modal:"--ui-portal-layer-z-index-modal",popover:"--ui-portal-layer-z-index-popover"},dP={},pP=3e3,hP=10;let w1=pP;function mP(){const e=w1;return w1+=hP,{zIndex:e,release:()=>{}}}const gP=k.createContext(null);function bP(){return k.useContext(gP)}function Hc(e,t){const n=bP(),[r,s]=k.useState(null);k.useLayoutEffect(()=>{if(!t){s(null);return}const l=n?.claimZIndex()??mP();return s(l.zIndex),()=>{l.release()}},[t,n]);const a=k.useMemo(()=>r===null?dP:{[fP[e]]:String(r)},[r,e]);return k.useMemo(()=>({zIndex:r,portalLayerStyles:a}),[r,a])}const fC=k.forwardRef(function(t,n){const{render:r,className:s,disabled:a=!1,focusableWhenDisabled:l=!1,nativeButton:c=!0,style:p,...f}=t,{getButtonProps:h,buttonRef:m}=Pc({disabled:a,focusableWhenDisabled:l,native:c});return wn("button",t,{state:{disabled:a},ref:[n,m],props:[f,h]})}),Ju={appearance:{kWkggS:"ui-elcf9h ui-g74ub2 ui-rtw4ju ui-sb1tfo",kMwMTN:"ui-gl2jp8 ui-qfdz8i",ku685b:"ui-1ccstgr",k1ekBW:"ui-fvdr79",kIyJzY:"ui-2krxs4 ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},press:{k3aq6I:"ui-3oybdh ui-e60hhf ui-uupxpy",k3nNDw:"ui-1g0ag68",k6sLGO:"ui-1so62im",$$css:!0},colors:{"--ui-button-bg":"ui-111vzy2 ui-t5wej4 ui-1sjyo5b ui-qonjy5 ui-10044h7 ui-1drs4uv ui-13jyg4j ui-1j69ez6 ui-302ab4 ui-g2i9b0 ui-r4lqou ui-pao5x2 ui-1ro2ofv ui-30b146","--ui-button-bg-hover":"ui-10ckxxq ui-oscw6f ui-8d82ot ui-mos3b0 ui-1t8wa0f ui-lqo1w6 ui-2wqsua ui-qk0cz2 ui-1kvkcw9 ui-1m41tzx ui-1mteyat ui-jlo7vo ui-177gn09 ui-16088v2","--ui-button-fg":"ui-18rr0f6 ui-1o44y6p ui-i60mju ui-ikqzok ui-rwu1v7 ui-1vzhgcd ui-6tdgcd ui-11yajtv ui-1q0um21 ui-ad8cx6","--ui-button-fg-hover":"ui-nas032 ui-kadu3d ui-11ldjh5 ui-13zxv71 ui-qrgd1v ui-1b2v7cv ui-woi75s ui-1f4h542 ui-1t883ao ui-1hodyhg",$$css:!0}},yP={root:{kGuDYH:"ui-y5h43f",kLWn49:"ui-19ji09o",kb6lSQ:"ui-t1j8c4",$$css:!0}},po={root:{kGuDYH:"ui-1wm8ruf",kLWn49:"ui-spwq11",kb6lSQ:"ui-14s4slr",$$css:!0}},Fi={root:{kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-vu1jfw",$$css:!0}},dC={root:{kGuDYH:"ui-fc7y3v",kLWn49:"ui-1yxxptd",kb6lSQ:"ui-1bignsj",$$css:!0}},vP={root:{kGuDYH:"ui-19d36u7",kLWn49:"ui-dod15v",kb6lSQ:"ui-k22nv0",$$css:!0}},kP={root:{kGuDYH:"ui-wsyq91",kLWn49:"ui-19v9tvf",kb6lSQ:"ui-1h56xvc",$$css:!0}},xP={root:{kGuDYH:"ui-1i1m3gp",kLWn49:"ui-eqr9p9",kb6lSQ:"ui-qhv51x",$$css:!0}},jl={root:{kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",$$css:!0}},qv={root:{khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0}},Za={root:{kB7OPa:"ui-9f619",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kOIVth:"ui-11twubx",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",kLWn49:"ui-15bjb6t",k63SB2:"ui-20ajya",khDVqt:"ui-uxw1ft",kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kVAM5u:"ui-9r1u3d ui-e9wtb7","--ui-button-bg":"ui-1gwrc9l ui-y7d307 ui-1luhpj5 ui-14iu9ww","--ui-button-bg-hover":"ui-s16ggv ui-nywj2b ui-hqa6pe ui-e032zu","--ui-button-fg":"ui-1j06k8m ui-qalphj ui-qcpbnv ui-ub8mre ui-alrmhx","--ui-button-fg-hover":"ui-1zbqel ui-1w2jsj1 ui-dwlvx9 ui-1389b1p ui-13ie2ji","--ui-md-state-color":"ui-1w18epr",kkrTdU:"ui-1ypdohk ui-1j1ks5o",kfSwDN:"ui-87ps6o",kFalU9:"ui-ggy1nq",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",kSiTet:"ui-1hc1fzr ui-1szrgyu",kfzvcC:"ui-67bb7w ui-7gqb9v",k9WMMc:"ui-2b8uid",$$css:!0},alignLeft:{kjj79g:"ui-1nhvcw1",$$css:!0},fullWidth:{kzqmXN:"ui-h8yej3",$$css:!0},revealRowActive:{k1xSpc:"ui-1s85apg ui-i8sxwt ui-14aajud",kmuXW:"ui-2lah0s",$$css:!0},frameContent:{kE3dHu:"ui-1uhho1l",kpe85a:"ui-1xpa7k",$$css:!0},shapePill:{kaIpWk:"ui-1i4c3av",$$css:!0}},SP={xs:{kZKoxP:"ui-1vatr1o",kLKAdn:"ui-exx8yu",kpe85a:"ui-g31tg3",kGO01o:"ui-18d9i69",kE3dHu:"ui-43mhey",kaIpWk:"ui-1e1y6u3",kOIVth:"ui-xhr3t",$$css:!0},sm:{kZKoxP:"ui-1a6rlst",kLKAdn:"ui-exx8yu",kpe85a:"ui-g31tg3",kGO01o:"ui-18d9i69",kE3dHu:"ui-43mhey",kaIpWk:"ui-1e1y6u3",$$css:!0},md:{kZKoxP:"ui-1e94bgo",kLKAdn:"ui-exx8yu",kpe85a:"ui-17v7654",kGO01o:"ui-18d9i69",kE3dHu:"ui-1lfpczk",kaIpWk:"ui-1043rbw",kOIVth:"ui-11twubx",$$css:!0},lg:{kZKoxP:"ui-170hpbr",kLKAdn:"ui-exx8yu",kpe85a:"ui-1yxiud8",kGO01o:"ui-18d9i69",kE3dHu:"ui-yab65l",kaIpWk:"ui-1043rbw",kOIVth:"ui-pkkfsy",$$css:!0},xl:{kZKoxP:"ui-t8t6p",kLKAdn:"ui-exx8yu",kpe85a:"ui-16b7oty",kGO01o:"ui-18d9i69",kE3dHu:"ui-o7x2bt",kaIpWk:"ui-1043rbw",$$css:!0}},wP={xs:{kLKAdn:"ui-exx8yu",kpe85a:"ui-1yxiud8",kGO01o:"ui-18d9i69",kE3dHu:"ui-yab65l",$$css:!0},sm:{kLKAdn:"ui-exx8yu",kpe85a:"ui-1yxiud8",kGO01o:"ui-18d9i69",kE3dHu:"ui-yab65l",$$css:!0},md:{kLKAdn:"ui-exx8yu",kpe85a:"ui-16b7oty",kGO01o:"ui-18d9i69",kE3dHu:"ui-o7x2bt",$$css:!0},lg:{kLKAdn:"ui-exx8yu",kpe85a:"ui-1jkygx",kGO01o:"ui-18d9i69",kE3dHu:"ui-1o7kk3e",$$css:!0},xl:{kLKAdn:"ui-exx8yu",kpe85a:"ui-1yraood",kGO01o:"ui-18d9i69",kE3dHu:"ui-1jpuwqu",$$css:!0}},E1={labelGroup:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",$$css:!0},kbs:{kMv6JI:"ui-y1aii3",k63SB2:"ui-20ajya",kSiTet:"ui-byyjgo ui-s6mkfk",$$css:!0}},li={root:Za.root,fontSmoothing:qv.root,align:{center:null,left:Za.alignLeft},fullWidth:Za.fullWidth,reveal:{always:null,rowActive:Za.revealRowActive},frame:{container:null,content:Za.frameContent},shape:{rounded:null,pill:Za.shapePill},size:SP,pillSize:wP,typography:{xs:po.root,sm:Fi.root,md:Fi.root,lg:Fi.root,xl:dC.root},labelGroup:E1.labelGroup,kbs:[po.root,E1.kbs]},EP="md",TP="primary",_P="neutral",RP={xs:"sm",sm:"base",md:"sm",lg:"sm",xl:"lg"},CP={primary:TP,secondary:_P,text:"default"};function Ln({variant:e,color:t,size:n,shape:r="rounded",frame:s="container",reveal:a="always",align:l,fullWidth:c=!1,disabled:p,children:f,kbs:h,className:m,style:g,rootStyle:b,...x}){const w=Dl(),_=e??w?.buttonVariant??"tint",E=n??w?.buttonSize??EP,R=p??w?.disabled,T=t??CP[_],C=dn(li.root,li.fontSmoothing,Ju.appearance,(_==="primary"||_==="secondary")&&Ju.colors,li.size[E],li.typography[E],li.align[l??"center"],c&&li.fullWidth,li.reveal[a],li.shape[r],r==="pill"&&li.pillSize[E],li.frame[s],b,{"ui--default-marker":"ui--default-marker",$$css:!0});let A=f;if(h!=null){const N=dn(li.labelGroup),I=dn(li.kbs);A=v.jsxs("span",{className:_n("ui-button__label-group",N.className),style:N.style,children:[f,v.jsx("span",{className:_n("ui-button__kbs",I.className),style:I.style,children:h})]})}return v.jsx(fC,{...x,className:_n("ui-button",C.className,m),style:{...C.style,...g},"data-variant":_,"data-size":E,"data-shape":r!=="rounded"?r:void 0,"data-frame":s!=="container"?s:void 0,"data-color":T,"data-align":l==="left"?l:void 0,"data-full-width":c||void 0,"data-reveal":a!=="always"?a:void 0,disabled:R,children:v.jsx(_s,{iconSize:RP[E],children:A})})}function Gc(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function mc({controlled:e,default:t,name:n,state:r="value"}){const{current:s}=k.useRef(e!==void 0),[a,l]=k.useState(t),c=s?e:a,p=k.useCallback(f=>{s||l(f)},[]);return[c,p]}let T1=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({}),_1=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const AP={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Zu={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},NP={disabled:!1,...Zu},Vc={valid(e){return e===null?null:e?{[_1.valid]:""}:{[_1.invalid]:""}}};function OP(e){return k.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[T1.checked]:""}:{[T1.unchecked]:""}},...Vc}),[e.indeterminate])}const MP=k.createContext({invalid:void 0,name:void 0,validityData:{state:AP,errors:[],error:"",value:"",initialValue:null},setValidityData:ar,disabled:void 0,touched:Zu.touched,setTouched:ar,dirty:Zu.dirty,setDirty:ar,filled:Zu.filled,setFilled:ar,focused:Zu.focused,setFocused:ar,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:NP,markedDirtyRef:{current:!1},registerFieldControl:ar,validation:{getValidationProps:(e=hr)=>e,getInputValidationProps:(e=hr)=>e,inputRef:{current:null},commit:async()=>{}}});function Kc(e=!0){const t=k.useContext(MP);if(t.setValidityData===ar&&!e)throw new Error(Jn(28));return t}function pC(e,t){const{enabled:n=!0,getValue:r,id:s,value:a}=t,{registerFieldControl:l}=Kc(),c=k.useRef(null);c.current||(c.current=Symbol()),He(()=>{const p=c.current;if(!(!p||!n))return l(p,{controlRef:e,getValue:r,id:s,value:a}),()=>{l(p,void 0)}},[e,n,r,s,l,a])}const IP=k.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:ar,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function DP(){return k.useContext(IP)}const zP=k.createContext({controlId:void 0,registerControlId:ar,labelId:void 0,setLabelId:ar,messageIds:[],setMessageIds:ar,getDescriptionProps:e=>e});function Hv(){return k.useContext(zP)}const jP=k.createContext(void 0);function LP(){const e=k.useContext(jP);if(e===void 0)throw new Error(Jn(14));return e}const PP=k.forwardRef(function(t,n){const{render:r,className:s,style:a,keepMounted:l=!1,...c}=t,p=LP(),f=p.checked||p.indeterminate,{mounted:h,transitionStatus:m,setMounted:g}=Fc(f),b=k.useRef(null),x={...p,transitionStatus:m};aa({open:f,ref:b,onComplete(){f||g(!1)}});const w=OP(p),_=k.useMemo(()=>({...w,...oa,...Vc}),[w]),E=l||h,R=wn("span",t,{ref:[n,b],state:x,stateAttributesMapping:_,props:c});return E?R:null}),$P="md",R1={root:{kVAEAm:"ui-1n2onr6",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kB7OPa:"ui-9f619",kMeerF:"ui-1k57tk5 ui-1gv1zob",k3XXqK:"ui-1t137rt ui-1rsevuf",kjBf7l:"ui-1uczgqu ui-14qs42y",kInvED:"ui-1wfwxd8 ui-1i57s2w",kSiTet:"ui-1hc1fzr ui-1goyyu5",kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kaIpWk:"ui-12oqio5",kMwMTN:"ui-1lriclw",kWkggS:"ui-i07v4r ui-190xqy7",kVAM5u:"ui-1tjqsyf ui-14ytyh1",k3aq6I:"ui-3oybdh ui-78fr0e",k3nNDw:"ui-1g0ag68",k1ekBW:"ui-1lxufdw",kIyJzY:"ui-2krxs4 ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},sm:{kzqmXN:"ui-2s4hoy",kZKoxP:"ui-px1j5t",$$css:!0},md:{kzqmXN:"ui-ek66a6",kZKoxP:"ui-1q5geii",$$css:!0},lg:{kzqmXN:"ui-1xx3ewh",kZKoxP:"ui-14dyci",$$css:!0}},BP={primary:{"--ui-checkbox-bg":"ui-x0sf4j","--ui-checkbox-border":"ui-14p436a","--ui-checkbox-glyph":"ui-1d5945d",$$css:!0},green:{"--ui-checkbox-bg":"ui-1g72fie","--ui-checkbox-border":"ui-165ap9x","--ui-checkbox-glyph":"ui-1d5945d",$$css:!0},neutral:{"--ui-checkbox-bg":"ui-1rpsy8r","--ui-checkbox-border":"ui-mtpsoh","--ui-checkbox-glyph":"ui-qnctk6",$$css:!0}},FP={sm:9,md:10,lg:11},C1={"--icon-weight":"700"};function UP({indeterminate:e,interactive:t,size:n,variant:r}){const s=dn(R1.root,R1[n],BP[r]),a={className:"ui-10l6tqk ui-10a8y8t ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1g0ag68 ui-n9if97 ui-7pq1vu ui-sagj69 ui-6ekqhr ui-g01cxk ui-hhdk15 ui-nyzrob ui-h98lc ui-1nrvvgt ui-cntms"},l=FP[n];return v.jsx("span",{"aria-hidden":"true",className:_n("ui-checkbox__box",s.className),style:s.style,children:t?v.jsx(PP,{className:_n("ui-checkbox__icon",a.className),keepMounted:!0,render:(c,p)=>v.jsx("span",{...c,children:v.jsx(Mn,{name:p.indeterminate?"minus":"check",size:l,style:C1})}),style:a.style}):v.jsx("span",{className:_n("ui-checkbox__icon",a.className),style:a.style,children:v.jsx(Mn,{name:e?"minus":"check",size:l,style:C1})})})}function hC({checked:e,disabled:t,indeterminate:n=!1,size:r=$P,variant:s="primary"}){const a={className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1c4vz4f ui-2lah0s ui-dl72j9 ui-xymvpz ui-47corl ui--default-marker"};return v.jsx("span",{"aria-hidden":"true",className:_n("ui-checkbox",a.className),style:a.style,"data-component":"checkbox","data-size":r,"data-variant":s,"data-checked":e||void 0,"data-disabled":t||void 0,"data-indeterminate":n||void 0,children:v.jsx(UP,{indeterminate:n,interactive:!1,size:r,variant:s})})}function qP(e){const{open:t,defaultOpen:n,onOpenChange:r,disabled:s}=e,a=t!==void 0,[l,c]=mc({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:p,setMounted:f,transitionStatus:h}=Fc(l,!0,!0),[m,g]=k.useState(l),[{height:b,width:x},w]=k.useState({height:void 0,width:void 0}),_=yh(),[E,R]=k.useState(),T=E??_,[C,A]=k.useState(!1),[N,I]=k.useState(!1),F=k.useRef(null),V=k.useRef(null),j=k.useRef(null),q=k.useRef(null),Z=tC(q,!1),B=Ke(z=>{const L=!l,H=Rt(yl,z.nativeEvent);if(r(L,H),H.isCanceled)return;const U=q.current;V.current==="css-animation"&&U!=null&&U.style.removeProperty("animation-name"),!C&&!N&&(V.current!=null&&V.current!=="css-animation"&&!p&&L&&f(!0),V.current==="css-animation"&&(!m&&L&&g(!0),!p&&L&&f(!0))),c(L),V.current==="none"&&p&&!L&&f(!1)});return He(()=>{a&&V.current==="none"&&!l&&f(!1)},[a,l,t,f]),k.useMemo(()=>({abortControllerRef:F,animationTypeRef:V,disabled:s,handleTrigger:B,height:b,mounted:p,open:l,panelId:T,panelRef:q,runOnceAnimationsFinish:Z,setDimensions:w,setHiddenUntilFound:A,setKeepMounted:I,setMounted:f,setOpen:c,setPanelIdState:R,setVisible:g,transitionDimensionRef:j,transitionStatus:h,visible:m,width:x}),[F,V,s,B,b,p,l,T,q,Z,w,A,I,f,c,g,j,h,m,x])}const mC=k.createContext(void 0);function gC(){const e=k.useContext(mC);if(e===void 0)throw new Error(Jn(15));return e}let ec=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Xo.startingStyle]="startingStyle",e[e.endingStyle=Xo.endingStyle]="endingStyle",e})({}),HP=(function(e){return e.panelOpen="data-panel-open",e})({});const GP={[ec.open]:""},VP={[ec.closed]:""},KP={open(e){return e?{[HP.panelOpen]:""}:null}},ZP={open(e){return e?GP:VP}},bC={...ZP,...oa},WP=k.forwardRef(function(t,n){const{render:r,className:s,defaultOpen:a=!1,disabled:l=!1,onOpenChange:c,open:p,style:f,...h}=t,m=Ke(c),g=qP({open:p,defaultOpen:a,onOpenChange:m,disabled:l}),b=k.useMemo(()=>({open:g.open,disabled:g.disabled,transitionStatus:g.transitionStatus}),[g.open,g.disabled,g.transitionStatus]),x=k.useMemo(()=>({...g,onOpenChange:m,state:b}),[g,m,b]),w=wn("div",t,{state:b,ref:n,props:h,stateAttributesMapping:bC});return v.jsx(mC.Provider,{value:x,children:w})}),YP={...KP,...oa},A1=k.forwardRef(function(t,n){const{panelId:r,open:s,handleTrigger:a,state:l,disabled:c}=gC(),{className:p,disabled:f=c,id:h,render:m,nativeButton:g=!0,style:b,...x}=t,{getButtonProps:w,buttonRef:_}=Pc({disabled:f,focusableWhenDisabled:!0,native:g}),E=k.useMemo(()=>({"aria-controls":s?r:void 0,"aria-expanded":s,onClick:a}),[r,s,a]);return wn("button",t,{state:l,ref:[n,_],props:[E,x,w],stateAttributesMapping:YP})});let XP=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function QP(e){const{abortControllerRef:t,animationTypeRef:n,externalRef:r,height:s,hiddenUntilFound:a,keepMounted:l,id:c,mounted:p,onOpenChange:f,open:h,panelRef:m,runOnceAnimationsFinish:g,setDimensions:b,setMounted:x,setOpen:w,setVisible:_,transitionDimensionRef:E,visible:R,width:T}=e,C=k.useRef(!1),A=k.useRef(null),N=k.useRef(h),I=k.useRef(h),F=$c(),V=k.useMemo(()=>n.current==="css-animation"?!R:!h&&!p,[h,p,R,n]),j=Ke(Z=>{if(!Z)return;if(n.current==null||E.current==null){const L=getComputedStyle(Z),H=L.animationName!=="none"&&L.animationName!=="",U=L.transitionDuration!=="0s"&&L.transitionDuration!=="";H&&U||(L.animationName==="none"&&L.transitionDuration!=="0s"?n.current="css-transition":L.animationName!=="none"&&L.transitionDuration==="0s"?n.current="css-animation":n.current="none"),Z.getAttribute(XP.orientation)==="horizontal"||L.transitionProperty.indexOf("width")>-1?E.current="width":E.current="height"}if(n.current!=="css-transition")return;(s===void 0||T===void 0)&&(b({height:Z.scrollHeight,width:Z.scrollWidth}),I.current&&Z.style.setProperty("transition-duration","0s"));let B=-1,z=-1;return B=On.request(()=>{I.current=!1,z=On.request(()=>{setTimeout(()=>{Z.style.removeProperty("transition-duration")})})}),()=>{On.cancel(B),On.cancel(z)}}),q=xs(r,m,j);return He(()=>{if(n.current!=="css-transition")return;const Z=m.current;if(!Z)return;let B=-1;if(t.current!=null&&(t.current.abort(),t.current=null),h){const z={"justify-content":Z.style.justifyContent,"align-items":Z.style.alignItems,"align-content":Z.style.alignContent,"justify-items":Z.style.justifyItems};Object.keys(z).forEach(L=>{Z.style.setProperty(L,"initial","important")}),!I.current&&!l&&Z.setAttribute(ec.startingStyle,""),b({height:Z.scrollHeight,width:Z.scrollWidth}),B=On.request(()=>{Object.entries(z).forEach(([L,H])=>{H===""?Z.style.removeProperty(L):Z.style.setProperty(L,H)})})}else{if(Z.scrollHeight===0&&Z.scrollWidth===0)return;b({height:Z.scrollHeight,width:Z.scrollWidth});const z=new AbortController;t.current=z;const L=z.signal;let H=null;const U=ec.endingStyle;return H=new MutationObserver(P=>{P.some(D=>D.type==="attributes"&&D.attributeName===U)&&(H?.disconnect(),H=null,g(()=>{b({height:0,width:0}),Z.style.removeProperty("content-visibility"),x(!1),t.current===z&&(t.current=null)},L))}),H.observe(Z,{attributes:!0,attributeFilter:[U]}),()=>{H?.disconnect(),F.cancel(),t.current===z&&(z.abort(),t.current=null)}}return()=>{On.cancel(B)}},[t,n,F,a,l,p,h,m,g,b,x]),He(()=>{if(n.current!=="css-animation")return;const Z=m.current;Z&&(A.current=Z.style.animationName||A.current,Z.style.setProperty("animation-name","none"),b({height:Z.scrollHeight,width:Z.scrollWidth}),!N.current&&!C.current&&Z.style.removeProperty("animation-name"),h?(t.current!=null&&(t.current.abort(),t.current=null),x(!0),_(!0)):(t.current=new AbortController,g(()=>{x(!1),_(!1),t.current=null},t.current.signal)))},[t,n,h,m,g,b,x,_,R]),vh(()=>{const Z=On.request(()=>{N.current=!1});return()=>On.cancel(Z)}),He(()=>{if(!a)return;const Z=m.current;if(!Z)return;let B=-1,z=-1;return h&&C.current&&(Z.style.transitionDuration="0s",b({height:Z.scrollHeight,width:Z.scrollWidth}),B=On.request(()=>{C.current=!1,z=On.request(()=>{setTimeout(()=>{Z.style.removeProperty("transition-duration")})})})),()=>{On.cancel(B),On.cancel(z)}},[a,h,m,b]),He(()=>{const Z=m.current;Z&&a&&V&&(Z.setAttribute("hidden","until-found"),n.current==="css-transition"&&Z.setAttribute(ec.startingStyle,""))},[a,V,n,m]),k.useEffect(function(){const B=m.current;if(!B)return;function z(L){C.current=!0,w(!0),f(!0,Rt(Ss,L))}return It(B,"beforematch",z)},[f,m,w]),k.useMemo(()=>({props:{hidden:V,id:c,ref:q}}),[V,c,q])}let N1=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});const JP=k.forwardRef(function(t,n){const{className:r,hiddenUntilFound:s,keepMounted:a,render:l,id:c,style:p,...f}=t,{abortControllerRef:h,animationTypeRef:m,height:g,mounted:b,onOpenChange:x,open:w,panelId:_,panelRef:E,runOnceAnimationsFinish:R,setDimensions:T,setHiddenUntilFound:C,setKeepMounted:A,setMounted:N,setPanelIdState:I,setOpen:F,setVisible:V,state:j,transitionDimensionRef:q,visible:Z,width:B,transitionStatus:z}=gC(),L=s??!1,H=a??!1;He(()=>{if(c)return I(c),()=>{I(void 0)}},[c,I]),He(()=>{C(L)},[C,L]),He(()=>{A(H)},[A,H]);const{props:U}=QP({abortControllerRef:h,animationTypeRef:m,externalRef:n,height:g,hiddenUntilFound:L,id:_,keepMounted:H,mounted:b,onOpenChange:x,open:w,panelRef:E,runOnceAnimationsFinish:R,setDimensions:T,setMounted:N,setOpen:F,setVisible:V,transitionDimensionRef:q,visible:Z,width:B});aa({open:w&&z==="idle",ref:E,onComplete(){w&&T({height:void 0,width:void 0})}});const P=k.useMemo(()=>({...j,transitionStatus:z}),[j,z]),Y=wn("div",t,{state:P,ref:[n,E],props:[U,{style:{[N1.collapsiblePanelHeight]:g===void 0?"auto":`${g}px`,[N1.collapsiblePanelWidth]:B===void 0?"auto":`${B}px`}},f],stateAttributesMapping:bC});return H||L||b?Y:null}),O1={buttonReset:{kWkggS:"ui-jbqb8w",kMzoRj:"ui-c342km",ksu8eU:"ui-ng3xce",kLKAdn:"ui-exx8yu",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",kwRFfy:"ui-yri2b",keoZOQ:"ui-dj266r",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",k71WvV:"ui-14z9mp",kMv6JI:"ui-jb2p0i",k63SB2:"ui-1pd3egz",kMwMTN:"ui-1heor9g",k9WMMc:"ui-1yc453h",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-1bqaal",kjBf7l:"ui-1uczgqu ui-1725o6r",$$css:!0},detailsButton:{ks0D6T:"ui-193iq5w",kVQacm:"ui-b3r6kr",kkrTdU:"ui-1ypdohk",kMnn75:"ui-ujl8zx",k1TLXF:"ui-r5o5jz ui-9ojkr9 ui-1e7jyuc",k1ekBW:"ui-eirdtl",kIyJzY:"ui-7pq1vu ui-6xbvzw ui-1nk6rg0",kAMwcw:"ui-1bt1wk1",kg5iWk:"ui-lyipyv",khDVqt:"ui-uxw1ft",$$css:!0}};function e$({action:e,chevronRef:t,details:n,detailsRef:r,leadingIcon:s,loading:a,shimmerDetails:l,showChevron:c,tabularNums:p,tone:f}){const h={0:{className:"ui-2lah0s ui-19aaqeu ui-1dkqrid ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1"},8:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-4b2ntj ui-1uq8sgy"},4:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1d0l12 ui-n843tq"},12:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1d0l12 ui-n843tq"},2:{className:"ui-2lah0s ui-19aaqeu ui-1dkqrid ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-ss6m8b"},10:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-4b2ntj ui-1uq8sgy ui-ss6m8b"},6:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1d0l12 ui-n843tq ui-ss6m8b"},14:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1d0l12 ui-n843tq ui-ss6m8b"},1:{className:"ui-2lah0s ui-19aaqeu ui-1dkqrid ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"},9:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-4b2ntj ui-1uq8sgy ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"},5:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1d0l12 ui-n843tq ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"},13:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1d0l12 ui-n843tq ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"},3:{className:"ui-2lah0s ui-19aaqeu ui-1dkqrid ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-ss6m8b ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"},11:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-4b2ntj ui-1uq8sgy ui-ss6m8b ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"},7:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1d0l12 ui-n843tq ui-ss6m8b ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"},15:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1d0l12 ui-n843tq ui-ss6m8b ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"}}[(f==="muted"||f==="tertiary")<<3|(f==="active")<<2|!!p<<1|!!(a&&!l)<<0],m={0:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-4b2ntj ui-qdr9cq ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1"},2:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1e4uaio ui-116yoyw"},1:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-4b2ntj ui-qdr9cq ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-ss6m8b"},3:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1e4uaio ui-116yoyw ui-ss6m8b"}}[(f==="muted")<<1|!!p<<0],g={className:"ui-2lah0s ui-1kde42o ui-1urst0s ui-4b2ntj ui-7zots3 ui-g01cxk ui-bthccv ui-7p49u4 ui-1tty4wy ui-p33vsb ui-4f0zl0 ui-93pzih ui-1bt1wk1"},b={className:"ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui-14ju556 ui-1urst0s"};return v.jsxs(v.Fragment,{children:[s!=null&&v.jsx("span",{className:_n("ui-collapsible-leading-icon",b.className),style:b.style,children:s}),v.jsx("span",{className:_n("ui-collapsible-action",h.className),style:h.style,children:e}),n&&v.jsx("span",{ref:r,className:_n("ui-collapsible-details",m.className),style:m.style,children:n}),c&&v.jsx(Mn,{ref:t,name:"chevron-right",className:_n("ui-collapsible-chevron",g.className),style:g.style,size:10})]})}function Ri({action:e,details:t,onDetailsClick:n,detailsButtonStyle:r,leadingIcon:s,disabled:a=!1,expandable:l=!0,loading:c=!1,shimmerDetails:p=!0,tabularNums:f=!1,tone:h="default",children:m,headerRef:g,detailsRef:b,chevronRef:x,className:w,contentClassName:_,open:E,defaultOpen:R,onOpenChange:T,...C}){const A=n!==void 0,N=l&&A,I=E!==void 0,[F,V]=k.useState(()=>R??!1),j=I?!!E:F,q=(O,J)=>{I||V(O),T?.(O,J)},Z=A?v.jsx("button",{type:"button",...dn(O1.buttonReset,O1.detailsButton,r),disabled:a,onClick:O=>{O.stopPropagation(),n(O)},children:t}):t,B=l&&m!=null&&typeof m!="boolean",z={className:"ui-78zum5 ui-dt5ytf"},L={0:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-1k57tk5 ui-1t137rt ui--default-marker"},8:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui--default-marker"},4:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-1k57tk5 ui-1t137rt ui-1ypdohk ui--default-marker"},12:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-1ypdohk ui--default-marker"},2:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-1k57tk5 ui-1t137rt ui-byyjgo ui--default-marker"},10:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-byyjgo ui--default-marker"},6:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-1k57tk5 ui-1t137rt ui-1ypdohk ui-byyjgo ui--default-marker"},14:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-1ypdohk ui-byyjgo ui--default-marker"},1:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-1k57tk5 ui-1t137rt ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk ui--default-marker"},9:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk ui--default-marker"},5:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-1k57tk5 ui-1t137rt ui-1ypdohk ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk ui--default-marker"},13:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-1ypdohk ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk ui--default-marker"},3:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-1k57tk5 ui-1t137rt ui-byyjgo ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk ui--default-marker"},11:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-byyjgo ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk ui--default-marker"},7:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-1k57tk5 ui-1t137rt ui-1ypdohk ui-byyjgo ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk ui--default-marker"},15:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-1ypdohk ui-byyjgo ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk ui--default-marker"}}[!!(l&&!A)<<3|!!(l&&!a)<<2|!!a<<1|!!(c&&p)<<0],H={0:{className:"ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui--default-marker"},1:{className:"ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-1ypdohk ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui--default-marker"}}[!a<<0],U={className:"ui-2lah0s ui-1kde42o ui-1urst0s ui-4b2ntj ui-7zots3 ui-7p49u4 ui-1tty4wy ui-p33vsb ui-4f0zl0 ui-93pzih ui-1bt1wk1 ui-1hc1fzr"},P={className:"ui-rvj5dj ui-1kd3hbs ui-1tu4anv ui-18ke684 ui-xohm7r ui-pv8u57 ui-1qn9uv2 ui-4wkmsb ui-g3p6pi ui-1ys8gui"},Y={className:"ui-6ikm8r ui-10wlt62 ui-2lwn1j"},D={className:"ui-78zum5 ui-dt5ytf ui-1y48gol ui-1vdilah ui-1hc1fzr ui-19991ni ui-4wkmsb ui-g3p6pi ui-1bt1wk1"},$={"data-component":"collapsible-header",className:_n("ui-collapsible-header",L.className),style:L.style},G=v.jsx(e$,{action:e,chevronRef:x,details:Z,detailsRef:b,leadingIcon:s,loading:c,shimmerDetails:p,showChevron:l&&!A,tabularNums:f,tone:h});return v.jsxs(WP,{...C,open:N?j:E,defaultOpen:N?void 0:R,onOpenChange:N?q:T,disabled:a,"data-expandable":l?"":void 0,"data-loading":c?"":void 0,"data-tone":h,className:_n("ui-collapsible",z.className,w),style:z.style,children:[N?v.jsxs("div",{...$,ref:g,onClick:()=>{a||q(!j)},children:[G,v.jsx(A1,{"data-component":"collapsible-header","aria-label":typeof t=="string"?`Toggle ${t}`:"Toggle details",className:H.className,style:H.style,...B?null:{"aria-controls":void 0},onClick:O=>{a||O.stopPropagation()},children:v.jsx(Mn,{ref:x,name:"chevron-right",className:_n("ui-collapsible-chevron",U.className),style:U.style,size:10})})]}):l?v.jsx(A1,{...$,ref:g,...B?null:{"aria-controls":void 0},onClick:O=>{a||O.stopPropagation()},children:G}):v.jsx("div",{...$,ref:g,children:G}),B&&v.jsx(JP,{keepMounted:!0,className:_n("ui-collapsible-content-view",P.className),style:P.style,children:v.jsx("div",{className:Y.className,style:Y.style,children:v.jsx("div",{className:_n("ui-collapsible-content",D.className,_),style:D.style,children:m})})})]})}const t$=(e,t)=>Object.is(e,t);function Sl(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function n$(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:Sl(t,r,n))}function tc(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:Sl(r,t,n))}function r$(e,t,n){return e.filter(r=>!Sl(t,r,n))}function Ay(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function yC(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function i$(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(yC(t)){for(const n of t)for(const r of n.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function vC(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return Ay(e)}function tl(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Ay(e.value):Ay(e)}function kC(e,t,n){function r(){return vC(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){const s=t,a=yC(s)?s.flatMap(l=>l.items):s;if(e==null||typeof e!="object"){const l=a.find(c=>c.value===e);return l&&l.label!=null?l.label:r()}if("value"in e){const l=a.find(c=>c&&c.value===e.value);if(l&&l.label!=null)return l.label}}return r()}function s$(e,t,n){return e.reduce((r,s,a)=>(a>0&&r.push(", "),r.push(v.jsx(k.Fragment,{children:kC(s,t,n)},a)),r),[])}function Gv(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:s,registerControlId:a}=Hv(),l=yh(t),c=n?s:void 0,p=wr(()=>Symbol("labelable-control")),f=k.useRef(!1),h=k.useRef(t!=null),m=Ke(()=>{!f.current||a===ar||(f.current=!1,a(p.current,void 0))});return He(()=>{if(a===ar)return;let g;if(n){const b=r?.current;yt(b)&&b.closest("label")!=null?g=t??null:g=c??l}else if(t!=null)h.current=!0,g=t;else if(h.current)g=l;else{m();return}if(g===void 0){m();return}f.current=!0,a(p.current,g)},[t,r,c,a,n,l,p,m]),k.useEffect(()=>m,[m]),s??l}function o$(e,t){return e??t}const a$=k.createContext(void 0);function Vv(){return k.useContext(a$)?.direction??"ltr"}function l$(e){const t=e.getBoundingClientRect(),n=Sn(e),r=n.getComputedStyle(e,"::before"),s=n.getComputedStyle(e,"::after");if(!(r.content!=="none"||s.content!=="none"))return t;const l=parseFloat(r.width)||0,c=parseFloat(r.height)||0,p=parseFloat(s.width)||0,f=parseFloat(s.height)||0,h=Math.max(t.width,l,p),m=Math.max(t.height,c,f),g=h-t.width,b=m-t.height;return{left:t.left-g/2,right:t.right+g/2,top:t.top-b/2,bottom:t.bottom+b/2}}const xC=k.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function u$(){return k.useContext(xC)}function Kv(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:s}=e,a=Ke(s),l=k.useRef(0),c=wr(f$).current,p=wr(c$).current,[f,h]=k.useState(0),m=k.useRef(f),g=Ke((E,R)=>{p.set(E,R??null),m.current+=1,h(m.current)}),b=Ke(E=>{p.delete(E),m.current+=1,h(m.current)}),x=k.useMemo(()=>{const E=new Map;return Array.from(p.keys()).filter(T=>T.isConnected).sort(d$).forEach((T,C)=>{const A=p.get(T)??{};E.set(T,{...A,index:C})}),E},[p,f]);He(()=>{if(typeof MutationObserver!="function"||x.size===0)return;const E=new MutationObserver(R=>{const T=new Set,C=A=>T.has(A)?T.delete(A):T.add(A);R.forEach(A=>{A.removedNodes.forEach(C),A.addedNodes.forEach(C)}),T.size===0&&(m.current+=1,h(m.current))});return x.forEach((R,T)=>{T.parentElement&&E.observe(T.parentElement,{childList:!0})}),()=>{E.disconnect()}},[x]),He(()=>{m.current===f&&(n.current.length!==x.size&&(n.current.length=x.size),r&&r.current.length!==x.size&&(r.current.length=x.size),l.current=x.size),a(x)},[a,x,n,r,f]),He(()=>()=>{n.current=[]},[n]),He(()=>()=>{r&&(r.current=[])},[r]);const w=Ke(E=>(c.add(E),()=>{c.delete(E)}));He(()=>{c.forEach(E=>E(x))},[c,x]);const _=k.useMemo(()=>({register:g,unregister:b,subscribeMapChange:w,elementsRef:n,labelsRef:r,nextIndexRef:l}),[g,b,w,n,r,l]);return v.jsx(xC.Provider,{value:_,children:t})}function c$(){return new Map}function f$(){return new Set}function d$(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const p$=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:a,platform:l,elements:c,middlewareData:p}=t,{element:f,padding:h=0,offsetParent:m="real"}=ws(e,t)||{};if(f==null)return{};const g=xR(h),b={x:n,y:r},x=Ov(s),w=Nv(x),_=await l.getDimensions(f),E=x==="y",R=E?"top":"left",T=E?"bottom":"right",C=E?"clientHeight":"clientWidth",A=a.reference[w]+a.reference[x]-b[x]-a.floating[w],N=b[x]-a.reference[x],I=m==="real"?await l.getOffsetParent?.(f):c.floating;let F=c.floating[C]||a.floating[w];(!F||!await l.isElement?.(I))&&(F=c.floating[C]||a.floating[w]);const V=A/2-N/2,j=F/2-_[w]/2-1,q=Math.min(g[R],j),Z=Math.min(g[T],j),B=q,z=F-_[w]-Z,L=F/2-_[w]/2+V,H=xy(B,L,z),U=!p.arrow&&go(s)!=null&&L!==H&&a.reference[w]/2-(L<B?q:Z)-_[w]/2<0,P=U?L<B?L-B:L-z:0;return{[x]:b[x]+P,data:{[x]:H,centerOffset:L-H-P,...U&&{alignmentOffset:P}},reset:U}}}),h$=(e,t)=>({...p$(e),options:[e,t]}),m$={name:"hide",async fn(e){const{width:t,height:n,x:r,y:s}=e.rects.reference,a=t===0&&n===0&&r===0&&s===0;return{data:{referenceHidden:(await Wj().fn(e)).data?.referenceHidden||a}}}},yp={sideX:"left",sideY:"top"},g$={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:s},platform:a,strategy:l,placement:c}=e,p=Sn(s),f=p.getComputedStyle(s);if(!(f.transitionDuration!=="0s"&&f.transitionDuration!==""))return{x:t,y:n,data:yp};const m=await a.getOffsetParent?.(s);let g={width:0,height:0};if(l==="fixed"&&p?.visualViewport)g={width:p.visualViewport.width,height:p.visualViewport.height};else if(m===p){const R=qt(s);g={width:R.documentElement.clientWidth,height:R.documentElement.clientHeight}}else await a.isElement?.(m)&&(g=await a.getDimensions(m));const b=Pr(c);let x=t,w=n;b==="left"&&(x=g.width-(t+r.width)),b==="top"&&(w=g.height-(n+r.height));const _=b==="left"?"right":yp.sideX,E=b==="top"?"bottom":yp.sideY;return{x,y:w,data:{sideX:_,sideY:E}}}};function SC(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function M1(e,t,n){const{rects:r,placement:s}=e;return{side:SC(t,Pr(s),n),align:go(s)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function wC(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:s=0,align:a="center",alignOffset:l=0,collisionBoundary:c,collisionPadding:p=5,sticky:f=!1,arrowPadding:h=5,disableAnchorTracking:m=!1,keepMounted:g=!1,floatingRootContext:b,mounted:x,collisionAvoidance:w,shiftCrossAxis:_=!1,nodeId:E,adaptiveOrigin:R,lazyFlip:T=!1,externalTree:C}=e,[A,N]=k.useState(null);!x&&A!==null&&N(null);const I=w.side||"flip",F=w.align||"flip",V=w.fallbackAxisSide||"end",j=typeof t=="function"?t:void 0,q=Ke(j),Z=j?q:t,B=Gn(t),z=Gn(x),H=Vv()==="rtl",U=A||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":H?"left":"right","inline-start":H?"right":"left"}[r],P=a==="center"?U:`${U}-${a}`;let Y=p;const D=1,$=r==="bottom"?D:0,G=r==="top"?D:0,O=r==="right"?D:0,J=r==="left"?D:0;typeof Y=="number"?Y={top:Y+$,right:Y+J,bottom:Y+G,left:Y+O}:Y&&(Y={top:(Y.top||0)+$,right:(Y.right||0)+J,bottom:(Y.bottom||0)+G,left:(Y.left||0)+O});const ee={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:Y},ie=k.useRef(null),he=Gn(s),le=Gn(l),Pe=[zv(Xe=>{const Dt=M1(Xe,r,H),Fe=typeof he.current=="function"?he.current(Dt):he.current,Ze=typeof le.current=="function"?le.current(Dt):le.current;return{mainAxis:Fe,crossAxis:Ze,alignmentAxis:Ze}},[typeof s!="function"?s:0,typeof l!="function"?l:0,H,r])],ue=F==="none"&&I!=="shift",Ee=!ue&&(f||_||I==="shift"),Ce=I==="none"?null:Lv({...ee,padding:{top:Y.top+D,right:Y.right+D,bottom:Y.bottom+D,left:Y.left+D},mainAxis:!_&&I==="flip",crossAxis:F==="flip"?"alignment":!1,fallbackAxisSideDirection:V}),Me=ue?null:jv(Xe=>{const Dt=qt(Xe.elements.floating).documentElement;return{...ee,rootBoundary:_?{x:0,y:0,width:Dt.clientWidth,height:Dt.clientHeight}:void 0,mainAxis:F!=="none",crossAxis:Ee,limiter:f||_?void 0:Zj(Fe=>{if(!ie.current)return{};const{width:Ze,height:ft}=ie.current.getBoundingClientRect(),Qe=pi(Pr(Fe.placement)),W=Qe==="y"?Ze:ft,ce=Qe==="y"?Y.left+Y.right:Y.top+Y.bottom;return{offset:W/2+ce/2}})}},[ee,f,_,Y,F]);I==="shift"||F==="shift"||a==="center"?Pe.push(Me,Ce):Pe.push(Ce,Me),Pe.push(Pv({...ee,apply({elements:{floating:Xe},availableWidth:Dt,availableHeight:Fe,rects:Ze}){if(!z.current)return;const ft=Xe.style;ft.setProperty("--available-width",`${Dt}px`),ft.setProperty("--available-height",`${Fe}px`);const Qe=Sn(Xe).devicePixelRatio||1,{x:W,y:ce,width:Ae,height:Ve}=Ze.reference,St=(Math.round((W+Ae)*Qe)-Math.round(W*Qe))/Qe,At=(Math.round((ce+Ve)*Qe)-Math.round(ce*Qe))/Qe;ft.setProperty("--anchor-width",`${St}px`),ft.setProperty("--anchor-height",`${At}px`)}}),h$(()=>({element:ie.current||qt(ie.current).createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(Xe){const{elements:Dt,middlewareData:Fe,placement:Ze,rects:ft,y:Qe}=Xe,W=Pr(Ze),ce=pi(W),Ae=ie.current,Ve=Fe.arrow?.x||0,St=Fe.arrow?.y||0,At=Ae?.clientWidth||0,qe=Ae?.clientHeight||0,$e=Ve+At/2,be=St+qe/2,Nt=Math.abs(Fe.shift?.y||0),We=ft.reference.height/2,ht=typeof s=="function"?s(M1(Xe,r,H)):s,Qt=Nt>ht,Jt={top:`${$e}px calc(100% + ${ht}px)`,bottom:`${$e}px ${-ht}px`,left:`calc(100% + ${ht}px) ${be}px`,right:`${-ht}px ${be}px`}[W],Gt=`${$e}px ${ft.reference.y+We-Qe}px`;return Dt.floating.style.setProperty("--transform-origin",Ee&&ce==="y"&&Qt?Gt:Jt),{}}},m$,R),He(()=>{!x&&b&&b.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[x,b]);const ve=k.useMemo(()=>({elementResize:!m&&typeof ResizeObserver<"u",layoutShift:!m&&typeof IntersectionObserver<"u"}),[m]),{refs:xe,elements:De,x:Ne,y:Ie,middlewareData:ge,update:fe,placement:se,context:ne,isPositioned:_e,floatingStyles:te}=yL({rootContext:b,open:g?x:void 0,placement:P,middleware:Pe,strategy:n,whileElementsMounted:g?void 0:(...Xe)=>Ip(...Xe,ve),nodeId:E,externalTree:C}),{sideX:ae,sideY:ze}=ge.adaptiveOrigin||yp,Ue=_e?n:"fixed",Ge=k.useMemo(()=>{const Xe=R?{position:Ue,[ae]:Ne,[ze]:Ie}:{position:Ue,...te};return _e||(Xe.opacity=0),Xe},[R,Ue,ae,Ne,ze,Ie,te,_e]),Ye=k.useRef(null);He(()=>{if(!x)return;const Xe=B.current,Dt=typeof Xe=="function"?Xe():Xe,Ze=(I1(Dt)?Dt.current:Dt)||null||null;Ze!==Ye.current&&(xe.setPositionReference(Ze),Ye.current=Ze)},[x,xe,Z,B]),k.useEffect(()=>{if(!x)return;const Xe=B.current;typeof Xe!="function"&&I1(Xe)&&Xe.current!==Ye.current&&(xe.setPositionReference(Xe.current),Ye.current=Xe.current)},[x,xe,Z,B]),k.useEffect(()=>{if(g&&x&&De.domReference&&De.floating)return Ip(De.domReference,De.floating,fe,ve)},[g,x,De,fe,ve]);const rt=Pr(se),st=SC(r,rt,H),ot=go(se)||"center",Et=!!ge.hide?.referenceHidden;He(()=>{T&&x&&_e&&N(rt)},[T,x,_e,rt]);const it=k.useMemo(()=>({position:"absolute",top:ge.arrow?.y,left:ge.arrow?.x}),[ge.arrow]),vt=ge.arrow?.centerOffset!==0;return k.useMemo(()=>({positionerStyles:Ge,arrowStyles:it,arrowRef:ie,arrowUncentered:vt,side:st,align:ot,physicalSide:rt,anchorHidden:Et,refs:xe,context:ne,isPositioned:_e,update:fe}),[Ge,it,ie,vt,st,ot,rt,Et,xe,ne,_e,fe])}function I1(e){return e!=null&&"current"in e}function Zv(e){return e==="starting"?Uz:hr}function EC(e,t,{styles:n,transitionStatus:r,props:s,refs:a,hidden:l,inert:c=!1}){const p={...n};return c&&(p.pointerEvents="none"),wn("div",e,{state:t,ref:a,props:[{role:"presentation",hidden:l,style:p},Zv(r),s],stateAttributesMapping:fh})}const b$=20;function y$(e,t,n,r){const[s,a]=k.useState(!1);He(()=>{if(!e||!t||n==null){a(!1);return}const l=qt(n).documentElement.clientWidth,c=n.offsetWidth;a(l>0&&c>0&&c>=l-b$)},[e,t,n]),XL(e&&(!t||s),r)}let TC=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function _C(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:s,index:a}=e,{register:l,unregister:c,subscribeMapChange:p,elementsRef:f,labelsRef:h,nextIndexRef:m}=u$(),g=k.useRef(-1),[b,x]=k.useState(a??(s===TC.GuessFromOrder?()=>{if(g.current===-1){const E=m.current;m.current+=1,g.current=E}return g.current}:-1)),w=k.useRef(null),_=k.useCallback(E=>{if(w.current=E,b!==-1&&E!==null&&(f.current[b]=E,h)){const R=t!==void 0;h.current[b]=R?t:r?.current?.textContent??E.textContent}},[b,f,h,t,r]);return He(()=>{if(a!=null)return;const E=w.current;if(E)return l(E,n),()=>{c(E)}},[a,l,c,n]),He(()=>{if(a==null)return p(E=>{const R=w.current?E.get(w.current)?.index:null;R!=null&&x(R)})},[a,p,x]),k.useMemo(()=>({ref:_,index:b}),[b,_])}const Es={popup:{kB7OPa:"ui-9f619",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",k7Eaqz:"ui-1i9suas",ks0D6T:"ui-1va8c73",kskxy:"ui-2pj5ht",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kVAEAm:"ui-1n2onr6",kHBbk8:"ui-c8icb0",kfSwDN:"ui-87ps6o",kY4cRS:"ui-lvsv26",kWkggS:"ui-f1vpex",kaIpWk:"ui-1043rbw",kGVxlE:"ui-137jh17",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-1acoasx",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",kSiTet:"ui-1hc1fzr ui-1i2unn7",k3aq6I:"ui-3oybdh ui-1ejle5f",k3nNDw:"ui-ctpfpq",k1ekBW:"ui-6o7n8i",kIyJzY:"ui-7pq1vu ui-sagj69",kAMwcw:"ui-6ekqhr",k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",kv0HGH:"ui-arstr8",kDVEDD:"ui-itxdhh",kUfP38:"ui-1k48kgn",kbMawA:"ui-1h8pt5m",kloYau:"ui-2q1x1w",$$css:!0},popupMd:{kaIpWk:"ui-1m7fhj7",$$css:!0},popupWidth:e=>[{kzqmXN:e!=null?"ui-5lhr3w":e,ks0D6T:e!=null?"ui-f68679":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e),"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e)}],list:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kOIVth:"ui-ri7oa4",kAzted:"ui-2lwn1j",kXHlph:"ui-6ikm8r",kORKVm:"ui-1odjw0f",kLKAdn:"ui-a9nt15",kpe85a:"ui-17twlq6",kGO01o:"ui-l916ps",kE3dHu:"ui-cdc595",k2VNRW:"ui-1ew78do",$$css:!0},row:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-6s0dn4",kOIVth:"ui-1p5sq7k",kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kLKAdn:"ui-1uagpmz",kpe85a:"ui-1qto6us",kGO01o:"ui-1aqjmib",kE3dHu:"ui-4aj6wr",kaIpWk:"ui-1bd5uuw",kkrTdU:"ui-1ypdohk ui-mh7c9n",kMwMTN:"ui-1wd3ewq ui-1kosevp",kWkggS:"ui-jbqb8w ui-1sbws7q",$$css:!0},rowSm:{"--ui-select-row-padding-block":"ui-gd7qnp","--ui-select-row-padding-inline":"ui-14f2bk","--ui-select-row-gap":"ui-vsfftw",$$css:!0},rowMd:{"--ui-select-row-padding-block":"ui-fn83ix","--ui-select-row-padding-inline":"ui-x09acf","--ui-select-row-gap":"ui-8yiove",$$css:!0},rowText:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",$$css:!0},rowSection:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kmuXW:"ui-2lah0s",kMwMTN:"ui-19aaqeu",$$css:!0}},v$=[Es.popup,Fi.root],k$={sm:null,md:Es.popupMd},x$=Es.popupWidth,S$=Es.list,w$=[Es.row,Fi.root],E$={sm:Es.rowSm,md:Es.rowMd},T$=Es.rowText,Tb=Es.rowSection,RC="top",Wv=300,_h=100;function _$(e){const[t,n="center"]=e.split("-");return{side:t,align:n}}function R$(e){return typeof e=="number"?{sideOffset:e}:{sideOffset:e.mainAxis,alignOffset:e.alignmentAxis}}function C$(e){return e?{side:"flip",align:"shift",fallbackAxisSide:"none"}:{side:"flip",align:"shift",fallbackAxisSide:"start"}}function Yv(e,t,n){const{side:r,align:s}=k.useMemo(()=>_$(e),[e]),{sideOffset:a,alignOffset:l}=k.useMemo(()=>R$(t),[t]),c=k.useMemo(()=>C$(n),[n]);return{side:r,align:s,sideOffset:a,alignOffset:l,collisionAvoidance:c}}const A$=k.forwardRef(function(t,n){const{render:r,className:s,id:a,name:l,value:c,disabled:p=!1,onValueChange:f,defaultValue:h,autoFocus:m=!1,style:g,...b}=t,{state:x,name:w,disabled:_,setTouched:E,setDirty:R,validityData:T,setFocused:C,setFilled:A,validationMode:N,validation:I}=Kc(),F=_||p,V=w??l,j={...x,disabled:F},{labelId:q}=Hv(),Z=Gv({id:a});He(()=>{const Y=c!=null;I.inputRef.current?.value||Y&&c!==""?A(!0):Y&&c===""&&A(!1)},[I.inputRef,A,c]);const B=k.useRef(null);He(()=>{m&&B.current===Dr(qt(B.current))&&C(!0)},[m,C]);const[z]=mc({controlled:c,default:h,name:"FieldControl",state:"value"}),L=c!==void 0,H=L?z:void 0,U=Ke(()=>I.inputRef.current?.value);return pC(I.inputRef,{id:Z,value:H,getValue:U}),wn("input",t,{ref:[n,B],state:j,props:[{id:Z,disabled:F,name:V,ref:I.inputRef,"aria-labelledby":q,autoFocus:m,...L?{value:H}:{defaultValue:h},onChange(Y){const D=Y.currentTarget.value;f?.(D,Rt(Ss,Y.nativeEvent)),R(D!==T.initialValue),A(D!=="")},onFocus(){C(!0)},onBlur(Y){E(!0),C(!1),N==="onBlur"&&I.commit(Y.currentTarget.value)},onKeyDown(Y){Y.currentTarget.tagName==="INPUT"&&Y.key==="Enter"&&(E(!0),I.commit(Y.currentTarget.value))}},I.getInputValidationProps(),b],stateAttributesMapping:Vc})}),N$=k.forwardRef(function(t,n){return v.jsx(A$,{ref:n,...t})});var O$=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Lp=O$.join(","),CC=typeof Element>"u",wl=CC?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Pp=!CC&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},$p=function(t,n){var r;n===void 0&&(n=!0);var s=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=s===""||s==="true",l=a||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):$p(t.parentNode));return l},M$=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},AC=function(t,n,r){if($p(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(Lp));return n&&wl.call(t,Lp)&&s.unshift(t),s=s.filter(r),s},Bp=function(t,n,r){for(var s=[],a=Array.from(t);a.length;){var l=a.shift();if(!$p(l,!1))if(l.tagName==="SLOT"){var c=l.assignedElements(),p=c.length?c:l.children,f=Bp(p,!0,r);r.flatten?s.push.apply(s,f):s.push({scopeParent:l,candidates:f})}else{var h=wl.call(l,Lp);h&&r.filter(l)&&(n||!t.includes(l))&&s.push(l);var m=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),g=!$p(m,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(m&&g){var b=Bp(m===!0?l.children:m.children,!0,r);r.flatten?s.push.apply(s,b):s.push({scopeParent:l,candidates:b})}else a.unshift.apply(a,l.children)}}return s},NC=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},OC=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||M$(t))&&!NC(t)?0:t.tabIndex},I$=function(t,n){var r=OC(t);return r<0&&n&&!NC(t)?0:r},D$=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},MC=function(t){return t.tagName==="INPUT"},z$=function(t){return MC(t)&&t.type==="hidden"},j$=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},L$=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},P$=function(t){if(!t.name)return!0;var n=t.form||Pp(t),r=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=r(window.CSS.escape(t.name));else try{s=r(t.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var a=L$(s,t.form);return!a||a===t},$$=function(t){return MC(t)&&t.type==="radio"},B$=function(t){return $$(t)&&!P$(t)},F$=function(t){var n,r=t&&Pp(t),s=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var l,c,p;for(a=!!((l=s)!==null&&l!==void 0&&(c=l.ownerDocument)!==null&&c!==void 0&&c.contains(s)||t!=null&&(p=t.ownerDocument)!==null&&p!==void 0&&p.contains(t));!a&&s;){var f,h,m;r=Pp(s),s=(f=r)===null||f===void 0?void 0:f.host,a=!!((h=s)!==null&&h!==void 0&&(m=h.ownerDocument)!==null&&m!==void 0&&m.contains(s))}}return a},D1=function(t){var n=t.getBoundingClientRect(),r=n.width,s=n.height;return r===0&&s===0},U$=function(t,n){var r=n.displayCheck,s=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var a=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!a}if(getComputedStyle(t).visibility==="hidden")return!0;var l=wl.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(wl.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof s=="function"){for(var p=t;t;){var f=t.parentElement,h=Pp(t);if(f&&!f.shadowRoot&&s(f)===!0)return D1(t);t.assignedSlot?t=t.assignedSlot:!f&&h!==t.ownerDocument?t=h.host:t=f}t=p}if(F$(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return D1(t);return!1},q$=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var s=n.children.item(r);if(s.tagName==="LEGEND")return wl.call(n,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}n=n.parentElement}return!1},Ny=function(t,n){return!(n.disabled||z$(n)||U$(n,t)||j$(n)||q$(n))},Oy=function(t,n){return!(B$(n)||OC(n)<0||!Ny(t,n))},H$=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},IC=function(t){var n=[],r=[];return t.forEach(function(s,a){var l=!!s.scopeParent,c=l?s.scopeParent:s,p=I$(c,l),f=l?IC(s.candidates):c;p===0?l?n.push.apply(n,f):n.push(c):r.push({documentOrder:a,tabIndex:p,item:s,isScope:l,content:f})}),r.sort(D$).reduce(function(s,a){return a.isScope?s.push.apply(s,a.content):s.push(a.content),s},[]).concat(n)},Rh=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Bp([t],n.includeContainer,{filter:Oy.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:H$}):r=AC(t,n.includeContainer,Oy.bind(null,n)),IC(r)},G$=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Bp([t],n.includeContainer,{filter:Ny.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=AC(t,n.includeContainer,Ny.bind(null,n)),r},DC=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return wl.call(t,Lp)===!1?!1:Oy(n,t)};function V$(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function zC(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function K$(){return/apple/i.test(navigator.vendor)}function My(){const e=/android/i;return e.test(V$())||e.test(zC())}function Z$(){return zC().includes("jsdom/")}const z1="data-floating-ui-focusable",W$="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",_b="ArrowLeft",Rb="ArrowRight",Y$="ArrowUp",X$="ArrowDown";function ro(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function kr(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&fo(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function io(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Cb(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Q$(e){return e.matches("html,body")}function pr(e){return e?.ownerDocument||document}function jC(e){return jt(e)&&e.matches(W$)}function Iy(e){return e?e.getAttribute("role")==="combobox"&&jC(e):!1}function Fp(e){return e?e.hasAttribute(z1)?e:e.querySelector("["+z1+"]")||e:null}function Zo(e,t,n){return n===void 0&&(n=!0),e.filter(s=>{var a;return s.parentId===t&&(!n||((a=s.context)==null?void 0:a.open))}).flatMap(s=>[s,...Zo(e,s.id,n)])}function J$(e,t){let n,r=-1;function s(a,l){l>r&&(n=a,r=l),Zo(e,a).forEach(p=>{s(p.id,l+1)})}return s(t,0),e.find(a=>a.id===n)}function j1(e,t){var n;let r=[],s=(n=e.find(a=>a.id===t))==null?void 0:n.parentId;for(;s;){const a=e.find(l=>l.id===s);s=a?.parentId,a&&(r=r.concat(a))}return r}function or(e){e.preventDefault(),e.stopPropagation()}function e3(e){return"nativeEvent"in e}function LC(e){return e.mozInputSource===0&&e.isTrusted?!0:My()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function PC(e){return Z$()?!1:!My()&&e.width===0&&e.height===0||My()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function gc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var t3=typeof document<"u",n3=function(){},cn=t3?k.useLayoutEffect:n3;const r3={...ch};function Xn(e){const t=k.useRef(e);return cn(()=>{t.current=e}),t}const i3=r3.useInsertionEffect,s3=i3||(e=>e());function jn(e){const t=k.useRef(()=>{});return s3(()=>{t.current=e}),k.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return t.current==null?void 0:t.current(...r)},[])}function jd(e,t,n){return Math.floor(e/t)!==n}function nc(e,t){return t<0||t>=e.current.length}function Ab(e,t){return fr(e,{disabledIndices:t})}function L1(e,t){return fr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function fr(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:s,amount:a=1}=t===void 0?{}:t,l=n;do l+=r?-a:a;while(l>=0&&l<=e.current.length-1&&vp(e,l,s));return l}function o3(e,t){let{event:n,orientation:r,loop:s,rtl:a,cols:l,disabledIndices:c,minIndex:p,maxIndex:f,prevIndex:h,stopEvent:m=!1}=t,g=h;if(n.key===Y$){if(m&&or(n),h===-1)g=f;else if(g=fr(e,{startingIndex:g,amount:l,decrement:!0,disabledIndices:c}),s&&(h-l<p||g<0)){const b=h%l,x=f%l,w=f-(x-b);x===b?g=f:g=x>b?w:w-l}nc(e,g)&&(g=h)}if(n.key===X$&&(m&&or(n),h===-1?g=p:(g=fr(e,{startingIndex:h,amount:l,disabledIndices:c}),s&&h+l>f&&(g=fr(e,{startingIndex:h%l-l,amount:l,disabledIndices:c}))),nc(e,g)&&(g=h)),r==="both"){const b=vs(h/l);n.key===(a?_b:Rb)&&(m&&or(n),h%l!==l-1?(g=fr(e,{startingIndex:h,disabledIndices:c}),s&&jd(g,l,b)&&(g=fr(e,{startingIndex:h-h%l-1,disabledIndices:c}))):s&&(g=fr(e,{startingIndex:h-h%l-1,disabledIndices:c})),jd(g,l,b)&&(g=h)),n.key===(a?Rb:_b)&&(m&&or(n),h%l!==0?(g=fr(e,{startingIndex:h,decrement:!0,disabledIndices:c}),s&&jd(g,l,b)&&(g=fr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c}))):s&&(g=fr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c})),jd(g,l,b)&&(g=h));const x=vs(f/l)===b;nc(e,g)&&(s&&x?g=n.key===(a?Rb:_b)?f:fr(e,{startingIndex:h-h%l-1,disabledIndices:c}):g=h)}return g}function a3(e,t,n){const r=[];let s=0;return e.forEach((a,l)=>{let{width:c,height:p}=a,f=!1;for(n&&(s=0);!f;){const h=[];for(let m=0;m<c;m++)for(let g=0;g<p;g++)h.push(s+m+g*t);s%t+c<=t&&h.every(m=>r[m]==null)?(h.forEach(m=>{r[m]=l}),f=!0):s++}}),[...r]}function l3(e,t,n,r,s){if(e===-1)return-1;const a=n.indexOf(e),l=t[e];switch(s){case"tl":return a;case"tr":return l?a+l.width-1:a;case"bl":return l?a+(l.height-1)*r:a;case"br":return n.lastIndexOf(e)}}function u3(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function vp(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const Zc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function $C(e,t){const n=Rh(e,Zc()),r=n.length;if(r===0)return;const s=ro(pr(e)),a=n.indexOf(s),l=a===-1?t===1?0:r-1:a+t;return n[l]}function BC(e){return $C(pr(e).body,1)||e}function FC(e){return $C(pr(e).body,-1)||e}function rc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!kr(n,r)}function c3(e){Rh(e,Zc()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function P1(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Wc(e){const t=k.useRef(void 0),n=k.useCallback(r=>{const s=e.map(a=>{if(a!=null){if(typeof a=="function"){const l=a,c=l(r);return typeof c=="function"?c:()=>{l(null)}}return a.current=r,()=>{a.current=null}}});return()=>{s.forEach(a=>a?.())}},e);return k.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function f3(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const UC=k.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function qC(e){const{children:t,elementsRef:n,labelsRef:r}=e,[s,a]=k.useState(()=>new Set),l=k.useCallback(f=>{a(h=>new Set(h).add(f))},[]),c=k.useCallback(f=>{a(h=>{const m=new Set(h);return m.delete(f),m})},[]),p=k.useMemo(()=>{const f=new Map;return Array.from(s.keys()).sort(f3).forEach((m,g)=>{f.set(m,g)}),f},[s]);return v.jsx(UC.Provider,{value:k.useMemo(()=>({register:l,unregister:c,map:p,elementsRef:n,labelsRef:r}),[l,c,p,n,r]),children:t})}function Ch(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:s,elementsRef:a,labelsRef:l}=k.useContext(UC),[c,p]=k.useState(null),f=k.useRef(null),h=k.useCallback(m=>{if(f.current=m,c!==null&&(a.current[c]=m,l)){var g;const b=t!==void 0;l.current[c]=b?t:(g=m?.textContent)!=null?g:null}},[c,a,l,t]);return cn(()=>{const m=f.current;if(m)return n(m),()=>{r(m)}},[n,r]),cn(()=>{const m=f.current?s.get(f.current):null;m!=null&&p(m)},[s]),k.useMemo(()=>({ref:h,index:c??-1}),[c,h])}const d3="data-floating-ui-focusable",$1="active",B1="selected",Yc="ArrowLeft",Xc="ArrowRight",HC="ArrowUp",Ah="ArrowDown",p3={...ch};let F1=!1,h3=0;const U1=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+h3++;function m3(){const[e,t]=k.useState(()=>F1?U1():void 0);return cn(()=>{e==null&&t(U1())},[]),k.useEffect(()=>{F1=!0},[]),e}const g3=p3.useId,Nh=g3||m3;function GC(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(s=>s(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const VC=k.createContext(null),KC=k.createContext(null),bo=()=>{var e;return((e=k.useContext(VC))==null?void 0:e.id)||null},yo=()=>k.useContext(KC);function ZC(e){const t=Nh(),n=yo(),s=bo();return cn(()=>{if(!t)return;const a={id:t,parentId:s};return n?.addNode(a),()=>{n?.removeNode(a)}},[n,t,s]),t}function WC(e){const{children:t,id:n}=e,r=bo();return v.jsx(VC.Provider,{value:k.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function b3(e){const{children:t}=e,n=k.useRef([]),r=k.useCallback(l=>{n.current=[...n.current,l]},[]),s=k.useCallback(l=>{n.current=n.current.filter(c=>c!==l)},[]),[a]=k.useState(()=>GC());return v.jsx(KC.Provider,{value:k.useMemo(()=>({nodesRef:n,addNode:r,removeNode:s,events:a}),[r,s,a]),children:t})}function El(e){return"data-floating-ui-"+e}function cr(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const q1=El("safe-polygon");function Nb(e,t,n){if(n&&!gc(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function Ob(e){return typeof e=="function"?e():e}function YC(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,events:a,elements:l}=e,{enabled:c=!0,delay:p=0,handleClose:f=null,mouseOnly:h=!1,restMs:m=0,move:g=!0}=t,b=yo(),x=bo(),w=Xn(f),_=Xn(p),E=Xn(n),R=Xn(m),T=k.useRef(),C=k.useRef(-1),A=k.useRef(),N=k.useRef(-1),I=k.useRef(!0),F=k.useRef(!1),V=k.useRef(()=>{}),j=k.useRef(!1),q=jn(()=>{var U;const P=(U=s.current.openEvent)==null?void 0:U.type;return P?.includes("mouse")&&P!=="mousedown"});k.useEffect(()=>{if(!c)return;function U(P){let{open:Y}=P;Y||(cr(C),cr(N),I.current=!0,j.current=!1)}return a.on("openchange",U),()=>{a.off("openchange",U)}},[c,a]),k.useEffect(()=>{if(!c||!w.current||!n)return;function U(Y){q()&&r(!1,Y,"hover")}const P=pr(l.floating).documentElement;return P.addEventListener("mouseleave",U),()=>{P.removeEventListener("mouseleave",U)}},[l.floating,n,r,c,w,q]);const Z=k.useCallback(function(U,P,Y){P===void 0&&(P=!0),Y===void 0&&(Y="hover");const D=Nb(_.current,"close",T.current);D&&!A.current?(cr(C),C.current=window.setTimeout(()=>r(!1,U,Y),D)):P&&(cr(C),r(!1,U,Y))},[_,r]),B=jn(()=>{V.current(),A.current=void 0}),z=jn(()=>{if(F.current){const U=pr(l.floating).body;U.style.pointerEvents="",U.removeAttribute(q1),F.current=!1}}),L=jn(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);k.useEffect(()=>{if(!c)return;function U(G){if(cr(C),I.current=!1,h&&!gc(T.current)||Ob(R.current)>0&&!Nb(_.current,"open"))return;const O=Nb(_.current,"open",T.current);O?C.current=window.setTimeout(()=>{E.current||r(!0,G,"hover")},O):n||r(!0,G,"hover")}function P(G){if(L()){z();return}V.current();const O=pr(l.floating);if(cr(N),j.current=!1,w.current&&s.current.floatingContext){n||cr(C),A.current=w.current({...s.current.floatingContext,tree:b,x:G.clientX,y:G.clientY,onClose(){z(),B(),L()||Z(G,!0,"safe-polygon")}});const ee=A.current;O.addEventListener("mousemove",ee),V.current=()=>{O.removeEventListener("mousemove",ee)};return}(T.current!=="touch"||!kr(l.floating,G.relatedTarget))&&Z(G)}function Y(G){L()||s.current.floatingContext&&(w.current==null||w.current({...s.current.floatingContext,tree:b,x:G.clientX,y:G.clientY,onClose(){z(),B(),L()||Z(G)}})(G))}function D(){cr(C)}function $(G){L()||Z(G,!1)}if(yt(l.domReference)){const G=l.domReference,O=l.floating;return n&&G.addEventListener("mouseleave",Y),g&&G.addEventListener("mousemove",U,{once:!0}),G.addEventListener("mouseenter",U),G.addEventListener("mouseleave",P),O&&(O.addEventListener("mouseleave",Y),O.addEventListener("mouseenter",D),O.addEventListener("mouseleave",$)),()=>{n&&G.removeEventListener("mouseleave",Y),g&&G.removeEventListener("mousemove",U),G.removeEventListener("mouseenter",U),G.removeEventListener("mouseleave",P),O&&(O.removeEventListener("mouseleave",Y),O.removeEventListener("mouseenter",D),O.removeEventListener("mouseleave",$))}}},[l,c,e,h,g,Z,B,z,r,n,E,b,_,w,s,L,R]),cn(()=>{var U;if(c&&n&&(U=w.current)!=null&&(U=U.__options)!=null&&U.blockPointerEvents&&q()){F.current=!0;const Y=l.floating;if(yt(l.domReference)&&Y){var P;const D=pr(l.floating).body;D.setAttribute(q1,"");const $=l.domReference,G=b==null||(P=b.nodesRef.current.find(O=>O.id===x))==null||(P=P.context)==null?void 0:P.elements.floating;return G&&(G.style.pointerEvents=""),D.style.pointerEvents="none",$.style.pointerEvents="auto",Y.style.pointerEvents="auto",()=>{D.style.pointerEvents="",$.style.pointerEvents="",Y.style.pointerEvents=""}}}},[c,n,x,l,b,w,q]),cn(()=>{n||(T.current=void 0,j.current=!1,B(),z())},[n,B,z]),k.useEffect(()=>()=>{B(),cr(C),cr(N),z()},[c,l.domReference,B,z]);const H=k.useMemo(()=>{function U(P){T.current=P.pointerType}return{onPointerDown:U,onPointerEnter:U,onMouseMove(P){const{nativeEvent:Y}=P;function D(){!I.current&&!E.current&&r(!0,Y,"hover")}h&&!gc(T.current)||n||Ob(R.current)===0||j.current&&P.movementX**2+P.movementY**2<2||(cr(N),T.current==="touch"?D():(j.current=!0,N.current=window.setTimeout(D,Ob(R.current))))}}},[h,r,n,E,R]);return k.useMemo(()=>c?{reference:H}:{},[c,H])}let H1=0;function Ho(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=t;r&&cancelAnimationFrame(H1);const a=()=>e?.focus({preventScroll:n});s?a():H1=requestAnimationFrame(a)}function Mb(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&fo(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function y3(e){return"composedPath"in e?e.composedPath()[0]:e.target}function v3(e){return e?.ownerDocument||document}const fl={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function G1(e){return e==="inert"?fl.inert:e==="aria-hidden"?fl["aria-hidden"]:fl.none}let Ld=new WeakSet,Pd={},Ib=0;const k3=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,XC=e=>e&&(e.host||XC(e.parentNode)),x3=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=XC(n);return e.contains(r)?r:null}).filter(n=>n!=null);function S3(e,t,n,r){const s="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,l=x3(t,e),c=new Set,p=new Set(l),f=[];Pd[s]||(Pd[s]=new WeakMap);const h=Pd[s];l.forEach(m),g(t),c.clear();function m(b){!b||c.has(b)||(c.add(b),b.parentNode&&m(b.parentNode))}function g(b){!b||p.has(b)||[].forEach.call(b.children,x=>{if(Qn(x)!=="script")if(c.has(x))g(x);else{const w=a?x.getAttribute(a):null,_=w!==null&&w!=="false",E=G1(a),R=(E.get(x)||0)+1,T=(h.get(x)||0)+1;E.set(x,R),h.set(x,T),f.push(x),R===1&&_&&Ld.add(x),T===1&&x.setAttribute(s,""),!_&&a&&x.setAttribute(a,a==="inert"?"":"true")}})}return Ib++,()=>{f.forEach(b=>{const x=G1(a),_=(x.get(b)||0)-1,E=(h.get(b)||0)-1;x.set(b,_),h.set(b,E),_||(!Ld.has(b)&&a&&b.removeAttribute(a),Ld.delete(b)),E||b.removeAttribute(s)}),Ib--,Ib||(fl.inert=new WeakMap,fl["aria-hidden"]=new WeakMap,fl.none=new WeakMap,Ld=new WeakSet,Pd={})}}function V1(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=v3(e[0]).body;return S3(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const Oh={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Up=k.forwardRef(function(t,n){const[r,s]=k.useState();cn(()=>{K$()&&s("button")},[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[El("focus-guard")]:"",style:Oh};return v.jsx("span",{...t,...a})}),QC=k.createContext(null),K1=El("portal");function w3(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Nh(),s=JC(),[a,l]=k.useState(null),c=k.useRef(null);return cn(()=>()=>{a?.remove(),queueMicrotask(()=>{c.current=null})},[a]),cn(()=>{if(!r||c.current)return;const p=t?document.getElementById(t):null;if(!p)return;const f=document.createElement("div");f.id=r,f.setAttribute(K1,""),p.appendChild(f),c.current=f,l(f)},[t,r]),cn(()=>{if(n===null||!r||c.current)return;let p=n||s?.portalNode;p&&!ph(p)&&(p=p.current),p=p||document.body;let f=null;t&&(f=document.createElement("div"),f.id=t,p.appendChild(f));const h=document.createElement("div");h.id=r,h.setAttribute(K1,""),p=f||p,p.appendChild(h),c.current=h,l(h)},[t,n,r,s]),a}function Xv(e){const{children:t,id:n,root:r,preserveTabOrder:s=!0}=e,a=w3({id:n,root:r}),[l,c]=k.useState(null),p=k.useRef(null),f=k.useRef(null),h=k.useRef(null),m=k.useRef(null),g=l?.modal,b=l?.open,x=!!l&&!l.modal&&l.open&&s&&!!(r||a);return k.useEffect(()=>{if(!a||!s||g)return;function w(_){a&&rc(_)&&(_.type==="focusin"?P1:c3)(a)}return a.addEventListener("focusin",w,!0),a.addEventListener("focusout",w,!0),()=>{a.removeEventListener("focusin",w,!0),a.removeEventListener("focusout",w,!0)}},[a,s,g]),k.useEffect(()=>{a&&(b||P1(a))},[b,a]),v.jsxs(QC.Provider,{value:k.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:p,afterOutsideRef:f,beforeInsideRef:h,afterInsideRef:m,portalNode:a,setFocusManagerState:c}),[s,a]),children:[x&&a&&v.jsx(Up,{"data-type":"outside",ref:p,onFocus:w=>{if(rc(w,a)){var _;(_=h.current)==null||_.focus()}else{const E=l?l.domReference:null,R=FC(E);R?.focus()}}}),x&&a&&v.jsx("span",{"aria-owns":a.id,style:Oh}),a&&Ci.createPortal(t,a),x&&a&&v.jsx(Up,{"data-type":"outside",ref:f,onFocus:w=>{if(rc(w,a)){var _;(_=m.current)==null||_.focus()}else{const E=l?l.domReference:null,R=BC(E);R?.focus(),l?.closeOnFocusOut&&l?.onOpenChange(!1,w.nativeEvent,"focus-out")}}})]})}const JC=()=>k.useContext(QC);function Z1(e){return k.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const E3=20;let oo=[];function Qv(){oo=oo.filter(e=>e.isConnected)}function T3(e){Qv(),e&&Qn(e)!=="body"&&(oo.push(e),oo.length>E3&&(oo=oo.slice(-20)))}function W1(){return Qv(),oo[oo.length-1]}function _3(e){const t=Zc();return DC(e,t)?e:Rh(e,t)[0]||e}function Y1(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Zc(),a=G$(e,r).filter(c=>{const p=c.getAttribute("data-tabindex")||"";return DC(c,r)||c.hasAttribute("data-tabindex")&&!p.startsWith("-")}),l=e.getAttribute("tabindex");t.current.includes("floating")||a.length===0?l!=="0"&&e.setAttribute("tabindex","0"):(l!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const R3=k.forwardRef(function(t,n){return v.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:Oh})});function Jv(e){const{context:t,children:n,disabled:r=!1,order:s=["content"],guards:a=!0,initialFocus:l=0,returnFocus:c=!0,restoreFocus:p=!1,modal:f=!0,visuallyHiddenDismiss:h=!1,closeOnFocusOut:m=!0,outsideElementsInert:g=!1,getInsideElements:b=()=>[]}=e,{open:x,onOpenChange:w,events:_,dataRef:E,elements:{domReference:R,floating:T}}=t,C=jn(()=>{var ue;return(ue=E.current.floatingContext)==null?void 0:ue.nodeId}),A=jn(b),N=typeof l=="number"&&l<0,I=Iy(R)&&N,F=k3(),V=F?a:!0,j=!V||F&&g,q=Xn(s),Z=Xn(l),B=Xn(c),z=yo(),L=JC(),H=k.useRef(null),U=k.useRef(null),P=k.useRef(!1),Y=k.useRef(!1),D=k.useRef(-1),$=k.useRef(-1),G=L!=null,O=Fp(T),J=jn(function(ue){return ue===void 0&&(ue=O),ue?Rh(ue,Zc()):[]}),ee=jn(ue=>{const Ee=J(ue);return q.current.map(Ce=>R&&Ce==="reference"?R:O&&Ce==="floating"?O:Ee).filter(Boolean).flat()});k.useEffect(()=>{if(r||!f)return;function ue(Ce){if(Ce.key==="Tab"){kr(O,ro(pr(O)))&&J().length===0&&!I&&or(Ce);const Me=ee(),ve=io(Ce);q.current[0]==="reference"&&ve===R&&(or(Ce),Ce.shiftKey?Ho(Me[Me.length-1]):Ho(Me[1])),q.current[1]==="floating"&&ve===O&&Ce.shiftKey&&(or(Ce),Ho(Me[0]))}}const Ee=pr(O);return Ee.addEventListener("keydown",ue),()=>{Ee.removeEventListener("keydown",ue)}},[r,R,O,f,q,I,J,ee]),k.useEffect(()=>{if(r||!T)return;function ue(Ee){const Ce=io(Ee),ve=J().indexOf(Ce);ve!==-1&&(D.current=ve)}return T.addEventListener("focusin",ue),()=>{T.removeEventListener("focusin",ue)}},[r,T,J]),k.useEffect(()=>{if(r||!m)return;function ue(){Y.current=!0,setTimeout(()=>{Y.current=!1})}function Ee(ve){const xe=ve.relatedTarget,De=ve.currentTarget,Ne=io(ve);queueMicrotask(()=>{const Ie=C(),ge=!(kr(R,xe)||kr(T,xe)||kr(xe,T)||kr(L?.portalNode,xe)||xe!=null&&xe.hasAttribute(El("focus-guard"))||z&&(Zo(z.nodesRef.current,Ie).find(fe=>{var se,ne;return kr((se=fe.context)==null?void 0:se.elements.floating,xe)||kr((ne=fe.context)==null?void 0:ne.elements.domReference,xe)})||j1(z.nodesRef.current,Ie).find(fe=>{var se,ne,_e;return[(se=fe.context)==null?void 0:se.elements.floating,Fp((ne=fe.context)==null?void 0:ne.elements.floating)].includes(xe)||((_e=fe.context)==null?void 0:_e.elements.domReference)===xe})));if(De===R&&O&&Y1(O,q),p&&De!==R&&!(Ne!=null&&Ne.isConnected)&&ro(pr(O))===pr(O).body){jt(O)&&O.focus();const fe=D.current,se=J(),ne=se[fe]||se[se.length-1]||O;jt(ne)&&ne.focus()}if(E.current.insideReactTree){E.current.insideReactTree=!1;return}(I||!f)&&xe&&ge&&!Y.current&&xe!==W1()&&(P.current=!0,w(!1,ve,"focus-out"))})}const Ce=!!(!z&&L);function Me(){cr($),E.current.insideReactTree=!0,$.current=window.setTimeout(()=>{E.current.insideReactTree=!1})}if(T&&jt(R))return R.addEventListener("focusout",Ee),R.addEventListener("pointerdown",ue),T.addEventListener("focusout",Ee),Ce&&T.addEventListener("focusout",Me,!0),()=>{R.removeEventListener("focusout",Ee),R.removeEventListener("pointerdown",ue),T.removeEventListener("focusout",Ee),Ce&&T.removeEventListener("focusout",Me,!0)}},[r,R,T,O,f,z,L,w,m,p,J,I,C,q,E]);const ie=k.useRef(null),he=k.useRef(null),le=Z1([ie,L?.beforeInsideRef]),ke=Z1([he,L?.afterInsideRef]);k.useEffect(()=>{var ue,Ee;if(r||!T)return;const Ce=Array.from((L==null||(ue=L.portalNode)==null?void 0:ue.querySelectorAll("["+El("portal")+"]"))||[]),ve=(Ee=(z?j1(z.nodesRef.current,C()):[]).find(Ne=>{var Ie;return Iy(((Ie=Ne.context)==null?void 0:Ie.elements.domReference)||null)}))==null||(Ee=Ee.context)==null?void 0:Ee.elements.domReference,xe=[T,ve,...Ce,...A(),H.current,U.current,ie.current,he.current,L?.beforeOutsideRef.current,L?.afterOutsideRef.current,q.current.includes("reference")||I?R:null].filter(Ne=>Ne!=null),De=f||I?V1(xe,!j,j):V1(xe);return()=>{De()}},[r,R,T,f,q,L,I,V,j,z,C,A]),cn(()=>{if(r||!jt(O))return;const ue=pr(O),Ee=ro(ue);queueMicrotask(()=>{const Ce=ee(O),Me=Z.current,ve=(typeof Me=="number"?Ce[Me]:Me.current)||O,xe=kr(O,Ee);!N&&!xe&&x&&Ho(ve,{preventScroll:ve===O})})},[r,x,O,N,ee,Z]),cn(()=>{if(r||!O)return;const ue=pr(O),Ee=ro(ue);T3(Ee);function Ce(xe){let{reason:De,event:Ne,nested:Ie}=xe;if(["hover","safe-polygon"].includes(De)&&Ne.type==="mouseleave"&&(P.current=!0),De==="outside-press")if(Ie)P.current=!1;else if(LC(Ne)||PC(Ne))P.current=!1;else{let ge=!1;document.createElement("div").focus({get preventScroll(){return ge=!0,!1}}),ge?P.current=!1:P.current=!0}}_.on("openchange",Ce);const Me=ue.createElement("span");Me.setAttribute("tabindex","-1"),Me.setAttribute("aria-hidden","true"),Object.assign(Me.style,Oh),G&&R&&R.insertAdjacentElement("afterend",Me);function ve(){if(typeof B.current=="boolean"){const xe=R||W1();return xe&&xe.isConnected?xe:Me}return B.current.current||Me}return()=>{_.off("openchange",Ce);const xe=ro(ue),De=kr(T,xe)||z&&Zo(z.nodesRef.current,C(),!1).some(Ie=>{var ge;return kr((ge=Ie.context)==null?void 0:ge.elements.floating,xe)}),Ne=ve();queueMicrotask(()=>{const Ie=_3(Ne);B.current&&!P.current&&jt(Ie)&&(!(Ie!==xe&&xe!==ue.body)||De)&&Ie.focus({preventScroll:!0}),Me.remove()})}},[r,T,O,B,E,_,z,G,R,C]),k.useEffect(()=>(queueMicrotask(()=>{P.current=!1}),()=>{queueMicrotask(Qv)}),[r]),cn(()=>{if(!r&&L)return L.setFocusManagerState({modal:f,closeOnFocusOut:m,open:x,onOpenChange:w,domReference:R}),()=>{L.setFocusManagerState(null)}},[r,L,f,x,w,m,R]),cn(()=>{r||O&&Y1(O,q)},[r,O,q]);function Te(ue){return r||!h||!f?null:v.jsx(R3,{ref:ue==="start"?H:U,onClick:Ee=>w(!1,Ee.nativeEvent),children:typeof h=="string"?h:"Dismiss"})}const Pe=!r&&V&&(f?!I:!0)&&(G||f);return v.jsxs(v.Fragment,{children:[Pe&&v.jsx(Up,{"data-type":"inside",ref:le,onFocus:ue=>{if(f){const Ce=ee();Ho(s[0]==="reference"?Ce[0]:Ce[Ce.length-1])}else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(P.current=!1,rc(ue,L.portalNode)){const Ce=BC(R);Ce?.focus()}else{var Ee;(Ee=L.beforeOutsideRef.current)==null||Ee.focus()}}}),!I&&Te("start"),n,Te("end"),Pe&&v.jsx(Up,{"data-type":"inside",ref:ke,onFocus:ue=>{if(f)Ho(ee()[0]);else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(m&&(P.current=!0),rc(ue,L.portalNode)){const Ce=FC(R);Ce?.focus()}else{var Ee;(Ee=L.afterOutsideRef.current)==null||Ee.focus()}}})]})}function X1(e){return jt(e.target)&&e.target.tagName==="BUTTON"}function C3(e){return jt(e.target)&&e.target.tagName==="A"}function Q1(e){return jC(e)}function eA(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,elements:{domReference:a}}=e,{enabled:l=!0,event:c="click",toggle:p=!0,ignoreMouse:f=!1,keyboardHandlers:h=!0,stickIfOpen:m=!0}=t,g=k.useRef(),b=k.useRef(!1),x=k.useMemo(()=>({onPointerDown(w){g.current=w.pointerType},onMouseDown(w){const _=g.current;w.button===0&&c!=="click"&&(gc(_,!0)&&f||(n&&p&&(!(s.current.openEvent&&m)||s.current.openEvent.type==="mousedown")?r(!1,w.nativeEvent,"click"):(w.preventDefault(),r(!0,w.nativeEvent,"click"))))},onClick(w){const _=g.current;if(c==="mousedown"&&g.current){g.current=void 0;return}gc(_,!0)&&f||(n&&p&&(!(s.current.openEvent&&m)||s.current.openEvent.type==="click")?r(!1,w.nativeEvent,"click"):r(!0,w.nativeEvent,"click"))},onKeyDown(w){g.current=void 0,!(w.defaultPrevented||!h||X1(w))&&(w.key===" "&&!Q1(a)&&(w.preventDefault(),b.current=!0),!C3(w)&&w.key==="Enter"&&r(!(n&&p),w.nativeEvent,"click"))},onKeyUp(w){w.defaultPrevented||!h||X1(w)||Q1(a)||w.key===" "&&b.current&&(b.current=!1,r(!(n&&p),w.nativeEvent,"click"))}}),[s,a,c,f,h,r,n,m,p]);return k.useMemo(()=>l?{reference:x}:{},[l,x])}const A3={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},N3={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},J1=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function tA(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:s,dataRef:a}=e,{enabled:l=!0,escapeKey:c=!0,outsidePress:p=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:g=!1,bubbles:b,capture:x}=t,w=yo(),_=jn(typeof p=="function"?p:()=>!1),E=typeof p=="function"?_:p,R=k.useRef(!1),{escapeKey:T,outsidePress:C}=J1(b),{escapeKey:A,outsidePress:N}=J1(x),I=k.useRef(!1),F=jn(z=>{var L;if(!n||!l||!c||z.key!=="Escape"||I.current)return;const H=(L=a.current.floatingContext)==null?void 0:L.nodeId,U=w?Zo(w.nodesRef.current,H):[];if(!T&&(z.stopPropagation(),U.length>0)){let P=!0;if(U.forEach(Y=>{var D;if((D=Y.context)!=null&&D.open&&!Y.context.dataRef.current.__escapeKeyBubbles){P=!1;return}}),!P)return}r(!1,e3(z)?z.nativeEvent:z,"escape-key")}),V=jn(z=>{var L;const H=()=>{var U;F(z),(U=io(z))==null||U.removeEventListener("keydown",H)};(L=io(z))==null||L.addEventListener("keydown",H)}),j=jn(z=>{var L;const H=a.current.insideReactTree;a.current.insideReactTree=!1;const U=R.current;if(R.current=!1,f==="click"&&U||H||typeof E=="function"&&!E(z))return;const P=io(z),Y="["+El("inert")+"]",D=pr(s.floating).querySelectorAll(Y);let $=yt(P)?P:null;for(;$&&!mi($);){const ee=Ui($);if(mi(ee)||!yt(ee))break;$=ee}if(D.length&&yt(P)&&!Q$(P)&&!kr(P,s.floating)&&Array.from(D).every(ee=>!kr($,ee)))return;if(jt(P)&&B){const ee=mi(P),ie=Er(P),he=/auto|scroll/,le=ee||he.test(ie.overflowX),ke=ee||he.test(ie.overflowY),Te=le&&P.clientWidth>0&&P.scrollWidth>P.clientWidth,Pe=ke&&P.clientHeight>0&&P.scrollHeight>P.clientHeight,ue=ie.direction==="rtl",Ee=Pe&&(ue?z.offsetX<=P.offsetWidth-P.clientWidth:z.offsetX>P.clientWidth),Ce=Te&&z.offsetY>P.clientHeight;if(Ee||Ce)return}const G=(L=a.current.floatingContext)==null?void 0:L.nodeId,O=w&&Zo(w.nodesRef.current,G).some(ee=>{var ie;return Cb(z,(ie=ee.context)==null?void 0:ie.elements.floating)});if(Cb(z,s.floating)||Cb(z,s.domReference)||O)return;const J=w?Zo(w.nodesRef.current,G):[];if(J.length>0){let ee=!0;if(J.forEach(ie=>{var he;if((he=ie.context)!=null&&he.open&&!ie.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}r(!1,z,"outside-press")}),q=jn(z=>{var L;const H=()=>{var U;j(z),(U=io(z))==null||U.removeEventListener(f,H)};(L=io(z))==null||L.addEventListener(f,H)});k.useEffect(()=>{if(!n||!l)return;a.current.__escapeKeyBubbles=T,a.current.__outsidePressBubbles=C;let z=-1;function L(D){r(!1,D,"ancestor-scroll")}function H(){window.clearTimeout(z),I.current=!0}function U(){z=window.setTimeout(()=>{I.current=!1},Lc()?5:0)}const P=pr(s.floating);c&&(P.addEventListener("keydown",A?V:F,A),P.addEventListener("compositionstart",H),P.addEventListener("compositionend",U)),E&&P.addEventListener(f,N?q:j,N);let Y=[];return g&&(yt(s.domReference)&&(Y=ao(s.domReference)),yt(s.floating)&&(Y=Y.concat(ao(s.floating))),!yt(s.reference)&&s.reference&&s.reference.contextElement&&(Y=Y.concat(ao(s.reference.contextElement)))),Y=Y.filter(D=>{var $;return D!==(($=P.defaultView)==null?void 0:$.visualViewport)}),Y.forEach(D=>{D.addEventListener("scroll",L,{passive:!0})}),()=>{c&&(P.removeEventListener("keydown",A?V:F,A),P.removeEventListener("compositionstart",H),P.removeEventListener("compositionend",U)),E&&P.removeEventListener(f,N?q:j,N),Y.forEach(D=>{D.removeEventListener("scroll",L)}),window.clearTimeout(z)}},[a,s,c,E,f,n,r,g,l,T,C,F,A,V,j,N,q]),k.useEffect(()=>{a.current.insideReactTree=!1},[a,E,f]);const Z=k.useMemo(()=>({onKeyDown:F,...h&&{[A3[m]]:z=>{r(!1,z.nativeEvent,"reference-press")},...m!=="click"&&{onClick(z){r(!1,z.nativeEvent,"reference-press")}}}}),[F,r,h,m]),B=k.useMemo(()=>({onKeyDown:F,onMouseDown(){R.current=!0},onMouseUp(){R.current=!0},[N3[f]]:()=>{a.current.insideReactTree=!0}}),[F,f,a]);return k.useMemo(()=>l?{reference:Z,floating:B}:{},[l,Z,B])}function O3(e){const{open:t=!1,onOpenChange:n,elements:r}=e,s=Nh(),a=k.useRef({}),[l]=k.useState(()=>GC()),c=bo()!=null,[p,f]=k.useState(r.reference),h=jn((b,x,w)=>{a.current.openEvent=b?x:void 0,l.emit("openchange",{open:b,event:x,reason:w,nested:c}),n?.(b,x,w)}),m=k.useMemo(()=>({setPositionReference:f}),[]),g=k.useMemo(()=>({reference:p||r.reference||null,floating:r.floating||null,domReference:r.reference}),[p,r.reference,r.floating]);return k.useMemo(()=>({dataRef:a,open:t,onOpenChange:h,elements:g,events:l,floatingId:s,refs:m}),[t,h,g,l,s,m])}function nA(e){e===void 0&&(e={});const{nodeId:t}=e,n=O3({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,s=r.elements,[a,l]=k.useState(null),[c,p]=k.useState(null),h=s?.domReference||a,m=k.useRef(null),g=yo();cn(()=>{h&&(m.current=h)},[h]);const b=YR({...e,elements:{...s,...c&&{reference:c}}}),x=k.useCallback(T=>{const C=yt(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),getClientRects:()=>T.getClientRects(),contextElement:T}:T;p(C),b.refs.setReference(C)},[b.refs]),w=k.useCallback(T=>{(yt(T)||T===null)&&(m.current=T,l(T)),(yt(b.refs.reference.current)||b.refs.reference.current===null||T!==null&&!yt(T))&&b.refs.setReference(T)},[b.refs]),_=k.useMemo(()=>({...b.refs,setReference:w,setPositionReference:x,domReference:m}),[b.refs,w,x]),E=k.useMemo(()=>({...b.elements,domReference:h}),[b.elements,h]),R=k.useMemo(()=>({...b,...r,refs:_,elements:E,nodeId:t}),[b,_,E,t,r]);return cn(()=>{r.dataRef.current.floatingContext=R;const T=g?.nodesRef.current.find(C=>C.id===t);T&&(T.context=R)}),k.useMemo(()=>({...b,context:R,refs:_,elements:E}),[b,_,E,R])}function Db(e,t,n){const r=new Map,s=n==="item";let a=e;if(s&&e){const{[$1]:l,[B1]:c,...p}=e;a=p}return{...n==="floating"&&{tabIndex:-1,[d3]:""},...a,...t.map(l=>{const c=l?l[n]:null;return typeof c=="function"?e?c(e):null:c}).concat(e).reduce((l,c)=>(c&&Object.entries(c).forEach(p=>{let[f,h]=p;if(!(s&&[$1,B1].includes(f)))if(f.indexOf("on")===0){if(r.has(f)||r.set(f,[]),typeof h=="function"){var m;(m=r.get(f))==null||m.push(h),l[f]=function(){for(var g,b=arguments.length,x=new Array(b),w=0;w<b;w++)x[w]=arguments[w];return(g=r.get(f))==null?void 0:g.map(_=>_(...x)).find(_=>_!==void 0)}}}else l[f]=h}),l),{})}}function rA(e){e===void 0&&(e=[]);const t=e.map(c=>c?.reference),n=e.map(c=>c?.floating),r=e.map(c=>c?.item),s=k.useCallback(c=>Db(c,e,"reference"),t),a=k.useCallback(c=>Db(c,e,"floating"),n),l=k.useCallback(c=>Db(c,e,"item"),r);return k.useMemo(()=>({getReferenceProps:s,getFloatingProps:a,getItemProps:l}),[s,a,l])}const M3="Escape";function Mh(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function $d(e,t){return Mh(t,e===HC||e===Ah,e===Yc||e===Xc)}function zb(e,t,n){return Mh(t,e===Ah,n?e===Yc:e===Xc)||e==="Enter"||e===" "||e===""}function eE(e,t,n){return Mh(t,n?e===Yc:e===Xc,e===Ah)}function tE(e,t,n,r){const s=n?e===Xc:e===Yc,a=e===HC;return t==="both"||t==="horizontal"&&r&&r>1?e===M3:Mh(t,s,a)}function iA(e,t){const{open:n,onOpenChange:r,elements:s,floatingId:a}=e,{listRef:l,activeIndex:c,onNavigate:p=()=>{},enabled:f=!0,selectedIndex:h=null,allowEscape:m=!1,loop:g=!1,nested:b=!1,rtl:x=!1,virtual:w=!1,focusItemOnOpen:_="auto",focusItemOnHover:E=!0,openOnArrowKeyDown:R=!0,disabledIndices:T=void 0,orientation:C="vertical",parentOrientation:A,cols:N=1,scrollItemIntoView:I=!0,virtualItemRef:F,itemSizes:V,dense:j=!1}=t,q=Fp(s.floating),Z=Xn(q),B=bo(),z=yo();cn(()=>{e.dataRef.current.orientation=C},[e,C]);const L=jn(()=>{p(P.current===-1?null:P.current)}),H=Iy(s.domReference),U=k.useRef(_),P=k.useRef(h??-1),Y=k.useRef(null),D=k.useRef(!0),$=k.useRef(L),G=k.useRef(!!s.floating),O=k.useRef(n),J=k.useRef(!1),ee=k.useRef(!1),ie=Xn(T),he=Xn(n),le=Xn(I),ke=Xn(h),[Te,Pe]=k.useState(),[ue,Ee]=k.useState(),Ce=jn(()=>{function fe(te){if(w){var ae;(ae=te.id)!=null&&ae.endsWith("-fui-option")&&(te.id=a+"-"+Math.random().toString(16).slice(2,10)),Pe(te.id),z?.events.emit("virtualfocus",te),F&&(F.current=te)}else Ho(te,{sync:J.current,preventScroll:!0})}const se=l.current[P.current],ne=ee.current;se&&fe(se),(J.current?te=>te():requestAnimationFrame)(()=>{const te=l.current[P.current]||se;if(!te)return;se||fe(te);const ae=le.current;ae&&ve&&(ne||!D.current)&&(te.scrollIntoView==null||te.scrollIntoView(typeof ae=="boolean"?{block:"nearest",inline:"nearest"}:ae))})});cn(()=>{f&&(n&&s.floating?U.current&&h!=null&&(ee.current=!0,P.current=h,L()):G.current&&(P.current=-1,$.current()))},[f,n,s.floating,h,L]),cn(()=>{if(f&&n&&s.floating)if(c==null){if(J.current=!1,ke.current!=null)return;if(G.current&&(P.current=-1,Ce()),(!O.current||!G.current)&&U.current&&(Y.current!=null||U.current===!0&&Y.current==null)){let fe=0;const se=()=>{l.current[0]==null?(fe<2&&(fe?requestAnimationFrame:queueMicrotask)(se),fe++):(P.current=Y.current==null||zb(Y.current,C,x)||b?Ab(l,ie.current):L1(l,ie.current),Y.current=null,L())};se()}}else nc(l,c)||(P.current=c,Ce(),ee.current=!1)},[f,n,s.floating,c,ke,b,l,C,x,L,Ce,ie]),cn(()=>{var fe;if(!f||s.floating||!z||w||!G.current)return;const se=z.nodesRef.current,ne=(fe=se.find(ae=>ae.id===B))==null||(fe=fe.context)==null?void 0:fe.elements.floating,_e=ro(pr(s.floating)),te=se.some(ae=>ae.context&&kr(ae.context.elements.floating,_e));ne&&!te&&D.current&&ne.focus({preventScroll:!0})},[f,s.floating,z,B,w]),cn(()=>{if(!f||!z||!w||B)return;function fe(se){Ee(se.id),F&&(F.current=se)}return z.events.on("virtualfocus",fe),()=>{z.events.off("virtualfocus",fe)}},[f,z,w,B,F]),cn(()=>{$.current=L,O.current=n,G.current=!!s.floating}),cn(()=>{n||(Y.current=null,U.current=_)},[n,_]);const Me=c!=null,ve=k.useMemo(()=>{function fe(ne){if(!he.current)return;const _e=l.current.indexOf(ne);_e!==-1&&P.current!==_e&&(P.current=_e,L())}return{onFocus(ne){let{currentTarget:_e}=ne;J.current=!0,fe(_e)},onClick:ne=>{let{currentTarget:_e}=ne;return _e.focus({preventScroll:!0})},onMouseMove(ne){let{currentTarget:_e}=ne;J.current=!0,ee.current=!1,E&&fe(_e)},onPointerLeave(ne){let{pointerType:_e}=ne;if(!(!D.current||_e==="touch")&&(J.current=!0,!!E&&(P.current=-1,L(),!w))){var te;(te=Z.current)==null||te.focus({preventScroll:!0})}}}},[he,Z,E,l,L,w]),xe=k.useCallback(()=>{var fe;return A??(z==null||(fe=z.nodesRef.current.find(se=>se.id===B))==null||(fe=fe.context)==null||(fe=fe.dataRef)==null?void 0:fe.current.orientation)},[B,z,A]),De=jn(fe=>{if(D.current=!1,J.current=!0,fe.which===229||!he.current&&fe.currentTarget===Z.current)return;if(b&&tE(fe.key,C,x,N)){$d(fe.key,xe())||or(fe),r(!1,fe.nativeEvent,"list-navigation"),jt(s.domReference)&&(w?z?.events.emit("virtualfocus",s.domReference):s.domReference.focus());return}const se=P.current,ne=Ab(l,T),_e=L1(l,T);if(H||(fe.key==="Home"&&(or(fe),P.current=ne,L()),fe.key==="End"&&(or(fe),P.current=_e,L())),N>1){const te=V||Array.from({length:l.current.length},()=>({width:1,height:1})),ae=a3(te,N,j),ze=ae.findIndex(Ye=>Ye!=null&&!vp(l,Ye,T)),Ue=ae.reduce((Ye,rt,st)=>rt!=null&&!vp(l,rt,T)?st:Ye,-1),Ge=ae[o3({current:ae.map(Ye=>Ye!=null?l.current[Ye]:null)},{event:fe,orientation:C,loop:g,rtl:x,cols:N,disabledIndices:u3([...(typeof T!="function"?T:null)||l.current.map((Ye,rt)=>vp(l,rt,T)?rt:void 0),void 0],ae),minIndex:ze,maxIndex:Ue,prevIndex:l3(P.current>_e?ne:P.current,te,ae,N,fe.key===Ah?"bl":fe.key===(x?Yc:Xc)?"tr":"tl"),stopEvent:!0})];if(Ge!=null&&(P.current=Ge,L()),C==="both")return}if($d(fe.key,C)){if(or(fe),n&&!w&&ro(fe.currentTarget.ownerDocument)===fe.currentTarget){P.current=zb(fe.key,C,x)?ne:_e,L();return}zb(fe.key,C,x)?g?P.current=se>=_e?m&&se!==l.current.length?-1:ne:fr(l,{startingIndex:se,disabledIndices:T}):P.current=Math.min(_e,fr(l,{startingIndex:se,disabledIndices:T})):g?P.current=se<=ne?m&&se!==-1?l.current.length:_e:fr(l,{startingIndex:se,decrement:!0,disabledIndices:T}):P.current=Math.max(ne,fr(l,{startingIndex:se,decrement:!0,disabledIndices:T})),nc(l,P.current)&&(P.current=-1),L()}}),Ne=k.useMemo(()=>w&&n&&Me&&{"aria-activedescendant":ue||Te},[w,n,Me,ue,Te]),Ie=k.useMemo(()=>({"aria-orientation":C==="both"?void 0:C,...H?{}:Ne,onKeyDown:De,onPointerMove(){D.current=!0}}),[Ne,De,C,H]),ge=k.useMemo(()=>{function fe(ne){_==="auto"&&LC(ne.nativeEvent)&&(U.current=!0)}function se(ne){U.current=_,_==="auto"&&PC(ne.nativeEvent)&&(U.current=!0)}return{...Ne,onKeyDown(ne){D.current=!1;const _e=ne.key.startsWith("Arrow"),te=["Home","End"].includes(ne.key),ae=_e||te,ze=eE(ne.key,C,x),Ue=tE(ne.key,C,x,N),Ge=eE(ne.key,xe(),x),Ye=$d(ne.key,C),rt=(b?Ge:Ye)||ne.key==="Enter"||ne.key.trim()==="";if(w&&n){const it=z?.nodesRef.current.find(Xe=>Xe.parentId==null),vt=z&&it?J$(z.nodesRef.current,it.id):null;if(ae&&vt&&F){const Xe=new KeyboardEvent("keydown",{key:ne.key,bubbles:!0});if(ze||Ue){var st,ot;const Dt=((st=vt.context)==null?void 0:st.elements.domReference)===ne.currentTarget,Fe=Ue&&!Dt?(ot=vt.context)==null?void 0:ot.elements.domReference:ze?l.current.find(Ze=>Ze?.id===Te):null;Fe&&(or(ne),Fe.dispatchEvent(Xe),Ee(void 0))}if((Ye||te)&&vt.context&&vt.context.open&&vt.parentId&&ne.currentTarget!==vt.context.elements.domReference){var Et;or(ne),(Et=vt.context.elements.domReference)==null||Et.dispatchEvent(Xe);return}}return De(ne)}if(!(!n&&!R&&_e)){if(rt){const it=$d(ne.key,xe());Y.current=b&&it?null:ne.key}if(b){Ge&&(or(ne),n?(P.current=Ab(l,ie.current),L()):r(!0,ne.nativeEvent,"list-navigation"));return}Ye&&(h!=null&&(P.current=h),or(ne),!n&&R?r(!0,ne.nativeEvent,"list-navigation"):De(ne),n&&L())}},onFocus(){n&&!w&&(P.current=-1,L())},onPointerDown:se,onPointerEnter:se,onMouseDown:fe,onClick:fe}},[Te,Ne,N,De,ie,_,l,b,L,r,n,R,C,xe,x,h,z,w,F]);return k.useMemo(()=>f?{reference:ge,floating:Ie,item:ve}:{},[f,ge,Ie,ve])}const I3=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function sA(e,t){var n,r;t===void 0&&(t={});const{open:s,elements:a,floatingId:l}=e,{enabled:c=!0,role:p="dialog"}=t,f=Nh(),h=((n=a.domReference)==null?void 0:n.id)||f,m=k.useMemo(()=>{var R;return((R=Fp(a.floating))==null?void 0:R.id)||l},[a.floating,l]),g=(r=I3.get(p))!=null?r:p,x=bo()!=null,w=k.useMemo(()=>g==="tooltip"||p==="label"?{["aria-"+(p==="label"?"labelledby":"describedby")]:s?m:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":g==="alertdialog"?"dialog":g,"aria-controls":s?m:void 0,...g==="listbox"&&{role:"combobox"},...g==="menu"&&{id:h},...g==="menu"&&x&&{role:"menuitem"},...p==="select"&&{"aria-autocomplete":"none"},...p==="combobox"&&{"aria-autocomplete":"list"}},[g,m,x,s,h,p]),_=k.useMemo(()=>{const R={id:m,...g&&{role:g}};return g==="tooltip"||p==="label"?R:{...R,...g==="menu"&&{"aria-labelledby":h}}},[g,m,h,p]),E=k.useCallback(R=>{let{active:T,selected:C}=R;const A={role:"option",...T&&{id:m+"-fui-option"}};switch(p){case"select":case"combobox":return{...A,"aria-selected":C}}return{}},[m,p]);return k.useMemo(()=>c?{reference:w,floating:_,item:E}:{},[c,w,_,E])}const nE=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Wa(e,t){return typeof e=="function"?e(t):e}function D3(e,t){const[n,r]=k.useState(e);return e&&!n&&r(!0),k.useEffect(()=>{if(!e&&n){const s=setTimeout(()=>r(!1),t);return()=>clearTimeout(s)}},[e,n,t]),n}function z3(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:s=250}=t,l=(typeof s=="number"?s:s.close)||0,[c,p]=k.useState("unmounted"),f=D3(n,l);return!f&&c==="close"&&p("unmounted"),cn(()=>{if(r){if(n){p("initial");const h=requestAnimationFrame(()=>{Ci.flushSync(()=>{p("open")})});return()=>{cancelAnimationFrame(h)}}p("close")}},[n,r]),{isMounted:f,status:c}}function oA(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:s,common:a,duration:l=250}=t,c=e.placement,p=c.split("-")[0],f=k.useMemo(()=>({side:p,placement:c}),[p,c]),h=typeof l=="number",m=(h?l:l.open)||0,g=(h?l:l.close)||0,[b,x]=k.useState(()=>({...Wa(a,f),...Wa(n,f)})),{isMounted:w,status:_}=z3(e,{duration:l}),E=Xn(n),R=Xn(r),T=Xn(s),C=Xn(a);return cn(()=>{const A=Wa(E.current,f),N=Wa(T.current,f),I=Wa(C.current,f),F=Wa(R.current,f)||Object.keys(A).reduce((V,j)=>(V[j]="",V),{});if(_==="initial"&&x(V=>({transitionProperty:V.transitionProperty,...I,...A})),_==="open"&&x({transitionProperty:Object.keys(F).map(nE).join(","),transitionDuration:m+"ms",...I,...F}),_==="close"){const V=N||A;x({transitionProperty:Object.keys(V).map(nE).join(","),transitionDuration:g+"ms",...I,...V})}},[g,T,E,R,C,m,_,f]),{isMounted:w,styles:b}}function aA(e,t){var n;const{open:r,dataRef:s}=e,{listRef:a,activeIndex:l,onMatch:c,onTypingChange:p,enabled:f=!0,findMatch:h=null,resetMs:m=750,ignoreKeys:g=[],selectedIndex:b=null}=t,x=k.useRef(-1),w=k.useRef(""),_=k.useRef((n=b??l)!=null?n:-1),E=k.useRef(null),R=jn(c),T=jn(p),C=Xn(h),A=Xn(g);cn(()=>{r&&(cr(x),E.current=null,w.current="")},[r]),cn(()=>{if(r&&w.current===""){var j;_.current=(j=b??l)!=null?j:-1}},[r,b,l]);const N=jn(j=>{j?s.current.typing||(s.current.typing=j,T(j)):s.current.typing&&(s.current.typing=j,T(j))}),I=jn(j=>{function q(H,U,P){const Y=C.current?C.current(U,P):U.find(D=>D?.toLocaleLowerCase().indexOf(P.toLocaleLowerCase())===0);return Y?H.indexOf(Y):-1}const Z=a.current;if(w.current.length>0&&w.current[0]!==" "&&(q(Z,Z,w.current)===-1?N(!1):j.key===" "&&or(j)),Z==null||A.current.includes(j.key)||j.key.length!==1||j.ctrlKey||j.metaKey||j.altKey)return;r&&j.key!==" "&&(or(j),N(!0)),Z.every(H=>{var U,P;return H?((U=H[0])==null?void 0:U.toLocaleLowerCase())!==((P=H[1])==null?void 0:P.toLocaleLowerCase()):!0})&&w.current===j.key&&(w.current="",_.current=E.current),w.current+=j.key,cr(x),x.current=window.setTimeout(()=>{w.current="",_.current=E.current,N(!1)},m);const z=_.current,L=q(Z,[...Z.slice((z||0)+1),...Z.slice(0,(z||0)+1)],w.current);L!==-1?(R(L),E.current=L):j.key!==" "&&(w.current="",N(!1))}),F=k.useMemo(()=>({onKeyDown:I}),[I]),V=k.useMemo(()=>({onKeyDown:I,onKeyUp(j){j.key===" "&&N(!1)}}),[I,N]);return k.useMemo(()=>f?{reference:F,floating:V}:{},[f,F,V])}function lA(e,t,n){return n===void 0&&(n=!0),e.filter(s=>{var a;return s.parentId===t&&(!n||((a=s.context)==null?void 0:a.open))}).flatMap(s=>[s,...lA(e,s.id,n)])}function rE(e,t){const[n,r]=e;let s=!1;const a=t.length;for(let l=0,c=a-1;l<a;c=l++){const[p,f]=t[l]||[0,0],[h,m]=t[c]||[0,0];f>=r!=m>=r&&n<=(h-p)*(r-f)/(m-f)+p&&(s=!s)}return s}function j3(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function uA(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,s={current:-1};let a=!1,l=null,c=null,p=typeof performance<"u"?performance.now():0;function f(m,g){const b=performance.now(),x=b-p;if(l===null||c===null||x===0)return l=m,c=g,p=b,null;const w=m-l,_=g-c,R=Math.sqrt(w*w+_*_)/x;return l=m,c=g,p=b,R}const h=m=>{let{x:g,y:b,placement:x,elements:w,onClose:_,nodeId:E,tree:R}=m;return function(C){function A(){cr(s),_()}if(cr(s),!w.domReference||!w.floating||x==null||g==null||b==null)return;const{clientX:N,clientY:I}=C,F=[N,I],V=y3(C),j=C.type==="mouseleave",q=Mb(w.floating,V),Z=Mb(w.domReference,V),B=w.domReference.getBoundingClientRect(),z=w.floating.getBoundingClientRect(),L=x.split("-")[0],H=g>z.right-z.width/2,U=b>z.bottom-z.height/2,P=j3(F,B),Y=z.width>B.width,D=z.height>B.height,$=(Y?B:z).left,G=(Y?B:z).right,O=(D?B:z).top,J=(D?B:z).bottom;if(q&&(a=!0,!j))return;if(Z&&(a=!1),Z&&!j){a=!0;return}if(j&&yt(C.relatedTarget)&&Mb(w.floating,C.relatedTarget)||R&&lA(R.nodesRef.current,E).length)return;if(L==="top"&&b>=B.bottom-1||L==="bottom"&&b<=B.top+1||L==="left"&&g>=B.right-1||L==="right"&&g<=B.left+1)return A();let ee=[];switch(L){case"top":ee=[[$,B.top+1],[$,z.bottom-1],[G,z.bottom-1],[G,B.top+1]];break;case"bottom":ee=[[$,z.top+1],[$,B.bottom-1],[G,B.bottom-1],[G,z.top+1]];break;case"left":ee=[[z.right-1,J],[z.right-1,O],[B.left+1,O],[B.left+1,J]];break;case"right":ee=[[B.right-1,J],[B.right-1,O],[z.left+1,O],[z.left+1,J]];break}function ie(he){let[le,ke]=he;switch(L){case"top":{const Te=[Y?le+t/2:H?le+t*4:le-t*4,ke+t+1],Pe=[Y?le-t/2:H?le+t*4:le-t*4,ke+t+1],ue=[[z.left,H||Y?z.bottom-t:z.top],[z.right,H?Y?z.bottom-t:z.top:z.bottom-t]];return[Te,Pe,...ue]}case"bottom":{const Te=[Y?le+t/2:H?le+t*4:le-t*4,ke-t],Pe=[Y?le-t/2:H?le+t*4:le-t*4,ke-t],ue=[[z.left,H||Y?z.top+t:z.bottom],[z.right,H?Y?z.top+t:z.bottom:z.top+t]];return[Te,Pe,...ue]}case"left":{const Te=[le+t+1,D?ke+t/2:U?ke+t*4:ke-t*4],Pe=[le+t+1,D?ke-t/2:U?ke+t*4:ke-t*4];return[...[[U||D?z.right-t:z.left,z.top],[U?D?z.right-t:z.left:z.right-t,z.bottom]],Te,Pe]}case"right":{const Te=[le-t,D?ke+t/2:U?ke+t*4:ke-t*4],Pe=[le-t,D?ke-t/2:U?ke+t*4:ke-t*4],ue=[[U||D?z.left+t:z.right,z.top],[U?D?z.left+t:z.right:z.left+t,z.bottom]];return[Te,Pe,...ue]}}}if(!rE([N,I],ee)){if(a&&!P)return A();if(!j&&r){const he=f(C.clientX,C.clientY);if(he!==null&&he<.1)return A()}rE([N,I],ie([g,b]))?!a&&r&&(s.current=window.setTimeout(A,40)):A()}}};return h.__options={blockPointerEvents:n},h}function L3(e){return wn(e.defaultTagName??"div",e,e)}const P3=k.createContext(void 0);function $3(){return k.useContext(P3)}const jb={base:{kVAEAm:"ui-10l6tqk",krVfgx:"ui-r0fw0u",kCIrl2:"ui-7zl9wm",kzqmXN:"ui-jwey39",kZKoxP:"ui-wbbb81",kaIpWk:"ui-16rqkct",kfzvcC:"ui-47corl",$$css:!0},colorBlue:{kWkggS:"ui-1b558e3",$$css:!0},colorGreen:{kWkggS:"ui-15xcjd2",$$css:!0}};function B3(e){return[jb.base,e==="green"?jb.colorGreen:jb.colorBlue]}function F3({color:e="blue",className:t}){const n=Rn({rootClass:"ui-indicator-dot",stylexStyles:B3(e),className:t});return v.jsx("span",{"aria-hidden":!0,className:n.className,"data-color":e,style:n.style})}const U3={root:{kysU6D:"ui-jyslct",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kmuXW:"ui-2lah0s",kB7OPa:"ui-9f619",kLKAdn:"ui-exx8yu",kpe85a:"ui-1xpa7k",kGO01o:"ui-18d9i69",kE3dHu:"ui-1uhho1l",keoZOQ:"ui-dj266r",km5ZXQ:"ui-1yf7rl7",k1K539:"ui-at24cr",koQZXg:"ui-j3b58b",kMzoRj:"ui-c342km",ksu8eU:"ui-ng3xce",kaIpWk:"ui-1e1y6u3 ui-zmqr1 ui-id2qid ui-1twr5m9 ui-12ip6lu",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",k63SB2:"ui-1pd3egz",kLWn49:"ui-15bjb6t",kWkggS:"ui-px7pq3 ui-vzb8ri ui-1trtblk",kkrTdU:"ui-1ypdohk ui-1j1ks5o",kSiTet:"ui-1szrgyu",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kjBf7l:"ui-1uczgqu ui-1725o6r",kInvED:"ui-1wfwxd8 ui-7s97pk",kfzvcC:"ui-67bb7w ui-7gqb9v",kFalU9:"ui-ggy1nq",kVAEAm:"ui-1fxuinm",$$css:!0}},q3={root:{"--ui-button-bg":"ui-1ny5ihx ui-1a4icse ui-11avru9 ui-gc53xt ui-aq07m7 ui-xrmxsc","--ui-button-bg-hover":"ui-19r40ui ui-dq8yea ui-1rlkm3m ui-16yx911 ui-158em9s ui-1pjq0pd ui-akc1e3 ui-tggix7 ui-1vwqxyx","--ui-button-fg":"ui-1ob79qu ui-1yx7ign ui-1a1fpz7 ui-1kzwtjc ui-135v23r ui-won08w ui-1uhjvfl ui-15er956 ui-19o3xs9 ui-84m9o2 ui-2e8925 ui-6ihjvw ui-1y5zcs1 ui-naf39y ui-1jvl9fz ui-1vrtm4l ui-7owuad","--ui-button-fg-hover":"ui-dargq2 ui-642cp ui-1c2l02l ui-9di03z ui-13rrmb8 ui-i858fd ui-e0u7db ui-yotk09 ui-jkwokp ui-1gocfna ui-1m105qf ui-5v9tdr ui-zwyx12 ui-11n8ln3 ui-1by8bgs ui-1lb5e6d ui-15t60d",$$css:!0}},H3={root:{kMwMTN:"ui-4b2ntj ui-1dsx48b ui-53eerz ui-6968ae",kWkggS:"ui-jbqb8w ui-1mpvj69 ui-1omplom ui-rvwukm",kjBf7l:"ui-8zw9om ui-1l60kw4 ui-1725o6r ui-tn71jd ui-123tgl1 ui-urun0u",$$css:!0}},G3={xs:{kzqmXN:"ui-ek66a6",kZKoxP:"ui-1q5geii",$$css:!0},sm:{kzqmXN:"ui-1pwdyn5",kZKoxP:"ui-1vatr1o",$$css:!0},md:{kzqmXN:"ui-16bvwqk",kZKoxP:"ui-1a6rlst",$$css:!0},lg:{kzqmXN:"ui-1eu7oa3",kZKoxP:"ui-1e94bgo",$$css:!0}},V3={xs:{keoZOQ:"ui-u4j5zy",km5ZXQ:"ui-oxmne4",k1K539:"ui-11y930c",koQZXg:"ui-1vidcv1",$$css:!0},sm:{keoZOQ:"ui-zrgnep",km5ZXQ:"ui-1erxc0b",k1K539:"ui-11b1quy",koQZXg:"ui-3zwt15",$$css:!0},md:{keoZOQ:"ui-vqhhvk",km5ZXQ:"ui-1bxntau",k1K539:"ui-1dy9ubm",koQZXg:"ui-rwqdqc",$$css:!0},lg:{keoZOQ:"ui-kv60qn",km5ZXQ:"ui-1t00xno",k1K539:"ui-1hi8m59",koQZXg:"ui-eqy94b",$$css:!0}},Lu={root:U3.root,appearance:q3.root,tabMenu:H3.root,size:G3,contentFrame:V3},K3="md";function ho({icon:e,iconVariant:t="outline",variant:n="default",shape:r="rounded",frame:s="container",size:a,pressed:l,subtleHover:c,suppressHoverBackground:p=!1,color:f,isSuccess:h=!1,className:m,style:g,rootStyle:b,iconStyle:x,disabled:w,indicatorDot:_=!1,indicatorDotColor:E="blue","aria-label":R,"aria-labelledby":T,...C}){const A=Dl(),N=a??A?.iconButtonSize??K3,I=N==="lg"?"base":"sm",F=c??A?.iconButtonSubtleHover??!1,V=w??A?.disabled,q=l!==void 0||(n==="toggle"||n==="tab"),Z=q?l??!1:!1,B=h?"check":e,z=dn(Lu.root,Lu.appearance,Ju.appearance,Ju.press,(n==="primary"||n==="secondary")&&Ju.colors,Lu.size[N],s==="content"&&Lu.contentFrame[N],n==="tab-menu"&&Lu.tabMenu,b);return v.jsxs(fC,{...C,className:_n("ui-icon-button",z.className,m),style:{...z.style,...g},"data-variant":n,"data-shape":r!=="rounded"?r:void 0,"data-frame":s,"data-size":N,"data-color":f,"data-indicator-dot":_||void 0,"data-pressed":q?Z:void 0,"data-subtle-hover":F||void 0,"data-suppress-hover-background":p||void 0,disabled:V,"aria-label":R,"aria-labelledby":T,"aria-pressed":l,children:[typeof B=="string"?v.jsx(Mn,{name:B,rootStyle:x,variant:t,size:I,"aria-hidden":"true"}):v.jsx("span",{...{0:{className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1oai4fc ui-higkf7 ui-1tachi3 ui-o5v014 ui-1u4itkb"},1:{className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1oai4fc ui-higkf7 ui-1tachi3 ui-o5v014 ui-xfpx3u"}}[(I==="base")<<0],"aria-hidden":"true",children:B}),_?v.jsx(F3,{color:E}):null]})}function Z3(){return typeof navigator<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)}function ek(e){if(!(Z3()?e.metaKey:e.ctrlKey)||e.shiftKey||e.altKey)return!1;switch(e.key.toLowerCase()){case"a":return e.preventDefault(),e.nativeEvent.stopImmediatePropagation(),e.currentTarget.select(),!0;case"c":case"v":case"x":case"z":return e.nativeEvent.stopImmediatePropagation(),!0;default:return!1}}const Bd={base:{kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kWqL5O:"ui-gfja2r",kSWEuD:"ui-11pwa6s",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kZ1KPB:"ui-yj58a3",k4WBpm:"ui-1b16gh4",kWkggS:"ui-jbqb8w",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-12oo3zp",k8Qsv1:"ui-19ovir5",$$css:!0},disabled:{kkrTdU:"ui-1h6gzvc",k8Qsv1:"ui-ompknl",$$css:!0},mono:{kMv6JI:"ui-ul7cyv",$$css:!0},monoInput:{kGuDYH:"ui-pr5cyi",$$css:!0}};function W3({className:e,disabled:t=!1,mono:n=!1,ref:r,rootStyle:s,style:a,onKeyDown:l,...c}){const p=Rn({rootClass:"ui-input-group__input",stylexStyles:[Bd.base,t?Bd.disabled:null,n?Bd.mono:null,n?Bd.monoInput:null,s],className:e,style:a}),f=k.useCallback(h=>{l?.(h),!h.defaultPrevented&&ek(h)},[l]);return v.jsx("input",{ref:r,className:p.className,style:p.style,disabled:t,onKeyDown:f,...c})}const Lr={base:{"--ui-input-group-border-width":"ui-1cx02xk","--ui-input-group-padding-block":"ui-1we15r7","--ui-input-group-padding-inline":"ui-vnd6s4","--input-group-button-inset":"ui-1c59nzh",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kB7OPa:"ui-9f619",kzqmXN:"ui-h8yej3",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-1aeic0j ui-9afaxg ui-4vz0kq",kWqL5O:"ui-s1s249",kSWEuD:"ui-32b0ac",k26BEO:"ui-141kqco ui-7asvek ui-ajihsc",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-17fyfba ui-illscj ui-1rfq9xa",kZ1KPB:"ui-e0pwq",k4WBpm:"ui-19ypqd9",kaZRDh:"ui-1arpupx ui-vv26sj ui-15k81bw",kaIpWk:"ui-1043rbw",kLKAdn:"ui-e8kt42",kpe85a:"ui-1b1zv1o",kGO01o:"ui-1ftrzfz",kE3dHu:"ui-1bgzvkm",kWkggS:"ui-flfp0o",k1ekBW:"ui-1oy24xj",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0},disabled:{kLZC3w:"ui-1aeic0j",k26BEO:"ui-141kqco",kL6WhQ:"ui-17fyfba",kaZRDh:"ui-1arpupx",kkrTdU:"ui-1h6gzvc",kSiTet:"ui-byyjgo",$$css:!0},sizeBase:{"--ui-input-group-padding-block":"ui-174jhef","--ui-input-group-padding-inline":"ui-xlcw59","--input-group-button-inset":"ui-1ethuh",kZKoxP:"ui-1e94bgo",kOIVth:"ui-11twubx",$$css:!0},sizeLg:{"--ui-input-group-padding-block":"ui-174jhef","--ui-input-group-padding-inline":"ui-cby3z1","--input-group-button-inset":"ui-1u9w55t",kZKoxP:"ui-170hpbr",kOIVth:"ui-pkkfsy",$$css:!0},sizeXl:{"--ui-input-group-padding-block":"ui-17wxzvn","--ui-input-group-padding-inline":"ui-cby3z1","--input-group-button-inset":"ui-1ethuh",kOIVth:"ui-ehausa",$$css:!0},layoutTextarea:{kGNEyG:"ui-1cy8zhl",kZKoxP:"ui-t7dq6l",kAzted:"ui-16ry4p3",$$css:!0},layoutTextareaBase:{kAzted:"ui-t6xkjb",$$css:!0},layoutTextareaLg:{kAzted:"ui-16ry4p3",$$css:!0},frameContent:{kzqmXN:"ui-q8za26",kqGvvJ:"ui-1k4kybs",kUOVxO:"ui-d1nd0v",$$css:!0},variantElevated:{kWkggS:"ui-f1vpex",$$css:!0},variantGhost:{kWkggS:"ui-jbqb8w ui-qjnua1 ui-aig341",kLZC3w:"ui-1v8p93f",k26BEO:"ui-he5wa1",kL6WhQ:"ui-16stqrj",kaZRDh:"ui-1g4hjc",$$css:!0},variantUnfilled:{"--ui-input-group-border-width":"ui-qkl0tc","--ui-input-group-padding-block":"ui-1we15r7","--ui-input-group-padding-inline":"ui-vnd6s4",kWkggS:"ui-jbqb8w",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kLZC3w:"ui-1b4hy2t",kWqL5O:"ui-gfja2r",kSWEuD:"ui-11pwa6s",k26BEO:"ui-1ws9gjp",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kL6WhQ:"ui-1tnzt7h",kZ1KPB:"ui-yj58a3",k4WBpm:"ui-1b16gh4",kaZRDh:"ui-1pjslub",kOIVth:"ui-137clkk",kGVxlE:"ui-1gnnqk1 ui-15ysqaf",$$css:!0},variantUnfilledSize:{kZKoxP:"ui-t7dq6l",$$css:!0},shapePill:{kaIpWk:"ui-1i4c3av",$$css:!0}},Fd={field:{kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kWqL5O:"ui-gfja2r",kSWEuD:"ui-11pwa6s",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kZ1KPB:"ui-yj58a3",k4WBpm:"ui-1b16gh4",kWkggS:"ui-jbqb8w",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-12oo3zp",kAzted:"ui-10fesj9",kHenm0:"ui-tt52l0",kORKVm:"ui-10wlt62",k8Qsv1:"ui-19ovir5",$$css:!0},disabled:{kkrTdU:"ui-1h6gzvc",k8Qsv1:"ui-ompknl",$$css:!0},mono:{kMv6JI:"ui-ul7cyv",$$css:!0},collapseBlur:{kskxy:"ui-1kxtfma ui-5u5ifr",kORKVm:"ui-10wlt62",$$css:!0}},Tl={base:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kmuXW:"ui-2lah0s",kMwMTN:"ui-1mh7f6w",koQZXg:"ui-j3b58b ui-fn0i77",km5ZXQ:"ui-1yf7rl7 ui-1qpi6ia",$$css:!0},textareaLayout:{kAzted:"ui-1tn5z8q",$$css:!0}},iE={base:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kmuXW:"ui-2lah0s",kMwMTN:"ui-19aaqeu",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-12oo3zp",$$css:!0},mono:{kMv6JI:"ui-ul7cyv",$$css:!0}},Y3={base:Lr.sizeBase,lg:Lr.sizeLg,xl:Lr.sizeXl},X3={base:Lr.layoutTextareaBase,lg:Lr.layoutTextareaLg,xl:null},Q3={container:null,content:Lr.frameContent},J3={default:null,elevated:Lr.variantElevated,ghost:Lr.variantGhost,unfilled:Lr.variantUnfilled},e6={rounded:null,pill:Lr.shapePill},cA=k.createContext(null);function la(){const e=k.useContext(cA);if(!e)throw new Error("InputGroup compound components must be used within InputGroup.Root");return e}const t6={base:"sm",lg:"base",xl:"lg"},n6={base:"xs",lg:"sm",xl:"md"},r6={base:"xs",lg:"sm",xl:"md"};function sE({variant:e="default",frame:t="container",size:n="lg",shape:r="rounded",layout:s="default",mono:a=!1,disabled:l=!1,rootStyle:c,className:p,children:f}){const h=$3(),m=l||h?.disabled===!0,g=Rn({rootClass:"ui-input-group",stylexStyles:[Lr.base,Y3[n],s==="textarea"?Lr.layoutTextarea:null,s==="textarea"?X3[n]:null,Q3[t],J3[e],e==="unfilled"?Lr.variantUnfilledSize:null,e6[r],m?Lr.disabled:null,c],className:p});return v.jsx(cA.Provider,{value:{disabled:m,layout:s,mono:a},children:v.jsx(_s,{iconSize:t6[n],iconButtonSize:n6[n],buttonSize:r6[n],disabled:m||void 0,children:v.jsx("div",{className:g.className,style:g.style,"data-variant":e,"data-frame":t,"data-size":n,"data-shape":r!=="rounded"?r:void 0,"data-layout":s==="textarea"?"textarea":void 0,"data-mono":a||void 0,"data-disabled":m||void 0,children:f})})})}function i6({className:e,disabled:t,ref:n,rootStyle:r,style:s,...a}){const l=la(),c=l.disabled||t===!0;return v.jsx(N$,{...a,className:e,disabled:c,ref:n,render:v.jsx(W3,{mono:l.mono,rootStyle:r}),style:s})}function s6({className:e,disabled:t,ref:n,rootStyle:r,style:s,onKeyDown:a,onInput:l,onFocus:c,onBlur:p,minRows:f=1,maxRows:h,autoResize:m=!0,collapseToSingleLineWhenBlurred:g=!1,rows:b,value:x,placeholder:w,focusedPlaceholder:_,...E}){const R=la(),T=R.disabled||t===!0,C=Rn({rootClass:"ui-input-group__textarea",stylexStyles:[Fd.field,T?Fd.disabled:null,R.mono?Fd.mono:null,g?Fd.collapseBlur:null,r],className:e,style:s}),A=k.useRef(null),N=Wc([A,n]),[I,F]=k.useState(!1),V=f<1?1:f,j=h===void 0?void 0:h<V?V:h,q=k.useCallback(()=>{if(!m)return;const P=A.current;if(!P)return;if(j===V&&(b===void 0||b===V)){P.style.height="",P.style.overflowY="auto";return}P.style.height="auto";const Y=window.getComputedStyle(P),D=Number.parseFloat(Y.lineHeight),$=Number.parseFloat(Y.paddingTop)||0,G=Number.parseFloat(Y.paddingBottom)||0,O=Number.parseFloat(Y.borderTopWidth)||0,J=Number.parseFloat(Y.borderBottomWidth)||0,ee=$+G+O+J,ie=Number.isFinite(D)&&D>0?ee+D*V:0,he=j!==void 0&&Number.isFinite(D)&&D>0?ee+D*j:void 0,le=Math.max(P.scrollHeight,ie),ke=he!==void 0?Math.min(le,he):le;P.style.height=`${ke}px`,P.style.overflowY=he!==void 0&&P.scrollHeight>he?"auto":"hidden"},[m,j,V,b]);k.useLayoutEffect(()=>{q()},[x,q]);const Z=k.useCallback(P=>{a?.(P),!P.defaultPrevented&&ek(P)},[a]),B=k.useCallback(P=>{l?.(P),P.defaultPrevented||q()},[l,q]),z=k.useCallback(P=>{F(!0),c?.(P)},[c]),L=k.useCallback(P=>{F(!1),p?.(P)},[p]),H=b??V,U=I&&_!==void 0?_:w;return v.jsx("textarea",{ref:N,className:C.className,style:C.style,disabled:T,onKeyDown:Z,rows:H,value:x,placeholder:U,...E,"data-textarea-collapse-blur":g?"":void 0,onInput:B,onFocus:z,onBlur:L})}function o6({addonStyle:e,className:t,ref:n,...r}){const s=la(),a=Rn({rootClass:"ui-input-group__addon",stylexStyles:[Tl.base,s.layout==="textarea"?Tl.textareaLayout:null,e],className:t});return v.jsx("span",{className:a.className,style:a.style,children:v.jsx(Mn,{ref:n,...r})})}function a6({addonStyle:e,className:t,disabled:n,ref:r,...s}){const a=la(),l=a.disabled?!0:n,c=Rn({rootClass:"ui-input-group__addon",stylexStyles:[Tl.base,a.layout==="textarea"?Tl.textareaLayout:null,e],className:t});return v.jsx("span",{className:c.className,style:c.style,children:v.jsx(ho,{ref:r,disabled:l,...s})})}function l6({addonStyle:e,className:t,disabled:n,ref:r,...s}){const a=la(),l=a.disabled?!0:n,c=Rn({rootClass:"ui-input-group__addon",stylexStyles:[Tl.base,a.layout==="textarea"?Tl.textareaLayout:null,e],className:t});return v.jsx("span",{className:c.className,style:c.style,children:v.jsx(Ln,{ref:r,disabled:l,...s})})}function u6({className:e,children:t}){const n=la(),r=Rn({rootClass:"ui-input-group__span",stylexStyles:[iE.base,n.mono?iE.mono:null],className:e});return v.jsx("span",{className:r.className,style:r.style,children:t})}const Ud=Object.assign(sE,{Root:sE,Input:i6,Textarea:s6,Icon:o6,IconButton:a6,Button:l6,Span:u6,useContext:la});function Oe(e,t,n){function r(c,p){var f;Object.defineProperty(c,"_zod",{value:c._zod??{},enumerable:!1}),(f=c._zod).traits??(f.traits=new Set),c._zod.traits.add(e),t(c,p);for(const h in l.prototype)h in c||Object.defineProperty(c,h,{value:l.prototype[h].bind(c)});c._zod.constr=l,c._zod.def=p}const s=n?.Parent??Object;class a extends s{}Object.defineProperty(a,"name",{value:e});function l(c){var p;const f=n?.Parent?new a:this;r(f,c),(p=f._zod).deferred??(p.deferred=[]);for(const h of f._zod.deferred)h();return f}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class dl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class fA extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const dA={};function Jo(e){return dA}function c6(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,s])=>t.indexOf(+r)===-1).map(([r,s])=>s)}function Dy(e,t){return typeof t=="bigint"?t.toString():t}function tk(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function nk(e){return e==null}function rk(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const oE=Symbol("evaluating");function bn(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==oE)return r===void 0&&(r=oE,r=n()),r},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function ua(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ca(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function aE(e){return JSON.stringify(e)}const pA="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function qp(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const f6=tk(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function bc(e){if(qp(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(qp(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function hA(e){return bc(e)?{...e}:Array.isArray(e)?[...e]:e}const d6=new Set(["string","number","symbol"]);function Ih(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function vo(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function xt(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function p6(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function h6(e,t){const n=e._zod.def,r=ca(e._zod.def,{get shape(){const s={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=n.shape[a])}return ua(this,"shape",s),s},checks:[]});return vo(e,r)}function m6(e,t){const n=e._zod.def,r=ca(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return ua(this,"shape",s),s},checks:[]});return vo(e,r)}function g6(e,t){if(!bc(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const s=ca(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return ua(this,"shape",a),a},checks:[]});return vo(e,s)}function b6(e,t){if(!bc(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const r={...e._zod.def.shape,...t};return ua(this,"shape",r),r},checks:e._zod.def.checks};return vo(e,n)}function y6(e,t){const n=ca(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return ua(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return vo(e,n)}function v6(e,t,n){const r=ca(t._zod.def,{get shape(){const s=t._zod.def.shape,a={...s};if(n)for(const l in n){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(a[l]=e?new e({type:"optional",innerType:s[l]}):s[l])}else for(const l in s)a[l]=e?new e({type:"optional",innerType:s[l]}):s[l];return ua(this,"shape",a),a},checks:[]});return vo(t,r)}function k6(e,t,n){const r=ca(t._zod.def,{get shape(){const s=t._zod.def.shape,a={...s};if(n)for(const l in n){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(a[l]=new e({type:"nonoptional",innerType:s[l]}))}else for(const l in s)a[l]=new e({type:"nonoptional",innerType:s[l]});return ua(this,"shape",a),a},checks:[]});return vo(t,r)}function sl(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function mA(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function qd(e){return typeof e=="string"?e:e?.message}function ea(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const s=qd(e.inst?._zod.def?.error?.(e))??qd(t?.error?.(e))??qd(n.customError?.(e))??qd(n.localeError?.(e))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function ik(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function yc(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const gA=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Dy,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},bA=Oe("$ZodError",gA),yA=Oe("$ZodError",gA,{Parent:Error});function x6(e,t=n=>n.message){const n={},r=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}function S6(e,t){const n=t||function(a){return a.message},r={_errors:[]},s=a=>{for(const l of a.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>s({issues:c}));else if(l.code==="invalid_key")s({issues:l.issues});else if(l.code==="invalid_element")s({issues:l.issues});else if(l.path.length===0)r._errors.push(n(l));else{let c=r,p=0;for(;p<l.path.length;){const f=l.path[p];p===l.path.length-1?(c[f]=c[f]||{_errors:[]},c[f]._errors.push(n(l))):c[f]=c[f]||{_errors:[]},c=c[f],p++}}};return s(e),r}const sk=e=>(t,n,r,s)=>{const a=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},a);if(l instanceof Promise)throw new dl;if(l.issues.length){const c=new(s?.Err??e)(l.issues.map(p=>ea(p,a,Jo())));throw pA(c,s?.callee),c}return l.value},ok=e=>async(t,n,r,s)=>{const a=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},a);if(l instanceof Promise&&(l=await l),l.issues.length){const c=new(s?.Err??e)(l.issues.map(p=>ea(p,a,Jo())));throw pA(c,s?.callee),c}return l.value},Dh=e=>(t,n,r)=>{const s=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},s);if(a instanceof Promise)throw new dl;return a.issues.length?{success:!1,error:new(e??bA)(a.issues.map(l=>ea(l,s,Jo())))}:{success:!0,data:a.value}},w6=Dh(yA),zh=e=>async(t,n,r)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},s);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(l=>ea(l,s,Jo())))}:{success:!0,data:a.value}},E6=zh(yA),T6=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return sk(e)(t,n,s)},_6=e=>(t,n,r)=>sk(e)(t,n,r),R6=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ok(e)(t,n,s)},C6=e=>async(t,n,r)=>ok(e)(t,n,r),A6=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Dh(e)(t,n,s)},N6=e=>(t,n,r)=>Dh(e)(t,n,r),O6=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return zh(e)(t,n,s)},M6=e=>async(t,n,r)=>zh(e)(t,n,r),I6=/^[cC][^\s-]{8,}$/,D6=/^[0-9a-z]+$/,z6=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,j6=/^[0-9a-vA-V]{20}$/,L6=/^[A-Za-z0-9]{27}$/,P6=/^[a-zA-Z0-9_-]{21}$/,$6=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,B6=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,lE=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,F6=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,U6="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function q6(){return new RegExp(U6,"u")}const H6=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,G6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,V6=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,K6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Z6=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,vA=/^[A-Za-z0-9_-]*$/,W6=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Y6=/^\+(?:[0-9]){6,14}[0-9]$/,kA="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",X6=new RegExp(`^${kA}$`);function xA(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Q6(e){return new RegExp(`^${xA(e)}$`)}function J6(e){const t=xA({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${kA}T(?:${r})$`)}const e4=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},t4=/^(?:true|false)$/i,n4=/^[^A-Z]*$/,r4=/^[^a-z]*$/,Hi=Oe("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),i4=Oe("$ZodCheckMaxLength",(e,t)=>{var n;Hi.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!nk(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const s=r.value;if(s.length<=t.maximum)return;const l=ik(s);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),s4=Oe("$ZodCheckMinLength",(e,t)=>{var n;Hi.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!nk(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const s=r.value;if(s.length>=t.minimum)return;const l=ik(s);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),o4=Oe("$ZodCheckLengthEquals",(e,t)=>{var n;Hi.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!nk(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=r=>{const s=r.value,a=s.length;if(a===t.length)return;const l=ik(s),c=a>t.length;r.issues.push({origin:l,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),jh=Oe("$ZodCheckStringFormat",(e,t)=>{var n,r;Hi.init(e,t),e._zod.onattach.push(s=>{const a=s._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),a4=Oe("$ZodCheckRegex",(e,t)=>{jh.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),l4=Oe("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=n4),jh.init(e,t)}),u4=Oe("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=r4),jh.init(e,t)}),c4=Oe("$ZodCheckIncludes",(e,t)=>{Hi.init(e,t);const n=Ih(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(s=>{const a=s._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),f4=Oe("$ZodCheckStartsWith",(e,t)=>{Hi.init(e,t);const n=new RegExp(`^${Ih(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),d4=Oe("$ZodCheckEndsWith",(e,t)=>{Hi.init(e,t);const n=new RegExp(`.*${Ih(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),p4=Oe("$ZodCheckOverwrite",(e,t)=>{Hi.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class h4{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
10
|
-
`).filter(l=>l),s=Math.min(...r.map(l=>l.length-l.trimStart().length)),a=r.map(l=>l.slice(s)).map(l=>" ".repeat(this.indent*2)+l);for(const l of a)this.content.push(l)}compile(){const t=Function,n=this?.args,s=[...(this?.content??[""]).map(a=>` ${a}`)];return new t(...n,s.join(`
|
|
11
|
-
`))}}const m4={major:4,minor:1,patch:11},Vn=Oe("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=m4;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const s of r)for(const a of s._zod.onattach)a(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(l,c,p)=>{let f=sl(l),h;for(const m of c){if(m._zod.def.when){if(!m._zod.def.when(l))continue}else if(f)continue;const g=l.issues.length,b=m._zod.check(l);if(b instanceof Promise&&p?.async===!1)throw new dl;if(h||b instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await b,l.issues.length!==g&&(f||(f=sl(l,g)))});else{if(l.issues.length===g)continue;f||(f=sl(l,g))}}return h?h.then(()=>l):l},a=(l,c,p)=>{if(sl(l))return l.aborted=!0,l;const f=s(c,r,p);if(f instanceof Promise){if(p.async===!1)throw new dl;return f.then(h=>e._zod.parse(h,p))}return e._zod.parse(f,p)};e._zod.run=(l,c)=>{if(c.skipChecks)return e._zod.parse(l,c);if(c.direction==="backward"){const f=e._zod.parse({value:l.value,issues:[]},{...c,skipChecks:!0});return f instanceof Promise?f.then(h=>a(h,l,c)):a(f,l,c)}const p=e._zod.parse(l,c);if(p instanceof Promise){if(c.async===!1)throw new dl;return p.then(f=>s(f,r,c))}return s(p,r,c)}}e["~standard"]={validate:s=>{try{const a=w6(e,s);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return E6(e,s).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}}),ak=Oe("$ZodString",(e,t)=>{Vn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??e4(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),En=Oe("$ZodStringFormat",(e,t)=>{jh.init(e,t),ak.init(e,t)}),g4=Oe("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=B6),En.init(e,t)}),b4=Oe("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=lE(r))}else t.pattern??(t.pattern=lE());En.init(e,t)}),y4=Oe("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=F6),En.init(e,t)}),v4=Oe("$ZodURL",(e,t)=>{En.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),s=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:W6.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=s.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),k4=Oe("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=q6()),En.init(e,t)}),x4=Oe("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=P6),En.init(e,t)}),S4=Oe("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=I6),En.init(e,t)}),w4=Oe("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=D6),En.init(e,t)}),E4=Oe("$ZodULID",(e,t)=>{t.pattern??(t.pattern=z6),En.init(e,t)}),T4=Oe("$ZodXID",(e,t)=>{t.pattern??(t.pattern=j6),En.init(e,t)}),_4=Oe("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=L6),En.init(e,t)}),R4=Oe("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=J6(t)),En.init(e,t)}),C4=Oe("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=X6),En.init(e,t)}),A4=Oe("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Q6(t)),En.init(e,t)}),N4=Oe("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=$6),En.init(e,t)}),O4=Oe("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=H6),En.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv4"})}),M4=Oe("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=G6),En.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),I4=Oe("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=V6),En.init(e,t)}),D4=Oe("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=K6),En.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[s,a]=r;if(!a)throw new Error;const l=Number(a);if(`${l}`!==a)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${s}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function SA(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const z4=Oe("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Z6),En.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{SA(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function j4(e){if(!vA.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return SA(n)}const L4=Oe("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=vA),En.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{j4(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),P4=Oe("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Y6),En.init(e,t)});function $4(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const s=JSON.parse(atob(r));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const B4=Oe("$ZodJWT",(e,t)=>{En.init(e,t),e._zod.check=n=>{$4(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),F4=Oe("$ZodBoolean",(e,t)=>{Vn.init(e,t),e._zod.pattern=t4,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),U4=Oe("$ZodUnknown",(e,t)=>{Vn.init(e,t),e._zod.parse=n=>n}),q4=Oe("$ZodNever",(e,t)=>{Vn.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function uE(e,t,n){e.issues.length&&t.issues.push(...mA(n,e.issues)),t.value[n]=e.value}const H4=Oe("$ZodArray",(e,t)=>{Vn.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const a=[];for(let l=0;l<s.length;l++){const c=s[l],p=t.element._zod.run({value:c,issues:[]},r);p instanceof Promise?a.push(p.then(f=>uE(f,n,l))):uE(p,n,l)}return a.length?Promise.all(a).then(()=>n):n}});function Hp(e,t,n,r){e.issues.length&&t.issues.push(...mA(n,e.issues)),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function wA(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=p6(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function EA(e,t,n,r,s,a){const l=[],c=s.keySet,p=s.catchall._zod,f=p.def.type;for(const h of Object.keys(t)){if(c.has(h))continue;if(f==="never"){l.push(h);continue}const m=p.run({value:t[h],issues:[]},r);m instanceof Promise?e.push(m.then(g=>Hp(g,n,h,t))):Hp(m,n,h,t)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}const G4=Oe("$ZodObject",(e,t)=>{if(Vn.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const p={...c};return Object.defineProperty(t,"shape",{value:p}),p}})}const r=tk(()=>wA(t));bn(e._zod,"propValues",()=>{const c=t.shape,p={};for(const f in c){const h=c[f]._zod;if(h.values){p[f]??(p[f]=new Set);for(const m of h.values)p[f].add(m)}}return p});const s=qp,a=t.catchall;let l;e._zod.parse=(c,p)=>{l??(l=r.value);const f=c.value;if(!s(f))return c.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),c;c.value={};const h=[],m=l.shape;for(const g of l.keys){const x=m[g]._zod.run({value:f[g],issues:[]},p);x instanceof Promise?h.push(x.then(w=>Hp(w,c,g,f))):Hp(x,c,g,f)}return a?EA(h,f,c,p,r.value,e):h.length?Promise.all(h).then(()=>c):c}}),V4=Oe("$ZodObjectJIT",(e,t)=>{G4.init(e,t);const n=e._zod.parse,r=tk(()=>wA(t)),s=g=>{const b=new h4(["shape","payload","ctx"]),x=r.value,w=T=>{const C=aE(T);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};b.write("const input = payload.value;");const _=Object.create(null);let E=0;for(const T of x.keys)_[T]=`key_${E++}`;b.write("const newResult = {};");for(const T of x.keys){const C=_[T],A=aE(T);b.write(`const ${C} = ${w(T)};`),b.write(`
|
|
12
|
-
if (${C}.issues.length) {
|
|
13
|
-
payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
|
|
14
|
-
...iss,
|
|
15
|
-
path: iss.path ? [${A}, ...iss.path] : [${A}]
|
|
16
|
-
})));
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (${C}.value === undefined) {
|
|
21
|
-
if (${A} in input) {
|
|
22
|
-
newResult[${A}] = undefined;
|
|
23
|
-
}
|
|
24
|
-
} else {
|
|
25
|
-
newResult[${A}] = ${C}.value;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
`)}b.write("payload.value = newResult;"),b.write("return payload;");const R=b.compile();return(T,C)=>R(g,T,C)};let a;const l=qp,c=!dA.jitless,f=c&&f6.value,h=t.catchall;let m;e._zod.parse=(g,b)=>{m??(m=r.value);const x=g.value;return l(x)?c&&f&&b?.async===!1&&b.jitless!==!0?(a||(a=s(t.shape)),g=a(g,b),h?EA([],x,g,b,m,e):g):n(g,b):(g.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),g)}});function cE(e,t,n,r){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;const s=e.filter(a=>!sl(a));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(a=>a.issues.map(l=>ea(l,r,Jo())))}),t)}const K4=Oe("$ZodUnion",(e,t)=>{Vn.init(e,t),bn(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),bn(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),bn(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),bn(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${s.map(a=>rk(a.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(s,a)=>{if(n)return r(s,a);let l=!1;const c=[];for(const p of t.options){const f=p._zod.run({value:s.value,issues:[]},a);if(f instanceof Promise)c.push(f),l=!0;else{if(f.issues.length===0)return f;c.push(f)}}return l?Promise.all(c).then(p=>cE(p,s,e,a)):cE(c,s,e,a)}}),Z4=Oe("$ZodIntersection",(e,t)=>{Vn.init(e,t),e._zod.parse=(n,r)=>{const s=n.value,a=t.left._zod.run({value:s,issues:[]},r),l=t.right._zod.run({value:s,issues:[]},r);return a instanceof Promise||l instanceof Promise?Promise.all([a,l]).then(([p,f])=>fE(n,p,f)):fE(n,a,l)}});function zy(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(bc(e)&&bc(t)){const n=Object.keys(t),r=Object.keys(e).filter(a=>n.indexOf(a)!==-1),s={...e,...t};for(const a of r){const l=zy(e[a],t[a]);if(!l.valid)return{valid:!1,mergeErrorPath:[a,...l.mergeErrorPath]};s[a]=l.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const s=e[r],a=t[r],l=zy(s,a);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function fE(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),sl(e))return e;const r=zy(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const W4=Oe("$ZodEnum",(e,t)=>{Vn.init(e,t);const n=c6(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(s=>d6.has(typeof s)).map(s=>typeof s=="string"?Ih(s):s.toString()).join("|")})$`),e._zod.parse=(s,a)=>{const l=s.value;return r.has(l)||s.issues.push({code:"invalid_value",values:n,input:l,inst:e}),s}}),Y4=Oe("$ZodTransform",(e,t)=>{Vn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new fA(e.constructor.name);const s=t.transform(n.value,n);if(r.async)return(s instanceof Promise?s:Promise.resolve(s)).then(l=>(n.value=l,n));if(s instanceof Promise)throw new dl;return n.value=s,n}});function dE(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const X4=Oe("$ZodOptional",(e,t)=>{Vn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",bn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),bn(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${rk(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(a=>dE(a,n.value)):dE(s,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),Q4=Oe("$ZodNullable",(e,t)=>{Vn.init(e,t),bn(e._zod,"optin",()=>t.innerType._zod.optin),bn(e._zod,"optout",()=>t.innerType._zod.optout),bn(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${rk(n.source)}|null)$`):void 0}),bn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),J4=Oe("$ZodDefault",(e,t)=>{Vn.init(e,t),e._zod.optin="optional",bn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(a=>pE(a,t)):pE(s,t)}});function pE(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const eB=Oe("$ZodPrefault",(e,t)=>{Vn.init(e,t),e._zod.optin="optional",bn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),tB=Oe("$ZodNonOptional",(e,t)=>{Vn.init(e,t),bn(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(a=>hE(a,e)):hE(s,e)}});function hE(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const nB=Oe("$ZodCatch",(e,t)=>{Vn.init(e,t),bn(e._zod,"optin",()=>t.innerType._zod.optin),bn(e._zod,"optout",()=>t.innerType._zod.optout),bn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(a=>(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(l=>ea(l,r,Jo()))},input:n.value}),n.issues=[]),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(a=>ea(a,r,Jo()))},input:n.value}),n.issues=[]),n)}}),rB=Oe("$ZodPipe",(e,t)=>{Vn.init(e,t),bn(e._zod,"values",()=>t.in._zod.values),bn(e._zod,"optin",()=>t.in._zod.optin),bn(e._zod,"optout",()=>t.out._zod.optout),bn(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const a=t.out._zod.run(n,r);return a instanceof Promise?a.then(l=>Hd(l,t.in,r)):Hd(a,t.in,r)}const s=t.in._zod.run(n,r);return s instanceof Promise?s.then(a=>Hd(a,t.out,r)):Hd(s,t.out,r)}});function Hd(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const iB=Oe("$ZodReadonly",(e,t)=>{Vn.init(e,t),bn(e._zod,"propValues",()=>t.innerType._zod.propValues),bn(e._zod,"values",()=>t.innerType._zod.values),bn(e._zod,"optin",()=>t.innerType._zod.optin),bn(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(mE):mE(s)}});function mE(e){return e.value=Object.freeze(e.value),e}const sB=Oe("$ZodCustom",(e,t)=>{Hi.init(e,t),Vn.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,s=t.fn(r);if(s instanceof Promise)return s.then(a=>gE(a,n,r,e));gE(s,n,r,e)}});function gE(e,t,n,r){if(!e){const s={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(s.params=r._zod.def.params),t.issues.push(yc(s))}}class oB{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];if(this._map.set(t,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const s={...r,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function aB(){return new oB}const Gd=aB();function lB(e,t){return new e({type:"string",...xt(t)})}function uB(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...xt(t)})}function bE(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...xt(t)})}function cB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...xt(t)})}function fB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...xt(t)})}function dB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...xt(t)})}function pB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...xt(t)})}function hB(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...xt(t)})}function mB(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...xt(t)})}function gB(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...xt(t)})}function bB(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...xt(t)})}function yB(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...xt(t)})}function vB(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...xt(t)})}function kB(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...xt(t)})}function xB(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...xt(t)})}function SB(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...xt(t)})}function wB(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...xt(t)})}function EB(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...xt(t)})}function TB(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...xt(t)})}function _B(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...xt(t)})}function RB(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...xt(t)})}function CB(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...xt(t)})}function AB(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...xt(t)})}function NB(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...xt(t)})}function OB(e,t){return new e({type:"string",format:"date",check:"string_format",...xt(t)})}function MB(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...xt(t)})}function IB(e,t){return new e({type:"string",format:"duration",check:"string_format",...xt(t)})}function DB(e,t){return new e({type:"boolean",...xt(t)})}function zB(e){return new e({type:"unknown"})}function jB(e,t){return new e({type:"never",...xt(t)})}function TA(e,t){return new i4({check:"max_length",...xt(t),maximum:e})}function Gp(e,t){return new s4({check:"min_length",...xt(t),minimum:e})}function _A(e,t){return new o4({check:"length_equals",...xt(t),length:e})}function LB(e,t){return new a4({check:"string_format",format:"regex",...xt(t),pattern:e})}function PB(e){return new l4({check:"string_format",format:"lowercase",...xt(e)})}function $B(e){return new u4({check:"string_format",format:"uppercase",...xt(e)})}function BB(e,t){return new c4({check:"string_format",format:"includes",...xt(t),includes:e})}function FB(e,t){return new f4({check:"string_format",format:"starts_with",...xt(t),prefix:e})}function UB(e,t){return new d4({check:"string_format",format:"ends_with",...xt(t),suffix:e})}function Qc(e){return new p4({check:"overwrite",tx:e})}function qB(e){return Qc(t=>t.normalize(e))}function HB(){return Qc(e=>e.trim())}function GB(){return Qc(e=>e.toLowerCase())}function VB(){return Qc(e=>e.toUpperCase())}function KB(e,t,n){return new e({type:"array",element:t,...xt(n)})}function ZB(e,t,n){return new e({type:"custom",check:"custom",fn:t,...xt(n)})}function WB(e){const t=YB(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(yc(r,n.value,t._zod.def));else{const s=r;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),n.issues.push(yc(s))}},e(n.value,n)));return t}function YB(e,t){const n=new Hi({check:"custom",...xt(t)});return n._zod.check=e,n}const XB=Oe("ZodISODateTime",(e,t)=>{R4.init(e,t),Cn.init(e,t)});function QB(e){return NB(XB,e)}const JB=Oe("ZodISODate",(e,t)=>{C4.init(e,t),Cn.init(e,t)});function eF(e){return OB(JB,e)}const tF=Oe("ZodISOTime",(e,t)=>{A4.init(e,t),Cn.init(e,t)});function nF(e){return MB(tF,e)}const rF=Oe("ZodISODuration",(e,t)=>{N4.init(e,t),Cn.init(e,t)});function iF(e){return IB(rF,e)}const sF=(e,t)=>{bA.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>S6(e,n)},flatten:{value:n=>x6(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Dy,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Dy,2)}},isEmpty:{get(){return e.issues.length===0}}})},yi=Oe("ZodError",sF,{Parent:Error}),oF=sk(yi),aF=ok(yi),lF=Dh(yi),uF=zh(yi),cF=T6(yi),fF=_6(yi),dF=R6(yi),pF=C6(yi),hF=A6(yi),mF=N6(yi),gF=O6(yi),bF=M6(yi),Wn=Oe("ZodType",(e,t)=>(Vn.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ca(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]})),e.clone=(n,r)=>vo(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>oF(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>lF(e,n,r),e.parseAsync=async(n,r)=>aF(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>uF(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>cF(e,n,r),e.decode=(n,r)=>fF(e,n,r),e.encodeAsync=async(n,r)=>dF(e,n,r),e.decodeAsync=async(n,r)=>pF(e,n,r),e.safeEncode=(n,r)=>hF(e,n,r),e.safeDecode=(n,r)=>mF(e,n,r),e.safeEncodeAsync=async(n,r)=>gF(e,n,r),e.safeDecodeAsync=async(n,r)=>bF(e,n,r),e.refine=(n,r)=>e.check(lU(n,r)),e.superRefine=n=>e.check(uU(n)),e.overwrite=n=>e.check(Qc(n)),e.optional=()=>kE(e),e.nullable=()=>xE(e),e.nullish=()=>kE(xE(e)),e.nonoptional=n=>tU(e,n),e.array=()=>UF(e),e.or=n=>GF([e,n]),e.and=n=>KF(e,n),e.transform=n=>SE(e,WF(n)),e.default=n=>QF(e,n),e.prefault=n=>eU(e,n),e.catch=n=>rU(e,n),e.pipe=n=>SE(e,n),e.readonly=()=>oU(e),e.describe=n=>{const r=e.clone();return Gd.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return Gd.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Gd.get(e);const r=e.clone();return Gd.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),RA=Oe("_ZodString",(e,t)=>{ak.init(e,t),Wn.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(LB(...r)),e.includes=(...r)=>e.check(BB(...r)),e.startsWith=(...r)=>e.check(FB(...r)),e.endsWith=(...r)=>e.check(UB(...r)),e.min=(...r)=>e.check(Gp(...r)),e.max=(...r)=>e.check(TA(...r)),e.length=(...r)=>e.check(_A(...r)),e.nonempty=(...r)=>e.check(Gp(1,...r)),e.lowercase=r=>e.check(PB(r)),e.uppercase=r=>e.check($B(r)),e.trim=()=>e.check(HB()),e.normalize=(...r)=>e.check(qB(...r)),e.toLowerCase=()=>e.check(GB()),e.toUpperCase=()=>e.check(VB())}),yF=Oe("ZodString",(e,t)=>{ak.init(e,t),RA.init(e,t),e.email=n=>e.check(uB(vF,n)),e.url=n=>e.check(hB(kF,n)),e.jwt=n=>e.check(AB(zF,n)),e.emoji=n=>e.check(mB(xF,n)),e.guid=n=>e.check(bE(yE,n)),e.uuid=n=>e.check(cB(Vd,n)),e.uuidv4=n=>e.check(fB(Vd,n)),e.uuidv6=n=>e.check(dB(Vd,n)),e.uuidv7=n=>e.check(pB(Vd,n)),e.nanoid=n=>e.check(gB(SF,n)),e.guid=n=>e.check(bE(yE,n)),e.cuid=n=>e.check(bB(wF,n)),e.cuid2=n=>e.check(yB(EF,n)),e.ulid=n=>e.check(vB(TF,n)),e.base64=n=>e.check(_B(MF,n)),e.base64url=n=>e.check(RB(IF,n)),e.xid=n=>e.check(kB(_F,n)),e.ksuid=n=>e.check(xB(RF,n)),e.ipv4=n=>e.check(SB(CF,n)),e.ipv6=n=>e.check(wB(AF,n)),e.cidrv4=n=>e.check(EB(NF,n)),e.cidrv6=n=>e.check(TB(OF,n)),e.e164=n=>e.check(CB(DF,n)),e.datetime=n=>e.check(QB(n)),e.date=n=>e.check(eF(n)),e.time=n=>e.check(nF(n)),e.duration=n=>e.check(iF(n))});function CA(e){return lB(yF,e)}const Cn=Oe("ZodStringFormat",(e,t)=>{En.init(e,t),RA.init(e,t)}),vF=Oe("ZodEmail",(e,t)=>{y4.init(e,t),Cn.init(e,t)}),yE=Oe("ZodGUID",(e,t)=>{g4.init(e,t),Cn.init(e,t)}),Vd=Oe("ZodUUID",(e,t)=>{b4.init(e,t),Cn.init(e,t)}),kF=Oe("ZodURL",(e,t)=>{v4.init(e,t),Cn.init(e,t)}),xF=Oe("ZodEmoji",(e,t)=>{k4.init(e,t),Cn.init(e,t)}),SF=Oe("ZodNanoID",(e,t)=>{x4.init(e,t),Cn.init(e,t)}),wF=Oe("ZodCUID",(e,t)=>{S4.init(e,t),Cn.init(e,t)}),EF=Oe("ZodCUID2",(e,t)=>{w4.init(e,t),Cn.init(e,t)}),TF=Oe("ZodULID",(e,t)=>{E4.init(e,t),Cn.init(e,t)}),_F=Oe("ZodXID",(e,t)=>{T4.init(e,t),Cn.init(e,t)}),RF=Oe("ZodKSUID",(e,t)=>{_4.init(e,t),Cn.init(e,t)}),CF=Oe("ZodIPv4",(e,t)=>{O4.init(e,t),Cn.init(e,t)}),AF=Oe("ZodIPv6",(e,t)=>{M4.init(e,t),Cn.init(e,t)}),NF=Oe("ZodCIDRv4",(e,t)=>{I4.init(e,t),Cn.init(e,t)}),OF=Oe("ZodCIDRv6",(e,t)=>{D4.init(e,t),Cn.init(e,t)}),MF=Oe("ZodBase64",(e,t)=>{z4.init(e,t),Cn.init(e,t)}),IF=Oe("ZodBase64URL",(e,t)=>{L4.init(e,t),Cn.init(e,t)}),DF=Oe("ZodE164",(e,t)=>{P4.init(e,t),Cn.init(e,t)}),zF=Oe("ZodJWT",(e,t)=>{B4.init(e,t),Cn.init(e,t)}),jF=Oe("ZodBoolean",(e,t)=>{F4.init(e,t),Wn.init(e,t)});function LF(e){return DB(jF,e)}const PF=Oe("ZodUnknown",(e,t)=>{U4.init(e,t),Wn.init(e,t)});function vE(){return zB(PF)}const $F=Oe("ZodNever",(e,t)=>{q4.init(e,t),Wn.init(e,t)});function BF(e){return jB($F,e)}const FF=Oe("ZodArray",(e,t)=>{H4.init(e,t),Wn.init(e,t),e.element=t.element,e.min=(n,r)=>e.check(Gp(n,r)),e.nonempty=n=>e.check(Gp(1,n)),e.max=(n,r)=>e.check(TA(n,r)),e.length=(n,r)=>e.check(_A(n,r)),e.unwrap=()=>e.element});function UF(e,t){return KB(FF,e,t)}const qF=Oe("ZodObject",(e,t)=>{V4.init(e,t),Wn.init(e,t),bn(e,"shape",()=>t.shape),e.keyof=()=>AA(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:vE()}),e.loose=()=>e.clone({...e._zod.def,catchall:vE()}),e.strict=()=>e.clone({...e._zod.def,catchall:BF()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>g6(e,n),e.safeExtend=n=>b6(e,n),e.merge=n=>y6(e,n),e.pick=n=>h6(e,n),e.omit=n=>m6(e,n),e.partial=(...n)=>v6(NA,e,n[0]),e.required=(...n)=>k6(OA,e,n[0])});function lk(e,t){const n={type:"object",shape:e??{},...xt(t)};return new qF(n)}const HF=Oe("ZodUnion",(e,t)=>{K4.init(e,t),Wn.init(e,t),e.options=t.options});function GF(e,t){return new HF({type:"union",options:e,...xt(t)})}const VF=Oe("ZodIntersection",(e,t)=>{Z4.init(e,t),Wn.init(e,t)});function KF(e,t){return new VF({type:"intersection",left:e,right:t})}const jy=Oe("ZodEnum",(e,t)=>{W4.init(e,t),Wn.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,s)=>{const a={};for(const l of r)if(n.has(l))a[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new jy({...t,checks:[],...xt(s),entries:a})},e.exclude=(r,s)=>{const a={...t.entries};for(const l of r)if(n.has(l))delete a[l];else throw new Error(`Key ${l} not found in enum`);return new jy({...t,checks:[],...xt(s),entries:a})}});function AA(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new jy({type:"enum",entries:n,...xt(t)})}const ZF=Oe("ZodTransform",(e,t)=>{Y4.init(e,t),Wn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new fA(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(yc(a,n.value,t));else{const l=a;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(yc(l))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(a=>(n.value=a,n)):(n.value=s,n)}});function WF(e){return new ZF({type:"transform",transform:e})}const NA=Oe("ZodOptional",(e,t)=>{X4.init(e,t),Wn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function kE(e){return new NA({type:"optional",innerType:e})}const YF=Oe("ZodNullable",(e,t)=>{Q4.init(e,t),Wn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function xE(e){return new YF({type:"nullable",innerType:e})}const XF=Oe("ZodDefault",(e,t)=>{J4.init(e,t),Wn.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function QF(e,t){return new XF({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():hA(t)}})}const JF=Oe("ZodPrefault",(e,t)=>{eB.init(e,t),Wn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function eU(e,t){return new JF({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():hA(t)}})}const OA=Oe("ZodNonOptional",(e,t)=>{tB.init(e,t),Wn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function tU(e,t){return new OA({type:"nonoptional",innerType:e,...xt(t)})}const nU=Oe("ZodCatch",(e,t)=>{nB.init(e,t),Wn.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function rU(e,t){return new nU({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const iU=Oe("ZodPipe",(e,t)=>{rB.init(e,t),Wn.init(e,t),e.in=t.in,e.out=t.out});function SE(e,t){return new iU({type:"pipe",in:e,out:t})}const sU=Oe("ZodReadonly",(e,t)=>{iB.init(e,t),Wn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function oU(e){return new sU({type:"readonly",innerType:e})}const aU=Oe("ZodCustom",(e,t)=>{sB.init(e,t),Wn.init(e,t)});function lU(e,t={}){return ZB(aU,e,t)}function uU(e){return WB(e)}function MA(e,t){var a;let n=null;const r=()=>(n===null&&(n=t()),n);return a=class{constructor(c){this.type=e,this.payload=c}static get schema(){return r()}},a.type=e,a}const gs=class gs{constructor(){this.data=null,this.listeners=new Set}static getInstance(){return gs.instance||(gs.instance=new gs),gs.instance}static subscribe(t){return gs.getInstance().subscribeToChanges(t)}static isDragActive(){return gs.getInstance().hasData()}notifyListeners(){for(const t of this.listeners)t()}subscribeToChanges(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}setData(t){this.data!==t&&(this.data=t,this.notifyListeners())}getData(){return this.data}getValidatedData(t){if(!this.data)return null;for(const n of t)if(this.data instanceof n)return n.schema.safeParse(this.data.payload).success?this.data:null;return null}hasAnyClass(t){return this.data?t.some(n=>this.data instanceof n):!1}clearData(){this.data!==null&&(this.data=null,this.notifyListeners())}hasData(){return this.data!==null}};gs.instance=null;let hi=gs;function Lb(e,t){if(!t?.length||!e.dataTransfer)return!1;for(const n of e.dataTransfer.types)for(const r of t)if(n.toLowerCase()===r.toLowerCase())return!0;return!1}function cU(e,t){const n=e.relatedTarget;if(n!==null&&t.contains(n))return!1;const r=t.defaultView;return r?e.clientX<=0||e.clientY<=0||e.clientX>=r.innerWidth||e.clientY>=r.innerHeight:!0}function fU(e){const{accept:t,disabled:n=!1,acceptNativeTypes:r,onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c}=e,p=k.useRef(null),f=k.useRef(null),h=k.useRef(0),m=k.useRef(null),[g,b]=k.useState(!1),[x,w]=k.useState(!1),_=k.useRef(g);_.current=g;const E=k.useCallback(()=>{h.current=0,b(!1),w(!1)},[]),R=k.useCallback(()=>{m.current!==null&&(cancelAnimationFrame(m.current),m.current=null)},[]);k.useEffect(()=>{if(!g)return;const I=f.current?.ownerDocument??document,F=()=>{R(),E()};return I.addEventListener("mousemove",F,!0),()=>{I.removeEventListener("mousemove",F,!0)}},[g,R,E]);const T=k.useRef({onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c});T.current={onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c};const C=k.useRef(r);C.current=r;const A=k.useRef(Array.isArray(t)?t:[t]);A.current=Array.isArray(t)?t:[t];const N=k.useCallback(I=>{if(f.current=I,p.current&&(p.current(),p.current=null),h.current=0,I!==null&&(b(!1),w(!1)),!I||n)return;const F=hi.getInstance(),V=P=>{if(h.current++,h.current===1){b(!0);const Y=A.current,D=!n&&F.hasAnyClass(Y),$=D||!n&&Lb(P,C.current);w($);const G=D?F.getValidatedData(Y):null;T.current.onDragEnter?.(P,G)}},j=P=>{h.current=Math.max(0,h.current-1),h.current===0&&(R(),E(),T.current.onDragLeave?.(P))},q=P=>{const Y=A.current,D=!n&&F.hasAnyClass(Y),$=!D&&!n&&Lb(P,C.current);if(D||$){if(P.preventDefault(),P.dataTransfer&&(P.dataTransfer.dropEffect=D?"move":"copy"),h.current===0){h.current=1,b(!0),w(!0);const G=D?F.getValidatedData(Y):null;T.current.onDragEnter?.(P,G)}if(T.current.onDragOver&&m.current===null){const G=D?F.getValidatedData(Y):null;m.current=requestAnimationFrame(()=>{m.current=null,T.current.onDragOver?.(P,G)})}}},Z=P=>{P.preventDefault(),R(),E();const Y=A.current;if(F.hasAnyClass(Y)){const D=F.getValidatedData(Y),{onDrop:$}=T.current;$&&($(P,D),P.stopPropagation())}else if(Lb(P,C.current)){const{onDrop:D}=T.current;D&&(D(P,null),P.stopPropagation())}};I.addEventListener("dragenter",V),I.addEventListener("dragleave",j),I.addEventListener("dragover",q),I.addEventListener("drop",Z);const B=I.ownerDocument,z=()=>{(h.current!==0||_.current)&&(R(),E())},L=()=>z(),H=()=>z(),U=P=>{cU(P,B)&&z()};B.addEventListener("drop",L,!0),B.addEventListener("dragend",H,!0),B.addEventListener("dragleave",U,!0),p.current=()=>{I.removeEventListener("dragenter",V),I.removeEventListener("dragleave",j),I.removeEventListener("dragover",q),I.removeEventListener("drop",Z),B.removeEventListener("drop",L,!0),B.removeEventListener("dragend",H,!0),B.removeEventListener("dragleave",U,!0),m.current!==null&&(cancelAnimationFrame(m.current),m.current=null)}},[n,E,R]);return k.useEffect(()=>()=>{p.current&&(p.current(),p.current=null)},[]),{ref:N,isOver:g,canDrop:x,isDropBlocked:g&&!x}}function dU(){const e=k.useRef(void 0),t=k.useCallback(()=>{const r=e.current;r!==void 0&&(e.current=void 0,cancelAnimationFrame(r))},[]),n=k.useCallback(r=>{t(),e.current=requestAnimationFrame(s=>{e.current=void 0,r(s)})},[t]);return k.useEffect(()=>t,[t]),k.useMemo(()=>({dispose:t,request:n}),[t,n])}function Ly({deltaX:e,deltaY:t,mapVerticalWheelToHorizontal:n,axisBehavior:r="dominant",mappedBehavior:s="dominant"}){if(n){let c;return s==="dominant"&&Math.abs(t)>Math.abs(e)?c=t:c=e||t,c===0?null:c}if(r==="raw")return e===0?null:e;const a=Math.abs(e),l=Math.abs(t);return e===0||a<=l?null:e}const pU="hover",hU=4,mU=20;class gU{constructor(){this._trackSize=0,this._viewportSize=0,this._scrollSize=0,this._scrollPosition=0,this._isScrollable=!1,this._thumbSize=0,this._thumbPosition=0,this._thumbRatio=0}setDimensions(t,n,r,s){const a=Math.round(t),l=Math.round(n),c=Math.round(r),p=Math.round(s);return this._trackSize===a&&this._viewportSize===l&&this._scrollSize===c&&this._scrollPosition===p?!1:(this._trackSize=a,this._viewportSize=l,this._scrollSize=c,this._scrollPosition=p,this._recompute(),!0)}setScrollPosition(t){const n=Math.round(t);return this._scrollPosition===n?!1:(this._scrollPosition=n,this._thumbPosition=this._computeThumbPosition(),!0)}_recompute(){if(this._isScrollable=this._scrollSize>0&&this._viewportSize>0&&this._scrollSize>this._viewportSize,!this._isScrollable||this._trackSize<=0){this._thumbSize=0,this._thumbPosition=0,this._thumbRatio=0;return}const t=Math.floor(this._trackSize*this._viewportSize/this._scrollSize);this._thumbSize=Math.min(this._trackSize,Math.max(mU,t));const n=this._trackSize-this._thumbSize,r=this._scrollSize-this._viewportSize;this._thumbRatio=r>0?n/r:0,this._thumbPosition=this._computeThumbPosition()}_computeThumbPosition(){return!this._isScrollable||this._thumbRatio===0?0:Math.round(this._scrollPosition*this._thumbRatio)}isScrollable(){return this._isScrollable}getThumbSize(){return this._thumbSize}getThumbPosition(){return this._thumbPosition}getScrollPositionFromThumbDelta(t,n){return!this._isScrollable||this._thumbRatio===0?0:Math.round(n+t/this._thumbRatio)}getScrollPositionFromTrackOffset(t){if(!this._isScrollable||this._thumbRatio===0)return 0;const n=Math.max(0,Math.min(this._trackSize-this._thumbSize,t-this._thumbSize/2));return Math.round(n/this._thumbRatio)}}const al=class al{constructor(t){this.thumbInsetStart=0,this.horizontalWheelAxisLock=null,this.horizontalWheelResetTimer=null,this.resizeObserver=null,this.boundOnScroll=null,this.boundOnThumbDown=null,this.boundOnTrackDown=null,this.boundOnWheel=null,this.dragCleanup=null,this.pendingSyncThumbFrame=null,this.viewport=t.viewport,this.content=t.content,this.scrollbar=t.scrollbar,this.thumb=t.thumb,this.state=new gU,this.direction=t.direction,this.mapVerticalWheelToHorizontal=t.mapVerticalWheelToHorizontal??!1}get horizontal(){return this.direction==="horizontal"}attach(){this.attachScrollListener(),this.attachResizeObserver(),this.attachPointerEvents(),this.attachWheelForwarding(),this.scheduleSyncThumb()}detach(){this.detachScrollListener(),this.detachResizeObserver(),this.detachPointerEvents(),this.detachWheelForwarding(),this.pendingSyncThumbFrame!==null&&(cancelAnimationFrame(this.pendingSyncThumbFrame),this.pendingSyncThumbFrame=null),this.horizontalWheelResetTimer&&(clearTimeout(this.horizontalWheelResetTimer),this.horizontalWheelResetTimer=null),this.horizontalWheelAxisLock=null}attachScrollListener(){this.boundOnScroll=this.handleScroll.bind(this),this.viewport.addEventListener("scroll",this.boundOnScroll,{passive:!0})}detachScrollListener(){this.boundOnScroll&&(this.viewport.removeEventListener("scroll",this.boundOnScroll),this.boundOnScroll=null)}handleScroll(){const t=this.horizontal?this.viewport.scrollLeft:this.viewport.scrollTop;if(this.state.setScrollPosition(t)){const n=this.state.getThumbPosition();this.thumb.style.transform=this.getThumbTransform(n)}}attachResizeObserver(){this.resizeObserver=new ResizeObserver(()=>this.scheduleSyncThumb()),this.resizeObserver.observe(this.viewport),this.resizeObserver.observe(this.content),this.resizeObserver.observe(this.scrollbar)}detachResizeObserver(){this.resizeObserver?.disconnect(),this.resizeObserver=null}scheduleSyncThumb(){this.pendingSyncThumbFrame===null&&(this.pendingSyncThumbFrame=requestAnimationFrame(()=>{this.pendingSyncThumbFrame=null,this.syncThumb()}))}syncThumb(){this.thumbInsetStart=this.getThumbInsetStart();const t=this.readDimensions();this.state.setDimensions(t.trackSize,t.viewportSize,t.scrollSize,t.scrollPos)&&this.applyThumbStyle()}readDimensions(){const t=Math.max(0,this.scrollbar.clientHeight-this.thumbInsetStart);return{trackSize:this.horizontal?this.scrollbar.clientWidth:t,viewportSize:this.horizontal?this.viewport.clientWidth:this.viewport.clientHeight,scrollSize:this.horizontal?this.viewport.scrollWidth:this.viewport.scrollHeight,scrollPos:this.horizontal?this.viewport.scrollLeft:this.viewport.scrollTop}}applyThumbStyle(){const t=this.state.getThumbSize(),n=this.state.getThumbPosition();this.horizontal?(this.thumb.style.width=`${t}px`,this.thumb.style.height="",this.thumb.style.transform=this.getThumbTransform(n)):(this.thumb.style.height=`${t}px`,this.thumb.style.width="",this.thumb.style.transform=this.getThumbTransform(n)),this.scrollbar.dataset.scrollable=this.state.isScrollable()?"true":"false"}attachPointerEvents(){this.boundOnThumbDown=this.handleThumbDown.bind(this),this.boundOnTrackDown=this.handleTrackDown.bind(this),this.thumb.addEventListener("pointerdown",this.boundOnThumbDown),this.scrollbar.addEventListener("pointerdown",this.boundOnTrackDown)}detachPointerEvents(){this.boundOnThumbDown&&(this.thumb.removeEventListener("pointerdown",this.boundOnThumbDown),this.boundOnThumbDown=null),this.boundOnTrackDown&&(this.scrollbar.removeEventListener("pointerdown",this.boundOnTrackDown),this.boundOnTrackDown=null),this.dragCleanup?.(),this.dragCleanup=null}handleThumbDown(t){if(t.button!==0)return;t.preventDefault();const n=this.horizontal?t.clientX:t.clientY,r=this.horizontal?this.viewport.scrollLeft:this.viewport.scrollTop,s=t.pointerId;this.thumb.setPointerCapture(s),this.thumb.classList.add("ui-scroll-area__thumb--active");const a=c=>{const p=(this.horizontal?c.clientX:c.clientY)-n,f=this.state.getScrollPositionFromThumbDelta(p,r);this.horizontal?this.viewport.scrollLeft=f:this.viewport.scrollTop=f},l=()=>{this.thumb.classList.remove("ui-scroll-area__thumb--active");try{this.thumb.releasePointerCapture(s)}catch{}this.thumb.removeEventListener("pointermove",a),this.thumb.removeEventListener("pointerup",l),this.thumb.removeEventListener("pointercancel",l),this.dragCleanup=null};this.thumb.addEventListener("pointermove",a),this.thumb.addEventListener("pointerup",l),this.thumb.addEventListener("pointercancel",l),this.dragCleanup=l}handleTrackDown(t){if(t.button!==0||t.target===this.thumb)return;const n=this.scrollbar.getBoundingClientRect(),r=this.horizontal?t.clientX-n.left:t.clientY-n.top-this.thumbInsetStart,s=this.state.getScrollPositionFromTrackOffset(r);this.horizontal?this.viewport.scrollLeft=s:this.viewport.scrollTop=s}attachWheelForwarding(){this.boundOnWheel=t=>{if(this.horizontal){const n=this.viewport.scrollWidth-this.viewport.clientWidth;if(n<=0)return;let r=null;if(this.mapVerticalWheelToHorizontal)r=Ly({deltaX:t.deltaX,deltaY:t.deltaY,mapVerticalWheelToHorizontal:!0,mappedBehavior:"prefer-horizontal"});else{if(this.horizontalWheelAxisLock||(this.horizontalWheelAxisLock=Math.abs(t.deltaX)>Math.abs(t.deltaY)?"x":"y"),this.horizontalWheelResetTimer&&clearTimeout(this.horizontalWheelResetTimer),this.horizontalWheelResetTimer=setTimeout(()=>{this.horizontalWheelAxisLock=null,this.horizontalWheelResetTimer=null},al.WHEEL_GESTURE_RESET_MS),this.horizontalWheelAxisLock!=="x")return;if(r=Ly({deltaX:t.deltaX,deltaY:t.deltaY,mapVerticalWheelToHorizontal:!1,axisBehavior:"raw"}),r===null){t.preventDefault(),t.stopPropagation();return}}if(r===null)return;const s=Math.max(0,Math.min(n,this.viewport.scrollLeft+r));this.viewport.scrollLeft=s,t.preventDefault(),t.stopPropagation()}else this.viewport.scrollTop+=t.deltaY},this.scrollbar.addEventListener("wheel",this.boundOnWheel,{passive:!1})}detachWheelForwarding(){this.boundOnWheel&&(this.scrollbar.removeEventListener("wheel",this.boundOnWheel),this.boundOnWheel=null)}getThumbTransform(t){return this.horizontal?`translateX(${t}px)`:`translateY(${t+this.thumbInsetStart}px)`}getThumbInsetStart(){if(this.horizontal)return 0;const t=getComputedStyle(this.scrollbar).getPropertyValue(al.VERTICAL_THUMB_OFFSET_CSS_VAR),n=Number.parseFloat(t);return Number.isFinite(n)?Math.max(0,n):0}};al.VERTICAL_THUMB_OFFSET_CSS_VAR="--scrollbar-thumb-top-offset",al.WHEEL_GESTURE_RESET_MS=150;let Vp=al;const bU={base:{"--scrollbar-size":"ui-1ekbvf6","--scrollbar-inset":"ui-1logqu4","--scrollbar-thumb-top-offset":"ui-1fx8caa","--scroll-area-scroll-padding":"ui-8ddqcf",kVAEAm:"ui-1n2onr6",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",k1xSpc:"ui-rvj5dj",k52YG4:"ui-ypqxfk",$$css:!0}},Wu={base:{kJuA4N:"ui-175mniq",kAzted:"ui-2lwn1j",kskxy:"ui-mz0i5r",kaIpWk:"ui-1pjcqnp",kXHlph:"ui-6ikm8r",kORKVm:"ui-1odjw0f",kaPefq:"ui-1fu52t7",kC2sXz:"ui-1ufbpdf",k9lH4S:"ui-3oazx1",kphCe6:"ui-19l4kpp",kvh3hx:"ui-1t1jukp",kacamN:"ui-1e4zzel",k5wCbM:"ui-1rohswg",kAnDOJ:"ui-6ehuon",kOuLrU:"ui-fk6m8",$$css:!0},horizontal:{kXHlph:"ui-w2csxc",kORKVm:"ui-10wlt62",kaPefq:"ui-k8sdt9",kC2sXz:"ui-1duton",k9lH4S:"ui-101ixbw",kphCe6:"ui-exgr1p",kvh3hx:"ui-7p5m3t",kacamN:"ui-y5w88m",$$css:!0},both:{kXHlph:"ui-w2csxc",kORKVm:"ui-1odjw0f",kaPefq:"ui-k8sdt9",kC2sXz:"ui-1duton",k9lH4S:"ui-101ixbw",kphCe6:"ui-exgr1p",kZeWKH:"ui-ish69e",$$css:!0},maskGeometry:{kn1fP1:"ui-3b2oae",kJcbqH:"ui-16fucec",$$css:!0},mask:e=>[{kX1K2I:e!=null?"ui-wjwp01":e,kAExgp:e!=null?"ui-11jd449":e,$$css:!0},{"--x-maskImage":e??void 0,"--x-WebkitMaskImage":e??void 0}]};function yU(e,t,n,r){return`linear-gradient(to bottom, rgba(0, 0, 0, ${n}) 0px, black ${e}, black calc(100% - ${t}), rgba(0, 0, 0, ${r}) 100%)`}function vU(e){const{scrollTop:t,scrollHeight:n,clientHeight:r,threshold:s}=e;return{isAtTop:t<=s,isAtBottom:t+r>=n-s}}const Pb={base:{kB7OPa:"ui-9f619",kzqmXN:"ui-eq5yr9",k7Eaqz:"ui-gqtt45",ks0D6T:"ui-193iq5w",kAzted:"ui-1us19tq",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",$$css:!0},horizontal:{kzqmXN:"ui-14atkfc",kZKoxP:"ui-g7h5cd",kXwgrk:"ui-1q0g3np",$$css:!0},both:{kzqmXN:"ui-ezivpi",k7Eaqz:"ui-gqtt45",ks0D6T:"ui-1x1rfll",kZKoxP:"ui-t7dq6l",kXwgrk:"ui-dt5ytf",$$css:!0}},Pu={base:{kVAEAm:"ui-10l6tqk",kY2c9j:"ui-1n327nk",k87sOh:"ui-16271f3",kCIrl2:"ui-zkb8sy",krVfgx:"ui-1c87l4o",kbCHJM:"ui-1t8mvi6",kzqmXN:"ui-790ffn",kfzvcC:"ui-67bb7w",k1xSpc:"ui-1lliihq ui-y36ywk",$$css:!0},horizontal:{k87sOh:"ui-80663w",kCIrl2:"ui-zkb8sy",krVfgx:"ui-1gncbth",kbCHJM:"ui-17roi93",kzqmXN:"ui-14atkfc",kZKoxP:"ui-a38mao",$$css:!0},bothVertical:{krVfgx:"ui-1143y87",$$css:!0},bothHorizontal:{kCIrl2:"ui-1u4w851",$$css:!0},visibilityNever:{k1xSpc:"ui-1s85apg",$$css:!0}},$b={base:{kVAEAm:"ui-10l6tqk",k87sOh:"ui-13vifvy",kCIrl2:"ui-3m8u43",krVfgx:"ui-dd4er5",kbCHJM:"ui-u96u03",kAzted:"ui-4jlmx6",kzqmXN:"ui-790ffn",kaIpWk:"ui-1i4c3av",kWkggS:"ui-1m4ooaa ui-1kik0b9 ui-19p5jqy ui-gk890x",kSiTet:"ui-1hc1fzr",kfzvcC:"ui-67bb7w",k3aq6I:"ui-oww4n8",k1ekBW:"ui-1e8aii2",kIyJzY:"ui-1vaoic9 ui-144st5w",kAMwcw:"ui-1aiz5cx",$$css:!0},horizontal:{k87sOh:"ui-13vifvy",kCIrl2:"ui-wukr4l",krVfgx:"ui-1ey2m1c",kbCHJM:"ui-u96u03",kzqmXN:"ui-14atkfc",kZKoxP:"ui-a38mao",kAzted:"ui-65nank",k7Eaqz:"ui-cbmsab",$$css:!0},hoverHidden:{kSiTet:"ui-g01cxk ui-4gyw5p ui-gorybd",$$css:!0}};function kU(){return bU.base}function xU({direction:e,masked:t}){return[Wu.base,e==="horizontal"?Wu.horizontal:null,e==="both"?Wu.both:null,t?Wu.maskGeometry:null]}function SU(e){return[Pb.base,e==="horizontal"?Pb.horizontal:null,e==="both"?Pb.both:null]}function wE({direction:e,orientation:t,visibility:n}){return[Pu.base,t==="horizontal"?Pu.horizontal:null,e==="both"&&t==="vertical"?Pu.bothVertical:null,e==="both"&&t==="horizontal"?Pu.bothHorizontal:null,n==="never"?Pu.visibilityNever:null]}function EE(e,t){return[$b.base,e==="horizontal"?$b.horizontal:null,t?$b.hoverHidden:null]}const wU=1e4,Kd=5,IA=k.forwardRef(function({children:t,height:n,maxHeight:r,width:s,className:a,viewportClassName:l,rootStyle:c,viewportStyle:p,contentStyle:f,overlay:h,style:m,scrollbarVisibility:g=pU,isScrollbarRevealed:b=!1,direction:x="vertical",topFadeSize:w,bottomFadeSize:_,topFadeStartOpacity:E=0,bottomFadeStartOpacity:R=0,autoScrollToBottom:T=!1,scrollTrigger:C,autoScrollPauseTimeout:A=wU,onScrollStateChange:N,mapVerticalWheelToHorizontal:I=!1,scrollPadding:F=hU,scrollbarInset:V,onPointerEnter:j,onPointerLeave:q,...Z},B){const z=k.useRef(null),L=k.useRef(null),H=k.useRef(null),U=k.useRef(null),P=k.useRef(null),Y=k.useRef(null),D=k.useRef(null),$=x!=="horizontal",G=x!=="vertical",O=I&&!$,[J,ee]=k.useState(!1),[ie,he]=k.useState(!1),[le,ke]=k.useState(!1),Te=k.useRef(!1);Te.current=le;const Pe=k.useRef(0),ue=k.useRef(0),Ee=k.useRef(null),Ce=k.useRef(null);k.useLayoutEffect(()=>{const Fe=L.current,Ze=H.current;if(!Fe||!Ze)return;const ft=[];if($){const Qe=U.current,W=P.current;Qe&&W&&ft.push(new Vp({viewport:Fe,content:Ze,scrollbar:Qe,thumb:W,direction:"vertical",mapVerticalWheelToHorizontal:O}))}if(G){const Qe=Y.current,W=D.current;Qe&&W&&ft.push(new Vp({viewport:Fe,content:Ze,scrollbar:Qe,thumb:W,direction:"horizontal",mapVerticalWheelToHorizontal:O}))}if(ft.length!==0){for(const Qe of ft)Qe.attach();return()=>{for(const Qe of ft)Qe.detach()}}},[$,G,O]);const Me=k.useCallback(()=>{const Fe=L.current;return Fe?{scrollTop:Fe.scrollTop,scrollHeight:Fe.scrollHeight,clientHeight:Fe.clientHeight}:{scrollTop:0,scrollHeight:0,clientHeight:0}},[]),ve=k.useCallback((Fe=!1)=>{const Ze=L.current;Ze&&Ze.scrollTo({top:Ze.scrollHeight,behavior:Fe?"smooth":"instant"})},[]),xe=k.useCallback((Fe=!1)=>{const Ze=L.current;Ze&&Ze.scrollTo({top:0,behavior:Fe?"smooth":"instant"})},[]),De=k.useCallback(()=>{Ce.current===null&&(Ce.current=requestAnimationFrame(()=>{Ce.current=null,!Te.current&&ve(!1)}))},[ve]),Ne=k.useCallback(()=>{T&&(Te.current||De())},[T,De]);k.useImperativeHandle(B,()=>({scrollToBottom:ve,scrollToTop:xe,requestAutoScroll:Ne,getScrollPosition:Me,get rootElement(){return z.current},get viewportElement(){return L.current}}),[ve,xe,Ne,Me]);const Ie=k.useCallback(()=>{const Fe=L.current;if(!Fe)return;const{scrollTop:Ze,scrollHeight:ft,clientHeight:Qe}=Fe,{isAtTop:W,isAtBottom:ce}=vU({scrollTop:Ze,scrollHeight:ft,clientHeight:Qe,threshold:Kd});ee(!W),he(!ce),N?.({isAtBottom:ce,isAtTop:W}),ce&&Te.current&&(ke(!1),Ee.current&&(clearTimeout(Ee.current),Ee.current=null));const Ae=ft<ue.current-Kd,Ve=ft>ue.current+Kd,St=Ze<Pe.current-Kd;St&&!Ae&&!ce&&T&&!Te.current&&(ke(!0),Ee.current&&clearTimeout(Ee.current),Ee.current=setTimeout(()=>{ke(!1),Ee.current=null},A)),Ve&&T&&!Te.current&&!ce&&!St&&De(),Ae&&T&&!Te.current&&!ce&&De(),Pe.current=Ze,ue.current=ft},[N,T,A,De]),ge=dU(),fe=k.useCallback(()=>{ge.request(Ie)},[ge,Ie]);k.useEffect(()=>{const Fe=L.current,Ze=H.current;if(!Fe)return;const ft=()=>{fe()};Fe.addEventListener("scroll",ft,{passive:!0});const Qe=new ResizeObserver(Ie);return Qe.observe(Fe),Ze&&Qe.observe(Ze),()=>{Fe.removeEventListener("scroll",ft),Qe.disconnect(),ge.dispose()}},[Ie,fe,ge]),k.useEffect(()=>{C!==void 0&&T&&(Te.current||De())},[C,T,De]),k.useEffect(()=>{if(!$)return;const Fe=L.current;if(!Fe)return;const Ze=ft=>{const Qe=ft.deltaY;if(Qe===0)return;const W=Fe.scrollHeight-Fe.clientHeight;if(W<=0)return;const ce=Fe.scrollTop,Ae=ce<=0&&Qe<0,Ve=ce>=W-.5&&Qe>0;Ae||Ve||ft.stopPropagation()};return Fe.addEventListener("wheel",Ze,{passive:!0}),()=>Fe.removeEventListener("wheel",Ze)},[$]),k.useEffect(()=>{if(!G)return;const Fe=L.current;if(!Fe)return;const Ze=Qe=>{const W=Ly({deltaX:Qe.deltaX,deltaY:Qe.deltaY,mapVerticalWheelToHorizontal:O});if(W===null)return;const ce=Fe.scrollWidth-Fe.clientWidth;if(ce<=0)return;const Ae=Fe.scrollLeft;if(!(W<0&&Ae<=0)&&!(W>0&&Ae>=ce-.5)){if(!O){Qe.stopPropagation();return}Qe.preventDefault(),Fe.scrollLeft=Ae+W}},ft=O?{passive:!1,capture:!0}:{passive:!0,capture:!0};return Fe.addEventListener("wheel",Ze,ft),()=>Fe.removeEventListener("wheel",Ze,ft)},[G,O]);const se=w!==void 0||_!==void 0,ne=w??24,_e=_??24,te=g==="hover",[ae,ze]=k.useState(!1);k.useLayoutEffect(()=>{te&&ze(z.current?.matches(":hover")??!1)},[te]);const Ue=k.useCallback(Fe=>{ze(!0),j?.(Fe)},[j]),Ge=k.useCallback(Fe=>{ze(!1),q?.(Fe)},[q]),Ye=te&&!ae&&!b;k.useEffect(()=>()=>{Ee.current&&clearTimeout(Ee.current),Ce.current!==null&&(cancelAnimationFrame(Ce.current),Ce.current=null)},[]);const rt={"--scroll-area-scroll-padding":`${F}px`,...V!==void 0?{"--scrollbar-inset":`${V}px`}:void 0},st=Rn({rootClass:"ui-scroll-area",stylexStyles:[kU(),c],className:_n(se&&"ui-scroll-area--masked",a),style:{height:n,maxHeight:r,width:s,...rt,...m}}),ot=Rn({rootClass:"ui-scroll-area__viewport",stylexStyles:[xU({direction:x,masked:se}),p,se?Wu.mask(yU(J?`${ne}px`:"0px",ie?`${_e}px`:"0px",E,R)):null],className:l}),Et=Rn({rootClass:"ui-scroll-area__content",stylexStyles:[SU(x),f]}),it=Rn({rootClass:"ui-scroll-area__scrollbar",stylexStyles:wE({direction:x,orientation:"vertical",visibility:g})}),vt=dn(EE("vertical",Ye)),Xe=Rn({rootClass:"ui-scroll-area__scrollbar",stylexStyles:wE({direction:x,orientation:"horizontal",visibility:g})}),Dt=dn(EE("horizontal",Ye));return v.jsxs("div",{ref:z,className:st.className,style:st.style,"data-scroll-padding":F,"data-visibility":g,"data-direction":x,...Z,onPointerEnter:te?Ue:j,onPointerLeave:te?Ge:q,children:[v.jsx("div",{ref:L,className:ot.className,style:ot.style,children:v.jsx("div",{ref:H,className:Et.className,style:Et.style,children:t})}),h,$&&v.jsx("div",{ref:U,className:it.className,style:it.style,"data-orientation":"vertical","data-scrollable":"false",role:"presentation","aria-hidden":"true",children:v.jsx("div",{ref:P,className:vt.className,style:vt.style,"data-orientation":"vertical"})}),G&&v.jsx("div",{ref:Y,className:Xe.className,style:Xe.style,"data-orientation":"horizontal","data-scrollable":"false",role:"presentation","aria-hidden":"true",children:v.jsx("div",{ref:D,className:Dt.className,style:Dt.style,"data-orientation":"horizontal"})})]})}),Kp=k.createContext(!1);function DA({children:e,dismiss:t}){const n=k.use(Kp);return v.jsx(Kp.Provider,{value:n||t,children:e})}const kp={base:{"--ui-menu-row-padding-block":"ui-kd6fbz","--ui-menu-row-padding-inline":"ui-1ucplye","--ui-menu-row-gap":"ui-1fi38xd","--ui-menu-row-border-radius":"ui-1swa0pb","--ui-menu-item-left-width":"ui-1bm229x","--ui-menu-item-left-height":"ui-1eaezr9","--ui-menu-search-row-padding-top":"ui-so2ig8","--ui-menu-section-title-padding-inline":"ui-e020nh",kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kY2c9j:"ui-fc2p8",kWkggS:"ui-f1vpex",kaIpWk:"ui-1043rbw",kGVxlE:"ui-137jh17",kVAEAm:"ui-1n2onr6",kMv6JI:"ui-1acoasx",k7Eaqz:"ui-1i9suas",ks0D6T:"ui-1va8c73",kMwMTN:"ui-1wd3ewq",kfSwDN:"ui-87ps6o",kY4cRS:"ui-lvsv26",k6sLGO:"ui-1q1rmc8",k3aq6I:"ui-17dzmu4",kgyCeQ:"ui-lp1x4z",kdrBUz:"ui-7iibnf",kHBbk8:"ui-c8icb0",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",ktR8K2:"ui-awy1a7",k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",kv0HGH:"ui-arstr8",kDVEDD:"ui-itxdhh",kUfP38:"ui-1k48kgn",kbMawA:"ui-14ir2rz",kloYau:"ui-2q1x1w",$$css:!0},sizeMd:{"--ui-menu-row-padding-block":"ui-1jjxvf6","--ui-menu-row-padding-inline":"ui-18k90n9","--ui-menu-row-gap":"ui-vzyzmz","--ui-menu-item-left-width":"ui-eurstk","--ui-menu-item-left-height":"ui-1eaezr9","--ui-menu-search-row-padding-top":"ui-14atyw8","--ui-menu-section-title-padding-inline":"ui-mhevzc","--ui-menu-row-border-radius":"ui-1jr1u8k",kaIpWk:"ui-1m7fhj7",$$css:!0},hasAttachment:{kWkggS:"ui-jbqb8w",kGVxlE:"ui-1gnnqk1",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",khm7nJ:"ui-3r2rup",kc3QkE:"ui-1h1zc6f",$$css:!0},dropIndicator:{kMeerF:"ui-1qgsegg",k3XXqK:"ui-aatb59",kjBf7l:"ui-pkz39j",kInvED:"ui-1jn6s22",k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",kH8cDV:"ui-1tny6zc",kLxBhq:"ui-e7xgmc",k3foIR:"ui-17mrvg7",k4zj60:"ui-1d1o5dh",ks3ayO:"ui-1ssvodr",kUfP38:"ui-gad8h8",kloYau:"ui-2q1x1w",kDVEDD:"ui-itxdhh",$$css:!0}},EU={base:{kVAEAm:"ui-ixxii4",kpwlN0:"ui-10a8y8t",kY2c9j:"ui-cfsmg2",kLKAdn:"ui-exx8yu",kpe85a:"ui-1xpa7k",kGO01o:"ui-18d9i69",kE3dHu:"ui-1uhho1l",keoZOQ:"ui-dj266r",km5ZXQ:"ui-1yf7rl7",k1K539:"ui-at24cr",koQZXg:"ui-j3b58b",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kLZC3w:"ui-1b4hy2t",kWqL5O:"ui-gfja2r",kSWEuD:"ui-11pwa6s",k26BEO:"ui-1ws9gjp",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kL6WhQ:"ui-1tnzt7h",kZ1KPB:"ui-yj58a3",k4WBpm:"ui-1b16gh4",kaZRDh:"ui-1pjslub",kysU6D:"ui-jyslct",kkrTdU:"ui-t0e3qv",kWkggS:"ui-jbqb8w",kY4cRS:"ui-lvsv26",$$css:!0}},gi={dropIndicatorSlot:{k1xSpc:"ui-jp7ctv",kfzvcC:"ui-47corl",$$css:!0},inner:{kLKAdn:"ui-12ryuzz",kpe85a:"ui-1t27tiq",kGO01o:"ui-ftabeb",kE3dHu:"ui-19hmszf",k2VNRW:"ui-1aj3mmm",$$css:!0},layout:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kAzted:"ui-2lwn1j",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",$$css:!0},bodyScroll:{kzQI83:"ui-1iyjqo2",kmuXW:"ui-s83m0k",kCS8Yb:"ui-dl72j9",kAzted:"ui-2lwn1j",$$css:!0},header:{kLKAdn:"ui-f6zju3",kpe85a:"ui-g31tg3",kGO01o:"ui-cnij5n",kE3dHu:"ui-43mhey",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-17fyfba",$$css:!0},footer:{kLKAdn:"ui-f6zju3",kpe85a:"ui-g31tg3",kGO01o:"ui-cnij5n",kE3dHu:"ui-43mhey",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-1aeic0j",$$css:!0},layoutCard:{kVAEAm:"ui-1n2onr6",kWkggS:"ui-f1vpex",kaIpWk:"ui-1pjcqnp",kGVxlE:"ui-137jh17",k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",kv0HGH:"ui-arstr8",kDVEDD:"ui-itxdhh",kUfP38:"ui-1k48kgn",kbMawA:"ui-14ir2rz",kloYau:"ui-2q1x1w",$$css:!0},attachment:{kVAEAm:"ui-1n2onr6",kmuXW:"ui-2lah0s",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kWkggS:"ui-f1vpex",kaIpWk:"ui-1pjcqnp",kGVxlE:"ui-137jh17",k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",kv0HGH:"ui-arstr8",kDVEDD:"ui-itxdhh",kUfP38:"ui-1k48kgn",kbMawA:"ui-14ir2rz",kloYau:"ui-2q1x1w",$$css:!0},list:{kH6xsr:"ui-3ct3a4",keoZOQ:"ui-dj266r",km5ZXQ:"ui-1yf7rl7",k1K539:"ui-at24cr",koQZXg:"ui-j3b58b",kLKAdn:"ui-exx8yu",kpe85a:"ui-1xpa7k",kGO01o:"ui-18d9i69",kE3dHu:"ui-1uhho1l",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kOIVth:"ui-1374kml",$$css:!0},virtualizedList:{kOIVth:"ui-xhr3t",$$css:!0},virtualizedRow:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kGNEyG:"ui-1qjc9v5",kB7OPa:"ui-9f619",$$css:!0},virtualizedScroller:{kAnDOJ:"ui-6ehuon",kOuLrU:"ui-fk6m8",$$css:!0}},ui={base:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-6s0dn4",kB7OPa:"ui-9f619",kAzted:"ui-bpgt9h",kOIVth:"ui-1kk7d6x",kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kLKAdn:"ui-1xgckd",kpe85a:"ui-9cta2o",kGO01o:"ui-1mv37q2",kE3dHu:"ui-1166h4g",kaIpWk:"ui-1w5zb4f",kkrTdU:"ui-1ypdohk",kWkggS:"ui-jbqb8w",$$css:!0},focused:{kWkggS:"ui-flfp0o",$$css:!0},submenuHover:{kWkggS:"ui-qjnua1",$$css:!0},selected:{kWkggS:"ui-i07v4r",$$css:!0},disabled:{kMwMTN:"ui-4b2ntj",kkrTdU:"ui-t0e3qv",$$css:!0},disabledFocused:{kWkggS:"ui-jbqb8w",$$css:!0},hasDescription:{kGNEyG:"ui-1cy8zhl",$$css:!0},muted:{kMwMTN:"ui-1e4uaio",$$css:!0},mutedFocused:{kMwMTN:"ui-19aaqeu",$$css:!0},indent:{kE3dHu:"ui-20x7kn",$$css:!0},expanded:{kWkggS:"ui-flfp0o",$$css:!0},topAlign:{kGNEyG:"ui-1cy8zhl",$$css:!0}},zr={left:{kmuXW:"ui-2lah0s",kMwMTN:"ui-r88yfa",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kzqmXN:"ui-1kvrb00",kZKoxP:"ui-1gv9yxp",$$css:!0},leftDescription:{kGNEyG:"ui-1cy8zhl",kLKAdn:"ui-uve7l6",$$css:!0},leftTopAlign:{kGNEyG:"ui-1cy8zhl",kLKAdn:"ui-f6zju3",$$css:!0},leftWide:{kzqmXN:"ui-1td3qas",$$css:!0},content:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-1qughib",$$css:!0},right:{kmuXW:"ui-2lah0s",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kMwMTN:"ui-19aaqeu",$$css:!0},rightDescription:{kGNEyG:"ui-1cy8zhl",keoZOQ:"ui-1k5org8",$$css:!0},rightTopAlign:{kGNEyG:"ui-1cy8zhl",keoZOQ:"ui-1om1abp",$$css:!0},rightDisabled:{kMwMTN:"ui-1e4uaio",$$css:!0},rightHidden:{k33iCy:"ui-lshs6z",$$css:!0},submenuRight:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",$$css:!0},wrapper:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",k7Eaqz:"ui-euugli",kUk6DE:"ui-98rzlu",kLWn49:"ui-1evy7pa",$$css:!0},title:{kzqmXN:"ui-h8yej3",kUk6DE:"ui-98rzlu",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",$$css:!0},description:{k63SB2:"ui-20ajya",kMwMTN:"ui-4b2ntj",$$css:!0}},Wo={wrapper:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",$$css:!0},wrapperInline:{kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1pha0wt",kOIVth:"ui-ehausa",$$css:!0},title:{kMwMTN:"ui-1wd3ewq",$$css:!0},titleInline:{kzQI83:"ui-1ikap7u",kmuXW:"ui-2lah0s",kCS8Yb:"ui-1r8uery",k7Eaqz:"ui-euugli",ks0D6T:"ui-1t8xbu",$$css:!0},subtitle:{kMwMTN:"ui-4b2ntj",$$css:!0},subtitleInline:{kzQI83:"ui-gyuaek",kmuXW:"ui-2lah0s",kCS8Yb:"ui-1r8uery",k7Eaqz:"ui-euugli",ks0D6T:"ui-1t8xbu",$$css:!0},subtitleWrap:{khDVqt:"ui-eaf4i8",kXHlph:"ui-1plvlek",kORKVm:"ui-ryxfnj",kg5iWk:"ui-brixnn",$$css:!0}},Zp={wrapper:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kOIVth:"ui-1374kml",kEbPVU:"ui-g259vi",kisVnR:"ui-141yacn",kPhN0D:"ui-xacq05",kCI4qJ:"ui-119sr6i",kflGA3:"ui-144guhz",kuQXTp:"ui-yhg72o",kw9u9s:"ui-1of9cmv",k6ANuI:"ui-qapjow",kGu7Qk:"ui-1pebxt9",kvgbxY:"ui-449esf",kSChS3:"ui-i7iayf",kW5UhK:"ui-43qgld",kIK0UP:"ui-16isvt",kKhlpd:"ui-1s6a5gi",kWPmei:"ui-f2yixb",k1ZCP1:"ui-9ymq9g",kZZ4uj:"ui-wse4q8",kXJ5VR:"ui-tv04z4",kViea3:"ui-14mhnfs",k3zOy0:"ui-bvt3p7",k8c0Y5:"ui-1w1m56g",kgJ9Hf:"ui-1tyhgdo",kaDzy6:"ui-1w9ugyd",kMY8PA:"ui-uj3c0",kjtpqk:"ui-t5fofe",kpiC9T:"ui-gb9cim",kaGYpq:"ui-bakwtp",kDXkox:"ui-1hi58d5",kQfWG7:"ui-1fz3kxe",k8jt7o:"ui-1b7fwf8",$$css:!0},title:{kLKAdn:"ui-f6zju3",kpe85a:"ui-1bjvzyu",kGO01o:"ui-cnij5n",kE3dHu:"ui-qqt8gd",kMwMTN:"ui-4b2ntj",$$css:!0},titleAction:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-1qughib",kOIVth:"ui-ehausa",$$css:!0},textAction:{kmuXW:"ui-2lah0s",kEafiO:"ui-972fbf",kWqL5O:"ui-gfja2r",kt9PQ7:"ui-1qhh985",kZ1KPB:"ui-yj58a3",kWkggS:"ui-jbqb8w",kLKAdn:"ui-exx8yu",kpe85a:"ui-1xpa7k",kGO01o:"ui-18d9i69",kE3dHu:"ui-1uhho1l",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",k63SB2:"ui-1pd3egz",kLWn49:"ui-15bjb6t",kMwMTN:"ui-4b2ntj ui-7gh5u8",kkrTdU:"ui-1ypdohk",kaIpWk:"ui-1e1y6u3",k1ekBW:"ui-1oy24xj",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",$$css:!0}},TU={divider:{k1xSpc:"ui-1lliihq",kEafiO:"ui-jpjugk",kPef9Z:"ui-13fuv20",kLZC3w:"ui-14av3n6",keoZOQ:"ui-15lde7i",km5ZXQ:"ui-1lix3vl",k1K539:"ui-4qbr5s",koQZXg:"ui-svz4a7",kfzvcC:"ui-47corl",$$css:!0}},_U={row:{kLKAdn:"ui-fs8kq3",kpe85a:"ui-9cta2o",kGO01o:"ui-b6dno7",kE3dHu:"ui-1166h4g",$$css:!0}},Py={surface:{kzqmXN:"ui-1oysuqx",kskxy:"ui-uyqlj2",kORKVm:"ui-1odjw0f",kfzvcC:"ui-67bb7w",k5wCbM:"ui-1597r2g",k6w4Gs:"ui-xkn5u1",$$css:!0},surfaceMedium:{kzqmXN:"ui-ezivpi",ks0D6T:"ui-y2m5lo",$$css:!0},surfaceWide:{kzqmXN:"ui-ezivpi",ks0D6T:"ui-c74ic2",$$css:!0}},Wp={empty:{kLKAdn:"ui-f6zju3",kpe85a:"ui-1jkygx",kGO01o:"ui-cnij5n",kE3dHu:"ui-1o7kk3e",kMwMTN:"ui-4b2ntj",k9WMMc:"ui-2b8uid",$$css:!0},emptyIndent:{kE3dHu:"ui-1hl851k",$$css:!0},loading:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kOIVth:"ui-ehausa",kLKAdn:"ui-13ly8rp",kpe85a:"ui-1jkygx",kGO01o:"ui-1xlntvz",kE3dHu:"ui-1o7kk3e",kMwMTN:"ui-4b2ntj",$$css:!0},loadingSpinner:{kKVMdj:"ui-138fvbv",k44tkh:"ui-1q3qbx4 ui-1s1fvk8",kyAemX:"ui-1esw782",ko0y90:"ui-a4qsjk",$$css:!0}};function RU(e,t=!1){return[kp.base,Fi.root,e==="md"&&kp.sizeMd,t&&kp.hasAttachment]}function CU(e=!1){return e&&kp.dropIndicator}function AU(){return EU.base}function NU(){return gi.inner}function OU(){return gi.dropIndicatorSlot}function MU(e=!1){return[gi.layout,e&&gi.layoutCard]}function IU(){return gi.attachment}function DU(){return gi.bodyScroll}function zU(){return gi.header}function jU(){return gi.footer}function LU(e=!1){return[gi.list,e&&gi.virtualizedList]}function PU(){return gi.virtualizedRow}function $U(){return gi.virtualizedScroller}function uk(e={}){return[ui.base,e.selected&&ui.selected,e.inSubmenu&&!e.disabled&&ui.submenuHover,e.focused&&ui.focused,e.expanded&&ui.expanded,e.disabled&&ui.disabled,e.disabled&&e.focused&&ui.disabledFocused,e.hasDescription&&ui.hasDescription,e.variant==="muted"&&ui.muted,e.variant==="muted"&&e.focused&&ui.mutedFocused,e.indent&&ui.indent,e.topAlign&&ui.topAlign]}function BU(e={}){return[zr.left,e.hasDescription&&zr.leftDescription,e.wideLeft&&zr.leftWide,e.topAlign&&zr.leftTopAlign]}function FU(){return zr.content}function UU(e={}){return[zr.right,e.hasDescription&&zr.rightDescription,e.disabled&&zr.rightDisabled,e.topAlign&&zr.rightTopAlign,e.trailingHidden&&zr.rightHidden]}function qU(){return zr.submenuRight}function HU(){return zr.wrapper}function GU(){return[jl.root,zr.title]}function VU(){return[po.root,jl.root,zr.description]}function KU(e){return[Wo.wrapper,e&&Wo.wrapperInline]}function ZU(e){return[jl.root,Wo.title,e&&Wo.titleInline]}function WU({inline:e,wrap:t}){return[po.root,jl.root,Wo.subtitle,e&&Wo.subtitleInline,t&&Wo.subtitleWrap]}function YU(){return _U.row}function XU(){return Zp.wrapper}function QU(e){return[po.root,Zp.title,e&&Zp.titleAction]}function JU(){return Zp.textAction}function e9(){return TU.divider}function Jc(){return Py.surface}function zA(e){switch(e){case"default":return;case"medium":return Py.surfaceMedium;case"wide":return Py.surfaceWide;default:return e}}function t9(e){return[po.root,Wp.empty,e&&Wp.emptyIndent]}function n9(){return[Fi.root,Wp.loading]}function r9(){return Wp.loadingSpinner}function $y(e,t,n){const[r,s]=k.useState(t),a=e!==void 0?e:r,l=k.useCallback(c=>{const p=typeof c=="function"?c(a):c;e===void 0&&s(p),n?.(p)},[e,a,n]);return[a,l]}const Bb={fontFamily:{sans:"var(--cursor-font-family, var(--vscode-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif))",mono:"var(--cursor-font-family-mono, var(--monaco-monospace-font, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace))"},scrollbar:{verticalSize:"var(--vscode-scrollbar-vertical-size, 14px)",horizontalSize:"var(--vscode-scrollbar-horizontal-size, 12px)",thumbBackground:"var(--vscode-scrollbarSlider-background)",thumbHoverBackground:"var(--vscode-scrollbarSlider-hoverBackground)",thumbActiveBackground:"var(--vscode-scrollbarSlider-activeBackground)"},syntax:{foreground:"#d6d6dd",background:"#181818",keyword:"#82d2ce",string:"#e394dc",function:"#efb080",number:"#ebc88d",comment:"#E4E4E45E",constant:"#f8c762",parameter:"#d6d6dd",punctuation:"#d6d6dd",link:"#87c3ff",stringExpression:"#e394dc"}},i9={1:1,2:2},By={instant:50,fast:100,normal:150,slow:200,slower:300},jA={default:"ease",in:"ease-in",out:"ease-out",inOut:"ease-in-out",inStrong:"cubic-bezier(0.895, 0.03, 0.685, 0.22)",outStrong:"cubic-bezier(0.165, 0.84, 0.44, 1)",outQuint:"cubic-bezier(0.16, 1, 0.3, 1)",inOutStrong:"cubic-bezier(0.77, 0, 0.175, 1)"},s9={"ne-0.25":-1,"ne-0.5":-2,"ne-0.75":-3,"ne-1":-4,"ne-1.25":-5,"ne-1.5":-6,"ne-1.75":-7,"ne-2":-8,"ne-2.25":-9,"ne-2.5":-10,"ne-2.75":-11,"ne-3":-12,"ne-3.25":-13,"ne-3.5":-14,"ne-3.75":-15,"ne-4":-16,"ne-4.25":-17,"ne-4.5":-18,"ne-4.75":-19,"ne-5":-20,"0.25":1,"0.5":2,"0.75":3,1:4,"1.25":5,"1.5":6,"1.75":7,2:8,"2.25":9,"2.5":10,"2.75":11,3:12,"3.25":13,"3.5":14,"3.75":15,4:16,"4.25":17,"4.5":18,"4.75":19,5:20,"5.5":22,6:24,"6.5":26,7:28,"7.5":30,8:32,"8.5":34,9:36,"9.5":38,10:40,11:44,12:48,13:52,14:56,15:60,16:64,17:68,18:72,19:76,20:80},o9={none:0,xs:2,sm:4,base:6,lg:8,xl:12,"2xl":14,"3xl":16,full:9999},a9={xs:20,sm:24,base:28,lg:32},l9={xs:11,sm:12,base:13,lg:14},u9={xs:14,sm:16,base:18,lg:20},c9={xs:.07,sm:0,base:-.08,lg:-.15,xl:.08,"2xl":-.46,"3xl":-.26},f9=.98,d9=2,TE={open:By.fast,close:By.fast},p9=jA.outQuint;function LA(e){const[t,n]=e.split("-");switch(t){case"top":case"right":case"bottom":case"left":return{side:t,alignment:n==="start"||n==="end"?n:void 0};default:throw new Error(`Unsupported floating placement: ${e}`)}}function h9(e){const{side:t,alignment:n}=LA(e);switch(t){case"top":return`${_E(n)} bottom`;case"right":return`left ${RE(n)}`;case"bottom":return`${_E(n)} top`;case"left":return`right ${RE(n)}`}}function m9(e,t={}){const{side:n}=LA(e),r=t.offset??d9,s=t.scale??f9;switch(n){case"top":return`translate3d(0, ${r}px, 0) scale(${s})`;case"right":return`translate3d(-${r}px, 0, 0) scale(${s})`;case"bottom":return`translate3d(0, -${r}px, 0) scale(${s})`;case"left":return`translate3d(${r}px, 0, 0) scale(${s})`}}function g9(e,t){return{opacity:0,transform:m9(e,t)}}function b9(e){return{transformOrigin:h9(e),transitionTimingFunction:p9}}function y9({closeDuration:e=TE.close,transform:t}={}){return{duration:{open:TE.open,close:e},initial:({placement:n})=>g9(n,t),common:({placement:n})=>b9(n)}}function _E(e){switch(e){case"start":return"left";case"end":return"right";case void 0:return"center"}}function RE(e){switch(e){case"start":return"top";case"end":return"bottom";case void 0:return"center"}}function v9(){const e=k.useRef(!0),t=k.useRef(void 0),n=k.useCallback(()=>{t.current!==void 0&&(clearTimeout(t.current),t.current=void 0)},[]),r=k.useCallback((s,a)=>{e.current&&(n(),t.current=setTimeout(()=>{t.current=void 0,s()},a))},[n]);return k.useEffect(()=>(e.current=!0,()=>{e.current=!1,n()}),[n]),k.useMemo(()=>({cancel:n,schedule:r}),[n,r])}const k9=300,PA=k.createContext(null);function $A({children:e}){const[t,n]=k.useState(null),r=v9(),s=k.useCallback(c=>{r.cancel(),n(c)},[r]),a=k.useCallback(c=>{r.schedule(()=>{n(p=>p===c?null:p)},k9)},[r]),l=k.useMemo(()=>({activeId:t,markOpen:s,markClosed:a}),[t,s,a]);return v.jsx(PA.Provider,{value:l,children:e})}function x9(e,t){const n=k.useContext(PA),r=n?.markOpen,s=n?.markClosed;return k.useEffect(()=>{if(!(!t||e==null||r==null||s==null))return r(e),()=>s(e)},[t,e,r,s]),{activeId:n?.activeId??null}}const Ll="data-ui-menu-item-region",BA=k.createContext("body");function ic({value:e,children:t}){return v.jsx(BA.Provider,{value:e,children:t})}function ef(){return k.useContext(BA)}const S9='[role="menuitem"]',CE=["pointermove","mousemove"];function FA(e){if(e.key==="ArrowDown"||e.key==="ArrowUp"||e.key==="ArrowLeft"||e.key==="ArrowRight"||e.key==="Home"||e.key==="End")return!0;if(!e.ctrlKey||e.metaKey)return!1;const t=e.key.toLowerCase();return t==="n"||t==="p"}function w9(e,t){if(t==null)return null;const n=e.current[t];return n instanceof HTMLElement?n:null}function E9(e,t){const n=e.current;for(let r=0;r<n.length;r++)if(n[r]?.getAttribute(Ll)===t)return r;return null}function UA(e,t,n){queueMicrotask(()=>{const r=E9(e,t);n(r??null)})}function qA(e,t){if(!(e instanceof Element))return null;const n=e.closest(S9);if(!n)return null;const r=t.current.indexOf(n);return r>=0?r:null}function T9(e,t){if(!e)return()=>{};for(const n of CE)e.addEventListener(n,t,{passive:!0});return()=>{for(const n of CE)e.removeEventListener(n,t)}}function AE({event:e,direction:t,activeIndex:n,listRef:r,restoreFocus:s}){const a=w9(r,n);if(!a)return!1;e.preventDefault(),e.stopPropagation();const l=document.activeElement===e.currentTarget;return a.focus(),a.dispatchEvent(new KeyboardEvent("keydown",{key:t,bubbles:!0,cancelable:!0})),l&&document.activeElement===a&&s?.(),!0}function HA(){const[e,t]=k.useState(!0),n=k.useCallback(()=>{t(!1)},[]),r=k.useCallback(()=>{t(!0)},[]),s=k.useCallback(()=>{t(!0)},[]);return{focusItemOnHoverEnabled:e,markKeyboardNavigation:n,markPointerNavigation:r,resetFocusItemOnHover:s}}const _9=50;function R9(e,t){k.useLayoutEffect(()=>{if(!e)return;const n=t.current;if(!(n instanceof HTMLElement))return;const r=n.closest('[role="menu"]');if(r!=null)return r.style.pointerEvents="none",n.style.pointerEvents="auto",()=>{r.style.pointerEvents="",n.style.pointerEvents=""}},[e,t])}function C9(){return{name:"bottomAnchor",fn({y:e,placement:t,rects:n,elements:r}){if(!t.startsWith("top"))return{};const s=r.floating.offsetParent,a=s===document.body&&window.getComputedStyle(s).position==="static";return{data:{bottom:(!s||s===document.documentElement||a?document.documentElement.clientHeight||window.innerHeight:s.clientHeight)-e-n.floating.height}}}}}function Lh(e=200){const t=k.useRef(0);return k.useEffect(()=>{const n=()=>{t.current=Date.now()+e};return window.addEventListener("focus",n),()=>{window.removeEventListener("focus",n)}},[e]),k.useCallback(n=>{const r=n.target,s=r instanceof Node?r.ownerDocument:document,a=Date.now(),l=s?.hasFocus()??document.hasFocus(),c=a>=t.current;return l&&c},[])}const A9={open:0,close:0},N9={opacity:1,transform:"none"},ck=k.createContext(null);function Ai(){const e=k.useContext(ck);if(!e)throw new Error("Menu components must be used within <Menu>");return e}function O9({children:e,open:t,defaultOpen:n=!1,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l="bottom-start",offset:c=4,flip:p=!0,closeOnSelect:f,instantClose:h=!1,instantTransitions:m=!1,returnFocusOnSelect:g=!0,focusItemOnOpen:b=!1,virtualFocus:x=!1,shouldKeepOpenDuringDrag:w=!1,lockPositionWhileOpen:_=!1,enableClick:E=!0,strategy:R}){const T=ZC(),[C,A]=$y(t,n,r),[N,I]=k.useState(""),F=k.useRef(null),[V,j]=k.useState(!1),[q,Z]=k.useState(!1),[B,z]=$y(s,null,a),{focusItemOnHoverEnabled:L,markKeyboardNavigation:H,markPointerNavigation:U,resetFocusItemOnHover:P}=HA(),Y=k.useRef([]),D=k.useRef([]),$=k.useRef(null),G=k.useCallback(_e=>{A(_e),_e?(I(""),$.current=null):z(null),P()},[P,A,z]),O=k.useRef(!1);k.useEffect(()=>{const _e=O.current;O.current=C,!_e&&C&&I(""),_e!==C&&P()},[C,P]);const{refs:J,floatingStyles:ee,middlewareData:ie,context:he,update:le}=nA({nodeId:T,open:C,onOpenChange:G,placement:l,strategy:R,middleware:[zv(c),...p?[Lv()]:[],jv(),Pv({padding:8,apply({availableHeight:_e,elements:te}){te.floating.style.setProperty("--ui-menu-available-height",`${Math.max(0,Math.floor(_e))}px`)}}),C9()],whileElementsMounted:_?void 0:Ip,transform:!1}),ke=YC(he,{enabled:q,delay:{open:75},handleClose:uA({blockPointerEvents:!0,requireIntent:!1})}),Te=eA(he,{enabled:E&&!q}),Pe=Lh(),ue=k.useCallback(_e=>w&&hi.getInstance().hasData()?!1:Pe(_e),[w,Pe]),Ee=tA(he,{outsidePressEvent:"click",outsidePress:ue}),Ce=sA(he,{role:"menu"}),Me=iA(he,{listRef:Y,activeIndex:B,onNavigate:z,loop:!1,virtual:x||V,focusItemOnOpen:b,focusItemOnHover:L}),ve=aA(he,{listRef:D,activeIndex:B,onMatch:V?void 0:z,enabled:!V}),{getReferenceProps:xe,getFloatingProps:De,getItemProps:Ne}=rA([ke,Te,Ee,Ce,Me,ve]),Ie=k.useCallback(_e=>({...xe(_e),ref:J.setReference,"aria-haspopup":"menu","aria-expanded":C}),[xe,J.setReference,C]),ge=m?{duration:A9,initial:N9}:y9(h?{closeDuration:0}:void 0),{isMounted:fe,styles:se}=oA(he,ge),ne=k.useMemo(()=>({isOpen:C,isMounted:fe,setIsOpen:A,activeIndex:B,setActiveIndex:z,markKeyboardNavigation:H,markPointerNavigation:U,virtualFocus:x,searchValue:N,setSearchValue:I,hasSearchInput:V,setHasSearchInput:j,enableHover:q,setHasHoverTrigger:Z,closeOnSelect:f,returnFocusOnSelect:g,nodeId:T,listRef:Y,labelsRef:D,searchInputRef:F,refs:J,floatingStyles:ee,middlewareData:ie,transitionStyles:se,context:he,updateFloating:le,getReferenceProps:xe,getFloatingProps:De,getItemProps:Ne,getTriggerProps:Ie,dismissCauseRef:$,shouldAllowPointerInteraction:ue}),[C,fe,A,B,z,H,U,x,N,V,q,f,g,T,J,ee,ie,se,he,le,xe,De,Ne,Ie,ue]);return v.jsx(WC,{id:T,children:v.jsx(ck.Provider,{value:ne,children:v.jsx($A,{children:e})})})}const GA=k.createContext(null);function tf(){const e=k.useContext(GA);if(!e)throw new Error("MenuItem must be used within Menu.Content or Menu.SubContent");return e}function VA({children:e,activeIndex:t,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l=!1}){const c=k.useMemo(()=>({activeIndex:t,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l}),[t,n,r,s,a,l]);return v.jsx(GA.Provider,{value:c,children:e})}const KA=k.createContext(void 0);function Ph(e){const t=k.useContext(KA);if(t===void 0&&!e)throw new Error(Jn(72));return t}const M9={...bL,disabled:nt(e=>e.disabled),instantType:nt(e=>e.instantType),isInstantPhase:nt(e=>e.isInstantPhase),trackCursorAxis:nt(e=>e.trackCursorAxis),disableHoverablePopup:nt(e=>e.disableHoverablePopup),lastOpenChangeReason:nt(e=>e.openChangeReason),closeOnClick:nt(e=>e.closeOnClick),closeDelay:nt(e=>e.closeDelay),hasViewport:nt(e=>e.hasViewport)};class $h extends eC{constructor(t){super({...I9(),...t},{popupRef:k.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Fv},M9)}setOpen=(t,n)=>{const r=n.reason,s=r===ci,a=t&&r===hp,l=!t&&(r===yl||r===_v);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,n),n.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(t,n);const c=()=>{const p={open:t,openChangeReason:r};a?p.instantType="focus":l?p.instantType="dismiss":r===ci&&(p.instantType=void 0);const f=n.trigger?.id??null;(f||t)&&(p.activeTriggerId=f,p.activeTriggerElement=n.trigger??null),this.update(p)};s?Ci.flushSync(c):c()};static useStore(t,n){const r=wr(()=>new $h(n)).current,s=t??r,a=vL({popupStore:s,onOpenChange:s.setOpen});return s.state.floatingRootContext=a,s}}function I9(){return{...gL(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}const ZA=QR(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:s,disableHoverablePopup:a=!1,trackCursorAxis:l="none",actionsRef:c,onOpenChange:p,onOpenChangeComplete:f,handle:h,triggerId:m,defaultTriggerId:g=null,children:b}=t,x=$h.useStore(h?.store,{open:r,openProp:s,activeTriggerId:g,triggerIdProp:m});uC(()=>{s===void 0&&x.state.open===!1&&r===!0&&x.update({open:!0,activeTriggerId:g})}),x.useControlledProp("openProp",s),x.useControlledProp("triggerIdProp",m),x.useContextCallback("onOpenChange",p),x.useContextCallback("onOpenChangeComplete",f);const w=x.useState("open"),_=!n&&w,E=x.useState("activeTriggerId"),R=x.useState("payload");x.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:a}),He(()=>{w&&n&&x.setOpen(!1,Rt(v2))},[w,n,x]),x.useSyncedValue("disabled",n),pL(x);const{forceUnmount:T,transitionStatus:C}=hL(_,x),A=x.select("floatingRootContext"),N=x.useState("isInstantPhase"),I=x.useState("instantType"),F=x.useState("lastOpenChangeReason"),V=k.useRef(null);He(()=>{C==="ending"&&F===Ss||C!=="ending"&&N?(I!=="delay"&&(V.current=I),x.set("instantType","delay")):V.current!==null&&(x.set("instantType",V.current),V.current=null)},[C,N,F,I,x]),He(()=>{_&&E==null&&x.set("payload",void 0)},[x,E,_]);const j=k.useCallback(()=>{x.setOpen(!1,D9(x,by))},[x]);k.useImperativeHandle(c,()=>({unmount:T,close:j}),[T,j]);const q=BR(A,{enabled:!n,referencePress:()=>x.select("closeOnClick")}),Z=fj(A,{enabled:!n&&l!=="none",axis:l==="none"?void 0:l}),{getReferenceProps:B,getFloatingProps:z,getTriggerProps:L}=sC([q,Z]),H=k.useMemo(()=>B(),[B]),U=k.useMemo(()=>L(),[L]),P=k.useMemo(()=>z(),[z]);return x.useSyncedValues({activeTriggerProps:H,inactiveTriggerProps:U,popupProps:P}),v.jsx(KA.Provider,{value:x,children:typeof b=="function"?b({payload:R}):b})});function D9(e,t){const n=Rt(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}const z9=k.createContext(void 0);function j9(){return k.useContext(z9)}let L9=(function(e){return e[e.popupOpen=Rp.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const P9=600,WA=nL(function(t,n){const{className:r,render:s,handle:a,payload:l,disabled:c,delay:p,closeOnClick:f=!0,closeDelay:h,id:m,style:g,...b}=t,x=Ph(!0),w=a?.store??x;if(!w)throw new Error(Jn(82));const _=yh(m),E=w.useState("isTriggerActive",_),R=w.useState("isOpenedByTrigger",_),T=w.useState("floatingRootContext"),C=k.useRef(null),A=p??P9,N=h??0,{registerTrigger:I,isMountedByThisTrigger:F}=dL(_,C,w,{payload:l,closeOnClick:f,closeDelay:N}),V=j9(),{delayRef:j,isInstantPhase:q,hasProvider:Z}=N2(T,{open:R});w.useSyncedValue("isInstantPhase",q);const B=w.useState("disabled"),z=c??B,L=w.useState("trackCursorAxis"),H=w.useState("disableHoverablePopup"),U=wL(T,{enabled:!z,mouseOnly:!0,move:!1,handleClose:!H&&L!=="both"?ML():null,restMs(){const G=V?.delay,O=typeof j.current=="object"?j.current.open:void 0;let J=A;return Z&&(O!==0?J=p??G??A:J=0),J},delay(){const G=typeof j.current=="object"?j.current.close:void 0;let O=N;return h==null&&Z&&(O=G),{close:O}},triggerElementRef:C,isActiveTrigger:E,isClosing:()=>w.select("transitionStatus")==="ending"}),P=kL(T,{enabled:!z}).reference,Y={open:R},D=w.useState("triggerProps",F);return wn("button",t,{state:Y,ref:[n,I,C],props:[U,P,D,{onPointerDown(){w.set("closeOnClick",f)},id:_,[L9.triggerDisabled]:z?"":void 0},b],stateAttributesMapping:s2})}),YA=k.createContext(void 0);function $9(){const e=k.useContext(YA);if(e===void 0)throw new Error(Jn(70));return e}const B9=k.forwardRef(function(t,n){const{children:r,container:s,className:a,render:l,style:c,...p}=t,{portalNode:f,portalSubtree:h}=$R({container:s,ref:n,componentProps:t,elementProps:p});return!h&&!f?null:v.jsxs(k.Fragment,{children:[h,f&&Ci.createPortal(r,f)]})}),XA=k.forwardRef(function(t,n){const{keepMounted:r=!1,...s}=t;return Ph().useState("mounted")||r?v.jsx(YA.Provider,{value:r,children:v.jsx(B9,{ref:n,...s})}):null}),QA=k.createContext(void 0);function F9(){const e=k.useContext(QA);if(e===void 0)throw new Error(Jn(71));return e}const JA=k.forwardRef(function(t,n){const{render:r,className:s,anchor:a,positionMethod:l="absolute",side:c="top",align:p="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:g=5,arrowPadding:b=5,sticky:x=!1,disableAnchorTracking:w=!1,collisionAvoidance:_=Gz,style:E,...R}=t,T=Ph(),C=$9(),A=T.useState("open"),N=T.useState("mounted"),I=T.useState("trackCursorAxis"),F=T.useState("disableHoverablePopup"),V=T.useState("floatingRootContext"),j=T.useState("instantType"),q=T.useState("transitionStatus"),Z=T.useState("hasViewport"),B=wC({anchor:a,positionMethod:l,floatingRootContext:V,mounted:N,side:c,sideOffset:f,align:p,alignOffset:h,collisionBoundary:m,collisionPadding:g,sticky:x,arrowPadding:b,disableAnchorTracking:w,keepMounted:C,collisionAvoidance:_,adaptiveOrigin:Z?g$:void 0}),z=k.useMemo(()=>({open:A,side:B.side,align:B.align,anchorHidden:B.anchorHidden,instant:I!=="none"?"tracking-cursor":j}),[A,B.side,B.align,B.anchorHidden,I,j]),L=EC(t,z,{styles:B.positionerStyles,transitionStatus:q,props:R,refs:[n,T.useStateSetter("positionerElement")],hidden:!N,inert:!A||I==="both"||F});return v.jsx(QA.Provider,{value:B,children:L})}),U9={...fh,...oa},eN=k.forwardRef(function(t,n){const{className:r,render:s,style:a,...l}=t,c=Ph(),{side:p,align:f}=F9(),h=c.useState("open"),m=c.useState("instantType"),g=c.useState("transitionStatus"),b=c.useState("popupProps"),x=c.useState("floatingRootContext");aa({open:h,ref:c.context.popupRef,onComplete(){h&&c.context.onOpenChangeComplete?.(!0)}});const w=c.useState("disabled"),_=c.useState("closeDelay");return xL(x,{enabled:!w,closeDelay:_}),wn("div",t,{state:{open:h,side:p,align:f,instant:m,transitionStatus:g},ref:[n,c.context.popupRef,c.useStateSetter("popupElement")],props:[b,Zv(g),l],stateAttributesMapping:U9})});function q9(e){const[t,n]=k.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}function NE(e){const t=Er(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=jt(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:r;return(xl(n)!==a||xl(r)!==l)&&(n=a,r=l),{width:n,height:r}}class H9{constructor(){this.store=new $h}open(t){const n=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!n)throw new Error(Jn(81,t));this.store.setOpen(!0,Rt(by,void 0,n))}close(){this.store.setOpen(!1,Rt(by,void 0,void 0))}get isOpen(){return this.store.state.open}}function G9(){return new H9}const V9={root:{k6sLGO:"ui-1q1rmc8",k3nNDw:"ui-ctpfpq",k1ekBW:"ui-6o7n8i",kAMwcw:"ui-19frgs0",kIyJzY:"ui-7pq1vu ui-1fdgx8g ui-sagj69",kSiTet:"ui-1hc1fzr ui-1hw7zpd ui-iyypsa",k3aq6I:"ui-1c071of ui-17ll0io ui-2um2vg ui-1ahjy9u ui-s2p038 ui-fld6f8 ui-14hpypv ui-1296zyv ui-1h7md5i",$$css:!0}},tN=V9.root,nN={positioner:{kY2c9j:"ui-2hst0z",$$css:!0},surface:{kB7OPa:"ui-9f619",kWkggS:"ui-f1vpex",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-2kampu",kWqL5O:"ui-s1s249",kSWEuD:"ui-32b0ac",k26BEO:"ui-hnkhp4",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-1jfuf7k",kZ1KPB:"ui-e0pwq",k4WBpm:"ui-19ypqd9",kaZRDh:"ui-1l09f48",kaIpWk:"ui-1m7fhj7",kGVxlE:"ui-14cu5b6",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-1acoasx",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-vu1jfw",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0}},rN=nN.positioner,iN=nN.surface;function OE(e){const t=k.useRef(e);return k.useLayoutEffect(()=>{t.current=e},[e]),t}function K9(e,t){const n=OE(e),r=OE(t);return k.useCallback(s=>{if(s==null)return;const{ownerDocument:a}=s,l=c=>{const p=c.target,f=a.defaultView?.Element;if(f===void 0||!(p instanceof f))return;const h=r.current;if(h==null)return;const m=a.getElementById(h);m!=null&&p.contains(m)&&n.current.close()};return a.addEventListener("scroll",l,{capture:!0,passive:!0}),()=>{a.removeEventListener("scroll",l,!0)}},[n,r])}const Z9=_h;function sN(e,t){return t?Math.max(e,Z9):e}const ME={base:{kzqmXN:"ui-ezivpi",kLKAdn:"ui-uve7l6 ui-6qmaip",kpe85a:"ui-1yxiud8 ui-1qgu5t4",kGO01o:"ui-1rgtt3y ui-l66g7a",kE3dHu:"ui-yab65l ui-1ri4ohi",ks0D6T:"ui-w5ewwj",kHjlTd:"ui-j0a0fe",kfSwDN:"ui-87ps6o",kfzvcC:"ui-47corl ui-63ggwa",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",k1xSpc:"ui-1lliihq ui-106y27v",kXwgrk:"ui-1q0g3np ui-7b3dt5",kGNEyG:"ui-13iwyz6 ui-wai511",$$css:!0},interactive:{kfzvcC:"ui-67bb7w",kfSwDN:"ui-1hx0egp",$$css:!0}};function oN(e=!1){return[ME.base,e?ME.interactive:null]}const aN=k.createContext(null),lN=k.createContext(null);function Yp({children:e,placement:t=RC,offset:n=8,delay:r,closeDelay:s,sameAxisOnly:a=!1,disabled:l=!1,maxWidth:c,surfaceStyle:p,surfaceClassName:f,claimPortalLayer:h=!1,onOpenChange:m}){const g=k.use(aN),b=g?.open??r??Wv,x=g?.close??s??_h,w=k.useMemo(()=>G9(),[]),_=k.useRef(null),[E,R]=k.useState(!1),[T,C]=k.useState(!1),[A,N]=k.useState(!1),I=k.use(Kp),F=k.useCallback((z,L)=>{_.current=z,C(L),N(!1)},[]),V=k.useCallback(z=>{_.current===z&&(N(!0),w.close(),_.current=null,C(!1))},[w]),j=k.useCallback(z=>{z||(_.current=null,C(!1)),R(z),m?.(z)},[m]),{portalLayerStyles:q}=Hc("tooltip",h&&E),Z=I||A,B=k.useMemo(()=>({handle:w,delay:b,closeDelay:x,markTriggerActive:F,closeIfTriggerActive:V}),[w,b,x,F,V]);return v.jsxs(lN.Provider,{value:B,children:[e,v.jsx(W9,{activeInteractive:T,disabled:l,handle:w,offset:n,onOpenChange:j,placement:t,positionerStyle:h?q:void 0,sameAxisOnly:a,maxWidth:c,suppressPopup:Z,surfaceClassName:f,surfaceStyle:p})]})}function W9({handle:e,activeInteractive:t,placement:n,offset:r,sameAxisOnly:s,disabled:a,maxWidth:l,suppressPopup:c,surfaceStyle:p,surfaceClassName:f,positionerStyle:h,onOpenChange:m}){const g=zl(),b=Yv(n,r,s);return v.jsx(ZA,{disabled:a||c,disableHoverablePopup:!t,handle:e,onOpenChange:m,children:({payload:x})=>c||x?.content===null||x?.content===void 0?null:v.jsx(X9,{activeInteractive:t,align:b.align,alignOffset:b.alignOffset,collisionAvoidance:b.collisionAvoidance,handle:e,payload:x,portalRoot:g,positionerStyle:h,side:b.side,sideOffset:b.sideOffset,maxWidth:l,surfaceClassName:f,surfaceStyle:p})})}function Y9({content:e,popupRef:t}){return k.useLayoutEffect(()=>{t.current!==null&&(t.current.scrollTop=0)},[t]),typeof e=="function"?e():e}function X9({activeInteractive:e,payload:t,handle:n,portalRoot:r,maxWidth:s,surfaceStyle:a,surfaceClassName:l,positionerStyle:c,side:p,align:f,sideOffset:h,alignOffset:m,collisionAvoidance:g}){const b=k.useRef(null),x=K9(n,t.triggerId),w=k.useCallback(R=>{b.current=R;const T=x(R);if(R!==null)return()=>{b.current===R&&(b.current=null),T?.()}},[x]),_=dn(rN),E=Rn({rootClass:"ui-tooltip",stylexStyles:[iN,oN(),tN,a,t.surfaceStyle],className:_n(l,t.tooltipClassName)});return v.jsx(XA,{container:r??void 0,children:v.jsx(JA,{align:f,alignOffset:m,className:_.className,collisionAvoidance:g,collisionPadding:8,side:p,sideOffset:h,style:{..._.style,...c},children:v.jsx(eN,{"aria-label":t.ariaLabel,className:E.className,"data-interactive":e,ref:w,role:"tooltip",style:s!==void 0?{...E.style,maxWidth:s}:E.style,children:v.jsx(Y9,{content:t.content,popupRef:b},t.contentKey)})})})}function Q9({handle:e,children:t,content:n,contentKey:r,disabled:s=!1,surfaceStyle:a,tooltipClassName:l,delay:c,closeDelay:p,interactive:f=!1,"aria-label":h,id:m,onMouseEnter:g,onFocus:b,onPotentialActivate:x,...w}){const _=k.useId(),E=m??_,R=k.Children.only(t),T=k.isValidElement(R),C=k.useCallback(I=>{x?.(E,f),g?.(I)},[f,g,x,E]),A=k.useCallback(I=>{x?.(E,f),b?.(I)},[f,b,x,E]),N=k.useMemo(()=>({ariaLabel:h,content:n,contentKey:r??E,surfaceStyle:a,tooltipClassName:l,triggerId:E}),[h,n,r,a,l,E]);return T?v.jsx(WA,{...w,closeDelay:p,delay:c,disabled:s,handle:e,id:E,onFocus:A,onMouseEnter:C,payload:N,render:R}):v.jsx(v.Fragment,{children:t})}function J9({children:e,content:t,disabled:n=!1,delay:r,closeDelay:s,interactive:a=!1,"aria-label":l,id:c,...p}){const f=k.use(lN),h=k.useId(),m=c??h;if(k.useLayoutEffect(()=>{if(f==null)return;const b=f.closeIfTriggerActive;return()=>{b(m)}},[f,m]),f==null)return v.jsx(v.Fragment,{children:e});const g=sN(s??f.closeDelay??_h,a);return v.jsx(Q9,{...p,"aria-label":l,closeDelay:g,content:t,delay:r??f.delay??Wv,disabled:n,handle:f.handle,id:m,interactive:a,onPotentialActivate:f.markTriggerActive,children:e})}(function(e){e.Trigger=J9})(Yp||(Yp={}));const e8="ui-menu",fk="ui-menu__backdrop",t8="ui-menu__list",n8="ui-menu__content",r8="ui-menu__drop-indicator-slot",i8="ui-menu__layout",s8="ui-menu__body-scroll",o8="ui-menu__header",a8="ui-menu__footer",l8="ui-menu__attachment",u8="ui-menu__row",c8="ui-menu__item-left",f8="ui-menu__item-content",d8="ui-menu__item-right",p8="ui-menu__item-wrapper",h8="ui-menu__item-title",m8="ui-menu__item-description",g8="ui-menu__text-wrapper",b8="ui-menu__title",y8="ui-menu__subtitle",v8="ui-menu__search-row",k8="ui-menu__section",x8="ui-menu__section-title",S8="ui-menu__section-text-action",w8="ui-menu__virtualized-section-divider",E8="ui-menu__submenu-trigger",T8="ui-menu__submenu-right-section",_8="ui-menu__toggle-row",R8="ui-menu__tooltip",C8="ui-menu__empty",A8="ui-menu__loading",N8="ui-menu__loading-spinner",O8="ui-menu__virtualized-row",M8="ui-menu__virtualized-scroller";function Yt(e,t,n={}){return Rn({rootClass:e,stylexStyles:t,className:n.className,style:n.style})}function dk({className:e,hasDropIndicator:t=!1,size:n,style:r,hasAttachment:s=!1,surfaceStyle:a}){return a=[CU(t),a],Yt(e8,[RU(n,s),a],{className:e,style:r})}function uN(e){return Yt(fk,AU(),{style:e})}function pk(e=!1,t){return Yt(t8,[LU(e),t],{className:e?"ui-menu__list--virtualized":void 0})}function hk(e){return Yt(n8,[NU(),e])}function I8(){return Yt(r8,OU())}function cN(e,t=!1,n){return Yt(i8,[MU(t),n],{style:e})}function D8(){return Yt(l8,IU())}function fN(){return Yt(o8,zU())}function dN(){return Yt(a8,jU())}function mk(e={},t){return Yt(u8,[{"ui--default-marker":"ui--default-marker",$$css:!0},uk(e),t],{className:e.className})}function z8(e={},t){return Yt(_8,[uk(e),t],{className:e.className})}function j8(e={}){return Yt(E8,uk(e),{className:e.className})}function L8(e={},t){return Yt(c8,[BU(e),t])}function P8(e){return Yt(f8,[FU(),e])}function $8(e={},t){return Yt(d8,[UU(e),t])}function gk(){return Yt(p8,HU())}function bk(){return Yt(h8,GU())}function yk(){return Yt(m8,VU())}function B8(e){return Yt(g8,KU(e))}function F8(e){return Yt(b8,ZU(e))}function U8({inline:e,wrap:t}){return Yt(y8,WU({inline:e,wrap:t}))}function q8(e,t){return Yt(v8,[YU(),t],{className:e})}function IE(e){return Yt(k8,[XU(),e])}function pN(e,t){return Yt(x8,[QU(e),t])}function H8(){return Yt(S8,JU())}function G8(){return Yt(w8,e9())}function V8(){return Yt(T8,qU())}function K8(e,t){return Yt(C8,[t9(e),t])}function Z8(){return Yt(A8,n9())}function W8(){return Yt(O8,PU())}function Y8(){return Yt(M8,$U())}const X8=Yt(N8,r9()).className,Xp="submenuOpenChange",vk=k.createContext(null);function Bh(){return k.use(vk)}function kk({children:e,layerNodeId:t,placement:n="right-start"}){const r=yo(),[s,a]=k.useState(new Set);k.useEffect(()=>{if(!r)return;const p=f=>{f.parentId===t&&a(h=>{const m=new Set(h);return f.isOpen?m.add(f.nodeId):m.delete(f.nodeId),m})};return r.events.on(Xp,p),()=>{r.events.off(Xp,p)}},[r,t]);const l=s.size>0,c=k.useMemo(()=>({hasOpenChild:l}),[l]);return v.jsx(vk.Provider,{value:c,children:v.jsx(Yp,{claimPortalLayer:!0,disabled:l,offset:6,placement:n,sameAxisOnly:!0,surfaceClassName:R8,surfaceStyle:Jc(),children:e})})}function hN({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,surfaceStyle:l}){const c=k.use(vk);return c==null?v.jsx(v.Fragment,{children:e}):v.jsx(Yp.Trigger,{closeDelay:a,content:t,contentKey:n,delay:s,disabled:r||c.hasOpenChild,interactive:!0,surfaceStyle:l,children:e})}function Q8(e,t){const n=yo(),r=bo();k.useEffect(()=>{if(!n||e===void 0)return;const s={nodeId:e,parentId:r,isOpen:t};return n.events.emit(Xp,s),()=>{t&&n.events.emit(Xp,{nodeId:e,parentId:r,isOpen:!1})}},[n,e,r,t])}const J8=360,mN="--ui-menu-available-width",e5="320px";function $u(e){return typeof e=="number"?`${e}px`:e}function Fb(e){return`min(${e}, var(${mN}, 100vw))`}function xk(e){const{width:t,minWidth:n,maxWidth:r,clampToAvailableWidth:s=!1}=e,l=t===void 0&&(n!==void 0||r!==void 0)?"max-content":$u(t??"200px");return s?{width:l==="max-content"?l:Fb(l),...n!=null&&{minWidth:Fb($u(n))},maxWidth:Fb(r!=null?$u(r):e5)}:{width:l,...n!=null&&{minWidth:$u(n)},...r!=null&&{maxWidth:$u(r)}}}const t5=MA("@@menu-content-noop",()=>lk({}));function n5({children:e,header:t,footer:n,attachment:r,"aria-label":s,"data-testid":a,className:l,surfaceStyle:c,contentStyle:p,layoutStyle:f,listStyle:h,scrollAreaStyles:m,style:g,dropIndicatorTop:b,maxHeight:x,width:w,minWidth:_,maxWidth:E,tooltipPlacement:R,size:T,backdrop:C,adaptiveHeight:A=!0,returnFocus:N,onKeyDownCapture:I,droppable:F,ref:V}){const j=Dl(),{isOpen:q,isMounted:Z,activeIndex:B,setActiveIndex:z,setIsOpen:L,markKeyboardNavigation:H,markPointerNavigation:U,virtualFocus:P,searchValue:Y,setSearchValue:D,hasSearchInput:$,searchInputRef:G,enableHover:O,closeOnSelect:J,nodeId:ee,listRef:ie,labelsRef:he,refs:le,floatingStyles:ke,middlewareData:Te,transitionStyles:Pe,context:ue,getFloatingProps:Ee,getItemProps:Ce,dismissCauseRef:Me,returnFocusOnSelect:ve}=Ai(),xe=C??!O,De=k.useRef(null),Ne=P&&!$,Ie=Lh(),ge=k.useSyncExternalStore(hi.subscribe,hi.isDragActive,hi.isDragActive),fe=ue.placement.startsWith("top"),se=fe&&Z?Te.bottomAnchor?.bottom??null:null,ne=k.useRef(null),_e=k.useRef(B),te=k.useRef(!1);k.useLayoutEffect(()=>{_e.current=B},[B]),k.useLayoutEffect(()=>{if(!q){te.current=!1;return}const be=Jt=>{FA(Jt)&&(te.current=!0,H())},Nt=Jt=>{const Gt=qA(Jt,ie);Gt==null||Gt===_e.current||z(Gt)},We=Jt=>{const Gt=te.current;te.current=!1,U(),Gt&&Nt(Jt.target)},ht=De.current;document.addEventListener("keydown",be,!0);const Qt=T9(ht,We);return()=>{document.removeEventListener("keydown",be,!0),Qt()}},[q,ie,H,U,z]),k.useLayoutEffect(()=>{if(!q){ne.current=null;return}if(!P||B==null||ne.current===B||(ne.current=B,!te.current))return;const be=ie.current[B]??null;if(!be)return;const Nt=requestAnimationFrame(()=>{be.scrollIntoView({block:"nearest",inline:"nearest"})});return()=>cancelAnimationFrame(Nt)},[q,P,B,ie]);const ae=k.useCallback(be=>{if(be.key==="Escape"){Me.current="escape";return}if(be.ctrlKey&&!be.metaKey){const We=be.key.toLowerCase();if(We==="n"||We==="p"){be.preventDefault();const ht=ie.current,Qt=ht.length;if(Qt===0)return;const Jt=_e.current,Gt=We==="n"?1:-1;let wt=Jt==null?We==="n"?0:Qt-1:Jt+Gt;for(;wt>=0&&wt<Qt;){if(ht[wt]!=null){z(wt);return}wt+=Gt}return}}if(!$)return;if(be.key.length===1&&!be.ctrlKey&&!be.metaKey&&!be.altKey){if(document.activeElement===G.current)return;be.preventDefault(),be.stopPropagation(),G.current?.focus(),D(Y+be.key),UA(ie,"body",z)}},[Me,$,ie,G,Y,z,D]),ze=k.useCallback(be=>{Ie(be.nativeEvent)&&(Me.current="backdrop",L(!1))},[Me,L,Ie]),Ue=k.useCallback(be=>{if(be.stopPropagation(),!Ie(be.nativeEvent))return;be.preventDefault(),Me.current="backdrop",L(!1);const ht=document.elementsFromPoint(be.clientX,be.clientY).find(Qt=>!Qt.classList.contains(fk));ht&&ht.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:be.clientX,clientY:be.clientY,screenX:be.screenX,screenY:be.screenY,button:be.button,buttons:be.buttons,ctrlKey:be.ctrlKey,shiftKey:be.shiftKey,altKey:be.altKey,metaKey:be.metaKey}))},[Me,L,Ie]),Ge=F!=null,{ref:Ye,isOver:rt,isDropBlocked:st}=fU({accept:F?.accept??t5,disabled:!Ge||(F?.disabled??!1),onDragEnter:F?.onDragEnter,onDragOver:F?.onDragOver,onDragLeave:F?.onDragLeave,onDrop:F?.onDrop}),ot=Wc([le.setFloating,De,V,Ge?Ye:null]),Et=zl(),{zIndex:it,portalLayerStyles:vt}=Hc("popover",Z);if(!Z)return null;const Xe=T??j?.menuSize??"sm",Dt={...ke,...Pe,...vt,...it!==null?{zIndex:it}:{},...g,...b!==void 0?{"--ui-menu-drop-indicator-top":`${b}px`}:{},...xk({width:w,minWidth:_,maxWidth:E}),...fe&&se!==null?{top:"auto",bottom:se}:{}},Fe={...vt,...it!==null?{zIndex:it-1}:{},pointerEvents:Ge&&ge?"none":void 0},Ze=x==null?void 0:A?`min(${typeof x=="number"?`${x}px`:x}, var(--ui-menu-available-height, 100vh))`:x,ft=r!=null,Qe=uN(Fe),W=dk({className:l,hasDropIndicator:b!==void 0,size:Xe,surfaceStyle:c,style:ft&&Ze!==void 0?{...Dt,maxHeight:Ze}:Dt,hasAttachment:ft}),ce=cN(ft||Ze===void 0?void 0:{maxHeight:Ze},ft,f),Ae=fN(),Ve=hk(p),St=pk(!1,h),At=dN(),qe=D8(),$e=I8();return v.jsxs(Xv,{...Et?{root:Et}:{},children:[xe&&v.jsx("div",{className:Qe.className,style:Qe.style,onClick:ze,onContextMenu:Ue,role:"none"}),v.jsx(Jv,{context:ue,initialFocus:Ne?-1:G,returnFocus:N??(Me.current!=="backdrop"&&(Me.current!=="selection"||ve)),modal:!Ne,children:v.jsxs("div",{ref:ot,className:W.className,style:W.style,tabIndex:-1,"data-size":Xe,"data-drop-active":Ge&&rt&&!st?"":void 0,"data-drop-blocked":Ge&&st?"":void 0,...a?{"data-testid":a}:{},...ft?{"aria-label":s??"Menu"}:{},...Ee({onKeyDown:ae,onKeyDownCapture:I,onMouseDown:P?be=>{be.stopPropagation()}:void 0}),children:[Ge&&F?.indicator!=null?v.jsx("div",{"aria-hidden":"true",className:$e.className,style:$e.style,children:F.indicator}):null,v.jsx(_s,{menuSize:Xe,children:v.jsx(DA,{dismiss:!q,children:v.jsx(kk,{layerNodeId:ee,placement:R,children:v.jsx(VA,{activeIndex:B,setIsOpen:L,getItemProps:Ce,searchValue:Y,closeOnSelect:J,virtualFocus:P,children:v.jsxs(qC,{elementsRef:ie,labelsRef:he,children:[v.jsxs("div",{className:ce.className,style:ce.style,...ft?{}:{role:"menu","aria-label":s??"Menu"},children:[t!=null?v.jsx("div",{className:Ae.className,style:Ae.style,children:v.jsx(ic,{value:"header",children:t})}):null,v.jsx(IA,{className:s8,rootStyle:[DU(),m?.root],viewportStyle:m?.viewport,contentStyle:m?.content,maxHeight:"none",children:v.jsx("div",{className:Ve.className,style:Ve.style,children:v.jsx("ul",{role:"presentation",className:St.className,style:St.style,children:e})})}),n!=null?v.jsx("div",{className:At.className,style:At.style,children:v.jsx(ic,{value:"footer",children:n})}):null]}),r!=null?v.jsx("div",{className:qe.className,style:qe.style,children:v.jsx("div",{className:Ve.className,style:Ve.style,children:v.jsx(ic,{value:"footer",children:r})})}):null]})})})})})]})})]})}function r5({children:e,indent:t=!1,rootStyle:n}){const r=K8(t,n);return v.jsx("div",{className:r.className,style:r.style,"data-indent":t||void 0,children:e})}const i5=k.createContext(null);function s5(){return k.useContext(i5)}const o5="application/x-cursor-draggable",a5=/\bElectron\/\d+/,Zd=u5("ui-i9pz9s"),l5="data-no-drag";let Vo=!1,DE=!1;function u5(e){return e?.split(/\s+/).filter(Boolean)??[]}function Wd(e,t,n){for(const r of t)e.classList.toggle(r,n)}function c5(){if(DE||typeof document>"u")return;DE=!0,document.addEventListener("pointerdown",t=>{if(t.button!==0||!(t.target instanceof Element)){Vo=!1;return}Vo=t.target.closest(`[${l5}]`)!==null},{capture:!0});const e=()=>{Vo=!1};document.addEventListener("pointerup",e,{capture:!0}),document.addEventListener("pointercancel",e,{capture:!0})}function f5(){return typeof navigator>"u"?!0:!a5.test(navigator.userAgent)}function d5({id:e,data:t,disabled:n=!1,dragImageOffset:r,onDragStart:s,onDragEnd:a}){const l=s5(),c=k.useRef(null),p=k.useRef({onDragStart:s,onDragEnd:a});p.current={onDragStart:s,onDragEnd:a};const f=k.useRef(t);f.current=t;const h=k.useRef(r);h.current=r;const m=k.useRef(l);m.current=l;const g=l?.activeDragId===e,b=k.useRef(g);return b.current=g,k.useEffect(()=>{const w=c.current;if(w)return Wd(w,Zd,!n&&g),()=>{Wd(w,Zd,!1)}},[n,g]),k.useEffect(()=>{const w=c.current;if(!w)return;if(n){w.removeAttribute("aria-grabbed");return}const _=g?"true":"false";w.getAttribute("aria-grabbed")!==_&&w.setAttribute("aria-grabbed",_)},[n,g]),{ref:k.useCallback(w=>{if(c.current=w,!w)return;Wd(w,Zd,!n&&b.current);const _=!n;if(w.draggable!==_&&(w.draggable=_),n)return;c5();const E=hi.getInstance(),R=C=>{if(Vo){Vo=!1,C.preventDefault(),C.stopPropagation();return}const A=f.current;E.setData(A);const N=w.ownerDocument,I=()=>{N.removeEventListener("dragend",I,!0),N.removeEventListener("drop",I,!0),N.removeEventListener("mousemove",I,!0),setTimeout(()=>{E.getData()===A&&(E.clearData(),Vo=!1,m.current?.setDragging(null,null))},0)};if(N.addEventListener("dragend",I,!0),N.addEventListener("drop",I,!0),N.addEventListener("mousemove",I,!0),C.dataTransfer){const F=f5();C.dataTransfer.effectAllowed=F?"copyMove":"move",C.dataTransfer.setData(o5,A.type),F&&C.dataTransfer.setData("text/plain",A.type);const V=h.current;V&&C.dataTransfer.setDragImage(w,V.x,V.y)}m.current?.setDragging(e,A,{x:C.clientX,y:C.clientY}),p.current.onDragStart?.(C)},T=C=>{E.clearData(),Vo=!1,m.current?.setDragging(null,null),p.current.onDragEnd?.(C)};return w.addEventListener("dragstart",R),w.addEventListener("dragend",T),()=>{w.removeEventListener("dragstart",R),w.removeEventListener("dragend",T),Wd(w,Zd,!1)}},[e,n]),isDragging:g}}const mn={base:{kMv6JI:"ui-1acoasx",keoZOQ:"ui-dj266r",km5ZXQ:"ui-1yf7rl7",k1K539:"ui-at24cr",koQZXg:"ui-j3b58b",kLKAdn:"ui-exx8yu",kpe85a:"ui-1xpa7k",kGO01o:"ui-18d9i69",kE3dHu:"ui-1uhho1l",$$css:!0},sizeInherit:{kGuDYH:"ui-1qlqyl8",kLWn49:"ui-15bjb6t",kb6lSQ:"ui-4gjf66",$$css:!0},variantCode:{kMv6JI:"ui-ul7cyv",$$css:!0},weightRegular:{k63SB2:"ui-20ajya",$$css:!0},weightMedium:{k63SB2:"ui-1yl5bsf",$$css:!0},weightSemibold:{k63SB2:"ui-13ebx5f",$$css:!0},weightBold:{k63SB2:"ui-1v8v64w",$$css:!0},colorPrimary:{kMwMTN:"ui-1wd3ewq",$$css:!0},colorSecondary:{kMwMTN:"ui-19aaqeu",$$css:!0},colorTertiary:{kMwMTN:"ui-4b2ntj",$$css:!0},colorQuaternary:{kMwMTN:"ui-1e4uaio",$$css:!0},colorActive:{kMwMTN:"ui-7qsbfx",$$css:!0},colorFocused:{kMwMTN:"ui-zlszhr",$$css:!0},colorRed:{kMwMTN:"ui-1jh5svw",$$css:!0},colorRedSecondary:{kMwMTN:"ui-o7cye4",$$css:!0},colorYellow:{kMwMTN:"ui-1izesbo",$$css:!0},colorYellowSecondary:{kMwMTN:"ui-14nh9a",$$css:!0},colorGreen:{kMwMTN:"ui-1w5rjie",$$css:!0},colorGreenSecondary:{kMwMTN:"ui-dki84f",$$css:!0},colorMagenta:{kMwMTN:"ui-xjecij",$$css:!0},colorMagentaSecondary:{kMwMTN:"ui-29qggb",$$css:!0},colorCyan:{kMwMTN:"ui-1d0l12",$$css:!0},colorCyanSecondary:{kMwMTN:"ui-l34bp",$$css:!0},colorOrange:{kMwMTN:"ui-11pqmr",$$css:!0},colorOrangeSecondary:{kMwMTN:"ui-11nfuof",$$css:!0},truncateStart:{k1xSpc:"ui-1lliihq",kzqmXN:"ui-h8yej3",k7Eaqz:"ui-euugli",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",ksoyAI:"ui-zyj77d",k9WMMc:"ui-dpxx8g",$$css:!0}},p5={xs:yP.root,sm:po.root,md:Fi.root,lg:dC.root,xl:vP.root,"2xl":kP.root,"3xl":xP.root,inherit:mn.sizeInherit},h5={regular:mn.weightRegular,medium:mn.weightMedium,semibold:mn.weightSemibold,bold:mn.weightBold},m5={primary:mn.colorPrimary,secondary:mn.colorSecondary,tertiary:mn.colorTertiary,quaternary:mn.colorQuaternary,active:mn.colorActive,focused:mn.colorFocused,red:mn.colorRed,"red-secondary":mn.colorRedSecondary,yellow:mn.colorYellow,"yellow-secondary":mn.colorYellowSecondary,green:mn.colorGreen,"green-secondary":mn.colorGreenSecondary,magenta:mn.colorMagenta,"magenta-secondary":mn.colorMagentaSecondary,cyan:mn.colorCyan,"cyan-secondary":mn.colorCyanSecondary,orange:mn.colorOrange,"orange-secondary":mn.colorOrangeSecondary};function g5({color:e,size:t,truncate:n,variant:r,weight:s}){return[mn.base,qv.root,p5[t],h5[s],r==="code"?mn.variantCode:null,e?m5[e]:null,n==="start"?mn.truncateStart:null,n==="end"?jl.root:null]}function Qp({as:e="span",variant:t="default",size:n="md",weight:r="regular",color:s,truncate:a,numeric:l,children:c,rootStyle:p,className:f,style:h,ref:m,...g}){const b=a===!0?"end":a===!1?void 0:a??void 0,{className:x,style:w}=dn(g5({color:s,size:n,truncate:b,variant:t,weight:r}),p);return v.jsx(e,{ref:m,className:_n("ui-text",x,f),style:{...w,...h},"data-variant":t,"data-size":n,"data-weight":r,"data-color":s,"data-truncate":b,"data-numeric":l||void 0,...g,children:b==="start"?v.jsxs(v.Fragment,{children:["",c,""]}):c})}const gN=k.createContext(null);function bN(e){const t=k.use(gN);if(t===null)throw new Error(`${e} must be used within Tooltip.Root`);return t}function yN({children:e,placement:t=RC,offset:n=8,openDelay:r=Wv,closeDelay:s=_h,disabled:a=!1,defaultOpen:l,open:c,sameAxisOnly:p=!1,interactive:f=!1,onOpenChange:h,onOpenChangeComplete:m}){const g=k.use(aN),b=k.use(Kp),x=a||b,w=g?.open??r,_=sN(g?.close??s,f),E=k.useMemo(()=>({disabled:x,instantDismiss:b,interactive:f,offset:n,placement:t,sameAxisOnly:p,triggerCloseDelay:_,triggerDelay:w}),[x,b,f,n,t,p,_,w]);return v.jsx(gN.Provider,{value:E,children:v.jsx(ZA,{defaultOpen:l,disabled:x,disableHoverablePopup:!f,onOpenChange:h,onOpenChangeComplete:m,open:c,children:e})})}function vN({children:e,ref:t,...n}){const{disabled:r,triggerCloseDelay:s,triggerDelay:a}=bN("Tooltip.Trigger");return v.jsx(WA,{...n,closeDelay:s,delay:a,disabled:r,ref:t,render:e})}function kN({content:e,anchor:t,ariaLabel:n,width:r,minWidth:s,maxWidth:a,surfaceStyle:l,surfaceClassName:c}){const{instantDismiss:p,interactive:f,offset:h,placement:m,sameAxisOnly:g}=bN("Tooltip.Popup"),b=zl(),{side:x,align:w,sideOffset:_,alignOffset:E,collisionAvoidance:R}=Yv(m,h,g),T=dn(rN),C=Rn({rootClass:"ui-tooltip",stylexStyles:[iN,oN(f),tN,l],className:c});return p?null:v.jsx(XA,{container:b??void 0,children:v.jsx(JA,{align:w,alignOffset:E,anchor:t,className:T.className,collisionAvoidance:R,collisionPadding:8,side:x,sideOffset:_,style:T.style,children:v.jsx(eN,{"aria-label":n,className:C.className,"data-interactive":f,role:"tooltip",style:r===void 0&&s===void 0&&a===void 0?C.style:{...C.style,width:r,minWidth:s,maxWidth:a},children:typeof e=="function"?e():e})})})}function b5({children:e,anchor:t,"aria-label":n,width:r,minWidth:s,maxWidth:a,surfaceStyle:l}){return v.jsx(kN,{anchor:t,ariaLabel:n,content:e,maxWidth:a,minWidth:s,surfaceStyle:l,width:r})}function _l({children:e,content:t,placement:n,offset:r,openDelay:s,closeDelay:a,disabled:l,defaultOpen:c,open:p,anchor:f,"aria-label":h,width:m,minWidth:g,maxWidth:b,className:x,surfaceStyle:w,sameAxisOnly:_,interactive:E,onOpenChange:R,onOpenChangeComplete:T,ref:C,...A}){const N=k.Children.only(e);return k.isValidElement(N)?v.jsxs(yN,{closeDelay:a,defaultOpen:c,disabled:l,interactive:E,offset:r,onOpenChange:R,onOpenChangeComplete:T,open:p,openDelay:s,placement:n,sameAxisOnly:_,children:[v.jsx(vN,{...A,ref:C,children:N}),v.jsx(kN,{anchor:f,ariaLabel:h,content:t,maxWidth:b,minWidth:g,width:m,surfaceClassName:x,surfaceStyle:w})]}):v.jsx(v.Fragment,{children:e})}(function(e){e.Root=yN,e.Trigger=vN,e.Popup=b5})(_l||(_l={}));function Sk({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,interactive:l=!0,surfaceStyle:c}){const p=Bh(),f=k.useMemo(()=>{const h=Jc();return c===void 0?h:[h,c]},[c]);return p!=null?v.jsx(hN,{closeDelay:a,content:t,contentKey:n,disabled:r,openDelay:s,surfaceStyle:c,children:e}):v.jsx(_l,{closeDelay:a,content:t,disabled:r,interactive:l,offset:6,openDelay:s,placement:"right",sameAxisOnly:!0,surfaceStyle:f,children:e})}function Rl({children:e,disabled:t=!1,hasDescription:n=!1,leading:r,trailing:s,rightFallback:a,trailingAccessory:l,topAlign:c=!1,trailingHidden:p=!1,wideLeft:f=!1,leadingStyle:h,contentStyle:m,trailingStyle:g}){const b=s??a,x=b!=null||l!=null,w=L8({hasDescription:n,topAlign:c,wideLeft:f},h),_=P8(m),E=$8({disabled:t,hasDescription:n,topAlign:c,trailingHidden:p},g);return v.jsxs(_s,{iconSize:"base",children:[r!=null?v.jsx("span",{className:w.className,style:w.style,children:r}):null,v.jsx("div",{className:_.className,style:_.style,children:e}),x?v.jsxs("span",{className:E.className,style:E.style,children:[b,l]}):null]})}const xN=k.createContext(!1);function nf(){return k.useContext(xN)}const Fh=k.createContext(null);function Uh(){const e=k.useContext(Fh);if(!e)throw new Error("SubMenu components must be used within <Menu.SubMenu>");return e}function wk(){const e=k.useContext(Fh),{setIsOpen:t,dismissCauseRef:n}=Ai();return k.useCallback(r=>{n.current="selection",r(!1),e!=null&&t(!1)},[e,t,n])}function Ek(e,t){const{searchValue:n}=tf();return t||!n||!e?!0:e.toLowerCase().includes(n.toLowerCase())}const y5=MA("@@menu-item-noop",()=>lk({})),v5=new y5({}),SN=k.createContext(null);function k5(){return k.useContext(SN)}function wN({children:e,label:t,ignoreSearch:n=!1,...r}){const s=t??(typeof e=="string"?e:"");return Ek(s,n)?v.jsx(EN,{...r,itemLabel:s,children:e}):null}function EN({children:e,"data-testid":t,"aria-haspopup":n,"aria-expanded":r,mentionMenuFlatIndex:s,disabled:a=!1,onMouseDown:l,onAuxClick:c,onSelect:p,onKeyDown:f,leading:h,trailing:m,tooltip:g,tooltipOpenDelay:b=0,tooltipCloseDelay:x=0,tooltipSurface:w="default",closeOnSelect:_,description:E,rootStyle:R,leadingStyle:T,contentStyle:C,trailingStyle:A,variant:N="default",trailingVisibility:I="always",selected:F=!1,indent:V=!1,wideLeftSection:j=!1,draggable:q,ref:Z,itemLabel:B,referenceRef:z,itemPropsTransform:L,trailingAccessory:H}){const{activeIndex:U,setIsOpen:P,getItemProps:Y,closeOnSelect:D,virtualFocus:$}=tf(),{shouldAllowPointerInteraction:G}=Ai(),O=nf(),J=wk(),ee=ef(),ie=ee==="body",he=_??D??!0,{ref:le,index:ke}=Ch({label:B||null}),Te=U===ke,[Pe,ue]=k.useState(!1);Bh();const Ee=k.useRef(null),Ce=k.useId(),Me=q!=null,ve=q?.mode==="pointer",xe=k.useSyncExternalStore(hi.subscribe,hi.isDragActive,hi.isDragActive),De=k.useRef(null),Ne=k.useRef(null),Ie=k.useRef(null),ge=k.useRef(null),fe=k.useRef(!1),[se,ne]=k.useState(null),{ref:_e,isDragging:te}=d5({id:q?.id??`menu-item-${Ce}`,data:q?.data??v5,disabled:!Me||ve||(q?.disabled??!1),dragImageOffset:q?.dragImageOffset,onDragStart:q?.onDragStart,onDragEnd:q?.onDragEnd}),ae=Wc([le,z,Z,Me&&!ve?_e:null]),ze=k.useCallback(be=>{Ee.current=be},[]),Ue=k.useMemo(()=>({setSubMenuOpen:ue,isSubMenuOpen:Pe,registerSubMenuOpener:ze}),[Pe,ze]),Ge=zA(w);k.useEffect(()=>()=>{De.current?.(),Ie.current!=null&&cancelAnimationFrame(Ie.current)},[]);const Ye=k.useCallback(()=>{Ie.current=null;const be=Ne.current,Nt=ge.current;!be||!Nt||(be.style.transform=`translate3d(${Nt.x+8}px, ${Nt.y+8}px, 0)`)},[]),rt=k.useCallback(be=>{ge.current=be,Ie.current==null&&(Ie.current=requestAnimationFrame(Ye))},[Ye]),st=k.useCallback(be=>{Ne.current=be,Ye()},[Ye]),ot=()=>{if(a)return;const be={defaultPrevented:!1,preventDefault:()=>{be.defaultPrevented=!0}};p?.(be),he&&!be.defaultPrevented&&J(P)},Et=be=>{if(fe.current){fe.current=!1,be.preventDefault(),be.stopPropagation();return}if(!G(be.nativeEvent)){be.preventDefault(),be.stopPropagation();return}ot()},it=k.useCallback(be=>{if(!G(be.nativeEvent)){be.preventDefault(),be.stopPropagation();return}if(l?.(be),!be.defaultPrevented){if(ve&&q!=null&&!q.disabled&&be.button===0){De.current?.();const Nt=hi.getInstance(),We=be.currentTarget,ht={clientX:be.clientX,clientY:be.clientY,isDragging:!1},Qt=()=>{document.removeEventListener("mousemove",Jt,!0),document.removeEventListener("mouseup",Gt,!0),Ie.current!=null&&(cancelAnimationFrame(Ie.current),Ie.current=null),ge.current=null,De.current=null,Nt.clearData(),setTimeout(()=>{fe.current=!1},0)},Jt=wt=>{const Kn=wt.clientX-ht.clientX,vi=wt.clientY-ht.clientY;if(!(!ht.isDragging&&Math.hypot(Kn,vi)<4)){if(!ht.isDragging){ht.isDragging=!0,fe.current=!0,Nt.setData(q.data);const xo=We.getBoundingClientRect().width;rt({x:wt.clientX,y:wt.clientY}),ne(xo),q.onPointerDragStart?.(wt)}wt.preventDefault(),rt({x:wt.clientX,y:wt.clientY}),q.onPointerDragMove?.(wt)}},Gt=wt=>{if(!ht.isDragging){Qt();return}wt.preventDefault(),ne(null),q.onPointerDragEnd?.(wt),Qt()};De.current=Qt,document.addEventListener("mousemove",Jt,!0),document.addEventListener("mouseup",Gt,!0)}$&&!Me&&be.preventDefault()}},[q,Me,ve,l,rt,G,$]),vt=k.useCallback(be=>{if(!G(be.nativeEvent)){be.preventDefault(),be.stopPropagation();return}c?.(be)},[c,G]),Dt=Y({onClick:Et,onKeyDown:be=>{a||(f?.(be),!be.defaultPrevented&&((be.key==="Enter"||be.key===" ")&&(be.preventDefault(),be.stopPropagation(),ot()),be.key==="ArrowRight"&&Ee.current&&(be.preventDefault(),be.stopPropagation(),Ee.current())))},onMouseDown:it,onAuxClick:vt}),Fe=L?.(Dt)??Dt,Ze=m!=null?v.jsx(SN.Provider,{value:Ue,children:m}):void 0,ft=gk(),Qe=bk(),W=yk(),ce=E!=null?v.jsxs("div",{className:ft.className,style:ft.style,children:[v.jsx("div",{className:Qe.className,style:Qe.style,children:e}),v.jsx("div",{className:W.className,style:W.style,children:E})]}):e,Ae=xe||Pe,Ve=I==="focused"&&(xe||!Te),St=mk({disabled:a,expanded:r===!0,focused:!xe&&Te,hasDescription:E!=null,indent:V,inSubmenu:O,selected:F,variant:N},R),At={role:"menuitem",tabIndex:Te?0:-1,...n!==void 0?{"aria-haspopup":n}:{},...r!==void 0?{"aria-expanded":r}:{},"aria-disabled":a||void 0,"data-expanded":r===!0||void 0,draggable:ve?!1:void 0,"data-disabled":a||void 0,"data-focused":!xe&&Te?!0:void 0,"data-menu-draggable":Me||void 0,"data-selected":F||void 0,"data-has-description":E!=null||void 0,"data-variant":N!=="default"?N:void 0,"data-indent":V||void 0,"data-wide-left":j||void 0,"data-dragging":te||se!=null||void 0,...t?{"data-testid":t}:{},...s!==void 0?{"data-mention-menu-flat-index":String(s)}:{},[Ll]:ee,className:St.className,style:St.style,...Fe},qe=se!=null&&q?.preview!=null?Ci.createPortal(v.jsx("div",{"aria-hidden":"true",ref:st,style:{left:0,pointerEvents:"none",position:"fixed",top:0,transform:"translate3d(-9999px, -9999px, 0)",width:se,willChange:"transform",zIndex:1e4},children:q.preview}),document.body):null,$e=ie?v.jsxs("li",{ref:ae,...At,children:[v.jsx(Rl,{disabled:a,hasDescription:E!=null,leading:h,trailing:Ze,trailingAccessory:H,trailingHidden:Ve,wideLeft:j,leadingStyle:T,contentStyle:C,trailingStyle:A,children:ce}),qe]}):v.jsxs("div",{ref:ae,...At,children:[v.jsx(Rl,{disabled:a,hasDescription:E!=null,leading:h,trailing:Ze,trailingAccessory:H,trailingHidden:Ve,wideLeft:j,leadingStyle:T,contentStyle:C,trailingStyle:A,children:ce}),qe]});return g!=null?v.jsx(Sk,{closeDelay:x,content:g,disabled:Ae,openDelay:b,surfaceStyle:Ge,children:$e}):$e}function qh({className:e,variant:t="default",size:n="lg",ref:r,disabled:s,startIcon:a,endIcon:l,inputGroupRootStyle:c,...p}){return v.jsxs(Ud.Root,{className:e,rootStyle:c,variant:t,size:n,disabled:s,children:[a!=null&&v.jsx(Ud.Icon,{name:a}),v.jsx(Ud.Input,{ref:r,...p}),l!=null&&v.jsx(Ud.Icon,{name:l})]})}function TN(){const e=k.useContext(Fh),t=k.useContext(ck),n=e??t;if(!n)throw new Error("useMenuLayerContext must be used within a <Menu> or <Menu.SubMenu>");return n}function x5({placeholder:e="Search...","aria-label":t,className:n,rootStyle:r,inputGroupRootStyle:s,value:a,onValueChange:l,autoFocus:c=!1}){const f=ef()==="body",h=nf(),{searchValue:m,setSearchValue:g,searchInputRef:b,activeIndex:x,setActiveIndex:w,listRef:_,setHasSearchInput:E}=TN(),R=k.useRef(null),T=a!==void 0&&l!==void 0,A=!T||c||h?b:R,N=T?a:m;k.useEffect(()=>{if(!T)return E(!0),()=>E(!1)},[T,E]),k.useLayoutEffect(()=>{if(T&&!c)return;const q=b.current;if(!q)return;q.focus({preventScroll:!0});const Z=requestAnimationFrame(()=>{document.activeElement!==q&&q.focus({preventScroll:!0})});return()=>cancelAnimationFrame(Z)},[T,c,b]);const I=q=>{T?l(q.target.value):(g(q.target.value),UA(_,"body",w),l?.(q.target.value))},F=q=>{if(ek(q))return;if(q.ctrlKey&&!q.metaKey){const B=q.key.toLowerCase();if(B==="n"||B==="p"){q.preventDefault();return}}if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Tab","Escape"].includes(q.key)&&!q.metaKey&&!q.ctrlKey&&!q.altKey&&q.stopPropagation(),T&&q.key==="Enter"){q.preventDefault(),q.stopPropagation();return}if(!T&&q.key==="Enter"&&x!=null){q.preventDefault();const B=_.current[x];B&&(B.click(),b.current?.focus())}if(q.key==="ArrowRight"){const B=q.currentTarget;if(!(B.selectionStart===B.value.length&&B.selectionEnd===B.value.length)){q.stopPropagation();return}AE({event:q,direction:"ArrowRight",activeIndex:x,listRef:_,restoreFocus:()=>b.current?.focus()});return}if(q.key==="ArrowLeft"){const B=q.currentTarget;if(!(B.selectionStart===0&&B.selectionEnd===0)){q.stopPropagation();return}AE({event:q,direction:"ArrowLeft",activeIndex:x,listRef:_,restoreFocus:()=>b.current?.focus()})}},V=q8(n,r),j=v.jsx(qh,{ref:A,type:"text",variant:"unfilled",size:"base",inputGroupRootStyle:s,value:N,onChange:I,onKeyDown:F,placeholder:e,"aria-label":t??"Search menu items"});return f?v.jsx("li",{className:V.className,style:V.style,role:"none",children:j}):v.jsx("div",{className:V.className,style:V.style,role:"none",children:j})}function S5({children:e,title:t,dividerVisibility:n="default",textAction:r,tooltip:s,noDivider:a,rootStyle:l,titleStyle:c}){const p=IE(s!=null?void 0:l),f=pN(r!=null,c),h=H8(),m=v.jsxs("div",{role:"group","aria-label":typeof t=="string"?t:void 0,className:p.className,style:p.style,"data-menu-section":!0,"data-divider-visibility":n!=="default"?n:void 0,"data-no-divider":a||void 0,children:[t&&v.jsxs("div",{role:"presentation",className:f.className,style:f.style,"data-has-action":r!=null||void 0,children:[v.jsx("span",{children:t}),r!=null?v.jsx("button",{type:"button",className:h.className,style:h.style,onClick:r.onClick,children:r.label}):null]}),e]});if(s!=null){const g=IE(l);return v.jsx(_l,{content:s,placement:"right",offset:6,openDelay:0,closeDelay:0,sameAxisOnly:!0,surfaceStyle:Jc(),children:v.jsx("div",{className:g.className,style:g.style,"data-menu-section":!0,"data-divider-visibility":n!=="default"?n:void 0,"data-no-divider":a||void 0,children:m})})}return m}function _N({children:e,trigger:t="hover",placement:n,anchorRef:r,offset:s,keepHoverSubmenuInset:a=!1,closeOnSelect:l,open:c,defaultOpen:p=!1,onOpenChange:f,hoverOpenDelay:h,dismissOnReferenceScroll:m=!1,suppressSiblingPointerGuard:g=!1,virtualFocus:b=!1,focusItemOnOpen:x}){const w=ZC(),[_,E]=$y(c,p,f),R=c!==void 0,T=t==="hover"&&(!R||r==null),[C,A]=k.useState(null),{focusItemOnHoverEnabled:N,markKeyboardNavigation:I,markPointerNavigation:F,resetFocusItemOnHover:V}=HA(),[j,q]=k.useState(""),[Z,B]=k.useState(!1),z=k.useRef([]),L=k.useRef([]),H=k.useRef(null);Q8(w,_);const U=k5();k.useEffect(()=>{U&&U.setSubMenuOpen(_)},[_,U]);const P=k.useRef(_);k.useEffect(()=>{const ae=P.current;P.current=_,ae!==_&&(q(""),_||A(null),V())},[_,V]);const Y=k.useCallback(ae=>{E(ae)},[E]);k.useEffect(()=>{if(U)return U.registerSubMenuOpener(()=>Y(!0)),()=>{U.registerSubMenuOpener(null)}},[U,Y]);const D=k.useCallback((ae,ze,Ue)=>{const Ge=H.current;!ae&&t==="hover"&&(Ue==="hover"||Ue==="safe-polygon")&&Ge?.value&&Ge.ownerDocument.activeElement===Ge||Y(ae)},[Y,t]),$=k.useCallback(()=>{Y(!1)},[Y]),O=n??(t==="hover"?"right-start":"bottom-start"),J={mainAxis:-2,alignmentAxis:-2},he=s??(a?J:t==="hover"?J:4),{refs:le,floatingStyles:ke,context:Te}=nA({nodeId:w,open:_,onOpenChange:D,placement:O,middleware:[zv(he),Lv(),jv({crossAxis:O.startsWith("left")||O.startsWith("right")}),Pv({padding:8,apply({availableWidth:ae,elements:ze}){ze.floating.style.setProperty(mN,`${Math.max(0,Math.floor(ae))}px`)}})],whileElementsMounted:Ip,transform:!1});k.useLayoutEffect(()=>{const ae=r?.current;ae&&le.setReference(ae)}),R9(T&&_&&!g,le.domReference);const{activeId:Pe}=x9(w,_),ue=Pe!=null?0:h??75,Ee=YC(Te,{enabled:T,delay:{open:ue},handleClose:uA({blockPointerEvents:!1,requireIntent:!1})}),Ce=eA(Te,{enabled:t==="click"&&!R}),Me=Lh(),ve=tA(Te,{ancestorScroll:m,bubbles:!0,outsidePressEvent:"click",outsidePress:Me}),xe=sA(Te,{role:"menu"}),De=iA(Te,{listRef:z,activeIndex:C,onNavigate:A,nested:!0,loop:!0,focusItemOnOpen:b?!1:x??!0,virtual:Z||b,focusItemOnHover:N}),Ne=aA(Te,{listRef:L,activeIndex:C,onMatch:Z?void 0:A,enabled:!Z&&!b}),{getReferenceProps:Ie,getFloatingProps:ge,getItemProps:fe}=rA([Ee,Ce,ve,xe,De,Ne]),se=k.useCallback(()=>({...Ie(),ref:r?void 0:le.setReference,"aria-haspopup":"menu","aria-expanded":_}),[Ie,le.setReference,_,r]),{isMounted:ne,styles:_e}=oA(Te,{duration:{open:0,close:_9},initial:{opacity:0,transform:"scale(1)"}}),te=k.useMemo(()=>({isOpen:_,isMounted:ne,setIsOpen:Y,closeFromKeyboard:$,activeIndex:C,setActiveIndex:A,markKeyboardNavigation:I,markPointerNavigation:F,trigger:t,closeOnSelect:l,nodeId:w,listRef:z,labelsRef:L,searchInputRef:H,searchValue:j,setSearchValue:q,hasSearchInput:Z,setHasSearchInput:B,refs:le,floatingStyles:ke,transitionStyles:_e,context:Te,getReferenceProps:Ie,getFloatingProps:ge,getItemProps:fe,getTriggerProps:se,virtualFocus:b}),[_,ne,Y,$,C,t,I,F,l,w,j,Z,b,le,ke,_e,Te,Ie,ge,fe,se]);return v.jsx(WC,{id:w,children:v.jsx(Fh.Provider,{value:te,children:e})})}function w5({children:e,disabled:t=!1,label:n,leading:r,topAlign:s=!1,trailing:a}){const{activeIndex:l,getItemProps:c}=tf(),{shouldAllowPointerInteraction:p}=Ai(),f=Uh(),h=ef(),m=h==="body",g=n??(typeof e=="string"?e:""),{ref:b,index:x}=Ch({label:g||null}),w=l===x,_=Wc([b,f.refs.setReference]),E=v.jsx(Mn,{name:"chevron-right",color:"tertiary"}),R=j8({disabled:t,expanded:f.isOpen,focused:w,topAlign:s}),T={role:"menuitem","aria-haspopup":"menu","aria-expanded":f.isOpen,"data-expanded":f.isOpen||void 0,tabIndex:w?0:-1,"aria-disabled":t||void 0,"data-disabled":t||void 0,"data-focused":w||void 0,"data-top-align":s||void 0,[Ll]:h,className:R.className,style:R.style,...f.getReferenceProps(c({onMouseDown(N){p(N.nativeEvent)||(N.preventDefault(),N.stopPropagation())},onClick(N){p(N.nativeEvent)||(N.preventDefault(),N.stopPropagation())},onKeyDown(N){N.key==="ArrowRight"&&!t&&(N.preventDefault(),N.stopPropagation(),f.setIsOpen(!0))}}))},C=V8(),A=v.jsx(Rl,{disabled:t,leading:r,topAlign:s,trailing:a!=null?v.jsx("div",{className:C.className,style:C.style,children:a}):void 0,rightFallback:E,children:e});return m?v.jsx("li",{ref:_,...T,children:A}):v.jsx("div",{ref:_,...T,children:A})}function E5({children:e,label:t,showChevron:n=!0,onKeyDown:r,closeOnSelect:s,...a}){const l=Uh(),c=t??(typeof e=="string"?e:""),p=h=>{a.disabled||(r?.(h),!h.defaultPrevented&&h.key==="ArrowRight"&&(h.preventDefault(),h.stopPropagation(),l.setIsOpen(!0)))},f=n?v.jsx(Mn,{name:"chevron-right",color:"tertiary"}):void 0;return v.jsx(EN,{...a,itemLabel:c,closeOnSelect:s??l.closeOnSelect,"aria-haspopup":"menu","aria-expanded":l.isOpen,referenceRef:l.refs.setReference,itemPropsTransform:l.getReferenceProps,onKeyDown:p,trailingAccessory:f,children:e})}function T5({children:e,"aria-label":t,"data-testid":n,className:r,surfaceStyle:s,width:a,minWidth:l,maxWidth:c,maxHeight:p,size:f,contentPadding:h}){const m=Dl(),g=Uh(),b=zl(),{portalLayerStyles:x}=Hc("popover",g.isMounted),w=f??m?.menuSize??"sm",{virtualFocus:_}=g;if(!g.isMounted)return null;const E={...g.floatingStyles,...g.transitionStyles,...x,...xk({width:a,minWidth:l,maxWidth:c,clampToAvailableWidth:!0})},R=dk({className:r,size:w,surfaceStyle:s,style:E}),T=hk(),C=pk(),A=I=>{I.stopPropagation()},N=I=>{g.markPointerNavigation();const F=qA(I,g.listRef);F!=null&&F!==g.activeIndex&&g.setActiveIndex(F)};return v.jsx(Xv,{...b?{root:b}:{},children:v.jsx(Jv,{context:g.context,disabled:_,initialFocus:g.hasSearchInput?g.searchInputRef:-1,returnFocus:!1,modal:!1,closeOnFocusOut:g.trigger==="click",children:v.jsx("div",{ref:g.refs.setFloating,className:R.className,style:R.style,"data-submenu":"","data-size":w,...n?{"data-testid":n}:{},...g.getFloatingProps({onClick:A,onMouseMove(I){N(I.target)},onPointerMove(I){N(I.target)},onKeyDown(I){if(FA(I)&&g.markKeyboardNavigation(),I.key==="ArrowLeft"||I.key==="Escape"){I.preventDefault(),I.stopPropagation(),g.closeFromKeyboard();const F=g.refs.domReference.current;F instanceof HTMLElement&&F.focus()}}}),children:v.jsx(xN.Provider,{value:!0,children:v.jsx(_s,{menuSize:w,children:v.jsx(IA,{maxHeight:p,children:v.jsx("div",{className:T.className,style:h===void 0?T.style:{...T.style,padding:h,scrollPaddingBlock:h},children:v.jsx(kk,{layerNodeId:g.nodeId,children:v.jsx(VA,{activeIndex:g.activeIndex,setIsOpen:g.setIsOpen,getItemProps:g.getItemProps,searchValue:g.searchValue,closeOnSelect:g.closeOnSelect,virtualFocus:_,children:v.jsx(qC,{elementsRef:g.listRef,labelsRef:g.labelsRef,children:v.jsx("ul",{role:"menu","aria-label":t??"Submenu",className:C.className,style:C.style,children:v.jsx($A,{children:e})})})})})})})})})})})})}const _5=k.createContext(void 0);function R5(){const e=k.useContext(_5);if(e===void 0)throw new Error(Jn(63));return e}let zE=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const C5={...Vc,checked(e){return e?{[zE.checked]:""}:{[zE.unchecked]:""}}},A5=k.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,{state:c}=Kc(),p=R5(),f={...c,...p};return wn("span",t,{state:f,ref:n,stateAttributesMapping:C5,props:l})}),N5="md",jE={root:{kVAEAm:"ui-1n2onr6",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kB7OPa:"ui-9f619",kmuXW:"ui-2lah0s",kaIpWk:"ui-1i4c3av",kMeerF:"ui-1k57tk5 ui-x510wv",k3XXqK:"ui-1t137rt ui-15veape",kjBf7l:"ui-1uczgqu ui-1whe2fk",kInvED:"ui-1wfwxd8 ui-1edn9mt",kSiTet:"ui-1hc1fzr ui-vlaemc",kWkggS:"ui-59yu97 ui-1jnhqrh",k1ekBW:"ui-15406qy",kIyJzY:"ui-7pq1vu",kAMwcw:"ui-6ekqhr",$$css:!0},sm:{kzqmXN:"ui-23j0i4",kZKoxP:"ui-1vatr1o","--ui-switch-thumb-travel":"ui-sc32xf",$$css:!0},md:{kzqmXN:"ui-1td3qas",kZKoxP:"ui-1a6rlst","--ui-switch-thumb-travel":"ui-9pb0k7",$$css:!0},lg:{kzqmXN:"ui-1guw455",kZKoxP:"ui-1e94bgo","--ui-switch-thumb-travel":"ui-1c3f5sz",$$css:!0}},O5={primary:{"--ui-switch-active-bg":"ui-i0s8m6",$$css:!0},green:{"--ui-switch-active-bg":"ui-1g3p0vo",$$css:!0},neutral:{"--ui-switch-active-bg":"ui-742exl",$$css:!0}};function M5({interactive:e,size:t,variant:n}){const r=v.jsx("span",{className:"ui-1lliihq ui-h8yej3 ui-5yr21d ui-1i4c3av ui-12peec7 ui-10z6xd1 ui-1g0ag68 ui-3oybdh ui-27jcm2 ui-11xpdln ui-622pbu ui-99dd5c ui-sagj69 ui-6tor67"}),s=e?v.jsx(A5,{className:"ui-10l6tqk ui-np7j22 ui-it89om ui-121ilyj ui-1plog1 ui-bryuvx ui-kkvxwt ui-11xpdln ui-1bqoo3p ui-sagj69 ui-1tkypeg",children:r}):v.jsx("span",{className:"ui-10l6tqk ui-np7j22 ui-it89om ui-121ilyj ui-1plog1 ui-bryuvx ui-kkvxwt ui-11xpdln ui-1bqoo3p ui-sagj69 ui-1tkypeg",children:r});return v.jsx("span",{"aria-hidden":"true",...dn(jE.root,jE[t],O5[n]),children:s})}function I5({checked:e,disabled:t,size:n=N5,variant:r="green"}){return v.jsx("span",{"aria-hidden":"true","data-component":"switch","data-size":n,"data-variant":r,"data-checked":e||void 0,"data-disabled":t||void 0,className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1c4vz4f ui-2lah0s ui-dl72j9 ui-xymvpz ui-47corl ui--default-marker",children:v.jsx(M5,{interactive:!1,size:n,variant:r})})}function D5({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return Ek(s,n)?v.jsx(z5,{...r,itemLabel:s,children:e}):null}function z5({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,switchVariant:l,leading:c,trailing:p,rootStyle:f,tooltip:h,closeOnSelect:m,topAlign:g=!1,itemLabel:b}){const{activeIndex:x,getItemProps:w,setIsOpen:_,closeOnSelect:E}=tf(),{shouldAllowPointerInteraction:R}=Ai(),T=nf(),C=wk(),A=ef(),N=A==="body",I=m??E??!1,[F,V]=k.useState(r),j=n!==void 0,q=j?n:F,{ref:Z,index:B}=Ch({label:b||null}),z=x===B,L=Bh(),H=k.useCallback(()=>{if(a)return;const J=!q;j||V(J);const ee={defaultPrevented:!1,preventDefault:()=>{ee.defaultPrevented=!0}};s?.(J,ee),I&&!ee.defaultPrevented&&C(_)},[a,q,j,s,I,_,C]),U=k.useCallback(J=>{if(!R(J.nativeEvent)){J.preventDefault(),J.stopPropagation();return}J.preventDefault(),J.stopPropagation(),H()},[H,R]),P=k.useCallback(J=>{a||(J.key==="Enter"||J.key===" ")&&(J.preventDefault(),J.stopPropagation(),H())},[a,H]),Y=w({onClick:U,onKeyDown:P}),D=z8({disabled:a,focused:z,inSubmenu:T,topAlign:g},f),$={role:"menuitemcheckbox","aria-checked":q,tabIndex:z?0:-1,"aria-disabled":a||void 0,"data-checked":q||void 0,"data-disabled":a||void 0,"data-focused":z||void 0,"data-top-align":g||void 0,...t?{"data-testid":t}:{},[Ll]:A,className:D.className,style:D.style,...Y},G=v.jsx(Rl,{disabled:a,leading:c,trailing:p,trailingAccessory:v.jsx(I5,{checked:q,disabled:a,size:"sm",variant:l}),children:e}),O=N?v.jsx("li",{ref:Z,...$,children:G}):v.jsx("div",{ref:Z,...$,children:G});return h!=null?v.jsx(_l,{content:h,placement:"right",offset:6,openDelay:0,closeDelay:0,disabled:L?.hasOpenChild??!1,sameAxisOnly:!0,surfaceStyle:Jc(),children:O}):O}function j5({title:e,subtitle:t,inline:n=!1,wrapSubtitle:r=!1}){const s=B8(n),a=F8(n),l=U8({inline:n,wrap:r});return v.jsxs("div",{className:s.className,style:s.style,"data-inline":n||void 0,children:[v.jsx(Qp,{size:"md",weight:"regular",color:"primary",className:a.className,style:a.style,children:e}),t!=null?v.jsx(Qp,{size:"sm",weight:"regular",color:"tertiary",className:l.className,style:l.style,"data-wrap":r||void 0,children:t}):null]})}const L5=24;function P5({title:e,divider:t}){const n=pN(!1),r=G8();return v.jsxs(v.Fragment,{children:[t?v.jsx("div",{role:"presentation","aria-hidden":"true",className:r.className,style:r.style}):null,e!==void 0?v.jsx("div",{role:"presentation",className:n.className,style:{...n.style,height:L5,boxSizing:"border-box",overflow:"hidden"},children:v.jsx("span",{children:e})}):null]})}const vc=typeof window<"u"?k.useLayoutEffect:k.useEffect;function LE(e){if(e!==void 0)switch(typeof e){case"number":return e;case"string":{if(e.endsWith("px"))return parseFloat(e);break}}}function $5({box:e,defaultHeight:t,defaultWidth:n,disabled:r,element:s,mode:a,style:l}){const{styleHeight:c,styleWidth:p}=k.useMemo(()=>({styleHeight:LE(l?.height),styleWidth:LE(l?.width)}),[l?.height,l?.width]),[f,h]=k.useState({height:t,width:n}),m=r||c!==void 0||a==="only-width"||c!==void 0&&p!==void 0;return vc(()=>{if(s===null||m)return;const g=new ResizeObserver(b=>{for(const x of b){const{contentRect:w,target:_}=x;s===_&&h(E=>E.height===w.height&&E.width===w.width?E:{height:w.height,width:w.width})}});return g.observe(s,{box:e}),()=>{g?.unobserve(s)}},[e,m,s,c,p]),k.useMemo(()=>({height:c??f.height,width:p??f.width}),[f,c,p])}function B5(e){const t=k.useRef(()=>{throw new Error("Cannot call during render.")});return vc(()=>{t.current=e},[e]),k.useCallback(n=>t.current?.(n),[t])}function Ub({containerElement:e,direction:t,isRtl:n,scrollOffset:r}){return r}function co(e,t="Assertion error"){if(!e)throw console.error(t),Error(t)}function sc(e,t){if(e===t)return!0;if(!!e!=!!t||(co(e!==void 0),co(t!==void 0),Object.keys(e).length!==Object.keys(t).length))return!1;for(const n in e)if(!Object.is(t[n],e[n]))return!1;return!0}function RN({cachedBounds:e,itemCount:t,itemSize:n}){if(t===0)return 0;if(typeof n=="number")return t*n;{const r=e.get(e.size===0?0:e.size-1);co(r!==void 0,"Unexpected bounds cache miss");const s=(r.scrollOffset+r.size)/e.size;return t*s}}function F5({align:e,cachedBounds:t,index:n,itemCount:r,itemSize:s,containerScrollOffset:a,containerSize:l}){if(n<0||n>=r)throw RangeError(`Invalid index specified: ${n}`,{cause:`Index ${n} is not within the range of 0 - ${r-1}`});const c=RN({cachedBounds:t,itemCount:r,itemSize:s}),p=t.get(n),f=Math.max(0,Math.min(c-l,p.scrollOffset)),h=Math.max(0,p.scrollOffset-l+p.size);switch(e==="smart"&&(a>=h&&a<=f?e="auto":e="center"),e){case"start":return f;case"end":return h;case"center":return p.scrollOffset<=l/2?0:p.scrollOffset+p.size/2>=c-l/2?c-l:p.scrollOffset+p.size/2-l/2;default:return a>=h&&a<=f?a:a<h?h:f}}function PE({cachedBounds:e,containerScrollOffset:t,containerSize:n,itemCount:r,overscanCount:s}){const a=r-1;let l=0,c=-1,p=0,f=-1,h=0;for(;h<a;){const m=e.get(h);if(m.scrollOffset+m.size>t)break;h++}for(l=h,p=Math.max(0,l-s);h<a;){const m=e.get(h);if(m.scrollOffset+m.size>=t+n)break;h++}return c=Math.min(a,h),f=Math.min(r-1,c+s),l<0&&(l=0,c=-1,p=0,f=-1),{startIndexVisible:l,stopIndexVisible:c,startIndexOverscan:p,stopIndexOverscan:f}}function U5({itemCount:e,itemProps:t,itemSize:n}){const r=new Map;return{get(s){for(co(s<e,`Invalid index ${s}`);r.size-1<s;){const l=r.size;let c;switch(typeof n){case"function":{c=n(l,t);break}case"number":{c=n;break}}if(l===0)r.set(l,{size:c,scrollOffset:0});else{const p=r.get(l-1);co(p!==void 0,`Unexpected bounds cache miss for index ${s}`),r.set(l,{scrollOffset:p.scrollOffset+p.size,size:c})}}const a=r.get(s);return co(a!==void 0,`Unexpected bounds cache miss for index ${s}`),a},set(s,a){r.set(s,a)},get size(){return r.size}}}function q5({itemCount:e,itemProps:t,itemSize:n}){return k.useMemo(()=>U5({itemCount:e,itemProps:t,itemSize:n}),[e,t,n])}function H5({containerSize:e,itemSize:t}){let n;return typeof t==="string"?(co(t.endsWith("%"),`Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`),co(e!==void 0,"Container size must be defined if a percentage item size is specified"),n=e*parseInt(t)/100):n=t,n}function G5({containerElement:e,containerStyle:t,defaultContainerSize:n=0,direction:r,isRtl:s=!1,itemCount:a,itemProps:l,itemSize:c,onResize:p,overscanCount:f}){const[h,m]=k.useState({startIndexVisible:0,startIndexOverscan:0,stopIndexVisible:-1,stopIndexOverscan:-1}),{startIndexVisible:g,startIndexOverscan:b,stopIndexVisible:x,stopIndexOverscan:w}={startIndexVisible:Math.min(a-1,h.startIndexVisible),startIndexOverscan:Math.min(a-1,h.startIndexOverscan),stopIndexVisible:Math.min(a-1,h.stopIndexVisible),stopIndexOverscan:Math.min(a-1,h.stopIndexOverscan)},{height:_=n,width:E=n}=$5({defaultHeight:n,defaultWidth:void 0,element:e,mode:"only-height",style:t}),R=k.useRef({height:0,width:0}),T=_,C=H5({containerSize:T,itemSize:c});k.useLayoutEffect(()=>{if(typeof p=="function"){const j=R.current;(j.height!==_||j.width!==E)&&(p({height:_,width:E},{...j}),j.height=_,j.width=E)}},[_,p,E]);const A=q5({itemCount:a,itemProps:l,itemSize:C}),N=k.useCallback(j=>A.get(j),[A]),I=k.useCallback(()=>RN({cachedBounds:A,itemCount:a,itemSize:C}),[A,a,C]),F=k.useCallback(j=>{const q=Ub({containerElement:e,direction:r,isRtl:s,scrollOffset:j});return PE({cachedBounds:A,containerScrollOffset:q,containerSize:T,itemCount:a,overscanCount:f})},[A,e,T,r,s,a,f]);vc(()=>{const j=e?.scrollTop??0;m(F(j))},[e,r,F]),vc(()=>{if(!e)return;const j=()=>{m(q=>{const{scrollLeft:Z,scrollTop:B}=e,z=Ub({containerElement:e,direction:r,isRtl:s,scrollOffset:B}),L=PE({cachedBounds:A,containerScrollOffset:z,containerSize:T,itemCount:a,overscanCount:f});return sc(L,q)?q:L})};return e.addEventListener("scroll",j),()=>{e.removeEventListener("scroll",j)}},[A,e,T,r,a,f]);const V=B5(({align:j="auto",containerScrollOffset:q,index:Z})=>{let B=F5({align:j,cachedBounds:A,containerScrollOffset:q,containerSize:T,index:Z,itemCount:a,itemSize:C});if(e){if(B=Ub({containerElement:e,direction:r,isRtl:s,scrollOffset:B}),typeof e.scrollTo!="function"){const z=F(B);sc(h,z)||m(z)}return B}});return{getCellBounds:N,getEstimatedSize:I,scrollToIndex:V,startIndexOverscan:b,startIndexVisible:g,stopIndexOverscan:w,stopIndexVisible:x}}function V5(e){return k.useMemo(()=>e,Object.values(e))}function K5(e,t){const{ariaAttributes:n,style:r,...s}=e,{ariaAttributes:a,style:l,...c}=t;return sc(n,a)&&sc(r,l)&&sc(s,c)}function Z5(e){return e!=null&&typeof e=="object"&&"getAverageRowHeight"in e&&typeof e.getAverageRowHeight=="function"}const W5="data-react-window-index";function Y5({children:e,className:t,defaultHeight:n=0,listRef:r,onResize:s,onRowsRendered:a,overscanCount:l=3,rowComponent:c,rowCount:p,rowHeight:f,rowProps:h,tagName:m="div",style:g,...b}){const x=V5(h),w=k.useMemo(()=>k.memo(c,K5),[c]),[_,E]=k.useState(null),R=Z5(f),T=k.useMemo(()=>R?B=>f.getRowHeight(B)??f.getAverageRowHeight():f,[R,f]),{getCellBounds:C,getEstimatedSize:A,scrollToIndex:N,startIndexOverscan:I,startIndexVisible:F,stopIndexOverscan:V,stopIndexVisible:j}=G5({containerElement:_,containerStyle:g,defaultContainerSize:n,direction:"vertical",itemCount:p,itemProps:x,itemSize:T,onResize:s,overscanCount:l});k.useImperativeHandle(r,()=>({get element(){return _},scrollToRow({align:B="auto",behavior:z="auto",index:L}){const H=N({align:B,containerScrollOffset:_?.scrollTop??0,index:L});typeof _?.scrollTo=="function"&&_.scrollTo({behavior:z,top:H})}}),[_,N]),vc(()=>{if(!_)return;const B=Array.from(_.children).filter((z,L)=>{if(z.hasAttribute("aria-hidden"))return!1;const H=`${I+L}`;return z.setAttribute(W5,H),!0});if(R)return f.observeRowElements(B)},[_,R,f,I,V]),k.useEffect(()=>{I>=0&&V>=0&&a&&a({startIndex:F,stopIndex:j},{startIndex:I,stopIndex:V})},[a,I,F,V,j]);const q=k.useMemo(()=>{const B=[];if(p>0)for(let z=I;z<=V;z++){const L=C(z);B.push(k.createElement(w,{...x,ariaAttributes:{"aria-posinset":z+1,"aria-setsize":p,role:"listitem"},key:z,index:z,style:{position:"absolute",left:0,transform:`translateY(${L.scrollOffset}px)`,height:R?void 0:L.size,width:"100%"}}))}return B},[w,C,R,p,x,I,V]),Z=v.jsx("div",{"aria-hidden":!0,style:{height:A(),width:"100%",zIndex:-1}});return k.createElement(m,{role:"list",...b,className:t,ref:E,style:{position:"relative",maxHeight:"100%",flexGrow:1,overflowY:"auto",...g}},q,e,Z)}const CN=k.createContext(null);function X5(){const e=k.useContext(CN);if(!e)throw new Error("VirtualizedMenuItem must be used within Menu.VirtualizedContent");return e}function Q5({children:e,activeIndex:t,setIsOpen:n,getItemProps:r,listRef:s,closeOnSelect:a,onRowElementChange:l}){const c=k.useMemo(()=>({activeIndex:t,setIsOpen:n,getItemProps:r,listRef:s,closeOnSelect:a,onRowElementChange:l}),[t,n,r,s,a,l]);return v.jsx(CN.Provider,{value:c,children:e})}const J5=4,$E="ui-menu--virtualized";function eq({index:e,style:t,items:n,activeIndex:r,renderItem:s,onMouseMove:a}){const l=n[e],c=r===e,p=W8();return v.jsx("div",{className:p.className,style:{...t,...p.style},onMouseMove:()=>a(e),children:s(l,e,c)})}function tq({items:e,itemHeight:t,renderItem:n,getItemLabel:r,header:s,footer:a,emptyState:l,"aria-label":c,className:p,style:f,maxHeight:h,width:m="200px",size:g,backdrop:b,closeOnSelect:x=!0,overscanCount:w=5,renderActivePreview:_,ref:E}){const R=Dl(),{isOpen:T,isMounted:C,activeIndex:A,setActiveIndex:N,setIsOpen:I,virtualFocus:F,enableHover:V,nodeId:j,listRef:q,labelsRef:Z,searchValue:B,refs:z,floatingStyles:L,middlewareData:H,transitionStyles:U,context:P,getFloatingProps:Y,getItemProps:D,dismissCauseRef:$,returnFocusOnSelect:G}=Ai(),O=k.useRef(null),J=k.useRef(null),ee=k.useRef(A);ee.current=A;const ie=k.useRef(null),[he,le]=k.useState(null),[ke,Te]=k.useState(null),Pe=b??!V,ue=Lh(),{portalLayerStyles:Ee}=Hc("popover",C),Ce=k.useRef(null);k.useEffect(()=>{r?Z.current=e.map(W=>r(W)):Z.current=e.map(()=>null),q.current.length!==e.length&&(q.current.length=e.length)},[e,r,Z,q]);const Me=P.placement.startsWith("top"),ve=Me&&C?H.bottomAnchor?.bottom??null:null,xe=k.useRef(null);k.useLayoutEffect(()=>{if(!T){xe.current=null,Ce.current=null;return}if(A==null||xe.current===A)return;xe.current=A;const W=Ce.current===A;Ce.current=null,!W&&(A<0||A>=e.length||J.current?.scrollToRow({index:A,align:"smart",behavior:"instant"}))},[T,A,e.length]);const De=k.useRef(B),Ne=k.useRef(T);k.useEffect(()=>{const W=De.current,ce=Ne.current;De.current=B,Ne.current=T,!(!T||!ce||W===B)&&(e.length>0&&J.current?.scrollToRow({index:0,align:"start",behavior:"instant"}),N(e.length>0?0:null))},[T,e.length,B,N]);const Ie=k.useCallback((W,ce)=>{ie.current=W,le(Ae=>Ae===W?Ae:W),Te(Ae=>Ae===ce?Ae:ce)},[]);k.useLayoutEffect(()=>{if(!T||A==null||A<0||A>=e.length){Ie(null,null);return}const W=q.current[A];W!=null&&Ie(W,A)},[A,T,e.length,q,Ie]);const ge=k.useCallback((W,ce)=>{W===ee.current&&ce!=null&&Ie(ce,W)},[Ie]),fe=k.useCallback(W=>{A!==W&&(Ce.current=W,N(W))},[A,N]),se=k.useCallback(W=>{W.key==="Escape"&&($.current="escape")},[$]),ne=k.useCallback(W=>{ue(W.nativeEvent)&&($.current="backdrop",I(!1))},[$,I,ue]),_e=k.useCallback(W=>{if(!ue(W.nativeEvent))return;W.preventDefault(),$.current="backdrop",I(!1);const Ve=document.elementsFromPoint(W.clientX,W.clientY).find(St=>!St.classList.contains(fk));Ve&&Ve.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:W.clientX,clientY:W.clientY,screenX:W.screenX,screenY:W.screenY,button:W.button,buttons:W.buttons,ctrlKey:W.ctrlKey,shiftKey:W.shiftKey,altKey:W.altKey,metaKey:W.metaKey}))},[$,I,ue]),te=Wc([z.setFloating,O,E]),ae=zl();if(!C)return null;const ze=h??J8,Ue=typeof t=="number"?e.length*t:e.reduce((W,ce,Ae)=>W+t(Ae),0),Ge=Math.min(Ue,Math.max(0,ze-J5*2)),Ye=g??R?.menuSize??"sm",rt={...L,...U,...f,...xk({width:m}),...Ee,...Me&&ve!==null?{top:"auto",bottom:ve}:{}},st=uN(Ee),ot=dk({className:p?`${$E} ${p}`:$E,size:Ye,style:rt}),Et=cN(),it=fN(),vt=hk(),Xe=pk(!0),Dt=Y8(),Fe=dN(),Ze=T&&ke!=null&&ke>=0&&ke<e.length&&he!=null&&_!=null?_(ke,{rowElement:he,menuContentElement:O.current}):null,ft=Ze!=null&&he!=null,Qe={items:e,activeIndex:A,renderItem:n,onMouseMove:fe};return v.jsxs(Xv,{...ae?{root:ae}:{},children:[Pe&&v.jsx("div",{className:st.className,style:st.style,onClick:ne,onContextMenu:_e,role:"none"}),v.jsx(Jv,{context:P,initialFocus:-1,returnFocus:$.current!=="backdrop"&&($.current!=="selection"||G),modal:!F&&T,children:v.jsx("div",{ref:te,className:ot.className,style:ot.style,tabIndex:-1,"data-size":Ye,...Y({onKeyDown:se,onMouseDown:F?W=>{W.stopPropagation()}:void 0}),children:v.jsx(_s,{menuSize:Ye,children:v.jsx("div",{className:Et.className,style:Et.style,role:"menu","aria-label":c??"Menu",children:v.jsx(DA,{dismiss:!T,children:v.jsx(kk,{layerNodeId:j,children:v.jsxs(Q5,{activeIndex:A,setIsOpen:I,getItemProps:D,listRef:q,closeOnSelect:x,onRowElementChange:ge,children:[s!=null?v.jsx("div",{className:it.className,style:it.style,children:v.jsx(ic,{value:"header",children:s})}):null,e.length>0?v.jsx("div",{className:vt.className,style:vt.style,children:v.jsx("div",{className:Xe.className,style:Xe.style,role:"presentation",children:v.jsx(Y5,{listRef:J,className:Dt.className,rowComponent:eq,rowProps:Qe,rowCount:e.length,rowHeight:t,overscanCount:w,style:{height:Ge,width:"100%",overflowX:"hidden",scrollbarWidth:"none"}})})}):l,a!=null?v.jsx("div",{className:Fe.className,style:Fe.style,children:v.jsx(ic,{value:"footer",children:a})}):null,_!=null?v.jsx(_N,{open:ft,placement:"right-start",anchorRef:ie,offset:6,closeOnSelect:!1,virtualFocus:!0,children:ft?Ze:null}):null]})})})})})})})]})}function nq({index:e,children:t,disabled:n=!1,onSelect:r,leading:s,trailing:a,wideLeftSection:l=!1,tooltip:c,tooltipContentKey:p,closeOnSelect:f,description:h,variant:m="default",checked:g,ref:b}){const{shouldAllowPointerInteraction:x}=Ai(),w=nf(),{activeIndex:_,setIsOpen:E,getItemProps:R,listRef:T,closeOnSelect:C,onRowElementChange:A}=X5(),N=f??C??!0,I=_===e,F=k.useCallback(G=>{T.current[e]=G,A?.(e,G),typeof b=="function"?b(G):b&&(b.current=G)},[e,T,A,b]),V=()=>{if(n)return;const G={defaultPrevented:!1,preventDefault:()=>{G.defaultPrevented=!0}};r?.(G),N&&!G.defaultPrevented&&E(!1)},Z=R({onClick:G=>{if(!x(G.nativeEvent)){G.preventDefault(),G.stopPropagation();return}V()},onKeyDown:G=>{n||(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),V())}}),B=gk(),z=bk(),L=yk(),H=h!=null?v.jsxs("div",{className:B.className,style:B.style,children:[v.jsx("div",{className:z.className,style:z.style,children:t}),v.jsx("div",{className:L.className,style:L.style,children:h})]}):t,U=mk({disabled:n,focused:I,hasDescription:h!=null,inSubmenu:w,variant:m}),P=g!==void 0,Y=P&&s==null?v.jsx(hC,{checked:g,disabled:n}):s,D=P?{role:"menuitemcheckbox","aria-checked":g,"data-checked":g||void 0}:{role:"menuitem"},$=v.jsx("li",{ref:F,...D,tabIndex:I?0:-1,"aria-disabled":n||void 0,"data-disabled":n||void 0,"data-focused":I||void 0,"data-has-description":h!=null||void 0,"data-variant":m!=="default"?m:void 0,"data-wide-left":l||void 0,[Ll]:"body",className:U.className,style:U.style,...Z,children:v.jsx(Rl,{disabled:n,hasDescription:h!=null,leading:Y,trailing:a,wideLeft:l,children:H})});return c!=null?v.jsx(Sk,{content:c,contentKey:p,children:$}):$}const Hh={root:{kUk6DE:"ui-98rzlu",kZKoxP:"ui-5yr21d",kAzted:"ui-2lwn1j",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kORKVm:"ui-1odjw0f",kLKAdn:"ui-1jowytg",kpe85a:"ui-1o9oefx",kGO01o:"ui-10ha4xm",kE3dHu:"ui-1cc8a3a",kB7OPa:"ui-9f619",$$css:!0},content:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kGNEyG:"ui-6s0dn4",k9WMMc:"ui-2b8uid",ks0D6T:"ui-1dt7z5j",kzqmXN:"ui-izo9zl",kOIVth:"ui-11twubx",$$css:!0},message:{kHjlTd:"ui-j0a0fe",kN2L0X:"ui-1w2vvpw",$$css:!0},actions:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kwnvtZ:"ui-1a02dak",kOIVth:"ui-ehausa",keoZOQ:"ui-1e66mq1",$$css:!0}};function rq(){return Hh.root}function iq(){return Hh.content}function sq(){return Hh.message}function oq(){return Hh.actions}function kc({message:e,actions:t,errorText:n,className:r}){const s=Rn({rootClass:"ui-empty-state",stylexStyles:rq(),className:r}),a=dn(iq()),l=dn(sq()),c=dn(oq());return v.jsx("div",{className:s.className,style:s.style,children:v.jsxs("div",{className:a.className,style:a.style,children:[v.jsx(Qp,{as:"p",className:l.className,style:l.style,color:"tertiary",size:"lg",children:e}),n!=null?v.jsx(Qp,{as:"p",className:l.className,style:l.style,color:"red",size:"lg",children:n}):null,t!=null?v.jsx("div",{className:c.className,style:c.style,children:t}):null]})})}const AN=k.createContext(null);function NN(){const e=k.useContext(AN);if(!e)throw new Error("Menu.ExpandableSection components must be used within <Menu.ExpandableSection>");return e}function aq({children:e,defaultExpanded:t=!1,expanded:n,onExpandedChange:r}){const[s,a]=k.useState(t),l=n!==void 0,c=l?n:s,p=h=>{l||a(h),r?.(h)},f=()=>p(!c);return v.jsx(AN.Provider,{value:{expanded:c,setExpanded:p,toggle:f},children:e})}function lq({children:e,leading:t,trailing:n,label:r}){const{expanded:s,setExpanded:a,toggle:l}=NN(),c=typeof t=="function"?t(s):t,p=f=>{if(f.key==="ArrowRight"&&!s){f.preventDefault(),f.stopPropagation(),a(!0);return}f.key==="ArrowLeft"&&s&&(f.preventDefault(),f.stopPropagation(),a(!1))};return v.jsx(wN,{closeOnSelect:!1,wideLeftSection:!0,leading:c,trailing:n,label:r??(typeof e=="string"?e:void 0),onKeyDown:p,onSelect:l,children:e})}function uq({children:e}){const{expanded:t}=NN();return t?v.jsx(v.Fragment,{children:e}):null}function cq({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return Ek(s,n)?v.jsx(fq,{...r,itemLabel:s,children:e}):null}function fq({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,trailing:l,description:c,tooltip:p,tooltipOpenDelay:f=0,tooltipCloseDelay:h=0,tooltipSurface:m="default",closeOnSelect:g,itemLabel:b}){const{activeIndex:x,getItemProps:w,setIsOpen:_,closeOnSelect:E}=tf(),{shouldAllowPointerInteraction:R}=Ai(),T=nf(),C=wk(),A=ef(),N=A==="body",I=g??E??!1,[F,V]=k.useState(r),j=n!==void 0,q=j?n:F,{ref:Z,index:B}=Ch({label:b||null}),z=x===B,L=Bh(),H=zA(m),U=k.useCallback(()=>{if(a)return;const ue=!q;j||V(ue);const Ee={defaultPrevented:!1,preventDefault:()=>{Ee.defaultPrevented=!0}};s?.(ue,Ee),I&&!Ee.defaultPrevented&&C(_)},[a,q,j,s,I,_,C]),P=k.useCallback(ue=>{if(!R(ue.nativeEvent)){ue.preventDefault(),ue.stopPropagation();return}ue.preventDefault(),ue.stopPropagation(),U()},[U,R]),Y=k.useCallback(ue=>{a||(ue.key==="Enter"||ue.key===" ")&&(ue.preventDefault(),ue.stopPropagation(),U())},[a,U]),D=w({onClick:P,onKeyDown:Y}),$=c!=null,G=mk({disabled:a,focused:z,hasDescription:$,inSubmenu:T}),O={role:"menuitemcheckbox","aria-checked":q,tabIndex:z?0:-1,"aria-disabled":a||void 0,"data-checked":q||void 0,"data-disabled":a||void 0,"data-focused":z||void 0,"data-has-description":$||void 0,...t?{"data-testid":t}:{},[Ll]:A,className:G.className,style:G.style,...D},J=v.jsx(hC,{checked:q,disabled:a}),ee=gk(),ie=bk(),he=yk(),le=$?v.jsxs("div",{className:ee.className,style:ee.style,children:[v.jsx("div",{className:ie.className,style:ie.style,children:e}),v.jsx("div",{className:he.className,style:he.style,children:c})]}):e,ke=v.jsx(Rl,{disabled:a,hasDescription:$,leading:J,trailing:l,children:le}),Te=p!=null&&L!=null,Pe=N?v.jsx("li",{ref:Z,...O,children:ke}):v.jsx("div",{ref:Z,...O,children:ke});return Te?v.jsx(hN,{closeDelay:h,content:p,openDelay:f,surfaceStyle:H,children:Pe}):p!=null?v.jsx(_l,{content:p,placement:"right",offset:6,openDelay:f,closeDelay:h,sameAxisOnly:!0,surfaceStyle:[Jc(),H],interactive:!0,children:Pe}):Pe}function dq({children:e}){const t=Z8();return v.jsxs("div",{className:t.className,style:t.style,role:"status","aria-live":"polite","aria-busy":"true",children:[v.jsx(Mn,{name:"loading",size:"base",className:X8}),v.jsx("span",{children:e??"Loading..."})]})}function BE({children:e,open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:p,closeOnSelect:f,instantClose:h,instantTransitions:m,returnFocusOnSelect:g,focusItemOnOpen:b,virtualFocus:x,shouldKeepOpenDuringDrag:w,lockPositionWhileOpen:_}){return v.jsx(O9,{open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:p,closeOnSelect:f,instantClose:h,instantTransitions:m,returnFocusOnSelect:g,focusItemOnOpen:b,virtualFocus:x,shouldKeepOpenDuringDrag:w,lockPositionWhileOpen:_,children:e})}function pq(e){return bo()===null?v.jsx(b3,{children:v.jsx(BE,{...e})}):v.jsx(BE,{...e})}function ON(e,t,n){const{ref:r,...s}=n,a=L3({defaultTagName:"button",props:s,ref:r,render:e});return t?e:a}function hq({children:e,disabled:t=!1}){const{getTriggerProps:n}=Ai();return ON(e,t,n())}function mq({children:e,onClick:t,disabled:n=!1}){const{getTriggerProps:r,setHasHoverTrigger:s,setIsOpen:a}=Ai();k.useEffect(()=>{if(!n)return s(!0),()=>s(!1)},[n,s]);const l=r();return ON(e,n,{...l,onPointerDown:c=>{l.onPointerDown?.(c),c.button===2&&a(!1)},onContextMenu:c=>{l.onContextMenu?.(c),a(!1),c.stopPropagation()},onClick:c=>{t&&(c.preventDefault(),c.stopPropagation(),t(c))}})}const gq=Object.assign(_N,{useContext:Uh}),Bu=Object.assign(pq,{useContext:Ai,useLayerContext:TN,Trigger:hq,HoverTrigger:mq,Content:n5,Item:wN,CheckboxItem:cq,TextItem:j5,SwitchItem:D5,Section:S5,SearchInput:x5,EmptyState:r5,LoadingState:dq,ExpandableSection:aq,ExpandableSectionTrigger:lq,ExpandableSectionContent:uq,SubMenu:gq,SubMenuItem:E5,SubMenuTrigger:w5,SubMenuContent:T5,VirtualizedContent:tq,VirtualizedItem:nq,VirtualizedSectionHeader:P5}),bq=k.createContext(void 0);function yq(e){return k.useContext(bq)}const MN="data-composite-item-active";function vq(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=oR(),{ref:s,index:a}=_C(e),l=n===a,c=k.useRef(null),p=xs(s,c);return{compositeProps:k.useMemo(()=>({tabIndex:l?0:-1,onFocus(){r(a)},onMouseMove(){const h=c.current;if(!t||!h)return;const m=h.hasAttribute("disabled")||h.ariaDisabled==="true";!l&&!m&&h.focus()}}),[l,r,a,t]),compositeRef:p,index:a}}function kq(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const xq=[];function Sq(e){const{itemSizes:t,cols:n=1,loopFocus:r=!0,onLoop:s,dense:a=!1,orientation:l="both",direction:c,highlightedIndex:p,onHighlightedIndexChange:f,rootRef:h,enableHomeAndEndKeys:m=!1,stopEventPropagation:g=!1,disabledIndices:b,modifierKeys:x=xq}=e,[w,_]=k.useState(0),E=n>1,R=k.useRef(null),T=xs(R,h),C=k.useRef([]),A=k.useRef(!1),N=p??w,I=Ke((q,Z=!1)=>{if((f??_)(q),Z){const B=C.current[q];y1(R.current,B,c,l)}}),F=Ke(q=>{if(q.size===0||A.current)return;A.current=!0;const Z=Array.from(q.keys()),B=Z.find(L=>L?.hasAttribute(MN))??null,z=B?Z.indexOf(B):-1;z!==-1&&I(z),y1(R.current,B,c,l)}),V=Ke((q,Z,B)=>s?s?.(q,Z,B,C):B),j=k.useMemo(()=>({"aria-orientation":l==="both"?void 0:l,ref:T,onFocus(q){const Z=R.current,B=gr(q.nativeEvent);!Z||B==null||!b1(B)||B.setSelectionRange(0,B.value.length??0)},onKeyDown(q){const Z=m?zL:lC;if(!Z.has(q.key)||wq(q,x)||!R.current)return;const z=c==="rtl",L=z?hc:cl,H={horizontal:L,vertical:Go,both:L}[l],U=z?cl:hc,P={horizontal:U,vertical:ul,both:U}[l],Y=gr(q.nativeEvent);if(Y!=null&&b1(Y)&&!kq(Y)){const ie=Y.selectionStart,he=Y.selectionEnd,le=Y.value??"";if(ie==null||q.shiftKey||ie!==he||q.key!==P&&ie<le.length||q.key!==H&&ie>0)return}let D=N;const $=mp(C,b),G=wy(C,b);if(E){const ie=t||Array.from({length:C.current.length},()=>({width:1,height:1})),he=wR(ie,n,a),le=he.findIndex(Te=>Te!=null&&!ks(C.current,Te,b)),ke=he.reduce((Te,Pe,ue)=>Pe!=null&&!ks(C.current,Pe,b)?ue:Te,-1);D=he[SR(he.map(Te=>Te!=null?C.current[Te]:null),{event:q,orientation:l,loopFocus:r,onLoop:V,cols:n,disabledIndices:TR([...b||C.current.map((Te,Pe)=>ks(C.current,Pe)?Pe:void 0),void 0],he),minIndex:le,maxIndex:ke,prevIndex:ER(N>G?$:N,ie,he,n,q.key===Go?"bl":q.key===cl?"tr":"tl"),rtl:z})]}const O={horizontal:[L],vertical:[Go],both:[L,Go]}[l],J={horizontal:[U],vertical:[ul],both:[U,ul]}[l],ee=E?Z:{horizontal:m?IL:oC,vertical:m?DL:aC,both:Z}[l];m&&(q.key===Uc?D=$:q.key===qc&&(D=G)),D===N&&(O.includes(q.key)||J.includes(q.key))&&(r&&D===G&&O.includes(q.key)?(D=$,s&&(D=s(q,N,D,C))):r&&D===$&&J.includes(q.key)?(D=G,s&&(D=s(q,N,D,C))):D=dr(C.current,{startingIndex:D,decrement:J.includes(q.key),disabledIndices:b})),D!==N&&!dc(C.current,D)&&(g&&q.stopPropagation(),ee.has(q.key)&&q.preventDefault(),I(D,!0),queueMicrotask(()=>{C.current[D]?.focus()}))}}),[n,a,c,b,C,m,N,E,t,r,s,V,T,x,I,l,g]);return k.useMemo(()=>({props:j,highlightedIndex:N,onHighlightedIndexChange:I,elementsRef:C,disabledIndices:b,onMapChange:F,relayKeyboardEvent:j.onKeyDown}),[j,N,I,C,b,F])}function wq(e,t){for(const n of FL.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function Eq(e){const{render:t,className:n,style:r,refs:s=cc,props:a=cc,state:l=hr,stateAttributesMapping:c,highlightedIndex:p,onHighlightedIndexChange:f,orientation:h,dense:m,itemSizes:g,loopFocus:b,onLoop:x,cols:w,enableHomeAndEndKeys:_,onMapChange:E,stopEventPropagation:R=!0,rootRef:T,disabledIndices:C,modifierKeys:A,highlightItemOnHover:N=!1,tag:I="div",...F}=e,V=Vv(),{props:j,highlightedIndex:q,onHighlightedIndexChange:Z,elementsRef:B,onMapChange:z,relayKeyboardEvent:L}=Sq({itemSizes:g,cols:w,loopFocus:b,onLoop:x,dense:m,orientation:h,highlightedIndex:p,onHighlightedIndexChange:f,rootRef:T,stopEventPropagation:R,enableHomeAndEndKeys:_,direction:V,disabledIndices:C,modifierKeys:A}),H=wn(I,e,{state:l,ref:s,props:[j,...a,F],stateAttributesMapping:c}),U=k.useMemo(()=>({highlightedIndex:q,onHighlightedIndexChange:Z,highlightItemOnHover:N,relayKeyboardEvent:L}),[q,Z,N,L]);return v.jsx(sR.Provider,{value:U,children:v.jsx(Kv,{elementsRef:B,onMapChange:P=>{E?.(P),z(P)},children:H})})}const IN=k.createContext(void 0);function Tk(){const e=k.useContext(IN);if(e===void 0)throw new Error(Jn(64));return e}let Tq=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const _k={tabActivationDirection:e=>({[Tq.activationDirection]:e})},_q=k.forwardRef(function(t,n){const{className:r,defaultValue:s=0,onValueChange:a,orientation:l="horizontal",render:c,value:p,style:f,...h}=t,m=Object.hasOwn(t,"defaultValue"),g=k.useRef([]),[b,x]=k.useState(()=>new Map),[w,_]=mc({controlled:p,default:s,name:"Tabs",state:"value"}),E=p!==void 0,[R,T]=k.useState(()=>new Map),C=k.useCallback(O=>{if(O===void 0)return null;for(const[J,ee]of R.entries())if(ee!=null&&O===(ee.value??ee.index))return J;return null},[R]),[A,N]=k.useState(()=>({previousValue:w,tabActivationDirection:"none"})),{previousValue:I,tabActivationDirection:F}=A;let V=F,j=!1;I!==w&&(V=FE(I,w,l,R),j=I!=null&&w!=null&&C(w)==null);const q=j?I:w,Z=I!==q||F!==V;He(()=>{Z&&N({previousValue:q,tabActivationDirection:V})},[q,Z,V]);const B=Ke((O,J)=>{const ee=FE(w,O,l,R);J.activationDirection=ee,a?.(O,J),!J.isCanceled&&_(O)}),z=Ke((O,J)=>{x(ee=>{if(ee.get(O)===J)return ee;const ie=new Map(ee);return ie.set(O,J),ie})}),L=Ke((O,J)=>{x(ee=>{if(!ee.has(O)||ee.get(O)!==J)return ee;const ie=new Map(ee);return ie.delete(O),ie})}),H=k.useCallback(O=>b.get(O),[b]),U=k.useCallback(O=>{for(const J of R.values())if(O===J?.value)return J?.id},[R]),P=k.useMemo(()=>({getTabElementBySelectedValue:C,getTabIdByPanelValue:U,getTabPanelIdByValue:H,onValueChange:B,orientation:l,registerMountedTabPanel:z,setTabMap:T,unregisterMountedTabPanel:L,tabActivationDirection:V,value:w}),[C,U,H,B,l,z,T,L,V,w]),Y=k.useMemo(()=>{for(const O of R.values())if(O!=null&&O.value===w)return O},[R,w]),D=k.useMemo(()=>{for(const O of R.values())if(O!=null&&!O.disabled)return O.value},[R]);He(()=>{if(E||R.size===0)return;const O=Y?.disabled,J=Y==null&&w!==null;if(m&&O&&w===s||!O&&!J)return;const ie=D??null;w!==ie&&(_(ie),N(he=>he.tabActivationDirection==="none"?he:{...he,tabActivationDirection:"none"}))},[s,D,m,E,Y,_,R,w]);const G=wn("div",t,{state:{orientation:l,tabActivationDirection:V},ref:n,props:h,stateAttributesMapping:_k});return v.jsx(IN.Provider,{value:P,children:v.jsx(Kv,{elementsRef:g,children:G})})});function FE(e,t,n,r){if(e==null||t==null)return"none";let s=null,a=null;for(const[p,f]of r.entries()){if(f==null)continue;const h=f.value??f.index;if(e===h&&(s=p),t===h&&(a=p),s!=null&&a!=null)break}if(s==null||a==null)return s!==a&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?n==="horizontal"?t>e?"right":"left":t>e?"down":"up":"none";const l=s.getBoundingClientRect(),c=a.getBoundingClientRect();if(n==="horizontal"){if(c.left<l.left)return"left";if(c.left>l.left)return"right"}else{if(c.top<l.top)return"up";if(c.top>l.top)return"down"}return"none"}const DN=k.createContext(void 0);function zN(){const e=k.useContext(DN);if(e===void 0)throw new Error(Jn(65));return e}const Rq=k.forwardRef(function(t,n){const{className:r,disabled:s=!1,render:a,value:l,id:c,nativeButton:p=!0,style:f,...h}=t,{value:m,getTabPanelIdByValue:g,orientation:b}=Tk(),{activateOnFocus:x,highlightedTabIndex:w,onTabActivation:_,registerTabResizeObserverElement:E,setHighlightedTabIndex:R,tabsListElement:T}=zN(),C=yh(c),A=k.useMemo(()=>({disabled:s,id:C,value:l}),[s,C,l]),{compositeProps:N,compositeRef:I,index:F}=vq({metadata:A}),V=l===m,j=k.useRef(!1),q=k.useRef(null);k.useEffect(()=>{const G=q.current;if(G)return E(G)},[E]),He(()=>{if(j.current){j.current=!1;return}if(!(V&&F>-1&&w!==F))return;const G=T;if(G!=null){const O=Dr(qt(G));if(O&&kt(G,O))return}s||R(F)},[V,F,w,R,s,T]);const{getButtonProps:Z,buttonRef:B}=Pc({disabled:s,native:p,focusableWhenDisabled:!0}),z=g(l),L=k.useRef(!1),H=k.useRef(!1);function U(G){V||s||_(l,Rt(Ss,G.nativeEvent,void 0,{activationDirection:"none"}))}function P(G){V||(F>-1&&!s&&R(F),!s&&x&&(!L.current||L.current&&H.current)&&_(l,Rt(Ss,G.nativeEvent,void 0,{activationDirection:"none"})))}function Y(G){if(V||s)return;L.current=!0;function O(){L.current=!1,H.current=!1}(!G.button||G.button===0)&&(H.current=!0,qt(G.currentTarget).addEventListener("pointerup",O,{once:!0}))}return wn("button",t,{state:{disabled:s,active:V,orientation:b},ref:[n,B,I,q],props:[N,{role:"tab","aria-controls":z,"aria-selected":V,id:C,onClick:U,onFocus:P,onPointerDown:Y,[MN]:V?"":void 0,onKeyDownCapture(){j.current=!0}},h,Z]})});function Cq(){return ar}function Aq(){return!1}function Nq(){return!0}function Oq(){return $v.useSyncExternalStore(Cq,Aq,Nq)}const Mq='!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();';let Ya=(function(e){return e.activeTabLeft="--active-tab-left",e.activeTabRight="--active-tab-right",e.activeTabTop="--active-tab-top",e.activeTabBottom="--active-tab-bottom",e.activeTabWidth="--active-tab-width",e.activeTabHeight="--active-tab-height",e})({});const Iq=k.createContext(void 0),Dq={disableStyleElements:!1};function jN(){return k.useContext(Iq)??Dq}const zq={..._k,activeTabPosition:()=>null,activeTabSize:()=>null},jq=k.forwardRef(function(t,n){const{className:r,render:s,renderBeforeHydration:a=!1,style:l,...c}=t,{nonce:p}=jN(),{getTabElementBySelectedValue:f,orientation:h,tabActivationDirection:m,value:g}=Tk(),{tabsListElement:b,registerIndicatorUpdateListener:x}=zN(),w=Oq(),_=uL();k.useEffect(()=>x(_),[x,_]);let E=0,R=0,T=0,C=0,A=0,N=0,I=!1;if(g!=null&&b!=null){const z=f(g);if(I=!0,z!=null){const{width:L,height:H}=NE(z),{width:U,height:P}=NE(b),Y=z.getBoundingClientRect(),D=b.getBoundingClientRect(),$=U>0?D.width/U:1,G=P>0?D.height/P:1;if(Math.abs($)>Number.EPSILON&&Math.abs(G)>Number.EPSILON){const J=Y.left-D.left,ee=Y.top-D.top;E=J/$+b.scrollLeft-b.clientLeft,T=ee/G+b.scrollTop-b.clientTop}else E=z.offsetLeft,T=z.offsetTop;A=L,N=H,R=b.scrollWidth-E-A,C=b.scrollHeight-T-N}}const F=k.useMemo(()=>I?{left:E,right:R,top:T,bottom:C}:null,[E,R,T,C,I]),V=k.useMemo(()=>I?{width:A,height:N}:null,[A,N,I]),j=k.useMemo(()=>{if(I)return{[Ya.activeTabLeft]:`${E}px`,[Ya.activeTabRight]:`${R}px`,[Ya.activeTabTop]:`${T}px`,[Ya.activeTabBottom]:`${C}px`,[Ya.activeTabWidth]:`${A}px`,[Ya.activeTabHeight]:`${N}px`}},[E,R,T,C,A,N,I]),q=I&&A>0&&N>0,B=wn("span",t,{state:{orientation:h,activeTabPosition:F,activeTabSize:V,tabActivationDirection:m},ref:n,props:[{role:"presentation",style:j,hidden:!q},c,{suppressHydrationWarning:!0}],stateAttributesMapping:zq});return g==null?null:v.jsxs(k.Fragment,{children:[B,w&&a&&v.jsx("script",{nonce:p,dangerouslySetInnerHTML:{__html:Mq},suppressHydrationWarning:!0})]})}),Lq=k.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:s,loopFocus:a=!0,render:l,style:c,...p}=t,{onValueChange:f,orientation:h,value:m,setTabMap:g,tabActivationDirection:b}=Tk(),[x,w]=k.useState(0),[_,E]=k.useState(null),R=k.useRef(new Set),T=k.useRef(new Set),C=k.useRef(null),A=Ke(()=>{R.current.forEach(Z=>{Z()})});k.useEffect(()=>{if(typeof ResizeObserver>"u")return;const Z=new ResizeObserver(()=>{R.current.size&&A()});return C.current=Z,_&&Z.observe(_),T.current.forEach(B=>{Z.observe(B)}),()=>{Z.disconnect(),C.current=null}},[_,A]);const N=Ke(Z=>(R.current.add(Z),()=>{R.current.delete(Z)})),I=Ke(Z=>(T.current.add(Z),C.current?.observe(Z),()=>{T.current.delete(Z),C.current?.unobserve(Z)})),F=Ke((Z,B)=>{Z!==m&&f(Z,B)}),V={orientation:h,tabActivationDirection:b},j={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},q=k.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:x,registerIndicatorUpdateListener:N,registerTabResizeObserverElement:I,onTabActivation:F,setHighlightedTabIndex:w,tabsListElement:_}),[r,x,N,I,F,w,_]);return v.jsx(DN.Provider,{value:q,children:v.jsx(Eq,{render:l,className:s,style:c,state:V,refs:[n,E],props:[j,p],stateAttributesMapping:_k,highlightedIndex:x,enableHomeAndEndKeys:!0,loopFocus:a,orientation:h,onHighlightedIndexChange:w,onMapChange:g,disabledIndices:cc})})}),UE={base:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-1qjc9v5",kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kzQI83:"ui-1iyjqo2",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",$$css:!0},default:{kWkggS:"ui-flfp0o",$$css:!0}},Pq={sm:{kmVPX3:"ui-1e29tyv",kaIpWk:"ui-1sxf85j",$$css:!0},md:{kmVPX3:"ui-1hbkpea",kaIpWk:"ui-1043rbw",$$css:!0},lg:{kmVPX3:"ui-1hbkpea",kaIpWk:"ui-1043rbw",$$css:!0}},$q={base:{kVAEAm:"ui-10l6tqk",kY2c9j:"ui-1ja2u2z",kfzvcC:"ui-47corl",kB7OPa:"ui-9f619",kbCHJM:"ui-vbikie",k87sOh:"ui-10uur0e",kzqmXN:"ui-offw1",kZKoxP:"ui-1gezbiy",kWkggS:"ui-i07v4r",k1ekBW:"ui-98hnz2",kIyJzY:"ui-1bqoo3p ui-sagj69",kAMwcw:"ui-1tkypeg",$$css:!0}},Bq={sm:{kaIpWk:"ui-1bl94mz",$$css:!0},md:{kaIpWk:"ui-1e1y6u3",$$css:!0},lg:{kaIpWk:"ui-1e1y6u3",$$css:!0}},qb={base:{kysU6D:"ui-jyslct",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kzQI83:"ui-1c4vz4f",kmuXW:"ui-2lah0s",kCS8Yb:"ui-dl72j9",khDVqt:"ui-uxw1ft",kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kY2c9j:"ui-1vjfegm",kLKAdn:"ui-exx8yu",kGO01o:"ui-18d9i69",kMv6JI:"ui-jb2p0i",k63SB2:"ui-1pd3egz",kWkggS:"ui-jbqb8w",ksu8eU:"ui-ng3xce",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-1gfq6vl",kkrTdU:"ui-1ypdohk ui-mh7c9n",kSiTet:"ui-1hc1fzr ui-1szrgyu",kFalU9:"ui-ggy1nq",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",k1ekBW:"ui-1gbuem2",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},fullWidth:{kzQI83:"ui-1iyjqo2",kCS8Yb:"ui-1r8uery",$$css:!0},compact:{k63SB2:"ui-20ajya",kMwMTN:"ui-4b2ntj ui-1qp4pc4 ui-1gfq6vl",kWkggS:"ui-jbqb8w ui-x05fgs",$$css:!0}},Fq={sm:{kZKoxP:"ui-jmh96e",kpe85a:"ui-g31tg3",kE3dHu:"ui-43mhey",kaIpWk:"ui-1bl94mz",$$css:!0},md:{kZKoxP:"ui-1a6rlst",kpe85a:"ui-17v7654",kE3dHu:"ui-1lfpczk",kaIpWk:"ui-1e1y6u3",$$css:!0},lg:{kZKoxP:"ui-1e94bgo",kpe85a:"ui-1yxiud8",kE3dHu:"ui-yab65l",kaIpWk:"ui-1e1y6u3",$$css:!0}},Uq={sm:{kZKoxP:"ui-1a6rlst",kpe85a:"ui-g31tg3",kE3dHu:"ui-43mhey",kaIpWk:"ui-1e1y6u3",$$css:!0},md:{kZKoxP:"ui-1e94bgo",kpe85a:"ui-17v7654",kE3dHu:"ui-1lfpczk",kaIpWk:"ui-1043rbw",$$css:!0},lg:{kZKoxP:"ui-170hpbr",kpe85a:"ui-1yxiud8",kE3dHu:"ui-yab65l",kaIpWk:"ui-1043rbw",$$css:!0}},LN=k.createContext(null);function qq(){const e=k.use(LN);if(e===null)throw new Error("SegmentedControl.Item must be used within SegmentedControl");return e}function Hq({value:e,defaultValue:t,onValueChange:n,variant:r="default",size:s="md",disabled:a=!1,fullWidth:l=!1,children:c,"aria-label":p,"aria-labelledby":f,...h}){const m=k.useMemo(()=>({variant:r,size:s,disabled:a,fullWidth:l}),[a,l,s,r]);return v.jsx(LN.Provider,{value:m,children:v.jsx(_q,{...h,value:e,defaultValue:t,onValueChange:n,"data-component":"segmented-control","data-size":s,"data-variant":r,...{0:{className:"ui-3nfvp2 ui-1qjc9v5 ui-9f619 ui-2lah0s ui-eq5yr9 ui-193iq5w"},1:{className:"ui-3nfvp2 ui-1qjc9v5 ui-9f619 ui-2lah0s ui-193iq5w ui-h8yej3"}}[!!l<<0],children:v.jsxs(Lq,{activateOnFocus:!0,"aria-label":p,"aria-labelledby":f,"data-component":"segmented-control-list",...dn(UE.base,r==="default"&&UE.default,r==="default"&&Pq[s]),children:[c,r==="default"?v.jsx(jq,{"data-component":"segmented-control-indicator",...dn($q.base,Bq[s])}):null]})})})}function Gq({value:e,disabled:t=!1,children:n,...r}){const s=qq();return v.jsx(Rq,{...r,value:e,disabled:s.disabled||t,"data-component":"segmented-control-item","data-size":s.size,"data-variant":s.variant,...dn(qb.base,s.size==="sm"?po.root:Fi.root,s.variant==="default"?Fq[s.size]:Uq[s.size],s.variant==="compact"&&qb.compact,s.fullWidth&&qb.fullWidth),children:n})}const qE=Object.assign(Hq,{Item:Gq}),PN="lg",xn={base:{kysU6D:"ui-jyslct",kWkggS:"ui-jbqb8w",kB7OPa:"ui-9f619",keoZOQ:"ui-dj266r",km5ZXQ:"ui-1yf7rl7",k1K539:"ui-at24cr",koQZXg:"ui-j3b58b",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",k63SB2:"ui-1pd3egz",kLWn49:"ui-15bjb6t",kMwMTN:"ui-1wd3ewq",kkrTdU:"ui-1ypdohk ui-1s07b3s",kFalU9:"ui-ggy1nq",k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-1v8p93f",kWqL5O:"ui-s1s249",kSWEuD:"ui-32b0ac",k26BEO:"ui-he5wa1",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-16stqrj",kZ1KPB:"ui-e0pwq",k4WBpm:"ui-19ypqd9",kaZRDh:"ui-1g4hjc",kLKAdn:"ui-exx8yu",kpe85a:"ui-1xpa7k",kGO01o:"ui-18d9i69",kE3dHu:"ui-1uhho1l",kSiTet:"ui-1hc1fzr ui-ijokvz",kfzvcC:"ui-67bb7w ui-aqnwrm",$$css:!0},animated:{k1ekBW:"ui-1oy24xj",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},variantDefault:{kWkggS:"ui-jbqb8w ui-1eethpc ui-10meh72",kLZC3w:"ui-1aeic0j",k26BEO:"ui-141kqco",kL6WhQ:"ui-17fyfba",kaZRDh:"ui-1arpupx",$$css:!0},variantOutline:{kWkggS:"ui-jbqb8w ui-q24i1q ui-10meh72",kLZC3w:"ui-2kampu ui-1tu4jgf ui-be7lqd",k26BEO:"ui-hnkhp4 ui-164kjn4 ui-1fput1a",kL6WhQ:"ui-1jfuf7k ui-1eracs6 ui-196izg0",kaZRDh:"ui-1l09f48 ui-zjd83m ui-1ts6nmb",$$css:!0},variantGhost:{kWkggS:"ui-jbqb8w ui-1eethpc ui-10co6l2 ui-17lihdz",kLZC3w:"ui-1v8p93f",k26BEO:"ui-he5wa1",kL6WhQ:"ui-16stqrj",kaZRDh:"ui-1g4hjc",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-vvdyaj ui-1yqz6nd",$$css:!0},sizeLg:{kLKAdn:"ui-f6zju3",kpe85a:"ui-1pmtzvq",kGO01o:"ui-cnij5n",kE3dHu:"ui-v48mlq",$$css:!0},sizeMd:{kLKAdn:"ui-493x5y",kpe85a:"ui-g31tg3",kGO01o:"ui-b6dno7",kE3dHu:"ui-1lfpczk",$$css:!0},variantFilled:{kE3dHu:"ui-yab65l",kWkggS:"ui-i07v4r ui-18954eb ui-o0awiz",kLZC3w:"ui-1v8p93f",k26BEO:"ui-he5wa1",kL6WhQ:"ui-16stqrj",kaZRDh:"ui-1g4hjc",$$css:!0},shapeRounded:{kaIpWk:"ui-1043rbw",$$css:!0},shapePill:{kaIpWk:"ui-1i4c3av",$$css:!0},variantUnfilled:{kWkggS:"ui-jbqb8w ui-1n5bzlp",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kLZC3w:"ui-1b4hy2t",kWqL5O:"ui-gfja2r",kSWEuD:"ui-11pwa6s",k26BEO:"ui-1ws9gjp",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kL6WhQ:"ui-1tnzt7h",kZ1KPB:"ui-yj58a3",k4WBpm:"ui-1b16gh4",kaZRDh:"ui-1pjslub",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-1yqz6nd",$$css:!0},frameContentLg:{keoZOQ:"ui-1m79sar",k1K539:"ui-1w4rq16",koQZXg:"ui-ya9nqx",km5ZXQ:"ui-17w4s1c",$$css:!0},frameContentMd:{keoZOQ:"ui-lvyip8",k1K539:"ui-b4cpfm",koQZXg:"ui-ns639v",km5ZXQ:"ui-1gl7awr",$$css:!0},frameContentFilledLg:{keoZOQ:"ui-1m79sar",k1K539:"ui-1w4rq16",koQZXg:"ui-1rdd0cc",km5ZXQ:"ui-17w4s1c",$$css:!0},frameContentFilledMd:{keoZOQ:"ui-lvyip8",k1K539:"ui-b4cpfm",koQZXg:"ui-1rdd0cc",km5ZXQ:"ui-1gl7awr",$$css:!0},frameContentUnfilledLg:{keoZOQ:"ui-1csnclf",k1K539:"ui-1bip7cd",koQZXg:"ui-1jvqspy",km5ZXQ:"ui-1xoqnk6",$$css:!0},frameContentUnfilledMd:{keoZOQ:"ui-13e19h0",k1K539:"ui-affzeg",koQZXg:"ui-13ywka",km5ZXQ:"ui-ds3n82",$$css:!0},frameContentHugFalseLg:{kzqmXN:"ui-lai49p",$$css:!0},frameContentHugFalseMd:{kzqmXN:"ui-u0r5jw",$$css:!0},frameContentHugFalseFilledLg:{kzqmXN:"ui-15uee3t",$$css:!0},frameContentHugFalseFilledMd:{kzqmXN:"ui-aiknzh",$$css:!0},frameContentHugFalseUnfilledLg:{kzqmXN:"ui-3pyy6g",$$css:!0},frameContentHugFalseUnfilledMd:{kzqmXN:"ui-yc13g",$$css:!0},hugFalse:{kzqmXN:"ui-h8yej3",kjj79g:"ui-13a6bvl",$$css:!0}},HE={base:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",k9WMMc:"ui-dpxx8g",kMwMTN:"ui-15rks2t",$$css:!0},placeholder:{kMwMTN:"ui-4b2ntj",$$css:!0}},Hb={base:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kmuXW:"ui-2lah0s",kMwMTN:"ui-1mh7f6w",$$css:!0},muted:{kMwMTN:"ui-1lbmi28",$$css:!0},ghostOpen:{kMwMTN:"ui-1mh7f6w",$$css:!0}},Yd={base:{kmuXW:"ui-2lah0s",kMwMTN:"ui-1mh7f6w",$$css:!0},ghost:{kMwMTN:"ui-1lbmi28",$$css:!0},open:{kMwMTN:"ui-7qsbfx",$$css:!0},ghostOpen:{kMwMTN:"ui-1mh7f6w",$$css:!0}},Vq="sm";function Kq(e){return[xn.base,Fi.root,{"ui--default-marker":"ui--default-marker",$$css:!0},e.animated?xn.animated:null,Xq(e.variant),Qq(e.size),e.variant==="filled"?xn.variantFilled:null,e.hug?null:xn.hugFalse,e.shape==="pill"?xn.shapePill:xn.shapeRounded,e.frame==="content"?Jq(e):null,e.frame==="content"&&!e.hug?e7(e):null]}function Zq(e){return[jl.root,qv.root,HE.base,e?HE.placeholder:null]}function Wq(e,t){return[Hb.base,e==="ghost"||e==="unfilled"?Hb.muted:null,e==="ghost"&&t?Hb.ghostOpen:null]}function Yq(e,t){return[Yd.base,e==="ghost"?Yd.ghost:null,t&&e!=="ghost"?Yd.open:null,t&&e==="ghost"?Yd.ghostOpen:null]}function Xq(e){switch(e){case"default":return xn.variantDefault;case"outline":return xn.variantOutline;case"filled":return null;case"ghost":return xn.variantGhost;case"unfilled":return xn.variantUnfilled}}function Qq(e){switch(e){case"lg":return xn.sizeLg;case"md":case"base":return xn.sizeMd}}function Jq(e){const t=e.size==="lg";return e.variant==="filled"?t?xn.frameContentFilledLg:xn.frameContentFilledMd:e.variant==="unfilled"?t?xn.frameContentUnfilledLg:xn.frameContentUnfilledMd:t?xn.frameContentLg:xn.frameContentMd}function e7(e){const t=e.size==="lg";return e.variant==="filled"?t?xn.frameContentHugFalseFilledLg:xn.frameContentHugFalseFilledMd:e.variant==="unfilled"?t?xn.frameContentHugFalseUnfilledLg:xn.frameContentHugFalseUnfilledMd:t?xn.frameContentHugFalseLg:xn.frameContentHugFalseMd}function t7({children:e,variant:t="default",frame:n="container",shape:r="rounded",size:s=PN,hug:a=!0,className:l,style:c,rootStyle:p,labelStyle:f,disabled:h=!1,id:m,leading:g,trailing:b,open:x=!1,animated:w=!1,placeholder:_,hideChevron:E=!1,ref:R,...T}){const C=e==null&&_!=null,A=Rn({rootClass:"ui-select-trigger",stylexStyles:[Kq({animated:w,frame:n,hug:a,shape:r,size:s,variant:t}),p],className:l,style:c}),N=Rn({rootClass:"ui-select-label",stylexStyles:[Zq(C),f]}),I=dn(Wq(t,x)),F=Rn({rootClass:"ui-select-icon",stylexStyles:Yq(t,x)});return v.jsxs("button",{...T,ref:R,type:"button",id:m,className:A.className,style:A.style,"data-variant":t,"data-component":"select","data-frame":n,"data-shape":r,"data-size":s,"data-hug":a,"data-open":x,"data-popup-open":x||void 0,"data-disabled":h||void 0,"data-animated":w||void 0,disabled:h,children:[g!=null&&v.jsx("span",{className:I.className,style:I.style,children:g}),v.jsx("span",{className:N.className,style:N.style,"data-placeholder":C||void 0,children:C?_:e}),b!=null&&v.jsx("span",{className:I.className,style:I.style,children:b}),E?null:v.jsx(Mn,{name:t==="filled"||t==="ghost"||t==="unfilled"?"chevron-down":"chevrons-up-down",size:10,className:F.className,style:F.style})]})}const $N=k.createContext(null),BN=k.createContext(null);function Rs(){const e=k.useContext($N);if(e===null)throw new Error(Jn(60));return e}function FN(){const e=k.useContext(BN);if(e===null)throw new Error(Jn(61));return e}const gt={id:nt(e=>e.id),labelId:nt(e=>e.labelId),modal:nt(e=>e.modal),multiple:nt(e=>e.multiple),items:nt(e=>e.items),itemToStringLabel:nt(e=>e.itemToStringLabel),itemToStringValue:nt(e=>e.itemToStringValue),isItemEqualToValue:nt(e=>e.isItemEqualToValue),value:nt(e=>e.value),hasSelectedValue:nt(e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:tl(t,r)!==""}),hasNullItemLabel:nt((e,t)=>t?i$(e.items):!1),open:nt(e=>e.open),mounted:nt(e=>e.mounted),forceMount:nt(e=>e.forceMount),transitionStatus:nt(e=>e.transitionStatus),openMethod:nt(e=>e.openMethod),activeIndex:nt(e=>e.activeIndex),selectedIndex:nt(e=>e.selectedIndex),isActive:nt((e,t)=>e.activeIndex===t),isSelected:nt((e,t,n)=>{const r=e.isItemEqualToValue,s=e.value;return e.multiple?Array.isArray(s)&&s.some(a=>Sl(n,a,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:Sl(n,s,r)}),isSelectedByFocus:nt((e,t)=>e.selectedIndex===t),popupProps:nt(e=>e.popupProps),triggerProps:nt(e=>e.triggerProps),triggerElement:nt(e=>e.triggerElement),positionerElement:nt(e=>e.positionerElement),listElement:nt(e=>e.listElement),scrollUpArrowVisible:nt(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:nt(e=>e.scrollDownArrowVisible),hasScrollArrows:nt(e=>e.hasScrollArrows)};function Yu(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const hs=1;function UN(e,t){return Math.max(0,e-t)}function n7(e,t){if(t<=0)return 0;const n=Yu(e,0,t),r=n,s=t-n,a=r<=hs,l=s<=hs;return a&&l?r<=s?0:t:a?0:l?t:n}function r7(e){const{id:t,value:n,defaultValue:r=null,onValueChange:s,open:a,defaultOpen:l=!1,onOpenChange:c,name:p,form:f,autoComplete:h,disabled:m=!1,readOnly:g=!1,required:b=!1,modal:x=!0,actionsRef:w,inputRef:_,onOpenChangeComplete:E,items:R,multiple:T=!1,itemToStringLabel:C,itemToStringValue:A,isItemEqualToValue:N=t$,highlightItemOnHover:I=!0,children:F}=e,{clearErrors:V}=DP(),{setDirty:j,setTouched:q,setFocused:Z,shouldValidateOnChange:B,validityData:z,setFilled:L,name:H,disabled:U,validation:P,validationMode:Y}=Kc(),D=Gv({id:t}),$=U||m,G=H??p,[O,J]=mc({controlled:n,default:T?r??cc:r,name:"Select",state:"value"}),[ee,ie]=mc({controlled:a,default:l,name:"Select",state:"open"}),he=k.useRef([]),le=k.useRef([]),ke=k.useRef(null),Te=k.useRef(null),Pe=k.useRef(0),ue=k.useRef(null),Ee=k.useRef([]),Ce=k.useRef(!1),Me=k.useRef(!1),ve=k.useRef(null),xe=k.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),De=k.useRef(!1),{mounted:Ne,setMounted:Ie,transitionStatus:ge}=Fc(ee),{openMethod:fe,triggerProps:se}=JL(ee),ne=wr(()=>new JR({id:D,labelId:void 0,modal:x,multiple:T,itemToStringLabel:C,itemToStringValue:A,isItemEqualToValue:N,value:O,open:ee,mounted:Ne,transitionStatus:ge,items:R,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,_e=bt(ne,gt.activeIndex),te=bt(ne,gt.selectedIndex),ae=bt(ne,gt.triggerElement),ze=bt(ne,gt.positionerElement),Ue=q9(fe),Ge=fe??Ue,Ye=k.useMemo(()=>T&&Array.isArray(O)&&O.length===0?"":tl(O,A),[T,O,A]),rt=k.useMemo(()=>T&&Array.isArray(O)?O.map(We=>tl(We,A)):tl(O,A),[T,O,A]),st=Gn(ne.state.triggerElement),ot=Ke(()=>rt);pC(st,{id:D,value:O,getValue:ot});const Et=k.useRef(O);He(()=>{O!==Et.current&&ne.set("forceMount",!0)},[ne,O]),He(()=>{L(T?Array.isArray(O)&&O.length>0:O!=null)},[T,O,L]),He(function(){if(ee)return;const ht=Ee.current;if(T){const Jt=Array.isArray(O)?O:[];if(Jt.length===0){ne.set("selectedIndex",null);return}const Gt=Jt[Jt.length-1],wt=tc(ht,Gt,N);ne.set("selectedIndex",wt===-1?null:wt);return}const Qt=tc(ht,O,N);ne.set("selectedIndex",Qt===-1?null:Qt)},[T,ee,O,Ee,N,ne]),cC(O,()=>{V(G),j(O!==z.initialValue),B()?P.commit(O):P.commit(O,!0)});const it=Ke((We,ht)=>{if(c?.(We,ht),!ht.isCanceled&&(ie(We),!We&&(ht.reason===gh||ht.reason===Tv)&&(q(!0),Z(!1),Y==="onBlur"&&P.commit(O)),!We&&ne.state.activeIndex!==null)){const Qt=he.current[ne.state.activeIndex];queueMicrotask(()=>{Qt?.setAttribute("tabindex","-1")})}}),vt=Ke(()=>{Ie(!1),ne.update({activeIndex:null,openMethod:null}),E?.(!1)});aa({enabled:!w,open:ee,ref:ke,onComplete(){ee||vt()}}),k.useImperativeHandle(w,()=>({unmount:vt}),[vt]);const Xe=Ke((We,ht)=>{s?.(We,ht),!ht.isCanceled&&J(We)}),Dt=Ke(()=>{const We=ne.state.listElement||ke.current;if(!We)return;const ht=UN(We.scrollHeight,We.clientHeight),Qt=n7(We.scrollTop,ht),Jt=Qt>0,Gt=Qt<ht;ne.state.scrollUpArrowVisible!==Jt&&ne.set("scrollUpArrowVisible",Jt),ne.state.scrollDownArrowVisible!==Gt&&ne.set("scrollDownArrowVisible",Gt)}),Fe=nC({open:ee,onOpenChange:it,elements:{reference:ae,floating:ze}}),Ze=uj(Fe,{enabled:!g&&!$,event:"mousedown"}),ft=BR(Fe,{bubbles:!1}),Qe=CL(Fe,{enabled:!g&&!$,listRef:he,activeIndex:_e,selectedIndex:te,disabledIndices:cc,onNavigate(We){We===null&&!ee||ne.set("activeIndex",We)},focusItemOnHover:I}),W=AL(Fe,{enabled:!g&&!$&&(ee||!T),listRef:le,activeIndex:_e,selectedIndex:te,onMatch(We){ee?ne.set("activeIndex",We):Xe(Ee.current[We],Rt("none"))},onTypingChange(We){Ce.current=We}}),{getReferenceProps:ce,getFloatingProps:Ae,getItemProps:Ve}=sC([Ze,ft,Qe,W]),St=k.useMemo(()=>jc(ce(),se,D?{id:D}:hr),[ce,se,D]);uC(()=>{ne.update({popupProps:Ae(),triggerProps:St})}),He(()=>{ne.update({id:D,modal:x,multiple:T,value:O,open:ee,mounted:Ne,transitionStatus:ge,popupProps:Ae(),triggerProps:St,items:R,itemToStringLabel:C,itemToStringValue:A,isItemEqualToValue:N,openMethod:Ge})},[ne,D,x,T,O,ee,Ne,ge,Ae,St,R,C,A,N,Ge]);const At=k.useMemo(()=>({store:ne,name:G,required:b,disabled:$,readOnly:g,multiple:T,itemToStringLabel:C,itemToStringValue:A,highlightItemOnHover:I,setValue:Xe,setOpen:it,listRef:he,popupRef:ke,scrollHandlerRef:Te,handleScrollArrowVisibility:Dt,scrollArrowsMountedCountRef:Pe,getItemProps:Ve,events:Fe.context.events,valueRef:ue,valuesRef:Ee,labelsRef:le,typingRef:Ce,selectionRef:xe,selectedItemTextRef:ve,validation:P,onOpenChangeComplete:E,keyboardActiveRef:Me,alignItemWithTriggerActiveRef:De,initialValueRef:Et}),[ne,G,b,$,g,T,C,A,I,Xe,it,Ve,Fe.context.events,P,E,Dt]),qe=xs(_,P.inputRef),$e=T&&Array.isArray(O)&&O.length>0,be=T?void 0:G,Nt=k.useMemo(()=>!T||!Array.isArray(O)||!G?null:O.map(We=>{const ht=tl(We,A);return v.jsx("input",{type:"hidden",form:f,name:G,value:ht},ht)}),[T,O,f,G,A]);return v.jsx($N.Provider,{value:At,children:v.jsxs(BN.Provider,{value:Fe,children:[F,v.jsx("input",{...P.getInputValidationProps({onFocus(){ne.state.triggerElement?.focus({focusVisible:!0})},onChange(We){if(We.nativeEvent.defaultPrevented)return;const ht=We.currentTarget.value,Qt=Rt(Ss,We.nativeEvent);function Jt(){if(T)return;const Gt=Ee.current.find(wt=>tl(wt,A).toLowerCase()===ht.toLowerCase()||vC(wt,C).toLowerCase()===ht.toLowerCase());Gt!=null&&(j(Gt!==z.initialValue),Xe(Gt,Qt),B()&&P.commit(Gt))}ne.set("forceMount",!0),queueMicrotask(Jt)}}),id:D&&be==null?`${D}-hidden-input`:void 0,form:f,name:be,autoComplete:h,value:Ye,disabled:$,required:b&&!$e,readOnly:g,ref:qe,style:G?I2:bR,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Nt]})})}const Xd=2,i7=400,GE=200,s7={...o2,...Vc,value:()=>null},o7=k.forwardRef(function(t,n){const{render:r,className:s,id:a,disabled:l=!1,nativeButton:c=!0,style:p,...f}=t,{setTouched:h,setFocused:m,validationMode:g,state:b,disabled:x}=Kc(),{labelId:w}=Hv(),{store:_,setOpen:E,selectionRef:R,validation:T,readOnly:C,required:A,alignItemWithTriggerActiveRef:N,disabled:I,keyboardActiveRef:F}=Rs(),V=x||I||l,j=bt(_,gt.open),q=bt(_,gt.value),Z=bt(_,gt.triggerProps),B=bt(_,gt.positionerElement),z=bt(_,gt.listElement),L=bt(_,gt.id),H=bt(_,gt.labelId),U=bt(_,gt.hasSelectedValue),P=!U&&j,Y=bt(_,gt.hasNullItemLabel,P),D=a??L,$=o$(w,H);Gv({id:D});const G=Gn(B),O=k.useRef(null),{getButtonProps:J,buttonRef:ee}=Pc({disabled:V,native:c}),ie=Ke(Me=>{_.set("triggerElement",Me)}),he=xs(n,O,ee,ie),le=di(),ke=di(),Te=di(),Pe=di();k.useEffect(()=>{if(j)return!(U||Y)?Te.start(i7,()=>{R.current.allowUnselectedMouseUp=!0,R.current.allowSelectedMouseUp=!0}):Pe.start(GE,()=>{R.current.allowUnselectedMouseUp=!0,Te.start(GE,()=>{R.current.allowSelectedMouseUp=!0})}),()=>{Te.clear(),Pe.clear()};R.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},ke.clear()},[j,U,Y,R,ke,Te,Pe]);const ue=k.useMemo(()=>z?.id??Op(B)?.id,[z,B]),Ee=jc(Z,{id:D,role:"combobox","aria-expanded":j?"true":"false","aria-haspopup":"listbox","aria-controls":j?ue:void 0,"aria-labelledby":$,"aria-readonly":C||void 0,"aria-required":A||void 0,tabIndex:V?-1:0,ref:he,onFocus(Me){m(!0),j&&N.current&&E(!1,Rt(Ss,Me.nativeEvent)),le.start(0,()=>{_.set("forceMount",!0)})},onBlur(Me){kt(B,Me.relatedTarget)||(h(!0),m(!1),g==="onBlur"&&T.commit(q))},onPointerMove(){F.current=!1},onKeyDown(){F.current=!0},onMouseDown(Me){if(j)return;const ve=qt(Me.currentTarget);function xe(De){if(!O.current)return;const Ne=De.target;if(kt(O.current,Ne)||kt(G.current,Ne)||Ne===O.current)return;const Ie=l$(O.current);De.clientX>=Ie.left-Xd&&De.clientX<=Ie.right+Xd&&De.clientY>=Ie.top-Xd&&De.clientY<=Ie.bottom+Xd||E(!1,Rt(y2,De))}ke.start(0,()=>{ve.addEventListener("mouseup",xe,{once:!0})})}},T.getValidationProps,f,J);Ee.role="combobox";const Ce={...b,open:j,disabled:V,value:q,readOnly:C,placeholder:!U};return wn("button",t,{ref:[n,O],state:Ce,stateAttributesMapping:s7,props:Ee})}),a7={value:()=>null},l7=k.forwardRef(function(t,n){const{className:r,render:s,children:a,placeholder:l,style:c,...p}=t,{store:f,valueRef:h}=Rs(),m=bt(f,gt.value),g=bt(f,gt.items),b=bt(f,gt.itemToStringLabel),x=bt(f,gt.hasSelectedValue),w=!x&&l!=null&&a==null,_=bt(f,gt.hasNullItemLabel,w),E={value:m,placeholder:!x};let R=null;return typeof a=="function"?R=a(m):a!=null?R=a:!x&&l!=null&&!_?R=l:Array.isArray(m)?R=s$(m,g,b):R=kC(m,g,b),wn("span",t,{state:E,ref:[n,h],props:[{children:R},p],stateAttributesMapping:a7})}),u7=k.createContext(void 0),c7=k.forwardRef(function(t,n){const{store:r}=Rs(),s=bt(r,gt.mounted),a=bt(r,gt.forceMount);return s||a?v.jsx(u7.Provider,{value:!0,children:v.jsx(ej,{ref:n,...t})}):null}),f7={...fh,...oa},d7=k.forwardRef(function(t,n){const{className:r,render:s,style:a,...l}=t,{store:c}=Rs(),p=bt(c,gt.open),f=bt(c,gt.mounted),h=bt(c,gt.transitionStatus);return wn("div",t,{state:{open:p,transitionStatus:h},ref:n,props:[{role:"presentation",hidden:!f,style:{userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:f7})}),qN=k.createContext(void 0);function HN(){const e=k.useContext(qN);if(!e)throw new Error(Jn(59));return e}function Jp(e,t){e&&Object.assign(e.style,t)}const GN={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},p7={position:"fixed"},h7=k.forwardRef(function(t,n){const{anchor:r,positionMethod:s="absolute",className:a,render:l,side:c="bottom",align:p="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:g,arrowPadding:b=5,sticky:x=!1,disableAnchorTracking:w,alignItemWithTrigger:_=!0,collisionAvoidance:E=Hz,style:R,...T}=t,{store:C,listRef:A,labelsRef:N,alignItemWithTriggerActiveRef:I,selectedItemTextRef:F,valuesRef:V,initialValueRef:j,popupRef:q,setValue:Z}=Rs(),B=FN(),z=bt(C,gt.open),L=bt(C,gt.mounted),H=bt(C,gt.modal),U=bt(C,gt.value),P=bt(C,gt.openMethod),Y=bt(C,gt.positionerElement),D=bt(C,gt.triggerElement),$=bt(C,gt.isItemEqualToValue),G=bt(C,gt.transitionStatus),O=k.useRef(null),J=k.useRef(null),[ee,ie]=k.useState(_),he=L&&ee&&P!=="touch";!L&&ee!==_&&ie(_),He(()=>{L||(gt.scrollUpArrowVisible(C.state)&&C.set("scrollUpArrowVisible",!1),gt.scrollDownArrowVisible(C.state)&&C.set("scrollDownArrowVisible",!1))},[C,L]),k.useImperativeHandle(I,()=>he),y$((he||H)&&z,P==="touch",Y,D);const le=wC({anchor:r,floatingRootContext:B,positionMethod:s,mounted:L,side:c,sideOffset:f,align:p,alignOffset:h,arrowPadding:b,collisionBoundary:m,collisionPadding:g,sticky:x,disableAnchorTracking:w??he,collisionAvoidance:E,keepMounted:!0}),ke=he?"none":le.side,Te=he?p7:le.positionerStyles,Pe={open:z,side:ke,align:le.align,anchorHidden:le.anchorHidden},ue=Ke(xe=>{C.set("positionerElement",xe)}),Ee=EC(t,Pe,{styles:Te,transitionStatus:G,props:T,refs:[n,ue],hidden:!L,inert:!z}),Ce=k.useRef(0),Me=Ke(xe=>{if(xe.size===0&&Ce.current===0||V.current.length===0)return;const De=Ce.current;if(Ce.current=xe.size,xe.size===De)return;const Ne=Rt(Ss);if(De!==0&&!C.state.multiple&&U!==null&&tc(V.current,U,$)===-1){const ge=j.current,se=ge!=null&&tc(V.current,ge,$)!==-1?ge:null;Z(se,Ne),se===null&&(C.set("selectedIndex",null),F.current=null)}if(De!==0&&C.state.multiple&&Array.isArray(U)){const Ie=fe=>tc(V.current,fe,$)!==-1,ge=U.filter(fe=>Ie(fe));(ge.length!==U.length||ge.some(fe=>!n$(U,fe,$)))&&(Z(ge,Ne),ge.length===0&&(C.set("selectedIndex",null),F.current=null))}if(z&&he){C.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const Ie={height:""};Jp(Y,Ie),Jp(q.current,Ie)}}),ve=k.useMemo(()=>({...le,side:ke,alignItemWithTriggerActive:he,setControlledAlignItemWithTrigger:ie,scrollUpArrowRef:O,scrollDownArrowRef:J}),[le,ke,he,ie]);return v.jsx(Kv,{elementsRef:A,labelsRef:N,onMapChange:Me,children:v.jsxs(qN.Provider,{value:ve,children:[L&&H&&v.jsx(HL,{inert:qL(!z),cutout:D}),Ee]})})}),Qd="base-ui-disable-scrollbar",Fy={className:Qd,getElement(e){return v.jsx("style",{nonce:e,href:Qd,precedence:"base-ui:low",children:`.${Qd}{scrollbar-width:none}.${Qd}::-webkit-scrollbar{display:none}`})}},m7={...fh,...oa},g7=k.forwardRef(function(t,n){const{render:r,className:s,style:a,finalFocus:l,...c}=t,{store:p,popupRef:f,onOpenChangeComplete:h,setOpen:m,valueRef:g,selectedItemTextRef:b,keyboardActiveRef:x,multiple:w,handleScrollArrowVisibility:_,scrollHandlerRef:E,listRef:R,highlightItemOnHover:T}=Rs(),{side:C,align:A,alignItemWithTriggerActive:N,isPositioned:I,setControlledAlignItemWithTrigger:F,scrollDownArrowRef:V,scrollUpArrowRef:j}=HN(),q=yq()!=null,Z=FN(),B=Vv(),{nonce:z,disableStyleElements:L}=jN(),H=bt(p,gt.id),U=bt(p,gt.open),P=bt(p,gt.mounted),Y=bt(p,gt.popupProps),D=bt(p,gt.transitionStatus),$=bt(p,gt.triggerElement),G=bt(p,gt.positionerElement),O=bt(p,gt.listElement),J=k.useRef(!1),ee=k.useRef(!1),ie=k.useRef({}),he=$c(),le=Ke(ue=>{if(!G||!f.current||!ee.current)return;if(J.current||!N){_();return}const Ee=G.style.top==="0px",Ce=G.style.bottom==="0px";if(!Ee&&!Ce){_();return}const Me=KE(G),ve=Xu(G.getBoundingClientRect().height,"y",Me),xe=qt(G),De=getComputedStyle(G),Ne=parseFloat(De.marginTop),Ie=parseFloat(De.marginBottom),ge=VE(getComputedStyle(f.current)),fe=Math.min(xe.documentElement.clientHeight-Ne-Ie,ge),se=ue.scrollTop,ne=Jd(ue);let _e=0,te=null,ae=!1,ze=!1;const Ue=st=>{G.style.height=`${st}px`},Ge=(st,ot)=>{const Et=Yu(st,0,fe-ve);Et>0&&Ue(ve+Et),ue.scrollTop=ot,fe-(ve+Et)<=hs&&(J.current=!0),_()},Ye=Ee?ne-se:se,rt=Math.min(ve+Ye,fe);if(_e=rt,Ye<=hs){Ge(Ye,Ee?ne:0);return}if(fe-rt>hs)Ee?ze=!0:te=0;else if(ae=!0,Ce&&se<ne){const st=ve+Ye-fe;te=se-(Ye-st)}if(_e=Math.ceil(_e),_e!==0&&Ue(_e),ze||te!=null){const st=Jd(ue),ot=ze?st:Yu(te,0,st);Math.abs(ue.scrollTop-ot)>hs&&(ue.scrollTop=ot)}(ae||_e>=fe-hs)&&(J.current=!0),_()});k.useImperativeHandle(E,()=>le,[le]),aa({open:U,ref:f,onComplete(){U&&h?.(!0)}});const ke={open:U,transitionStatus:D,side:C,align:A};He(()=>{!G||!f.current||Object.keys(ie.current).length||(ie.current={top:G.style.top||"0",left:G.style.left||"0",right:G.style.right,height:G.style.height,bottom:G.style.bottom,minHeight:G.style.minHeight,maxHeight:G.style.maxHeight,marginTop:G.style.marginTop,marginBottom:G.style.marginBottom})},[f,G]),He(()=>{U||N||(ee.current=!1,J.current=!1,Jp(G,ie.current))},[U,N,G,f]),He(()=>{const ue=f.current;if(!U||!$||!G||!ue||N&&!I||p.state.transitionStatus==="ending")return;if(!N){ee.current=!0,he.request(_),ue.style.removeProperty("--transform-origin");return}const Ee=b7(ue);ue.style.removeProperty("--transform-origin");try{const Ce=b.current,Me=g.current,ve=getComputedStyle(G),xe=getComputedStyle(ue),De=qt($),Ne=Sn(G),Ie=KE($),ge=ep($.getBoundingClientRect(),Ie),fe=ep(G.getBoundingClientRect(),Ie),se=ge.height,ne=O||ue,_e=ne.scrollHeight,te=parseFloat(xe.borderBottomWidth),ae=parseFloat(ve.marginTop)||10,ze=parseFloat(ve.marginBottom)||10,Ue=parseFloat(ve.minHeight)||100,Ge=VE(xe),Ye=5,rt=5,st=20,ot=De.documentElement.clientHeight-ae-ze,Et=De.documentElement.clientWidth,it=ot-ge.bottom+se;let vt,Xe=B==="rtl"?ge.right-fe.width:ge.left,Dt=0;if(Ce&&Me){const qe=ep(Me.getBoundingClientRect(),Ie);vt=ep(Ce.getBoundingClientRect(),Ie),Xe=fe.left+(B==="rtl"?qe.right-vt.right:qe.left-vt.left);const $e=qe.top-ge.top+qe.height/2;Dt=vt.top-fe.top+vt.height/2-$e}const Fe=it+Dt+ze+te;let Ze=Math.min(ot,Fe);const ft=ot-ae-ze,Qe=Fe-Ze,W=Et-rt;G.style.left=`${Yu(Xe,Ye,W-fe.width)}px`,G.style.height=`${Ze}px`,G.style.maxHeight="auto",G.style.marginTop=`${ae}px`,G.style.marginBottom=`${ze}px`,ue.style.height="100%";const ce=Jd(ne),Ae=Qe>=ce-hs;Ae&&(Ze=Math.min(ot,fe.height)-(Qe-ce));const Ve=ge.top<st||ge.bottom>ot-st||Math.ceil(Ze)+hs<Math.min(_e,Ue),St=(Ne.visualViewport?.scale??1)!==1&&Rv;if(Ve||St){ee.current=!0,Jp(G,ie.current),F(!1);return}const At=Math.max(Ue,Ze);if(Ae){const qe=Math.max(0,ot-Fe);G.style.top=fe.height>=ft?"0":`${qe}px`,G.style.height=`${Ze}px`,ne.scrollTop=Jd(ne)}else G.style.bottom="0",ne.scrollTop=Qe;if(vt){const qe=fe.top,$e=fe.height,be=vt.top+vt.height/2,Nt=$e>0?(be-qe)/$e*100:50,We=Yu(Nt,0,100);ue.style.setProperty("--transform-origin",`50% ${We}%`)}(At===ot||Ze>=Ge)&&(J.current=!0),_(),T&&p.state.selectedIndex===null&&p.state.activeIndex===null&&R.current[0]!=null&&p.set("activeIndex",0),ee.current=!0}finally{Ee()}},[p,U,G,$,g,b,f,_,N,F,he,V,j,O,R,T,B,I]),k.useEffect(()=>{if(!N||!G||!U)return;const ue=Sn(G);function Ee(Ce){m(!1,Rt(k2,Ce))}return It(ue,"resize",Ee)},[m,N,G,U]);const Te={...O?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":w||void 0,id:`${H}-list`},onKeyDown(ue){x.current=!0,q&&jL.has(ue.key)&&ue.stopPropagation()},onMouseMove(){x.current=!1},onScroll(ue){O||le(ue.currentTarget)},...N&&{style:O?{height:"100%"}:GN}},Pe=wn("div",t,{ref:[n,f],state:ke,stateAttributesMapping:m7,props:[Y,Te,Zv(D),{className:!O&&N?Fy.className:void 0},c]});return v.jsxs(k.Fragment,{children:[!L&&Fy.getElement(z),v.jsx(lj,{context:Z,modal:!1,disabled:!P,returnFocus:l,restoreFocus:!0,children:Pe})]})});function VE(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function Jd(e){return UN(e.scrollHeight,e.clientHeight)}function KE(e){return KR.getScale(e)}function Xu(e,t,n){return e/n[t]}function ep(e,t){return fc({x:Xu(e.x,"x",t),y:Xu(e.y,"y",t),width:Xu(e.width,"x",t),height:Xu(e.height,"y",t)})}const ZE=[["transform","none"],["scale","1"],["translate","0 0"]];function b7(e){const{style:t}=e,n={};for(const[r,s]of ZE)n[r]=t.getPropertyValue(r),t.setProperty(r,s,"important");return()=>{for(const[r]of ZE){const s=n[r];s?t.setProperty(r,s):t.removeProperty(r)}}}const y7=k.forwardRef(function(t,n){const{className:r,render:s,style:a,...l}=t,{store:c,scrollHandlerRef:p}=Rs(),{alignItemWithTriggerActive:f}=HN(),h=bt(c,gt.hasScrollArrows),m=bt(c,gt.openMethod),g=bt(c,gt.multiple),x={id:`${bt(c,gt.id)}-list`,role:"listbox","aria-multiselectable":g||void 0,onScroll(_){p.current?.(_.currentTarget)},...f&&{style:GN},className:h&&m!=="touch"?Fy.className:void 0},w=Ke(_=>{c.set("listElement",_)});return wn("div",t,{ref:[n,w],props:[x,l]})}),VN=k.createContext(void 0);function Rk(){const e=k.useContext(VN);if(!e)throw new Error(Jn(57));return e}const v7=k.memo(k.forwardRef(function(t,n){const{render:r,className:s,value:a=null,label:l,disabled:c=!1,nativeButton:p=!1,style:f,...h}=t,m=k.useRef(null),g=_C({label:l,textRef:m,indexGuessBehavior:TC.GuessFromOrder}),{store:b,getItemProps:x,setOpen:w,setValue:_,selectionRef:E,typingRef:R,valuesRef:T,multiple:C,selectedItemTextRef:A}=Rs(),N=bt(b,gt.isActive,g.index),I=bt(b,gt.isSelected,g.index,a),F=bt(b,gt.isSelectedByFocus,g.index),V=bt(b,gt.isItemEqualToValue),j=g.index,q=j!==-1,Z=k.useRef(null),B=Gn(j);He(()=>{if(!q)return;const ee=T.current;return ee[j]=a,()=>{delete ee[j]}},[q,j,a,T]),He(()=>{if(!q)return;const ee=b.state.value;let ie=ee;C&&Array.isArray(ee)&&ee.length>0&&(ie=ee[ee.length-1]),ie!==void 0&&Sl(a,ie,V)&&(b.set("selectedIndex",j),m.current&&(A.current=m.current))},[q,j,C,V,b,a,A]);const z={disabled:c,selected:I,highlighted:N},L=x({active:N,selected:I});L.id=void 0;const H=k.useRef(null),U=k.useRef("mouse"),P=k.useRef(!1),{getButtonProps:Y,buttonRef:D}=Pc({disabled:c,focusableWhenDisabled:!0,native:p,composite:!0});function $(ee){const ie=b.state.value;if(C){const he=Array.isArray(ie)?ie:[],le=I?r$(he,a,V):[...he,a];_(le,Rt(ub,ee))}else _(a,Rt(ub,ee)),w(!1,Rt(ub,ee))}const G={role:"option","aria-selected":I,tabIndex:N?0:-1,onTouchStart(){E.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(ee){H.current=ee.key,b.set("activeIndex",j),ee.key===" "&&R.current&&ee.preventDefault()},onClick(ee){P.current=!1,!(ee.type==="keydown"&&H.current===null)&&(c||ee.type==="keydown"&&H.current===" "&&R.current||U.current!=="touch"&&!N||(H.current=null,$(ee.nativeEvent)))},onPointerEnter(ee){U.current=ee.pointerType},onPointerDown(ee){U.current=ee.pointerType,P.current=!0},onMouseUp(){if(c)return;if(P.current){P.current=!1;return}const ee=!E.current.allowSelectedMouseUp&&I,ie=!E.current.allowUnselectedMouseUp&&!I;ee||ie||U.current!=="touch"&&!N||Z.current?.click()}},O=wn("div",t,{ref:[D,n,g.ref,Z],state:z,props:[L,G,h,Y]}),J=k.useMemo(()=>({selected:I,indexRef:B,textRef:m,selectedByFocus:F,hasRegistered:q}),[I,B,m,F,q]);return v.jsx(VN.Provider,{value:J,children:O})})),k7=k.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:s}=Rk();return r||s?v.jsx(x7,{...t,ref:n}):null}),x7=k.memo(k.forwardRef((e,t)=>{const{render:n,className:r,style:s,keepMounted:a,...l}=e,{selected:c}=Rk(),p=k.useRef(null),{transitionStatus:f,setMounted:h}=Fc(c),g=wn("span",e,{ref:[t,p],state:{selected:c,transitionStatus:f},props:[{"aria-hidden":!0,children:"✔️"},l],stateAttributesMapping:oa});return aa({open:c,ref:p,onComplete(){c||h(!1)}}),g})),S7=k.memo(k.forwardRef(function(t,n){const{indexRef:r,textRef:s,selectedByFocus:a,hasRegistered:l}=Rk(),{selectedItemTextRef:c}=Rs(),{className:p,render:f,style:h,...m}=t,g=k.useCallback(x=>{if(!x||!l)return;const w=c.current===null||!c.current.isConnected;(a||w&&r.current===0)&&(c.current=x)},[c,r,a,l]);return wn("div",t,{ref:[g,n,s],props:m})})),WE={backdrop:{kVAEAm:"ui-ixxii4",kpwlN0:"ui-10a8y8t",kWkggS:"ui-jbqb8w",$$css:!0},backdropZIndex:e=>[{kY2c9j:e!=null?"ui-r3buco":e,$$css:!0},{"--x-zIndex":e??void 0}]},KN=k.createContext(null);function Ck(){const e=k.useContext(KN);if(!e)throw new Error("Select internals must be used within Select");return e}function w7(){const e=Ck(),t=e.hasValue?v.jsx(l7,{}):void 0;return v.jsx(o7,{disabled:e.disabled,id:e.id,...e.ariaLabel!==void 0?{"aria-label":e.ariaLabel}:{},...e.ariaLabelledBy!==void 0?{"aria-labelledby":e.ariaLabelledBy}:{},render:e.renderTrigger??((n,r)=>v.jsx(t7,{...n,animated:e.animated,className:_n(n.className,e.className),disabled:e.disabled,frame:e.frame,hug:e.hug,leading:e.leading,labelStyle:e.labelStyle,open:r.open,placeholder:e.placeholder,trailing:e.trailing,shape:e.shape,size:e.size,variant:e.variant})),children:t})}function E7({children:e}){const t=Ck(),n=zl(),{zIndex:r,portalLayerStyles:s}=Hc("popover",t.open),a=Yv(t.placement,t.offset,!1),l=t.matchAnchorWidth?"var(--anchor-width)":t.contentWidth??200,c=Rn({rootClass:"ui-select-content",stylexStyles:[v$,k$[t.menuSize],E$[t.menuSize],x$(l),t.contentStyle]});return v.jsxs(c7,{container:n??void 0,style:s,children:[v.jsx(d7,{"data-component":"select-backdrop",...dn(WE.backdrop,r!==null&&WE.backdropZIndex(r-1))}),v.jsx(h7,{align:a.align,alignItemWithTrigger:!1,alignOffset:a.alignOffset,collisionAvoidance:a.collisionAvoidance,"data-component":"select-positioner",side:a.side,sideOffset:a.sideOffset,className:"ui-fc2p8",children:v.jsx(g7,{className:c.className,"data-component":"select-popup","data-size":t.menuSize,style:c.style,children:v.jsx(_s,{menuSize:t.menuSize,children:v.jsx(y7,{"aria-label":t.ariaLabel??"Select an option",...dn(S$),children:e})})})})]})}function T7({option:e}){Ck();const t=v.jsxs(v7,{disabled:e.disabled,label:typeof e.label=="string"?e.label:void 0,value:e.value,"data-component":"select-item",...dn(w$),children:[e.leading!=null?v.jsx("span",{...dn(Tb),children:e.leading}):null,v.jsx(S7,{...dn(T$),children:e.label}),e.trailing!=null?v.jsx("span",{...dn(Tb),children:e.trailing}):null,v.jsx(k7,{"data-component":"select-item-indicator",...dn(Tb),children:v.jsx(Mn,{name:"check","aria-hidden":!0})})]});return e.tooltip==null?t:v.jsx(Sk,{closeDelay:e.tooltipCloseDelay,content:e.tooltip,openDelay:e.tooltipOpenDelay,children:t})}function _7({value:e,defaultValue:t,onChange:n,onValueChange:r,open:s,defaultOpen:a,onOpenChange:l,options:c,placeholder:p,variant:f="default",frame:h="container",shape:m="rounded",size:g=PN,menuSize:b,contentWidth:x,matchAnchorWidth:w=!1,hug:_=!0,disabled:E=!1,animated:R=!1,className:T,renderTrigger:C,placement:A="bottom-start",offset:N=4,"aria-label":I,"aria-labelledby":F,id:V,leading:j,trailing:q,labelStyle:Z,contentStyle:B,...z}){const[L,H]=k.useState(t),U=e!==void 0,P=U?e:L,Y=P!=null&&c.some(le=>le.value===P),[D,$]=k.useState(a??!1),G=s??D,O=b??"sm",J=k.useCallback((le,ke)=>{r?.(le,ke),!ke.isCanceled&&(U||H(le),le!==null&&n?.(le))},[U,n,r]),ee=k.useCallback((le,ke)=>{l?.(le,ke),!ke.isCanceled&&s===void 0&&$(le)},[l,s]),ie=k.useMemo(()=>({hasValue:Y,variant:f,frame:h,shape:m,size:g,menuSize:O,hug:_,disabled:E,animated:R,open:G,placement:A,offset:N,id:V,ariaLabel:I,ariaLabelledBy:F,placeholder:p,leading:j,trailing:q,labelStyle:Z,contentStyle:B,className:T,renderTrigger:C,contentWidth:x,matchAnchorWidth:w}),[R,I,F,T,B,x,E,h,_,Y,V,G,Z,j,w,N,A,p,O,q,C,m,g,f]),he=c.map(le=>({label:le.label,value:le.value}));return v.jsx(KN.Provider,{value:ie,children:v.jsx(_s,{iconSize:Vq,children:v.jsxs(r7,{...z,defaultOpen:a,defaultValue:t,disabled:E,id:V,items:he,onOpenChange:ee,onValueChange:J,open:s,value:e,children:[v.jsx(w7,{}),v.jsx(E7,{children:c.map((le,ke)=>v.jsx(T7,{option:le},typeof le.value=="string"||typeof le.value=="number"?String(le.value):ke))})]})})})}const YE=e=>Number.isFinite(e)?e:0;function R7(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(YE(e*1e3)%1e3),nanoseconds:Math.trunc(YE(e*1e6)%1e3)}}function C7(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}function A7(e){switch(typeof e){case"number":{if(Number.isFinite(e))return R7(e);break}case"bigint":return C7(e)}throw new TypeError("Expected a finite number or bigint")}const N7=e=>e===0||e===0n,O7=(e,t)=>t===1||t===1n?e:`${e}s`,M7=1e-7,I7=24n*60n*60n*1000n;function D7(e,t){const n=typeof e=="bigint";if(!n&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");t={...t};const r=e<0?"-":"";e=e<0?-e:e,t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let s=[];const a=(h,m)=>{const g=Math.floor(h*10**m+M7);return(Math.round(g)/10**m).toFixed(m)},l=(h,m,g,b)=>{if(!((s.length===0||!t.colonNotation)&&N7(h)&&!(t.colonNotation&&g==="m"))){if(b??=String(h),t.colonNotation){const x=b.includes(".")?b.split(".")[0].length:b.length,w=s.length>0?2:1;b="0".repeat(Math.max(0,w-x))+b}else b+=t.verbose?" "+O7(m,h):g;s.push(b)}},c=A7(e),p=BigInt(c.days);if(t.hideYearAndDays?l(BigInt(p)*24n+BigInt(c.hours),"hour","h"):(t.hideYear?l(p,"day","d"):(l(p/365n,"year","y"),l(p%365n,"day","d")),l(Number(c.hours),"hour","h")),l(Number(c.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){const h=Number(c.seconds),m=Number(c.milliseconds),g=Number(c.microseconds),b=Number(c.nanoseconds);if(l(h,"second","s"),t.formatSubMilliseconds)l(m,"millisecond","ms"),l(g,"microsecond","µs"),l(b,"nanosecond","ns");else{const x=m+g/1e3+b/1e6,w=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,_=x>=1?Math.round(x):Math.ceil(x),E=w?x.toFixed(w):_;l(Number.parseFloat(E),"millisecond","ms",E)}}else{const h=(n?Number(e%I7):e)/1e3%60,m=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,g=a(h,m),b=t.keepDecimalsOnWholeSeconds?g:g.replace(/\.0+$/,"");l(Number.parseFloat(b),"second","s",b)}if(s.length===0)return r+"0"+(t.verbose?" milliseconds":"ms");const f=t.colonNotation?":":" ";return typeof t.unitCount=="number"&&(s=s.slice(0,Math.max(t.unitCount,1))),r+s.join(f)}var ZN="en",Ak={},Uy={};function WN(){return ZN}function YN(e){ZN=e}function z7(e){return Ak[e]}function XN(e){if(!e)throw new Error("No locale data passed");Ak[e.locale]=e,Uy[e.locale.toLowerCase()]=e.locale}function XE(e){if(Ak[e])return e;if(Uy[e.toLowerCase()])return Uy[e.toLowerCase()]}function QN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.localeMatcher||"lookup";switch(n){case"lookup":return QE(e);case"best fit":return QE(e);default:throw new RangeError('Invalid "localeMatcher" option: '.concat(n))}}function QE(e){var t=XE(e);if(t)return t;for(var n=e.split("-");e.length>1;){n.pop(),e=n.join("-");var r=XE(e);if(r)return r}}var Q={af:function(t){return t==1?"one":"other"},ak:function(t){return t==0||t==1?"one":"other"},am:function(t){return t>=0&&t<=1?"one":"other"},ar:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return t==0?"zero":t==1?"one":t==2?"two":s>=3&&s<=10?"few":s>=11&&s<=99?"many":"other"},ast:function(t){var n=String(t).split("."),r=!n[1];return t==1&&r?"one":"other"},be:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),a=r&&n[0].slice(-2);return s==1&&a!=11?"one":s>=2&&s<=4&&(a<12||a>14)?"few":r&&s==0||s>=5&&s<=9||a>=11&&a<=14?"many":"other"},blo:function(t){return t==0?"zero":t==1?"one":"other"},br:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),a=r&&n[0].slice(-2),l=r&&n[0].slice(-6);return s==1&&a!=11&&a!=71&&a!=91?"one":s==2&&a!=12&&a!=72&&a!=92?"two":(s==3||s==4||s==9)&&(a<10||a>19)&&(a<70||a>79)&&(a<90||a>99)?"few":t!=0&&r&&l==0?"many":"other"},bs:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-1),c=r.slice(-2),p=s.slice(-1),f=s.slice(-2);return a&&l==1&&c!=11||p==1&&f!=11?"one":a&&l>=2&&l<=4&&(c<12||c>14)||p>=2&&p<=4&&(f<12||f>14)?"few":"other"},ca:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t==1&&a?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ceb:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-1),c=s.slice(-1);return a&&(r==1||r==2||r==3)||a&&l!=4&&l!=6&&l!=9||!a&&c!=4&&c!=6&&c!=9?"one":"other"},cs:function(t){var n=String(t).split("."),r=n[0],s=!n[1];return t==1&&s?"one":r>=2&&r<=4&&s?"few":s?"other":"many"},cy:function(t){return t==0?"zero":t==1?"one":t==2?"two":t==3?"few":t==6?"many":"other"},da:function(t){var n=String(t).split("."),r=n[0],s=Number(n[0])==t;return t==1||!s&&(r==0||r==1)?"one":"other"},dsb:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-2),c=s.slice(-2);return a&&l==1||c==1?"one":a&&l==2||c==2?"two":a&&(l==3||l==4)||c==3||c==4?"few":"other"},dz:function(t){return"other"},es:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t==1?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ff:function(t){return t>=0&&t<2?"one":"other"},fr:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t>=0&&t<2?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ga:function(t){var n=String(t).split("."),r=Number(n[0])==t;return t==1?"one":t==2?"two":r&&t>=3&&t<=6?"few":r&&t>=7&&t<=10?"many":"other"},gd:function(t){var n=String(t).split("."),r=Number(n[0])==t;return t==1||t==11?"one":t==2||t==12?"two":r&&t>=3&&t<=10||r&&t>=13&&t<=19?"few":"other"},he:function(t){var n=String(t).split("."),r=n[0],s=!n[1];return r==1&&s||r==0&&!s?"one":r==2&&s?"two":"other"},is:function(t){var n=String(t).split("."),r=n[0],s=(n[1]||"").replace(/0+$/,""),a=Number(n[0])==t,l=r.slice(-1),c=r.slice(-2);return a&&l==1&&c!=11||s%10==1&&s%100!=11?"one":"other"},lt:function(t){var n=String(t).split("."),r=n[1]||"",s=Number(n[0])==t,a=s&&n[0].slice(-1),l=s&&n[0].slice(-2);return a==1&&(l<11||l>19)?"one":a>=2&&a<=9&&(l<11||l>19)?"few":r!=0?"many":"other"},lv:function(t){var n=String(t).split("."),r=n[1]||"",s=r.length,a=Number(n[0])==t,l=a&&n[0].slice(-1),c=a&&n[0].slice(-2),p=r.slice(-2),f=r.slice(-1);return a&&l==0||c>=11&&c<=19||s==2&&p>=11&&p<=19?"zero":l==1&&c!=11||s==2&&f==1&&p!=11||s!=2&&f==1?"one":"other"},mk:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-1),c=r.slice(-2),p=s.slice(-1),f=s.slice(-2);return a&&l==1&&c!=11||p==1&&f!=11?"one":"other"},mt:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return t==1?"one":t==2?"two":t==0||s>=3&&s<=10?"few":s>=11&&s<=19?"many":"other"},pl:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-1),l=r.slice(-2);return t==1&&s?"one":s&&a>=2&&a<=4&&(l<12||l>14)?"few":s&&r!=1&&(a==0||a==1)||s&&a>=5&&a<=9||s&&l>=12&&l<=14?"many":"other"},pt:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return s==0||s==1?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ro:function(t){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,a=s&&n[0].slice(-2);return t==1&&r?"one":!r||t==0||t!=1&&a>=1&&a<=19?"few":"other"},ru:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-1),l=r.slice(-2);return s&&a==1&&l!=11?"one":s&&a>=2&&a<=4&&(l<12||l>14)?"few":s&&a==0||s&&a>=5&&a<=9||s&&l>=11&&l<=14?"many":"other"},se:function(t){return t==1?"one":t==2?"two":"other"},si:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"";return t==0||t==1||r==0&&s==1?"one":"other"},sl:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-2);return s&&a==1?"one":s&&a==2?"two":s&&(a==3||a==4)||!s?"few":"other"}};Q.as=Q.am;Q.az=Q.af;Q.bal=Q.af;Q.bg=Q.af;Q.bn=Q.am;Q.brx=Q.af;Q.ce=Q.af;Q.chr=Q.af;Q.csw=Q.ak;Q.cv=Q.blo;Q.de=Q.ast;Q.doi=Q.am;Q.ee=Q.af;Q.el=Q.af;Q.en=Q.ast;Q.eo=Q.af;Q.et=Q.ast;Q.eu=Q.af;Q.fa=Q.am;Q.fi=Q.ast;Q.fil=Q.ceb;Q.fo=Q.af;Q.fur=Q.af;Q.fy=Q.ast;Q.gl=Q.ast;Q.gu=Q.am;Q.ha=Q.af;Q.hi=Q.am;Q.hr=Q.bs;Q.hsb=Q.dsb;Q.hu=Q.af;Q.hy=Q.ff;Q.ia=Q.ast;Q.id=Q.dz;Q.ie=Q.ast;Q.ig=Q.dz;Q.ii=Q.dz;Q.it=Q.ca;Q.ja=Q.dz;Q.jgo=Q.af;Q.jv=Q.dz;Q.ka=Q.af;Q.kea=Q.dz;Q.kk=Q.af;Q.kl=Q.af;Q.km=Q.dz;Q.kn=Q.am;Q.ko=Q.dz;Q.kok=Q.am;Q.ks=Q.af;Q.ksh=Q.blo;Q.ku=Q.af;Q.ky=Q.af;Q.lb=Q.af;Q.lkt=Q.dz;Q.lld=Q.ca;Q.lo=Q.dz;Q.ml=Q.af;Q.mn=Q.af;Q.mr=Q.af;Q.ms=Q.dz;Q.my=Q.dz;Q.nb=Q.af;Q.ne=Q.af;Q.nl=Q.ast;Q.nn=Q.af;Q.no=Q.af;Q.nqo=Q.dz;Q.nso=Q.ak;Q.om=Q.af;Q.or=Q.af;Q.pa=Q.ak;Q.pcm=Q.am;Q.ps=Q.af;Q.rm=Q.af;Q.sah=Q.dz;Q.sc=Q.ast;Q.scn=Q.ca;Q.sd=Q.af;Q.sk=Q.cs;Q.so=Q.af;Q.sq=Q.af;Q.sr=Q.bs;Q.su=Q.dz;Q.sv=Q.ast;Q.sw=Q.ast;Q.syr=Q.af;Q.ta=Q.af;Q.te=Q.af;Q.th=Q.dz;Q.ti=Q.ak;Q.tk=Q.af;Q.tn=Q.af;Q.to=Q.dz;Q.tr=Q.af;Q.ug=Q.af;Q.uk=Q.ru;Q.ur=Q.ast;Q.uz=Q.af;Q.vec=Q.ca;Q.vi=Q.dz;Q.wae=Q.af;Q.wo=Q.dz;Q.xh=Q.af;Q.yi=Q.ast;Q.yo=Q.dz;Q.yue=Q.dz;Q.zh=Q.dz;Q.zu=Q.am;function JE(e){return e==="pt-PT"?e:L7(e)}var j7=/^([a-z0-9]+)/i;function L7(e){var t=e.match(j7);if(!t)throw new TypeError("Invalid locale: ".concat(e));return t[1]}function xc(e){"@babel/helpers - typeof";return xc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xc(e)}function P7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,B7(r.key),r)}}function $7(e,t,n){return t&&eT(e.prototype,t),n&&eT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function B7(e){var t=F7(e,"string");return xc(t)=="symbol"?t:t+""}function F7(e,t){if(xc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var qy=(function(){function e(t,n){P7(this,e);var r=e.supportedLocalesOf(t);if(r.length===0)throw new RangeError("Unsupported locale: "+t);if(n&&n.type!=="cardinal")throw new RangeError('Only "cardinal" "type" is supported');this.$=Q[JE(r[0])]}return $7(e,[{key:"select",value:function(n){return this.$(n)}}],[{key:"supportedLocalesOf",value:function(n){return typeof n=="string"&&(n=[n]),n.filter(function(r){return Q[JE(r)]})}}]),e})();function Cl(e){"@babel/helpers - typeof";return Cl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cl(e)}function tT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function nT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tT(Object(n),!0).forEach(function(r){U7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function U7(e,t,n){return(t=JN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rT(e,t){return V7(e)||G7(e,t)||H7(e,t)||q7()}function q7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
29
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H7(e,t){if(e){if(typeof e=="string")return iT(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?iT(e,t):void 0}}function iT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function G7(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],p=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(p=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);p=!0);}catch(h){f=!0,s=h}finally{try{if(!p&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw s}}return c}}function V7(e){if(Array.isArray(e))return e}function K7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z7(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,JN(r.key),r)}}function W7(e,t,n){return t&&Z7(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function JN(e){var t=Y7(e,"string");return Cl(t)=="symbol"?t:t+""}function Y7(e,t){if(Cl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var X7=["second","minute","hour","day","week","month","quarter","year"],Q7=["auto","always"],J7=["long","short","narrow"],eH=["lookup","best fit"],Ts=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};K7(this,e);var r=n.numeric,s=n.style,a=n.localeMatcher;if(this.numeric="always",this.style="long",this.localeMatcher="lookup",r!==void 0){if(Q7.indexOf(r)<0)throw new RangeError('Invalid "numeric" option: '.concat(r));this.numeric=r}if(s!==void 0){if(J7.indexOf(s)<0)throw new RangeError('Invalid "style" option: '.concat(s));this.style=s}if(a!==void 0){if(eH.indexOf(a)<0)throw new RangeError('Invalid "localeMatcher" option: '.concat(a));this.localeMatcher=a}if(typeof t=="string"&&(t=[t]),t.push(WN()),this.locale=e.supportedLocalesOf(t,{localeMatcher:this.localeMatcher})[0],!this.locale)throw new Error("Unsupported locale");qy.supportedLocalesOf(this.locale).length>0?this.pluralRules=new qy(this.locale):console.warn('"'.concat(this.locale,'" locale is not supported')),typeof Intl<"u"&&Intl.NumberFormat?(this.numberFormat=new Intl.NumberFormat(this.locale),this.numberingSystem=this.numberFormat.resolvedOptions().numberingSystem):this.numberingSystem="latn",this.locale=QN(this.locale,{localeMatcher:this.localeMatcher})}return W7(e,[{key:"format",value:function(){var n=sT(arguments),r=rT(n,2),s=r[0],a=r[1];return this.getRule(s,a).replace("{0}",this.formatNumber(Math.abs(s)))}},{key:"formatToParts",value:function(){var n=sT(arguments),r=rT(n,2),s=r[0],a=r[1],l=this.getRule(s,a),c=l.indexOf("{0}");if(c<0)return[{type:"literal",value:l}];var p=[];return c>0&&p.push({type:"literal",value:l.slice(0,c)}),p=p.concat(this.formatNumberToParts(Math.abs(s)).map(function(f){return nT(nT({},f),{},{unit:a})})),c+3<l.length-1&&p.push({type:"literal",value:l.slice(c+3)}),p}},{key:"getRule",value:function(n,r){var s=z7(this.locale)[this.style][r];if(typeof s=="string")return s;if(this.numeric==="auto"){if(n===-2||n===-1){var a=s["previous".concat(n===-1?"":"-"+Math.abs(n))];if(a)return a}else if(n===1||n===2){var l=s["next".concat(n===1?"":"-"+Math.abs(n))];if(l)return l}else if(n===0&&s.current)return s.current}var c=s[sH(n)?"past":"future"];if(typeof c=="string")return c;var p=this.pluralRules&&this.pluralRules.select(Math.abs(n))||"other";return c[p]||c.other}},{key:"formatNumber",value:function(n){return this.numberFormat?this.numberFormat.format(n):String(n)}},{key:"formatNumberToParts",value:function(n){return this.numberFormat&&this.numberFormat.formatToParts?this.numberFormat.formatToParts(n):[{type:"integer",value:this.formatNumber(n)}]}},{key:"resolvedOptions",value:function(){return{locale:this.locale,style:this.style,numeric:this.numeric,numberingSystem:this.numberingSystem}}}]),e})();Ts.supportedLocalesOf=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof e=="string")e=[e];else if(!Array.isArray(e))throw new TypeError('Invalid "locales" argument');return e.filter(function(n){return QN(n,t)})};Ts.addLocale=XN;Ts.addDefaultLocale=function(e){XN(e),YN(e.locale)};Ts.setDefaultLocale=YN;Ts.getDefaultLocale=WN;Ts.PluralRules=qy;var Gb='Invalid "unit" argument';function tH(e){if(Cl(e)==="symbol")throw new TypeError(Gb);if(typeof e!="string")throw new RangeError("".concat(Gb,": ").concat(e));if(e[e.length-1]==="s"&&(e=e.slice(0,e.length-1)),X7.indexOf(e)<0)throw new RangeError("".concat(Gb,": ").concat(e));return e}var nH='Invalid "number" argument';function rH(e){if(e=Number(e),Number.isFinite&&!Number.isFinite(e))throw new RangeError("".concat(nH,": ").concat(e));return e}function iH(e){return 1/e===-1/0}function sH(e){return e<0||e===0&&iH(e)}function sT(e){if(e.length<2)throw new TypeError('"unit" argument is required');return[rH(e[0]),tH(e[1])]}function ta(e){"@babel/helpers - typeof";return ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ta(e)}function oH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uH(r.key),r)}}function lH(e,t,n){return t&&aH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function uH(e){var t=cH(e,"string");return ta(t)=="symbol"?t:t+""}function cH(e,t){if(ta(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ta(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var oT=(function(){function e(){oH(this,e),this.cache={}}return lH(e,[{key:"get",value:function(){for(var n=this.cache,r=arguments.length,s=new Array(r),a=0;a<r;a++)s[a]=arguments[a];for(var l=0,c=s;l<c.length;l++){var p=c[l];if(ta(n)!=="object")return;n=n[p]}return n}},{key:"put",value:function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];for(var a=r.pop(),l=r.pop(),c=this.cache,p=0,f=r;p<f.length;p++){var h=f[p];ta(c[h])!=="object"&&(c[h]={}),c=c[h]}return c[l]=a}}]),e})();function Hy(e){"@babel/helpers - typeof";return Hy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hy(e)}function fH(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=dH(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
30
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dH(e,t){if(e){if(typeof e=="string")return aT(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?aT(e,t):void 0}}function aT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pH(e,t){for(var n=fH(e),r;!(r=n()).done;){var s=r.value;if(t(s))return s;for(var a=s.split("-");a.length>1;)if(a.pop(),s=a.join("-"),t(s))return s}throw new Error("No locale data has been registered for any of the locales: ".concat(e.join(", ")))}function hH(){var e=(typeof Intl>"u"?"undefined":Hy(Intl))==="object";return e&&typeof Intl.DateTimeFormat=="function"}function Gy(e){"@babel/helpers - typeof";return Gy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gy(e)}function mH(e){return bH(e)&&(Array.isArray(e.steps)||Array.isArray(e.gradation)||Array.isArray(e.flavour)||typeof e.flavour=="string"||Array.isArray(e.labels)||typeof e.labels=="string"||Array.isArray(e.units)||typeof e.custom=="function")}var gH={}.constructor;function bH(e){return Gy(e)!==void 0&&e!==null&&e.constructor===gH}var bs=60,eh=60*bs,Yo=24*eh,Vy=7*Yo,Ky=30.44*Yo,eO=146097/400*Yo;function pl(e){switch(e){case"second":return 1;case"minute":return bs;case"hour":return eh;case"day":return Yo;case"week":return Vy;case"month":return Ky;case"year":return eO}}function tO(e){return e.factor!==void 0?e.factor:pl(e.unit||e.formatAs)||1}function Sc(e){return e==="floor"?Math.floor:Math.round}function Nk(e){return e==="floor"?1:.5}function Zy(e){"@babel/helpers - typeof";return Zy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zy(e)}function nO(e,t){var n=t.prevStep,r=t.timestamp,s=t.now,a=t.future,l=t.round,c;return n&&(n.id||n.unit)&&(c=e["threshold_for_".concat(n.id||n.unit)]),c===void 0&&e.threshold!==void 0&&(c=e.threshold,typeof c=="function"&&(c=c(s,a))),c===void 0&&(c=e.minTime),Zy(c)==="object"&&(n&&n.id&&c[n.id]!==void 0?c=c[n.id]:c=c.default),typeof c=="function"&&(c=c(r,{future:a,getMinTimeForUnit:function(f,h){return lT(f,h||n&&n.formatAs,{round:l})}})),c===void 0&&e.test&&(e.test(r,{now:s,future:a})?c=0:c=9007199254740991),c===void 0&&(n?e.formatAs&&n.formatAs&&(c=lT(e.formatAs,n.formatAs,{round:l})):c=0),c===void 0&&console.warn("[javascript-time-ago] A step should specify `minTime`:\n"+JSON.stringify(e,null,2)),c}function lT(e,t,n){var r=n.round,s=pl(e),a=pl(t==="now"?e:t);if(s!==void 0&&a!==void 0)return s-a*(1-Nk(r))}function wc(e){"@babel/helpers - typeof";return wc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wc(e)}function uT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function yH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uT(Object(n),!0).forEach(function(r){vH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vH(e,t,n){return(t=kH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kH(e){var t=xH(e,"string");return wc(t)=="symbol"?t:t+""}function xH(e,t){if(wc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function SH(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.units;e=EH(e,l);var c=wH(e,t,{now:r,future:s,round:a});{if(c){var p=e[e.indexOf(c)-1],f=e[e.indexOf(c)+1];return[p,c,f]}return[void 0,void 0,e[0]]}}function wH(e,t,n){var r=n.now,s=n.future,a=n.round;if(e.length!==0){var l=rO(e,t,{now:r,future:s||t<0,round:a});if(l!==-1){var c=e[l];if(c.granularity){var p=Sc(a)(Math.abs(t)/tO(c)/c.granularity)*c.granularity;if(p===0&&l>0)return e[l-1]}return c}}}function rO(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=nO(e[r],yH({prevStep:e[r-1],timestamp:n.now-t*1e3},n));return s===void 0||Math.abs(t)<s?r-1:r===e.length-1?r:rO(e,t,n,r+1)}function EH(e,t){return e.filter(function(n){var r=n.unit,s=n.formatAs;return r=r||s,r?t.indexOf(r)>=0:!0})}function TH(e,t,n){var r=n.now,s=n.round;if(pl(e)){var a=pl(e)*1e3,l=t>r,c=Math.abs(t-r),p=Sc(s)(c/a)*a;return l?p>0?c-p+RH(s,a):c-p+1:-(c-p)+_H(s,a)}}function _H(e,t){return Nk(e)*t}function RH(e,t){return(1-Nk(e))*t+1}var CH=365*24*60*60*1e3,iO=1e3*CH;function AH(e,t,n){var r=n.prevStep,s=n.nextStep,a=n.now,l=n.future,c=n.round,p=e.getTime?e.getTime():e,f=function(x){return TH(x,p,{now:a,round:c})},h=OH(l?t:s,p,{future:l,now:a,round:c,prevStep:l?r:t});if(h!==void 0){var m;if(t&&(t.getTimeToNextUpdate&&(m=t.getTimeToNextUpdate(p,{getTimeToNextUpdateForUnit:f,getRoundFunction:Sc,now:a,future:l,round:c})),m===void 0)){var g=t.unit||t.formatAs;g&&(m=f(g))}return m===void 0?h:Math.min(m,h)}}function NH(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep,c=nO(e,{timestamp:t,now:r,future:s,round:a,prevStep:l});if(c!==void 0)return s?t-c*1e3+1:c===0&&t===r?iO:t+c*1e3}function OH(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep;if(e){var c=NH(e,t,{now:r,future:s,round:a,prevStep:l});return c===void 0?void 0:c-r}else return s?t-r+1:iO}var sO={};function ol(e){return sO[e]}function oO(e){if(!e)throw new Error("[javascript-time-ago] No locale data passed.");sO[e.locale]=e}const MH=[{formatAs:"now"},{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"}],Wy={steps:MH,labels:"long"};function Ec(e){"@babel/helpers - typeof";return Ec=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ec(e)}function cT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function fT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cT(Object(n),!0).forEach(function(r){IH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IH(e,t,n){return(t=DH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DH(e){var t=zH(e,"string");return Ec(t)=="symbol"?t:t+""}function zH(e,t){if(Ec(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ec(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const Yy=fT(fT({},Wy),{},{steps:Wy.steps.filter(function(e){return e.formatAs!=="second"})}),aO=[{factor:1,unit:"now"},{threshold:1,threshold_for_now:45.5,factor:1,unit:"second"},{threshold:45.5,factor:bs,unit:"minute"},{threshold:2.5*bs,granularity:5,factor:bs,unit:"minute"},{threshold:22.5*bs,factor:.5*eh,unit:"half-hour"},{threshold:42.5*bs,threshold_for_minute:52.5*bs,factor:eh,unit:"hour"},{threshold:20.5/24*Yo,factor:Yo,unit:"day"},{threshold:5.5*Yo,factor:Vy,unit:"week"},{threshold:3.5*Vy,factor:Ky,unit:"month"},{threshold:10.5*Ky,factor:eO,unit:"year"}],dT={gradation:aO,flavour:"long",units:["now","minute","hour","day","week","month","year"]},jH={gradation:aO,flavour:"long-time",units:["now","minute","hour","day","week","month","year"]};function lO(e){return e instanceof Date?e:new Date(e)}var Xy=[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"}],Li={},LH={minTime:function(t,n){n.future;var r=n.getMinTimeForUnit;return r("day")},format:function(t,n){return Li[n]||(Li[n]={}),Li[n].dayMonth||(Li[n].dayMonth=new Intl.DateTimeFormat(n,{month:"short",day:"numeric"})),Li[n].dayMonth.format(lO(t))}},PH={minTime:function(t,n){var r=n.future;if(r){var s=new Date(new Date(t).getFullYear(),0).getTime()-1;return(t-s)/1e3}else{var a=new Date(new Date(t).getFullYear()+1,0).getTime();return(a-t)/1e3}},format:function(t,n){return Li[n]||(Li[n]={}),Li[n].dayMonthYear||(Li[n].dayMonthYear=new Intl.DateTimeFormat(n,{year:"numeric",month:"short",day:"numeric"})),Li[n].dayMonthYear.format(lO(t))}};hH()?Xy.push(LH,PH):Xy.push({formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"});const na={steps:Xy,labels:["mini","short-time","narrow","short"]};function Tc(e){"@babel/helpers - typeof";return Tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tc(e)}function pT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function hT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pT(Object(n),!0).forEach(function(r){$H(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $H(e,t,n){return(t=BH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BH(e){var t=FH(e,"string");return Tc(t)=="symbol"?t:t+""}function FH(e,t){if(Tc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const UH=hT(hT({},na),{},{steps:[{formatAs:"now"}].concat(na.steps)});function _c(e){"@babel/helpers - typeof";return _c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_c(e)}function mT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function gT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mT(Object(n),!0).forEach(function(r){qH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qH(e,t,n){return(t=HH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HH(e){var t=GH(e,"string");return _c(t)=="symbol"?t:t+""}function GH(e,t){if(_c(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_c(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const Qy=gT(gT({},na),{},{steps:na.steps.filter(function(e){return e.formatAs!=="second"})});function Rc(e){"@babel/helpers - typeof";return Rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rc(e)}function bT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function yT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bT(Object(n),!0).forEach(function(r){VH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VH(e,t,n){return(t=KH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KH(e){var t=ZH(e,"string");return Rc(t)=="symbol"?t:t+""}function ZH(e,t){if(Rc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const WH=yT(yT({},Qy),{},{steps:[{formatAs:"now"}].concat(Qy.steps)});function Cc(e){"@babel/helpers - typeof";return Cc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cc(e)}function vT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function tp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vT(Object(n),!0).forEach(function(r){YH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function YH(e,t,n){return(t=XH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XH(e){var t=QH(e,"string");return Cc(t)=="symbol"?t:t+""}function QH(e,t){if(Cc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const JH=tp(tp({},na),{},{steps:na.steps.filter(function(e){return e.formatAs!=="second"}).map(function(e){return e.formatAs==="minute"?tp(tp({},e),{},{minTime:bs}):e})}),Ac={steps:[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"month"},{formatAs:"year"}],labels:["mini","short-time","narrow","short"]};function Nc(e){"@babel/helpers - typeof";return Nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nc(e)}function kT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function xT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kT(Object(n),!0).forEach(function(r){eG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eG(e,t,n){return(t=tG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tG(e){var t=nG(e,"string");return Nc(t)=="symbol"?t:t+""}function nG(e,t){if(Nc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const rG=xT(xT({},Ac),{},{steps:[{formatAs:"now"}].concat(Ac.steps)});function Oc(e){"@babel/helpers - typeof";return Oc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oc(e)}function ST(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function wT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ST(Object(n),!0).forEach(function(r){iG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ST(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iG(e,t,n){return(t=sG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sG(e){var t=oG(e,"string");return Oc(t)=="symbol"?t:t+""}function oG(e,t){if(Oc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Oc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const Jy=wT(wT({},Ac),{},{steps:Ac.steps.filter(function(e){return e.formatAs!=="second"})});function Mc(e){"@babel/helpers - typeof";return Mc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mc(e)}function ET(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function TT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ET(Object(n),!0).forEach(function(r){aG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ET(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aG(e,t,n){return(t=lG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lG(e){var t=uG(e,"string");return Mc(t)=="symbol"?t:t+""}function uG(e,t){if(Mc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const cG=TT(TT({},Jy),{},{steps:[{formatAs:"now"}].concat(Jy.steps)});function fG(e){switch(e){case"default":case"round":return Wy;case"round-minute":return Yy;case"approximate":return dT;case"time":case"approximate-time":return jH;case"mini":return Ac;case"mini-now":return rG;case"mini-minute":return Jy;case"mini-minute-now":return cG;case"twitter":return na;case"twitter-now":return UH;case"twitter-minute":return Qy;case"twitter-minute-now":return WH;case"twitter-first-minute":return JH;default:return dT}}function ra(e){"@babel/helpers - typeof";return ra=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ra(e)}function dG(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=uO(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
31
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pG(e,t){return gG(e)||mG(e,t)||uO(e,t)||hG()}function hG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
32
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uO(e,t){if(e){if(typeof e=="string")return _T(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_T(e,t):void 0}}function _T(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mG(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],p=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(p=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);p=!0);}catch(h){f=!0,s=h}finally{try{if(!p&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw s}}return c}}function gG(e){if(Array.isArray(e))return e}function bG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kG(r.key),r)}}function vG(e,t,n){return t&&yG(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kG(e){var t=xG(e,"string");return ra(t)=="symbol"?t:t+""}function xG(e,t){if(ra(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ra(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var jr=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.polyfill;bG(this,e),typeof t=="string"&&(t=[t]),this.locale=pH(t.concat(e.getDefaultLocale()),ol),typeof Intl<"u"&&Intl.NumberFormat&&(this.numberFormat=new Intl.NumberFormat(this.locale)),r===!1?(this.IntlRelativeTimeFormat=Intl.RelativeTimeFormat,this.IntlPluralRules=Intl.PluralRules):(this.IntlRelativeTimeFormat=Ts,this.IntlPluralRules=Ts.PluralRules),this.relativeTimeFormatCache=new oT,this.pluralRulesCache=new oT}return vG(e,[{key:"format",value:function(n,r,s){var a=this;s||(r&&!_G(r)?(s=r,r=void 0):s={}),r||(r=Yy),typeof r=="string"&&(r=fG(r));var l=SG(n),c=this.getLabels(r.flavour||r.labels),p=c.labels,f=c.labelsType,h=s.round||r.round,m,g=Date.now();r.now!==void 0&&(m=r.now),m===void 0&&s.now!==void 0&&(m=s.now),m===void 0&&(m=g);var b=function(N){var I=N.now,F=(I-l)/1e3,V=s.future||F<0,j=TG(p,ol(a.locale).now,ol(a.locale).long,V);if(r.custom){var q=r.custom({now:I,date:new Date(l),time:l,elapsed:F,locale:a.locale});if(q!==void 0)return{getText:function(){return q},getTextRefreshDelay:function(){throw new Error('`getTimeToNextUpdate: true` feature is not supported by legacy "styles" that have a `custom` function')}}}var Z=EG(r.units,p,j),B=SH(r.gradation||r.steps||Yy.steps,F,{now:I,units:Z,round:h,future:V}),z=pG(B,3),L=z[0],H=z[1],U=z[2],P=function(){return a.formatDateForStep(l,H,F,{labels:p,labelsType:f,nowLabel:j,now:I,future:V,round:h})||""},Y=function(){var $=AH(l,H,{nextStep:U,prevStep:L,now:I,future:V,round:h});if(typeof $=="number")return s.getTimeToNextUpdateUncapped?$:fO($)};return{getText:P,getTextRefreshDelay:Y}},x=b({now:m}),w=x.getText,_=x.getTextRefreshDelay;if(s.getTimeToNextUpdate)return[w(),_()];if(s.refresh){var E=6e4,R,T=function A(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:E;R=RG(function(){var I=b({now:m+(Date.now()-g)}),F=I.getText,V=I.getTextRefreshDelay;s.refresh(F()),A(V())},N)};T(_());var C=function(){clearTimeout(R)};return[w(),C]}return w()}},{key:"formatDateForStep",value:function(n,r,s,a){var l=this,c=a.labels,p=a.labelsType,f=a.nowLabel,h=a.now,m=a.future,g=a.round;if(r){if(r.format)return r.format(n,this.locale,{formatAs:function(E,R){return l.formatValue(R,E,{labels:c,future:m})},now:h,future:m});var b=r.unit||r.formatAs;if(!b)throw new Error("[javascript-time-ago] Each step must define either `formatAs` or `format()`. Step: ".concat(JSON.stringify(r)));if(b==="now")return f;var x=Math.abs(s)/tO(r);r.granularity&&(x=Sc(g)(x/r.granularity)*r.granularity);var w=-1*Math.sign(s)*Sc(g)(x);switch(w===0&&(m?w=0:w=-0),p){case"long":case"short":case"narrow":return this.getFormatter(p).format(w,b);default:return this.formatValue(w,b,{labels:c,future:m})}}}},{key:"formatValue",value:function(n,r,s){var a=s.labels,l=s.future;return this.getFormattingRule(a,r,n,{future:l}).replace("{0}",this.formatNumber(Math.abs(n)))}},{key:"getFormattingRule",value:function(n,r,s,a){var l=a.future;if(this.locale,n=n[r],typeof n=="string")return n;var c=s===0?l?"future":"past":s<0?"past":"future",p=n[c]||n;if(typeof p=="string")return p;var f=this.getPluralRules().select(Math.abs(s));return p[f]||p.other}},{key:"formatNumber",value:function(n){return this.numberFormat?this.numberFormat.format(n):String(n)}},{key:"getFormatter",value:function(n){return this.relativeTimeFormatCache.get(this.locale,n)||this.relativeTimeFormatCache.put(this.locale,n,new this.IntlRelativeTimeFormat(this.locale,{style:n}))}},{key:"getPluralRules",value:function(){return this.pluralRulesCache.get(this.locale)||this.pluralRulesCache.put(this.locale,new this.IntlPluralRules(this.locale))}},{key:"getLabels",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];typeof n=="string"&&(n=[n]),n=n.map(function(c){switch(c){case"tiny":case"mini-time":return"mini";default:return c}}),n=n.concat("long");for(var r=ol(this.locale),s=dG(n),a;!(a=s()).done;){var l=a.value;if(r[l])return{labelsType:l,labels:r[l]}}}}]),e})(),cO="en";jr.getDefaultLocale=function(){return cO};jr.setDefaultLocale=function(e){ev=!0,cO=e};jr.addDefaultLocale=function(e){ev&&jr.getDefaultLocale()!==e.locale&&console.warn(`[javascript-time-ago] You're adding "`.concat(e.locale,'" as the default locale but you have already added "').concat(jr.getDefaultLocale(),'" as the default locale. "').concat(e.locale,'" is the default locale now.')),ev=!0,jr.addLocale(e),jr.setDefaultLocale(e.locale)};var ev=!1;jr.addLocale=function(e){oO(e),Ts.addLocale(e)};jr.locale=jr.addLocale;jr.addLabels=function(e,t,n){var r=ol(e);r||(oO({locale:e}),r=ol(e)),r[t]=n};function SG(e){if(e.constructor===Date||wG(e))return e.getTime();if(typeof e=="number")return e;throw new Error("Unsupported relative time formatter input: ".concat(ra(e),", ").concat(e))}function wG(e){return ra(e)==="object"&&typeof e.getTime=="function"}function EG(e,t,n){var r=Object.keys(t);return n&&r.push("now"),e&&(r=e.filter(function(s){return s==="now"||r.indexOf(s)>=0})),r}function TG(e,t,n,r){var s=e.now||t&&t.now;if(s)return typeof s=="string"?s:r?s.future:s.past;if(n&&n.second&&n.second.current)return n.second.current}function _G(e){return typeof e=="string"||mH(e)}function RG(e,t){return setTimeout(e,fO(t))}function fO(e){return Math.min(e,CG)}var CG=2147483647;const dO={locale:"en",long:{year:{previous:"last year",current:"this year",next:"next year",past:{one:"{0} year ago",other:"{0} years ago"},future:{one:"in {0} year",other:"in {0} years"}},quarter:{previous:"last quarter",current:"this quarter",next:"next quarter",past:{one:"{0} quarter ago",other:"{0} quarters ago"},future:{one:"in {0} quarter",other:"in {0} quarters"}},month:{previous:"last month",current:"this month",next:"next month",past:{one:"{0} month ago",other:"{0} months ago"},future:{one:"in {0} month",other:"in {0} months"}},week:{previous:"last week",current:"this week",next:"next week",past:{one:"{0} week ago",other:"{0} weeks ago"},future:{one:"in {0} week",other:"in {0} weeks"}},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:{one:"{0} hour ago",other:"{0} hours ago"},future:{one:"in {0} hour",other:"in {0} hours"}},minute:{current:"this minute",past:{one:"{0} minute ago",other:"{0} minutes ago"},future:{one:"in {0} minute",other:"in {0} minutes"}},second:{current:"now",past:{one:"{0} second ago",other:"{0} seconds ago"},future:{one:"in {0} second",other:"in {0} seconds"}}},short:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0} yr. ago",future:"in {0} yr."},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:{one:"{0} qtr. ago",other:"{0} qtrs. ago"},future:{one:"in {0} qtr.",other:"in {0} qtrs."}},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0} mo. ago",future:"in {0} mo."},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0} wk. ago",future:"in {0} wk."},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:"{0} hr. ago",future:"in {0} hr."},minute:{current:"this minute",past:"{0} min. ago",future:"in {0} min."},second:{current:"now",past:"{0} sec. ago",future:"in {0} sec."}},narrow:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0}y ago",future:"in {0}y"},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:"{0}q ago",future:"in {0}q"},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0}mo ago",future:"in {0}mo"},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0}w ago",future:"in {0}w"},day:{previous:"yesterday",current:"today",next:"tomorrow",past:"{0}d ago",future:"in {0}d"},hour:{current:"this hour",past:"{0}h ago",future:"in {0}h"},minute:{current:"this minute",past:"{0}m ago",future:"in {0}m"},second:{current:"now",past:"{0}s ago",future:"in {0}s"}},now:{now:{current:"now",future:"in a moment",past:"just now"}},mini:{year:"{0}yr",month:"{0}mo",week:"{0}wk",day:"{0}d",hour:"{0}h",minute:"{0}m",second:"{0}s",now:"now"},"short-time":{year:"{0} yr.",month:"{0} mo.",week:"{0} wk.",day:{one:"{0} day",other:"{0} days"},hour:"{0} hr.",minute:"{0} min.",second:"{0} sec."},"long-time":{year:{one:"{0} year",other:"{0} years"},month:{one:"{0} month",other:"{0} months"},week:{one:"{0} week",other:"{0} weeks"},day:{one:"{0} day",other:"{0} days"},hour:{one:"{0} hour",other:"{0} hours"},minute:{one:"{0} minute",other:"{0} minutes"},second:{one:"{0} second",other:"{0} seconds"}}};jr.addLocale(dO);jr.addDefaultLocale(dO);const AG=new jr("en-US");function sr(e,t){let n=typeof e=="string"?e:JSON.stringify(e);return n===void 0&&(n=""),n.length>t?`${n.slice(0,t-1)}…`:n}function ys(e,t){const n=String(e??"").replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t-1)}…`:n}function NG(e,t){const n=String(e??"").replace(/\s+/g," ").trim();if(n.length<=t)return n;const r=t-1,s=Math.max(1,Math.floor(r*.35)),a=Math.max(1,r-s);return`${n.slice(0,s)}…${n.slice(n.length-a)}`}function hl(e){if(!e)return null;const t=Date.parse(e);return Number.isNaN(t)?null:t}function bi(e){return e==null||!Number.isFinite(e)?"—":D7(e)}function Ok(e){const t=Math.ceil(e/1e3);if(e<1e3)return"1s";if(t<60)return`${t}s`;if(t>=3600){const s=Math.floor(t/3600),a=Math.floor(t%3600/60);return a>0?`${s}h ${a}m`:`${s}h`}const n=Math.floor(t/60),r=t%60;return r>0?`${n}m ${r}s`:`${n}m`}const OG=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3,hour12:!1});function RT(e){return e==null||!Number.isFinite(e)?"—":OG.format(e)}function Gh(e,t=Date.now()){const n=hl(e);return n===null?null:AG.format(Math.min(n,t),"mini",{now:t})}function Al(e,t=8e3){if(e==null)return"";let n;try{n=typeof e=="string"?e:JSON.stringify(e,null,2)}catch{n=String(e)}return n.length>t?`${n.slice(0,t-1)}…`:n}const MG=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1});function th(e){return e==null||!Number.isFinite(e)?"0":MG.format(e)}function tv(e){const t=String(e||"").trim();if(!t)return[];if(t.charAt(0)==="[")try{const r=JSON.parse(t);return Array.isArray(r)?r:[]}catch{return[]}const n=[];for(const r of t.split(/\n/)){const s=r.trim();if(s)try{n.push(JSON.parse(s))}catch{}}return n}function IG(e){try{const t=new URL(e),n=t.pathname.split("/").filter(Boolean);return t.hostname==="github.com"&&n.length>=4&&n[2]==="pull"||t.hostname==="review.cursor.com"&&n[0]==="pr"?!0:(t.hostname==="origin.cursor.com"||t.hostname.endsWith(".origin-staging.com")||t.hostname==="localhost")&&n.length>=4&&n[2]==="github"}catch{return!1}}function pO(e){return typeof e=="string"?e:e&&typeof e=="object"&&typeof e.id=="string"?e.id:e?JSON.stringify(e):""}const CT=e=>{let t;const n=new Set,r=(f,h)=>{const m=typeof f=="function"?f(t):f;if(!Object.is(m,t)){const g=t;t=h??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(b=>b(t,g))}},s=()=>t,c={setState:r,getState:s,getInitialState:()=>p,subscribe:f=>(n.add(f),()=>n.delete(f))},p=t=e(r,s,c);return c},DG=(e=>e?CT(e):CT),zG=e=>e;function jG(e,t=zG){const n=Vu.useSyncExternalStore(e.subscribe,Vu.useCallback(()=>t(e.getState()),[e,t]),Vu.useCallback(()=>t(e.getInitialState()),[e,t]));return Vu.useDebugValue(n),n}const LG=/^\/internal\/agent-serve\/agents\/(asd_[0-9a-f]{32})\/engine(?:\/|$)/,PG=/^asd-([0-9a-f]{32})\.agents\.cursorusercontent\.com$/;function $G(e=window.location.pathname,t=window.location.hostname){const n=PG.exec(t.toLowerCase());if(n!==null)return{publicId:`asd_${n[1]}`,mountPath:""};const r=LG.exec(e);if(r===null)return null;const s=r[1];return{publicId:s,mountPath:`/internal/agent-serve/agents/${s}/engine`}}function BG(e=window.location.search){return new URLSearchParams(e).get("embed")==="1"}function hO(e=window.location,t=window.history){const n=e.hash.startsWith("#")?e.hash.slice(1):e.hash;if(n==="")return"";const s=new URLSearchParams(n).get("access")?.trim()??"";return s===""?"":(t.replaceState(null,"",`${e.pathname}${e.search}`),s)}function FG(e,t=window){const n=()=>{const r=hO(t.location,t.history);r!==""&&e(r)};return t.addEventListener("hashchange",n),()=>t.removeEventListener("hashchange",n)}class UG{constructor(t,n,r=()=>""){this.basePath=t,this.getToken=n,this.getAliasToken=r}url(t){return(this.basePath||"")+t}headers(t){const n={...t},r=this.getToken().trim();r&&(n.authorization=`Bearer ${r}`);const s=this.getAliasToken().trim();return s&&(n["x-agent-alias-token"]=s),n}async request(t,n={}){const r=await fetch(this.url(t),{...n,headers:this.headers(n.headers)}),s=await r.text();let a=null;try{a=s?JSON.parse(s):null}catch{a=null}return{status:r.status,ok:r.ok,body:a}}postJson(t,n){return this.request(t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)})}health(){return this.request("/v1/health")}info(){return this.request("/v1/info")}logs(t=-1){const n=t<0?"":`?after=${t}`;return this.request(`/v1/logs${n}`)}meta(){return this.request("/v1/meta")}sessions(){return this.request("/v1/sessions")}abs(){return this.request("/v1/abs")}agents(){return this.request("/v1/agents")}createSession(t){return this.postJson("/v1/session",{message:t})}followUp(t,n,r){return this.postJson(`/v1/session/${encodeURIComponent(t)}`,{message:n,continuationToken:r})}stopSession(t){return this.postJson(`/v1/session/${encodeURIComponent(t)}/stop`,{})}resolveApproval(t,n,r){return this.postJson(`/v1/session/${encodeURIComponent(t)}/approvals/${encodeURIComponent(n)}`,{decision:r})}dispatchSchedule(t){return this.request(`/v1/dev/schedules/${encodeURIComponent(t)}`,{method:"POST"})}evalsList(){return this.request("/v1/dev/evals")}evalsListRuns(){return this.request("/v1/dev/evals/runs")}evalsStartRun(t={}){return this.postJson("/v1/dev/evals/runs",t)}evalsRunStatus(t){return this.request(`/v1/dev/evals/runs/${encodeURIComponent(t)}`)}evalsCancelRun(t){return this.postJson(`/v1/dev/evals/runs/${encodeURIComponent(t)}/cancel`,{})}reviewStart(t){return this.postJson("/v1/channels/review",{prUrl:t})}reviewPoll(t){return this.request(`/v1/channels/review/${encodeURIComponent(t)}`)}asrReviewersProgress(t){return this.request(`/v1/channels/asr-progress/${encodeURIComponent(t)}`)}channelRequest(t,n,r={}){let s=n;if(r.query!==void 0){const l=new URLSearchParams;for(const[p,f]of Object.entries(r.query))f!==""&&l.set(p,f);const c=l.toString();c!==""&&(s=`${n}?${c}`)}const a={method:t.toUpperCase()};return r.body!==void 0&&(a.headers={"content-type":"application/json"},a.body=JSON.stringify(r.body)),this.request(s,a)}streamFetch(t,n,r){return fetch(this.url(`/v1/session/${encodeURIComponent(t)}/stream?startIndex=${n}`),{signal:r,headers:this.headers()})}eventsText(t){return fetch(this.url(`/v1/session/${encodeURIComponent(t)}/events`),{headers:this.headers()})}eventsDownloadUrl(t){return this.url(`/v1/session/${encodeURIComponent(t)}/events`)}}const qG=["chat","trace","raw","logs","evals","abs"],xp="cursor-playground",mO=["https://cursor.com","https://www.cursor.com","https://prod.cursor.com","https://staging.cursor.com","http://localhost:4000","https://localhost:4000"];function HG(e){return typeof e=="string"&&qG.includes(e)}function GG(e,t){if(!mO.includes(t)||typeof e!="object"||e===null)return null;const n=e;return n.source!==xp?null:n.type==="hello"?{source:xp,type:"hello"}:n.type==="set-view"&&HG(n.view)?{source:xp,type:"set-view",view:n.view}:null}function VG(e){const t=n=>{const r=GG(n.data,n.origin);r!==null&&e(r)};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)}function KG(e=document.referrer,t=window.parent!==window){if(!t||e==="")return null;let n;try{n=new URL(e).origin}catch{return null}return mO.includes(n)?n:null}function AT(e,t=KG()){if(t===null)return;const n={source:xp,type:"state",view:e};window.parent.postMessage(n,t)}function gO(e){return e!=="http"}function ZG(e){if(!e.seeded)return{openSidebar:!1,selectSessionId:null};const t=e.sessions.filter(r=>!e.knownIds.has(r.sessionId)&&gO(r.channelId)&&r.running===!0);if(t.length===0)return{openSidebar:!1,selectSessionId:null};const n=t[0];return n===void 0?{openSidebar:!1,selectSessionId:null}:{openSidebar:e.embedded&&!e.sidebarOpen,selectSessionId:e.currentSessionId===null?n.sessionId:null}}function WG(e){return e.filter(t=>gO(t.channelId)&&t.running===!0).length}const YG=new Set(["github","slack"]);function XG(e){return/^\s*\//.test(e)}function Mk(e){const t=[];for(const n of e??[])if(n.id!=="http"&&!(n.kind!==void 0&&YG.has(n.kind)))for(const r of n.routes??[]){const s=nV(n.id,r.path);if(s===null)continue;const a={name:s,channelId:n.id,method:r.method.toUpperCase(),url:r.url,path:r.path};r.description!==void 0&&(a.description=r.description),r.bodySchema!==void 0&&(a.bodySchema=r.bodySchema),r.querySchema!==void 0&&(a.querySchema=r.querySchema),t.push(a)}return t.sort((n,r)=>{const s=n.name.localeCompare(r.name);return s!==0?s:nh(n.method)-nh(r.method)}),t}function bO(e){const t=new Set,n=[];for(const r of e)t.has(r.name)||(t.add(r.name),n.push(r.name));return n}function QG(e,t){const n=e.trim().toLowerCase();if(!n.startsWith("/"))return[];const r=new Set,s=[];for(const a of t)a.name.toLowerCase().startsWith(n)&&(r.has(a.name)||(r.add(a.name),s.push(a)));return s}function JG(e){if(e.length===0)return"No channel slash commands on this agent. Send a normal message to chat on http.";const t=["Channel slash commands (from `/v1/info` routes):",""],n=new Map;for(const r of e){const s=n.get(r.name)??[];s.push(r),n.set(r.name,s)}for(const[r,s]of n){const a=s.map(f=>f.method).join("|"),l=s.find(f=>f.description)?.description??"",c=Ik(s[0]),p=yO(c);t.push(p?`- \`${r}\` (${a}) — ${l}${l?" ":""}${p}`:`- \`${r}\` (${a})${l?` — ${l}`:""}`)}return t.push("","Args: JSON object, `key=value` flags, or a positional value for the first required string field.","Example: `/drive https://github.com/org/repo/pull/1 mode=suggest`"),t.join(`
|
|
33
|
-
`)}function eV(e,t){const n=e.trim(),r=/^(\/[^\s]+)(?:\s+([\s\S]*))?$/.exec(n);if(r===null)return{ok:!1,error:"Expected `/command` optionally followed by args."};const s=r[1],a=(r[2]??"").trim(),l=t.filter(m=>m.name===s);if(l.length===0){const m=bO(t);return{ok:!1,error:m.length===0?`Unknown command \`${s}\`. No channel commands on this agent.`:`Unknown command \`${s}\`. Try ${m.map(g=>`\`${g}\``).join(", ")} or \`/help\`.`,commandName:s}}const c=tV(l,a),p=Ik(c),f=sV(a,p);if(!f.ok)return{ok:!1,error:f.error,commandName:s};const h=rV(p,f.value);return h.length>0?{ok:!1,error:`Missing required field${h.length>1?"s":""}: ${h.join(", ")}. ${yO(p)||""}`.trim(),commandName:s}:c.method==="GET"||c.method==="HEAD"?{ok:!0,command:c,query:lV(f.value)}:{ok:!0,command:c,body:f.value,query:c.querySchema!==void 0?uV(f.value,c.querySchema):void 0}}function tV(e,t){if(e.length===1)return e[0];const n=[...e].sort((a,l)=>nh(a.method)-nh(l.method)),r=vO(t);if(r!==null){let a=null,l=-1;for(const c of n){const p=Ik(c),f=iV(p,r);f>l&&(l=f,a=c)}if(a!==null&&l>0)return a}const s=n.find(a=>a.method==="GET");return s!==void 0?s:n[0]}function nV(e,t){const n=e.trim();if(n==="")return null;const r=t===""||t==="/"?"":t.startsWith("/")?t.replace(/\/+$/,""):`/${t.replace(/\/+$/,"")}`;return r.includes(":")?null:`/${n}${r}`}function nh(e){switch(e.toUpperCase()){case"GET":return 0;case"POST":return 1;case"PUT":return 2;case"PATCH":return 3;case"DELETE":return 4;default:return 9}}function Ik(e){return e.method==="GET"||e.method==="HEAD"?e.querySchema:e.bodySchema??e.querySchema}function yO(e){if(e===void 0)return"";const t=Vh(e);if(t===void 0)return"";const n=Kh(e),r=[];for(const s of n)t[s]?.type==="string"?r.push(`<${s}>`):r.push(`${s}=…`);for(const s of Object.keys(t))n.has(s)||r.push(`[${s}=…]`);return r.length>0?`Usage: ${r.join(" ")}`:""}function Vh(e){if(e===void 0||e.type!=="object")return;const t=e.properties;if(!(typeof t!="object"||t===null||Array.isArray(t)))return t}function Kh(e){return e===void 0||!Array.isArray(e.required)?new Set:new Set(e.required.filter(t=>typeof t=="string"))}function rV(e,t){const n=Kh(e),r=[];for(const s of n){const a=t[s];(a==null||typeof a=="string"&&a.trim()==="")&&r.push(s)}return r}function iV(e,t){const n=Vh(e);if(n===void 0)return 0;let r=0;for(const s of Object.keys(t))s in n?r+=2:r-=1;for(const s of Kh(e))s in t&&(r+=3);return r}function vO(e){const t=e.trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);if(typeof n=="object"&&n!==null&&!Array.isArray(n))return n}catch{return null}return null}function sV(e,t){if(e==="")return{ok:!0,value:{}};const n=vO(e);if(n!==null)return{ok:!0,value:n};if(e.startsWith("{"))return{ok:!1,error:"Args look like JSON but failed to parse."};const r=Vh(t),s={},a=[];for(const l of oV(e)){const c=l.indexOf("=");if(c>0){const p=l.slice(0,c),f=l.slice(c+1);s[p]=aV(f,r?.[p])}else a.push(l)}if(a.length>0){const l=[...Kh(t)],c=(l.length>0?l:Object.keys(r??{})).filter(f=>{const h=r?.[f];return h===void 0||h.type==="string"||h.type===void 0}),p=c.find(f=>s[f]===void 0)??c[0];if(p===void 0)return{ok:!1,error:`Unexpected positional args: ${a.join(" ")}`};a.length===1?s[p]=a[0]:s[p]=a.join(" ")}return{ok:!0,value:s}}function oV(e){const t=[];let n="",r=null;for(let s=0;s<e.length;s++){const a=e[s];if(r!==null){a===r?r=null:n+=a;continue}if(a==='"'||a==="'"){r=a;continue}if(/\s/.test(a)){n!==""&&(t.push(n),n="");continue}n+=a}return n!==""&&t.push(n),t}function aV(e,t){const n=t?.type;if(n==="number"||n==="integer"){const r=Number(e);return Number.isFinite(r)?r:e}if(n==="boolean"){if(e==="true")return!0;if(e==="false")return!1}if(n==="array"||n==="object")try{return JSON.parse(e)}catch{return e}return e}function lV(e){const t={};for(const[n,r]of Object.entries(e))r!=null&&(t[n]=typeof r=="string"?r:String(r));return t}function uV(e,t){const n=Vh(t);if(n===void 0)return;const r={};for(const s of Object.keys(n)){const a=e[s];a!=null&&(r[s]=typeof a=="string"?a:String(a))}return Object.keys(r).length>0?r:void 0}const cV=new Set(["action.result","actions.requested","action.approval_requested","action.approval_resolved"]),fV=new Set(["actions.requested","action.result","action.approval_requested","action.approval_resolved","subagent.called","subagent.completed"]),dV=new Set(["message.received","turn.started","message.completed","reasoning.appended","reasoning.completed","actions.requested","action.approval_requested","action.approval_resolved","action.result","subagent.called","subagent.completed","turn.completed","turn.failed","agent.bound","session.failed"]);function kO(){const e=window.location.pathname,t=e.replace(/\/playground\/?$/,"");return t===e?"":t}function pV(){const e=$G()!==null,t=e?hO():"";return{meta:{name:"agent",dev:!1,basePath:kO()},info:null,health:"unknown",sessions:[],current:null,localTrace:!1,view:"chat",running:!1,turnStartedAt:null,queued:[],composerDraft:null,authToken:"",aliasToken:t,aliasHosted:e,embedded:e&&BG(),transcript:[],traceEvents:[],barTitle:"No session",barId:"",externalUrl:null,drawerOpen:!1,sidebarOpen:!1,bridged:!1,toast:null,evalCases:[],evalConfig:null,evalRun:null,evalRuns:[],evalNavReturn:!1}}const Ko=DG(()=>pV());class hV{constructor(){this.api=new UG(kO(),()=>this.state.authToken,()=>this.state.aliasToken),this.items=[],this.itemIndex=new Map,this.toolIds=new Set,this.assistantId=null,this.reasoningId=null,this.nestedAssistantIds=new Map,this.nestedReasoningIds=new Map,this.idSeq=0,this.streamAbort=null,this.lastIndex=-1,this.toastTimer=null,this.evalPollTimer=null,this.evalRestoreGeneration=0,this.evalPollGeneration=0,this.evalRestoreInFlight=null,this.booted=!1,this.pendingSessionDeepLink=null,this.aliasStreamInterrupted=!1,this.discardTurnBody=!1,this.activeTurnId=null,this.activeTurnStartedAt=null,this.flushingQueue=!1,this.queueHeld=!1,this.knownSessionIds=new Set,this.sessionsSeeded=!1,this.subscribe=Ko.subscribe,this.getState=()=>Ko.getState()}get state(){return Ko.getState()}set(t){Ko.setState(t)}commitTranscript(){this.set({transcript:this.items.slice()})}toast(t){this.set({toast:t}),this.toastTimer&&clearTimeout(this.toastTimer),this.toastTimer=setTimeout(()=>this.set({toast:null}),4e3)}setAuthToken(t){this.set({authToken:t})}async signInWithAliasToken(t){const n=t.trim();if(n==="")return{ok:!1,error:"Enter the deployment's alias token."};this.set({aliasToken:n});const r=await this.api.health();return!r.ok&&r.status===404?(this.set({aliasToken:""}),{ok:!1,error:"That token was not accepted. Check it and try again."}):(this.aliasStreamInterrupted=!1,this.booted=!1,await this.boot(),{ok:!0})}acceptAliasTokenHandoff(t){if(this.set({aliasToken:t}),!this.booted){this.boot();return}if(!this.aliasStreamInterrupted)return;this.aliasStreamInterrupted=!1;const n=this.state.current;n!==null&&this.streamAbort===null&&this.startStream(n.sessionId,this.lastIndex+1)}noteAliasAuthLoss(t){return!this.state.aliasHosted||t!==401&&t!==404||this.state.aliasToken.trim()===""?!1:(this.aliasStreamInterrupted=this.streamAbort!==null,this.stopStream(),this.set({aliasToken:""}),!0)}setDrawerOpen(t){this.set({drawerOpen:t})}setSidebarOpen(t){this.set({sidebarOpen:t})}nextId(t){return this.idSeq+=1,`${t}-${this.idSeq}`}push(t){this.itemIndex.set(t.id,this.items.length),this.items.push(t)}update(t,n){const r=this.itemIndex.get(t);r!==void 0&&(this.items[r]={...this.items[r],...n})}resetTranscript(){this.items=[],this.itemIndex.clear(),this.toolIds.clear(),this.assistantId=null,this.reasoningId=null,this.nestedAssistantIds.clear(),this.nestedReasoningIds.clear(),this.discardTurnBody=!1,this.activeTurnId=null,this.activeTurnStartedAt=null,this.queueHeld=!1}subagentToolCallId(t){return`sub:${t}`}ensureSubagentTool(t,n){const r=this.subagentToolCallId(t),s=this.itemIndex.has(this.toolItemId(r));return this.upsertTool(r,s?"":"subagent:task",null,n)}getToolItem(t){const n=this.itemIndex.get(t);if(n===void 0)return null;const r=this.items[n];return r?.kind==="tool"?r:null}updateSubagentChildren(t,n,r=null){const s=this.ensureSubagentTool(t,r),a=this.getToolItem(s);if(a===null)return;const l=n([...a.children??[]]);this.update(s,{children:l})}upsertNestedTool(t,n,r,s,a){this.updateSubagentChildren(t,l=>{const c=l.findIndex(p=>p.kind==="tool"&&p.callId===n);if(c>=0){const p=l[c];if(p?.kind!=="tool")return l;const f=l.slice();return f[c]={...p,name:r||p.name,args:s??p.args},f}return l.push({kind:"tool",id:this.nextId("nested-tool"),callId:n,name:r,args:s??null,status:"running",output:null,startedAt:a??Date.now(),endedAt:null}),l},a)}finishNestedTool(t,n,r,s,a,l){this.updateSubagentChildren(t,c=>{const p=c.findIndex(g=>g.kind==="tool"&&g.callId===n),f=s==null?"(no output)":sr(s,4e3);if(p<0)return c.push({kind:"tool",id:this.nextId("nested-tool"),callId:n,name:r,args:null,status:a?"error":"done",output:f,outputRaw:s,startedAt:l??Date.now(),endedAt:l??Date.now()}),c;const h=c[p];if(h?.kind!=="tool")return c;const m=c.slice();return m[p]={...h,name:r||h.name,status:a?"error":"done",output:f,outputRaw:s,endedAt:l??Date.now()},m},l)}ensureNestedAssistant(t){const n=this.nestedAssistantIds.get(t);if(n)return n;const r=this.nextId("nested-asst");return this.nestedAssistantIds.set(t,r),this.updateSubagentChildren(t,s=>(s.push({kind:"assistant",id:r,text:"",streaming:!0}),s)),r}ensureNestedReasoning(t){const n=this.nestedReasoningIds.get(t);if(n)return n;const r=this.nextId("nested-think");return this.nestedReasoningIds.set(t,r),this.updateSubagentChildren(t,s=>(s.push({kind:"reasoning",id:r,text:"",open:!0}),s)),r}updateNestedChild(t,n,r){this.updateSubagentChildren(t,s=>{const a=s.findIndex(p=>p.id===n);if(a<0)return s;const l=s[a];if(l===void 0)return s;const c=s.slice();return c[a]={...l,...r},c})}pushUser(t){this.assistantId=null,this.reasoningId=null,this.push({kind:"user",id:this.nextId("user"),text:String(t??"")})}pushDivider(t,n=!1,r){this.push({kind:"divider",id:this.nextId("div"),text:t,fail:n,url:r})}ensureAssistant(){if(this.assistantId)return this.assistantId;const t=this.nextId("asst");return this.push({kind:"assistant",id:t,text:"",streaming:!0}),this.assistantId=t,t}ensureReasoning(){if(this.reasoningId)return this.reasoningId;const t=this.nextId("think");return this.push({kind:"reasoning",id:t,text:"",open:!0}),this.reasoningId=t,t}toolItemId(t){return`tool:${t}`}upsertTool(t,n,r,s){const a=this.toolItemId(t);if(this.itemIndex.has(a)){const l={};if(n&&(l.name=n),r!=null&&(l.args=r),s!==null){const c=this.getToolItem(a);c!==null&&c.startedAt===null&&(l.startedAt=s)}return Object.keys(l).length>0&&this.update(a,l),a}return this.push({kind:"tool",id:a,callId:t,name:n,args:r??null,status:"running",output:null,startedAt:s??Date.now(),endedAt:null}),this.toolIds.add(a),a}markAwaiting(t,n,r){const s=this.upsertTool(t,n,r,Date.now());this.update(s,{status:"awaiting",output:"Parked for human approval. Approve or deny to continue the turn."})}clearAwaiting(t,n){const r=this.toolItemId(t);this.itemIndex.has(r)&&this.update(r,{status:"running",output:n==="deny"?"Denied — tool will not execute.":"Approved — executing…"})}finishTool(t,n,r,s,a){const l=this.upsertTool(t,n,null,a),c=r==null?"(no output)":sr(r,4e3);this.update(l,{status:s?"error":"done",output:c,outputRaw:r,endedAt:a??Date.now()}),this.activeTurnId===null&&!this.hasOpenTools()&&this.setRunning(!1)}hasOpenTools(){for(const t of this.toolIds){const n=this.itemIndex.get(t);if(n===void 0)continue;const r=this.items[n];if(r.kind==="tool"&&(r.status==="running"||r.status==="awaiting"))return!0}return!1}finalizeOpenTools(t,n){const r=t??Date.now();for(const s of this.toolIds){const a=this.itemIndex.get(s);if(a===void 0)continue;const l=this.items[a];l.kind==="tool"&&(l.status==="done"||l.status==="error"||l.status!=="awaiting"&&this.update(s,{status:"orphan",endedAt:r,output:n}))}}beginDiscardStaleTurnBody(){this.discardTurnBody=!0,this.activeTurnId=null}applyChat(t){if(this.discardTurnBody){if(t.type==="turn.started")this.discardTurnBody=!1;else if(t.type!=="message.received"&&t.type!=="agent.bound")return}else if(this.activeTurnId!==null&&t.turnId!==void 0&&t.turnId!==this.activeTurnId&&!fV.has(t.type)&&t.type!=="message.received"&&t.type!=="agent.bound")return;const n=t.data||{},r=hl(t.at)||Date.now();switch(t.type){case"message.received":this.pushUser(n.text);break;case"agent.bound":this.pushDivider(n.url?`cloud agent ${n.sdkAgentId}`:`agent ${n.sdkAgentId}`,!1,typeof n.url=="string"?n.url:void 0);break;case"turn.started":this.activeTurnId=t.turnId??null,this.activeTurnStartedAt=hl(t.at),this.setRunning(!0);break;case"reasoning.appended":if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.ensureNestedReasoning(n.parentCallId);this.updateNestedChild(n.parentCallId,s,{text:String(n.text??"")})}else this.update(this.ensureReasoning(),{text:String(n.text??"")});break;case"reasoning.completed":if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.nestedReasoningIds.get(n.parentCallId);s&&(this.updateNestedChild(n.parentCallId,s,{open:!1}),this.nestedReasoningIds.delete(n.parentCallId))}else this.reasoningId&&(this.update(this.reasoningId,{open:!1}),this.reasoningId=null);break;case"message.appended":if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.ensureNestedAssistant(n.parentCallId);this.updateNestedChild(n.parentCallId,s,{text:String(n.text??"")})}else this.update(this.ensureAssistant(),{text:String(n.text??"")});break;case"message.completed":{if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.ensureNestedAssistant(n.parentCallId);this.updateNestedChild(n.parentCallId,s,{text:String(n.text??""),streaming:!1}),this.nestedAssistantIds.delete(n.parentCallId)}else{const s=this.ensureAssistant();this.update(s,{text:String(n.text??""),streaming:!1}),this.assistantId=null}break}case"actions.requested":this.setRunning(!0);for(const s of n.calls||[]){const a=typeof s.parentCallId=="string"&&s.parentCallId!==""?s.parentCallId:typeof n.parentCallId=="string"&&n.parentCallId!==""?n.parentCallId:void 0;a!==void 0?this.upsertNestedTool(a,s.callId,s.toolName,s.args,r):s.toolName==="task"||this.upsertTool(s.callId,s.toolName,s.args,r)}break;case"action.approval_requested":this.markAwaiting(n.callId,n.toolName,n.args);break;case"action.approval_resolved":this.clearAwaiting(n.callId,n.decision);break;case"action.result":typeof n.parentCallId=="string"&&n.parentCallId!==""?this.finishNestedTool(n.parentCallId,n.callId,n.toolName,n.output,!!n.isError,r):n.toolName==="task"||this.finishTool(n.callId,n.toolName,n.output,!!n.isError,r);break;case"subagent.called":this.setRunning(!0),this.upsertTool(this.subagentToolCallId(n.callId),`subagent:${n.name||"task"}`,n.description,r);break;case"subagent.completed":this.nestedAssistantIds.delete(n.callId),this.nestedReasoningIds.delete(n.callId),this.finishTool(this.subagentToolCallId(n.callId),"","completed",!1,r);break;case"turn.completed":{this.activeTurnId=null,this.finalizeOpenTools(r,"(no result — turn completed before the tool reported back)");const s=this.activeTurnStartedAt;this.activeTurnStartedAt=null,this.push({kind:"turn-end",id:this.nextId("turn"),ms:s!==null&&hl(t.at)!==null?Math.max(0,r-s):null,inTokens:typeof n.usage?.inputTokens=="number"?n.usage.inputTokens:void 0,outTokens:typeof n.usage?.outputTokens=="number"?n.usage.outputTokens:void 0}),this.setRunning(this.hasOpenTools());break}case"turn.failed":this.activeTurnId=null,this.activeTurnStartedAt=null,this.finalizeOpenTools(r,`(no result — turn failed: ${n.message||"unknown"})`),this.pushDivider(`turn failed: ${n.message}`,!0),this.setRunning(this.hasOpenTools());break;case"session.waiting":this.setRunning(this.hasOpenTools()),this.refreshSessions();break;case"session.completed":this.finalizeOpenTools(r,"(no result — session completed)"),this.pushDivider("task session completed"),this.setRunning(!1),this.refreshSessions();break;case"session.failed":this.finalizeOpenTools(r,`(no result — session failed: ${n.message||"unknown"})`),this.pushDivider(`session failed: ${n.message}`,!0),this.setRunning(!1),this.refreshSessions();break}}handleEvent(t){this.state.traceEvents.push(t),this.applyChat(t),this.commitTranscript(),this.set({traceEvents:this.state.traceEvents.slice()})}setRunning(t){this.set({running:t,turnStartedAt:t?this.activeTurnStartedAt:null}),t||queueMicrotask(()=>this.maybeFlushQueue())}setView(t){const n=t==="trace"||t==="raw"||t==="logs"||t==="evals"||t==="abs"?t:"chat";this.set({view:n,...n==="evals"?{evalNavReturn:!1}:{}});try{const r=new URL(window.location.href);n==="chat"?r.searchParams.delete("view"):r.searchParams.set("view",n),history.replaceState(null,"",r.toString())}catch{}n==="evals"&&(this.refreshEvalRuns(),this.restoreEvalRun())}backToEvals(){this.set({evalNavReturn:!1}),this.setView("evals")}async refreshSessions(){let t;try{t=await this.api.sessions()}catch{return}if(!t.ok||!t.body){this.noteAliasAuthLoss(t.status);return}const n=t.body.sessions||[],r=ZG({knownIds:this.knownSessionIds,sessions:n,currentSessionId:this.state.current?.sessionId??null,sidebarOpen:this.state.sidebarOpen,embedded:this.state.embedded,seeded:this.sessionsSeeded});this.knownSessionIds=new Set(n.map(a=>a.sessionId)),this.sessionsSeeded=!0;const s={sessions:n};if(r.openSidebar&&(s.sidebarOpen=!0),this.state.current){const a=n.find(l=>l.sessionId===this.state.current?.sessionId);a?.continuationToken&&(s.current={...this.state.current,continuationToken:a.continuationToken})}if(this.set(s),r.selectSessionId!==null){const a=n.find(l=>l.sessionId===r.selectSessionId);a!==void 0&&this.selectSession(a)}}isCurrent(t){return this.state.current!==null&&this.state.current.sessionId===t}stopStream(){this.streamAbort&&(this.streamAbort.abort(),this.streamAbort=null)}startStream(t,n){this.stopStream();const r=new AbortController;this.streamAbort=r,this.api.streamFetch(t,n,r.signal).then(async s=>{if(!s.ok||!s.body){this.toast(`Stream failed (${s.status})`);return}const a=s.body.getReader(),l=new TextDecoder;let c="";for(;;){const p=await a.read();if(p.done){this.scheduleReconnect(t,r);return}c+=l.decode(p.value,{stream:!0});const f=c.split(`
|
|
34
|
-
`);c=f.pop()||"";for(const h of f){if(r.signal.aborted)return;if(!h||!h.trim())continue;let m=null;try{m=JSON.parse(h)}catch{continue}m!==null&&(m.index!==void 0&&(this.lastIndex=m.index),this.handleEvent(m),cV.has(m.type)&&await new Promise(g=>requestAnimationFrame(()=>g(null))))}}}).catch(()=>{r.signal.aborted||this.scheduleReconnect(t,r)})}scheduleReconnect(t,n){n.signal.aborted||this.isCurrent(t)&&setTimeout(()=>{!this.isCurrent(t)||this.streamAbort!==n||this.startStream(t,this.lastIndex+1)},1e3)}selectSession(t){this.stopStream(),this.resetTranscript(),this.lastIndex=-1,this.state.traceEvents=[],this.set({localTrace:!1,current:{sessionId:t.sessionId,channelId:t.channelId,mode:t.mode,continuationToken:t.continuationToken,externalUrl:t.externalUrl||null},running:!!t.running,turnStartedAt:null,queued:[],composerDraft:null,barTitle:t.title||"Session",barId:t.sessionId,externalUrl:t.externalUrl||null,transcript:[],traceEvents:[]}),this.syncSessionUrl(t.sessionId),this.refreshSessions(),t.running?this.startStream(t.sessionId,0):this.loadEventsSnapshot(t.sessionId).then(()=>{this.isCurrent(t.sessionId)&&this.startStream(t.sessionId,this.lastIndex+1)})}syncSessionUrl(t){try{const n=new URL(window.location.href);t?n.searchParams.set("sessionId",t):n.searchParams.delete("sessionId"),history.replaceState(null,"",n.toString())}catch{}}async loadEventsSnapshot(t){this.stopStream();try{const n=await this.api.eventsText(t);if(!n.ok){this.toast(`Could not load trace (${n.status}) — falling back to stream`),this.startStream(t,0);return}const r=await n.text();this.ingestEventsCompact(tv(r))}catch(n){this.toast(`Trace load failed: ${mV(n)}`),this.startStream(t,0)}}ingestEventsCompact(t){this.resetTranscript();for(const n of t)typeof n.index=="number"&&n.index>this.lastIndex&&(this.lastIndex=n.index),dV.has(n.type)&&this.applyChat(n);this.setRunning(this.hasOpenTools()),this.set({traceEvents:t.slice(),transcript:this.items.slice()})}deselectSession(){this.stopStream(),this.resetTranscript(),this.lastIndex=-1,this.set({current:null,localTrace:!1,running:!1,turnStartedAt:null,queued:[],composerDraft:null,transcript:[],traceEvents:[],barTitle:"No session",barId:"",externalUrl:null}),this.syncSessionUrl(null),this.refreshSessions()}loadLocalTrace(t,n){this.stopStream(),this.resetTranscript(),this.lastIndex=-1;const r=tv(t);if(r.length===0){this.toast("No session events found in that file."),this.deselectSession();return}const s=r[0].sessionId||"local-trace";this.set({current:null,localTrace:!0,running:!1,turnStartedAt:null,queued:[],composerDraft:null,barTitle:"Trace",barId:`${n||s} · ${r.length} events`,externalUrl:null}),this.setView("trace"),this.syncSessionUrl(null),this.ingestEventsCompact(r),this.toast(`Loaded ${r.length} events — Trace timeline ready`)}slashCommands(){return Mk(this.state.info?.channels)}hasReviewChannel(){return(this.state.info?.channels||[]).some(t=>t.id==="review")}shouldUseReview(t){return this.state.current===null&&this.hasReviewChannel()&&IG(t)}async sendMessage(t,n={}){const r=t.trim();if(!r||this.state.localTrace)return!1;const s=this.state.current;if(XG(r))return this.invokeSlashCommand(r);if(this.shouldUseReview(r))return this.invokeSlashCommand(`/review ${r}`);if(this.queueHeld=!1,s!==null&&this.state.running&&!n.force)return this.queueMessage(r),!0;if(s===null){this.setRunning(!0);const a=await this.api.createSession(r);return!a.ok||!a.body?(this.setRunning(!1),this.toast(`Create failed: ${sr(a.body,160)}`),!1):(this.resetTranscript(),this.lastIndex=-1,this.state.traceEvents=[],this.set({localTrace:!1,current:{sessionId:a.body.sessionId,channelId:"http",mode:"chat",continuationToken:a.body.continuationToken},barTitle:"Session",barId:a.body.sessionId,externalUrl:null,transcript:[],traceEvents:[]}),this.syncSessionUrl(a.body.sessionId),this.startStream(a.body.sessionId,0),this.refreshSessions(),!0)}return this.setRunning(!0),this.beginDiscardStaleTurnBody(),this.streamAbort===null&&this.startStream(s.sessionId,this.lastIndex+1),this.postFollowUp(s,r,!0)}async postFollowUp(t,n,r){const s=await this.api.followUp(t.sessionId,n,t.continuationToken);if(s.ok&&s.body)return this.set({current:{...t,continuationToken:s.body.continuationToken}}),!0;if(s.body?.error==="stale_continuation_token"&&r){await this.refreshSessions();const a=this.state.current??t;return this.postFollowUp(a,n,!1)}return this.setRunning(!1),this.toast(`Send failed: ${sr(s.body,160)}`),!1}queueMessage(t){this.set({queued:[...this.state.queued,{id:this.nextId("queued"),text:t}]})}removeQueued(t){this.set({queued:this.state.queued.filter(n=>n.id!==t)})}clearQueue(){this.set({queued:[]})}editQueued(t){const n=this.state.queued.find(r=>r.id===t);n!==void 0&&(this.removeQueued(t),this.set({composerDraft:n.text}))}consumeComposerDraft(){this.set({composerDraft:null})}async sendQueuedNow(t){const n=this.state.queued.find(s=>s.id===t);if(n===void 0)return;this.removeQueued(t),this.queueHeld=!1,await this.sendMessage(n.text,{force:!0})||this.requeueFront(n)}requeueFront(t){this.set({queued:[t,...this.state.queued]}),this.queueHeld=!0}maybeFlushQueue(){if(this.flushingQueue||this.queueHeld)return;const{running:t,queued:n,localTrace:r,current:s}=this.state;if(t||r||s===null||n.length===0)return;const[a,...l]=n;a!==void 0&&(this.flushingQueue=!0,this.set({queued:l}),this.setRunning(!0),this.streamAbort===null&&this.startStream(s.sessionId,this.lastIndex+1),this.postFollowUp(s,a.text,!0).then(c=>{c||this.requeueFront(a)}).finally(()=>{this.flushingQueue=!1}))}async stopTurn(){const t=this.state.current?.sessionId;if(!t||this.state.localTrace||!this.state.running)return;this.state.queued.length>0&&(this.queueHeld=!0),this.beginDiscardStaleTurnBody(),this.stopStream(),this.setRunning(!1),this.assistantId&&(this.update(this.assistantId,{streaming:!1}),this.assistantId=null),this.reasoningId&&(this.update(this.reasoningId,{open:!1}),this.reasoningId=null),this.finalizeOpenTools(Date.now(),"(no result — turn interrupted)"),this.pushDivider("turn interrupted"),this.commitTranscript();const n=await this.api.stopSession(t);if(!n.ok){this.toast(`Stop failed: ${sr(n.body,160)}`);return}this.refreshSessions()}async submitApproval(t,n){const r=this.state.current?.sessionId;if(!r)return;const s=await this.api.resolveApproval(r,t,n);s.ok||this.toast(`Approval failed: ${sr(s.body,160)}`)}async dispatchSchedule(t){const n=await this.api.dispatchSchedule(t);if(!n.ok||!n.body){this.toast(`Dispatch failed: ${sr(n.body,120)}`);return}await this.refreshSessions();const r=n.body.sessionIds?.[0],s=this.state.sessions.find(a=>a.sessionId===r);s&&this.selectSession(s)}async refreshEvalCases(){const t=await this.api.evalsList();if(!t.ok||!t.body){t.status!==0&&this.toast(`Could not list evals (${t.status}): ${sr(t.body,120)}`);return}this.set({evalCases:t.body.evals??[],evalConfig:t.body.config??null})}async refreshEvalRuns(){const t=await this.api.evalsListRuns();!t.ok||t.body===null||this.set({evalRuns:t.body.runs})}async selectEvalRun(t){const n=t.trim();if(n==="")return;const r=this.state.evalRuns.find(a=>a.runId===n);if(r!==void 0&&r.status!=="running"){this.applyRestoredEvalRun(r),this.setView("evals");return}const s=await this.api.evalsRunStatus(n);if(!s.ok||s.body===null){this.toast(`Eval run not found: ${n}`);return}this.applyRestoredEvalRun(s.body),this.setView("evals"),this.refreshEvalRuns()}async restoreEvalRun(){return this.evalRestoreInFlight!==null?this.evalRestoreInFlight:(this.evalRestoreInFlight=this.doRestoreEvalRun().finally(()=>{this.evalRestoreInFlight=null}),this.evalRestoreInFlight)}async doRestoreEvalRun(){const t=++this.evalRestoreGeneration,n=yV();if(n!==null){const p=await this.api.evalsRunStatus(n);if(t!==this.evalRestoreGeneration)return;if(p.ok&&p.body){this.applyRestoredEvalRun(p.body),this.refreshEvalRuns();return}}const r=await this.api.evalsListRuns();if(t!==this.evalRestoreGeneration)return;const s=r.ok?r.body:null;if(s!==null&&this.set({evalRuns:s.runs}),s?.activeRunId!==void 0){const p=s.activeRunId,f=s.runs.find(h=>h.runId===p)??await this.fetchEvalRunIfCurrent(t,p);if(t!==this.evalRestoreGeneration)return;if(f!==void 0){this.state.evalRun?.runId===f.runId?(this.set({evalRun:f}),f.status==="running"&&this.evalPollTimer===null&&this.startEvalRunPoll(f.runId)):this.applyRestoredEvalRun(f);return}}const a=this.state.evalRun;if(a!==null){a.status==="running"&&this.evalPollTimer===null&&this.startEvalRunPoll(a.runId);return}const l=bV(this.state.meta.basePath);if(l!==null){const p=await this.api.evalsRunStatus(l);if(t!==this.evalRestoreGeneration||this.state.evalRun!==null)return;if(p.ok&&p.body){this.applyRestoredEvalRun(p.body);return}}if(s===null)return;const c=s.runs[0];c!==void 0&&this.state.evalRun===null&&this.applyRestoredEvalRun(c)}async fetchEvalRunIfCurrent(t,n){const r=await this.api.evalsRunStatus(n);if(t===this.evalRestoreGeneration)return r.ok&&r.body?r.body:void 0}applyRestoredEvalRun(t){this.set({evalRun:t}),this.mergeEvalRunIntoList(t),np(this.state.meta.basePath,t.runId),vV(t.runId),t.status==="running"&&this.startEvalRunPoll(t.runId)}mergeEvalRunIntoList(t){const n=this.state.evalRuns.filter(r=>r.runId!==t.runId);this.set({evalRuns:[t,...n]})}async startEvalRun(t){if(this.state.evalRun?.status==="running"){this.toast("An eval run is already in progress");return}this.evalRestoreGeneration+=1;const n=await this.api.evalsStartRun(t===void 0||t.length===0?{}:{filterIds:t});if(!n.ok||!n.body){this.toast(`Eval start failed: ${sr(n.body,160)}`);return}this.set({evalRun:n.body}),np(this.state.meta.basePath,n.body.runId),this.setView("evals"),this.toast(`Eval ID: ${n.body.runId}`),this.startEvalRunPoll(n.body.runId),this.refreshEvalRuns()}async cancelEvalRun(t){const n=t??this.state.evalRun?.runId;if(n===void 0||n===""){this.toast("No eval run to cancel");return}const r=await this.api.evalsCancelRun(n);if(!r.ok||!r.body){this.toast(`Eval cancel failed: ${sr(r.body,160)}`);return}this.set({evalRun:r.body}),np(this.state.meta.basePath,r.body.runId),this.toast(`Cancelled Eval ID ${r.body.runId}`),r.body.status==="running"?this.startEvalRunPoll(r.body.runId):this.stopEvalRunPoll(),this.refreshEvalRuns()}stopEvalRunPoll(){this.evalPollTimer!==null&&(clearInterval(this.evalPollTimer),this.evalPollTimer=null)}startEvalRunPoll(t){this.stopEvalRunPoll();const n=++this.evalPollGeneration;let r=!1,s=!1;const a=async()=>{if(!(n!==this.evalPollGeneration||r)){r=!0;try{const l=await this.api.evalsRunStatus(t);if(n!==this.evalPollGeneration||!l.ok||!l.body)return;if(this.set({evalRun:l.body}),np(this.state.meta.basePath,l.body.runId),this.mergeEvalRunIntoList(l.body),l.body.status!=="running"){if(this.stopEvalRunPoll(),this.refreshSessions(),this.refreshEvalRuns(),s||n!==this.evalPollGeneration)return;s=!0;const{passed:c,failed:p,total:f}=l.body.summary;this.toast(l.body.status==="failed"?`Eval run failed: ${l.body.error??"unknown error"}`:`Evals done — ${c} passed, ${p} failed, ${f} total`)}}finally{r=!1}}};a(),this.evalPollTimer=setInterval(()=>{a()},1500)}async openEvalCaseSession(t){this.set({evalNavReturn:!0}),await this.refreshSessions();const n=this.state.sessions.find(r=>r.sessionId===t);n!==void 0?this.selectSession({...n,running:n.running===!0}):this.selectSession({sessionId:t,channelId:"http",mode:"conversation",title:"Eval session",turnCount:0,running:!1}),this.setView("chat")}async openEvalCaseTrace(t){this.set({evalNavReturn:!0}),await this.refreshSessions();const n=this.state.sessions.find(r=>r.sessionId===t);n!==void 0?this.selectSession({...n,running:n.running===!0}):this.selectSession({sessionId:t,channelId:"http",mode:"conversation",title:"Eval session",turnCount:0,running:!1}),this.setView("trace")}async openSessionFromChannelResponse(t,n){const r=typeof n?.sessionId=="string"&&n.sessionId.trim()!==""?n.sessionId:null;if(r===null)return!1;await this.refreshSessions();const s=this.state.sessions.find(c=>c.sessionId===r),a=typeof n.status=="string"?n.status:void 0,l=a===void 0||a==="started"||a==="running";if(s!==void 0)this.selectSession({...s,running:l?!0:!!s.running});else{const c=typeof n.continuationToken=="string"?n.continuationToken:typeof n.key=="string"?n.key:void 0,p=typeof n.pr=="string"?n.pr:typeof n.title=="string"?n.title:"Session";this.selectSession({sessionId:r,channelId:t,mode:typeof n.mode=="string"?n.mode:"task",title:p,turnCount:0,running:l,continuationToken:c,externalUrl:typeof n.agentUrl=="string"?n.agentUrl:null})}return this.setView("chat"),this.setDrawerOpen(!1),!0}async openSessionById(t){const n=t.trim();if(n==="")return;await this.refreshSessions();const r=this.state.sessions.find(s=>s.sessionId===n);r!==void 0?this.selectSession(r):this.selectSession({sessionId:n,channelId:"http",mode:"conversation",title:"Session",turnCount:0,running:!1}),this.setView("chat")}async invokeSlashCommand(t){const n=t.trim(),r=this.slashCommands();if(/^\/help(?:\s|$)/i.test(n)){this.resetTranscript(),this.pushUser(n);const l=this.ensureAssistant();return this.update(l,{text:JG(r),streaming:!1}),this.assistantId=null,this.set({localTrace:!1,current:null,barTitle:"Help",barId:"",externalUrl:null,running:!1,turnStartedAt:null}),this.syncSessionUrl(null),this.commitTranscript(),!0}const s=eV(n,r);if(!s.ok)return this.toast(s.error),!1;this.setRunning(!0),this.resetTranscript(),this.pushUser(n);const a=this.ensureAssistant();this.update(a,{text:`Running \`${s.command.name}\` (${s.command.method} ${s.command.url})…`}),this.set({localTrace:!1,current:null,barTitle:s.command.name,barId:s.command.method,externalUrl:null,transcript:this.items.slice()}),this.syncSessionUrl(null);try{const l=await this.api.channelRequest(s.command.method,s.command.url,{body:s.body,query:s.query});return l.ok?await this.openSessionFromChannelResponse(s.command.channelId,l.body)?(this.assistantId=null,!0):(this.setRunning(!1),this.update(a,{text:"```json\n"+gV(l.body)+"\n```",streaming:!1}),this.assistantId=null,this.commitTranscript(),!0):(this.setRunning(!1),this.update(a,{text:`Command failed (${l.status}): ${sr(l.body,400)}`,streaming:!1}),this.assistantId=null,this.commitTranscript(),!0)}catch(l){return this.setRunning(!1),this.update(a,{text:`Command failed: ${l instanceof Error?l.message:String(l)}`,streaming:!1}),this.assistantId=null,this.commitTranscript(),!0}}async loadEngineMeta(){let t;try{t=await this.api.meta()}catch{return!1}return!t.ok||!t.body?!1:(this.set({meta:{name:t.body.name??"agent",dev:!!t.body.dev,basePath:this.api.basePath,indexPath:t.body.indexPath}}),console.info(`[playground] engine version ${t.body.version??"pre-0.1.14"}`),!0)}refreshEngineStatus(){this.api.health().then(t=>{this.set({health:t.ok?"ok":"bad"})}),this.api.info().then(t=>{t.ok&&t.body?this.set({info:t.body}):t.status===401&&(this.noteAliasAuthLoss(t.status)||this.toast("Unauthorized: set a bearer token (top right) that matches the channel auth."))})}async pollEngineMetaUntilReady(){const t=Date.now()+18e4;let n=1e3;for(;Date.now()<t;){if(await new Promise(r=>setTimeout(r,n)),n=Math.min(n*2,1e4),this.aliasAuthPending)return;if(await this.loadEngineMeta()){this.refreshEngineStatus(),this.refreshEvalCases(),this.restoreEvalRun();const r=this.pendingSessionDeepLink;this.pendingSessionDeepLink=null,r!==null&&(await this.refreshSessions(),this.selectDeepLinkedSession(r));return}}this.pendingSessionDeepLink=null}selectDeepLinkedSession(t){const n=this.state.sessions.find(r=>r.sessionId===t);n?this.selectSession(n):this.state.sessions.length>0&&this.toast(`Session not found: ${t}`)}get aliasAuthPending(){return this.state.aliasHosted&&this.state.aliasToken.trim()===""}async boot(){if(this.booted||this.aliasAuthPending)return;this.booted=!0;let t=null,n=null;try{const s=new URL(window.location.href);t=s.searchParams.get("sessionId"),n=s.searchParams.get("view")}catch{}const r=await this.loadEngineMeta();r?this.refreshEngineStatus():(this.pendingSessionDeepLink=t,this.set({health:"bad"}),this.pollEngineMetaUntilReady()),n?this.setView(n):this.state.bridged||this.setView("chat"),await this.refreshSessions(),this.refreshEvalCases(),this.refreshEvalRuns(),this.restoreEvalRun(),t&&r&&this.selectDeepLinkedSession(t),setInterval(()=>{this.refreshSessions()},this.state.meta.dev?2e3:5e3)}modelLabel(){return pO(this.state.info?.model)}}function mV(e){return e instanceof Error?e.message:String(e)}function gV(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function xO(e){return`agent-serve:evalRunId:${e||"/"}`}function bV(e){try{const t=sessionStorage.getItem(xO(e));return t!==null&&t!==""?t:null}catch{return null}}function yV(){try{const e=new URL(window.location.href).searchParams.get("evalRunId");if(e===null)return null;const t=e.trim();return t===""?null:t}catch{return null}}function vV(e){try{const t=new URL(window.location.href);if(t.searchParams.get("evalRunId")===e)return;t.searchParams.set("evalRunId",e),history.replaceState(null,"",t.toString())}catch{}}function np(e,t){try{sessionStorage.setItem(xO(e),t)}catch{}}const ut=new hV;ut.getState().aliasHosted&&FG(e=>ut.acceptAliasTokenHandoff(e));if(ut.getState().embedded){VG(t=>{t.type==="hello"?(Ko.setState({bridged:!0}),AT(ut.getState().view)):ut.setView(t.view)});let e=null;Ko.subscribe(t=>{!t.bridged||t.view===e||(e=t.view,AT(t.view))})}function lt(e){return jG(Ko,e)}function kV(e){const t=[{key:"turns",value:String(e.turns)},{key:"fail",value:String(e.turnFailures)},{key:"tools",value:String(e.toolCalls)},{key:"tool err",value:String(e.toolErrors)},{key:"tokens",value:String(e.inputTokens+e.outputTokens)},{key:"wall",value:bi(e.wallTimeMs)}];for(const[n,r]of Object.entries(e.custom).sort(([s],[a])=>s.localeCompare(a)))t.push({key:n,value:String(r)});return t}function SO(e){return e.turns>0||e.turnFailures>0||e.toolCalls>0||e.toolErrors>0||e.inputTokens>0||e.outputTokens>0||e.wallTimeMs>0||Object.keys(e.custom).length>0}function wO({metrics:e}){return v.jsx("div",{className:"ab-metrics",children:kV(e).map(t=>v.jsxs("span",{className:"ab-metric",children:[v.jsx("span",{className:"ab-metric-k",children:t.key}),v.jsx("span",{className:"ab-metric-v",children:t.value})]},t.key))})}function xV({arm:e}){const t=e.variantLabel??e.variant,n=e.sessions>0||SO(e.metrics);return v.jsxs("div",{className:"ab-arm",children:[v.jsxs("div",{className:"ab-arm-head",children:[v.jsx("span",{className:"ab-kind",children:"Arm"}),v.jsx("span",{className:"ab-arm-name",children:t}),v.jsxs("span",{className:"ab-arm-n",children:[e.sessions," session",e.sessions===1?"":"s"]})]}),e.description!==void 0?v.jsx("div",{className:"ab-arm-desc",children:e.description}):null,n?v.jsx(wO,{metrics:e.metrics}):null]})}function SV({row:e,active:t}){return v.jsxs("button",{type:"button",className:`ab-session${t?" active":""}`,onClick:()=>{ut.selectSession({sessionId:e.sessionId,channelId:e.channelId,mode:e.mode,turnCount:e.turnCount,...e.title===void 0?{}:{title:e.title},...e.updatedAt===void 0?{}:{updatedAt:e.updatedAt}}),ut.setView("chat")},children:[v.jsxs("div",{className:"ab-session-head",children:[v.jsx("span",{className:"ab-session-id",children:e.title||e.sessionId}),v.jsxs("span",{className:"ab-session-meta",children:[e.channelId,e.updatedAt!==void 0?` · ${Gh(e.updatedAt)??e.updatedAt}`:""]})]}),v.jsx("div",{className:"ab-session-arms",children:e.assignments.map(n=>{const r=n.variant===null,s=r?"Skipped":n.variantLabel??n.variant;return v.jsxs("div",{className:"ab-assignment",children:[v.jsxs("div",{className:"ab-assignment-row",children:[v.jsx("span",{className:"ab-assignment-exp",children:n.experiment}),v.jsx("span",{className:"ab-assignment-arrow","aria-hidden":!0,children:"→"}),v.jsx(sa,{variant:r?"neutral":"accent",size:"sm",pill:!0,children:s})]}),n.metrics!==void 0&&SO(n.metrics)?v.jsx(wO,{metrics:n.metrics}):null]},`${e.sessionId}:${n.experiment}`)})})]})}function wV(){const e=lt(b=>b.current),[t,n]=k.useState(null),[r,s]=k.useState(null),[a,l]=k.useState(!0),c=k.useRef(!1),p=k.useCallback(async()=>{if(!c.current){c.current=!0,l(!0),s(null);try{const b=await ut.api.abs();if(!b.ok||b.body===null){s(`Failed to load A/Bs (${b.status})`),n(null);return}n(b.body)}catch(b){s(b instanceof Error?b.message:String(b)),n(null)}finally{l(!1),c.current=!1}}},[]);if(k.useEffect(()=>{p();const b=setInterval(()=>{p()},4e3);return()=>clearInterval(b)},[p]),a&&t===null)return v.jsx("div",{className:"pg-abs",children:v.jsxs("div",{className:"ab-empty",children:[v.jsx("span",{className:"spin"})," Loading A/B metrics…"]})});if(r!==null&&t===null)return v.jsxs("div",{className:"pg-abs",children:[v.jsx("div",{className:"ab-empty ab-error",children:r}),v.jsx(Ln,{variant:"secondary",size:"sm",onClick:()=>{p()},children:"Retry"})]});const f=t?.experiments??[],h=t?.sessions??[];if(f.length===0&&h.length===0)return v.jsx("div",{className:"pg-abs",children:v.jsxs("div",{className:"ab-empty",children:["No A/B experiments loaded.",v.jsxs("div",{className:"ab-hint",children:["Author ",v.jsx("code",{children:"agent/ab.ts"})," with ",v.jsx("code",{children:"defineAB"}),", then run sessions — enrollment lands as durable ",v.jsx("code",{children:"ab.assigned"})," ","events at session create. Optional"," ",v.jsx("code",{children:"agent/ab.config.ts"})," controls fold retention and sample / snapshot persistence."]})]})});const g=t?.config?.maxPlaygroundSessions??200;return v.jsxs("div",{className:"pg-abs",children:[v.jsxs("div",{className:"ab-toolbar",children:[v.jsx("span",{className:"ab-toolbar-title",children:"A/B metrics"}),v.jsxs("span",{className:"ab-toolbar-meta",children:["last ",g," sessions"]}),r!==null?v.jsx("span",{className:"ab-error",children:r}):null,v.jsx("span",{className:"grow"}),v.jsx(Ln,{variant:"secondary",size:"sm",onClick:()=>{p()},children:"Refresh"})]}),v.jsxs("section",{className:"ab-section",children:[v.jsx("h3",{children:"Experiments"}),f.length===0?v.jsx("div",{className:"ab-empty",children:"No declared experiments."}):v.jsx("div",{className:"ab-exp-list",children:f.map(b=>v.jsxs("div",{className:"ab-exp-card",children:[v.jsxs("div",{className:"ab-exp-card-head",children:[v.jsx("span",{className:"ab-kind",children:"Experiment"}),v.jsx("span",{className:"ab-exp-name",children:b.name}),b.skipped>0?v.jsxs(sa,{variant:"neutral",size:"sm",pill:!0,children:[b.skipped," skipped"]}):null]}),v.jsx("div",{className:"ab-arm-list",children:b.arms.map(x=>v.jsx(xV,{arm:x},x.variant))})]},b.name))})]}),v.jsxs("section",{className:"ab-section",children:[v.jsx("h3",{children:"Sessions"}),h.length===0?v.jsx("div",{className:"ab-empty",children:"No enrolled sessions yet. Start a chat to assign arms."}):v.jsx("div",{className:"ab-session-list",children:h.map(b=>v.jsx(SV,{row:b,active:e?.sessionId===b.sessionId},b.sessionId))})]})]})}function EV(){const[e,t]=k.useState(""),[n,r]=k.useState(null),[s,a]=k.useState(!1);async function l(c){c.preventDefault(),a(!0),r(null);const p=await ut.signInWithAliasToken(e);a(!1),p.ok||r(p.error)}return v.jsx("div",{className:"pg-alias-signin",children:v.jsxs("div",{className:"pg-alias-signin-box",children:[v.jsx("h1",{children:"agent-serve playground"}),v.jsx("p",{children:"This deployment requires its alias token."}),n!==null?v.jsx("div",{className:"pg-alias-signin-error",children:n}):null,v.jsxs("form",{onSubmit:c=>{l(c)},children:[v.jsx(qh,{type:"password",size:"base","aria-label":"Alias token",placeholder:"adt_…",autoComplete:"off",autoFocus:!0,value:e,onChange:c=>t(c.target.value),disabled:s}),v.jsx(Ln,{type:"submit",variant:"primary",disabled:s||e.trim()==="",children:s?"Checking…":"Open playground"})]}),v.jsxs("div",{className:"pg-alias-signin-hint",children:["The alias token was shown once when the agent was deployed. Lost it?",v.jsx("code",{children:"agentkit rotate-token <slug>"})," mints a replacement. The token stays in this tab only — refresh to sign in again."]})]})})}function TV(){return v.jsx("div",{className:"pg-alias-signin",children:v.jsxs("div",{className:"pg-alias-signin-box",children:[v.jsx("h1",{children:"Playground disconnected"}),v.jsx("p",{children:"This playground connects through your Cursor dashboard. Use Reconnect on the dashboard, or reload the page."})]})})}function _V(e){const{localTrace:t,current:n,running:r,slashNames:s,hasReview:a}=e;if(t)return{disabled:!0,hint:"Local trace (view only). Click New or pick a live session to chat."};if(n===null){const p=s.length>0?` Slash commands: ${s.slice(0,4).join(", ")}${s.length>4?", …":""}, /help.`:"";return a?{disabled:!1,hint:`Paste a PR URL for /review, type a channel command, or send a message for a new http session.${p}`}:{disabled:!1,hint:`Sending creates a new http session.${p}`}}if(n.mode==="task"||n.channelId!=="http")return n.mode==="task"?{disabled:!0,hint:"Task sessions (schedules) are fire-and-forget; watch only."}:n.channelId==="slack"?{disabled:!0,hint:`Slack thread — watch here, reply in Slack${n.externalUrl?" (Open in Slack above).":"."}`}:{disabled:!0,hint:`Sessions owned by the “${n.channelId}” channel take follow-ups through that channel; watch only here.`};if(!n.continuationToken)return{disabled:!0,hint:"This session has no continuation token; watch only."};const c=s.length>0?` Channel commands (${s.slice(0,3).join(", ")}${s.length>3?", …":""}) also work from here.`:"";return{disabled:!1,hint:r?"Turn running — Enter queues the follow-up; ⌘Enter sends now and interrupts.":`Follow-ups reuse this session’s rotating continuation token.${c}`}}function RV(){const e=lt(t=>t.queued);return e.length===0?null:v.jsx("div",{className:"pg-queue",role:"list","aria-label":"Queued messages",children:e.map(t=>v.jsxs("div",{className:"pg-queue-item",role:"listitem",children:[v.jsx("button",{type:"button",className:"pg-queue-label",title:"Edit queued message",onClick:()=>ut.editQueued(t.id),children:t.text}),v.jsxs("span",{className:"pg-queue-actions",children:[v.jsx(ho,{icon:"arrow-up",size:"sm",variant:"default","aria-label":"Send now (interrupts the running turn)",onClick:()=>{ut.sendQueuedNow(t.id)}}),v.jsx(ho,{icon:"x",size:"sm",variant:"default","aria-label":"Remove queued message",onClick:()=>ut.removeQueued(t.id)})]})]},t.id))})}function CV(){const[e,t]=k.useState(""),[n,r]=k.useState(0),s=lt(A=>A.localTrace),a=lt(A=>A.current),l=lt(A=>A.running),c=lt(A=>A.composerDraft),p=lt(A=>A.info),f=(p?.channels||[]).some(A=>A.id==="review");k.useEffect(()=>{c!==null&&(t(A=>A.trim()?`${A} ${c}`:c),ut.consumeComposerDraft())},[c]);const h=k.useMemo(()=>Mk(p?.channels),[p]),m=k.useMemo(()=>bO(h),[h]),g=k.useMemo(()=>{if(s)return null;const A=e.replace(/^\s+/,"");return!A.startsWith("/")||/\s/.test(A)?null:A},[e,s]),b=k.useMemo(()=>g===null?[]:QG(g,h),[g,h]),x=g!==null&&b.length>0,{disabled:w,hint:_}=_V({localTrace:s,current:a,running:l,slashNames:m,hasReview:f}),E=l&&a!==null&&!s,R=async(A=e,N=!1)=>{if(!A.trim())return;await ut.sendMessage(A,{force:N})&&(t(""),r(0))},T=A=>{t(`${A} `),r(0)},C=A=>{if(x){if(A.key==="ArrowDown"){A.preventDefault(),r(N=>(N+1)%b.length);return}if(A.key==="ArrowUp"){A.preventDefault(),r(N=>(N-1+b.length)%b.length);return}if(A.key==="Tab"||A.key==="Enter"&&!A.shiftKey){const N=b[n]??b[0];if(N!==void 0&&g!==N.name){A.preventDefault(),T(N.name);return}}if(A.key==="Escape"){A.preventDefault(),t(""),r(0);return}}A.key==="Enter"&&!A.shiftKey&&(A.preventDefault(),R(e,A.metaKey||A.ctrlKey))};return v.jsxs("div",{className:"pg-composer",children:[x?v.jsxs("ul",{className:"pg-slash-menu",role:"listbox","aria-label":"Slash commands",children:[b.map((A,N)=>v.jsx("li",{children:v.jsxs("button",{type:"button",role:"option","aria-selected":N===n,className:N===n?"pg-slash-item is-active":"pg-slash-item",onMouseDown:I=>{I.preventDefault(),T(A.name)},onMouseEnter:()=>r(N),children:[v.jsx("code",{className:"pg-slash-name",children:A.name}),v.jsx("span",{className:"pg-slash-method",children:A.method}),A.description?v.jsx("span",{className:"pg-slash-desc",children:A.description}):null]})},`${A.name}:${A.method}`)),v.jsxs("li",{className:"pg-slash-footer",children:[v.jsx("code",{children:"/help"})," lists all channel commands"]})]}):null,v.jsxs("div",{className:"inner",children:[v.jsx(RV,{}),v.jsxs("div",{className:w&&!E?"pg-prompt disabled":"pg-prompt",children:[v.jsx("textarea",{className:"pg-prompt-input",rows:1,placeholder:m.length>0?`Message the agent, or ${m[0]} …`:"Message the agent...","aria-label":"Message the agent","aria-autocomplete":x?"list":void 0,"aria-expanded":x,value:e,onChange:A=>{t(A.target.value),r(0)},onKeyDown:C,disabled:w}),v.jsxs("div",{className:"pg-prompt-toolbar",children:[v.jsx("span",{className:"pg-prompt-hint",title:_,children:_}),E&&!e.trim()?v.jsx(ho,{icon:"square",iconVariant:"filled",variant:"secondary",shape:"circle",size:"lg","aria-label":"Stop the running turn",onClick:()=>{ut.stopTurn()}}):v.jsx(ho,{icon:"arrow-up",variant:"primary",color:"monochrome",shape:"circle",size:"lg","aria-label":l?"Queue message (⌘Enter sends now)":"Send message",disabled:w||!e.trim(),onClick:()=>{R()}})]})]})]})]})}const AV="agent-serve.playground.try.";function EO(e,t){return`${AV}${e}:${t}`}function NT(e,t){try{const n=localStorage.getItem(EO(e,t));if(n===null)return null;const r=JSON.parse(n);if(typeof r!="object"||r===null||Array.isArray(r))return null;const s=r,a={};return typeof s.body=="string"&&(a.body=s.body),typeof s.query=="string"&&(a.query=s.query),a}catch{return null}}function NV(e,t,n){try{localStorage.setItem(EO(e,t),JSON.stringify(n))}catch{}}function OT(e){if(e===void 0)return"{}";const t=e.properties;if(e.type!=="object"||t===void 0)return"{}";const n={};for(const[r,s]of Object.entries(t)){const a=s.type;a==="string"?n[r]="":a==="number"||a==="integer"?n[r]=0:a==="boolean"?n[r]=!1:a==="array"?n[r]=[]:a==="object"?n[r]={}:n[r]=null}return JSON.stringify(n,null,2)}function MT({label:e,schema:t}){if(t===void 0)return v.jsxs("div",{className:"pg-try-schema-missing",children:["No ",e," schema on this route — body is free-form JSON."]});const n=t.properties,r=new Set(Array.isArray(t.required)?t.required.filter(s=>typeof s=="string"):[]);return n===void 0||Object.keys(n).length===0?v.jsxs("details",{className:"pg-try-schema",children:[v.jsxs("summary",{children:[e," schema"]}),v.jsx("pre",{children:JSON.stringify(t,null,2)})]}):v.jsxs("details",{className:"pg-try-schema",open:!0,children:[v.jsxs("summary",{children:[e," schema"]}),v.jsx("ul",{children:Object.entries(n).map(([s,a])=>{const l=typeof a.type=="string"?a.type:"any",c=typeof a.description=="string"?a.description:null;return v.jsxs("li",{children:[v.jsx("code",{children:s}),r.has(s)?v.jsx("span",{className:"req",children:" required"}):v.jsx("span",{className:"opt",children:" optional"}),v.jsxs("span",{className:"type",children:[" · ",l]}),c?v.jsx("div",{className:"desc",children:c}):null]},s)})})]})}function TO(e,t){const n=e.trim();if(n==="")return{ok:!0,value:{}};try{const r=JSON.parse(n);return typeof r!="object"||r===null||Array.isArray(r)?{ok:!1,error:`${t} must be a JSON object`}:{ok:!0,value:r}}catch(r){return{ok:!1,error:`${t}: ${r instanceof Error?r.message:String(r)}`}}}function rp(e){return`'${e.replace(/'/g,"'\\''")}'`}function OV(e){const t=["curl","-sS","-X",e.method],n=e.token.trim();if(n!==""&&t.push("-H",rp(`Authorization: Bearer ${n}`)),e.hasBody){t.push("-H",rp("Content-Type: application/json"));const r=e.bodyText.trim()===""?"{}":e.bodyText.trim();t.push("--data-binary",rp(r))}return t.push(rp(e.absoluteUrl)),t.join(" ")}function MV(e,t,n){let r=ut.api.url(e);if(n){const s=TO(t,"Query");if(!s.ok)return s;const a=new URLSearchParams;for(const[c,p]of Object.entries(s.value)){if(p==null)continue;const f=typeof p=="string"?p:String(p);f!==""&&a.set(c,f)}const l=a.toString();l!==""&&(r=`${r}?${l}`)}try{return{ok:!0,url:new URL(r,window.location.origin).toString()}}catch(s){return{ok:!1,error:`URL: ${s instanceof Error?s.message:String(s)}`}}}function IV({channelId:e,route:t,onClose:n}){const r=t.method.toUpperCase(),s=r!=="GET"&&r!=="HEAD",a=t.querySchema!==void 0||r==="GET"||r==="HEAD",l=lt(I=>I.authToken),[c,p]=k.useState(()=>{const I=NT(r,t.url);return I?.query!==void 0&&I.query.trim()!==""?I.query:OT(t.querySchema)}),[f,h]=k.useState(()=>{const I=NT(r,t.url);return I?.body!==void 0&&I.body.trim()!==""?I.body:OT(t.bodySchema)}),[m,g]=k.useState(!1),[b,x]=k.useState(!1),[w,_]=k.useState(null),[E,R]=k.useState(null);k.useEffect(()=>{const I=F=>{F.key==="Escape"&&n()};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[n]);const T=I=>{const F={};s&&(F.body=I.body??f),a&&(F.query=I.query??c),NV(r,t.url,F)},C=()=>{T({body:f,query:c}),n()},A=async()=>{if(_(null),x(!1),s&&f.trim()!=="")try{JSON.parse(f)}catch(V){_(`Body: ${V instanceof Error?V.message:String(V)}`);return}const I=MV(t.url,c,a);if(!I.ok){_(I.error);return}const F=OV({method:r,absoluteUrl:I.url,token:l,hasBody:s,bodyText:f});try{await navigator.clipboard.writeText(F),x(!0),ut.toast("Copied curl to clipboard"),window.setTimeout(()=>x(!1),1500)}catch(V){_(`Copy failed: ${V instanceof Error?V.message:String(V)}`)}},N=async()=>{_(null),R(null);let I;if(a){const V=TO(c,"Query");if(!V.ok){_(V.error);return}I={};for(const[j,q]of Object.entries(V.value))q!=null&&(I[j]=typeof q=="string"?q:String(q))}let F;if(s){const V=f.trim();if(V==="")F={};else try{F=JSON.parse(V)}catch(j){_(`Body: ${j instanceof Error?j.message:String(j)}`);return}}T({body:f,query:c}),g(!0);try{const V=await ut.api.channelRequest(r,t.url,{body:s?F:void 0,query:I});if(V.ok&&V.body&&await ut.openSessionFromChannelResponse(e,V.body)){n();return}R({status:V.status,body:V.body})}catch(V){_(V instanceof Error?V.message:String(V))}finally{g(!1)}};return v.jsx("div",{className:"pg-try-backdrop",role:"presentation",onClick:C,children:v.jsxs("div",{className:"pg-try-modal",role:"dialog","aria-modal":"true","aria-label":`Try ${r} ${t.url}`,onClick:I=>I.stopPropagation(),children:[v.jsxs("div",{className:"pg-try-head",children:[v.jsxs("div",{children:[v.jsxs("div",{className:"pg-try-title",children:[v.jsx("span",{className:"pg-try-method",children:r})," ",v.jsx("code",{children:t.url})]}),v.jsxs("div",{className:"pg-try-sub",children:["channel ",v.jsx("code",{children:e}),t.description?` · ${t.description}`:null]})]}),v.jsx("button",{type:"button",className:"link-btn",onClick:C,children:"Close"})]}),v.jsxs("div",{className:"pg-try-body",children:[a?v.jsxs(v.Fragment,{children:[v.jsx(MT,{label:"Query",schema:t.querySchema}),v.jsxs("label",{className:"pg-try-field",children:[v.jsx("span",{children:"Query (JSON object → search params)"}),v.jsx("textarea",{value:c,onChange:I=>p(I.target.value),spellCheck:!1,rows:6})]})]}):null,s?v.jsxs(v.Fragment,{children:[v.jsx(MT,{label:"Body",schema:t.bodySchema}),v.jsxs("label",{className:"pg-try-field",children:[v.jsx("span",{children:"Body (JSON)"}),v.jsx("textarea",{value:f,onChange:I=>h(I.target.value),spellCheck:!1,rows:10})]})]}):null,w?v.jsx("div",{className:"pg-try-error",children:w}):null,E?v.jsxs("div",{className:"pg-try-result",children:[v.jsxs("div",{className:"pg-try-status",children:["Status ",v.jsx("code",{children:E.status})]}),v.jsx("pre",{children:JSON.stringify(E.body,null,2)})]}):null]}),v.jsxs("div",{className:"pg-try-foot",children:[v.jsx(Ln,{variant:"secondary",size:"sm",onClick:()=>{A()},children:b?"Copied":"Copy curl"}),v.jsx("div",{className:"pg-try-foot-spacer"}),v.jsx(Ln,{variant:"secondary",size:"sm",onClick:C,children:"Cancel"}),v.jsx(Ln,{variant:"primary",size:"sm",disabled:m,onClick:()=>{N()},children:m?"Sending…":"Send"})]})]})})}const _O="agent-serve.playground.drawerWidth",Vb=340,nv=280,rv=720;function Sp(e){return Math.min(rv,Math.max(nv,e))}function DV(){try{const e=localStorage.getItem(_O);if(e===null)return Vb;const t=Number.parseInt(e,10);return Number.isFinite(t)?Sp(t):Vb}catch{return Vb}}function Uo({title:e,children:t}){return v.jsxs(v.Fragment,{children:[v.jsx("h4",{children:e}),t]})}function Xa({name:e,detail:t}){return v.jsxs("div",{className:"item",children:[v.jsx("div",{className:"n",children:e}),t?v.jsx("div",{className:"d",children:t}):null]})}function zV(){const e=lt(T=>T.drawerOpen),t=lt(T=>T.info),[n,r]=k.useState(null),[s,a]=k.useState(DV),[l,c]=k.useState(!1),p=k.useRef(s);p.current=s,k.useEffect(()=>{try{localStorage.setItem(_O,String(s))}catch{}},[s]);const f=k.useCallback(T=>{T.preventDefault();const C=T.currentTarget,A=T.clientX,N=p.current;C.setPointerCapture(T.pointerId),c(!0),document.body.classList.add("pg-resizing-drawer");const I=V=>{a(Sp(N+(V.clientX-A)))},F=V=>{C.releasePointerCapture(V.pointerId),C.removeEventListener("pointermove",I),C.removeEventListener("pointerup",F),C.removeEventListener("pointercancel",F),c(!1),document.body.classList.remove("pg-resizing-drawer")};C.addEventListener("pointermove",I),C.addEventListener("pointerup",F),C.addEventListener("pointercancel",F)},[]),h=t?.tools??[],m=t?.skills??[],g=t?.subagents??[],b=t?.connections??[],x=t?.channels??[],w=t?.hooks??[],_=t?.abs??[],E=k.useMemo(()=>{const T=new Map;for(const C of Mk(x))T.set(`${C.method}:${C.url}`,C.name);return T},[x]),R=t!==null&&h.length===0&&m.length===0&&g.length===0&&b.length===0&&x.length===0&&w.length===0&&_.length===0;return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:e?l?"pg-drawer open resizing":"pg-drawer open":"pg-drawer",style:{width:s},children:[v.jsx("div",{className:l?"pg-drawer-resizer dragging":"pg-drawer-resizer",role:"separator","aria-orientation":"vertical","aria-label":"Resize agent surface","aria-valuenow":s,"aria-valuemin":nv,"aria-valuemax":rv,tabIndex:0,onPointerDown:f,onKeyDown:T=>{T.key==="ArrowLeft"?(T.preventDefault(),a(C=>Sp(C-16))):T.key==="ArrowRight"?(T.preventDefault(),a(C=>Sp(C+16))):T.key==="Home"?(T.preventDefault(),a(nv)):T.key==="End"&&(T.preventDefault(),a(rv))}}),v.jsxs("div",{className:"head",children:[v.jsx("span",{children:"Agent surface"}),v.jsx("button",{type:"button",className:"link-btn",onClick:()=>ut.setDrawerOpen(!1),children:"Close"})]}),v.jsxs("div",{className:"body",children:[t===null?v.jsx("div",{className:"drawer-empty",children:"Loading…"}):null,R?v.jsx("div",{className:"drawer-empty",children:"No surface to show for this agent."}):null,h.length?v.jsx(Uo,{title:"Tools",children:h.map(T=>v.jsx(Xa,{name:T.name,detail:T.description},T.name))}):null,m.length?v.jsx(Uo,{title:"Skills",children:m.map(T=>v.jsx(Xa,{name:T.name,detail:T.description},T.name))}):null,g.length?v.jsx(Uo,{title:"Subagents",children:g.map(T=>v.jsx(Xa,{name:T.name,detail:T.description},T.name))}):null,b.length?v.jsx(Uo,{title:"MCP Connections",children:b.map(T=>v.jsx(Xa,{name:T.name,detail:T.transport},T.name))}):null,x.length?v.jsx(Uo,{title:"Channels",children:x.map(T=>v.jsxs("div",{className:"item",children:[v.jsx("div",{className:"n",children:T.id}),(T.routes??[]).length===0?v.jsx("div",{className:"d",children:"(events only)"}):v.jsx("div",{className:"channel-routes",children:(T.routes??[]).map(C=>{const A=T.id!=="http",N=`${C.method} ${C.url}`,I=E.get(`${C.method.toUpperCase()}:${C.url}`);return A?v.jsxs("div",{className:"channel-route",children:[v.jsx("code",{children:N}),I?v.jsx("code",{className:"channel-slash",title:"Composer slash command",children:I}):null,v.jsx("button",{type:"button",className:"link-btn",onClick:()=>r({channelId:T.id,route:C}),children:"Try"})]},N):v.jsx("div",{className:"channel-route",children:v.jsx("code",{children:N})},N)})})]},T.id))}):null,w.length?v.jsx(Uo,{title:"Hooks",children:w.map(T=>v.jsx(Xa,{name:T},T))}):null,_.length?v.jsx(Uo,{title:"A/Bs",children:_.map(T=>v.jsx(Xa,{name:T},T))}):null]})]}),n?v.jsx(IV,{channelId:n.channelId,route:n.route,onClose:()=>r(null)}):null]})}function Di(e){const t=e.at??null,n=e.ms??null;let r=e.startAt??null;return r===null&&t!==null&&n!==null&&n>0&&(r=t-n),r===null&&(r=t),{...e,startAt:r,at:t,ms:n}}function RO(e){const t=[];let n=null,r={};const s=new Map;let a=null,l="",c=null,p=1,f=0,h=0;function m(x){return n&&n.endedAt===null||(n={turnId:x?.turnId||`turn_${t.length+1}`,startedAt:x?.at?hl(x.at):null,endedAt:null,usage:null,rows:[],provisional:!0},t.push(n)),n}function g(x){m({turnId:x.turnId,at:null}).rows.push(x),x.ms&&x.ms>p&&(p=x.ms)}function b(x){if(a===null)return;const w=m(),_=x!==null&&a!==null?Math.max(0,x-a):null,E=l.trim()||void 0;w.rows.push(Di({kind:"think",label:E?ys(E,80):"thinking",body:E,ms:_,at:x,startAt:a})),_&&_>p&&(p=_),a=null,l=""}for(const x of e){const w=x.data||{},_=hl(x.at);switch(x.type){case"turn.started":n&&n.provisional&&n.endedAt===null?(n.turnId=x.turnId||n.turnId,n.startedAt=_,n.provisional=!1):(n={turnId:x.turnId||`turn_${t.length+1}`,startedAt:_,endedAt:null,usage:null,rows:[],provisional:!1},t.push(n)),a=null,l="",c=null;break;case"message.received":g(Di({kind:"user",label:ys(w.text,140),body:typeof w.text=="string"?w.text:void 0,at:_,startAt:_,ms:0,turnId:x.turnId}));break;case"reasoning.appended":if(typeof w.parentCallId=="string"&&w.parentCallId!=="")break;a===null&&(a=_),typeof w.text=="string"&&(l=w.text);break;case"reasoning.completed":if(typeof w.parentCallId=="string"&&w.parentCallId!=="")break;b(_);break;case"message.appended":if(typeof w.parentCallId=="string"&&w.parentCallId!=="")break;c===null&&(c=_);break;case"message.completed":{if(typeof w.parentCallId=="string"&&w.parentCallId!==""){const T=w.parentCallId;g(Di({kind:"agent",label:ys(w.text,160)||"(empty reply)",body:typeof w.text=="string"?w.text:void 0,at:_,startAt:_,ms:0,turnId:x.turnId,depth:1,parentCallId:T}));break}const E=c??_,R=E!==null&&_!==null?Math.max(0,_-E):null;g(Di({kind:"agent",label:ys(w.text,160)||"(empty reply)",body:typeof w.text=="string"?w.text:void 0,at:_,startAt:E,ms:R,turnId:x.turnId})),R&&R>p&&(p=R),c=null;break}case"actions.requested":for(const E of w.calls||[]){const R=typeof E.parentCallId=="string"&&E.parentCallId!==""?E.parentCallId:typeof w.parentCallId=="string"&&w.parentCallId!==""?w.parentCallId:void 0;if(R===void 0&&E.toolName==="task")continue;const T=R===void 0?E.callId:`${R}:${E.callId}`;r[T]={name:E.toolName,args:E.args,start:_,turnId:x.turnId,parentCallId:R}}break;case"action.result":{const E=w.callId;if(E==null)break;const R=typeof w.parentCallId=="string"&&w.parentCallId!==""?w.parentCallId:void 0;if(R===void 0&&w.toolName==="task"){delete r[E];break}const T=R===void 0?E:`${R}:${E}`,C=r[T];delete r[T];const A=C&&C.start!==null&&_!==null?_-C.start:null;f+=1,w.isError&&(h+=1);{const N=w.toolName||C?.name||"tool",I=C?.args;g(Di({kind:"tool",label:N+(I?` ${ys(sr(I,60),60)}`:""),toolName:N,callId:typeof E=="string"?E:String(E),toolArgs:I,toolOutput:w.output,body:typeof w.output=="string"?w.output:w.output!=null?sr(w.output,4e3):void 0,ms:A,error:!!w.isError,at:_,startAt:C?.start??null,turnId:x.turnId,depth:R===void 0?0:1,parentCallId:R}))}A&&A>p&&(p=A);break}case"subagent.called":{const E=`task:${w.name||"subagent"}`,R=typeof w.callId=="string"?w.callId:String(w.callId);r[`sub:${R}`]={name:E,args:w.description,start:_,turnId:x.turnId};const T=m(x);T.rows.push(Di({kind:"tool",label:E,toolName:E,callId:R,toolArgs:w.description,ms:null,at:_,startAt:_,turnId:x.turnId,depth:0})),s.set(R,{turn:T,index:T.rows.length-1});break}case"subagent.completed":{const E=typeof w.callId=="string"?w.callId:String(w.callId),R=`sub:${E}`,T=r[R];delete r[R];const C=T&&T.start!==null&&_!==null?_-T.start:null;f+=1;const A=s.get(E);s.delete(E);const N=A!==void 0?A.turn.rows[A.index]:void 0;N!==void 0&&N.kind==="tool"?(N.ms=C,N.at=_,C&&C>p&&(p=C)):g(Di({kind:"tool",label:T?.name||"subagent",toolName:T?.name||"subagent",callId:E,toolArgs:T?.args,ms:C,at:_,startAt:T?.start??null,turnId:x.turnId}));break}case"turn.completed":case"turn.failed":case"session.waiting":{if(x.type==="session.waiting"&&(n===null||n.endedAt!==null))break;const E=m(x);if((x.type==="turn.completed"||x.type==="turn.failed")&&(E.endedAt=_,E.usage=w.usage||null,E.failed=x.type==="turn.failed",E.error=w.message,E.startedAt!==null&&E.endedAt!==null)){const R=E.endedAt-E.startedAt;R>p&&(p=R),E.wallMs=R}if(b(_),c!==null&&_!==null){const R=Math.max(0,_-c);E.rows.push(Di({kind:"agent",label:"(streaming…)",ms:R,at:_,startAt:c})),c=null}for(const R of Object.keys(r)){const T=r[R],C=T.start!==null&&_!==null?_-T.start:null;E.rows.push(Di({kind:"tool",label:`${T.name||"tool"} (no result)`,ms:C,error:!0,at:_,startAt:T.start,turnId:T.turnId})),C&&C>p&&(p=C)}r={},(x.type==="turn.completed"||x.type==="turn.failed")&&(n=null);break}}}for(const x of Object.keys(r)){const w=r[x];g(Di({kind:"tool",label:`${w.name||"tool"} (running…)`,ms:null,at:w.start,startAt:w.start,turnId:w.turnId}))}return{turns:t,maxWallMs:p,totalTools:f,failedTools:h,eventCount:e.length}}function jV(e,t=6){if(!Number.isFinite(e)||e<=0)return[0];const n=e/Math.max(2,t-1),r=10**Math.floor(Math.log10(Math.max(n,1))),s=[1,2,2.5,5,10].map(c=>c*r),a=s.find(c=>n/c<=1.5)??s[s.length-1],l=[0];for(let c=a;c<e-a*.25&&(l.push(c),!(l.length>=t-1));c+=a);return l[l.length-1]!==e&&l.push(e),l}function LV({case:e}){const t=Object.entries(e.metrics??{});return t.length===0?null:v.jsx("div",{className:"eval-metrics","aria-label":"Eval metrics",children:t.map(([n,r])=>v.jsxs("span",{className:"eval-metric",title:n,children:[v.jsx("span",{className:"eval-metric-name",children:n}),v.jsx("span",{className:"eval-metric-value",children:String(r)})]},n))})}const PV="VulnScanner";function ml(e,t){const n=e?.[t];if(n===void 0)return;const r=String(n).trim();return r===""?void 0:r}function $V(e){return e.id==="overall"||e.id.endsWith("/overall")||(e.tags?.includes("summary")??!1)}function BV({case:e}){const t=ml(e.metrics,"recall");if(t===void 0){const n=Object.entries(e.metrics??{});return n.length===0?null:v.jsx("div",{className:"eval-metrics","aria-label":"Eval metrics",children:n.map(([r,s])=>v.jsxs("span",{className:"eval-metric",title:r,children:[v.jsx("span",{className:"eval-metric-name",children:r}),v.jsx("span",{className:"eval-metric-value",children:String(s)})]},r))})}return v.jsxs("div",{className:"eval-metrics","aria-label":"Eval metrics",children:[v.jsxs("span",{className:"eval-metric eval-metric-recall",title:"recall",children:[v.jsx("span",{className:"eval-metric-name",children:"recall"}),v.jsx("span",{className:"eval-metric-value",children:t})]}),Object.entries(e.metrics??{}).filter(([n])=>n!=="recall"&&n!=="matched"&&n!=="missing").map(([n,r])=>v.jsxs("span",{className:"eval-metric",title:n,children:[v.jsx("span",{className:"eval-metric-name",children:n}),v.jsx("span",{className:"eval-metric-value",children:String(r)})]},n))]})}function FV({case:e}){const t=ml(e.metrics,"matched"),n=ml(e.metrics,"missing");return t===void 0&&n===void 0?null:v.jsxs("div",{className:"eval-case-recall-detail",children:[t!==void 0?`matched=[${t}]`:null,t!==void 0&&n!==void 0?" ":null,n!==void 0?`missing=[${n}]`:null]})}function UV({run:e}){const t=[...e.cases].reverse().find(r=>$V(r)&&ml(r.metrics,"recall")!==void 0),n=ml(t?.metrics,"recall")??[...e.cases].map(r=>ml(r.metrics,"recall")).find(r=>r!==void 0);return n===void 0?null:v.jsxs("span",{className:"eval-run-recall",title:"Suite recall",children:[v.jsx("span",{className:"eval-run-recall-label",children:"recall"}),v.jsx("span",{className:"eval-run-recall-value",children:n})]})}const qV={RunSummary:UV,CaseMetrics:BV,CaseExtras:FV},HV=Object.freeze(Object.defineProperty({__proto__:null,agentName:PV,default:qV},Symbol.toStringTag,{value:"Module"})),GV=Object.assign({"../../../../../../factory/vulnerability-scanner/agent/playground/evals.tsx":HV});function VV(e){return/\/(?:examples|factory)\/([^/]+)\/agent\/playground\//.exec(e)?.[1]}const CO=new Map;for(const[e,t]of Object.entries(GV)){if(t?.default==null)continue;const n=typeof t.agentName=="string"&&t.agentName.trim()!==""?t.agentName.trim():void 0,r=VV(e),s=new Set;n!==void 0&&s.add(n),r!==void 0&&s.add(r);for(const a of s)CO.set(a,t.default)}function KV(e){if(!(e===void 0||e.trim()===""))return CO.get(e.trim())}const ZV={passed:"Pass",failed:"Fail",scored:"Scored",skipped:"Skipped"},WV={passed:"success",failed:"danger",scored:"warn",skipped:"neutral"};function YV(e){return e.verdict??(e.ok===!0?"passed":"failed")}function XV(e){const t=[];return e.score!==void 0&&t.push(`score=${e.score.toFixed(3)}${e.threshold===void 0?"":` >= ${e.threshold}`}`),e.detail!==void 0&&t.push(e.detail),t.length===0?"":` (${t.join(", ")})`}function AO(e,t=200){const[n,r]=k.useState(e);return k.useEffect(()=>{if(e){r(!0);return}if(!n)return;const s=window.setTimeout(()=>r(!1),t);return()=>window.clearTimeout(s)},[e,n,t]),e||n}const QV={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench"},JV={user:"User message",agent:"Assistant message",think:"Thinking",tool:"Tool call"};function eK({row:e}){const[t,n]=k.useState(!1),r=e.body!==void 0&&e.body.length>0||e.toolArgs!==void 0||e.toolOutput!==void 0,s=t&&r,a=AO(s);return v.jsxs("div",{className:`eval-step eval-step-${e.kind}${e.error?" error":""}`,children:[v.jsxs("button",{type:"button",className:"eval-step-head",disabled:!r,onClick:()=>n(l=>!l),"aria-expanded":t,children:[v.jsx("span",{className:"eval-step-kind",title:JV[e.kind],children:v.jsx(Mn,{name:QV[e.kind],size:"sm",color:e.error?"red":"secondary"})}),v.jsx("span",{className:"eval-step-label",title:e.label,children:e.kind==="tool"&&e.toolName!==void 0?e.toolName:e.label}),e.ms!=null&&e.ms>0?v.jsx("span",{className:"eval-step-ms",children:bi(e.ms)}):null,r?v.jsx("span",{className:t?"eval-chevron open":"eval-chevron",children:v.jsx(Mn,{name:"chevron-right",size:10})}):null]}),a?v.jsx("div",{className:s?"eval-collapse-clip":"eval-collapse-clip collapsed","aria-hidden":!s,inert:s?void 0:!0,children:v.jsxs("div",{className:"eval-step-detail",children:[e.kind==="tool"&&e.toolArgs!==void 0?v.jsxs("div",{className:"eval-step-block",children:[v.jsx("div",{className:"eval-step-block-label",children:"args"}),v.jsx("pre",{children:Al(e.toolArgs)})]}):null,e.kind==="tool"&&e.toolOutput!==void 0?v.jsxs("div",{className:"eval-step-block",children:[v.jsx("div",{className:"eval-step-block-label",children:e.error?"error":"result"}),v.jsx("pre",{children:typeof e.toolOutput=="string"?e.toolOutput:Al(e.toolOutput)})]}):null,e.kind!=="tool"&&e.body!==void 0?v.jsx("div",{className:"eval-step-block",children:v.jsx("pre",{children:e.body})}):null,e.kind==="tool"&&e.body!==void 0&&e.toolOutput===void 0?v.jsx("div",{className:"eval-step-block",children:v.jsx("pre",{children:e.body})}):null]})}):null]})}function tK({sessionId:e,live:t}){const[n,r]=k.useState([]),[s,a]=k.useState(null),[l,c]=k.useState(!0),[p,f]=k.useState(!1),h=k.useRef(null);k.useEffect(()=>{let g=!1;const b=new AbortController;return c(!0),a(null),r([]),f(!1),(async()=>{let x=-1;try{const w=await ut.api.eventsText(e);if(g)return;if(w.ok){const _=await w.text();if(g)return;const E=tv(_);for(const R of E)typeof R.index=="number"&&R.index>x&&(x=R.index);r(E)}}catch(w){g||a(w instanceof Error?w.message:String(w))}finally{g||c(!1)}if(!(!t||g)){f(!0);try{const w=await ut.api.streamFetch(e,x+1,b.signal);if(!w.ok||!w.body){g||(a(`Stream failed (${w.status})`),f(!1));return}const _=w.body.getReader(),E=new TextDecoder;let R="";for(;;){const{done:T,value:C}=await _.read();if(T||g)break;R+=E.decode(C,{stream:!0});const A=R.split(`
|
|
35
|
-
`);R=A.pop()??"";const N=[];for(const I of A){const F=I.trim();if(F)try{const V=JSON.parse(F);N.push(V),typeof V.index=="number"&&V.index>x&&(x=V.index)}catch{}}N.length>0&&!g&&r(I=>[...I,...N])}}catch(w){!g&&!(w instanceof DOMException&&w.name==="AbortError")&&a(w instanceof Error?w.message:String(w))}finally{g||f(!1)}}})(),()=>{g=!0,b.abort()}},[e,t]),k.useEffect(()=>{t&&h.current&&h.current.scrollIntoView({block:"nearest"})},[n.length,t]);const m=k.useMemo(()=>RO(n),[n]);return l&&n.length===0?v.jsxs("div",{className:"eval-trace",children:[v.jsx("span",{className:"spin"})," Loading session trace…"]}):s!==null&&n.length===0?v.jsx("div",{className:"eval-error",children:s}):m.turns.length===0?v.jsx("div",{className:"eval-trace",children:v.jsx("div",{className:"eval-trace-empty",children:t?v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"spin"})," Waiting for first events…"]}):"No events in this session."})}):v.jsxs("div",{className:"eval-trace",children:[v.jsxs("div",{className:"eval-trace-meta",children:[m.eventCount," events · ",m.totalTools," tool",m.totalTools===1?"":"s",m.failedTools>0?` · ${m.failedTools} failed`:"",t||p?v.jsxs(v.Fragment,{children:[" · ",v.jsxs("span",{className:"eval-live",children:[v.jsx("span",{className:"spin"})," live"]})]}):null]}),s!==null?v.jsx("div",{className:"eval-error",children:s}):null,m.turns.map((g,b)=>v.jsxs("div",{className:"eval-turn",children:[v.jsxs("div",{className:"eval-turn-head",children:["Turn ",b+1,g.failed?" · failed":"",g.wallMs!=null&&g.wallMs>0?` · ${bi(g.wallMs)}`:""]}),g.rows.map((x,w)=>v.jsx(eK,{row:x},`${g.turnId}-${w}-${x.kind}`))]},g.turnId)),v.jsx("div",{ref:h})]})}function nK({c:e}){const t=e.inputs??[],n=e.toolCalls??[];return t.length>0||e.finalText!==void 0||n.length>0||e.tools!==void 0&&e.tools.length>0?v.jsxs("div",{className:"eval-io",children:[v.jsxs("div",{className:"eval-io-section",children:[v.jsx("div",{className:"eval-io-heading",children:"Inputs"}),t.length===0?v.jsx("div",{className:"eval-trace-empty",children:"None yet"}):t.map((s,a)=>v.jsxs("div",{className:"eval-step-block",children:[v.jsxs("div",{className:"eval-step-block-label",children:["message ",t.length>1?a+1:""]}),v.jsx("pre",{children:s})]},`in-${a}`))]}),v.jsxs("div",{className:"eval-io-section",children:[v.jsx("div",{className:"eval-io-heading",children:"Tool calls"}),n.length===0?v.jsx("div",{className:"eval-trace-empty",children:e.tools&&e.tools.length>0?e.tools.join(", "):"None"}):n.map((s,a)=>v.jsxs("div",{className:`eval-step eval-step-tool${s.isError?" error":""}`,children:[v.jsxs("div",{className:"eval-step-head",style:{cursor:"default"},children:[v.jsx("span",{className:"eval-step-kind",title:"Tool call",children:v.jsx(Mn,{name:"wrench",size:"sm",color:s.isError?"red":"secondary"})}),v.jsx("span",{className:"eval-step-label",children:s.toolName})]}),v.jsxs("div",{className:"eval-step-detail",children:[s.args!==void 0?v.jsxs("div",{className:"eval-step-block",children:[v.jsx("div",{className:"eval-step-block-label",children:"args"}),v.jsx("pre",{children:Al(s.args)})]}):null,s.output!==void 0?v.jsxs("div",{className:"eval-step-block",children:[v.jsx("div",{className:"eval-step-block-label",children:s.isError?"error":"result"}),v.jsx("pre",{children:typeof s.output=="string"?s.output:Al(s.output)})]}):null]})]},`tc-${a}-${s.toolName}`))]}),v.jsxs("div",{className:"eval-io-section",children:[v.jsx("div",{className:"eval-io-heading",children:"Output"}),e.finalText!==void 0&&e.finalText!==""?v.jsxs("div",{className:"eval-step-block",children:[v.jsx("div",{className:"eval-step-block-label",children:"final reply"}),v.jsx("pre",{children:e.finalText})]}):v.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?"Waiting for reply…":"No final reply"})]})]}):v.jsx("div",{className:"eval-io",children:v.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?"Waiting for inputs / outputs…":"No captured inputs or outputs."})})}function rK({c:e,batchRunning:t,customization:n}){const[r,s]=k.useState(!1),[a,l]=k.useState(!1),c=r||a,p=AO(c),f=k.useRef({io:!1,expanded:!1});c&&(f.current={io:a,expanded:r});const h=c?a:f.current.io,m=c?r:f.current.expanded,g=YV(e),b=e.status==="pending"?"Queued":e.status==="running"?"Running":ZV[g],x=e.status==="done"?WV[g]:e.status==="running"?"accent":"neutral",w=e.sessionId!==void 0||e.status==="done"||e.status==="running",_=e.status==="done"||e.status==="running"||e.inputs!==void 0&&e.inputs.length>0||e.finalText!==void 0,E=n?.CaseMetrics,R=n?.CaseExtras;return v.jsxs("div",{className:`eval-case${r||a?" expanded":""}`,children:[v.jsxs("div",{className:"eval-case-head",children:[v.jsxs("button",{type:"button",className:"eval-id-btn",disabled:!w,"aria-expanded":r,title:w?r?"Collapse":"Expand live trace":void 0,onClick:()=>s(T=>!T),children:[v.jsx("span",{className:r?"eval-chevron open":"eval-chevron",children:v.jsx(Mn,{name:"chevron-right",size:10})}),v.jsx(sa,{variant:x,size:"sm",children:b}),v.jsx("span",{className:"eval-id",children:e.id})]}),e.durationMs!==void 0?v.jsxs("span",{className:"eval-dur",children:[(e.durationMs/1e3).toFixed(1),"s"]}):null,_?v.jsx(Ln,{variant:a?"secondary":"ghost",size:"sm",onClick:()=>l(T=>!T),title:"View eval inputs, tool results, and final output",children:"I/O"}):null,e.sessionId!==void 0?v.jsxs(v.Fragment,{children:[v.jsx(Ln,{variant:"ghost",size:"sm",onClick:()=>{ut.openEvalCaseTrace(e.sessionId)},children:"Full trace"}),v.jsx(Ln,{variant:"ghost",size:"sm",onClick:()=>{ut.openEvalCaseSession(e.sessionId)},children:"Chat"})]}):null]}),e.description!==void 0?v.jsx("div",{className:"eval-desc",children:e.description}):null,E!==void 0?v.jsx(E,{case:e,batchRunning:t}):v.jsx(LV,{case:e}),R!==void 0?v.jsx(R,{case:e,batchRunning:t}):null,e.error!==void 0?v.jsxs("div",{className:"eval-error",children:["error: ",e.error]}):null,e.skipReason!==void 0?v.jsxs("div",{className:"eval-desc",children:["skipped: ",e.skipReason]}):null,e.assertions!==void 0&&e.assertions.length>0?v.jsx("ul",{className:"eval-assertions",children:e.assertions.map(T=>v.jsxs("li",{className:T.passed||T.severity==="soft"?"":"fail",children:[T.passed?"✓":T.severity==="soft"?"~":"✗"," ",T.name,XV(T)]},`${T.name}-${T.passed}-${T.detail??""}`))}):null,e.logs!==void 0&&e.logs.length>0?v.jsx("ul",{className:"eval-assertions eval-logs",children:e.logs.map((T,C)=>v.jsx("li",{children:T},`${C}:${T}`))}):null,p?v.jsxs("div",{className:c?"eval-collapse-clip":"eval-collapse-clip collapsed","aria-hidden":!c,inert:c?void 0:!0,children:[h?v.jsx(nK,{c:e}):null,m&&e.sessionId!==void 0?v.jsx(tK,{sessionId:e.sessionId,live:e.status==="running"&&t},e.sessionId):null,m&&e.sessionId===void 0?v.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"spin"})," ",IT(e)?"Aggregating sibling cases…":"Waiting for session…"]}):IT(e)?v.jsxs(v.Fragment,{children:["Suite summary (no agent session)",e.finalText!==void 0?v.jsx("pre",{className:"eval-final-text",children:e.finalText}):null]}):v.jsxs(v.Fragment,{children:["No session for this case",e.finalText!==void 0?v.jsx("pre",{className:"eval-final-text",children:e.finalText}):null]})}):null]}):null]})}function IT(e){return e.id==="overall"||e.id.endsWith("/overall")||(e.tags?.includes("summary")??!1)}function DT({runs:e,selectedId:t}){return e.length===0?null:v.jsxs("div",{className:"eval-history","aria-label":"Recent eval runs",children:[v.jsx("div",{className:"eval-history-label",children:"Recent runs"}),v.jsx("div",{className:"eval-history-list",children:e.map(n=>{const r=n.runId===t,s=Gh(n.finishedAt??n.startedAt);return v.jsxs("button",{type:"button",className:r?"eval-history-chip active":"eval-history-chip",title:n.runId,onClick:()=>{ut.selectEvalRun(n.runId)},children:[n.status==="running"?v.jsx("span",{className:"spin"}):null,v.jsx("span",{className:"eval-history-chip-id",children:n.runId}),v.jsxs("span",{className:"eval-history-chip-meta",children:[n.summary.passed,"/",n.summary.total,s!==null?` · ${s}`:""]})]},n.runId)})})]})}function iK(){const e=lt(g=>g.evalRun),t=lt(g=>g.evalRuns),n=lt(g=>g.evalCases),r=lt(g=>g.evalConfig),s=lt(g=>g.meta.name),a=k.useMemo(()=>KV(s),[s]),l=e?.status==="running",c=a?.RunSummary;if(e===null)return v.jsxs("div",{className:"pg-evals",children:[v.jsx(DT,{runs:t,selectedId:void 0}),v.jsxs("div",{className:"eval-empty",children:[v.jsx("p",{children:"No eval run selected."}),v.jsxs("p",{className:"eval-hint",children:[n.length>0?`${n.length} case${n.length===1?"":"s"} discovered.`:"No evals/ cases found for this agent.",r?.maxConcurrency!==void 0?` Concurrency: ${r.maxConcurrency}.`:""]}),n.length>0?v.jsx("p",{className:"eval-hint",children:r?.durableRuns===!0?`Runs persist via the agent/storage.ts evals table (keeps last ${r.maxPlaygroundRuns??20}).`:`Runs stay in memory only (last ${r?.maxPlaygroundRuns??20}); lost when serve exits. Add an evals table to agent/storage.ts to keep them.`}):null,n.length>0?v.jsx(Ln,{variant:"secondary",size:"sm",disabled:l,onClick:()=>{ut.startEvalRun()},children:"Run all"}):null]})]});const{summary:p,status:f}=e,h=f==="failed"||f==="cancelled"?"danger":l?"accent":"success",m=f==="failed"?"Failed":f==="cancelled"?"Cancelled":l?"Running":"Completed";return v.jsxs("div",{className:"pg-evals",children:[v.jsx(DT,{runs:t,selectedId:e.runId}),v.jsxs("div",{className:"eval-summary",children:[v.jsx(sa,{variant:h,size:"sm",children:m}),v.jsx("span",{className:"eval-id",title:"Eval ID",children:e.runId}),v.jsxs("span",{children:[p.done,"/",p.total," done · ",p.passed," passed ·"," ",p.failed," failed",p.scored!==void 0&&p.scored>0?` · ${p.scored} scored`:"",p.skipped!==void 0&&p.skipped>0?` · ${p.skipped} skipped`:""]}),c!==void 0?v.jsx(c,{run:e}):null,l?v.jsx("span",{className:"spin"}):null,e.error!==void 0?v.jsx("span",{className:"eval-error",children:e.error}):null,v.jsxs("div",{className:"eval-actions",children:[l?v.jsx(Ln,{variant:"secondary",size:"sm",onClick:()=>{ut.cancelEvalRun(e.runId)},children:"Cancel"}):null,n.length>0?v.jsx(Ln,{variant:"secondary",size:"sm",disabled:l,onClick:()=>{ut.startEvalRun()},children:"Run all"}):null]})]}),v.jsx("div",{className:"eval-case-list",children:e.cases.map(g=>v.jsx(rK,{c:g,batchRunning:l,customization:a},g.id))})]})}function Qa(e,t,n){let r=n.initialDeps??[],s,a=!0;function l(){var c,p,f;let h;n.key&&((c=n.debug)!=null&&c.call(n))&&(h=Date.now());const m=e();if(!(m.length!==r.length||m.some((x,w)=>r[w]!==x)))return s;r=m;let b;if(n.key&&((p=n.debug)!=null&&p.call(n))&&(b=Date.now()),s=t(...m),n.key&&((f=n.debug)!=null&&f.call(n))){const x=Math.round((Date.now()-h)*100)/100,w=Math.round((Date.now()-b)*100)/100,_=w/16,E=(R,T)=>{for(R=String(R);R.length<T;)R=" "+R;return R};console.info(`%c⏱ ${E(w,5)} /${E(x,5)} ms`,`
|
|
36
|
-
font-size: .6rem;
|
|
37
|
-
font-weight: bold;
|
|
38
|
-
color: hsl(${Math.max(0,Math.min(120-120*_,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(s),a=!1,s}return l.updateDeps=c=>{r=c},l}function zT(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const sK=(e,t)=>Math.abs(e-t)<1.01,oK=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},jT=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},aK=e=>e,lK=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let s=t;s<=n;s++)r.push(s);return r},uK=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const s=l=>{const{width:c,height:p}=l;t({width:Math.round(c),height:Math.round(p)})};if(s(jT(n)),!r.ResizeObserver)return()=>{};const a=new r.ResizeObserver(l=>{const c=()=>{const p=l[0];if(p?.borderBoxSize){const f=p.borderBoxSize[0];if(f){s({width:f.inlineSize,height:f.blockSize});return}}s(jT(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},LT={passive:!0},PT=typeof window>"u"?!0:"onscrollend"in window,cK=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const a=e.options.useScrollendEvent&&PT?()=>{}:oK(r,()=>{t(s,!1)},e.options.isScrollingResetDelay),l=h=>()=>{const{horizontal:m,isRtl:g}=e.options;s=m?n.scrollLeft*(g&&-1||1):n.scrollTop,a(),t(s,h)},c=l(!0),p=l(!1);n.addEventListener("scroll",c,LT);const f=e.options.useScrollendEvent&&PT;return f&&n.addEventListener("scrollend",p,LT),()=>{n.removeEventListener("scroll",c),f&&n.removeEventListener("scrollend",p)}},fK=(e,t,n)=>{if(t?.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},dK=(e,{adjustments:t=0,behavior:n},r)=>{var s,a;const l=e+t;(a=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||a.call(s,{[r.options.horizontal?"left":"top"]:l,behavior:n})};class pK{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var n,r,s;return((s=(r=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:r.now)==null?void 0:s.call(r))??Date.now()},this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(a=>{const l=()=>{const c=a.target,p=this.indexFromElement(c);if(!c.isConnected){this.observer.unobserve(c);return}this.shouldMeasureDuringScroll(p)&&this.resizeItem(p,this.options.measureElement(c,a,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),n=null},observe:s=>{var a;return(a=r())==null?void 0:a.observe(s,{box:"border-box"})},unobserve:s=>{var a;return(a=r())==null?void 0:a.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,s])=>{typeof s>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:aK,rangeExtractor:lK,onChange:()=>{},measureElement:fK,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,n)},this.maybeNotify=Qa(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=a,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const s=new Map,a=new Map;for(let l=r-1;l>=0;l--){const c=n[l];if(s.has(c.lane))continue;const p=a.get(c.lane);if(p==null||c.end>p.end?a.set(c.lane,c):c.end<p.end&&s.set(c.lane,!0),s.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((l,c)=>l.end===c.end?l.index-c.index:l.end-c.end)[0]:void 0},this.getMeasurementOptions=Qa(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,r,s,a,l,c)=>(this.prevLanes!==void 0&&this.prevLanes!==c&&(this.lanesChangedFlag=!0),this.prevLanes=c,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:s,getItemKey:a,enabled:l,lanes:c}),{key:!1}),this.getMeasurements=Qa(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:a,enabled:l,lanes:c},p)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const g of this.laneAssignments.keys())g>=n&&this.laneAssignments.delete(g);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(g=>{this.itemSizeCache.set(g.key,g.size)}));const f=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const h=this.measurementsCache.slice(0,f),m=new Array(c).fill(void 0);for(let g=0;g<f;g++){const b=h[g];b&&(m[b.lane]=g)}for(let g=f;g<n;g++){const b=a(g),x=this.laneAssignments.get(g);let w,_;if(x!==void 0&&this.options.lanes>1){w=x;const C=m[w],A=C!==void 0?h[C]:void 0;_=A?A.end+this.options.gap:r+s}else{const C=this.options.lanes===1?h[g-1]:this.getFurthestMeasurement(h,g);_=C?C.end+this.options.gap:r+s,w=C?C.lane:g%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(g,w)}const E=p.get(b),R=typeof E=="number"?E:this.options.estimateSize(g),T=_+R;h[g]={index:g,start:_,size:R,end:T,key:b,lane:w},m[w]=g}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Qa(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,s,a)=>this.range=n.length>0&&r>0?hK({measurements:n,outerSize:r,scrollOffset:s,lanes:a}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Qa(()=>{let n=null,r=null;const s=this.calculateRange();return s&&(n=s.startIndex,r=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,s,a,l)=>a===null||l===null?[]:n({startIndex:a,endIndex:l,overscan:r,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,s=n.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const s=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(s!==void 0&&this.range){const a=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),l=Math.max(0,s-a),c=Math.min(this.options.count-1,s+a);return n>=l&&n<=c}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((l,c)=>{l.isConnected||(this.observer.unobserve(l),this.elementsCache.delete(c))});return}const r=this.indexFromElement(n),s=this.options.getItemKey(r),a=this.elementsCache.get(s);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(s,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,r)=>{var s;const a=this.measurementsCache[n];if(!a)return;const l=this.itemSizeCache.get(a.key)??a.size,c=r-l;c!==0&&(((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(a,c,this):a.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=c,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(a.index),this.itemSizeCache=new Map(this.itemSizeCache.set(a.key,r)),this.notify(!1))},this.getVirtualItems=Qa(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let a=0,l=n.length;a<l;a++){const c=n[a],p=r[c];s.push(p)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return zT(r[NO(0,r.length-1,s=>zT(r[s]).start,n)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(n,r,s=0)=>{if(!this.scrollElement)return 0;const a=this.getSize(),l=this.getScrollOffset();r==="auto"&&(r=n>=l+a?"end":"start"),r==="center"?n+=(s-a)/2:r==="end"&&(n-=a);const c=this.getMaxScrollOffset();return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.getSize(),a=this.getScrollOffset(),l=this.measurementsCache[n];if(!l)return;if(r==="auto")if(l.end>=a+s-this.options.scrollPaddingEnd)r="end";else if(l.start<=a+this.options.scrollPaddingStart)r="start";else return[a,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const c=r==="end"?l.end+this.options.scrollPaddingEnd:l.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(c,r,l.size),r]},this.scrollToOffset=(n,{align:r="start",behavior:s="auto"}={})=>{const a=this.getOffsetForAlignment(n,r),l=this.now();this.scrollState={index:null,align:r,behavior:s,startedAt:l,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:r="auto",behavior:s="auto"}={})=>{n=Math.max(0,Math.min(n,this.options.count-1));const a=this.getOffsetForIndex(n,r);if(!a)return;const[l,c]=a,p=this.now();this.scrollState={index:n,align:c,behavior:s,startedAt:p,lastTargetOffset:l,stableFrames:0},this._scrollToOffset(l,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:r="auto"}={})=>{const s=this.getScrollOffset()+n,a=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:a,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=r[r.length-1])==null?void 0:n.end)??0;else{const a=Array(this.options.lanes).fill(null);let l=r.length-1;for(;l>=0&&a.some(c=>c===null);){const c=r[l];a[c.lane]===null&&(a[c.lane]=c.end),l--}s=Math.max(...a.filter(c=>c!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,s=r?r[0]:this.scrollState.lastTargetOffset,a=1,l=s!==this.scrollState.lastTargetOffset;if(!l&&sK(s,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=a){this.scrollState=null;return}}else this.scrollState.stableFrames=0,l&&(this.scrollState.lastTargetOffset=s,this.scrollState.behavior="auto",this._scrollToOffset(s,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const NO=(e,t,n,r)=>{for(;e<=t;){const s=(e+t)/2|0,a=n(s);if(a<r)e=s+1;else if(a>r)t=s-1;else return s}return e>0?e-1:0};function hK({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const s=e.length-1,a=p=>e[p].start;if(e.length<=r)return{startIndex:0,endIndex:s};let l=NO(0,s,a,n),c=l;if(r===1)for(;c<s&&e[c].end<n+t;)c++;else if(r>1){const p=Array(r).fill(0);for(;c<s&&p.some(h=>h<n+t);){const h=e[c];p[h.lane]=h.end,c++}const f=Array(r).fill(n+t);for(;l>=0&&f.some(h=>h>=n);){const h=e[l];f[h.lane]=h.start,l--}l=Math.max(0,l-l%r),c=Math.min(s,c+(r-1-c%r))}return{startIndex:l,endIndex:c}}const $T=typeof document<"u"?k.useLayoutEffect:k.useEffect;function mK({useFlushSync:e=!0,...t}){const n=k.useReducer(()=>({}),{})[1],r={...t,onChange:(a,l)=>{var c;e&&l?Ci.flushSync(n):n(),(c=t.onChange)==null||c.call(t,a,l)}},[s]=k.useState(()=>new pK(r));return s.setOptions(r),$T(()=>s._didMount(),[]),$T(()=>s._willUpdate()),s}function OO(e){return mK({observeElementRect:uK,observeElementOffset:cK,scrollToFn:dK,...e})}function gK(){const[e,t]=k.useState([]),[n,r]=k.useState(null),s=k.useRef(-1),a=k.useRef(null),l=e.length,c=OO({count:l,getScrollElement:()=>a.current,estimateSize:()=>18,overscan:24});return k.useEffect(()=>{let p=!1;const f=async()=>{const m=await ut.api.logs(s.current);if(p)return;if(!m.ok||m.body===null){r(`logs failed (${m.status})`);return}r(null);const g=m.body.entries??[];g.length>0&&(s.current=m.body.nextAfter,t(b=>{const x=b.concat(g);return x.length>2e3?x.slice(x.length-2e3):x}))};f();const h=window.setInterval(()=>{f()},1e3);return()=>{p=!0,window.clearInterval(h)}},[]),k.useEffect(()=>{l>0&&c.scrollToIndex(l-1,{align:"end"})},[l,c]),n!==null&&l===0?v.jsx("div",{className:"pg-raw",children:v.jsx(kc,{className:"pg-empty",message:n})}):l===0?v.jsx("div",{className:"pg-raw",children:v.jsx(kc,{className:"pg-empty",message:"Waiting for agent logs… webhook captures and session activity appear here."})}):v.jsxs("div",{className:"pg-raw",children:[v.jsx("div",{className:"head",children:"Agent logs"}),v.jsx("div",{className:"raw-lines",ref:a,children:v.jsx("div",{style:{height:c.getTotalSize(),position:"relative",width:"100%"},children:c.getVirtualItems().map(p=>{const f=e[p.index];if(f===void 0)return null;const h=f.at.slice(11,19);return v.jsxs("div",{"data-index":p.index,ref:c.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${p.start}px)`},children:[v.jsxs("span",{className:"elog-time",children:[h," "]}),v.jsx("span",{children:f.line})]},p.key)})})})]})}const MO=48;function bK(e){return e.scrollHeight-e.scrollTop-e.clientHeight}function yK(e,t=MO){return bK(e)<=t}function Kb(e){e.scrollTop=e.scrollHeight}function IO(e){const{contentKey:t,latchKey:n,thresholdPx:r=MO}=e,s=k.useRef(null),a=k.useRef(!0);return k.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current=yK(l,r)};return l.addEventListener("scroll",c,{passive:!0}),()=>l.removeEventListener("scroll",c)},[r,t,n]),k.useLayoutEffect(()=>{if(n===void 0)return;a.current=!0;const l=s.current;l&&Kb(l)},[n]),k.useLayoutEffect(()=>{if(!a.current)return;const l=s.current;l&&Kb(l)},[t]),k.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current&&Kb(l)};c();const p=new Set,f=new ResizeObserver(c),h=b=>{p.has(b)||(p.add(b),f.observe(b))},m=b=>{h(b);for(const x of b.children)m(x)};m(l);const g=new MutationObserver(b=>{for(const x of b)x.addedNodes.forEach(w=>{w instanceof Element&&m(w)});c()});return g.observe(l,{childList:!0,subtree:!0}),()=>{f.disconnect(),g.disconnect()}},[t,n]),{scrollRef:s}}function vK(){const e=lt(a=>a.traceEvents),t=lt(a=>a.current),n=e.length,{scrollRef:r}=IO({contentKey:n,latchKey:`${t?.sessionId??"none"}:${n}`}),s=OO({count:n,getScrollElement:()=>r.current,estimateSize:()=>18,overscan:24});return n===0?v.jsx("div",{className:"pg-raw",children:v.jsx(kc,{className:"pg-empty",message:"Select a session or Open trace to see the raw event stream."})}):v.jsxs("div",{className:"pg-raw",children:[v.jsx("div",{className:"head",children:"Raw NDJSON stream"}),v.jsx("div",{className:"raw-lines",ref:r,children:v.jsx("div",{style:{height:s.getTotalSize(),position:"relative",width:"100%"},children:s.getVirtualItems().map(a=>{const l=e[a.index];return v.jsxs("div",{"data-index":a.index,ref:s.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${a.start}px)`},children:[v.jsx("span",{children:`[${l.index??a.index}] `}),v.jsx("span",{className:"etype",children:l.type}),v.jsx("span",{children:` ${sr(l.data,240)}`})]},a.key)})})})]})}const DO="agent-serve.playground.sidebarWidth",Zb=280,iv=200,sv=560,kK={github:"logo-github",slack:"logo-slack"};function wp(e){return Math.min(sv,Math.max(iv,e))}function xK(){try{const e=localStorage.getItem(DO);if(e===null)return Zb;const t=Number.parseInt(e,10);return Number.isFinite(t)?wp(t):Zb}catch{return Zb}}function SK({channelId:e,mode:t,running:n}){if(n)return v.jsx("span",{className:"spin"});const r=kK[e]??(t==="task"?"clock":null);return r===null?null:v.jsx("span",{className:"session-mark",title:e,children:v.jsx(Mn,{name:r,size:"sm",color:"secondary"})})}function wK({summary:e}){const n=lt(c=>c.current)?.sessionId===e.sessionId,r=`${e.turnCount} turn${e.turnCount===1?"":"s"}`,s=Gh(e.updatedAt),a=(()=>{if(!e.updatedAt)return null;const c=new Date(e.updatedAt);return Number.isNaN(c.getTime())?`Last turn ${e.updatedAt}`:`Last turn ${c.toLocaleString()}`})(),l=[e.sessionId,`${e.channelId} · ${r}`,a].filter(Boolean).join(`
|
|
39
|
-
`);return v.jsxs("button",{type:"button",className:n?"session-item active":"session-item",onClick:()=>{ut.selectSession(e),ut.setView("chat")},title:l,children:[v.jsx(SK,{channelId:e.channelId,mode:e.mode,running:e.running===!0}),v.jsx("span",{className:e.title?"name":"name name-id",children:e.title||e.sessionId}),e.externalUrl?v.jsx("a",{className:"ext-link",href:e.externalUrl,target:"_blank",rel:"noopener noreferrer",title:"Open in Slack",onClick:c=>c.stopPropagation(),children:v.jsx(Mn,{name:"link-external",size:"xs",color:"tertiary"})}):null,s!==null?v.jsx("span",{className:"session-when",children:s}):null]})}function EK(e){try{return localStorage.getItem(`agent-serve.playground.section.${e}`)==="1"}catch{return!1}}function zO({id:e,label:t,actions:n,children:r}){const[s,a]=k.useState(()=>EK(e)),l=()=>{a(c=>{const p=!c;try{localStorage.setItem(`agent-serve.playground.section.${e}`,p?"1":"0")}catch{}return p})};return v.jsxs("div",{className:"side-section",children:[v.jsxs("div",{className:s?"side-head":"side-head collapsed",children:[v.jsxs("button",{type:"button",className:"side-head-toggle","aria-expanded":s,onClick:l,children:[v.jsx("span",{className:"side-head-label",children:t}),v.jsx("span",{className:"side-head-chevron",children:v.jsx(Mn,{name:"chevron-right",size:10})})]}),n!==void 0?v.jsx("span",{className:"actions",children:n}):null]}),v.jsx("div",{className:s?"side-section-body":"side-section-body collapsed","aria-hidden":!s,inert:s?void 0:!0,children:r})]})}function ip({icon:e,label:t,onClick:n,title:r}){return v.jsxs("button",{type:"button",className:"side-nav-item",onClick:n,title:r,children:[v.jsx(Mn,{name:e,size:"base",color:"secondary"}),v.jsx("span",{className:"label",children:t})]})}function TK(){const e=lt(r=>r.info),t=lt(r=>r.meta.dev),n=e?.schedules||[];return n.length===0?null:v.jsx(zO,{id:"schedules",label:"Schedules",children:v.jsx("div",{className:"schedule-list",children:n.map(r=>v.jsxs("div",{className:"schedule-item",children:[v.jsxs("div",{children:[v.jsx("div",{className:"schedule-name",children:r.name}),v.jsx("div",{className:"cron",children:r.cron})]}),v.jsx(Ln,{variant:"ghost",size:"sm",disabled:!t,title:t?void 0:"Start the server with --dev to dispatch schedules by hand",onClick:()=>{ut.dispatchSchedule(r.name)},children:"Dispatch"})]},r.name))})})}function _K(e){return e==="running"?"Running":e==="failed"?"Failed":e==="cancelled"?"Cancelled":"Done"}function RK({run:e}){const n=lt(p=>p.evalRun?.runId)===e.runId,{summary:r,status:s}=e,a=Gh(e.finishedAt??e.startedAt),l=`${r.passed}/${r.total}`,c=[e.runId,_K(s),`${r.done}/${r.total} done · ${r.passed} passed · ${r.failed} failed`,e.startedAt].join(`
|
|
40
|
-
`);return v.jsxs("button",{type:"button",className:n?"eval-run-item active":"eval-run-item",onClick:()=>{ut.selectEvalRun(e.runId)},title:c,children:[v.jsxs("span",{className:"eval-run-item-main",children:[s==="running"?v.jsx("span",{className:"spin"}):null,v.jsx("span",{className:"eval-run-item-id",children:e.runId})]}),v.jsxs("span",{className:"eval-run-item-meta",children:[v.jsx("span",{className:"eval-run-item-counts",children:l}),a!==null?v.jsx("span",{className:"eval-run-item-time",children:a}):null]})]})}function CK(){const e=lt(s=>s.evalCases),t=lt(s=>s.evalRun),n=lt(s=>s.evalRuns),r=t?.status==="running";return e.length===0&&t===null&&n.length===0?null:v.jsxs(zO,{id:"evals",label:"Evals",actions:v.jsxs(v.Fragment,{children:[v.jsx(Ln,{variant:"ghost",size:"sm",disabled:r||e.length===0,title:r?"Eval run in progress":void 0,onClick:()=>{ut.startEvalRun()},children:"Run all"}),t!==null||n.length>0?v.jsx(Ln,{variant:"ghost",size:"sm",onClick:()=>ut.setView("evals"),children:"Results"}):null]}),children:[e.length===0?v.jsx("div",{className:"eval-side-empty",children:"No evals/ cases found"}):v.jsx("div",{className:"schedule-list",children:e.map(s=>{const a=s.id.endsWith("/overall")||(s.tags?.includes("summary")??!1);return v.jsxs("div",{className:"schedule-item",children:[v.jsxs("div",{children:[v.jsx("div",{className:"eval-side-id",children:s.id}),s.tags!==void 0&&s.tags.length>0?v.jsx("div",{className:"cron",children:s.tags.join(", ")}):null]}),v.jsx(Ln,{variant:"ghost",size:"sm",disabled:r,title:a?`Runs full ${s.fileId} suite (summary needs siblings)`:void 0,onClick:()=>{ut.startEvalRun([s.id])},children:"Run"})]},s.id)})}),n.length>0?v.jsxs("div",{className:"eval-recent-runs",children:[v.jsx("div",{className:"eval-recent-runs-label",children:"Recent runs"}),v.jsx("div",{className:"eval-run-list",children:n.map(s=>v.jsx(RK,{run:s},s.runId))})]}):null]})}function AK(){const e=lt(R=>R.meta.name),t=lt(R=>R.meta.dev),n=lt(R=>R.meta.indexPath),r=lt(R=>R.health),s=lt(R=>R.info),a=lt(R=>R.sessions),l=k.useRef(null),[c,p]=k.useState(xK),[f,h]=k.useState(!1),[m,g]=k.useState(""),b=k.useRef(c);b.current=c;const x=k.useMemo(()=>{const R=m.trim().toLowerCase();return R===""?a:a.filter(T=>T.sessionId.toLowerCase().includes(R))},[a,m]),w=k.useCallback(R=>{R?.preventDefault();const T=m.trim();if(T==="")return;const C=a.find(A=>A.sessionId===T);if(C!==void 0){ut.selectSession(C),ut.setView("chat");return}if(x.length===1){ut.selectSession(x[0]),ut.setView("chat");return}x.length===0&&ut.openSessionById(T)},[m,a,x]);k.useEffect(()=>{try{localStorage.setItem(DO,String(c))}catch{}},[c]);const _=k.useCallback(R=>{R.preventDefault();const T=R.currentTarget,C=R.clientX,A=b.current;T.setPointerCapture(R.pointerId),h(!0),document.body.classList.add("pg-resizing-sidebar");const N=F=>{p(wp(A+(F.clientX-C)))},I=F=>{T.releasePointerCapture(F.pointerId),T.removeEventListener("pointermove",N),T.removeEventListener("pointerup",I),T.removeEventListener("pointercancel",I),h(!1),document.body.classList.remove("pg-resizing-sidebar")};T.addEventListener("pointermove",N),T.addEventListener("pointerup",I),T.addEventListener("pointercancel",I)},[]),E=R=>{if(!R)return;const T=new FileReader;T.onload=()=>{ut.loadLocalTrace(String(T.result||""),R.name)},T.readAsText(R)};return v.jsxs("div",{className:"pg-sidebar",style:{width:c},children:[v.jsx("div",{className:f?"pg-sidebar-resizer dragging":"pg-sidebar-resizer",role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar","aria-valuenow":c,"aria-valuemin":iv,"aria-valuemax":sv,tabIndex:0,onPointerDown:_,onKeyDown:R=>{R.key==="ArrowLeft"?(R.preventDefault(),p(T=>wp(T-16))):R.key==="ArrowRight"?(R.preventDefault(),p(T=>wp(T+16))):R.key==="Home"?(R.preventDefault(),p(iv)):R.key==="End"&&(R.preventDefault(),p(sv))}}),v.jsxs("div",{className:"side-nav",children:[v.jsx(ip,{icon:"pencil-square",label:"New Chat",onClick:()=>ut.deselectSession()}),v.jsx(ip,{icon:"folder-open",label:"Open Trace",title:"Open a saved events.ndjson trace",onClick:()=>l.current?.click()}),v.jsx(ip,{icon:"squares",label:"Agent Surface",title:"Tools, skills, connections, and channels",onClick:()=>ut.setDrawerOpen(!0)}),n?v.jsx(ip,{icon:"grid",label:"All Agents",title:"Back to the agents index",onClick:()=>{window.location.href=n}}):null]}),v.jsxs("div",{className:"side-section",children:[v.jsx("div",{className:"side-head",children:v.jsx("span",{className:"side-head-label",children:"Sessions"})}),v.jsx("form",{className:"session-search",onSubmit:w,children:v.jsx(qh,{type:"search",size:"base","aria-label":"Search by session ID",placeholder:"Search sessions",startIcon:"magnifying-glass",value:m,onChange:R=>g(R.target.value),title:"Filter the list, or press Enter to open a session by ID"})})]}),v.jsx("input",{ref:l,type:"file",accept:".ndjson,application/x-ndjson,application/json,.json",style:{display:"none"},onChange:R=>{E(R.target.files?.[0]),R.target.value=""}}),v.jsxs("div",{className:"session-list",children:[x.map(R=>v.jsx(wK,{summary:R},R.sessionId)),m.trim()!==""&&x.length===0?v.jsx("div",{className:"session-search-empty",children:"No matching sessions. Press Enter to open by ID."}):null]}),v.jsx(TK,{}),v.jsx(CK,{}),v.jsxs("div",{className:"side-footer",children:[v.jsxs("span",{className:"side-avatar","aria-hidden":"true",children:[(e||"a").slice(0,1).toUpperCase(),v.jsx("span",{className:`dot ${r}`})]}),v.jsxs("span",{className:"side-footer-main",children:[v.jsx("span",{className:"side-footer-name",children:e}),v.jsx("span",{className:"side-footer-sub",children:pO(s?.model)})]}),t?v.jsx(sa,{variant:"warn",size:"sm",children:"dev"}):null]})]})}function NK(){const e=lt(t=>t.toast);return e?v.jsx("div",{className:"pg-toast",role:"status","aria-live":"polite",children:e}):null}const BT=[{value:"chat",label:"Chat"},{value:"trace",label:"Trace"},{value:"raw",label:"Raw"},{value:"logs",label:"Logs"},{value:"evals",label:"Evals"},{value:"abs",label:"A/Bs"}],jO="(max-width: 640px)";function OK(e){const t=window.matchMedia(jO);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function MK(){return k.useSyncExternalStore(OK,()=>window.matchMedia(jO).matches)}function IK(){const e=lt(T=>T.barTitle),t=lt(T=>T.barId),n=lt(T=>T.externalUrl),r=lt(T=>T.current),s=lt(T=>T.view),a=lt(T=>T.authToken),l=lt(T=>T.aliasHosted),c=lt(T=>T.embedded),p=lt(T=>T.bridged),f=lt(T=>T.sidebarOpen),h=lt(T=>T.sessions),m=lt(T=>T.evalNavReturn),g=lt(T=>T.evalRun),b=MK(),x=r?.sessionId??null,w=m&&s!=="evals"&&g!==null,_=c&&!f?WG(h):0,E=async()=>{if(x)try{const T=await ut.api.eventsText(x);if(!T.ok){ut.toast(`Download failed (${T.status})`);return}const C=await T.blob(),A=URL.createObjectURL(C),N=document.createElement("a");N.href=A,N.download=`${x}.events.ndjson`,document.body.appendChild(N),N.click(),N.remove(),URL.revokeObjectURL(A)}catch(T){ut.toast(`Download failed: ${T instanceof Error?T.message:String(T)}`)}},R=b?v.jsx(_7,{size:"base","aria-label":"Visualization mode",value:s,onValueChange:T=>ut.setView(T??"chat"),options:BT}):v.jsx(qE,{size:"sm",variant:"compact",value:s,onValueChange:T=>ut.setView(T),"aria-label":"Visualization mode",children:BT.map(T=>v.jsx(qE.Item,{value:T.value,children:T.label},T.value))});return v.jsxs("div",{className:"pg-topbar",children:[c?v.jsxs("span",{className:"pg-sidebar-toggle",children:[v.jsx(ho,{icon:"layout-sidebar-left",size:"sm","aria-label":f?"Hide sessions":_>0?`Show sessions (${_} running)`:"Show sessions",onClick:()=>ut.setSidebarOpen(!f)}),_>0?v.jsx("span",{className:"pg-sidebar-toggle-badge","aria-hidden":"true"}):null]}):null,w?v.jsx(Ln,{variant:"secondary",size:"sm",onClick:()=>ut.backToEvals(),title:"Return to eval results",children:"← Back to Evals"}):null,v.jsx("span",{className:"session-title",children:e}),t?v.jsx("span",{className:"session-id",children:t}):null,c?null:v.jsxs(v.Fragment,{children:[n?v.jsx("a",{className:"tlink",href:n,target:"_blank",rel:"noopener noreferrer",title:"Open the source conversation",children:"Open in Slack"}):null,x?v.jsx(Ln,{variant:"ghost",size:"sm",onClick:()=>{E()},title:"Download this session's event log",children:"Download"}):null]}),v.jsx("span",{className:"grow"}),p?null:R,c&&(x!==null||n!==null)?v.jsxs(Bu,{children:[v.jsx(Bu.Trigger,{children:v.jsx(ho,{icon:"dots-3-horizontal",size:"sm","aria-label":"More actions"})}),v.jsxs(Bu.Content,{"aria-label":"Session actions",size:"sm",children:[n!==null?v.jsx(Bu.Item,{onSelect:()=>window.open(n,"_blank","noopener,noreferrer"),children:"Open in Slack"}):null,x!==null?v.jsx(Bu.Item,{onSelect:()=>{E()},children:"Download event log"}):null]})]}):null,l?null:v.jsx("div",{className:"pg-token",children:v.jsx(qh,{type:"password",size:"base","aria-label":"Bearer token",placeholder:"Bearer token (optional)",value:a,onChange:T=>ut.setAuthToken(T.target.value),title:"Sent as Authorization: Bearer ... on API calls"})})]})}const DK={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench"},LO={user:"User message",agent:"Assistant message",think:"Thinking",tool:"Tool call"};function zK(e){if(e.error)return"danger";switch(e.kind){case"user":return"accent";case"agent":return"success";default:return"neutral"}}function jK(e){if(e.startedAt!=null)return e.startedAt;let t=Number.POSITIVE_INFINITY;for(const n of e.rows){const r=n.startAt??n.at;r!=null&&r<t&&(t=r)}return Number.isFinite(t)?t:0}function LK(e,t){if(e.wallMs!=null&&e.wallMs>0)return e.wallMs;if(e.endedAt!=null&&e.endedAt>t)return e.endedAt-t;let n=0;for(const r of e.rows){const a=(r.startAt??r.at??t)+(r.ms!=null&&r.ms>0?r.ms:0);a-t>n&&(n=a-t)}return Math.max(n,1)}function PK(e,t,n,r,s){const a=e.startAt??e.at??r,l=Math.max(0,a-r),c=e.ms!=null&&e.ms>0?e.ms:e.ms===0?0:null,p=c===null||c===0,f=s*.012,h=p?f:Math.max(c,f),m=Math.max(0,Math.min(100,l/s*100)),g=Math.max(.9,Math.min(100-m,h/s*100));return{id:`${n}-${t}`,row:e,turnId:n,wallMs:s,startMs:l,durMs:h,trueDurMs:c,leftPct:m,widthPct:g,instant:p}}function PO(e){return e===null?"—":e===0?"instant":bi(e)}function fs({label:e,value:t}){return v.jsxs("div",{children:[v.jsx("dt",{children:e}),v.jsx("dd",{title:t,children:t})]})}function $K({span:e,onClose:t}){const{row:n,turnId:r,startMs:s,trueDurMs:a,wallMs:l}=e,c=a!=null?s+a:s,p=a!=null&&a>0&&l>0?`${(a/l*100).toFixed(1)}%`:"—",f=n.body?.trim()||"",h=n.toolArgs!=null?Al(n.toolArgs):"",m=n.toolOutput!=null?Al(n.toolOutput):n.kind==="tool"&&f?f:"";return v.jsxs("aside",{className:"trace-detail","aria-label":"Span details",children:[v.jsxs("div",{className:"trace-detail-head",children:[v.jsxs(sa,{variant:zK(n),size:"sm",children:[LO[n.kind],n.error?" · error":""]}),v.jsx("button",{type:"button",className:"link-btn",onClick:t,children:"Close"})]}),n.toolName?v.jsx("div",{className:"trace-detail-title",children:n.toolName}):null,n.kind!=="tool"&&f?v.jsx("pre",{className:"trace-detail-body",children:f}):null,n.kind!=="tool"&&!f&&n.label?v.jsx("div",{className:"trace-detail-label",children:n.label}):null,v.jsxs("dl",{className:"trace-detail-meta",children:[v.jsx(fs,{label:"Turn",value:r}),n.error?v.jsx(fs,{label:"Status",value:"error"}):null,v.jsx(fs,{label:"Start +",value:bi(s)}),v.jsx(fs,{label:"End +",value:bi(c)}),v.jsx(fs,{label:"Duration",value:PO(a)}),v.jsx(fs,{label:"% of turn",value:p}),v.jsx(fs,{label:"Started",value:RT(n.startAt)}),v.jsx(fs,{label:"Ended",value:RT(n.at)}),n.callId?v.jsx(fs,{label:"Call id",value:n.callId}):null]}),h?v.jsxs("div",{className:"trace-detail-section",children:[v.jsx("div",{className:"trace-detail-section-title",children:"Args"}),v.jsx("pre",{className:"trace-detail-body",children:h})]}):null,m?v.jsxs("div",{className:"trace-detail-section",children:[v.jsx("div",{className:"trace-detail-section-title",children:n.error?"Error":"Output"}),v.jsx("pre",{className:"trace-detail-body",children:m})]}):null]})}function BK({span:e,selected:t,onSelect:n}){const{row:r}=e,s=`${r.kind}${r.error?" error":""}`,a=PO(e.trueDurMs),l=e.widthPct>=8,c=r.depth??0;return v.jsxs("button",{type:"button",className:`wf-row ${s}${t?" selected":""}${c>0?" nested":""}`,onClick:n,"aria-pressed":t,style:c>0?{paddingLeft:`${8+c*14}px`}:void 0,children:[v.jsx("span",{className:"wf-kind",title:LO[r.kind],children:v.jsx(Mn,{name:DK[r.kind],size:"sm",color:r.error?"red":"secondary"})}),v.jsx("span",{className:"wf-name",title:r.label,children:c>0?`↳ ${r.label||"—"}`:r.label||"—"}),v.jsx("span",{className:"wf-track","aria-hidden":"true",children:v.jsx("span",{className:`wf-bar ${s}${e.instant?" instant":""}`,style:{left:`${e.leftPct}%`,width:`${e.widthPct}%`},children:l?v.jsx("span",{className:"wf-bar-label",children:a}):null})}),v.jsx("span",{className:"wf-dur",children:a})]})}function FK({turn:e,index:t,selectedId:n,onSelect:r}){const s=jK(e),a=LK(e,s),l=k.useMemo(()=>e.rows.map((f,h)=>PK(f,h,e.turnId,s,a)),[e,s,a]),c=k.useMemo(()=>jV(a),[a]),p=[];return e.wallMs!==void 0&&p.push(`Worked for ${Ok(e.wallMs)}`),e.usage&&p.push(`in ${th(e.usage.inputTokens)} · out ${th(e.usage.outputTokens)}`),v.jsxs("div",{className:"trace-turn",children:[v.jsxs("div",{className:"thead",children:[v.jsxs("span",{className:"thead-title",children:["Turn ",t+1,v.jsx("code",{className:"thead-id",children:e.turnId}),e.failed?v.jsx(sa,{variant:"danger",size:"sm",children:"failed"}):null]}),v.jsx("span",{className:"wall",children:p.join(" · ")||"In progress"})]}),v.jsxs("div",{className:"wf",children:[v.jsxs("div",{className:"wf-ruler","aria-hidden":"true",children:[v.jsx("span",{className:"wf-kind"}),v.jsx("span",{className:"wf-name"}),v.jsx("span",{className:"wf-track wf-ruler-track",children:c.map(f=>v.jsxs("span",{className:"wf-tick",style:{left:`${f/a*100}%`},children:[v.jsx("span",{className:"wf-tick-line"}),v.jsx("span",{className:"wf-tick-label",children:bi(f)})]},f))}),v.jsx("span",{className:"wf-dur"})]}),l.length===0?v.jsx("div",{className:"trace-empty-turn",children:"No timed spans in this turn."}):l.map(f=>v.jsx(BK,{span:f,selected:n===f.id,onSelect:()=>r(n===f.id?null:f)},f.id))]})]})}function UK(){const e=lt(a=>a.traceEvents),t=k.useMemo(()=>RO(e),[e]),[n,r]=k.useState(null);if(!e.length)return v.jsx("div",{className:"pg-trace",children:v.jsx(kc,{className:"pg-empty",message:"Select a session or Open trace to see the timeline."})});const s=[`${t.eventCount} events`,`${t.turns.length} turn${t.turns.length===1?"":"s"}`,`${t.totalTools} tool call${t.totalTools===1?"":"s"}`,t.failedTools?`${t.failedTools} error${t.failedTools===1?"":"s"}`:null].filter(Boolean).join(" · ");return v.jsx("div",{className:"pg-trace",children:v.jsxs("div",{className:"trace-rows",children:[v.jsx("div",{className:"trace-summary",children:s}),v.jsxs("div",{className:`trace-layout${n?" has-detail":""}`,children:[v.jsx("div",{className:"trace-main",children:t.turns.map((a,l)=>v.jsx(FK,{turn:a,index:l,selectedId:n?.id??null,onSelect:r},`${a.turnId||"turn"}-${l}`))}),n?v.jsx($K,{span:n,onClose:()=>r(null)}):null]})]})})}function qK(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const HK=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,GK=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,VK={};function FT(e,t){return(VK.jsx?GK:HK).test(e)}const KK=/[ \t\n\f\r]/g;function ZK(e){return typeof e=="object"?e.type==="text"?UT(e.value):!1:UT(e)}function UT(e){return e.replace(KK,"")===""}class rf{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}rf.prototype.normal={};rf.prototype.property={};rf.prototype.space=void 0;function $O(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new rf(n,r,t)}function ov(e){return e.toLowerCase()}class $r{constructor(t,n){this.attribute=n,this.property=t}}$r.prototype.attribute="";$r.prototype.booleanish=!1;$r.prototype.boolean=!1;$r.prototype.commaOrSpaceSeparated=!1;$r.prototype.commaSeparated=!1;$r.prototype.defined=!1;$r.prototype.mustUseProperty=!1;$r.prototype.number=!1;$r.prototype.overloadedBoolean=!1;$r.prototype.property="";$r.prototype.spaceSeparated=!1;$r.prototype.space=void 0;let WK=0;const Mt=fa(),Hn=fa(),av=fa(),Le=fa(),gn=fa(),gl=fa(),Wr=fa();function fa(){return 2**++WK}const lv=Object.freeze(Object.defineProperty({__proto__:null,boolean:Mt,booleanish:Hn,commaOrSpaceSeparated:Wr,commaSeparated:gl,number:Le,overloadedBoolean:av,spaceSeparated:gn},Symbol.toStringTag,{value:"Module"})),Wb=Object.keys(lv);class Dk extends $r{constructor(t,n,r,s){let a=-1;if(super(t,n),qT(this,"space",s),typeof r=="number")for(;++a<Wb.length;){const l=Wb[a];qT(this,Wb[a],(r&lv[l])===lv[l])}}}Dk.prototype.defined=!0;function qT(e,t,n){n&&(e[t]=n)}function Pl(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new Dk(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ov(r)]=r,n[ov(a.attribute)]=r}return new rf(t,n,e.space)}const BO=Pl({properties:{ariaActiveDescendant:null,ariaAtomic:Hn,ariaAutoComplete:null,ariaBusy:Hn,ariaChecked:Hn,ariaColCount:Le,ariaColIndex:Le,ariaColSpan:Le,ariaControls:gn,ariaCurrent:null,ariaDescribedBy:gn,ariaDetails:null,ariaDisabled:Hn,ariaDropEffect:gn,ariaErrorMessage:null,ariaExpanded:Hn,ariaFlowTo:gn,ariaGrabbed:Hn,ariaHasPopup:null,ariaHidden:Hn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:gn,ariaLevel:Le,ariaLive:null,ariaModal:Hn,ariaMultiLine:Hn,ariaMultiSelectable:Hn,ariaOrientation:null,ariaOwns:gn,ariaPlaceholder:null,ariaPosInSet:Le,ariaPressed:Hn,ariaReadOnly:Hn,ariaRelevant:null,ariaRequired:Hn,ariaRoleDescription:gn,ariaRowCount:Le,ariaRowIndex:Le,ariaRowSpan:Le,ariaSelected:Hn,ariaSetSize:Le,ariaSort:null,ariaValueMax:Le,ariaValueMin:Le,ariaValueNow:Le,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function FO(e,t){return t in e?e[t]:t}function UO(e,t){return FO(e,t.toLowerCase())}const YK=Pl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:gl,acceptCharset:gn,accessKey:gn,action:null,allow:null,allowFullScreen:Mt,allowPaymentRequest:Mt,allowUserMedia:Mt,alt:null,as:null,async:Mt,autoCapitalize:null,autoComplete:gn,autoFocus:Mt,autoPlay:Mt,blocking:gn,capture:null,charSet:null,checked:Mt,cite:null,className:gn,cols:Le,colSpan:null,content:null,contentEditable:Hn,controls:Mt,controlsList:gn,coords:Le|gl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Mt,defer:Mt,dir:null,dirName:null,disabled:Mt,download:av,draggable:Hn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Mt,formTarget:null,headers:gn,height:Le,hidden:av,high:Le,href:null,hrefLang:null,htmlFor:gn,httpEquiv:gn,id:null,imageSizes:null,imageSrcSet:null,inert:Mt,inputMode:null,integrity:null,is:null,isMap:Mt,itemId:null,itemProp:gn,itemRef:gn,itemScope:Mt,itemType:gn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Mt,low:Le,manifest:null,max:null,maxLength:Le,media:null,method:null,min:null,minLength:Le,multiple:Mt,muted:Mt,name:null,nonce:null,noModule:Mt,noValidate:Mt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Mt,optimum:Le,pattern:null,ping:gn,placeholder:null,playsInline:Mt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Mt,referrerPolicy:null,rel:gn,required:Mt,reversed:Mt,rows:Le,rowSpan:Le,sandbox:gn,scope:null,scoped:Mt,seamless:Mt,selected:Mt,shadowRootClonable:Mt,shadowRootDelegatesFocus:Mt,shadowRootMode:null,shape:null,size:Le,sizes:null,slot:null,span:Le,spellCheck:Hn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Le,step:null,style:null,tabIndex:Le,target:null,title:null,translate:null,type:null,typeMustMatch:Mt,useMap:null,value:Hn,width:Le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:gn,axis:null,background:null,bgColor:null,border:Le,borderColor:null,bottomMargin:Le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Mt,declare:Mt,event:null,face:null,frame:null,frameBorder:null,hSpace:Le,leftMargin:Le,link:null,longDesc:null,lowSrc:null,marginHeight:Le,marginWidth:Le,noResize:Mt,noHref:Mt,noShade:Mt,noWrap:Mt,object:null,profile:null,prompt:null,rev:null,rightMargin:Le,rules:null,scheme:null,scrolling:Hn,standby:null,summary:null,text:null,topMargin:Le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Le,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Mt,disableRemotePlayback:Mt,prefix:null,property:null,results:Le,security:null,unselectable:null},space:"html",transform:UO}),XK=Pl({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Wr,accentHeight:Le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Le,amplitude:Le,arabicForm:null,ascent:Le,attributeName:null,attributeType:null,azimuth:Le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Le,by:null,calcMode:null,capHeight:Le,className:gn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Le,diffuseConstant:Le,direction:null,display:null,dur:null,divisor:Le,dominantBaseline:null,download:Mt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Le,enableBackground:null,end:null,event:null,exponent:Le,externalResourcesRequired:null,fill:null,fillOpacity:Le,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:gl,g2:gl,glyphName:gl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Le,horizOriginX:Le,horizOriginY:Le,id:null,ideographic:Le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Le,k:Le,k1:Le,k2:Le,k3:Le,k4:Le,kernelMatrix:Wr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Le,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Le,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Le,overlineThickness:Le,paintOrder:null,panose1:null,path:null,pathLength:Le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:gn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Le,pointsAtY:Le,pointsAtZ:Le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Wr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Wr,rev:Wr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Wr,requiredFeatures:Wr,requiredFonts:Wr,requiredFormats:Wr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Le,specularExponent:Le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Le,strikethroughThickness:Le,string:null,stroke:null,strokeDashArray:Wr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Le,strokeOpacity:Le,strokeWidth:null,style:null,surfaceScale:Le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Wr,tabIndex:Le,tableValues:null,target:null,targetX:Le,targetY:Le,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Wr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Le,underlineThickness:Le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Le,values:null,vAlphabetic:Le,vMathematical:Le,vectorEffect:null,vHanging:Le,vIdeographic:Le,version:null,vertAdvY:Le,vertOriginX:Le,vertOriginY:Le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:FO}),qO=Pl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),HO=Pl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:UO}),GO=Pl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),QK={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},JK=/[A-Z]/g,HT=/-[a-z]/g,eZ=/^data[-\w.:]+$/i;function tZ(e,t){const n=ov(t);let r=t,s=$r;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&eZ.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(HT,rZ);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!HT.test(a)){let l=a.replace(JK,nZ);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}s=Dk}return new s(r,t)}function nZ(e){return"-"+e.toLowerCase()}function rZ(e){return e.charAt(1).toUpperCase()}const iZ=$O([BO,YK,qO,HO,GO],"html"),zk=$O([BO,XK,qO,HO,GO],"svg");function sZ(e){return e.join(" ").trim()}var Ja={},Yb,GT;function oZ(){if(GT)return Yb;GT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,p=`
|
|
41
|
-
`,f="/",h="*",m="",g="comment",b="declaration";Yb=function(w,_){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];_=_||{};var E=1,R=1;function T(B){var z=B.match(t);z&&(E+=z.length);var L=B.lastIndexOf(p);R=~L?B.length-L:R+B.length}function C(){var B={line:E,column:R};return function(z){return z.position=new A(B),F(),z}}function A(B){this.start=B,this.end={line:E,column:R},this.source=_.source}A.prototype.content=w;function N(B){var z=new Error(_.source+":"+E+":"+R+": "+B);if(z.reason=B,z.filename=_.source,z.line=E,z.column=R,z.source=w,!_.silent)throw z}function I(B){var z=B.exec(w);if(z){var L=z[0];return T(L),w=w.slice(L.length),z}}function F(){I(n)}function V(B){var z;for(B=B||[];z=j();)z!==!1&&B.push(z);return B}function j(){var B=C();if(!(f!=w.charAt(0)||h!=w.charAt(1))){for(var z=2;m!=w.charAt(z)&&(h!=w.charAt(z)||f!=w.charAt(z+1));)++z;if(z+=2,m===w.charAt(z-1))return N("End of comment missing");var L=w.slice(2,z-2);return R+=2,T(L),w=w.slice(z),R+=2,B({type:g,comment:L})}}function q(){var B=C(),z=I(r);if(z){if(j(),!I(s))return N("property missing ':'");var L=I(a),H=B({type:b,property:x(z[0].replace(e,m)),value:L?x(L[0].replace(e,m)):m});return I(l),H}}function Z(){var B=[];V(B);for(var z;z=q();)z!==!1&&(B.push(z),V(B));return B}return F(),Z()};function x(w){return w?w.replace(c,m):m}return Yb}var VT;function aZ(){if(VT)return Ja;VT=1;var e=Ja&&Ja.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.default=n;var t=e(oZ());function n(r,s){var a=null;if(!r||typeof r!="string")return a;var l=(0,t.default)(r),c=typeof s=="function";return l.forEach(function(p){if(p.type==="declaration"){var f=p.property,h=p.value;c?s(f,h,p):h&&(a=a||{},a[f]=h)}}),a}return Ja}var Fu={},KT;function lZ(){if(KT)return Fu;KT=1,Object.defineProperty(Fu,"__esModule",{value:!0}),Fu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},l=function(f,h){return h.toUpperCase()},c=function(f,h){return"".concat(h,"-")},p=function(f,h){return h===void 0&&(h={}),a(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(s,c):f=f.replace(r,c),f.replace(t,l))};return Fu.camelCase=p,Fu}var Uu,ZT;function uZ(){if(ZT)return Uu;ZT=1;var e=Uu&&Uu.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(aZ()),n=lZ();function r(s,a){var l={};return!s||typeof s!="string"||(0,t.default)(s,function(c,p){c&&p&&(l[(0,n.camelCase)(c,a)]=p)}),l}return r.default=r,Uu=r,Uu}var cZ=uZ();const fZ=uh(cZ),VO=KO("end"),jk=KO("start");function KO(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function dZ(e){const t=jk(e),n=VO(e);if(t&&n)return{start:t,end:n}}function oc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?WT(e.position):"start"in e||"end"in e?WT(e):"line"in e||"column"in e?uv(e):""}function uv(e){return YT(e&&e.line)+":"+YT(e&&e.column)}function WT(e){return uv(e&&e.start)+"-"+uv(e&&e.end)}function YT(e){return e&&typeof e=="number"?e:1}class br extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},l=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?s=t:!a.cause&&t&&(l=!0,s=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const p=r.indexOf(":");p===-1?a.ruleId=r:(a.source=r.slice(0,p),a.ruleId=r.slice(p+1))}if(!a.place&&a.ancestors&&a.ancestors){const p=a.ancestors[a.ancestors.length-1];p&&(a.place=p.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=s,this.line=c?c.line:void 0,this.name=oc(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}br.prototype.file="";br.prototype.name="";br.prototype.reason="";br.prototype.message="";br.prototype.stack="";br.prototype.column=void 0;br.prototype.line=void 0;br.prototype.ancestors=void 0;br.prototype.cause=void 0;br.prototype.fatal=void 0;br.prototype.place=void 0;br.prototype.ruleId=void 0;br.prototype.source=void 0;const Lk={}.hasOwnProperty,pZ=new Map,hZ=/[A-Z]/g,mZ=new Set(["table","tbody","thead","tfoot","tr"]),gZ=new Set(["td","th"]),ZO="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function bZ(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=TZ(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=EZ(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?zk:iZ,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=WO(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function WO(e,t,n){if(t.type==="element")return yZ(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return vZ(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return xZ(e,t,n);if(t.type==="mdxjsEsm")return kZ(e,t);if(t.type==="root")return SZ(e,t,n);if(t.type==="text")return wZ(e,t)}function yZ(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=zk,e.schema=s),e.ancestors.push(t);const a=XO(e,t.tagName,!1),l=_Z(e,t);let c=$k(e,t);return mZ.has(t.tagName)&&(c=c.filter(function(p){return typeof p=="string"?!ZK(p):!0})),YO(e,l,a,t),Pk(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function vZ(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ic(e,t.position)}function kZ(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ic(e,t.position)}function xZ(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=zk,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:XO(e,t.name,!0),l=RZ(e,t),c=$k(e,t);return YO(e,l,a,t),Pk(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function SZ(e,t,n){const r={};return Pk(r,$k(e,t)),e.create(t,e.Fragment,r,n)}function wZ(e,t){return t.value}function YO(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Pk(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function EZ(e,t,n){return r;function r(s,a,l,c){const f=Array.isArray(l.children)?n:t;return c?f(a,l,c):f(a,l)}}function TZ(e,t){return n;function n(r,s,a,l){const c=Array.isArray(a.children),p=jk(r);return t(s,a,l,c,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function _Z(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Lk.call(t.properties,s)){const a=CZ(e,s,t.properties[s]);if(a){const[l,c]=a;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&gZ.has(t.tagName)?r=c:n[l]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function RZ(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Ic(e,t.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else Ic(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function $k(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:pZ;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const p=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(p){const f=s.get(p)||0;l=p+"-"+f,s.set(p,f+1)}}const c=WO(e,a,l);c!==void 0&&n.push(c)}return n}function CZ(e,t,n){const r=tZ(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?qK(n):sZ(n)),r.property==="style"){let s=typeof n=="object"?n:AZ(e,String(n));return e.stylePropertyNameCase==="css"&&(s=NZ(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?QK[r.property]||r.property:r.attribute,n]}}function AZ(e,t){try{return fZ(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new br("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=ZO+"#cannot-parse-style-attribute",s}}function XO(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,l;for(;++a<s.length;){const c=FT(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=l}else r=FT(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Lk.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ic(e)}function Ic(e,t){const n=new br("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=ZO+"#cannot-handle-mdx-estrees-without-createevaluater",n}function NZ(e){const t={};let n;for(n in e)Lk.call(e,n)&&(t[OZ(n)]=e[n]);return t}function OZ(e){let t=e.replace(hZ,MZ);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function MZ(e){return"-"+e.toLowerCase()}const Xb={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},IZ={};function Bk(e,t){const n=IZ,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return QO(e,r,s)}function QO(e,t,n){if(DZ(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 XT(e.children,t,n)}return Array.isArray(e)?XT(e,t,n):""}function XT(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=QO(e[s],t,n);return r.join("")}function DZ(e){return!!(e&&typeof e=="object")}const QT=document.createElement("i");function Fk(e){const t="&"+e+";";QT.innerHTML=t;const n=QT.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Qr(e,t,n,r){const s=e.length;let a=0,l;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);a<r.length;)l=r.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function fi(e,t){return e.length>0?(Qr(e,e.length,0,t),e):t}const JT={}.hasOwnProperty;function JO(e){const t={};let n=-1;for(;++n<e.length;)zZ(t,e[n]);return t}function zZ(e,t){let n;for(n in t){const s=(JT.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){JT.call(s,l)||(s[l]=[]);const c=a[l];jZ(s[l],Array.isArray(c)?c:c?[c]:[])}}}function jZ(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Qr(e,0,0,r)}function eM(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Ti(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Sr=ko(/[A-Za-z]/),mr=ko(/[\dA-Za-z]/),LZ=ko(/[#-'*+\--9=?A-Z^-~]/);function rh(e){return e!==null&&(e<32||e===127)}const cv=ko(/\d/),PZ=ko(/[\dA-Fa-f]/),$Z=ko(/[!-/:-@[-`{-~]/);function dt(e){return e!==null&&e<-2}function pn(e){return e!==null&&(e<0||e===32)}function $t(e){return e===-2||e===-1||e===32}const Zh=ko(new RegExp("\\p{P}|\\p{S}","u")),ia=ko(/\s/);function ko(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function $l(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&mr(e.charCodeAt(n+1))&&mr(e.charCodeAt(n+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(l=String.fromCharCode(a,c),s=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+s+1,l=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function Vt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(p){return $t(p)?(e.enter(n),c(p)):t(p)}function c(p){return $t(p)&&a++<s?(e.consume(p),c):(e.exit(n),t(p))}}const BZ={tokenize:FZ};function FZ(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Vt(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),a(c)}function a(c){const p=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=p),n=p,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return dt(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),l)}}const UZ={tokenize:qZ},e_={tokenize:HZ};function qZ(e){const t=this,n=[];let r=0,s,a,l;return c;function c(T){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,p,f)(T)}return f(T)}function p(T){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&R();const C=t.events.length;let A=C,N;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){N=t.events[A][1].end;break}E(r);let I=C;for(;I<t.events.length;)t.events[I][1].end={...N},I++;return Qr(t.events,A+1,0,t.events.slice(C)),t.events.length=I,f(T)}return c(T)}function f(T){if(r===n.length){if(!s)return g(T);if(s.currentConstruct&&s.currentConstruct.concrete)return x(T);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(e_,h,m)(T)}function h(T){return s&&R(),E(r),g(T)}function m(T){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,x(T)}function g(T){return t.containerState={},e.attempt(e_,b,x)(T)}function b(T){return r++,n.push([t.currentConstruct,t.containerState]),g(T)}function x(T){if(T===null){s&&R(),E(0),e.consume(T);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),w(T)}function w(T){if(T===null){_(e.exit("chunkFlow"),!0),E(0),e.consume(T);return}return dt(T)?(e.consume(T),_(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(T),w)}function _(T,C){const A=t.sliceStream(T);if(C&&A.push(null),T.previous=a,a&&(a.next=T),a=T,s.defineSkip(T.start),s.write(A),t.parser.lazy[T.start.line]){let N=s.events.length;for(;N--;)if(s.events[N][1].start.offset<l&&(!s.events[N][1].end||s.events[N][1].end.offset>l))return;const I=t.events.length;let F=I,V,j;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){if(V){j=t.events[F][1].end;break}V=!0}for(E(r),N=I;N<t.events.length;)t.events[N][1].end={...j},N++;Qr(t.events,F+1,0,t.events.slice(I)),t.events.length=N}}function E(T){let C=n.length;for(;C-- >T;){const A=n[C];t.containerState=A[1],A[0].exit.call(t,e)}n.length=T}function R(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function HZ(e,t,n){return Vt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Nl(e){if(e===null||pn(e)||ia(e))return 1;if(Zh(e))return 2}function Wh(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const fv={name:"attention",resolveAll:GZ,tokenize:VZ};function GZ(e,t){let n=-1,r,s,a,l,c,p,f,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;p=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},g={...e[n][1].start};t_(m,-p),t_(g,p),l={type:p>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},c={type:p>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},a={type:p>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:p>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[r][1].end={...l.start},e[n][1].start={...c.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=fi(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=fi(f,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",a,t]]),f=fi(f,Wh(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=fi(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,f=fi(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Qr(e,r-1,n-r+3,f),n=r+f.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function VZ(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Nl(r);let a;return l;function l(p){return a=p,e.enter("attentionSequence"),c(p)}function c(p){if(p===a)return e.consume(p),c;const f=e.exit("attentionSequence"),h=Nl(p),m=!h||h===2&&s||n.includes(p),g=!s||s===2&&h||n.includes(r);return f._open=!!(a===42?m:m&&(s||!g)),f._close=!!(a===42?g:g&&(h||!m)),t(p)}}function t_(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const KZ={name:"autolink",tokenize:ZZ};function ZZ(e,t,n){let r=0;return s;function s(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(b){return Sr(b)?(e.consume(b),l):b===64?n(b):f(b)}function l(b){return b===43||b===45||b===46||mr(b)?(r=1,c(b)):f(b)}function c(b){return b===58?(e.consume(b),r=0,p):(b===43||b===45||b===46||mr(b))&&r++<32?(e.consume(b),c):(r=0,f(b))}function p(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||rh(b)?n(b):(e.consume(b),p)}function f(b){return b===64?(e.consume(b),h):LZ(b)?(e.consume(b),f):n(b)}function h(b){return mr(b)?m(b):n(b)}function m(b){return b===46?(e.consume(b),r=0,h):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):g(b)}function g(b){if((b===45||mr(b))&&r++<63){const x=b===45?g:m;return e.consume(b),x}return n(b)}}const sf={partial:!0,tokenize:WZ};function WZ(e,t,n){return r;function r(a){return $t(a)?Vt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||dt(a)?t(a):n(a)}}const tM={continuation:{tokenize:XZ},exit:QZ,name:"blockQuote",tokenize:YZ};function YZ(e,t,n){const r=this;return s;function s(l){if(l===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return n(l)}function a(l){return $t(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function XZ(e,t,n){const r=this;return s;function s(l){return $t(l)?Vt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(tM,t,n)(l)}}function QZ(e){e.exit("blockQuote")}const nM={name:"characterEscape",tokenize:JZ};function JZ(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return $Z(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const rM={name:"characterReference",tokenize:eW};function eW(e,t,n){const r=this;let s=0,a,l;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),p}function p(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,l=mr,h(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=PZ,h):(e.enter("characterReferenceValue"),a=7,l=cv,h(m))}function h(m){if(m===59&&s){const g=e.exit("characterReferenceValue");return l===mr&&!Fk(r.sliceSerialize(g))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&s++<a?(e.consume(m),h):n(m)}}const n_={partial:!0,tokenize:nW},r_={concrete:!0,name:"codeFenced",tokenize:tW};function tW(e,t,n){const r=this,s={partial:!0,tokenize:A};let a=0,l=0,c;return p;function p(N){return f(N)}function f(N){const I=r.events[r.events.length-1];return a=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,c=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(N)}function h(N){return N===c?(l++,e.consume(N),h):l<3?n(N):(e.exit("codeFencedFenceSequence"),$t(N)?Vt(e,m,"whitespace")(N):m(N))}function m(N){return N===null||dt(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(n_,w,C)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(N))}function g(N){return N===null||dt(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(N)):$t(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Vt(e,b,"whitespace")(N)):N===96&&N===c?n(N):(e.consume(N),g)}function b(N){return N===null||dt(N)?m(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(N))}function x(N){return N===null||dt(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(N)):N===96&&N===c?n(N):(e.consume(N),x)}function w(N){return e.attempt(s,C,_)(N)}function _(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),E}function E(N){return a>0&&$t(N)?Vt(e,R,"linePrefix",a+1)(N):R(N)}function R(N){return N===null||dt(N)?e.check(n_,w,C)(N):(e.enter("codeFlowValue"),T(N))}function T(N){return N===null||dt(N)?(e.exit("codeFlowValue"),R(N)):(e.consume(N),T)}function C(N){return e.exit("codeFenced"),t(N)}function A(N,I,F){let V=0;return j;function j(L){return N.enter("lineEnding"),N.consume(L),N.exit("lineEnding"),q}function q(L){return N.enter("codeFencedFence"),$t(L)?Vt(N,Z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):Z(L)}function Z(L){return L===c?(N.enter("codeFencedFenceSequence"),B(L)):F(L)}function B(L){return L===c?(V++,N.consume(L),B):V>=l?(N.exit("codeFencedFenceSequence"),$t(L)?Vt(N,z,"whitespace")(L):z(L)):F(L)}function z(L){return L===null||dt(L)?(N.exit("codeFencedFence"),I(L)):F(L)}}}function nW(e,t,n){const r=this;return s;function s(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Qb={name:"codeIndented",tokenize:iW},rW={partial:!0,tokenize:sW};function iW(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),Vt(e,a,"linePrefix",5)(f)}function a(f){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(f):n(f)}function l(f){return f===null?p(f):dt(f)?e.attempt(rW,l,p)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||dt(f)?(e.exit("codeFlowValue"),l(f)):(e.consume(f),c)}function p(f){return e.exit("codeIndented"),t(f)}}function sW(e,t,n){const r=this;return s;function s(l){return r.parser.lazy[r.now().line]?n(l):dt(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):Vt(e,a,"linePrefix",5)(l)}function a(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):dt(l)?s(l):n(l)}}const oW={name:"codeText",previous:lW,resolve:aW,tokenize:uW};function aW(e){let t=e.length-4,n=3,r,s;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;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function lW(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function uW(e,t,n){let r=0,s,a;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),p(m))}function p(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),p):m===96?(a=e.enter("codeTextSequence"),s=0,h(m)):dt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),p):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||dt(m)?(e.exit("codeTextData"),p(m)):(e.consume(m),f)}function h(m){return m===96?(e.consume(m),s++,h):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class cW{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&qu(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),qu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),qu(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);qu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);qu(this.left,n.reverse())}}}function qu(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 iM(e){const t={};let n=-1,r,s,a,l,c,p,f;const h=new cW(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(p=r[1]._tokenizer.events,a=0,a<p.length&&p[a][1].type==="lineEndingBlank"&&(a+=2),a<p.length&&p[a][1].type==="content"))for(;++a<p.length&&p[a][1].type!=="content";)p[a][1].type==="chunkText"&&(p[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,fW(h,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(l=h.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(s&&(h.get(s)[1].type="lineEndingBlank"),l[1].type="lineEnding",s=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;s&&(r[1].end={...h.get(s)[1].start},c=h.slice(s,n),c.unshift(r),h.splice(s,n-s+1,c))}}return Qr(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function fW(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,p=[],f={};let h,m,g=-1,b=n,x=0,w=0;const _=[w];for(;b;){for(;e.get(++s)[1]!==b;);a.push(s),b._tokenizer||(h=r.sliceStream(b),b.next||h.push(null),m&&l.defineSkip(b.start),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(h),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=b,b=b.next}for(b=n;++g<c.length;)c[g][0]==="exit"&&c[g-1][0]==="enter"&&c[g][1].type===c[g-1][1].type&&c[g][1].start.line!==c[g][1].end.line&&(w=g+1,_.push(w),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(l.events=[],b?(b._tokenizer=void 0,b.previous=void 0):_.pop(),g=_.length;g--;){const E=c.slice(_[g],_[g+1]),R=a.pop();p.push([R,R+E.length-1]),e.splice(R,2,E)}for(p.reverse(),g=-1;++g<p.length;)f[x+p[g][0]]=x+p[g][1],x+=p[g][1]-p[g][0]-1;return f}const dW={resolve:hW,tokenize:mW},pW={partial:!0,tokenize:gW};function hW(e){return iM(e),e}function mW(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?a(c):dt(c)?e.check(pW,l,a)(c):(e.consume(c),s)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function gW(e,t,n){const r=this;return s;function s(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Vt(e,a,"linePrefix")}function a(l){if(l===null||dt(l))return n(l);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function sM(e,t,n,r,s,a,l,c,p){const f=p||Number.POSITIVE_INFINITY;let h=0;return m;function m(E){return E===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(E),e.exit(a),g):E===null||E===32||E===41||rh(E)?n(E):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),w(E))}function g(E){return E===62?(e.enter(a),e.consume(E),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),b(E))}function b(E){return E===62?(e.exit("chunkString"),e.exit(c),g(E)):E===null||E===60||dt(E)?n(E):(e.consume(E),E===92?x:b)}function x(E){return E===60||E===62||E===92?(e.consume(E),b):b(E)}function w(E){return!h&&(E===null||E===41||pn(E))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(E)):h<f&&E===40?(e.consume(E),h++,w):E===41?(e.consume(E),h--,w):E===null||E===32||E===40||rh(E)?n(E):(e.consume(E),E===92?_:w)}function _(E){return E===40||E===41||E===92?(e.consume(E),w):w(E)}}function oM(e,t,n,r,s,a){const l=this;let c=0,p;return f;function f(b){return e.enter(r),e.enter(s),e.consume(b),e.exit(s),e.enter(a),h}function h(b){return c>999||b===null||b===91||b===93&&!p||b===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(b):b===93?(e.exit(a),e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):dt(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||b===91||b===93||dt(b)||c++>999?(e.exit("chunkString"),h(b)):(e.consume(b),p||(p=!$t(b)),b===92?g:m)}function g(b){return b===91||b===92||b===93?(e.consume(b),c++,m):m(b)}}function aM(e,t,n,r,s,a){let l;return c;function c(g){return g===34||g===39||g===40?(e.enter(r),e.enter(s),e.consume(g),e.exit(s),l=g===40?41:g,p):n(g)}function p(g){return g===l?(e.enter(s),e.consume(g),e.exit(s),e.exit(r),t):(e.enter(a),f(g))}function f(g){return g===l?(e.exit(a),p(l)):g===null?n(g):dt(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),Vt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===l||g===null||dt(g)?(e.exit("chunkString"),f(g)):(e.consume(g),g===92?m:h)}function m(g){return g===l||g===92?(e.consume(g),h):h(g)}}function ac(e,t){let n;return r;function r(s){return dt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):$t(s)?Vt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const bW={name:"definition",tokenize:vW},yW={partial:!0,tokenize:kW};function vW(e,t,n){const r=this;let s;return a;function a(b){return e.enter("definition"),l(b)}function l(b){return oM.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function c(b){return s=Ti(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),p):n(b)}function p(b){return pn(b)?ac(e,f)(b):f(b)}function f(b){return sM(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function h(b){return e.attempt(yW,m,m)(b)}function m(b){return $t(b)?Vt(e,g,"whitespace")(b):g(b)}function g(b){return b===null||dt(b)?(e.exit("definition"),r.parser.defined.push(s),t(b)):n(b)}}function kW(e,t,n){return r;function r(c){return pn(c)?ac(e,s)(c):n(c)}function s(c){return aM(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return $t(c)?Vt(e,l,"whitespace")(c):l(c)}function l(c){return c===null||dt(c)?t(c):n(c)}}const xW={name:"hardBreakEscape",tokenize:SW};function SW(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return dt(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const wW={name:"headingAtx",resolve:EW,tokenize:TW};function EW(e,t){let n=e.length-2,r=3,s,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={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"},Qr(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function TW(e,t,n){let r=0;return s;function s(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),l(h)}function l(h){return h===35&&r++<6?(e.consume(h),l):h===null||pn(h)?(e.exit("atxHeadingSequence"),c(h)):n(h)}function c(h){return h===35?(e.enter("atxHeadingSequence"),p(h)):h===null||dt(h)?(e.exit("atxHeading"),t(h)):$t(h)?Vt(e,c,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function p(h){return h===35?(e.consume(h),p):(e.exit("atxHeadingSequence"),c(h))}function f(h){return h===null||h===35||pn(h)?(e.exit("atxHeadingText"),c(h)):(e.consume(h),f)}}const _W=["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"],i_=["pre","script","style","textarea"],RW={concrete:!0,name:"htmlFlow",resolveTo:NW,tokenize:OW},CW={partial:!0,tokenize:IW},AW={partial:!0,tokenize:MW};function NW(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 OW(e,t,n){const r=this;let s,a,l,c,p;return f;function f(O){return h(O)}function h(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),m}function m(O){return O===33?(e.consume(O),g):O===47?(e.consume(O),a=!0,w):O===63?(e.consume(O),s=3,r.interrupt?t:D):Sr(O)?(e.consume(O),l=String.fromCharCode(O),_):n(O)}function g(O){return O===45?(e.consume(O),s=2,b):O===91?(e.consume(O),s=5,c=0,x):Sr(O)?(e.consume(O),s=4,r.interrupt?t:D):n(O)}function b(O){return O===45?(e.consume(O),r.interrupt?t:D):n(O)}function x(O){const J="CDATA[";return O===J.charCodeAt(c++)?(e.consume(O),c===J.length?r.interrupt?t:Z:x):n(O)}function w(O){return Sr(O)?(e.consume(O),l=String.fromCharCode(O),_):n(O)}function _(O){if(O===null||O===47||O===62||pn(O)){const J=O===47,ee=l.toLowerCase();return!J&&!a&&i_.includes(ee)?(s=1,r.interrupt?t(O):Z(O)):_W.includes(l.toLowerCase())?(s=6,J?(e.consume(O),E):r.interrupt?t(O):Z(O)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?R(O):T(O))}return O===45||mr(O)?(e.consume(O),l+=String.fromCharCode(O),_):n(O)}function E(O){return O===62?(e.consume(O),r.interrupt?t:Z):n(O)}function R(O){return $t(O)?(e.consume(O),R):j(O)}function T(O){return O===47?(e.consume(O),j):O===58||O===95||Sr(O)?(e.consume(O),C):$t(O)?(e.consume(O),T):j(O)}function C(O){return O===45||O===46||O===58||O===95||mr(O)?(e.consume(O),C):A(O)}function A(O){return O===61?(e.consume(O),N):$t(O)?(e.consume(O),A):T(O)}function N(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),p=O,I):$t(O)?(e.consume(O),N):F(O)}function I(O){return O===p?(e.consume(O),p=null,V):O===null||dt(O)?n(O):(e.consume(O),I)}function F(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||pn(O)?A(O):(e.consume(O),F)}function V(O){return O===47||O===62||$t(O)?T(O):n(O)}function j(O){return O===62?(e.consume(O),q):n(O)}function q(O){return O===null||dt(O)?Z(O):$t(O)?(e.consume(O),q):n(O)}function Z(O){return O===45&&s===2?(e.consume(O),H):O===60&&s===1?(e.consume(O),U):O===62&&s===4?(e.consume(O),$):O===63&&s===3?(e.consume(O),D):O===93&&s===5?(e.consume(O),Y):dt(O)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(CW,G,B)(O)):O===null||dt(O)?(e.exit("htmlFlowData"),B(O)):(e.consume(O),Z)}function B(O){return e.check(AW,z,G)(O)}function z(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),L}function L(O){return O===null||dt(O)?B(O):(e.enter("htmlFlowData"),Z(O))}function H(O){return O===45?(e.consume(O),D):Z(O)}function U(O){return O===47?(e.consume(O),l="",P):Z(O)}function P(O){if(O===62){const J=l.toLowerCase();return i_.includes(J)?(e.consume(O),$):Z(O)}return Sr(O)&&l.length<8?(e.consume(O),l+=String.fromCharCode(O),P):Z(O)}function Y(O){return O===93?(e.consume(O),D):Z(O)}function D(O){return O===62?(e.consume(O),$):O===45&&s===2?(e.consume(O),D):Z(O)}function $(O){return O===null||dt(O)?(e.exit("htmlFlowData"),G(O)):(e.consume(O),$)}function G(O){return e.exit("htmlFlow"),t(O)}}function MW(e,t,n){const r=this;return s;function s(l){return dt(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):n(l)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function IW(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(sf,t,n)}}const DW={name:"htmlText",tokenize:zW};function zW(e,t,n){const r=this;let s,a,l;return c;function c(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),p}function p(D){return D===33?(e.consume(D),f):D===47?(e.consume(D),A):D===63?(e.consume(D),T):Sr(D)?(e.consume(D),F):n(D)}function f(D){return D===45?(e.consume(D),h):D===91?(e.consume(D),a=0,x):Sr(D)?(e.consume(D),R):n(D)}function h(D){return D===45?(e.consume(D),b):n(D)}function m(D){return D===null?n(D):D===45?(e.consume(D),g):dt(D)?(l=m,U(D)):(e.consume(D),m)}function g(D){return D===45?(e.consume(D),b):m(D)}function b(D){return D===62?H(D):D===45?g(D):m(D)}function x(D){const $="CDATA[";return D===$.charCodeAt(a++)?(e.consume(D),a===$.length?w:x):n(D)}function w(D){return D===null?n(D):D===93?(e.consume(D),_):dt(D)?(l=w,U(D)):(e.consume(D),w)}function _(D){return D===93?(e.consume(D),E):w(D)}function E(D){return D===62?H(D):D===93?(e.consume(D),E):w(D)}function R(D){return D===null||D===62?H(D):dt(D)?(l=R,U(D)):(e.consume(D),R)}function T(D){return D===null?n(D):D===63?(e.consume(D),C):dt(D)?(l=T,U(D)):(e.consume(D),T)}function C(D){return D===62?H(D):T(D)}function A(D){return Sr(D)?(e.consume(D),N):n(D)}function N(D){return D===45||mr(D)?(e.consume(D),N):I(D)}function I(D){return dt(D)?(l=I,U(D)):$t(D)?(e.consume(D),I):H(D)}function F(D){return D===45||mr(D)?(e.consume(D),F):D===47||D===62||pn(D)?V(D):n(D)}function V(D){return D===47?(e.consume(D),H):D===58||D===95||Sr(D)?(e.consume(D),j):dt(D)?(l=V,U(D)):$t(D)?(e.consume(D),V):H(D)}function j(D){return D===45||D===46||D===58||D===95||mr(D)?(e.consume(D),j):q(D)}function q(D){return D===61?(e.consume(D),Z):dt(D)?(l=q,U(D)):$t(D)?(e.consume(D),q):V(D)}function Z(D){return D===null||D===60||D===61||D===62||D===96?n(D):D===34||D===39?(e.consume(D),s=D,B):dt(D)?(l=Z,U(D)):$t(D)?(e.consume(D),Z):(e.consume(D),z)}function B(D){return D===s?(e.consume(D),s=void 0,L):D===null?n(D):dt(D)?(l=B,U(D)):(e.consume(D),B)}function z(D){return D===null||D===34||D===39||D===60||D===61||D===96?n(D):D===47||D===62||pn(D)?V(D):(e.consume(D),z)}function L(D){return D===47||D===62||pn(D)?V(D):n(D)}function H(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),t):n(D)}function U(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),P}function P(D){return $t(D)?Vt(e,Y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):Y(D)}function Y(D){return e.enter("htmlTextData"),l(D)}}const Uk={name:"labelEnd",resolveAll:$W,resolveTo:BW,tokenize:FW},jW={tokenize:UW},LW={tokenize:qW},PW={tokenize:HW};function $W(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&Qr(e,0,e.length,n),e}function BW(e,t){let n=e.length,r=0,s,a,l,c;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(l=n);const p={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",p,t],["enter",f,t]],c=fi(c,e.slice(a+1,a+r+3)),c=fi(c,[["enter",h,t]]),c=fi(c,Wh(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),c=fi(c,[["exit",h,t],e[l-2],e[l-1],["exit",f,t]]),c=fi(c,e.slice(l+1)),c=fi(c,[["exit",p,t]]),Qr(e,a,e.length,c),e}function FW(e,t,n){const r=this;let s=r.events.length,a,l;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return c;function c(g){return a?a._inactive?m(g):(l=r.parser.defined.includes(Ti(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),p):n(g)}function p(g){return g===40?e.attempt(jW,h,l?h:m)(g):g===91?e.attempt(LW,h,l?f:m)(g):l?h(g):m(g)}function f(g){return e.attempt(PW,h,m)(g)}function h(g){return t(g)}function m(g){return a._balanced=!0,n(g)}}function UW(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return pn(m)?ac(e,a)(m):a(m)}function a(m){return m===41?h(m):sM(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return pn(m)?ac(e,p)(m):h(m)}function c(m){return n(m)}function p(m){return m===34||m===39||m===40?aM(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):h(m)}function f(m){return pn(m)?ac(e,h)(m):h(m)}function h(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function qW(e,t,n){const r=this;return s;function s(c){return oM.call(r,e,a,l,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(Ti(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function HW(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const GW={name:"labelStartImage",resolveAll:Uk.resolveAll,tokenize:VW};function VW(e,t,n){const r=this;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const KW={name:"labelStartLink",resolveAll:Uk.resolveAll,tokenize:ZW};function ZW(e,t,n){const r=this;return s;function s(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Jb={name:"lineEnding",tokenize:WW};function WW(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Vt(e,t,"linePrefix")}}const Ep={name:"thematicBreak",tokenize:YW};function YW(e,t,n){let r=0,s;return a;function a(f){return e.enter("thematicBreak"),l(f)}function l(f){return s=f,c(f)}function c(f){return f===s?(e.enter("thematicBreakSequence"),p(f)):r>=3&&(f===null||dt(f))?(e.exit("thematicBreak"),t(f)):n(f)}function p(f){return f===s?(e.consume(f),r++,p):(e.exit("thematicBreakSequence"),$t(f)?Vt(e,c,"whitespace")(f):c(f))}}const Ir={continuation:{tokenize:eY},exit:nY,name:"list",tokenize:JW},XW={partial:!0,tokenize:rY},QW={partial:!0,tokenize:tY};function JW(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,l=0;return c;function c(b){const x=r.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||b===r.containerState.marker:cv(b)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(Ep,n,f)(b):f(b);if(!r.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(b)}return n(b)}function p(b){return cv(b)&&++l<10?(e.consume(b),p):(!r.interrupt||l<2)&&(r.containerState.marker?b===r.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),f(b)):n(b)}function f(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||b,e.check(sf,r.interrupt?n:h,e.attempt(XW,g,m))}function h(b){return r.containerState.initialBlankLine=!0,a++,g(b)}function m(b){return $t(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),g):n(b)}function g(b){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function eY(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(sf,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Vt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!$t(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(QW,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Vt(e,e.attempt(Ir,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function tY(e,t,n){const r=this;return Vt(e,s,"listItemIndent",r.containerState.size+1);function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(a):n(a)}}function nY(e){e.exit(this.containerState.type)}function rY(e,t,n){const r=this;return Vt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const l=r.events[r.events.length-1];return!$t(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const s_={name:"setextUnderline",resolveTo:iY,tokenize:sY};function iY(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",l,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function sY(e,t,n){const r=this;let s;return a;function a(f){let h=r.events.length,m;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){m=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),s=f,l(f)):n(f)}function l(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===s?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),$t(f)?Vt(e,p,"lineSuffix")(f):p(f))}function p(f){return f===null||dt(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const oY={tokenize:aY};function aY(e){const t=this,n=e.attempt(sf,r,e.attempt(this.parser.constructs.flowInitial,s,Vt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(dW,s)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const lY={resolveAll:uM()},uY=lM("string"),cY=lM("text");function lM(e){return{resolveAll:uM(e==="text"?fY:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,l,c);return l;function l(h){return f(h)?a(h):c(h)}function c(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),p}function p(h){return f(h)?(n.exit("data"),a(h)):(n.consume(h),p)}function f(h){if(h===null)return!0;const m=s[h];let g=-1;if(m)for(;++g<m.length;){const b=m[g];if(!b.previous||b.previous.call(r,r.previous))return!0}return!1}}}function uM(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function fY(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let a=s.length,l=-1,c=0,p;for(;a--;){const f=s[a];if(typeof f=="string"){for(l=f.length;f.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(f===-2)p=!0,c++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||p||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const dY={42:Ir,43:Ir,45:Ir,48:Ir,49:Ir,50:Ir,51:Ir,52:Ir,53:Ir,54:Ir,55:Ir,56:Ir,57:Ir,62:tM},pY={91:bW},hY={[-2]:Qb,[-1]:Qb,32:Qb},mY={35:wW,42:Ep,45:[s_,Ep],60:RW,61:s_,95:Ep,96:r_,126:r_},gY={38:rM,92:nM},bY={[-5]:Jb,[-4]:Jb,[-3]:Jb,33:GW,38:rM,42:fv,60:[KZ,DW],91:KW,92:[xW,nM],93:Uk,95:fv,96:oW},yY={null:[fv,lY]},vY={null:[42,95]},kY={null:[]},xY=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:vY,contentInitial:pY,disable:kY,document:dY,flow:mY,flowInitial:hY,insideSpan:yY,string:gY,text:bY},Symbol.toStringTag,{value:"Module"}));function SY(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},a=[];let l=[],c=[];const p={attempt:I(A),check:I(N),consume:R,enter:T,exit:C,interrupt:I(N,{interrupt:!0})},f={code:null,containerState:{},defineSkip:w,events:[],now:x,parser:e,previous:null,sliceSerialize:g,sliceStream:b,write:m};let h=t.tokenize.call(f,p);return t.resolveAll&&a.push(t),f;function m(q){return l=fi(l,q),_(),l[l.length-1]!==null?[]:(F(t,0),f.events=Wh(a,f.events,f),f.events)}function g(q,Z){return EY(b(q),Z)}function b(q){return wY(l,q)}function x(){const{_bufferIndex:q,_index:Z,line:B,column:z,offset:L}=r;return{_bufferIndex:q,_index:Z,line:B,column:z,offset:L}}function w(q){s[q.line]=q.column,j()}function _(){let q;for(;r._index<l.length;){const Z=l[r._index];if(typeof Z=="string")for(q=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===q&&r._bufferIndex<Z.length;)E(Z.charCodeAt(r._bufferIndex));else E(Z)}}function E(q){h=h(q)}function R(q){dt(q)?(r.line++,r.column=1,r.offset+=q===-3?2:1,j()):q!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=q}function T(q,Z){const B=Z||{};return B.type=q,B.start=x(),f.events.push(["enter",B,f]),c.push(B),B}function C(q){const Z=c.pop();return Z.end=x(),f.events.push(["exit",Z,f]),Z}function A(q,Z){F(q,Z.from)}function N(q,Z){Z.restore()}function I(q,Z){return B;function B(z,L,H){let U,P,Y,D;return Array.isArray(z)?G(z):"tokenize"in z?G([z]):$(z);function $(ie){return he;function he(le){const ke=le!==null&&ie[le],Te=le!==null&&ie.null,Pe=[...Array.isArray(ke)?ke:ke?[ke]:[],...Array.isArray(Te)?Te:Te?[Te]:[]];return G(Pe)(le)}}function G(ie){return U=ie,P=0,ie.length===0?H:O(ie[P])}function O(ie){return he;function he(le){return D=V(),Y=ie,ie.partial||(f.currentConstruct=ie),ie.name&&f.parser.constructs.disable.null.includes(ie.name)?ee():ie.tokenize.call(Z?Object.assign(Object.create(f),Z):f,p,J,ee)(le)}}function J(ie){return q(Y,D),L}function ee(ie){return D.restore(),++P<U.length?O(U[P]):H}}}function F(q,Z){q.resolveAll&&!a.includes(q)&&a.push(q),q.resolve&&Qr(f.events,Z,f.events.length-Z,q.resolve(f.events.slice(Z),f)),q.resolveTo&&(f.events=q.resolveTo(f.events,f))}function V(){const q=x(),Z=f.previous,B=f.currentConstruct,z=f.events.length,L=Array.from(c);return{from:z,restore:H};function H(){r=q,f.previous=Z,f.currentConstruct=B,f.events.length=z,c=L,j()}}function j(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function wY(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let l;if(n===s)l=[e[n].slice(r,a)];else{if(l=e.slice(n,s),r>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(r):l.shift()}a>0&&l.push(e[s].slice(0,a))}return l}function EY(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const a=e[n];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
|
|
42
|
-
`;break}case-3:{l=`\r
|
|
43
|
-
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&s)continue;l=" ";break}default:l=String.fromCharCode(a)}s=a===-2,r.push(l)}return r.join("")}function TY(e){const r={constructs:JO([xY,...(e||{}).extensions||[]]),content:s(BZ),defined:[],document:s(UZ),flow:s(oY),lazy:{},string:s(uY),text:s(cY)};return r;function s(a){return l;function l(c){return SY(r,a,c)}}}function _Y(e){for(;!iM(e););return e}const o_=/[\0\t\n\r]/g;function RY(){let e=1,t="",n=!0,r;return s;function s(a,l,c){const p=[];let f,h,m,g,b;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(o_.lastIndex=m,f=o_.exec(a),g=f&&f.index!==void 0?f.index:a.length,b=a.charCodeAt(g),!f){t=a.slice(m);break}if(b===10&&m===g&&r)p.push(-3),r=void 0;else switch(r&&(p.push(-5),r=void 0),m<g&&(p.push(a.slice(m,g)),e+=g-m),b){case 0:{p.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,p.push(-2);e++<h;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:r=!0,e=1}m=g+1}return c&&(r&&p.push(-5),t&&p.push(t),p.push(null)),p}}const CY=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function AY(e){return e.replace(CY,NY)}function NY(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return eM(n.slice(a?2:1),a?16:10)}return Fk(n)||e}const cM={}.hasOwnProperty;function OY(e,t,n){return typeof t!="string"&&(n=t,t=void 0),MY(n)(_Y(TY(n).document().write(RY()(e,t,!0))))}function MY(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ne),autolinkProtocol:V,autolinkEmail:V,atxHeading:a(Me),blockQuote:a(Te),characterEscape:V,characterReference:V,codeFenced:a(Pe),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(Pe,l),codeText:a(ue,l),codeTextData:V,data:V,codeFlowValue:V,definition:a(Ee),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(Ce),hardBreakEscape:a(ve),hardBreakTrailing:a(ve),htmlFlow:a(xe,l),htmlFlowData:V,htmlText:a(xe,l),htmlTextData:V,image:a(De),label:l,link:a(Ne),listItem:a(ge),listItemValue:g,listOrdered:a(Ie,m),listUnordered:a(Ie),paragraph:a(fe),reference:O,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(Me),strong:a(se),thematicBreak:a(_e)},exit:{atxHeading:p(),atxHeadingSequence:A,autolink:p(),autolinkEmail:ke,autolinkProtocol:le,blockQuote:p(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:ee,characterReferenceMarkerNumeric:ee,characterReferenceValue:ie,characterReference:he,codeFenced:p(_),codeFencedFence:w,codeFencedFenceInfo:b,codeFencedFenceMeta:x,codeFlowValue:j,codeIndented:p(E),codeText:p(L),codeTextData:j,data:j,definition:p(),definitionDestinationString:C,definitionLabelString:R,definitionTitleString:T,emphasis:p(),hardBreakEscape:p(Z),hardBreakTrailing:p(Z),htmlFlow:p(B),htmlFlowData:j,htmlText:p(z),htmlTextData:j,image:p(U),label:Y,labelText:P,lineEnding:q,link:p(H),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:J,resourceDestinationString:D,resourceTitleString:$,resource:G,setextHeading:p(F),setextHeadingLineSequence:I,setextHeadingText:N,strong:p(),thematicBreak:p()}};fM(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(te){let ae={type:"root",children:[]};const ze={stack:[ae],tokenStack:[],config:t,enter:c,exit:f,buffer:l,resume:h,data:n},Ue=[];let Ge=-1;for(;++Ge<te.length;)if(te[Ge][1].type==="listOrdered"||te[Ge][1].type==="listUnordered")if(te[Ge][0]==="enter")Ue.push(Ge);else{const Ye=Ue.pop();Ge=s(te,Ye,Ge)}for(Ge=-1;++Ge<te.length;){const Ye=t[te[Ge][0]];cM.call(Ye,te[Ge][1].type)&&Ye[te[Ge][1].type].call(Object.assign({sliceSerialize:te[Ge][2].sliceSerialize},ze),te[Ge][1])}if(ze.tokenStack.length>0){const Ye=ze.tokenStack[ze.tokenStack.length-1];(Ye[1]||a_).call(ze,void 0,Ye[0])}for(ae.position={start:no(te.length>0?te[0][1].start:{line:1,column:1,offset:0}),end:no(te.length>0?te[te.length-2][1].end:{line:1,column:1,offset:0})},Ge=-1;++Ge<t.transforms.length;)ae=t.transforms[Ge](ae)||ae;return ae}function s(te,ae,ze){let Ue=ae-1,Ge=-1,Ye=!1,rt,st,ot,Et;for(;++Ue<=ze;){const it=te[Ue];switch(it[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{it[0]==="enter"?Ge++:Ge--,Et=void 0;break}case"lineEndingBlank":{it[0]==="enter"&&(rt&&!Et&&!Ge&&!ot&&(ot=Ue),Et=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Et=void 0}if(!Ge&&it[0]==="enter"&&it[1].type==="listItemPrefix"||Ge===-1&&it[0]==="exit"&&(it[1].type==="listUnordered"||it[1].type==="listOrdered")){if(rt){let vt=Ue;for(st=void 0;vt--;){const Xe=te[vt];if(Xe[1].type==="lineEnding"||Xe[1].type==="lineEndingBlank"){if(Xe[0]==="exit")continue;st&&(te[st][1].type="lineEndingBlank",Ye=!0),Xe[1].type="lineEnding",st=vt}else if(!(Xe[1].type==="linePrefix"||Xe[1].type==="blockQuotePrefix"||Xe[1].type==="blockQuotePrefixWhitespace"||Xe[1].type==="blockQuoteMarker"||Xe[1].type==="listItemIndent"))break}ot&&(!st||ot<st)&&(rt._spread=!0),rt.end=Object.assign({},st?te[st][1].start:it[1].end),te.splice(st||Ue,0,["exit",rt,it[2]]),Ue++,ze++}if(it[1].type==="listItemPrefix"){const vt={type:"listItem",_spread:!1,start:Object.assign({},it[1].start),end:void 0};rt=vt,te.splice(Ue,0,["enter",vt,it[2]]),Ue++,ze++,ot=void 0,Et=!0}}}return te[ae][1]._spread=Ye,ze}function a(te,ae){return ze;function ze(Ue){c.call(this,te(Ue),Ue),ae&&ae.call(this,Ue)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(te,ae,ze){this.stack[this.stack.length-1].children.push(te),this.stack.push(te),this.tokenStack.push([ae,ze||void 0]),te.position={start:no(ae.start),end:void 0}}function p(te){return ae;function ae(ze){te&&te.call(this,ze),f.call(this,ze)}}function f(te,ae){const ze=this.stack.pop(),Ue=this.tokenStack.pop();if(Ue)Ue[0].type!==te.type&&(ae?ae.call(this,te,Ue[0]):(Ue[1]||a_).call(this,te,Ue[0]));else throw new Error("Cannot close `"+te.type+"` ("+oc({start:te.start,end:te.end})+"): it’s not open");ze.position.end=no(te.end)}function h(){return Bk(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function g(te){if(this.data.expectingFirstListItemValue){const ae=this.stack[this.stack.length-2];ae.start=Number.parseInt(this.sliceSerialize(te),10),this.data.expectingFirstListItemValue=void 0}}function b(){const te=this.resume(),ae=this.stack[this.stack.length-1];ae.lang=te}function x(){const te=this.resume(),ae=this.stack[this.stack.length-1];ae.meta=te}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const te=this.resume(),ae=this.stack[this.stack.length-1];ae.value=te.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const te=this.resume(),ae=this.stack[this.stack.length-1];ae.value=te.replace(/(\r?\n|\r)$/g,"")}function R(te){const ae=this.resume(),ze=this.stack[this.stack.length-1];ze.label=ae,ze.identifier=Ti(this.sliceSerialize(te)).toLowerCase()}function T(){const te=this.resume(),ae=this.stack[this.stack.length-1];ae.title=te}function C(){const te=this.resume(),ae=this.stack[this.stack.length-1];ae.url=te}function A(te){const ae=this.stack[this.stack.length-1];if(!ae.depth){const ze=this.sliceSerialize(te).length;ae.depth=ze}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function I(te){const ae=this.stack[this.stack.length-1];ae.depth=this.sliceSerialize(te).codePointAt(0)===61?1:2}function F(){this.data.setextHeadingSlurpLineEnding=void 0}function V(te){const ze=this.stack[this.stack.length-1].children;let Ue=ze[ze.length-1];(!Ue||Ue.type!=="text")&&(Ue=ne(),Ue.position={start:no(te.start),end:void 0},ze.push(Ue)),this.stack.push(Ue)}function j(te){const ae=this.stack.pop();ae.value+=this.sliceSerialize(te),ae.position.end=no(te.end)}function q(te){const ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ze=ae.children[ae.children.length-1];ze.position.end=no(te.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ae.type)&&(V.call(this,te),j.call(this,te))}function Z(){this.data.atHardBreak=!0}function B(){const te=this.resume(),ae=this.stack[this.stack.length-1];ae.value=te}function z(){const te=this.resume(),ae=this.stack[this.stack.length-1];ae.value=te}function L(){const te=this.resume(),ae=this.stack[this.stack.length-1];ae.value=te}function H(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=ae,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function U(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=ae,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function P(te){const ae=this.sliceSerialize(te),ze=this.stack[this.stack.length-2];ze.label=AY(ae),ze.identifier=Ti(ae).toLowerCase()}function Y(){const te=this.stack[this.stack.length-1],ae=this.resume(),ze=this.stack[this.stack.length-1];if(this.data.inReference=!0,ze.type==="link"){const Ue=te.children;ze.children=Ue}else ze.alt=ae}function D(){const te=this.resume(),ae=this.stack[this.stack.length-1];ae.url=te}function $(){const te=this.resume(),ae=this.stack[this.stack.length-1];ae.title=te}function G(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function J(te){const ae=this.resume(),ze=this.stack[this.stack.length-1];ze.label=ae,ze.identifier=Ti(this.sliceSerialize(te)).toLowerCase(),this.data.referenceType="full"}function ee(te){this.data.characterReferenceType=te.type}function ie(te){const ae=this.sliceSerialize(te),ze=this.data.characterReferenceType;let Ue;ze?(Ue=eM(ae,ze==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ue=Fk(ae);const Ge=this.stack[this.stack.length-1];Ge.value+=Ue}function he(te){const ae=this.stack.pop();ae.position.end=no(te.end)}function le(te){j.call(this,te);const ae=this.stack[this.stack.length-1];ae.url=this.sliceSerialize(te)}function ke(te){j.call(this,te);const ae=this.stack[this.stack.length-1];ae.url="mailto:"+this.sliceSerialize(te)}function Te(){return{type:"blockquote",children:[]}}function Pe(){return{type:"code",lang:null,meta:null,value:""}}function ue(){return{type:"inlineCode",value:""}}function Ee(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ce(){return{type:"emphasis",children:[]}}function Me(){return{type:"heading",depth:0,children:[]}}function ve(){return{type:"break"}}function xe(){return{type:"html",value:""}}function De(){return{type:"image",title:null,url:"",alt:null}}function Ne(){return{type:"link",title:null,url:"",children:[]}}function Ie(te){return{type:"list",ordered:te.type==="listOrdered",start:null,spread:te._spread,children:[]}}function ge(te){return{type:"listItem",spread:te._spread,checked:null,children:[]}}function fe(){return{type:"paragraph",children:[]}}function se(){return{type:"strong",children:[]}}function ne(){return{type:"text",value:""}}function _e(){return{type:"thematicBreak"}}}function no(e){return{line:e.line,column:e.column,offset:e.offset}}function fM(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?fM(e,r):IY(e,r)}}function IY(e,t){let n;for(n in t)if(cM.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function a_(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+oc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+oc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+oc({start:t.start,end:t.end})+") is still open")}function DY(e){const t=this;t.parser=n;function n(r){return OY(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function zY(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function jY(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
44
|
-
`}]}function LY(e,t){const n=t.value?t.value+`
|
|
45
|
-
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function PY(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $Y(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function BY(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=$l(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+1,c+=1,e.footnoteCounts.set(r,c);const p={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,p);const f={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(t,f),e.applyData(t,f)}function FY(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function UY(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function dM(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const l=s[s.length-1];return l&&l.type==="text"?l.value+=r:s.push({type:"text",value:r}),s}function qY(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return dM(e,t);const s={src:$l(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function HY(e,t){const n={src:$l(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function GY(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function VY(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return dM(e,t);const s={href:$l(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function KY(e,t){const n={href:$l(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ZY(e,t,n){const r=e.all(t),s=n?WY(n):pM(t),a={},l=[];if(typeof t.checked=="boolean"){const h=r[0];let m;h&&h.type==="element"&&h.tagName==="p"?m=h:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const h=r[c];(s||c!==0||h.type!=="element"||h.tagName!=="p")&&l.push({type:"text",value:`
|
|
46
|
-
`}),h.type==="element"&&h.tagName==="p"&&!s?l.push(...h.children):l.push(h)}const p=r[r.length-1];p&&(s||p.type!=="element"||p.tagName!=="p")&&l.push({type:"text",value:`
|
|
47
|
-
`});const f={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,f),e.applyData(t,f)}function WY(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=pM(n[r])}return t}function pM(e){const t=e.spread;return t??e.children.length>1}function YY(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const l=r[s];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function XY(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function QY(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function JY(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eX(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),s.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=jk(t.children[1]),p=VO(t.children[t.children.length-1]);c&&p&&(l.position={start:c,end:p}),s.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function tX(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let p=-1;const f=[];for(;++p<c;){const m=t.children[p],g={},b=l?l[p]:void 0;b&&(g.align=b);let x={type:"element",tagName:a,properties:g,children:[]};m&&(x.children=e.all(m),e.patch(m,x),x=e.applyData(m,x)),f.push(x)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,h),e.applyData(t,h)}function nX(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const l_=9,u_=32;function rX(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(c_(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(c_(t.slice(s),s>0,!1)),a.join("")}function c_(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===l_||a===u_;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===l_||a===u_;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function iX(e,t){const n={type:"text",value:rX(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function sX(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const oX={blockquote:zY,break:jY,code:LY,delete:PY,emphasis:$Y,footnoteReference:BY,heading:FY,html:UY,imageReference:qY,image:HY,inlineCode:GY,linkReference:VY,link:KY,listItem:ZY,list:YY,paragraph:XY,root:QY,strong:JY,table:eX,tableCell:nX,tableRow:tX,text:iX,thematicBreak:sX,toml:sp,yaml:sp,definition:sp,footnoteDefinition:sp};function sp(){}const hM=-1,Yh=0,lc=1,ih=2,qk=3,Hk=4,Gk=5,Vk=6,mM=7,gM=8,f_=typeof self=="object"?self:globalThis,aX=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,l]=t[s];switch(a){case Yh:case hM:return n(l,s);case lc:{const c=n([],s);for(const p of l)c.push(r(p));return c}case ih:{const c=n({},s);for(const[p,f]of l)c[r(p)]=r(f);return c}case qk:return n(new Date(l),s);case Hk:{const{source:c,flags:p}=l;return n(new RegExp(c,p),s)}case Gk:{const c=n(new Map,s);for(const[p,f]of l)c.set(r(p),r(f));return c}case Vk:{const c=n(new Set,s);for(const p of l)c.add(r(p));return c}case mM:{const{name:c,message:p}=l;return n(new f_[c](p),s)}case gM:return n(BigInt(l),s);case"BigInt":return n(Object(BigInt(l)),s);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(new f_[a](l),s)};return r},d_=e=>aX(new Map,e)(0),el="",{toString:lX}={},{keys:uX}=Object,Hu=e=>{const t=typeof e;if(t!=="object"||!e)return[Yh,t];const n=lX.call(e).slice(8,-1);switch(n){case"Array":return[lc,el];case"Object":return[ih,el];case"Date":return[qk,el];case"RegExp":return[Hk,el];case"Map":return[Gk,el];case"Set":return[Vk,el];case"DataView":return[lc,n]}return n.includes("Array")?[lc,n]:n.includes("Error")?[mM,n]:[ih,n]},op=([e,t])=>e===Yh&&(t==="function"||t==="symbol"),cX=(e,t,n,r)=>{const s=(l,c)=>{const p=r.push(l)-1;return n.set(c,p),p},a=l=>{if(n.has(l))return n.get(l);let[c,p]=Hu(l);switch(c){case Yh:{let h=l;switch(p){case"bigint":c=gM,h=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);h=null;break;case"undefined":return s([hM],l)}return s([c,h],l)}case lc:{if(p){let g=l;return p==="DataView"?g=new Uint8Array(l.buffer):p==="ArrayBuffer"&&(g=new Uint8Array(l)),s([p,[...g]],l)}const h=[],m=s([c,h],l);for(const g of l)h.push(a(g));return m}case ih:{if(p)switch(p){case"BigInt":return s([p,l.toString()],l);case"Boolean":case"Number":case"String":return s([p,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const h=[],m=s([c,h],l);for(const g of uX(l))(e||!op(Hu(l[g])))&&h.push([a(g),a(l[g])]);return m}case qk:return s([c,l.toISOString()],l);case Hk:{const{source:h,flags:m}=l;return s([c,{source:h,flags:m}],l)}case Gk:{const h=[],m=s([c,h],l);for(const[g,b]of l)(e||!(op(Hu(g))||op(Hu(b))))&&h.push([a(g),a(b)]);return m}case Vk:{const h=[],m=s([c,h],l);for(const g of l)(e||!op(Hu(g)))&&h.push(a(g));return m}}const{message:f}=l;return s([c,{name:p,message:f}],l)};return a},p_=(e,{json:t,lossy:n}={})=>{const r=[];return cX(!(t||n),!!t,new Map,r)(e),r},sh=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?d_(p_(e,t)):structuredClone(e):(e,t)=>d_(p_(e,t));function fX(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function dX(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function pX(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||fX,r=e.options.footnoteBackLabel||dX,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let p=-1;for(;++p<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[p]);if(!f)continue;const h=e.all(f),m=String(f.identifier).toUpperCase(),g=$l(m.toLowerCase());let b=0;const x=[],w=e.footnoteCounts.get(m);for(;w!==void 0&&++b<=w;){x.length>0&&x.push({type:"text",value:" "});let R=typeof n=="string"?n:n(p,b);typeof R=="string"&&(R={type:"text",value:R}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+g+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(p,b),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const _=h[h.length-1];if(_&&_.type==="element"&&_.tagName==="p"){const R=_.children[_.children.length-1];R&&R.type==="text"?R.value+=" ":_.children.push({type:"text",value:" "}),_.children.push(...x)}else h.push(...x);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(h,!0)};e.patch(f,E),c.push(E)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...sh(l),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
48
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
49
|
-
`}]}}const of=(function(e){if(e==null)return bX;if(typeof e=="function")return Xh(e);if(typeof e=="object")return Array.isArray(e)?hX(e):mX(e);if(typeof e=="string")return gX(e);throw new Error("Expected function, string, or object as test")});function hX(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=of(e[n]);return Xh(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function mX(e){const t=e;return Xh(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function gX(e){return Xh(t);function t(n){return n&&n.type===e}}function Xh(e){return t;function t(n,r,s){return!!(yX(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function bX(){return!0}function yX(e){return e!==null&&typeof e=="object"&&"type"in e}const bM=[],vX=!0,dv=!1,kX="skip";function yM(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=of(s),l=r?-1:1;c(e,void 0,[])();function c(p,f,h){const m=p&&typeof p=="object"?p:{};if(typeof m.type=="string"){const b=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(g,"name",{value:"node ("+(p.type+(b?"<"+b+">":""))+")"})}return g;function g(){let b=bM,x,w,_;if((!t||a(p,f,h[h.length-1]||void 0))&&(b=xX(n(p,h)),b[0]===dv))return b;if("children"in p&&p.children){const E=p;if(E.children&&b[0]!==kX)for(w=(r?E.children.length:-1)+l,_=h.concat(E);w>-1&&w<E.children.length;){const R=E.children[w];if(x=c(R,w,_)(),x[0]===dv)return x;w=typeof x[1]=="number"?x[1]:w+l}}return b}}}function xX(e){return Array.isArray(e)?e:typeof e=="number"?[vX,e]:e==null?bM:[e]}function Qh(e,t,n,r){let s,a,l;typeof t=="function"&&typeof n!="function"?(a=void 0,l=t,s=n):(a=t,l=n,s=r),yM(e,a,c,s);function c(p,f){const h=f[f.length-1],m=h?h.children.indexOf(p):void 0;return l(p,m,h)}}const pv={}.hasOwnProperty,SX={};function wX(e,t){const n=t||SX,r=new Map,s=new Map,a=new Map,l={...oX,...n.handlers},c={all:f,applyData:TX,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:l,one:p,options:n,patch:EX,wrap:RX};return Qh(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const m=h.type==="definition"?r:s,g=String(h.identifier).toUpperCase();m.has(g)||m.set(g,h)}}),c;function p(h,m){const g=h.type,b=c.handlers[g];if(pv.call(c.handlers,g)&&b)return b(c,h,m);if(c.options.passThrough&&c.options.passThrough.includes(g)){if("children"in h){const{children:w,..._}=h,E=sh(_);return E.children=c.all(h),E}return sh(h)}return(c.options.unknownHandler||_X)(c,h,m)}function f(h){const m=[];if("children"in h){const g=h.children;let b=-1;for(;++b<g.length;){const x=c.one(g[b],h);if(x){if(b&&g[b-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=h_(x.value)),!Array.isArray(x)&&x.type==="element")){const w=x.children[0];w&&w.type==="text"&&(w.value=h_(w.value))}Array.isArray(x)?m.push(...x):m.push(x)}}}return m}}function EX(e,t){e.position&&(t.position=dZ(e))}function TX(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&a&&Object.assign(n.properties,sh(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function _X(e,t){const n=t.data||{},r="value"in t&&!(pv.call(n,"hProperties")||pv.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function RX(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
50
|
-
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
51
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
52
|
-
`}),n}function h_(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function m_(e,t){const n=wX(e,t),r=n.one(e,void 0),s=pX(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
|
|
53
|
-
`},s),a}function CX(e,t){return e&&"run"in e?async function(n,r){const s=m_(n,{file:r,...t});await e.run(s,r)}:function(n,r){return m_(n,{file:r,...e||t})}}function g_(e){if(e)throw e}var ey,b_;function AX(){if(b_)return ey;b_=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var h=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!h&&!m)return!1;var g;for(g in f);return typeof g>"u"||e.call(f,g)},l=function(f,h){n&&h.name==="__proto__"?n(f,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):f[h.name]=h.newValue},c=function(f,h){if(h==="__proto__")if(e.call(f,h)){if(r)return r(f,h).value}else return;return f[h]};return ey=function p(){var f,h,m,g,b,x,w=arguments[0],_=1,E=arguments.length,R=!1;for(typeof w=="boolean"&&(R=w,w=arguments[1]||{},_=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});_<E;++_)if(f=arguments[_],f!=null)for(h in f)m=c(w,h),g=c(f,h),w!==g&&(R&&g&&(a(g)||(b=s(g)))?(b?(b=!1,x=m&&s(m)?m:[]):x=m&&a(m)?m:{},l(w,{name:h,newValue:p(R,x,g)})):typeof g<"u"&&l(w,{name:h,newValue:g}));return w},ey}var NX=AX();const ty=uh(NX);function hv(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function OX(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const l=s.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...s);function c(p,...f){const h=e[++a];let m=-1;if(p){l(p);return}for(;++m<s.length;)(f[m]===null||f[m]===void 0)&&(f[m]=s[m]);s=f,h?MX(h,c)(...f):l(null,...f)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function MX(e,t){let n;return r;function r(...l){const c=e.length>l.length;let p;c&&l.push(s);try{p=e.apply(this,l)}catch(f){const h=f;if(c&&n)throw h;return s(h)}c||(p&&p.then&&typeof p.then=="function"?p.then(a,s):p instanceof Error?s(p):a(p))}function s(l,...c){n||(n=!0,t(l,...c))}function a(l){s(null,l)}}const ji={basename:IX,dirname:DX,extname:zX,join:jX,sep:"/"};function IX(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');af(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else l<0&&(a=!0,l=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(r=s):(c=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function DX(e){if(af(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function zX(e){af(e);let t=e.length,n=-1,r=0,s=-1,a=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function jX(...e){let t=-1,n;for(;++t<e.length;)af(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":LX(n)}function LX(e){af(e);const t=e.codePointAt(0)===47;let n=PX(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function PX(e,t){let n="",r=0,s=-1,a=0,l=-1,c,p;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(s===l-1||a===1))if(s!==l-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(p=n.lastIndexOf("/"),p!==n.length-1){p<0?(n="",r=0):(n=n.slice(0,p),r=n.length-1-n.lastIndexOf("/")),s=l,a=0;continue}}else if(n.length>0){n="",r=0,s=l,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,l):n=e.slice(s+1,l),r=l-s-1;s=l,a=0}else c===46&&a>-1?a++:a=-1}return n}function af(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const $X={cwd:BX};function BX(){return"/"}function mv(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function FX(e){if(typeof e=="string")e=new URL(e);else if(!mv(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return UX(e)}function UX(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const ny=["history","path","basename","stem","extname","dirname"];class vM{constructor(t){let n;t?mv(t)?n={path:t}:typeof t=="string"||qX(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":$X.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ny.length;){const a=ny[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)ny.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?ji.basename(this.path):void 0}set basename(t){iy(t,"basename"),ry(t,"basename"),this.path=ji.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ji.dirname(this.path):void 0}set dirname(t){y_(this.basename,"dirname"),this.path=ji.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ji.extname(this.path):void 0}set extname(t){if(ry(t,"extname"),y_(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ji.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){mv(t)&&(t=FX(t)),iy(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ji.basename(this.path,this.extname):void 0}set stem(t){iy(t,"stem"),ry(t,"stem"),this.path=ji.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new br(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ry(e,t){if(e&&e.includes(ji.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ji.sep+"`")}function iy(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function y_(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function qX(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const HX=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),GX={}.hasOwnProperty;class Kk extends HX{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=OX()}copy(){const t=new Kk;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ty(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ay("data",this.frozen),this.namespace[t]=n,this):GX.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ay("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ap(t),r=this.parser||this.Parser;return sy("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),sy("process",this.parser||this.Parser),oy("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,l){const c=ap(t),p=r.parse(c);r.run(p,c,function(h,m,g){if(h||!m||!g)return f(h);const b=m,x=r.stringify(b,g);ZX(x)?g.value=x:g.result=x,f(h,g)});function f(h,m){h||!m?l(h):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),sy("processSync",this.parser||this.Parser),oy("processSync",this.compiler||this.Compiler),this.process(t,s),k_("processSync","process",n),r;function s(a,l){n=!0,g_(a),r=l}}run(t,n,r){v_(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(l,c){const p=ap(n);s.run(t,p,f);function f(h,m,g){const b=m||t;h?c(h):l?l(b):r(void 0,b,g)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),k_("runSync","run",r),s;function a(l,c){g_(l),s=c,r=!0}}stringify(t,n){this.freeze();const r=ap(n),s=this.compiler||this.Compiler;return oy("stringify",s),v_(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(ay("use",this.frozen),t!=null)if(typeof t=="function")p(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")p(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[h,...m]=f;p(h,m)}else l(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function l(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(f.plugins),f.settings&&(s.settings=ty(!0,s.settings,f.settings))}function c(f){let h=-1;if(f!=null)if(Array.isArray(f))for(;++h<f.length;){const m=f[h];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function p(f,h){let m=-1,g=-1;for(;++m<r.length;)if(r[m][0]===f){g=m;break}if(g===-1)r.push([f,...h]);else if(h.length>0){let[b,...x]=h;const w=r[g][1];hv(w)&&hv(b)&&(b=ty(!0,w,b)),r[g]=[f,b,...x]}}}}const VX=new Kk().freeze();function sy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function oy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ay(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function v_(e){if(!hv(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function k_(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ap(e){return KX(e)?e:new vM(e)}function KX(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function ZX(e){return typeof e=="string"||WX(e)}function WX(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const YX="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",x_=[],S_={allowDangerousHtml:!0},XX=/^(https?|ircs?|mailto|xmpp)$/i,QX=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function JX(e){const t=eQ(e),n=tQ(e);return nQ(t.runSync(t.parse(n),n),e)}function eQ(e){const t=e.rehypePlugins||x_,n=e.remarkPlugins||x_,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...S_}:S_;return VX().use(DY).use(n).use(CX,r).use(t)}function tQ(e){const t=e.children||"",n=new vM;return typeof t=="string"&&(n.value=t),n}function nQ(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,p=t.urlTransform||rQ;for(const h of QX)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+YX+h.id,void 0);return Qh(e,f),bZ(e,{Fragment:v.Fragment,components:s,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function f(h,m,g){if(h.type==="raw"&&g&&typeof m=="number")return l?g.children.splice(m,1):g.children[m]={type:"text",value:h.value},m;if(h.type==="element"){let b;for(b in Xb)if(Object.hasOwn(Xb,b)&&Object.hasOwn(h.properties,b)){const x=h.properties[b],w=Xb[b];(w===null||w.includes(h.tagName))&&(h.properties[b]=p(String(x||""),b,h))}}if(h.type==="element"){let b=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!b&&r&&typeof m=="number"&&(b=!r(h,m,g)),b&&g&&typeof m=="number")return c&&h.children?g.children.splice(m,1,...h.children):g.children.splice(m,1),m}}}function rQ(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||XX.test(e.slice(0,t))?e:""}const w_=(function(e,t,n){const r=of(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),da=(function(e){if(e==null)return oQ;if(typeof e=="string")return sQ(e);if(typeof e=="object")return iQ(e);if(typeof e=="function")return Zk(e);throw new Error("Expected function, string, or array as `test`")});function iQ(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=da(e[n]);return Zk(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function sQ(e){return Zk(t);function t(n){return n.tagName===e}}function Zk(e){return t;function t(n,r,s){return!!(aQ(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function oQ(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function aQ(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const E_=/\n/g,T_=/[\t ]+/g,gv=da("br"),__=da(mQ),lQ=da("p"),R_=da("tr"),uQ=da(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",hQ,gQ]),kM=da(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function cQ(e,t){const n=t||{},r="children"in e?e.children:[],s=kM(e),a=wM(e,{whitespace:n.whitespace||"normal"}),l=[];(e.type==="text"||e.type==="comment")&&l.push(...SM(e,{breakBefore:!0,breakAfter:!0}));let c=-1;for(;++c<r.length;)l.push(...xM(r[c],e,{whitespace:a,breakBefore:c?void 0:s,breakAfter:c<r.length-1?gv(r[c+1]):s}));const p=[];let f;for(c=-1;++c<l.length;){const h=l[c];typeof h=="number"?f!==void 0&&h>f&&(f=h):h&&(f!==void 0&&f>-1&&p.push(`
|
|
54
|
-
`.repeat(f)||" "),f=-1,p.push(h))}return p.join("")}function xM(e,t,n){return e.type==="element"?fQ(e,t,n):e.type==="text"?n.whitespace==="normal"?SM(e,n):dQ(e):[]}function fQ(e,t,n){const r=wM(e,n),s=e.children||[];let a=-1,l=[];if(uQ(e))return l;let c,p;for(gv(e)||R_(e)&&w_(t,e,R_)?p=`
|
|
55
|
-
`:lQ(e)?(c=2,p=2):kM(e)&&(c=1,p=1);++a<s.length;)l=l.concat(xM(s[a],e,{whitespace:r,breakBefore:a?void 0:c,breakAfter:a<s.length-1?gv(s[a+1]):p}));return __(e)&&w_(t,e,__)&&l.push(" "),c&&l.unshift(c),p&&l.push(p),l}function SM(e,t){const n=String(e.value),r=[],s=[];let a=0;for(;a<=n.length;){E_.lastIndex=a;const p=E_.exec(n),f=p&&"index"in p?p.index:n.length;r.push(pQ(n.slice(a,f).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),a===0?t.breakBefore:!0,f===n.length?t.breakAfter:!0)),a=f+1}let l=-1,c;for(;++l<r.length;)r[l].charCodeAt(r[l].length-1)===8203||l<r.length-1&&r[l+1].charCodeAt(0)===8203?(s.push(r[l]),c=void 0):r[l]?(typeof c=="number"&&s.push(c),s.push(r[l]),c=0):(l===0||l===r.length-1)&&s.push(0);return s}function dQ(e){return[String(e.value)]}function pQ(e,t,n){const r=[];let s=0,a;for(;s<e.length;){T_.lastIndex=s;const l=T_.exec(e);a=l?l.index:e.length,!s&&!a&&l&&!t&&r.push(""),s!==a&&r.push(e.slice(s,a)),s=l?a+l[0].length:a}return s!==a&&!n&&r.push(""),r.join(" ")}function wM(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function hQ(e){return!!(e.properties||{}).hidden}function mQ(e){return e.tagName==="td"||e.tagName==="th"}function gQ(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function bQ(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",l="(?!struct)("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},f={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})"/})]},h={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},m={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(f,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},g={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},b=t.optional(s)+e.IDENT_RE+"\\s*\\(",x=["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"],w=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],_=["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"],E=["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"],C={type:w,keyword:x,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:_},A={className:"function.dispatch",relevance:0,keywords:{_hint:E},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[A,m,c,n,e.C_BLOCK_COMMENT_MODE,h,f],I={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:N.concat([{begin:/\(/,end:/\)/,keywords:C,contains:N.concat(["self"]),relevance:0}]),relevance:0},F={className:"function",begin:"("+l+"[\\*&\\s]+)+"+b,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:C,relevance:0},{begin:b,returnBegin:!0,contains:[g],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[f,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,h,c,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:C,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(I,F,A,N,[m,{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:C,contains:["self",c]},{begin:e.IDENT_RE+"::",keywords:C},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function yQ(e){const 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"],_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"],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=bQ(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 vQ(e){const 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]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),l={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(c);const p={match:/\\"/},f={className:"string",begin:/'/,end:/'/},h={match:/\\'/},m={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},g=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],b=e.SHEBANG({binary:`(${g.join("|")})`,relevance:10}),x={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},w=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],_=["true","false"],E={match:/(\/[a-z._-]+)+/},R=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],T=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],C=["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"],A=["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"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:w,literal:_,built_in:[...R,...T,"set","shopt",...C,...A]},contains:[b,e.SHEBANG(),x,m,a,l,E,c,p,f,h,n]}}function kQ(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",l="("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},f={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})"/})]},h={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},m={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(f,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},g={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},b=t.optional(s)+e.IDENT_RE+"\\s*\\(",_={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"],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"],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"},E=[m,c,n,e.C_BLOCK_COMMENT_MODE,h,f],R={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:E.concat([{begin:/\(/,end:/\)/,keywords:_,contains:E.concat(["self"]),relevance:0}]),relevance:0},T={begin:"("+l+"[\\*&\\s]+)+"+b,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:_,relevance:0},{begin:b,returnBegin:!0,contains:[e.inherit(g,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,h,c,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C",aliases:["h"],keywords:_,disableAutodetect:!0,illegal:"</",contains:[].concat(R,T,E,[m,{begin:e.IDENT_RE+"::",keywords:_},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:m,strings:f,keywords:_}}}function xQ(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",l="(?!struct)("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},f={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})"/})]},h={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},m={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(f,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},g={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},b=t.optional(s)+e.IDENT_RE+"\\s*\\(",x=["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"],w=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],_=["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"],E=["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"],C={type:w,keyword:x,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:_},A={className:"function.dispatch",relevance:0,keywords:{_hint:E},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[A,m,c,n,e.C_BLOCK_COMMENT_MODE,h,f],I={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:N.concat([{begin:/\(/,end:/\)/,keywords:C,contains:N.concat(["self"]),relevance:0}]),relevance:0},F={className:"function",begin:"("+l+"[\\*&\\s]+)+"+b,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:C,relevance:0},{begin:b,returnBegin:!0,contains:[g],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[f,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,h,c,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:C,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(I,F,A,N,[m,{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:C,contains:["self",c]},{begin:e.IDENT_RE+"::",keywords:C},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function SQ(e){const 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=["default","false","null","true"],s=["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"],a=["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"],l={keyword:s.concat(a),built_in:t,literal:r},c=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),p={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},f={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},h={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},m=e.inherit(h,{illegal:/\n/}),g={className:"subst",begin:/\{/,end:/\}/,keywords:l},b=e.inherit(g,{illegal:/\n/}),x={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,b]},w={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},g]},_=e.inherit(w,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},b]});g.contains=[w,x,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,e.C_BLOCK_COMMENT_MODE],b.contains=[_,x,m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const E={variants:[f,w,x,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},R={begin:"<",end:">",contains:[{beginKeywords:"in out"},c]},T=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",C={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:l,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"}},E,p,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},c,R,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[c,R,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:"("+T+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:l,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,R],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,relevance:0,contains:[E,p,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},C]}}const wQ=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/},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_-]*/}}),EQ=["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"],TQ=["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"],_Q=[...EQ,...TQ],RQ=["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"].sort().reverse(),CQ=["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"].sort().reverse(),AQ=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),NQ=["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","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"].sort().reverse();function OQ(e){const t=e.regex,n=wQ(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",a=/@-?\w[\w]*(-\w+)*/,l="[a-zA-Z-][a-zA-Z0-9_-]*",c=[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:"\\."+l,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+CQ.join("|")+")"},{begin:":(:)?("+AQ.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+NQ.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...c,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...c,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:a},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:RQ.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...c,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+_Q.join("|")+")\\b"}]}}function MQ(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\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 IQ(e){const a={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:a,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:a,illegal:/["']/}]}]}}function DQ(e){const t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;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(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function zQ(e){const 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:/$/}];const s={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},a={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[r,a,s,l,n,"self"],relevance:0},p=/[A-Za-z0-9_-]+/,f=/"(\\"|[^"])*"/,h=/'[^']*'/,m=t.either(p,f,h),g=t.concat(m,"(\\s*\\.\\s*",m,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:g,className:"attr",starts:{end:/$/,contains:[r,c,a,s,l,n]}}]}}var nl="[0-9](_*[0-9])*",lp=`\\.(${nl})`,up="[0-9a-fA-F](_*[0-9a-fA-F])*",C_={className:"number",variants:[{begin:`(\\b(${nl})((${lp})|\\.)?|(${lp}))[eE][+-]?(${nl})[fFdD]?\\b`},{begin:`\\b(${nl})((${lp})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${lp})[fFdD]?\\b`},{begin:`\\b(${nl})[fFdD]\\b`},{begin:`\\b0[xX]((${up})\\.?|(${up})?\\.(${up}))[pP][+-]?(${nl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${up})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function EM(e,t,n){return n===-1?"":e.replace(t,r=>EM(e,t,n-1))}function jQ(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+EM("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),p={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"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},f={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},h={className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:p,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:[h,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:p,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[f,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,C_,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},C_,f]}}const A_="[A-Za-z$_][0-9A-Za-z$_]*",LQ=["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"],PQ=["true","false","null","undefined","NaN","Infinity"],TM=["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"],_M=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],RM=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],$Q=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],BQ=[].concat(RM,TM,_M);function FQ(e){const t=e.regex,n=(P,{after:Y})=>{const D="</"+P[0].slice(1);return P.input.indexOf(D,Y)!==-1},r=A_,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(P,Y)=>{const D=P[0].length+P.index,$=P.input[D];if($==="<"||$===","){Y.ignoreMatch();return}$===">"&&(n(P,{after:D})||Y.ignoreMatch());let G;const O=P.input.substring(D);if(G=O.match(/^\s*=/)){Y.ignoreMatch();return}if((G=O.match(/^\s+extends\s+/))&&G.index===0){Y.ignoreMatch();return}}},c={$pattern:A_,keyword:LQ,literal:PQ,built_in:BQ,"variable.language":$Q},p="[0-9](_?[0-9])*",f=`\\.(${p})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${f})|\\.)?|(${f}))[eE][+-]?(${p})\\b`},{begin:`\\b(${h})\\b((${f})\\b|\\.)?|(${f})\\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},g={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},b={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"xml"}},x={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"css"}},w={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"graphql"}},_={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,g]},R={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]},T=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,b,x,w,_,{match:/\$\d+/},m];g.contains=T.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(T)});const C=[].concat(R,g.contains),A=C.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(C)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:A},I={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"}}]},F={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:{_:[...TM,..._M]}},V={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},j={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},q={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Z(P){return t.concat("(?!",P.join("|"),")")}const B={match:t.concat(/\b/,Z([...RM,"super","import"].map(P=>`${P}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},z={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},L={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},H="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",U={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(H)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:A,CLASS_REFERENCE:F},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),V,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,b,x,w,_,R,{match:/\$\d+/},m,F,{scope:"attr",match:r+t.lookahead(":"),relevance:0},U,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[R,e.REGEXP_MODE,{className:"function",begin:H,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:c,contains:A}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:a},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}]},j,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},z,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},B,q,I,L,{match:/\$[(.]/}]}}function UQ(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],s={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,s,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var rl="[0-9](_*[0-9])*",cp=`\\.(${rl})`,fp="[0-9a-fA-F](_*[0-9a-fA-F])*",qQ={className:"number",variants:[{begin:`(\\b(${rl})((${cp})|\\.)?|(${cp}))[eE][+-]?(${rl})[fFdD]?\\b`},{begin:`\\b(${rl})((${cp})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${cp})[fFdD]?\\b`},{begin:`\\b(${rl})[fFdD]\\b`},{begin:`\\b0[xX]((${fp})\\.?|(${fp})?\\.(${fp}))[pP][+-]?(${rl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${fp})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function HQ(e){const 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+"@"},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},l={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[a,s]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,s]}]};s.contains.push(l);const c={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},p={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(l,{className:"string"}),"self"]}]},f=qQ,h=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),m={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},g=m;return g.variants[1].contains=[m],m.variants[1].contains=[g],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,h,n,r,c,p,{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:[m,e.C_LINE_COMMENT_MODE,h],relevance:0},e.C_LINE_COMMENT_MODE,h,c,p,l,e.C_NUMBER_MODE]},h]},{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},c,p]},l,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
56
|
-
`},f]}}const GQ=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/},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_-]*/}}),VQ=["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"],KQ=["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"],ZQ=[...VQ,...KQ],WQ=["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"].sort().reverse(),CM=["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"].sort().reverse(),AM=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),YQ=["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","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"].sort().reverse(),XQ=CM.concat(AM).sort().reverse();function QQ(e){const t=GQ(e),n=XQ,r="and or not only",s="[\\w-]+",a="("+s+"|@\\{"+s+"\\})",l=[],c=[],p=function(T){return{className:"string",begin:"~?"+T+".*?"+T}},f=function(T,C,A){return{className:T,begin:C,relevance:A}},h={$pattern:/[a-z-]+/,keyword:r,attribute:WQ.join(" ")},m={begin:"\\(",end:"\\)",contains:c,keywords:h,relevance:0};c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p("'"),p('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,m,f("variable","@@?"+s,10),f("variable","@\\{"+s+"\\}"),f("built_in","~?`[^`]*?`"),{className:"attribute",begin:s+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const g=c.concat({begin:/\{/,end:/\}/,contains:l}),b={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(c)},x={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+YQ.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:c}}]},w={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:h,returnEnd:!0,contains:c,relevance:0}},_={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:g}},E={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:a,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,b,f("keyword","all\\b"),f("variable","@\\{"+s+"\\}"),{begin:"\\b("+ZQ.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,f("selector-tag",a,0),f("selector-id","#"+a),f("selector-class","\\."+a,0),f("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+CM.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+AM.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:g},{begin:"!important"},t.FUNCTION_DISPATCH]},R={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[E]};return l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,w,_,R,x,E,b,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:l}}function JQ(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},s=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,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:s.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:s}].concat(s)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function eJ(e){const 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]},s={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},a={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},l={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,s,a,l]}}function tJ(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},s={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},l={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},c=/[A-Za-z][A-Za-z0-9+.-]*/,p={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,c,/:\/\/.*?\)/),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}]},f={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},h={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},m=e.inherit(f,{contains:[]}),g=e.inherit(h,{contains:[]});f.contains.push(g),h.contains.push(m);let b=[n,p];return[f,h,m,g].forEach(E=>{E.contains=E.contains.concat(b)}),b=b.concat(f,h),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:b},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:b}]}]},n,a,f,h,{className:"quote",begin:"^>\\s+",contains:b,end:"$"},s,r,p,l,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function nJ(e){const 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_]*/,c={"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"],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"]},p={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:c,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:"("+p.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:p,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function rJ(e){const 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"],r=/[dualxmsipngr]{0,12}/,s={$pattern:/[\w.]+/,keyword:n.join(" ")},a={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},l={begin:/->\{/,end:/\}/},c={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},p={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[c]},f={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},h=[e.BACKSLASH_ESCAPE,a,p],m=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],g=(w,_,E="\\1")=>{const R=E==="\\1"?E:t.concat(E,_);return t.concat(t.concat("(?:",w,")"),_,/(?:\\.|[^\\\/])*?/,R,/(?:\\.|[^\\\/])*?/,E,r)},b=(w,_,E)=>t.concat(t.concat("(?:",w,")"),_,/(?:\\.|[^\\\/])*?/,E,r),x=[p,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),l,{className:"string",contains:h,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}]},f,{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:g("s|tr|y",t.either(...m,{capture:!0}))},{begin:g("s|tr|y","\\(","\\)")},{begin:g("s|tr|y","\\[","\\]")},{begin:g("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:b("(?:m|qr)?",/\//,/\//)},{begin:b("m|qr",t.either(...m,{capture:!0}),/\1/)},{begin:b("m|qr",/\(/,/\)/)},{begin:b("m|qr",/\[/,/\]/)},{begin:b("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,c]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,c,f]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return a.contains=x,l.contains=x,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:x}}function iJ(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),s=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),l={scope:"variable",match:"\\$+"+r},c={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},p={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},f=e.inherit(e.APOS_STRING_MODE,{illegal:null}),h=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(p)}),m={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(p),"on:begin":(z,L)=>{L.data._beginMatch=z[1]||z[2]},"on:end":(z,L)=>{L.data._beginMatch!==z[1]&&L.ignoreMatch()}},g=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),b=`[
|
|
57
|
-
]`,x={scope:"string",variants:[h,f,m,g]},w={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},_=["false","null","true"],E=["__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"],R=["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"],C={keyword:E,literal:(z=>{const L=[];return z.forEach(H=>{L.push(H),H.toLowerCase()===H?L.push(H.toUpperCase()):L.push(H.toLowerCase())}),L})(_),built_in:R},A=z=>z.map(L=>L.replace(/\|\d+$/,"")),N={variants:[{match:[/new/,t.concat(b,"+"),t.concat("(?!",A(R).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},I=t.concat(r,"\\b(?!\\()"),F={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),I],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),I],scope:{1:"title.class",3:"variable.constant"}},{match:[s,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[s,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},V={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},j={relevance:0,begin:/\(/,end:/\)/,keywords:C,contains:[V,l,F,e.C_BLOCK_COMMENT_MODE,x,w,N]},q={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",A(E).join("\\b|"),"|",A(R).join("\\b|"),"\\b)"),r,t.concat(b,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[j]};j.contains.push(q);const Z=[V,F,e.C_BLOCK_COMMENT_MODE,x,w,N],B={begin:t.concat(/#\[\s*\\?/,t.either(s,a)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:_,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:_,keyword:["new","array"]},contains:["self",...Z]},...Z,{scope:"meta",variants:[{match:s},{match:a}]}]};return{case_insensitive:!1,keywords:C,contains:[B,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}]}},c,{scope:"variable.language",match:/\$this\b/},l,q,F,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},N,{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:C,contains:["self",B,l,F,e.C_BLOCK_COMMENT_MODE,x,w]}]},{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]},x,w]}}function sJ(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 oJ(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function aJ(e){const t=e.regex,n=new RegExp("[\\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"],c={$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"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},p={className:"meta",begin:/^(>>>|\.\.\.) /},f={className:"subst",begin:/\{/,end:/\}/,keywords:c,illegal:/#/},h={begin:/\{\{/,relevance:0},m={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,p],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,p],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,p,h,f]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,p,h,f]},{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,h,f]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,h,f]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},g="[0-9](_?[0-9])*",b=`(\\b(${g}))?\\.(${g})|\\b(${g})\\.`,x=`\\b|${r.join("|")}`,w={className:"number",relevance:0,variants:[{begin:`(\\b(${g})|(${b}))[eE][+-]?(${g})[jJ]?(?=${x})`},{begin:`(${b})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${x})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${x})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${x})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${x})`},{begin:`\\b(${g})[jJ](?=${x})`}]},_={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:c,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},E={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:["self",p,w,m,e.HASH_COMMENT_MODE]}]};return f.contains=[m,w,p],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:c,illegal:/(<\/|\?)|=>/,contains:[p,w,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},m,_,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[E]},{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:[w,E,m]}]}}function lJ(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function uJ(e){const 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]?/),s=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,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:[s,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:s},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function cJ(e){const 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]+/),s=t.concat(r,/(::\w+)*/),l={"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"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},c={className:"doctag",begin:"@[A-Za-z]+"},p={begin:"#<",end:">"},f=[e.COMMENT("#","$",{contains:[c]}),e.COMMENT("^=begin","^=end",{contains:[c],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],h={className:"subst",begin:/#\{/,end:/\}/,keywords:l},m={className:"string",contains:[e.BACKSLASH_ESCAPE,h],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,h]})]}]},g="[1-9](_?[0-9])*|0",b="[0-9](_?[0-9])*",x={className:"number",relevance:0,variants:[{begin:`\\b(${g})(\\.(${b}))?([eE][+-]?(${b})|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"}]},w={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:l}]},N=[m,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:l},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:l},{relevance:0,match:[s,/\.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:[w]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[m,{begin:n}],relevance:0},x,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:l},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,h],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(p,f),relevance:0}].concat(p,f);h.contains=N,w.contains=N;const j=[{begin:/^\s*=>/,starts:{end:"$",contains:N}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:l,contains:N}}];return f.unshift(p),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:l,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(j).concat(f).concat(N)}}function fJ(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),s=t.concat(n,e.IDENT_RE),a={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,s,t.lookahead(/\s*\(/))},l="([ui](8|16|32|64|128|size)|f(32|64))?",c=["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"],p=["true","false","Some","None","Ok","Err"],f=["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!"],h=["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:h,keyword:c,literal:p,built_in:f},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_]+)"+l},{begin:"\\b0o([0-7_]+)"+l},{begin:"\\b0x([A-Fa-f0-9_]+)"+l},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+l}],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:f,type:h}},{className:"punctuation",begin:"->"},a]}}const dJ=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/},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_-]*/}}),pJ=["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"],hJ=["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"],mJ=[...pJ,...hJ],gJ=["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"].sort().reverse(),bJ=["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"].sort().reverse(),yJ=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),vJ=["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","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"].sort().reverse();function kJ(e){const t=dJ(e),n=yJ,r=bJ,s="@[a-z-]+",a="and or not only",c={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("+mJ.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},c,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+vJ.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,c,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:s,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:gJ.join(" ")},contains:[{begin:s,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},c,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function xJ(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function SJ(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},a=["true","false","unknown"],l=["double precision","large object","with timezone","without timezone"],c=["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"],p=["add","asc","collation","desc","final","first","last","view"],f=["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"],h=["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"],m=["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"],g=["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"],b=h,x=[...f,...p].filter(A=>!h.includes(A)),w={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},_={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},E={match:t.concat(/\b/,t.either(...b),/\s*\(/),relevance:0,keywords:{built_in:b}};function R(A){return t.concat(/\b/,t.either(...A.map(N=>N.replace(/\s+/,"\\s+"))),/\b/)}const T={scope:"keyword",match:R(g),relevance:0};function C(A,{exceptions:N,when:I}={}){const F=I;return N=N||[],A.map(V=>V.match(/\|\d+$/)||N.includes(V)?V:F(V)?`${V}|0`:V)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:C(x,{when:A=>A.length<3}),literal:a,type:c,built_in:m},contains:[{scope:"type",match:R(l)},T,E,w,r,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,_]}}function NM(e){return e?typeof e=="string"?e:e.source:null}function Gu(e){return un("(?=",e,")")}function un(...e){return e.map(n=>NM(n)).join("")}function wJ(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function xr(...e){return"("+(wJ(e).capture?"":"?:")+e.map(r=>NM(r)).join("|")+")"}const Wk=e=>un(/\b/,e,/\w$/.test(e)?/\b/:/\B/),EJ=["Protocol","Type"].map(Wk),N_=["init","self"].map(Wk),TJ=["Any","Self"],ly=["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"],O_=["false","nil","true"],_J=["assignment","associativity","higherThan","left","lowerThan","none","right"],RJ=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],M_=["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"],OM=xr(/[/=\-+!*%<>&|^~?]/,/[\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]/),MM=xr(OM,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),uy=un(OM,MM,"*"),IM=xr(/[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]/),oh=xr(IM,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),zi=un(IM,oh,"*"),dp=un(/[A-Z]/,oh,"*"),CJ=["attached","autoclosure",un(/convention\(/,xr("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",un(/objc\(/,zi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],AJ=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function NJ(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,xr(...EJ,...N_)],className:{2:"keyword"}},a={match:un(/\./,xr(...ly)),relevance:0},l=ly.filter(ve=>typeof ve=="string").concat(["_|0"]),c=ly.filter(ve=>typeof ve!="string").concat(TJ).map(Wk),p={variants:[{className:"keyword",match:xr(...c,...N_)}]},f={$pattern:xr(/\b\w+/,/#\w+/),keyword:l.concat(RJ),literal:O_},h=[s,a,p],m={match:un(/\./,xr(...M_)),relevance:0},g={className:"built_in",match:un(/\b/,xr(...M_),/(?=\()/)},b=[m,g],x={match:/->/,relevance:0},w={className:"operator",relevance:0,variants:[{match:uy},{match:`\\.(\\.|${MM})+`}]},_=[x,w],E="([0-9]_*)+",R="([0-9a-fA-F]_*)+",T={className:"number",relevance:0,variants:[{match:`\\b(${E})(\\.(${E}))?([eE][+-]?(${E}))?\\b`},{match:`\\b0x(${R})(\\.(${R}))?([pP][+-]?(${E}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},C=(ve="")=>({className:"subst",variants:[{match:un(/\\/,ve,/[0\\tnr"']/)},{match:un(/\\/,ve,/u\{[0-9a-fA-F]{1,8}\}/)}]}),A=(ve="")=>({className:"subst",match:un(/\\/,ve,/[\t ]*(?:[\r\n]|\r\n)/)}),N=(ve="")=>({className:"subst",label:"interpol",begin:un(/\\/,ve,/\(/),end:/\)/}),I=(ve="")=>({begin:un(ve,/"""/),end:un(/"""/,ve),contains:[C(ve),A(ve),N(ve)]}),F=(ve="")=>({begin:un(ve,/"/),end:un(/"/,ve),contains:[C(ve),N(ve)]}),V={className:"string",variants:[I(),I("#"),I("##"),I("###"),F(),F("#"),F("##"),F("###")]},j=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],q={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:j},Z=ve=>{const xe=un(ve,/\//),De=un(/\//,ve);return{begin:xe,end:De,contains:[...j,{scope:"comment",begin:`#(?!.*${De})`,end:/$/}]}},B={scope:"regexp",variants:[Z("###"),Z("##"),Z("#"),q]},z={match:un(/`/,zi,/`/)},L={className:"variable",match:/\$\d+/},H={className:"variable",match:`\\$${oh}+`},U=[z,L,H],P={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:AJ,contains:[..._,T,V]}]}},Y={scope:"keyword",match:un(/@/,xr(...CJ),Gu(xr(/\(/,/\s+/)))},D={scope:"meta",match:un(/@/,zi)},$=[P,Y,D],G={match:Gu(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:un(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,oh,"+")},{className:"type",match:dp,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:un(/\s+&\s+/,Gu(dp)),relevance:0}]},O={begin:/</,end:/>/,keywords:f,contains:[...r,...h,...$,x,G]};G.contains.push(O);const J={match:un(zi,/\s*:/),keywords:"_|0",relevance:0},ee={begin:/\(/,end:/\)/,relevance:0,keywords:f,contains:["self",J,...r,B,...h,...b,..._,T,V,...U,...$,G]},ie={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,G]},he={begin:xr(Gu(un(zi,/\s*:/)),Gu(un(zi,/\s+/,zi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:zi}]},le={begin:/\(/,end:/\)/,keywords:f,contains:[he,...r,...h,..._,T,V,...$,G,ee],endsParent:!0,illegal:/["']/},ke={match:[/(func|macro)/,/\s+/,xr(z.match,zi,uy)],className:{1:"keyword",3:"title.function"},contains:[ie,le,t],illegal:[/\[/,/%/]},Te={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ie,le,t],illegal:/\[|%/},Pe={match:[/operator/,/\s+/,uy],className:{1:"keyword",3:"title"}},ue={begin:[/precedencegroup/,/\s+/,dp],className:{1:"keyword",3:"title"},contains:[G],keywords:[..._J,...O_],end:/}/},Ee={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Ce={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Me={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,zi,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:f,contains:[ie,...h,{begin:/:/,end:/\{/,keywords:f,contains:[{scope:"title.class.inherited",match:dp},...h],relevance:0}]};for(const ve of V.variants){const xe=ve.contains.find(Ne=>Ne.label==="interpol");xe.keywords=f;const De=[...h,...b,..._,T,V,...U];xe.contains=[...De,{begin:/\(/,end:/\)/,contains:["self",...De]}]}return{name:"Swift",keywords:f,contains:[...r,ke,Te,Ee,Ce,Me,Pe,ue,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},B,...h,...b,..._,T,V,...U,...$,G,ee]}}const ah="[A-Za-z$_][0-9A-Za-z$_]*",DM=["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"],zM=["true","false","null","undefined","NaN","Infinity"],jM=["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"],LM=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],PM=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],$M=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],BM=[].concat(PM,jM,LM);function OJ(e){const t=e.regex,n=(P,{after:Y})=>{const D="</"+P[0].slice(1);return P.input.indexOf(D,Y)!==-1},r=ah,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(P,Y)=>{const D=P[0].length+P.index,$=P.input[D];if($==="<"||$===","){Y.ignoreMatch();return}$===">"&&(n(P,{after:D})||Y.ignoreMatch());let G;const O=P.input.substring(D);if(G=O.match(/^\s*=/)){Y.ignoreMatch();return}if((G=O.match(/^\s+extends\s+/))&&G.index===0){Y.ignoreMatch();return}}},c={$pattern:ah,keyword:DM,literal:zM,built_in:BM,"variable.language":$M},p="[0-9](_?[0-9])*",f=`\\.(${p})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${f})|\\.)?|(${f}))[eE][+-]?(${p})\\b`},{begin:`\\b(${h})\\b((${f})\\b|\\.)?|(${f})\\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},g={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},b={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"xml"}},x={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"css"}},w={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"graphql"}},_={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,g]},R={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]},T=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,b,x,w,_,{match:/\$\d+/},m];g.contains=T.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(T)});const C=[].concat(R,g.contains),A=C.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(C)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:A},I={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"}}]},F={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:{_:[...jM,...LM]}},V={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},j={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},q={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Z(P){return t.concat("(?!",P.join("|"),")")}const B={match:t.concat(/\b/,Z([...PM,"super","import"].map(P=>`${P}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},z={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},L={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},H="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",U={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(H)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:A,CLASS_REFERENCE:F},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),V,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,b,x,w,_,R,{match:/\$\d+/},m,F,{scope:"attr",match:r+t.lookahead(":"),relevance:0},U,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[R,e.REGEXP_MODE,{className:"function",begin:H,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:c,contains:A}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:a},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}]},j,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},z,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},B,q,I,L,{match:/\$[(.]/}]}}function MJ(e){const t=e.regex,n=OJ(e),r=ah,s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},l={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[n.exports.CLASS_REFERENCE]},c={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},p=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],f={$pattern:ah,keyword:DM.concat(p),literal:zM,built_in:BM.concat(s),"variable.language":$M},h={className:"meta",begin:"@"+r},m=(w,_,E)=>{const R=w.contains.findIndex(T=>T.label===_);if(R===-1)throw new Error("can not find mode to replace");w.contains.splice(R,1,E)};Object.assign(n.keywords,f),n.exports.PARAMS_CONTAINS.push(h);const g=n.contains.find(w=>w.scope==="attr"),b=Object.assign({},g,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,g,b]),n.contains=n.contains.concat([h,a,l,b]),m(n,"shebang",e.SHEBANG()),m(n,"use_strict",c);const x=n.contains.find(w=>w.label==="func.def");return x.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function IJ(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,l=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,c=/\d{1,2}(:\d{1,2}){1,2}/,p={className:"literal",variants:[{begin:t.concat(/# */,t.either(a,s),/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,t.either(a,s),/ +/,t.either(l,c),/ *#/)}]},f={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])|[%&])?/}]},h={className:"label",begin:/^\w+:/},m=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),g=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,p,f,h,m,g,{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:[g]}]}}function DJ(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["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"],s={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},a={className:"variable",begin:/\$[\w_]+/},l={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},c={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/},p={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},f={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/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},a,l,s,e.QUOTE_STRING_MODE,p,f,c]}}function zJ(e){const 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,s={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/}]},l=e.inherit(a,{begin:/\(/,end:/\)/}),c=e.inherit(e.APOS_STRING_MODE,{className:"string"}),p=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),f={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:[s]},{begin:/'/,end:/'/,contains:[s]},{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,p,c,l,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,l,p,c]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[p]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[f],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[f],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:f}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function jJ(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},l={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},c=e.inherit(l,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),g={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"},b={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},x={begin:/\{/,end:/\}/,contains:[b],illegal:"\\n",relevance:0},w={begin:"\\[",end:"\\]",contains:[b],illegal:"\\n",relevance:0},_=[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}},g,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},x,w,a,l],E=[..._];return E.pop(),E.push(c),b.contains=E,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:_}}const LJ={arduino:yQ,bash:vQ,c:kQ,cpp:xQ,csharp:SQ,css:OQ,diff:MQ,go:IQ,graphql:DQ,ini:zQ,java:jQ,javascript:FQ,json:UQ,kotlin:HQ,less:QQ,lua:JQ,makefile:eJ,markdown:tJ,objectivec:nJ,perl:rJ,php:iJ,"php-template":sJ,plaintext:oJ,python:aJ,"python-repl":lJ,r:uJ,ruby:cJ,rust:fJ,scss:kJ,shell:xJ,sql:SJ,swift:NJ,typescript:MJ,vbnet:IJ,wasm:DJ,xml:zJ,yaml:jJ};var cy,I_;function PJ(){if(I_)return cy;I_=1;function e(W){return W instanceof Map?W.clear=W.delete=W.set=function(){throw new Error("map is read-only")}:W instanceof Set&&(W.add=W.clear=W.delete=function(){throw new Error("set is read-only")}),Object.freeze(W),Object.getOwnPropertyNames(W).forEach(ce=>{const Ae=W[ce],Ve=typeof Ae;(Ve==="object"||Ve==="function")&&!Object.isFrozen(Ae)&&e(Ae)}),W}class t{constructor(ce){ce.data===void 0&&(ce.data={}),this.data=ce.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(W){return W.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(W,...ce){const Ae=Object.create(null);for(const Ve in W)Ae[Ve]=W[Ve];return ce.forEach(function(Ve){for(const St in Ve)Ae[St]=Ve[St]}),Ae}const s="</span>",a=W=>!!W.scope,l=(W,{prefix:ce})=>{if(W.startsWith("language:"))return W.replace("language:","language-");if(W.includes(".")){const Ae=W.split(".");return[`${ce}${Ae.shift()}`,...Ae.map((Ve,St)=>`${Ve}${"_".repeat(St+1)}`)].join(" ")}return`${ce}${W}`};class c{constructor(ce,Ae){this.buffer="",this.classPrefix=Ae.classPrefix,ce.walk(this)}addText(ce){this.buffer+=n(ce)}openNode(ce){if(!a(ce))return;const Ae=l(ce.scope,{prefix:this.classPrefix});this.span(Ae)}closeNode(ce){a(ce)&&(this.buffer+=s)}value(){return this.buffer}span(ce){this.buffer+=`<span class="${ce}">`}}const p=(W={})=>{const ce={children:[]};return Object.assign(ce,W),ce};class f{constructor(){this.rootNode=p(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(ce){this.top.children.push(ce)}openNode(ce){const Ae=p({scope:ce});this.add(Ae),this.stack.push(Ae)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(ce){return this.constructor._walk(ce,this.rootNode)}static _walk(ce,Ae){return typeof Ae=="string"?ce.addText(Ae):Ae.children&&(ce.openNode(Ae),Ae.children.forEach(Ve=>this._walk(ce,Ve)),ce.closeNode(Ae)),ce}static _collapse(ce){typeof ce!="string"&&ce.children&&(ce.children.every(Ae=>typeof Ae=="string")?ce.children=[ce.children.join("")]:ce.children.forEach(Ae=>{f._collapse(Ae)}))}}class h extends f{constructor(ce){super(),this.options=ce}addText(ce){ce!==""&&this.add(ce)}startScope(ce){this.openNode(ce)}endScope(){this.closeNode()}__addSublanguage(ce,Ae){const Ve=ce.root;Ae&&(Ve.scope=`language:${Ae}`),this.add(Ve)}toHTML(){return new c(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function m(W){return W?typeof W=="string"?W:W.source:null}function g(W){return w("(?=",W,")")}function b(W){return w("(?:",W,")*")}function x(W){return w("(?:",W,")?")}function w(...W){return W.map(Ae=>m(Ae)).join("")}function _(W){const ce=W[W.length-1];return typeof ce=="object"&&ce.constructor===Object?(W.splice(W.length-1,1),ce):{}}function E(...W){return"("+(_(W).capture?"":"?:")+W.map(Ve=>m(Ve)).join("|")+")"}function R(W){return new RegExp(W.toString()+"|").exec("").length-1}function T(W,ce){const Ae=W&&W.exec(ce);return Ae&&Ae.index===0}const C=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function A(W,{joinWith:ce}){let Ae=0;return W.map(Ve=>{Ae+=1;const St=Ae;let At=m(Ve),qe="";for(;At.length>0;){const $e=C.exec(At);if(!$e){qe+=At;break}qe+=At.substring(0,$e.index),At=At.substring($e.index+$e[0].length),$e[0][0]==="\\"&&$e[1]?qe+="\\"+String(Number($e[1])+St):(qe+=$e[0],$e[0]==="("&&Ae++)}return qe}).map(Ve=>`(${Ve})`).join(ce)}const N=/\b\B/,I="[a-zA-Z]\\w*",F="[a-zA-Z_]\\w*",V="\\b\\d+(\\.\\d+)?",j="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",q="\\b(0b[01]+)",Z="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",B=(W={})=>{const ce=/^#![ ]*\//;return W.binary&&(W.begin=w(ce,/.*\b/,W.binary,/\b.*/)),r({scope:"meta",begin:ce,end:/$/,relevance:0,"on:begin":(Ae,Ve)=>{Ae.index!==0&&Ve.ignoreMatch()}},W)},z={begin:"\\\\[\\s\\S]",relevance:0},L={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[z]},H={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[z]},U={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/},P=function(W,ce,Ae={}){const Ve=r({scope:"comment",begin:W,end:ce,contains:[]},Ae);Ve.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const St=E("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 Ve.contains.push({begin:w(/[ ]+/,"(",St,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Ve},Y=P("//","$"),D=P("/\\*","\\*/"),$=P("#","$"),G={scope:"number",begin:V,relevance:0},O={scope:"number",begin:j,relevance:0},J={scope:"number",begin:q,relevance:0},ee={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[z,{begin:/\[/,end:/\]/,relevance:0,contains:[z]}]},ie={scope:"title",begin:I,relevance:0},he={scope:"title",begin:F,relevance:0},le={begin:"\\.\\s*"+F,relevance:0};var Te=Object.freeze({__proto__:null,APOS_STRING_MODE:L,BACKSLASH_ESCAPE:z,BINARY_NUMBER_MODE:J,BINARY_NUMBER_RE:q,COMMENT:P,C_BLOCK_COMMENT_MODE:D,C_LINE_COMMENT_MODE:Y,C_NUMBER_MODE:O,C_NUMBER_RE:j,END_SAME_AS_BEGIN:function(W){return Object.assign(W,{"on:begin":(ce,Ae)=>{Ae.data._beginMatch=ce[1]},"on:end":(ce,Ae)=>{Ae.data._beginMatch!==ce[1]&&Ae.ignoreMatch()}})},HASH_COMMENT_MODE:$,IDENT_RE:I,MATCH_NOTHING_RE:N,METHOD_GUARD:le,NUMBER_MODE:G,NUMBER_RE:V,PHRASAL_WORDS_MODE:U,QUOTE_STRING_MODE:H,REGEXP_MODE:ee,RE_STARTERS_RE:Z,SHEBANG:B,TITLE_MODE:ie,UNDERSCORE_IDENT_RE:F,UNDERSCORE_TITLE_MODE:he});function Pe(W,ce){W.input[W.index-1]==="."&&ce.ignoreMatch()}function ue(W,ce){W.className!==void 0&&(W.scope=W.className,delete W.className)}function Ee(W,ce){ce&&W.beginKeywords&&(W.begin="\\b("+W.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",W.__beforeBegin=Pe,W.keywords=W.keywords||W.beginKeywords,delete W.beginKeywords,W.relevance===void 0&&(W.relevance=0))}function Ce(W,ce){Array.isArray(W.illegal)&&(W.illegal=E(...W.illegal))}function Me(W,ce){if(W.match){if(W.begin||W.end)throw new Error("begin & end are not supported with match");W.begin=W.match,delete W.match}}function ve(W,ce){W.relevance===void 0&&(W.relevance=1)}const xe=(W,ce)=>{if(!W.beforeMatch)return;if(W.starts)throw new Error("beforeMatch cannot be used with starts");const Ae=Object.assign({},W);Object.keys(W).forEach(Ve=>{delete W[Ve]}),W.keywords=Ae.keywords,W.begin=w(Ae.beforeMatch,g(Ae.begin)),W.starts={relevance:0,contains:[Object.assign(Ae,{endsParent:!0})]},W.relevance=0,delete Ae.beforeMatch},De=["of","and","for","in","not","or","if","then","parent","list","value"],Ne="keyword";function Ie(W,ce,Ae=Ne){const Ve=Object.create(null);return typeof W=="string"?St(Ae,W.split(" ")):Array.isArray(W)?St(Ae,W):Object.keys(W).forEach(function(At){Object.assign(Ve,Ie(W[At],ce,At))}),Ve;function St(At,qe){ce&&(qe=qe.map($e=>$e.toLowerCase())),qe.forEach(function($e){const be=$e.split("|");Ve[be[0]]=[At,ge(be[0],be[1])]})}}function ge(W,ce){return ce?Number(ce):fe(W)?0:1}function fe(W){return De.includes(W.toLowerCase())}const se={},ne=W=>{console.error(W)},_e=(W,...ce)=>{console.log(`WARN: ${W}`,...ce)},te=(W,ce)=>{se[`${W}/${ce}`]||(console.log(`Deprecated as of ${W}. ${ce}`),se[`${W}/${ce}`]=!0)},ae=new Error;function ze(W,ce,{key:Ae}){let Ve=0;const St=W[Ae],At={},qe={};for(let $e=1;$e<=ce.length;$e++)qe[$e+Ve]=St[$e],At[$e+Ve]=!0,Ve+=R(ce[$e-1]);W[Ae]=qe,W[Ae]._emit=At,W[Ae]._multi=!0}function Ue(W){if(Array.isArray(W.begin)){if(W.skip||W.excludeBegin||W.returnBegin)throw ne("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ae;if(typeof W.beginScope!="object"||W.beginScope===null)throw ne("beginScope must be object"),ae;ze(W,W.begin,{key:"beginScope"}),W.begin=A(W.begin,{joinWith:""})}}function Ge(W){if(Array.isArray(W.end)){if(W.skip||W.excludeEnd||W.returnEnd)throw ne("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ae;if(typeof W.endScope!="object"||W.endScope===null)throw ne("endScope must be object"),ae;ze(W,W.end,{key:"endScope"}),W.end=A(W.end,{joinWith:""})}}function Ye(W){W.scope&&typeof W.scope=="object"&&W.scope!==null&&(W.beginScope=W.scope,delete W.scope)}function rt(W){Ye(W),typeof W.beginScope=="string"&&(W.beginScope={_wrap:W.beginScope}),typeof W.endScope=="string"&&(W.endScope={_wrap:W.endScope}),Ue(W),Ge(W)}function st(W){function ce(qe,$e){return new RegExp(m(qe),"m"+(W.case_insensitive?"i":"")+(W.unicodeRegex?"u":"")+($e?"g":""))}class Ae{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule($e,be){be.position=this.position++,this.matchIndexes[this.matchAt]=be,this.regexes.push([be,$e]),this.matchAt+=R($e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const $e=this.regexes.map(be=>be[1]);this.matcherRe=ce(A($e,{joinWith:"|"}),!0),this.lastIndex=0}exec($e){this.matcherRe.lastIndex=this.lastIndex;const be=this.matcherRe.exec($e);if(!be)return null;const Nt=be.findIndex((ht,Qt)=>Qt>0&&ht!==void 0),We=this.matchIndexes[Nt];return be.splice(0,Nt),Object.assign(be,We)}}class Ve{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher($e){if(this.multiRegexes[$e])return this.multiRegexes[$e];const be=new Ae;return this.rules.slice($e).forEach(([Nt,We])=>be.addRule(Nt,We)),be.compile(),this.multiRegexes[$e]=be,be}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule($e,be){this.rules.push([$e,be]),be.type==="begin"&&this.count++}exec($e){const be=this.getMatcher(this.regexIndex);be.lastIndex=this.lastIndex;let Nt=be.exec($e);if(this.resumingScanAtSamePosition()&&!(Nt&&Nt.index===this.lastIndex)){const We=this.getMatcher(0);We.lastIndex=this.lastIndex+1,Nt=We.exec($e)}return Nt&&(this.regexIndex+=Nt.position+1,this.regexIndex===this.count&&this.considerAll()),Nt}}function St(qe){const $e=new Ve;return qe.contains.forEach(be=>$e.addRule(be.begin,{rule:be,type:"begin"})),qe.terminatorEnd&&$e.addRule(qe.terminatorEnd,{type:"end"}),qe.illegal&&$e.addRule(qe.illegal,{type:"illegal"}),$e}function At(qe,$e){const be=qe;if(qe.isCompiled)return be;[ue,Me,rt,xe].forEach(We=>We(qe,$e)),W.compilerExtensions.forEach(We=>We(qe,$e)),qe.__beforeBegin=null,[Ee,Ce,ve].forEach(We=>We(qe,$e)),qe.isCompiled=!0;let Nt=null;return typeof qe.keywords=="object"&&qe.keywords.$pattern&&(qe.keywords=Object.assign({},qe.keywords),Nt=qe.keywords.$pattern,delete qe.keywords.$pattern),Nt=Nt||/\w+/,qe.keywords&&(qe.keywords=Ie(qe.keywords,W.case_insensitive)),be.keywordPatternRe=ce(Nt,!0),$e&&(qe.begin||(qe.begin=/\B|\b/),be.beginRe=ce(be.begin),!qe.end&&!qe.endsWithParent&&(qe.end=/\B|\b/),qe.end&&(be.endRe=ce(be.end)),be.terminatorEnd=m(be.end)||"",qe.endsWithParent&&$e.terminatorEnd&&(be.terminatorEnd+=(qe.end?"|":"")+$e.terminatorEnd)),qe.illegal&&(be.illegalRe=ce(qe.illegal)),qe.contains||(qe.contains=[]),qe.contains=[].concat(...qe.contains.map(function(We){return Et(We==="self"?qe:We)})),qe.contains.forEach(function(We){At(We,be)}),qe.starts&&At(qe.starts,$e),be.matcher=St(be),be}if(W.compilerExtensions||(W.compilerExtensions=[]),W.contains&&W.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return W.classNameAliases=r(W.classNameAliases||{}),At(W)}function ot(W){return W?W.endsWithParent||ot(W.starts):!1}function Et(W){return W.variants&&!W.cachedVariants&&(W.cachedVariants=W.variants.map(function(ce){return r(W,{variants:null},ce)})),W.cachedVariants?W.cachedVariants:ot(W)?r(W,{starts:W.starts?r(W.starts):null}):Object.isFrozen(W)?r(W):W}var it="11.11.1";class vt extends Error{constructor(ce,Ae){super(ce),this.name="HTMLInjectionError",this.html=Ae}}const Xe=n,Dt=r,Fe=Symbol("nomatch"),Ze=7,ft=function(W){const ce=Object.create(null),Ae=Object.create(null),Ve=[];let St=!0;const At="Could not find the language '{}', did you forget to load/include a language module?",qe={disableAutodetect:!0,name:"Plain text",contains:[]};let $e={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:h};function be(je){return $e.noHighlightRe.test(je)}function Nt(je){let at=je.className+" ";at+=je.parentNode?je.parentNode.className:"";const zt=$e.languageDetectRe.exec(at);if(zt){const en=yr(zt[1]);return en||(_e(At.replace("{}",zt[1])),_e("Falling back to no-highlight mode for this block.",je)),en?zt[1]:"no-highlight"}return at.split(/\s+/).find(en=>be(en)||yr(en))}function We(je,at,zt){let en="",In="";typeof at=="object"?(en=je,zt=at.ignoreIllegals,In=at.language):(te("10.7.0","highlight(lang, code, ...args) has been deprecated."),te("10.7.0",`Please use highlight(code, options) instead.
|
|
58
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),In=je,en=at),zt===void 0&&(zt=!0);const lr={code:en,language:In};wo("before:highlight",lr);const Br=lr.result?lr.result:ht(lr.language,lr.code,zt);return Br.code=lr.code,wo("after:highlight",Br),Br}function ht(je,at,zt,en){const In=Object.create(null);function lr(Be,et){return Be.keywords[et]}function Br(){if(!mt.keywords){$n.addText(tn);return}let Be=0;mt.keywordPatternRe.lastIndex=0;let et=mt.keywordPatternRe.exec(tn),_t="";for(;et;){_t+=tn.substring(Be,et.index);const Bt=er.case_insensitive?et[0].toLowerCase():et[0],Tn=lr(mt,Bt);if(Tn){const[Jr,Hl]=Tn;if($n.addText(_t),_t="",In[Bt]=(In[Bt]||0)+1,In[Bt]<=Ze&&(Os+=Hl),Jr.startsWith("_"))_t+=et[0];else{const gf=er.classNameAliases[Jr]||Jr;Fr(et[0],gf)}}else _t+=et[0];Be=mt.keywordPatternRe.lastIndex,et=mt.keywordPatternRe.exec(tn)}_t+=tn.substring(Be),$n.addText(_t)}function Tr(){if(tn==="")return;let Be=null;if(typeof mt.subLanguage=="string"){if(!ce[mt.subLanguage]){$n.addText(tn);return}Be=ht(mt.subLanguage,tn,!0,mf[mt.subLanguage]),mf[mt.subLanguage]=Be._top}else Be=Jt(tn,mt.subLanguage.length?mt.subLanguage:null);mt.relevance>0&&(Os+=Be.relevance),$n.__addSublanguage(Be._emitter,Be.language)}function hn(){mt.subLanguage!=null?Tr():Br(),tn=""}function Fr(Be,et){Be!==""&&($n.startScope(et),$n.addText(Be),$n.endScope())}function pf(Be,et){let _t=1;const Bt=et.length-1;for(;_t<=Bt;){if(!Be._emit[_t]){_t++;continue}const Tn=er.classNameAliases[Be[_t]]||Be[_t],Jr=et[_t];Tn?Fr(Jr,Tn):(tn=Jr,Br(),tn=""),_t++}}function ma(Be,et){return Be.scope&&typeof Be.scope=="string"&&$n.openNode(er.classNameAliases[Be.scope]||Be.scope),Be.beginScope&&(Be.beginScope._wrap?(Fr(tn,er.classNameAliases[Be.beginScope._wrap]||Be.beginScope._wrap),tn=""):Be.beginScope._multi&&(pf(Be.beginScope,et),tn="")),mt=Object.create(Be,{parent:{value:mt}}),mt}function Fl(Be,et,_t){let Bt=T(Be.endRe,_t);if(Bt){if(Be["on:end"]){const Tn=new t(Be);Be["on:end"](et,Tn),Tn.isMatchIgnored&&(Bt=!1)}if(Bt){for(;Be.endsParent&&Be.parent;)Be=Be.parent;return Be}}if(Be.endsWithParent)return Fl(Be.parent,et,_t)}function ga(Be){return mt.matcher.regexIndex===0?(tn+=Be[0],1):(Ms=!0,0)}function Jh(Be){const et=Be[0],_t=Be.rule,Bt=new t(_t),Tn=[_t.__beforeBegin,_t["on:begin"]];for(const Jr of Tn)if(Jr&&(Jr(Be,Bt),Bt.isMatchIgnored))return ga(et);return _t.skip?tn+=et:(_t.excludeBegin&&(tn+=et),hn(),!_t.returnBegin&&!_t.excludeBegin&&(tn=et)),ma(_t,Be),_t.returnBegin?0:et.length}function _r(Be){const et=Be[0],_t=at.substring(Be.index),Bt=Fl(mt,Be,_t);if(!Bt)return Fe;const Tn=mt;mt.endScope&&mt.endScope._wrap?(hn(),Fr(et,mt.endScope._wrap)):mt.endScope&&mt.endScope._multi?(hn(),pf(mt.endScope,Be)):Tn.skip?tn+=et:(Tn.returnEnd||Tn.excludeEnd||(tn+=et),hn(),Tn.excludeEnd&&(tn=et));do mt.scope&&$n.closeNode(),!mt.skip&&!mt.subLanguage&&(Os+=mt.relevance),mt=mt.parent;while(mt!==Bt.parent);return Bt.starts&&ma(Bt.starts,Be),Tn.returnEnd?0:et.length}function Ul(){const Be=[];for(let et=mt;et!==er;et=et.parent)et.scope&&Be.unshift(et.scope);Be.forEach(et=>$n.openNode(et))}let Eo={};function ba(Be,et){const _t=et&&et[0];if(tn+=Be,_t==null)return hn(),0;if(Eo.type==="begin"&&et.type==="end"&&Eo.index===et.index&&_t===""){if(tn+=at.slice(et.index,et.index+1),!St){const Bt=new Error(`0 width match regex (${je})`);throw Bt.languageName=je,Bt.badRule=Eo.rule,Bt}return 1}if(Eo=et,et.type==="begin")return Jh(et);if(et.type==="illegal"&&!zt){const Bt=new Error('Illegal lexeme "'+_t+'" for mode "'+(mt.scope||"<unnamed>")+'"');throw Bt.mode=mt,Bt}else if(et.type==="end"){const Bt=_r(et);if(Bt!==Fe)return Bt}if(et.type==="illegal"&&_t==="")return tn+=`
|
|
59
|
-
`,1;if(ql>1e5&&ql>et.index*3)throw new Error("potential infinite loop, way more iterations than matches");return tn+=_t,_t.length}const er=yr(je);if(!er)throw ne(At.replace("{}",je)),new Error('Unknown language: "'+je+'"');const hf=st(er);let ya="",mt=en||hf;const mf={},$n=new $e.__emitter($e);Ul();let tn="",Os=0,Zi=0,ql=0,Ms=!1;try{if(er.__emitTokens)er.__emitTokens(at,$n);else{for(mt.matcher.considerAll();;){ql++,Ms?Ms=!1:mt.matcher.considerAll(),mt.matcher.lastIndex=Zi;const Be=mt.matcher.exec(at);if(!Be)break;const et=at.substring(Zi,Be.index),_t=ba(et,Be);Zi=Be.index+_t}ba(at.substring(Zi))}return $n.finalize(),ya=$n.toHTML(),{language:je,value:ya,relevance:Os,illegal:!1,_emitter:$n,_top:mt}}catch(Be){if(Be.message&&Be.message.includes("Illegal"))return{language:je,value:Xe(at),illegal:!0,relevance:0,_illegalBy:{message:Be.message,index:Zi,context:at.slice(Zi-100,Zi+100),mode:Be.mode,resultSoFar:ya},_emitter:$n};if(St)return{language:je,value:Xe(at),illegal:!1,relevance:0,errorRaised:Be,_emitter:$n,_top:mt};throw Be}}function Qt(je){const at={value:Xe(je),illegal:!1,relevance:0,_top:qe,_emitter:new $e.__emitter($e)};return at._emitter.addText(je),at}function Jt(je,at){at=at||$e.languages||Object.keys(ce);const zt=Qt(je),en=at.filter(yr).filter(As).map(hn=>ht(hn,je,!1));en.unshift(zt);const In=en.sort((hn,Fr)=>{if(hn.relevance!==Fr.relevance)return Fr.relevance-hn.relevance;if(hn.language&&Fr.language){if(yr(hn.language).supersetOf===Fr.language)return 1;if(yr(Fr.language).supersetOf===hn.language)return-1}return 0}),[lr,Br]=In,Tr=lr;return Tr.secondBest=Br,Tr}function Gt(je,at,zt){const en=at&&Ae[at]||zt;je.classList.add("hljs"),je.classList.add(`language-${en}`)}function wt(je){let at=null;const zt=Nt(je);if(be(zt))return;if(wo("before:highlightElement",{el:je,language:zt}),je.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",je);return}if(je.children.length>0&&($e.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(je)),$e.throwUnescapedHTML))throw new vt("One of your code blocks includes unescaped HTML.",je.innerHTML);at=je;const en=at.textContent,In=zt?We(en,{language:zt,ignoreIllegals:!0}):Jt(en);je.innerHTML=In.value,je.dataset.highlighted="yes",Gt(je,zt,In.language),je.result={language:In.language,re:In.relevance,relevance:In.relevance},In.secondBest&&(je.secondBest={language:In.secondBest.language,relevance:In.secondBest.relevance}),wo("after:highlightElement",{el:je,result:In,text:en})}function Kn(je){$e=Dt($e,je)}const vi=()=>{ha(),te("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function xo(){ha(),te("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let cf=!1;function ha(){function je(){ha()}if(document.readyState==="loading"){cf||window.addEventListener("DOMContentLoaded",je,!1),cf=!0;return}document.querySelectorAll($e.cssSelector).forEach(wt)}function ff(je,at){let zt=null;try{zt=at(W)}catch(en){if(ne("Language definition for '{}' could not be registered.".replace("{}",je)),St)ne(en);else throw en;zt=qe}zt.name||(zt.name=je),ce[je]=zt,zt.rawDefinition=at.bind(null,W),zt.aliases&&Vi(zt.aliases,{languageName:je})}function So(je){delete ce[je];for(const at of Object.keys(Ae))Ae[at]===je&&delete Ae[at]}function Bl(){return Object.keys(ce)}function yr(je){return je=(je||"").toLowerCase(),ce[je]||ce[Ae[je]]}function Vi(je,{languageName:at}){typeof je=="string"&&(je=[je]),je.forEach(zt=>{Ae[zt.toLowerCase()]=at})}function As(je){const at=yr(je);return at&&!at.disableAutodetect}function Ns(je){je["before:highlightBlock"]&&!je["before:highlightElement"]&&(je["before:highlightElement"]=at=>{je["before:highlightBlock"](Object.assign({block:at.el},at))}),je["after:highlightBlock"]&&!je["after:highlightElement"]&&(je["after:highlightElement"]=at=>{je["after:highlightBlock"](Object.assign({block:at.el},at))})}function Pn(je){Ns(je),Ve.push(je)}function df(je){const at=Ve.indexOf(je);at!==-1&&Ve.splice(at,1)}function wo(je,at){const zt=je;Ve.forEach(function(en){en[zt]&&en[zt](at)})}function Ki(je){return te("10.7.0","highlightBlock will be removed entirely in v12.0"),te("10.7.0","Please use highlightElement now."),wt(je)}Object.assign(W,{highlight:We,highlightAuto:Jt,highlightAll:ha,highlightElement:wt,highlightBlock:Ki,configure:Kn,initHighlighting:vi,initHighlightingOnLoad:xo,registerLanguage:ff,unregisterLanguage:So,listLanguages:Bl,getLanguage:yr,registerAliases:Vi,autoDetection:As,inherit:Dt,addPlugin:Pn,removePlugin:df}),W.debugMode=function(){St=!1},W.safeMode=function(){St=!0},W.versionString=it,W.regex={concat:w,lookahead:g,either:E,optional:x,anyNumberOfTimes:b};for(const je in Te)typeof Te[je]=="object"&&e(Te[je]);return Object.assign(W,Te),W},Qe=ft({});return Qe.newInstance=()=>ft({}),cy=Qe,Qe.HighlightJS=Qe,Qe.default=Qe,cy}var $J=PJ();const BJ=uh($J),D_={},FJ="hljs-";function UJ(e){const t=BJ.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:s,register:a,registerAlias:l,registered:c};function n(p,f,h){const m=h||D_,g=typeof m.prefix=="string"?m.prefix:FJ;if(!t.getLanguage(p))throw new Error("Unknown language: `"+p+"` is not registered");t.configure({__emitter:qJ,classPrefix:g});const b=t.highlight(f,{ignoreIllegals:!0,language:p});if(b.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:b.errorRaised});const x=b._emitter.root,w=x.data;return w.language=b.language,w.relevance=b.relevance,x}function r(p,f){const m=(f||D_).subset||s();let g=-1,b=0,x;for(;++g<m.length;){const w=m[g];if(!t.getLanguage(w))continue;const _=n(w,p,f);_.data&&_.data.relevance!==void 0&&_.data.relevance>b&&(b=_.data.relevance,x=_)}return x||{type:"root",children:[],data:{language:void 0,relevance:b}}}function s(){return t.listLanguages()}function a(p,f){if(typeof p=="string")t.registerLanguage(p,f);else{let h;for(h in p)Object.hasOwn(p,h)&&t.registerLanguage(h,p[h])}}function l(p,f){if(typeof p=="string")t.registerAliases(typeof f=="string"?f:[...f],{languageName:p});else{let h;for(h in p)if(Object.hasOwn(p,h)){const m=p[h];t.registerAliases(typeof m=="string"?m:[...m],{languageName:h})}}}function c(p){return!!t.getLanguage(p)}}class qJ{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],s=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:s}):r.children.push(...s)}openNode(t){const n=this,r=t.split(".").map(function(l,c){return c?l+"_".repeat(c):n.options.classPrefix+l}),s=this.stack[this.stack.length-1],a={type:"element",tagName:"span",properties:{className:r},children:[]};s.children.push(a),this.stack.push(a)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const HJ={};function GJ(e){const t=e||HJ,n=t.aliases,r=t.detect||!1,s=t.languages||LJ,a=t.plainText,l=t.prefix,c=t.subset;let p="hljs";const f=UJ(s);if(n&&f.registerAlias(n),l){const h=l.indexOf("-");p=h===-1?l:l.slice(0,h)}return function(h,m){Qh(h,"element",function(g,b,x){if(g.tagName!=="code"||!x||x.type!=="element"||x.tagName!=="pre")return;const w=VJ(g);if(w===!1||!w&&!r||w&&a&&a.includes(w))return;Array.isArray(g.properties.className)||(g.properties.className=[]),g.properties.className.includes(p)||g.properties.className.unshift(p);const _=cQ(g,{whitespace:"pre"});let E;try{E=w?f.highlight(w,_,{prefix:l}):f.highlightAuto(_,{prefix:l,subset:c})}catch(R){const T=R;if(w&&/Unknown language/.test(T.message)){m.message("Cannot highlight as `"+w+"`, it’s not registered",{ancestors:[x,g],cause:T,place:g.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw T}!w&&E.data&&E.data.language&&g.properties.className.push("language-"+E.data.language),E.children.length>0&&(g.children=E.children)})}}function VJ(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let r;for(;++n<t.length;){const s=String(t[n]);if(s==="no-highlight"||s==="nohighlight")return!1;!r&&s.slice(0,5)==="lang-"&&(r=s.slice(5)),!r&&s.slice(0,9)==="language-"&&(r=s.slice(9))}return r}function z_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function KJ(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function ZJ(e,t,n){const s=of((n||{}).ignore||[]),a=WJ(t);let l=-1;for(;++l<a.length;)yM(e,"text",c);function c(f,h){let m=-1,g;for(;++m<h.length;){const b=h[m],x=g?g.children:void 0;if(s(b,x?x.indexOf(b):void 0,g))return;g=b}if(g)return p(f,h)}function p(f,h){const m=h[h.length-1],g=a[l][0],b=a[l][1];let x=0;const _=m.children.indexOf(f);let E=!1,R=[];g.lastIndex=0;let T=g.exec(f.value);for(;T;){const C=T.index,A={index:T.index,input:T.input,stack:[...h,f]};let N=b(...T,A);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?g.lastIndex=C+1:(x!==C&&R.push({type:"text",value:f.value.slice(x,C)}),Array.isArray(N)?R.push(...N):N&&R.push(N),x=C+T[0].length,E=!0),!g.global)break;T=g.exec(f.value)}return E?(x<f.value.length&&R.push({type:"text",value:f.value.slice(x)}),m.children.splice(_,1,...R)):R=[f],_+R.length}}function WJ(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const s=n[r];t.push([YJ(s[0]),XJ(s[1])])}return t}function YJ(e){return typeof e=="string"?new RegExp(KJ(e),"g"):e}function XJ(e){return typeof e=="function"?e:function(){return e}}const fy="phrasing",dy=["autolink","link","image","label"];function QJ(){return{transforms:[see],enter:{literalAutolink:eee,literalAutolinkEmail:py,literalAutolinkHttp:py,literalAutolinkWww:py},exit:{literalAutolink:iee,literalAutolinkEmail:ree,literalAutolinkHttp:tee,literalAutolinkWww:nee}}}function JJ(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:fy,notInConstruct:dy},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:fy,notInConstruct:dy},{character:":",before:"[ps]",after:"\\/",inConstruct:fy,notInConstruct:dy}]}}function eee(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function py(e){this.config.enter.autolinkProtocol.call(this,e)}function tee(e){this.config.exit.autolinkProtocol.call(this,e)}function nee(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function ree(e){this.config.exit.autolinkEmail.call(this,e)}function iee(e){this.exit(e)}function see(e){ZJ(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,oee],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),aee]],{ignore:["link","linkReference"]})}function oee(e,t,n,r,s){let a="";if(!FM(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!lee(n)))return!1;const l=uee(n+r);if(!l[0])return!1;const c={type:"link",title:null,url:a+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}function aee(e,t,n,r){return!FM(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function lee(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function uee(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const s=z_(e,"(");let a=z_(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function FM(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ia(n)||Zh(n))&&(!t||n!==47)}UM.peek=yee;function cee(){this.buffer()}function fee(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function dee(){this.buffer()}function pee(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function hee(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ti(this.sliceSerialize(e)).toLowerCase(),n.label=t}function mee(e){this.exit(e)}function gee(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ti(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bee(e){this.exit(e)}function yee(){return"["}function UM(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const l=n.enter("footnoteReference"),c=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),l(),a+=s.move("]"),a}function vee(){return{enter:{gfmFootnoteCallString:cee,gfmFootnoteCall:fee,gfmFootnoteDefinitionLabelString:dee,gfmFootnoteDefinition:pee},exit:{gfmFootnoteCallString:hee,gfmFootnoteCall:mee,gfmFootnoteDefinitionLabelString:gee,gfmFootnoteDefinition:bee}}}function kee(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:UM},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,l){const c=a.createTracker(l);let p=c.move("[^");const f=a.enter("footnoteDefinition"),h=a.enter("label");return p+=c.move(a.safe(a.associationId(r),{before:p,after:"]"})),h(),p+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),p+=c.move((t?`
|
|
60
|
-
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?qM:xee))),f(),p}}function xee(e,t,n){return t===0?e:qM(e,t,n)}function qM(e,t,n){return(n?"":" ")+e}const See=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];HM.peek=Ree;function wee(){return{canContainEols:["delete"],enter:{strikethrough:Tee},exit:{strikethrough:_ee}}}function Eee(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:See}],handlers:{delete:HM}}}function Tee(e){this.enter({type:"delete",children:[]},e)}function _ee(e){this.exit(e)}function HM(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let l=s.move("~~");return l+=n.containerPhrasing(e,{...s.current(),before:l,after:"~"}),l+=s.move("~~"),a(),l}function Ree(){return"~"}function Cee(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||Nee,s=[],a=[],l=[],c=[];let p=0,f=-1;for(;++f<e.length;){const x=[],w=[];let _=-1;for(e[f].length>p&&(p=e[f].length);++_<e[f].length;){const E=Aee(e[f][_]);if(t.alignDelimiters!==!1){const R=r(E);w[_]=R,(c[_]===void 0||R>c[_])&&(c[_]=R)}x.push(E)}a[f]=x,l[f]=w}let h=-1;if(typeof n=="object"&&"length"in n)for(;++h<p;)s[h]=j_(n[h]);else{const x=j_(n);for(;++h<p;)s[h]=x}h=-1;const m=[],g=[];for(;++h<p;){const x=s[h];let w="",_="";x===99?(w=":",_=":"):x===108?w=":":x===114&&(_=":");let E=t.alignDelimiters===!1?1:Math.max(1,c[h]-w.length-_.length);const R=w+"-".repeat(E)+_;t.alignDelimiters!==!1&&(E=w.length+E+_.length,E>c[h]&&(c[h]=E),g[h]=E),m[h]=R}a.splice(1,0,m),l.splice(1,0,g),f=-1;const b=[];for(;++f<a.length;){const x=a[f],w=l[f];h=-1;const _=[];for(;++h<p;){const E=x[h]||"";let R="",T="";if(t.alignDelimiters!==!1){const C=c[h]-(w[h]||0),A=s[h];A===114?R=" ".repeat(C):A===99?C%2?(R=" ".repeat(C/2+.5),T=" ".repeat(C/2-.5)):(R=" ".repeat(C/2),T=R):T=" ".repeat(C)}t.delimiterStart!==!1&&!h&&_.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&E==="")&&(t.delimiterStart!==!1||h)&&_.push(" "),t.alignDelimiters!==!1&&_.push(R),_.push(E),t.alignDelimiters!==!1&&_.push(T),t.padding!==!1&&_.push(" "),(t.delimiterEnd!==!1||h!==p-1)&&_.push("|")}b.push(t.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return b.join(`
|
|
61
|
-
`)}function Aee(e){return e==null?"":String(e)}function Nee(e){return e.length}function j_(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Oee(e,t,n,r){const s=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const l=n.indentLines(n.containerFlow(e,a.current()),Mee);return s(),l}function Mee(e,t,n){return">"+(n?"":" ")+e}function Iee(e,t){return L_(e,t.inConstruct,!0)&&!L_(e,t.notInConstruct,!1)}function L_(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function P_(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
62
|
-
`&&Iee(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
63
|
-
`}function Dee(e,t){const n=String(e);let r=n.indexOf(t),s=r,a=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++a>l&&(l=a):a=1,s=r+t.length,r=n.indexOf(t,s);return l}function zee(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function jee(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Lee(e,t,n,r){const s=jee(n),a=e.value||"",l=s==="`"?"GraveAccent":"Tilde";if(zee(e,n)){const m=n.enter("codeIndented"),g=n.indentLines(a,Pee);return m(),g}const c=n.createTracker(r),p=s.repeat(Math.max(Dee(a,s)+1,3)),f=n.enter("codeFenced");let h=c.move(p);if(e.lang){const m=n.enter(`codeFencedLang${l}`);h+=c.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...c.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${l}`);h+=c.move(" "),h+=c.move(n.safe(e.meta,{before:h,after:`
|
|
64
|
-
`,encode:["`"],...c.current()})),m()}return h+=c.move(`
|
|
65
|
-
`),a&&(h+=c.move(a+`
|
|
66
|
-
`)),h+=c.move(p),f(),h}function Pee(e,t,n){return(n?"":" ")+e}function Yk(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function $ee(e,t,n,r){const s=Yk(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const p=n.createTracker(r);let f=p.move("[");return f+=p.move(n.safe(n.associationId(e),{before:f,after:"]",...p.current()})),f+=p.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=p.move("<"),f+=p.move(n.safe(e.url,{before:f,after:">",...p.current()})),f+=p.move(">")):(c=n.enter("destinationRaw"),f+=p.move(n.safe(e.url,{before:f,after:e.title?" ":`
|
|
67
|
-
`,...p.current()}))),c(),e.title&&(c=n.enter(`title${a}`),f+=p.move(" "+s),f+=p.move(n.safe(e.title,{before:f,after:s,...p.current()})),f+=p.move(s),c()),l(),f}function Bee(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Dc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function lh(e,t,n){const r=Nl(e),s=Nl(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}GM.peek=Fee;function GM(e,t,n,r){const s=Bee(n),a=n.enter("emphasis"),l=n.createTracker(r),c=l.move(s);let p=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const f=p.charCodeAt(0),h=lh(r.before.charCodeAt(r.before.length-1),f,s);h.inside&&(p=Dc(f)+p.slice(1));const m=p.charCodeAt(p.length-1),g=lh(r.after.charCodeAt(0),m,s);g.inside&&(p=p.slice(0,-1)+Dc(m));const b=l.move(s);return a(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},c+p+b}function Fee(e,t,n){return n.options.emphasis||"*"}function Uee(e,t){let n=!1;return Qh(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,dv}),!!((!e.depth||e.depth<3)&&Bk(e)&&(t.options.setext||n))}function qee(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Uee(e,n)){const h=n.enter("headingSetext"),m=n.enter("phrasing"),g=n.containerPhrasing(e,{...a.current(),before:`
|
|
68
|
-
`,after:`
|
|
69
|
-
`});return m(),h(),g+`
|
|
70
|
-
`+(s===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(`
|
|
71
|
-
`))+1))}const l="#".repeat(s),c=n.enter("headingAtx"),p=n.enter("phrasing");a.move(l+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
|
72
|
-
`,...a.current()});return/^[\t ]/.test(f)&&(f=Dc(f.charCodeAt(0))+f.slice(1)),f=f?l+" "+f:l,n.options.closeAtx&&(f+=" "+l),p(),c(),f}VM.peek=Hee;function VM(e){return e.value||""}function Hee(){return"<"}KM.peek=Gee;function KM(e,t,n,r){const s=Yk(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const p=n.createTracker(r);let f=p.move("![");return f+=p.move(n.safe(e.alt,{before:f,after:"]",...p.current()})),f+=p.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=p.move("<"),f+=p.move(n.safe(e.url,{before:f,after:">",...p.current()})),f+=p.move(">")):(c=n.enter("destinationRaw"),f+=p.move(n.safe(e.url,{before:f,after:e.title?" ":")",...p.current()}))),c(),e.title&&(c=n.enter(`title${a}`),f+=p.move(" "+s),f+=p.move(n.safe(e.title,{before:f,after:s,...p.current()})),f+=p.move(s),c()),f+=p.move(")"),l(),f}function Gee(){return"!"}ZM.peek=Vee;function ZM(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let p=c.move("![");const f=n.safe(e.alt,{before:p,after:"]",...c.current()});p+=c.move(f+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:p,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!f||f!==m?p+=c.move(m+"]"):s==="shortcut"?p=p.slice(0,-1):p+=c.move("]"),p}function Vee(){return"!"}WM.peek=Kee;function WM(e,t,n){let r=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const l=n.unsafe[a],c=n.compilePattern(l);let p;if(l.atBreak)for(;p=c.exec(r);){let f=p.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(p.index+1)}}return s+r+s}function Kee(){return"`"}function YM(e,t){const n=Bk(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))}XM.peek=Zee;function XM(e,t,n,r){const s=Yk(n),a=s==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,p;if(YM(e,n)){const h=n.stack;n.stack=[],c=n.enter("autolink");let m=l.move("<");return m+=l.move(n.containerPhrasing(e,{before:m,after:">",...l.current()})),m+=l.move(">"),c(),n.stack=h,m}c=n.enter("link"),p=n.enter("label");let f=l.move("[");return f+=l.move(n.containerPhrasing(e,{before:f,after:"](",...l.current()})),f+=l.move("]("),p(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(p=n.enter("destinationLiteral"),f+=l.move("<"),f+=l.move(n.safe(e.url,{before:f,after:">",...l.current()})),f+=l.move(">")):(p=n.enter("destinationRaw"),f+=l.move(n.safe(e.url,{before:f,after:e.title?" ":")",...l.current()}))),p(),e.title&&(p=n.enter(`title${a}`),f+=l.move(" "+s),f+=l.move(n.safe(e.title,{before:f,after:s,...l.current()})),f+=l.move(s),p()),f+=l.move(")"),c(),f}function Zee(e,t,n){return YM(e,n)?"<":"["}QM.peek=Wee;function QM(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let p=c.move("[");const f=n.containerPhrasing(e,{before:p,after:"]",...c.current()});p+=c.move(f+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:p,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!f||f!==m?p+=c.move(m+"]"):s==="shortcut"?p=p.slice(0,-1):p+=c.move("]"),p}function Wee(){return"["}function Xk(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Yee(e){const t=Xk(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Xee(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function JM(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Qee(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let l=e.ordered?Xee(n):Xk(n);const c=e.ordered?l==="."?")":".":Yee(n);let p=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&h&&(!h.children||!h.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&&(p=!0),JM(n)===l&&h){let m=-1;for(;++m<e.children.length;){const g=e.children[m];if(g&&g.type==="listItem"&&g.children&&g.children[0]&&g.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(l=c),n.bulletCurrent=l;const f=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=a,s(),f}function Jee(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function ete(e,t,n,r){const s=Jee(n);let a=n.bulletCurrent||Xk(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let l=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(l-a.length)),c.shift(l);const p=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),h);return p(),f;function h(m,g,b){return g?(b?"":" ".repeat(l))+m:(b?a:a+" ".repeat(l-a.length))+m}}function tte(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),l=n.containerPhrasing(e,r);return a(),s(),l}const nte=of(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function rte(e,t,n,r){return(e.children.some(function(l){return nte(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ite(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}eI.peek=ste;function eI(e,t,n,r){const s=ite(n),a=n.enter("strong"),l=n.createTracker(r),c=l.move(s+s);let p=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const f=p.charCodeAt(0),h=lh(r.before.charCodeAt(r.before.length-1),f,s);h.inside&&(p=Dc(f)+p.slice(1));const m=p.charCodeAt(p.length-1),g=lh(r.after.charCodeAt(0),m,s);g.inside&&(p=p.slice(0,-1)+Dc(m));const b=l.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},c+p+b}function ste(e,t,n){return n.options.strong||"*"}function ote(e,t,n,r){return n.safe(e.value,r)}function ate(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function lte(e,t,n){const r=(JM(n)+(n.options.ruleSpaces?" ":"")).repeat(ate(n));return n.options.ruleSpaces?r.slice(0,-1):r}const tI={blockquote:Oee,break:P_,code:Lee,definition:$ee,emphasis:GM,hardBreak:P_,heading:qee,html:VM,image:KM,imageReference:ZM,inlineCode:WM,link:XM,linkReference:QM,list:Qee,listItem:ete,paragraph:tte,root:rte,strong:eI,text:ote,thematicBreak:lte};function ute(){return{enter:{table:cte,tableData:$_,tableHeader:$_,tableRow:dte},exit:{codeText:pte,table:fte,tableData:hy,tableHeader:hy,tableRow:hy}}}function cte(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function fte(e){this.exit(e),this.data.inTable=void 0}function dte(e){this.enter({type:"tableRow",children:[]},e)}function hy(e){this.exit(e)}function $_(e){this.enter({type:"tableCell",children:[]},e)}function pte(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,hte));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function hte(e,t){return t==="|"?t:e}function mte(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
73
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:l,tableCell:p,tableRow:c}};function l(b,x,w,_){return f(h(b,w,_),b.align)}function c(b,x,w,_){const E=m(b,w,_),R=f([E]);return R.slice(0,R.indexOf(`
|
|
74
|
-
`))}function p(b,x,w,_){const E=w.enter("tableCell"),R=w.enter("phrasing"),T=w.containerPhrasing(b,{..._,before:a,after:a});return R(),E(),T}function f(b,x){return Cee(b,{align:x,alignDelimiters:r,padding:n,stringLength:s})}function h(b,x,w){const _=b.children;let E=-1;const R=[],T=x.enter("table");for(;++E<_.length;)R[E]=m(_[E],x,w);return T(),R}function m(b,x,w){const _=b.children;let E=-1;const R=[],T=x.enter("tableRow");for(;++E<_.length;)R[E]=p(_[E],b,x,w);return T(),R}function g(b,x,w){let _=tI.inlineCode(b,x,w);return w.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function gte(){return{exit:{taskListCheckValueChecked:B_,taskListCheckValueUnchecked:B_,paragraph:yte}}}function bte(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:vte}}}function B_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function yte(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let a=-1,l;for(;++a<s.length;){const c=s[a];if(c.type==="paragraph"){l=c;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function vte(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(l);let p=tI.listItem(e,t,n,{...r,...c.current()});return a&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),p;function f(h){return h+l}}function kte(){return[QJ(),vee(),wee(),ute(),gte()]}function xte(e){return{extensions:[JJ(),kee(e),Eee(),mte(e),bte()]}}const Ste={tokenize:Cte,partial:!0},nI={tokenize:Ate,partial:!0},rI={tokenize:Nte,partial:!0},iI={tokenize:Ote,partial:!0},wte={tokenize:Mte,partial:!0},sI={name:"wwwAutolink",tokenize:_te,previous:aI},oI={name:"protocolAutolink",tokenize:Rte,previous:lI},Cs={name:"emailAutolink",tokenize:Tte,previous:uI},Gi={};function Ete(){return{text:Gi}}let qo=48;for(;qo<123;)Gi[qo]=Cs,qo++,qo===58?qo=65:qo===91&&(qo=97);Gi[43]=Cs;Gi[45]=Cs;Gi[46]=Cs;Gi[95]=Cs;Gi[72]=[Cs,oI];Gi[104]=[Cs,oI];Gi[87]=[Cs,sI];Gi[119]=[Cs,sI];function Tte(e,t,n){const r=this;let s,a;return l;function l(m){return!bv(m)||!uI.call(r,r.previous)||Qk(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return bv(m)?(e.consume(m),c):m===64?(e.consume(m),p):n(m)}function p(m){return m===46?e.check(wte,h,f)(m):m===45||m===95||mr(m)?(a=!0,e.consume(m),p):h(m)}function f(m){return e.consume(m),s=!0,p}function h(m){return a&&s&&Sr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function _te(e,t,n){const r=this;return s;function s(l){return l!==87&&l!==119||!aI.call(r,r.previous)||Qk(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Ste,e.attempt(nI,e.attempt(rI,a),n),n)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function Rte(e,t,n){const r=this;let s="",a=!1;return l;function l(m){return(m===72||m===104)&&lI.call(r,r.previous)&&!Qk(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(Sr(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const g=s.toLowerCase();if(g==="http"||g==="https")return e.consume(m),p}return n(m)}function p(m){return m===47?(e.consume(m),a?f:(a=!0,p)):n(m)}function f(m){return m===null||rh(m)||pn(m)||ia(m)||Zh(m)?n(m):e.attempt(nI,e.attempt(rI,h),n)(m)}function h(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function Cte(e,t,n){let r=0;return s;function s(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),s):l===46&&r===3?(e.consume(l),a):n(l)}function a(l){return l===null?n(l):t(l)}}function Ate(e,t,n){let r,s,a;return l;function l(f){return f===46||f===95?e.check(iI,p,c)(f):f===null||pn(f)||ia(f)||f!==45&&Zh(f)?p(f):(a=!0,e.consume(f),l)}function c(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),l}function p(f){return s||r||!a?n(f):t(f)}}function Nte(e,t){let n=0,r=0;return s;function s(l){return l===40?(n++,e.consume(l),s):l===41&&r<n?a(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(iI,t,a)(l):l===null||pn(l)||ia(l)?t(l):(e.consume(l),s)}function a(l){return l===41&&r++,e.consume(l),s}}function Ote(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),s):c===60||c===null||pn(c)||ia(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||pn(c)||ia(c)?t(c):r(c)}function a(c){return Sr(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):Sr(c)?(e.consume(c),l):n(c)}}function Mte(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return mr(a)?n(a):t(a)}}function aI(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||pn(e)}function lI(e){return!Sr(e)}function uI(e){return!(e===47||bv(e))}function bv(e){return e===43||e===45||e===46||e===95||mr(e)}function Qk(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Ite={tokenize:Fte,partial:!0};function Dte(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Pte,continuation:{tokenize:$te},exit:Bte}},text:{91:{name:"gfmFootnoteCall",tokenize:Lte},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:zte,resolveTo:jte}}}}function zte(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;s--;){const p=r.events[s][1];if(p.type==="labelImage"){l=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return c;function c(p){if(!l||!l._balanced)return n(p);const f=Ti(r.sliceSerialize({start:l.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(p):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),t(p))}}function jte(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",a,t],["enter",l,t],["exit",l,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function Lte(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,l;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),p}function p(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!l||m===null||m===91||pn(m))return n(m);if(m===93){e.exit("chunkString");const g=e.exit("gfmFootnoteCallString");return s.includes(Ti(r.sliceSerialize(g)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return pn(m)||(l=!0),a++,e.consume(m),m===92?h:f}function h(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function Pte(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,c;return p;function p(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(x)}function h(x){if(l>999||x===93&&!c||x===null||x===91||pn(x))return n(x);if(x===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=Ti(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return pn(x)||(c=!0),l++,e.consume(x),x===92?m:h}function m(x){return x===91||x===92||x===93?(e.consume(x),l++,h):h(x)}function g(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),s.includes(a)||s.push(a),Vt(e,b,"gfmFootnoteDefinitionWhitespace")):n(x)}function b(x){return t(x)}}function $te(e,t,n){return e.check(sf,t,e.attempt(Ite,t,n))}function Bte(e){e.exit("gfmFootnoteDefinition")}function Fte(e,t,n){const r=this;return Vt(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(a):n(a)}}function Ute(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(l,c){let p=-1;for(;++p<l.length;)if(l[p][0]==="enter"&&l[p][1].type==="strikethroughSequenceTemporary"&&l[p][1]._close){let f=p;for(;f--;)if(l[f][0]==="exit"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._open&&l[p][1].end.offset-l[p][1].start.offset===l[f][1].end.offset-l[f][1].start.offset){l[p][1].type="strikethroughSequence",l[f][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},l[f][1].start),end:Object.assign({},l[p][1].end)},m={type:"strikethroughText",start:Object.assign({},l[f][1].end),end:Object.assign({},l[p][1].start)},g=[["enter",h,c],["enter",l[f][1],c],["exit",l[f][1],c],["enter",m,c]],b=c.parser.constructs.insideSpan.null;b&&Qr(g,g.length,0,Wh(b,l.slice(f+1,p),c)),Qr(g,g.length,0,[["exit",m,c],["enter",l[p][1],c],["exit",l[p][1],c],["exit",h,c]]),Qr(l,f-1,p-f+3,g),p=f+g.length-2;break}}for(p=-1;++p<l.length;)l[p][1].type==="strikethroughSequenceTemporary"&&(l[p][1].type="data");return l}function a(l,c,p){const f=this.previous,h=this.events;let m=0;return g;function g(x){return f===126&&h[h.length-1][1].type!=="characterEscape"?p(x):(l.enter("strikethroughSequenceTemporary"),b(x))}function b(x){const w=Nl(f);if(x===126)return m>1?p(x):(l.consume(x),m++,b);if(m<2&&!n)return p(x);const _=l.exit("strikethroughSequenceTemporary"),E=Nl(x);return _._open=!E||E===2&&!!w,_._close=!w||w===2&&!!E,c(x)}}}class qte{constructor(){this.map=[]}add(t,n,r){Hte(this,t,n,r)}consume(t){if(this.map.sort(function(a,l){return a[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const a of s)t.push(a);s=r.pop()}this.map.length=0}}function Hte(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function Gte(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Vte(){return{flow:{null:{name:"table",tokenize:Kte,resolveAll:Zte}}}}function Kte(e,t,n){const r=this;let s=0,a=0,l;return c;function c(j){let q=r.events.length-1;for(;q>-1;){const z=r.events[q][1].type;if(z==="lineEnding"||z==="linePrefix")q--;else break}const Z=q>-1?r.events[q][1].type:null,B=Z==="tableHead"||Z==="tableRow"?N:p;return B===N&&r.parser.lazy[r.now().line]?n(j):B(j)}function p(j){return e.enter("tableHead"),e.enter("tableRow"),f(j)}function f(j){return j===124||(l=!0,a+=1),h(j)}function h(j){return j===null?n(j):dt(j)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),b):n(j):$t(j)?Vt(e,h,"whitespace")(j):(a+=1,l&&(l=!1,s+=1),j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),l=!0,h):(e.enter("data"),m(j)))}function m(j){return j===null||j===124||pn(j)?(e.exit("data"),h(j)):(e.consume(j),j===92?g:m)}function g(j){return j===92||j===124?(e.consume(j),m):m(j)}function b(j){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(j):(e.enter("tableDelimiterRow"),l=!1,$t(j)?Vt(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):x(j))}function x(j){return j===45||j===58?_(j):j===124?(l=!0,e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),w):A(j)}function w(j){return $t(j)?Vt(e,_,"whitespace")(j):_(j)}function _(j){return j===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),E):j===45?(a+=1,E(j)):j===null||dt(j)?C(j):A(j)}function E(j){return j===45?(e.enter("tableDelimiterFiller"),R(j)):A(j)}function R(j){return j===45?(e.consume(j),R):j===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(j))}function T(j){return $t(j)?Vt(e,C,"whitespace")(j):C(j)}function C(j){return j===124?x(j):j===null||dt(j)?!l||s!==a?A(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):A(j)}function A(j){return n(j)}function N(j){return e.enter("tableRow"),I(j)}function I(j){return j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),I):j===null||dt(j)?(e.exit("tableRow"),t(j)):$t(j)?Vt(e,I,"whitespace")(j):(e.enter("data"),F(j))}function F(j){return j===null||j===124||pn(j)?(e.exit("data"),I(j)):(e.consume(j),j===92?V:F)}function V(j){return j===92||j===124?(e.consume(j),F):F(j)}}function Zte(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],l=[0,0,0,0],c=!1,p=0,f,h,m;const g=new qte;for(;++n<e.length;){const b=e[n],x=b[1];b[0]==="enter"?x.type==="tableHead"?(c=!1,p!==0&&(F_(g,t,p,f,h),h=void 0,p=0),f={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},g.add(n,0,[["enter",f,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,h={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},g.add(n,0,[["enter",h,t]])),s=x.type==="tableDelimiterRow"?2:h?3:1):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(a[1]!==0&&(l[0]=l[1],m=pp(g,t,a,s,void 0,m),a=[0,0,0,0]),l[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(l[0]=l[1],m=pp(g,t,a,s,void 0,m)),a=l,l=[a[1],n,0,0])):x.type==="tableHead"?(c=!0,p=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(p=n,a[1]!==0?(l[0]=l[1],m=pp(g,t,a,s,n,m)):l[1]!==0&&(m=pp(g,t,l,s,n,m)),s=0):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(l[3]=n)}for(p!==0&&F_(g,t,p,f,h),g.consume(t.events),n=-1;++n<t.events.length;){const b=t.events[n];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=Gte(t.events,n))}return e}function pp(e,t,n,r,s,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},il(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const p=il(t.events,n[1]);if(a={type:l,start:Object.assign({},p),end:Object.assign({},p)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=il(t.events,n[2]),h=il(t.events,n[3]),m={type:c,start:Object.assign({},f),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const g=t.events[n[2]],b=t.events[n[3]];if(g[1].end=Object.assign({},b[1].end),g[1].type="chunkText",g[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,w=n[3]-n[2]-1;e.add(x,w,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},il(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function F_(e,t,n,r,s){const a=[],l=il(t.events,n);s&&(s.end=Object.assign({},l),a.push(["exit",s,t])),r.end=Object.assign({},l),a.push(["exit",r,t]),e.add(n+1,0,a)}function il(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Wte={name:"tasklistCheck",tokenize:Xte};function Yte(){return{text:{91:Wte}}}function Xte(e,t,n){const r=this;return s;function s(p){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(p):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),a)}function a(p){return pn(p)?(e.enter("taskListCheckValueUnchecked"),e.consume(p),e.exit("taskListCheckValueUnchecked"),l):p===88||p===120?(e.enter("taskListCheckValueChecked"),e.consume(p),e.exit("taskListCheckValueChecked"),l):n(p)}function l(p){return p===93?(e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(p)}function c(p){return dt(p)?t(p):$t(p)?e.check({tokenize:Qte},t,n)(p):n(p)}}function Qte(e,t,n){return Vt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function Jte(e){return JO([Ete(),Dte(),Ute(e),Vte(),Yte()])}const ene={};function tne(e){const t=this,n=e||ene,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(Jte(n)),a.push(kte()),l.push(xte(n))}function nne(e){return v.jsx("div",{className:"md-table-wrap",children:v.jsx("table",{...e})})}function cI(e){return v.jsx("span",{className:"md-cell",children:e})}function rne({children:e,...t}){return v.jsx("th",{...t,children:cI(e)})}function ine({children:e,...t}){return v.jsx("td",{...t,children:cI(e)})}function yv(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(yv).join(""):k.isValidElement(e)?yv(e.props.children):""}function sne({children:e,...t}){const[n,r]=k.useState(!1),s=k.useRef(void 0),a=k.useCallback(()=>{navigator.clipboard.writeText(yv(e)),r(!0),clearTimeout(s.current),s.current=setTimeout(()=>r(!1),2e3)},[e]);return v.jsxs("div",{className:"md-pre-wrap",children:[v.jsx("pre",{...t,children:e}),v.jsx("span",{className:"md-copy",children:v.jsx(ho,{icon:n?"check":"copy",size:"sm",variant:"default","aria-label":n?"Copied":"Copy code",onClick:a})})]})}const one={table:nne,th:rne,td:ine,pre:sne},Ol=k.memo(function({text:t,className:n}){return v.jsx("div",{className:n?`md ${n}`:"md",children:v.jsx(JX,{remarkPlugins:[tne],rehypePlugins:[[GJ,{detect:!1}]],components:one,children:t??""})})});function ane(e){switch(e){case"done":return{name:"check-circle",color:"secondary"};case"error":return{name:"x-circle",color:"red"};case"awaiting":return{name:"clock",color:"yellow"};case"orphan":return{name:"slash-circle",color:"tertiary"};default:return{name:"spinner",color:"blue",modifier:"spin"}}}function lf(e){const[t,n]=k.useState(()=>Date.now()),r=e.status==="running"||e.status==="awaiting";k.useEffect(()=>{if(!r||e.endedAt!=null)return;const a=setInterval(()=>n(Date.now()),250);return()=>clearInterval(a)},[r,e.endedAt]);const s=e.endedAt??(r?t:e.startedAt??t);return e.startedAt!=null?Math.max(0,s-e.startedAt):null}function pa({status:e}){const t=ane(e);return v.jsx(Mn,{name:t.name,color:t.color,...t.modifier?{modifier:t.modifier}:{}})}function uf({callId:e}){return v.jsxs("div",{className:"approval-bar",children:[v.jsx("span",{children:"Awaiting human approval"}),v.jsx(Ln,{variant:"secondary",color:"green",size:"sm",onClick:()=>{ut.submitApproval(e,"approve")},children:"Approve"}),v.jsx(Ln,{variant:"secondary",color:"red",size:"sm",onClick:()=>{ut.submitApproval(e,"deny")},children:"Deny"})]})}function Jk(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function bl(e,...t){if(!e)return"";for(const n of t){const r=e[n];if(typeof r=="string"&&r.trim()!=="")return r}return""}const lne=Object.assign({}),fI=new Map;for(const[e,t]of Object.entries(lne)){if(t?.default==null)continue;const n=typeof t.toolName=="string"&&t.toolName.trim()!==""?t.toolName.trim():void 0,r=e.split("/").pop()?.replace(/\.(tsx|ts)$/,""),s=n??r;s&&fI.set(s,t.default)}function une(e){return e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.command=="string"?e.command:typeof e=="string"?e:""}function U_(e){if(e&&typeof e=="object"&&!Array.isArray(e)){const t=e;if("stdout"in t||"stderr"in t||"exitCode"in t)return t}return null}function cne(e){const t=U_(e.outputRaw);if(t)return t;if(e.output)try{return U_(JSON.parse(e.output))}catch{}return null}function q_(e){return e.replace(/[\s\uFEFF\u00A0]+$/,"")}const fne=k.memo(function({item:t}){const[n,r]=k.useState(!1),s=lf(t),a=une(t.args),l=cne(t),c=q_(l?.stdout??""),p=q_(l?.stderr??""),f=l?.exitCode!=null&&l.exitCode!==0,h=t.status==="done"&&f?"error":t.status,m=[a?ys(a,80):"shell"];return f&&m.push(`exit ${l?.exitCode}`),m.push(bi(s)),v.jsxs("div",{className:`pg-tool pg-shell ${h}`,children:[v.jsxs(Ri,{action:"shell",details:m.join(" · "),leadingIcon:v.jsx(pa,{status:h}),open:n,onOpenChange:g=>r(g),tabularNums:!0,children:[a?v.jsx("pre",{className:"shell-cmd",children:a}):null,c?v.jsx("pre",{className:"shell-std",children:c}):null,p?v.jsx("pre",{className:"shell-std shell-err",children:p}):null,!c&&!p?v.jsx("div",{className:"shell-empty",children:l?`Exited ${l.exitCode??0} with no output.`:t.output??"running…"}):null]}),t.status==="awaiting"?v.jsx(uf,{callId:t.callId}):null]})}),dne=k.memo(function({item:t}){const[n,r]=k.useState(!1),s=lf(t),a=bl(Jk(t.args),"path"),l=pne(t),c=[a?NG(a,80):"read",bi(s)];return v.jsxs("div",{className:`pg-tool pg-read ${t.status}`,children:[v.jsxs(Ri,{action:"read",details:c.join(" · "),leadingIcon:v.jsx(pa,{status:t.status}),open:n,onOpenChange:p=>r(p),tabularNums:!0,children:[a?v.jsx("pre",{className:"tool-primary",children:a}):null,l!=null?l?v.jsx("pre",{className:"tool-body",children:l}):v.jsx("div",{className:"tool-empty",children:"(empty file)"}):v.jsx("div",{className:"out",children:t.output??"running…"})]}),t.status==="awaiting"?v.jsx(uf,{callId:t.callId}):null]})});function pne(e){const t=H_(e.outputRaw);if(t!=null)return t;if(e.output)try{return H_(JSON.parse(e.output))}catch{}return null}function H_(e){if(e&&typeof e=="object"&&!Array.isArray(e)){const t=e.content;if(typeof t=="string")return t}if(typeof e=="string")try{const t=JSON.parse(e);if(t&&typeof t=="object"&&!Array.isArray(t)){const n=t.content;if(typeof n=="string")return n}}catch{return e}return null}const hne=k.memo(function({item:t}){const[n,r]=k.useState(!1),s=lf(t),a=Jk(t.args),l=bl(a,"glob_pattern","globPattern"),c=bl(a,"target_directory","targetDirectory"),p=mne(t),f=[l?ys(l,80):"glob",bi(s)];return v.jsxs("div",{className:`pg-tool pg-glob ${t.status}`,children:[v.jsxs(Ri,{action:"glob",details:f.join(" · "),leadingIcon:v.jsx(pa,{status:t.status}),open:n,onOpenChange:h=>r(h),tabularNums:!0,children:[l?v.jsx("pre",{className:"tool-primary",children:l}):null,c?v.jsx("pre",{className:"tool-meta",children:c}):null,p!=null?p.length>0?v.jsx("pre",{className:"tool-body",children:p.join(`
|
|
75
|
-
`)}):v.jsx("div",{className:"tool-empty",children:"(no matches)"}):v.jsx("div",{className:"out",children:t.output??"running…"})]}),t.status==="awaiting"?v.jsx(uf,{callId:t.callId}):null]})});function mne(e){const t=G_(e.outputRaw);if(t!=null)return t;if(e.output)try{return G_(JSON.parse(e.output))}catch{}return null}function G_(e){let t=e;if(typeof t=="string")try{t=JSON.parse(t)}catch{return null}if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t.files;return Array.isArray(n)?n.filter(r=>typeof r=="string"):null}const gne=k.memo(function({item:t}){const[n,r]=k.useState(!1),s=lf(t),a=Jk(t.args),l=bl(a,"pattern"),c=bl(a,"path"),p=bl(a,"glob"),f=[l?ys(l,80):"grep",bi(s)],h=[c,p?`glob ${p}`:""].filter(Boolean).join(`
|
|
76
|
-
`);return v.jsxs("div",{className:`pg-tool pg-grep ${t.status}`,children:[v.jsxs(Ri,{action:"grep",details:f.join(" · "),leadingIcon:v.jsx(pa,{status:t.status}),open:n,onOpenChange:m=>r(m),tabularNums:!0,children:[l?v.jsx("pre",{className:"tool-primary",children:l}):null,h?v.jsx("pre",{className:"tool-meta",children:h}):null,v.jsx("div",{className:"out",children:t.output??"running…"})]}),t.status==="awaiting"?v.jsx(uf,{callId:t.callId}):null]})}),bne=k.memo(function({text:t,open:n}){const[r,s]=k.useState(!1);return n?v.jsx("div",{className:"pg-subagent-reasoning",children:v.jsx(Ri,{action:"Thinking",loading:!0,open:!r,onOpenChange:a=>s(!a),tone:"muted",children:v.jsx(Ol,{text:t,className:"body"})})}):v.jsx("div",{className:"pg-subagent-reasoning",children:v.jsx(Ri,{action:"Thought",defaultOpen:!1,tone:"muted",children:v.jsx(Ol,{text:t,className:"body"})})})}),yne=k.memo(function({child:t}){if(t.kind==="assistant")return v.jsx("div",{className:`pg-subagent-msg${t.streaming?" streaming":""}`,children:v.jsx(Ol,{text:t.text||"…",className:"body"})});if(t.kind==="reasoning")return v.jsx(bne,{text:t.text,open:t.open});const n=t.args==null?"":sr(t.args,80),r=t.status==="running"?"running…":t.status==="error"?"error":t.status==="done"?"done":t.status;return v.jsxs("div",{className:`pg-subagent-tool ${t.status}`,children:[v.jsxs("div",{className:"pg-subagent-tool-head",children:[v.jsx(pa,{status:t.status}),v.jsx("span",{className:"pg-subagent-tool-name",children:t.name}),n?v.jsx("span",{className:"pg-subagent-tool-args",children:n}):null,v.jsx("span",{className:"pg-subagent-tool-status",children:r})]}),t.output?v.jsx("pre",{className:"pg-subagent-tool-out",children:t.output}):null]})});function vne(e,t){for(let n=t.length-1;n>=0;n--){const r=t[n];if(r!==void 0&&r.kind==="tool")return r.status==="running"?`Running ${r.name}`:r.status==="error"?`Failed ${r.name}`:`Ran ${r.name}`}return e.status==="running"?"Generating":e.status==="error"?"Error":"Completed"}const kne=k.memo(function({item:t}){const n=t.children??[],r=n.length>0,[s,a]=k.useState(t.status==="running"),l=t.name.replace(/^subagent:/,"")||"subagent",c=typeof t.args=="string"?t.args:t.args==null?"":sr(t.args,100),p=t.status==="running",f=c?ys(c,120):l;return v.jsxs("div",{className:`pg-tool pg-subagent-card ${t.status}`,children:[v.jsxs("button",{type:"button",className:"pg-subagent-head","aria-expanded":s,onClick:()=>a(h=>!h),children:[v.jsx("span",{className:"pg-subagent-status",children:v.jsx(pa,{status:t.status})}),v.jsxs("span",{className:"pg-subagent-titles",children:[v.jsx("span",{className:p?"pg-subagent-title shimmer":"pg-subagent-title",children:f}),v.jsxs("span",{className:"pg-subagent-subtitle",children:[vne(t,n)," · ",l]})]}),v.jsx("span",{className:s?"pg-subagent-chevron open":"pg-subagent-chevron",children:v.jsx(Mn,{name:"chevron-right",size:10})})]}),v.jsx("div",{className:s?"pg-subagent-clip":"pg-subagent-clip collapsed","aria-hidden":!s,inert:s?void 0:!0,children:v.jsx("div",{className:"pg-subagent-body",children:r?n.map(h=>v.jsx(yne,{child:h},h.id)):v.jsx("div",{className:"pg-subagent-empty",children:t.output??"running…"})})})]})}),xne=k.memo(function({item:t}){const[n,r]=k.useState(!1),s=lf(t),a=t.args==null?"":sr(t.args,120),l=bi(s);return v.jsxs("div",{className:`pg-tool ${t.status}`,children:[v.jsx(Ri,{action:t.name,details:a?`${a} · ${l}`:l,leadingIcon:v.jsx(pa,{status:t.status}),open:n,onOpenChange:c=>r(c),tabularNums:!0,children:v.jsx("div",{className:"out",children:t.output??"running…"})}),t.status==="awaiting"?v.jsx(uf,{callId:t.callId}):null]})}),Sne={shell:e=>v.jsx(fne,{item:e}),read:e=>v.jsx(dne,{item:e}),glob:e=>v.jsx(hne,{item:e}),grep:e=>v.jsx(gne,{item:e})};function wne(e){return e.name.startsWith("subagent:")}const Ene=k.memo(function({item:t}){if(wne(t))return v.jsx(kne,{item:t});const n=fI.get(t.name);if(n)return v.jsx(n,{item:t});const r=Sne[t.name];return r?r(t):v.jsx(xne,{item:t})}),Tne=k.memo(function({text:t}){return v.jsx("div",{className:"msg user",children:v.jsx("div",{className:"bubble",children:t})})}),_ne=k.memo(function({text:t,streaming:n}){return v.jsx("div",{className:"msg assistant",children:v.jsx(Ol,{text:t,className:n?"bubble streaming":"bubble"})})}),Rne=k.memo(function({text:t,open:n}){const[r,s]=k.useState(!1);return n?v.jsx("div",{className:"pg-reasoning",children:v.jsx(Ri,{action:"Thinking",loading:!0,open:!r,onOpenChange:a=>s(!a),tone:"muted",children:v.jsx(Ol,{text:t,className:"body"})})}):v.jsx("div",{className:"pg-reasoning",children:v.jsx(Ri,{action:"Thought",defaultOpen:!1,tone:"muted",children:v.jsx(Ol,{text:t,className:"body"})})})}),Cne=k.memo(function({text:t,fail:n,url:r}){return v.jsxs("div",{className:n?"divider fail":"divider",children:[t,r?v.jsxs(v.Fragment,{children:[" · ",v.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:r})]}):null]})});function uc(e){switch(e.kind){case"user":return v.jsx(Tne,{text:e.text},e.id);case"assistant":return v.jsx(_ne,{text:e.text,streaming:e.streaming},e.id);case"reasoning":return v.jsx(Rne,{text:e.text,open:e.open},e.id);case"tool":return v.jsx(Ene,{item:e},e.id);case"divider":return v.jsx(Cne,{text:e.text,fail:e.fail,url:e.url},e.id);case"turn-end":return null;default:return null}}function V_(e){return e.kind==="tool"&&e.name.startsWith("subagent:")}function Ane({steps:e,cards:t,final:n,marker:r,isLatest:s}){const[a,l]=k.useState(void 0),c=a??s,p=r.inTokens!==void 0||r.outTokens!==void 0?`${th(r.inTokens)} in · ${th(r.outTokens)} out tokens`:void 0;return v.jsxs(v.Fragment,{children:[e.length>0?v.jsx("div",{className:"pg-turn-group",title:p,children:v.jsx(Ri,{action:"Worked",details:r.ms!==null?`for ${Ok(r.ms)}`:void 0,open:c,onOpenChange:l,tabularNums:!0,tone:"tertiary",children:v.jsx("div",{className:"pg-turn-group-content",children:e.map(uc)})})}):null,t.map(uc),n?uc(n):null]})}function Nne({startMs:e}){const[t,n]=k.useState(()=>Date.now());return k.useEffect(()=>{const r=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(r)},[]),v.jsx("div",{className:"pg-turn-group",children:v.jsx(Ri,{action:"Working",details:`for ${Ok(Math.max(0,t-e))}`,expandable:!1,tabularNums:!0,tone:"tertiary"})})}function One(e,t){const n=e.findLast(l=>l.kind==="turn-end")?.id,r=[];let s=[];const a=()=>{for(const l of s)r.push(uc(l));s=[]};for(const l of e)switch(l.kind){case"user":case"divider":a(),r.push(uc(l));break;case"turn-end":{const c=s[s.length-1],p=c!==void 0&&c.kind==="assistant"&&!c.streaming?c:null,f=p===null?s:s.slice(0,-1),h=f.filter(g=>!V_(g)),m=f.filter(V_);r.push(v.jsx(Ane,{steps:h,cards:m,final:p,marker:l,isLatest:l.id===n},l.id)),s=[];break}default:s.push(l);break}return t!==null&&r.push(v.jsx(Nne,{startMs:t},"working")),a(),r}function Mne(){const e=lt(h=>h.transcript),t=lt(h=>h.current),n=lt(h=>h.localTrace),r=lt(h=>h.running),s=lt(h=>h.turnStartedAt),a=e.length===0&&t===null&&!n,l=k.useMemo(()=>e.map(h=>{switch(h.kind){case"user":case"assistant":case"reasoning":return`${h.id}:${h.text.length}`;case"tool":return`${h.id}:${h.status}:${h.output?.length??0}`;case"divider":return`${h.id}:${h.text}`;case"turn-end":return h.id;default:return h}}).join("|"),[e]),c=e.findLast(h=>h.kind==="user")?.id??"",p=`${t?.sessionId??"none"}:${c}:${e.length}`,{scrollRef:f}=IO({contentKey:l,latchKey:p});return v.jsx("div",{ref:f,className:a?"pg-transcript is-empty":"pg-transcript",children:a?v.jsx(kc,{className:"pg-empty",message:"Start a session to talk to your agent — type below, pick a session, or Open trace, then use the Trace tab for a timeline with tool timings."}):One(e,r?s:null)})}function Ine(){const e=lt(l=>l.view),t=lt(l=>l.drawerOpen),n=lt(l=>l.aliasHosted),r=lt(l=>l.aliasToken),s=lt(l=>l.embedded),a=lt(l=>l.sidebarOpen);return k.useEffect(()=>{ut.boot()},[]),n&&r.trim()===""?s?v.jsx(TV,{}):v.jsx(EV,{}):v.jsxs("div",{className:"pg-app",children:[!s||a?v.jsx(AK,{}):null,v.jsxs("div",{className:"pg-main",children:[v.jsx(IK,{}),v.jsxs("div",{className:"pg-columns",children:[e==="chat"?v.jsxs("div",{className:"pg-transcript-wrap",children:[v.jsx(Mne,{}),v.jsx(CV,{})]}):null,e==="trace"?v.jsx(UK,{}):null,e==="raw"?v.jsx(vK,{}):null,e==="logs"?v.jsx(gK,{}):null,e==="evals"?v.jsx(iK,{}):null,e==="abs"?v.jsx(wV,{}):null]})]}),t?v.jsx("button",{type:"button","aria-label":"Close agent surface",className:"pg-drawer-backdrop",onClick:()=>ut.setDrawerOpen(!1)}):null,v.jsx(zV,{}),v.jsx(NK,{})]})}const Dne={name:"dark",appearance:"dark",highContrast:!1,sidebar:"#181818",chrome:"#141414",editor:"#181818",base:"#F0F0F0",accent:"#599CE7",actionLabel:"#191c22",brand:"#F54E00",focus:"#F0F0F0",success:"#3FA266",warn:"#F1B467",danger:"#E34671",added:"#70B489",modified:"#F1B467",removed:"#FC6B83",untracked:"#88C0D0",terminalAnsiBlack:"#242424",terminalAnsiRed:"#FC6B83",terminalAnsiYellow:"#D2943E",terminalAnsiGreen:"#3FA266",terminalAnsiCyan:"#88C0D0",terminalAnsiBlue:"#81A1C1",terminalAnsiMagenta:"#B48EAD",terminalAnsiWhite:"#F0F0F0",terminalAnsiBrightBlack:"#F0F0F099",terminalAnsiBrightRed:"#FC6B83",terminalAnsiBrightYellow:"#F1B467",terminalAnsiBrightGreen:"#70B489",terminalAnsiBrightCyan:"#88C0D0",terminalAnsiBrightBlue:"#87A6C4",terminalAnsiBrightMagenta:"#B48EAD",terminalAnsiBrightWhite:"#F0F0F0",red:"#FC6B83",orange:"#D08770",yellow:"#F1B467",green:"#3FA266",cyan:"#81A1C1",blue:"#7BAFE9",magenta:"#B48EAD",purple:"#9386F2",diffAddedLineBackground:"#3FA26633",diffAddedTextBackground:"#3FA26622",diffRemovedLineBackground:"#B8004933",diffRemovedTextBackground:"#B8004922"},zne={name:"light",appearance:"light",highContrast:!1,sidebar:"#F3F3F3",chrome:"#F8F8F8",editor:"#FCFCFC",base:"#141414",accent:"#2778C1",actionLabel:"#FCFCFC",brand:"#F54E00",focus:"#2778C1",success:"#007041",warn:"#A46700",danger:"#BE1744",added:"#007041",modified:"#A46700",removed:"#BE1744",untracked:"#176C74",terminalAnsiBlack:"#141414",terminalAnsiRed:"#BE1744",terminalAnsiYellow:"#8B5700",terminalAnsiGreen:"#007041",terminalAnsiCyan:"#176C74",terminalAnsiBlue:"#0064B0",terminalAnsiMagenta:"#92156A",terminalAnsiWhite:"#FCFCFC",terminalAnsiBrightBlack:"#141414BD",terminalAnsiBrightRed:"#CE405B",terminalAnsiBrightYellow:"#A46700",terminalAnsiBrightGreen:"#00854C",terminalAnsiBrightCyan:"#3B7E84",terminalAnsiBrightBlue:"#2778C1",terminalAnsiBrightMagenta:"#B54E90",terminalAnsiBrightWhite:"#FFFFFF",red:"#BE1744",orange:"#CD4500",yellow:"#A46700",green:"#007041",cyan:"#176C74",blue:"#2778C1",magenta:"#92156A",purple:"#7565CC",diffAddedLineBackground:"#00AF6624",diffAddedTextBackground:"#00B06838",diffRemovedLineBackground:"#FF617B38",diffRemovedTextBackground:"#FF617B57"},jne=lk({name:CA(),appearance:AA(["light","dark"]),highContrast:LF()}),ex=["sidebar","chrome","editor","base","accent","actionLabel","brand","focus","success","warn","danger","added","modified","removed","untracked","terminalAnsiBlack","terminalAnsiRed","terminalAnsiYellow","terminalAnsiGreen","terminalAnsiCyan","terminalAnsiBlue","terminalAnsiMagenta","terminalAnsiWhite","terminalAnsiBrightBlack","terminalAnsiBrightRed","terminalAnsiBrightYellow","terminalAnsiBrightGreen","terminalAnsiBrightCyan","terminalAnsiBrightBlue","terminalAnsiBrightMagenta","terminalAnsiBrightWhite","red","orange","yellow","green","cyan","blue","magenta","purple","diffAddedLineBackground","diffAddedTextBackground","diffRemovedLineBackground","diffRemovedTextBackground"],Lne=Object.fromEntries(ex.map(e=>[e,CA()]));jne.extend(Lne);function Pne(e){const t={};for(const n of ex){const r=e[n],s=Gc(n);t[s]=r}return t}function $ne(e,t){return Object.keys(e).sort((n,r)=>n.localeCompare(r)).map(n=>`${t}--cursor-${n}: ${e[n]};`)}function Bne(e){return e.highContrast?e.appearance==="light"?"lightHighContrast":"darkHighContrast":e.appearance}new Set(ex);const Fne={foreground:{op:"ref",ref:"base"},textPrimary:{op:"ref",ref:"base"},textSecondary:{op:"mixTransparent",ref:"base",percent:74},textTertiary:{op:"mixTransparent",ref:"base",percent:60},textQuaternary:{op:"mixTransparent",ref:"base",percent:36},textInvert:{op:"ref",ref:"editor"},textActive:{op:"ref",ref:"textPrimary"},textFocused:{op:"ref",ref:"textPrimary"},textGitAddedPrimary:{op:"ref",ref:"added"},textGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:78},textGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:64},textGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:40},textGitModifiedPrimary:{op:"ref",ref:"modified"},textGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:78},textGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:64},textGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:40},textGitRemovedPrimary:{op:"ref",ref:"removed"},textGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:78},textGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:64},textGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:40},textGitUntrackedPrimary:{op:"ref",ref:"untracked"},textGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:78},textGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:64},textGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:40},textRedPrimary:{op:"ref",ref:"red"},textRedSecondary:{op:"mixTransparent",ref:"red",percent:78},textYellowPrimary:{op:"ref",ref:"yellow"},textYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:78},textGreenPrimary:{op:"ref",ref:"green"},textGreenSecondary:{op:"mixTransparent",ref:"green",percent:78},textMagentaPrimary:{op:"ref",ref:"magenta"},textMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:78},textPurplePrimary:{op:"ref",ref:"purple"},textPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:78},textCyanPrimary:{op:"ref",ref:"cyan"},textCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:78},textBluePrimary:{op:"ref",ref:"blue"},textBlueSecondary:{op:"mixTransparent",ref:"blue",percent:78},textOrangePrimary:{op:"ref",ref:"orange"},textOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:78},textAccent:{op:"ref",ref:"accent"},textLink:{op:"ref",ref:"textBluePrimary"},iconPrimary:{op:"ref",ref:"base"},iconSecondary:{op:"mixTransparent",ref:"base",percent:66},iconTertiary:{op:"mixTransparent",ref:"base",percent:52},iconQuaternary:{op:"mixTransparent",ref:"base",percent:28},iconGitAddedPrimary:{op:"ref",ref:"added"},iconGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:70},iconGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:56},iconGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:32},iconGitModifiedPrimary:{op:"ref",ref:"modified"},iconGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:70},iconGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:56},iconGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:32},iconGitRemovedPrimary:{op:"ref",ref:"removed"},iconGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:70},iconGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:56},iconGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:32},iconGitUntrackedPrimary:{op:"ref",ref:"untracked"},iconGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:70},iconGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:56},iconGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:32},iconAccentPrimary:{op:"ref",ref:"accent"},iconAccentSecondary:{op:"mixTransparent",ref:"accent",percent:70},iconRedPrimary:{op:"ref",ref:"red"},iconRedSecondary:{op:"mixTransparent",ref:"red",percent:70},iconYellowPrimary:{op:"ref",ref:"yellow"},iconYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:70},iconGreenPrimary:{op:"ref",ref:"green"},iconGreenSecondary:{op:"mixTransparent",ref:"green",percent:70},iconMagentaPrimary:{op:"ref",ref:"magenta"},iconMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:70},iconCyanPrimary:{op:"ref",ref:"cyan"},iconCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:70},iconBluePrimary:{op:"ref",ref:"blue"},iconBlueSecondary:{op:"mixTransparent",ref:"blue",percent:70},iconOrangePrimary:{op:"ref",ref:"orange"},iconOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:70},iconPurplePrimary:{op:"ref",ref:"purple"},iconPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:70},bgPrimary:{op:"mixTransparent",ref:"base",percent:20},bgSecondary:{op:"mixTransparent",ref:"base",percent:14},bgTertiary:{op:"mixTransparent",ref:"base",percent:8},bgQuaternary:{op:"mixTransparent",ref:"base",percent:6},bgQuinary:{op:"mixTransparent",ref:"base",percent:4},bgElevated:{op:"ref",ref:"editor"},bgChrome:{op:"ref",ref:"chrome"},bgCard:{op:"ref",ref:"bgQuaternary"},bgInput:{op:"ref",ref:"editor"},bgEditor:{op:"ref",ref:"editor"},bgSidebar:{op:"ref",ref:"sidebar"},bgDiffInserted:{op:"ref",ref:"diffAddedLineBackground"},bgDiffRemoved:{op:"ref",ref:"diffRemovedLineBackground"},bgGitAddedPrimary:{op:"ref",ref:"added"},bgGitAddedHover:{op:"mixTwo",k1:"base",p1:10,k2:"added"},bgGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:24},bgGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:12},bgGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:8},bgGitModifiedPrimary:{op:"ref",ref:"modified"},bgGitModifiedHover:{op:"mixTwo",k1:"base",p1:10,k2:"modified"},bgGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:24},bgGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:12},bgGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:8},bgGitRemovedPrimary:{op:"ref",ref:"removed"},bgGitRemovedHover:{op:"mixTwo",k1:"base",p1:10,k2:"removed"},bgGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:24},bgGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:12},bgGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:8},bgGitUntrackedPrimary:{op:"ref",ref:"untracked"},bgGitUntrackedHover:{op:"mixTwo",k1:"base",p1:10,k2:"untracked"},bgGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:24},bgGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:12},bgGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:8},bgActive:{op:"mixTransparent",ref:"base",percent:16},bgFocused:{op:"mixTransparent",ref:"base",percent:22},bgRedPrimary:{op:"ref",ref:"red"},bgRedSecondary:{op:"mixTransparent",ref:"red",percent:12},bgYellowPrimary:{op:"ref",ref:"yellow"},bgYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:12},bgGreenPrimary:{op:"ref",ref:"green"},bgGreenSecondary:{op:"mixTransparent",ref:"green",percent:12},bgMagentaPrimary:{op:"ref",ref:"magenta"},bgMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:12},bgCyanPrimary:{op:"ref",ref:"cyan"},bgCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:12},bgBluePrimary:{op:"ref",ref:"blue"},bgBlueSecondary:{op:"mixTransparent",ref:"blue",percent:12},bgOrangePrimary:{op:"ref",ref:"orange"},bgOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:12},bgPurplePrimary:{op:"ref",ref:"purple"},bgPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:12},bgPurpleTertiary:{op:"mixTransparent",ref:"purple",percent:8},bgAccent:{op:"ref",ref:"accent"},bgAccentHover:{op:"mixTwo",k1:"base",p1:10,k2:"accent"},bgAccentSecondary:{op:"mixTransparent",ref:"accent",percent:24},bgAccentTertiary:{op:"mixTransparent",ref:"accent",percent:12},bgAccentQuaternary:{op:"mixTransparent",ref:"accent",percent:8},strokePrimary:{op:"mixTransparent",ref:"base",percent:20},strokeSecondary:{op:"mixTransparent",ref:"base",percent:12},strokeTertiary:{op:"mixTransparent",ref:"base",percent:8},strokeTertiaryOpaque:{op:"mixTwo",k1:"base",p1:8,k2:"chrome"},strokeQuaternary:{op:"mixTransparent",ref:"base",percent:4},strokeFocused:{op:"ref",ref:"focus",fadePercent:15},strokeHighContrast:{op:"mixTransparent",ref:"base",percent:0},strokeGitAdded:{op:"mixTransparent",ref:"added",percent:56},strokeGitModified:{op:"mixTransparent",ref:"modified",percent:56},strokeGitRemoved:{op:"mixTransparent",ref:"removed",percent:56},strokeGitUntracked:{op:"mixTransparent",ref:"untracked",percent:56},strokeRedPrimary:{op:"mixTransparent",ref:"red",percent:56},strokeRedSecondary:{op:"mixTransparent",ref:"red",percent:32},strokeYellowPrimary:{op:"mixTransparent",ref:"yellow",percent:56},strokeYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:32},strokeGreenPrimary:{op:"mixTransparent",ref:"green",percent:56},strokeGreenSecondary:{op:"mixTransparent",ref:"green",percent:32},strokeMagentaPrimary:{op:"mixTransparent",ref:"magenta",percent:56},strokeMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:32},strokeCyanPrimary:{op:"mixTransparent",ref:"cyan",percent:56},strokeCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:32},strokeBluePrimary:{op:"mixTransparent",ref:"blue",percent:56},strokeBlueSecondary:{op:"mixTransparent",ref:"blue",percent:32},strokeOrangePrimary:{op:"mixTransparent",ref:"orange",percent:56},strokeOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:32},shadowPrimary:{op:"mixBlack",blackPercent:20},shadowSecondary:{op:"mixTransparent",ref:"shadowPrimary",percent:60},shadowTertiary:{op:"mixTransparent",ref:"shadowPrimary",percent:30},shadowWorkbench:{op:"shadow",candidates:[{x:0,y:0,blur:8,spread:2,primaryMixPercent:40}]},boxShadowSm:{op:"shadow",candidates:[{x:0,y:2,blur:8,spread:0,shadowToken:"shadowSecondary"}]},boxShadowBase:{op:"shadow",candidates:[{x:0,y:0,blur:8,spread:2,shadowToken:"shadowPrimary"}]},boxShadowSoft:{op:"shadow",candidates:[{x:0,y:0,blur:8,spread:2,shadowToken:"shadowTertiary"}]},boxShadowLg:{op:"shadow",candidates:[{inset:!0,x:0,y:0,blur:4,spread:0,literalColor:"rgba(255, 255, 255, 0.05)"},{x:0,y:0,blur:3,spread:0,shadowToken:"shadowSecondary"},{x:0,y:16,blur:24,spread:0,shadowToken:"shadowTertiary"}]},boxShadowXl:{op:"shadow",candidates:[{inset:!0,x:0,y:0,blur:4,spread:0,literalColor:"rgba(255, 255, 255, 0.05)"},{x:0,y:0,blur:6,spread:8,shadowToken:"shadowSecondary"},{x:0,y:24,blur:16,spread:6,shadowToken:"shadowTertiary"}]},buttonSecondaryBackground:{op:"ref",ref:"bgTertiary"},buttonSecondaryForeground:{op:"ref",ref:"textPrimary"},buttonSecondaryHoverBackground:{op:"ref",ref:"bgSecondary"},titlebarActiveForeground:{op:"ref",ref:"textSecondary"},titlebarInactiveForeground:{op:"ref",ref:"textTertiary"},commandCenterForeground:{op:"ref",ref:"textSecondary"},commandCenterBackground:{op:"ref",ref:"bgTertiary"},commandCenterBorder:{op:"ref",ref:"strokeSecondary"},commandCenterActiveForeground:{op:"ref",ref:"textSecondary"},commandCenterActiveBorder:{op:"ref",ref:"strokePrimary"},commandCenterActiveBackground:{op:"ref",ref:"bgSecondary"},commandCenterInactiveForeground:{op:"ref",ref:"textTertiary"},commandCenterInactiveBorder:{op:"ref",ref:"strokeSecondary"},terminalBackground:{op:"ref",ref:"chrome"},terminalForeground:{op:"ref",ref:"textPrimary"},terminalSelectionBackground:{op:"mixTransparent",ref:"base",percent:12},scrollbarThumbBackground:{op:"mixTransparentOverlay",ref:"base",percent:14},scrollbarThumbHoverBackground:{op:"mixTransparentOverlay",ref:"base",percent:22},scrollbarThumbActiveBackground:{op:"mixTransparentOverlay",ref:"base",percent:26},scrollbarShadow:{op:"ref",ref:"shadowPrimary"},progressBarBackground:{op:"ref",ref:"accent"},toolbarHoverBackground:{op:"ref",ref:"bgTertiary"},inputBorder:{op:"ref",ref:"strokeSecondary"},inputPlaceholderForeground:{op:"ref",ref:"textQuaternary"},editorForeground:{op:"ref",ref:"textPrimary"},editorLineHighlightBackground:{op:"mixTransparent",ref:"base",percent:8},editorLineNumberForeground:{op:"ref",ref:"textTertiary"},editorLineNumberActiveForeground:{op:"ref",ref:"textPrimary"},editorCursorForeground:{op:"ref",ref:"textPrimary"},editorSelectionBackground:{op:"mixTransparent",ref:"accent",percent:42},editorInactiveSelectionBackground:{op:"mixTransparent",ref:"accent",percent:30},editorSelectionHighlightBackground:{op:"mixTransparentAlpha",key:"accent",percent:32,alpha:128/255},editorWidgetBackground:{op:"ref",ref:"bgElevated"},editorWidgetBorder:{op:"ref",ref:"strokeSecondary"},editorWidgetForeground:{op:"ref",ref:"textPrimary"},editorGutterBackground:{op:"ref",ref:"editor"},editorWhitespaceForeground:{op:"mixTransparent",ref:"base",percent:22},editorBracketMatchBackground:{op:"mixTransparent",ref:"success",percent:22},editorBracketMatchBorder:{op:"mixTransparent",ref:"base",percent:52},editorIndentGuideBackground:{op:"mixTransparent",ref:"base",percent:22},editorIndentGuideActiveBackground:{op:"mixTransparent",ref:"base",percent:40},editorFindMatchBackground:{op:"mixTransparent",ref:"warn",percent:72},editorFindMatchHighlightBackground:{op:"mixTransparentOverlay",ref:"warn",percent:32},textCodeBlockBackground:{op:"ref",ref:"bgElevated"},textLinkActive:{op:"ref",ref:"accent"}},K_={textPrimary:{op:"ref",ref:"base"},textSecondary:{op:"mixTransparent",ref:"base",percent:84},textTertiary:{op:"mixTransparent",ref:"base",percent:72},textQuaternary:{op:"mixTransparent",ref:"base",percent:60},textGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:88},textGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:76},textGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:64},textGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:88},textGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:76},textGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:64},textGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:88},textGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:76},textGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:64},textGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:88},textGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:76},textGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:64},textRedSecondary:{op:"mixTransparent",ref:"red",percent:88},textYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:88},textGreenSecondary:{op:"mixTransparent",ref:"green",percent:88},textMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:88},textPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:88},textCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:88},textBlueSecondary:{op:"mixTransparent",ref:"blue",percent:88},textOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:88},iconGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:80},iconGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:68},iconGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:56},iconGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:80},iconGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:68},iconGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:56},iconGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:80},iconGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:68},iconGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:56},iconGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:80},iconGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:68},iconGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:56},iconRedSecondary:{op:"mixTransparent",ref:"red",percent:80},iconYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:80},iconGreenSecondary:{op:"mixTransparent",ref:"green",percent:80},iconMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:80},iconPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:80},iconCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:80},iconBlueSecondary:{op:"mixTransparent",ref:"blue",percent:80},iconOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:80},iconAccentSecondary:{op:"mixTransparent",ref:"accent",percent:80},iconPrimary:{op:"ref",ref:"base"},iconSecondary:{op:"mixTransparent",ref:"base",percent:76},iconTertiary:{op:"mixTransparent",ref:"base",percent:64},iconQuaternary:{op:"mixTransparent",ref:"base",percent:52},bgPrimary:{op:"mixTransparent",ref:"base",percent:36},bgSecondary:{op:"mixTransparent",ref:"base",percent:24},bgTertiary:{op:"mixTransparent",ref:"base",percent:14},bgQuaternary:{op:"mixTransparent",ref:"base",percent:8},bgQuinary:{op:"mixTransparent",ref:"base",percent:5},bgYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:24},bgRedSecondary:{op:"mixTransparent",ref:"red",percent:24},bgGreenSecondary:{op:"mixTransparent",ref:"green",percent:24},bgMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:24},bgCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:24},bgBlueSecondary:{op:"mixTransparent",ref:"blue",percent:24},strokePrimary:{op:"mixTransparent",ref:"base",percent:48},strokeSecondary:{op:"mixTransparent",ref:"base",percent:36},strokeTertiary:{op:"mixTransparent",ref:"base",percent:28},strokeTertiaryOpaque:{op:"mixTwo",k1:"base",p1:28,k2:"chrome"},strokeQuaternary:{op:"mixTransparent",ref:"base",percent:20},strokeGitAdded:{op:"mixTransparent",ref:"added",percent:80},strokeGitModified:{op:"mixTransparent",ref:"modified",percent:80},strokeGitRemoved:{op:"mixTransparent",ref:"removed",percent:80},strokeGitUntracked:{op:"mixTransparent",ref:"untracked",percent:80},strokeRedPrimary:{op:"mixTransparent",ref:"red",percent:80},strokeRedSecondary:{op:"mixTransparent",ref:"red",percent:56},strokeYellowPrimary:{op:"mixTransparent",ref:"yellow",percent:80},strokeYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:56},strokeGreenPrimary:{op:"mixTransparent",ref:"green",percent:80},strokeGreenSecondary:{op:"mixTransparent",ref:"green",percent:56},strokeMagentaPrimary:{op:"mixTransparent",ref:"magenta",percent:80},strokeMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:56},strokeCyanPrimary:{op:"mixTransparent",ref:"cyan",percent:80},strokeCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:56},strokeBluePrimary:{op:"mixTransparent",ref:"blue",percent:80},strokeBlueSecondary:{op:"mixTransparent",ref:"blue",percent:56},strokeFocused:{op:"ref",ref:"focus",fadePercent:100},strokeHighContrast:{op:"mixTransparent",ref:"base",percent:36}},Une={light:{shadowPrimary:{op:"mixBlack",blackPercent:6}},dark:{},lightHighContrast:{...K_},darkHighContrast:{...K_}};function ms(e){return`var(--cursor-${Gc(e)})`}function qne(e){const t=e.inset?"inset ":"",n=`${e.x}px ${e.y}px ${e.blur}px ${e.spread}px`;return"literalColor"in e?`${t}${n} ${e.literalColor}`:"shadowToken"in e?`${t}${n} ${ms(e.shadowToken)}`:`${t}${n} color-mix(in srgb, ${ms("shadowPrimary")} ${e.primaryMixPercent}%, transparent)`}function Hne(e){return e.map(qne).join(", ")}function Gne(e){switch(e.op){case"mixTransparent":case"mixTransparentOverlay":return`color-mix(in srgb, ${ms(e.ref)} ${e.percent}%, transparent)`;case"mixTwo":return`color-mix(in srgb, ${ms(e.k1)} ${e.p1}%, ${ms(e.k2)})`;case"mixBlackChrome":return`color-mix(in srgb, #000000 ${e.blackPercent}%, ${ms("chrome")})`;case"mixBlack":return`color-mix(in srgb, #000000 ${e.blackPercent}%, transparent)`;case"ref":return e.fadePercent!==void 0?`color-mix(in srgb, ${ms(e.ref)} ${e.fadePercent}%, transparent)`:ms(e.ref);case"shadow":return Hne(e.candidates);case"mixTransparentAlpha":return`color-mix(in srgb, ${ms(e.key)} ${e.percent}%, transparent)`;default:return e}}function Vne(e){const t=Une[e];return Object.entries(Fne).map(([n,r])=>({name:Gc(n),expr:t[n]??r}))}function Kne(e){const t=Vne(e),n=[];for(const{name:r,expr:s}of t)n.push(` --cursor-${r}: ${Gne(s)};`);return n}function Zne(e){const t=Pne(e),n=$ne(t," "),r=Bne(e),s=Kne(r).join(`
|
|
77
|
-
`);return`:root {
|
|
78
|
-
${n.join(`
|
|
79
|
-
`)}
|
|
80
|
-
}
|
|
81
|
-
:root {
|
|
82
|
-
${s}
|
|
83
|
-
}`}const vv={fontFamily:Bb.fontFamily,scrollbar:Bb.scrollbar,syntax:Bb.syntax},Wne=[{key:"fontFamily",cssMid:"font-family"},{key:"scrollbar",cssMid:"scrollbar"},{key:"syntax",cssMid:"syntax"}];function Yne(e,t){const n=Gc(t.replace(/\./g,"-"));return`--cursor-${e}-${n}`}function ds(e,t,n,r=""){for(const[s,a]of Object.entries(t)){const l=typeof a=="number"?`${a}${r}`:a;n.push(` ${Yne(e,s)}: ${l};`)}}function Xne(e={}){const t=e.selector??":root",n=e.theme??vv,r=[`${t} {`];for(const{key:s,cssMid:a}of Wne)for(const[l,c]of Object.entries(n[s]))r.push(` --cursor-${a}-${Gc(l)}: ${c};`);return ds("duration",By,r,"ms"),ds("easing",jA,r),ds("spacing",s9,r,"px"),ds("radius",o9,r,"px"),ds("height",a9,r,"px"),ds("font-size",l9,r,"px"),ds("line-height",u9,r,"px"),ds("letter-spacing",c9,r,"px"),ds("elevation",i9,r),r.push("}"),r.join(`
|
|
84
|
-
`)}function Qne(e){const t=Zne(e.core),n=Xne(e.nonColor??{});return`${t}
|
|
85
|
-
${n}`}function Jne(e){if(!e)return"default";const t=e.toLowerCase().replace(/_/g,"-");return t==="ja"||t.startsWith("ja-")?"ja":t==="ko"||t.startsWith("ko-")?"ko":t==="zh-tw"||t==="zh-hk"||t==="zh-mo"||t.includes("hant")?"zh-Hant":t==="zh"||t.startsWith("zh-")?"zh-Hans":"default"}function ere(e,t){switch(e){case"mac":switch(t){case"zh-Hans":return'-apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif';case"zh-Hant":return'-apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif';case"ja":return'-apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif';case"ko":return'-apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Nanum Gothic", "AppleGothic", sans-serif';default:return"-apple-system, BlinkMacSystemFont, sans-serif"}case"windows":switch(t){case"zh-Hans":return'"Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif';case"zh-Hant":return'"Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif';case"ja":return'"Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif';case"ko":return'"Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif';default:return'"Segoe WPC", "Segoe UI", sans-serif'}case"linux":switch(t){case"zh-Hans":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif';case"zh-Hant":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif';case"ja":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif';case"ko":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif';default:return'system-ui, "Ubuntu", "Droid Sans", sans-serif'}default:return e}}function tre(e,t){const n=`${e} ${t}`.toLowerCase();return n.includes("mac")?"mac":n.includes("win")?"windows":"linux"}function nre(e){return ere(e.platform,Jne(e.locale))}function rre(e){switch(e){case"mac":return'"SF Mono", Monaco, Menlo, Courier, monospace';case"windows":return'Consolas, "Courier New", monospace';case"linux":return'"Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace';default:return e}}const Z_="agent-serve-cursor-theme";function ire(e=window.location.search){return new URLSearchParams(e).get("theme")==="light"?"light":"dark"}function sre(e){const t=document.documentElement;t.dataset.theme=e==="light"?"cursor-light":"cursor-dark",t.style.colorScheme=e;const n=tre(navigator.userAgent,navigator.platform),r=Qne({core:e==="light"?zne:Dne,nonColor:{theme:{...vv,fontFamily:{...vv.fontFamily,sans:nre({platform:n,locale:navigator.language}),mono:rre(n)}}}});let s=document.getElementById(Z_);s==null&&(s=document.createElement("style"),s.id=Z_,document.head.appendChild(s)),s.textContent=r}sre(ire());const dI=document.getElementById("root");if(dI===null)throw new Error("Playground bootstrap failed: #root element is missing.");Ez.createRoot(dI).render(v.jsx(k.StrictMode,{children:v.jsx(_s,{menuSize:"md",children:v.jsx(Ine,{})})}));
|