@cursor/july 0.1.62 → 0.1.73
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/AGENTS.md +4 -5
- package/README.md +23 -11
- package/dist/bin/agent-serve.js +11 -2
- package/dist/channels/github/api.d.ts +2 -0
- package/dist/channels/github/api.d.ts.map +1 -1
- package/dist/channels/github/api.js +2 -1
- package/dist/channels/github/binding.d.ts +7 -0
- package/dist/channels/github/binding.d.ts.map +1 -1
- package/dist/channels/github/binding.js +4 -0
- package/dist/channels/github/checks.d.ts +99 -0
- package/dist/channels/github/checks.d.ts.map +1 -0
- package/dist/channels/github/checks.js +108 -0
- package/dist/channels/github/cursor-account.d.ts +4 -4
- package/dist/channels/github/cursor-account.d.ts.map +1 -1
- package/dist/channels/github/cursor-account.js +7 -5
- package/dist/channels/github/index.d.ts +1 -0
- package/dist/channels/github/index.d.ts.map +1 -1
- package/dist/channels/github/index.js +1 -0
- package/dist/channels/github/types.d.ts +8 -0
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/slack/channel-watch.d.ts +2 -1
- package/dist/channels/slack/channel-watch.d.ts.map +1 -1
- package/dist/channels/slack/channel-watch.js +7 -3
- package/dist/channels/slack/dispatch.d.ts +9 -0
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +41 -21
- package/dist/channels/slack/manifest.d.ts +2 -2
- package/dist/channels/slack/manifest.d.ts.map +1 -1
- package/dist/channels/slack/manifest.js +14 -11
- package/dist/channels/slack/nudge-store.d.ts +16 -0
- package/dist/channels/slack/nudge-store.d.ts.map +1 -1
- package/dist/channels/slack/nudge-store.js +53 -0
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +4 -1
- package/dist/channels/slack/types.d.ts +24 -7
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/connections.d.ts +17 -5
- package/dist/connections.d.ts.map +1 -1
- package/dist/connections.js +17 -5
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +3 -3
- package/dist/docs/assets/{app.B-biogkN.js → app.CdbcFD8T.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.DQad--_z.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.DZqKtFZS.js → VPLocalSearchBox.D_NKImM7.js} +1 -1
- package/dist/docs/assets/chunks/{theme.BwC5zP2r.js → theme.CMvz7cu9.js} +2 -2
- package/dist/docs/assets/{concepts.md.CqOsxbMU.js → concepts.md.BXAm6G-C.js} +1 -1
- package/dist/docs/assets/{guides_mcp-oauth.md.C7G7IykG.js → guides_mcp-oauth.md.CzEB6RaG.js} +1 -1
- package/dist/docs/assets/{reference_agent-config.md.DHkkvcEZ.js → reference_agent-config.md.BZnEKfEc.js} +3 -4
- package/dist/docs/assets/{reference_agent-config.md.DHkkvcEZ.lean.js → reference_agent-config.md.BZnEKfEc.lean.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.CSQiNzre.js → reference_connections.md.Cu3N-S3Q.js} +26 -9
- package/dist/docs/assets/reference_connections.md.Cu3N-S3Q.lean.js +1 -0
- package/dist/docs/assets/{reference_sessions.md.DBVFi2Sx.js → reference_sessions.md.B0DdlM-K.js} +1 -1
- package/dist/docs/assets/{reference_tools.md.kJfJAP2m.js → reference_tools.md.DTg_kEsx.js} +2 -2
- package/dist/docs/assets/{reference_tools.md.kJfJAP2m.lean.js → reference_tools.md.DTg_kEsx.lean.js} +1 -1
- package/dist/docs/assets/troubleshooting.md.DQ-hYuZT.js +1 -0
- package/dist/docs/building-with-agents.html +3 -3
- package/dist/docs/concepts.html +5 -5
- package/dist/docs/deployment.html +3 -3
- package/dist/docs/evals.html +3 -3
- package/dist/docs/example-agents/approval-buddy.html +3 -3
- package/dist/docs/example-agents/benny.html +3 -3
- package/dist/docs/example-agents/bugbot.html +3 -3
- package/dist/docs/example-agents/codebase-wiki.html +3 -3
- package/dist/docs/example-agents/codeowners-review.html +3 -3
- package/dist/docs/example-agents/concierge.html +3 -3
- package/dist/docs/example-agents/fsd.html +3 -3
- package/dist/docs/example-agents/index.html +3 -3
- package/dist/docs/example-agents/knowledge-base.html +3 -3
- package/dist/docs/example-agents/oncall.html +3 -3
- package/dist/docs/example-agents/security-reviewer.html +3 -3
- package/dist/docs/example-agents/slack-agent.html +3 -3
- package/dist/docs/example-agents/weather-agent.html +3 -3
- package/dist/docs/guides/agent-to-agent.html +3 -3
- package/dist/docs/guides/cloud-runtime.html +3 -3
- package/dist/docs/guides/convert-automation.html +3 -3
- package/dist/docs/guides/github.html +3 -3
- package/dist/docs/guides/human-in-the-loop.html +3 -3
- package/dist/docs/guides/mcp-oauth.html +5 -5
- package/dist/docs/guides/opentelemetry.html +3 -3
- package/dist/docs/guides/slack.html +3 -3
- package/dist/docs/guides/webhooks.html +3 -3
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +3 -3
- package/dist/docs/index.html +3 -3
- package/dist/docs/quickstart.html +3 -3
- package/dist/docs/reference/agent-config.html +5 -6
- package/dist/docs/reference/artifacts.html +3 -3
- package/dist/docs/reference/channels.html +3 -3
- package/dist/docs/reference/cli.html +3 -3
- package/dist/docs/reference/connections.html +28 -11
- package/dist/docs/reference/hooks.html +3 -3
- package/dist/docs/reference/http-api.html +3 -3
- package/dist/docs/reference/instructions.html +3 -3
- package/dist/docs/reference/playground.html +3 -3
- package/dist/docs/reference/project-layout.html +3 -3
- package/dist/docs/reference/prompt.html +3 -3
- package/dist/docs/reference/schedules.html +3 -3
- package/dist/docs/reference/sessions.html +5 -5
- package/dist/docs/reference/skills.html +3 -3
- package/dist/docs/reference/subagents.html +3 -3
- package/dist/docs/reference/tools.html +5 -5
- package/dist/docs/scaffolding-agents.html +3 -3
- package/dist/docs/storage.html +3 -3
- package/dist/docs/templates/agentic-owners.html +3 -3
- package/dist/docs/templates/demo.html +3 -3
- package/dist/docs/templates/pr-autofixer.html +3 -3
- package/dist/docs/templates/security-reviewer.html +3 -3
- package/dist/docs/templates/triage.html +3 -3
- package/dist/docs/troubleshooting.html +5 -5
- package/dist/files-backends/agent-store-presigned-url.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/advertise-tools.d.ts +79 -0
- package/dist/internal/advertise-tools.d.ts.map +1 -0
- package/dist/internal/advertise-tools.js +185 -0
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +7 -1
- package/dist/internal/cli-manifest.d.ts +19 -0
- package/dist/internal/cli-manifest.d.ts.map +1 -0
- package/dist/internal/cli-manifest.js +49 -0
- package/dist/internal/cli-slack.d.ts.map +1 -1
- package/dist/internal/cli-slack.js +9 -1
- package/dist/internal/convert-automation/convert-workflow.d.ts.map +1 -1
- package/dist/internal/convert-automation/convert-workflow.js +2 -10
- package/dist/internal/cursor/account-mcp.d.ts +29 -3
- package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
- package/dist/internal/cursor/account-mcp.js +147 -67
- package/dist/internal/cursor/backend-client.d.ts +11 -6
- package/dist/internal/cursor/backend-client.d.ts.map +1 -1
- package/dist/internal/cursor/backend-client.js +32 -10
- package/dist/internal/cursor-account-mcp-auth.d.ts +11 -0
- package/dist/internal/cursor-account-mcp-auth.d.ts.map +1 -1
- package/dist/internal/cursor-account-mcp-auth.js +69 -0
- package/dist/internal/cursor-agent-template.d.ts +9 -0
- package/dist/internal/cursor-agent-template.d.ts.map +1 -0
- package/dist/internal/cursor-agent-template.js +37 -0
- package/dist/internal/deploy-client.d.ts +1 -0
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +18 -2
- package/dist/internal/deploy-manifest.d.ts +76 -0
- package/dist/internal/deploy-manifest.d.ts.map +1 -0
- package/dist/internal/deploy-manifest.js +117 -0
- package/dist/internal/deployment-scm-event-stream.d.ts +116 -0
- package/dist/internal/deployment-scm-event-stream.d.ts.map +1 -0
- package/dist/internal/deployment-scm-event-stream.js +474 -0
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +111 -10
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +12 -123
- package/dist/internal/init-scaffold.d.ts +8 -0
- package/dist/internal/init-scaffold.d.ts.map +1 -0
- package/dist/internal/init-scaffold.js +168 -0
- package/dist/internal/inline-stdio-mcp.d.ts +2 -0
- package/dist/internal/inline-stdio-mcp.d.ts.map +1 -1
- package/dist/internal/inline-stdio-mcp.js +10 -8
- package/dist/internal/json-schema.d.ts +7 -0
- package/dist/internal/json-schema.d.ts.map +1 -1
- package/dist/internal/json-schema.js +18 -3
- package/dist/internal/mcp-endpoint.js +7 -7
- package/dist/internal/mcp-host.d.ts +18 -0
- package/dist/internal/mcp-host.d.ts.map +1 -1
- package/dist/internal/mcp-host.js +43 -5
- package/dist/internal/mcp-oauth.d.ts +22 -0
- package/dist/internal/mcp-oauth.d.ts.map +1 -1
- package/dist/internal/mcp-oauth.js +40 -1
- package/dist/internal/package-inline-stdio.d.ts.map +1 -1
- package/dist/internal/package-inline-stdio.js +5 -5
- package/dist/internal/review-comments.d.ts +97 -0
- package/dist/internal/review-comments.d.ts.map +1 -1
- package/dist/internal/review-comments.js +151 -0
- package/dist/internal/sanitize-mcp-tool-name.d.ts +20 -0
- package/dist/internal/sanitize-mcp-tool-name.d.ts.map +1 -0
- package/dist/internal/sanitize-mcp-tool-name.js +30 -0
- package/dist/internal/sdk-runner.d.ts +1 -1
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +36 -13
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +18 -0
- package/dist/internal/session-engine.d.ts +66 -0
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +428 -110
- package/dist/internal/shallow-clone.d.ts +170 -0
- package/dist/internal/shallow-clone.d.ts.map +1 -0
- package/dist/internal/shallow-clone.js +412 -0
- package/dist/internal/slack-provision-client.d.ts +2 -0
- package/dist/internal/slack-provision-client.d.ts.map +1 -1
- package/dist/internal/slack-provision-client.js +1 -0
- package/dist/internal/terminal-style.d.ts +18 -0
- package/dist/internal/terminal-style.d.ts.map +1 -1
- package/dist/internal/terminal-style.js +46 -1
- package/dist/internal/turn-lease-store.d.ts +44 -0
- package/dist/internal/turn-lease-store.d.ts.map +1 -0
- package/dist/internal/turn-lease-store.js +139 -0
- package/dist/internal/workspace.d.ts +14 -0
- package/dist/internal/workspace.d.ts.map +1 -1
- package/dist/internal/workspace.js +33 -0
- package/dist/playground/assets/index-77uhu5Kr.css +1 -0
- package/dist/playground/assets/index-D4buox4m.js +85 -0
- package/dist/playground/index.html +2 -2
- package/dist/storage-protocol.d.ts +122 -0
- package/dist/storage-protocol.d.ts.map +1 -0
- package/dist/storage-protocol.js +173 -0
- package/dist/storage.d.ts +2 -72
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +2 -82
- package/dist/tools.d.ts +7 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/types.d.ts +141 -6
- package/dist/types.d.ts.map +1 -1
- package/docs/concepts.md +4 -4
- package/docs/guides/mcp-oauth.md +3 -1
- package/docs/reference/agent-config.md +11 -12
- package/docs/reference/connections.md +108 -10
- package/docs/reference/sessions.md +2 -2
- package/docs/reference/tools.md +14 -0
- package/docs/troubleshooting.md +3 -2
- package/package.json +7 -2
- package/skills/create-agent/SKILL.md +12 -9
- package/skills/debug/SKILL.md +2 -1
- package/skills/framework-map/SKILL.md +6 -6
- package/skills/mcp-auth/SKILL.md +8 -6
- package/src/bin/agent-serve.ts +12 -2
- package/src/channels/github/api.ts +6 -1
- package/src/channels/github/binding.ts +21 -0
- package/src/channels/github/checks.ts +179 -0
- package/src/channels/github/cursor-account.ts +9 -6
- package/src/channels/github/index.ts +1 -0
- package/src/channels/github/types.ts +8 -0
- package/src/channels/slack/channel-watch.ts +6 -3
- package/src/channels/slack/dispatch.ts +40 -3
- package/src/channels/slack/manifest.ts +9 -10
- package/src/channels/slack/nudge-store.ts +56 -0
- package/src/channels/slack/slack-channel.ts +3 -0
- package/src/channels/slack/types.ts +24 -7
- package/src/connections.ts +17 -5
- package/src/index.ts +5 -0
- package/src/internal/advertise-tools.ts +278 -0
- package/src/internal/cli-deploy.ts +11 -1
- package/src/internal/cli-manifest.ts +63 -0
- package/src/internal/cli-slack.ts +10 -1
- package/src/internal/convert-automation/convert-workflow.ts +2 -11
- package/src/internal/cursor/account-mcp.ts +208 -73
- package/src/internal/cursor/backend-client.ts +45 -11
- package/src/internal/cursor-account-mcp-auth.ts +83 -0
- package/src/internal/cursor-agent-template.ts +46 -0
- package/src/internal/deploy-client.ts +25 -6
- package/src/internal/deploy-manifest.ts +161 -0
- package/src/internal/deployment-scm-event-stream.ts +593 -0
- package/src/internal/discovery.ts +132 -3
- package/src/internal/init-project.ts +18 -153
- package/src/internal/init-scaffold.ts +176 -0
- package/src/internal/inline-stdio-mcp.ts +13 -0
- package/src/internal/json-schema.ts +24 -3
- package/src/internal/mcp-endpoint.ts +6 -0
- package/src/internal/mcp-host.ts +70 -9
- package/src/internal/mcp-oauth.ts +55 -1
- package/src/internal/package-inline-stdio.ts +5 -1
- package/src/internal/review-comments.ts +245 -0
- package/src/internal/sanitize-mcp-tool-name.ts +33 -0
- package/src/internal/sdk-runner.ts +50 -11
- package/src/internal/server.ts +19 -0
- package/src/internal/session-engine.ts +392 -19
- package/src/internal/shallow-clone.ts +595 -0
- package/src/internal/slack-provision-client.ts +3 -0
- package/src/internal/terminal-style.ts +67 -1
- package/src/internal/turn-lease-store.ts +147 -0
- package/src/internal/workspace.ts +33 -0
- package/src/storage-protocol.ts +247 -0
- package/src/storage.ts +16 -110
- package/src/tools.ts +7 -0
- package/src/types.ts +149 -7
- package/templates/agentic-owners/agent/agent.ts +3 -0
- package/templates/demo/agent/agent.ts +3 -0
- package/templates/pr-autofixer/agent/lib/drive-schemas.ts +4 -1
- package/templates/security-reviewer/agent/agent.ts +3 -0
- package/templates/triage/agent/agent.ts +3 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.5ozYNf74.js +0 -1
- package/dist/docs/assets/reference_connections.md.CSQiNzre.lean.js +0 -1
- package/dist/docs/assets/troubleshooting.md.CuVztCKs.js +0 -1
- package/dist/playground/assets/index-B4rcOgeP.css +0 -1
- package/dist/playground/assets/index-DXcY42Jv.js +0 -85
- /package/dist/docs/assets/{concepts.md.CqOsxbMU.lean.js → concepts.md.BXAm6G-C.lean.js} +0 -0
- /package/dist/docs/assets/{guides_mcp-oauth.md.C7G7IykG.lean.js → guides_mcp-oauth.md.CzEB6RaG.lean.js} +0 -0
- /package/dist/docs/assets/{reference_sessions.md.DBVFi2Sx.lean.js → reference_sessions.md.B0DdlM-K.lean.js} +0 -0
- /package/dist/docs/assets/{troubleshooting.md.CuVztCKs.lean.js → troubleshooting.md.DQ-hYuZT.lean.js} +0 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
function l2(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 ef(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function u2(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var s=!1;try{s=this instanceof r}catch{}return s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var Cb={exports:{}},Vu={};var z1;function c2(){if(z1)return Vu;z1=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 Vu.Fragment=t,Vu.jsx=n,Vu.jsxs=n,Vu}var j1;function f2(){return j1||(j1=1,Cb.exports=c2()),Cb.exports}var g=f2(),Nb={exports:{}},Rt={};var L1;function d2(){if(L1)return Rt;L1=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"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),b=Symbol.iterator;function y($){return $===null||typeof $!="object"?null:($=b&&$[b]||$["@@iterator"],typeof $=="function"?$:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,E={};function T($,V,j){this.props=$,this.context=V,this.refs=E,this.updater=j||x}T.prototype.isReactComponent={},T.prototype.setState=function($,V){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,$,V,"setState")},T.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function R(){}R.prototype=T.prototype;function _($,V,j){this.props=$,this.context=V,this.refs=E,this.updater=j||x}var C=_.prototype=new R;C.constructor=_,S(C,T.prototype),C.isPureReactComponent=!0;var M=Array.isArray;function A(){}var N={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function z($,V,j){var X=j.ref;return{$$typeof:e,type:$,key:V,ref:X!==void 0?X:null,props:j}}function D($,V){return z($.type,V,$.props)}function H($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function W($){var V={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(j){return V[j]})}var F=/\/+/g;function L($,V){return typeof $=="object"&&$!==null&&$.key!=null?W(""+$.key):V.toString(36)}function U($){switch($.status){case"fulfilled":return $.value;case"rejected":throw $.reason;default:switch(typeof $.status=="string"?$.then(A,A):($.status="pending",$.then(function(V){$.status==="pending"&&($.status="fulfilled",$.value=V)},function(V){$.status==="pending"&&($.status="rejected",$.reason=V)})),$.status){case"fulfilled":return $.value;case"rejected":throw $.reason}}throw $}function q($,V,j,X,se){var re=typeof $;(re==="undefined"||re==="boolean")&&($=null);var oe=!1;if($===null)oe=!0;else switch(re){case"bigint":case"string":case"number":oe=!0;break;case"object":switch($.$$typeof){case e:case t:oe=!0;break;case h:return oe=$._init,q(oe($._payload),V,j,X,se)}}if(oe)return se=se($),oe=X===""?"."+L($,0):X,M(se)?(j="",oe!=null&&(j=oe.replace(F,"$&/")+"/"),q(se,V,j,"",function(ge){return ge})):se!=null&&(H(se)&&(se=D(se,j+(se.key==null||$&&$.key===se.key?"":(""+se.key).replace(F,"$&/")+"/")+oe)),V.push(se)),1;oe=0;var ue=X===""?".":X+":";if(M($))for(var ce=0;ce<$.length;ce++)X=$[ce],re=ue+L(X,ce),oe+=q(X,V,j,re,se);else if(ce=y($),typeof ce=="function")for($=ce.call($),ce=0;!(X=$.next()).done;)X=X.value,re=ue+L(X,ce++),oe+=q(X,V,j,re,se);else if(re==="object"){if(typeof $.then=="function")return q(U($),V,j,X,se);throw V=String($),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return oe}function Z($,V,j){if($==null)return $;var X=[],se=0;return q($,X,"","",function(re){return V.call(j,re,se++)}),X}function B($){if($._status===-1){var V=$._result;V=V(),V.then(function(j){($._status===0||$._status===-1)&&($._status=1,$._result=j)},function(j){($._status===0||$._status===-1)&&($._status=2,$._result=j)}),$._status===-1&&($._status=0,$._result=V)}if($._status===1)return $._result.default;throw $._result}var K=typeof reportError=="function"?reportError:function($){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof $=="object"&&$!==null&&typeof $.message=="string"?String($.message):String($),error:$});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",$);return}console.error($)},O={map:Z,forEach:function($,V,j){Z($,function(){V.apply(this,arguments)},j)},count:function($){var V=0;return Z($,function(){V++}),V},toArray:function($){return Z($,function(V){return V})||[]},only:function($){if(!H($))throw Error("React.Children.only expected to receive a single React element child.");return $}};return Rt.Activity=m,Rt.Children=O,Rt.Component=T,Rt.Fragment=n,Rt.Profiler=s,Rt.PureComponent=_,Rt.StrictMode=r,Rt.Suspense=d,Rt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,Rt.__COMPILER_RUNTIME={__proto__:null,c:function($){return N.H.useMemoCache($)}},Rt.cache=function($){return function(){return $.apply(null,arguments)}},Rt.cacheSignal=function(){return null},Rt.cloneElement=function($,V,j){if($==null)throw Error("The argument must be a React element, but you passed "+$+".");var X=S({},$.props),se=$.key;if(V!=null)for(re in V.key!==void 0&&(se=""+V.key),V)!P.call(V,re)||re==="key"||re==="__self"||re==="__source"||re==="ref"&&V.ref===void 0||(X[re]=V[re]);var re=arguments.length-2;if(re===1)X.children=j;else if(1<re){for(var oe=Array(re),ue=0;ue<re;ue++)oe[ue]=arguments[ue+2];X.children=oe}return z($.type,se,X)},Rt.createContext=function($){return $={$$typeof:l,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null},$.Provider=$,$.Consumer={$$typeof:a,_context:$},$},Rt.createElement=function($,V,j){var X,se={},re=null;if(V!=null)for(X in V.key!==void 0&&(re=""+V.key),V)P.call(V,X)&&X!=="key"&&X!=="__self"&&X!=="__source"&&(se[X]=V[X]);var oe=arguments.length-2;if(oe===1)se.children=j;else if(1<oe){for(var ue=Array(oe),ce=0;ce<oe;ce++)ue[ce]=arguments[ce+2];se.children=ue}if($&&$.defaultProps)for(X in oe=$.defaultProps,oe)se[X]===void 0&&(se[X]=oe[X]);return z($,re,se)},Rt.createRef=function(){return{current:null}},Rt.forwardRef=function($){return{$$typeof:c,render:$}},Rt.isValidElement=H,Rt.lazy=function($){return{$$typeof:h,_payload:{_status:-1,_result:$},_init:B}},Rt.memo=function($,V){return{$$typeof:f,type:$,compare:V===void 0?null:V}},Rt.startTransition=function($){var V=N.T,j={};N.T=j;try{var X=$(),se=N.S;se!==null&&se(j,X),typeof X=="object"&&X!==null&&typeof X.then=="function"&&X.then(A,K)}catch(re){K(re)}finally{V!==null&&j.types!==null&&(V.types=j.types),N.T=V}},Rt.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},Rt.use=function($){return N.H.use($)},Rt.useActionState=function($,V,j){return N.H.useActionState($,V,j)},Rt.useCallback=function($,V){return N.H.useCallback($,V)},Rt.useContext=function($){return N.H.useContext($)},Rt.useDebugValue=function(){},Rt.useDeferredValue=function($,V){return N.H.useDeferredValue($,V)},Rt.useEffect=function($,V){return N.H.useEffect($,V)},Rt.useEffectEvent=function($){return N.H.useEffectEvent($)},Rt.useId=function(){return N.H.useId()},Rt.useImperativeHandle=function($,V,j){return N.H.useImperativeHandle($,V,j)},Rt.useInsertionEffect=function($,V){return N.H.useInsertionEffect($,V)},Rt.useLayoutEffect=function($,V){return N.H.useLayoutEffect($,V)},Rt.useMemo=function($,V){return N.H.useMemo($,V)},Rt.useOptimistic=function($,V){return N.H.useOptimistic($,V)},Rt.useReducer=function($,V,j){return N.H.useReducer($,V,j)},Rt.useRef=function($){return N.H.useRef($)},Rt.useState=function($){return N.H.useState($)},Rt.useSyncExternalStore=function($,V,j){return N.H.useSyncExternalStore($,V,j)},Rt.useTransition=function(){return N.H.useTransition()},Rt.version="19.2.6",Rt}var P1;function tf(){return P1||(P1=1,Nb.exports=d2()),Nb.exports}var v=tf();const fc=ef(v),tk=l2({__proto__:null,default:fc},[v]);var Ab={exports:{}},Wu={},Ob={exports:{}},Ib={};var $1;function p2(){return $1||($1=1,(function(e){function t(q,Z){var B=q.length;q.push(Z);e:for(;0<B;){var K=B-1>>>1,O=q[K];if(0<s(O,Z))q[K]=Z,q[B]=O,B=K;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var Z=q[0],B=q.pop();if(B!==Z){q[0]=B;e:for(var K=0,O=q.length,$=O>>>1;K<$;){var V=2*(K+1)-1,j=q[V],X=V+1,se=q[X];if(0>s(j,B))X<O&&0>s(se,j)?(q[K]=se,q[X]=B,K=X):(q[K]=j,q[V]=B,K=V);else if(X<O&&0>s(se,B))q[K]=se,q[X]=B,K=X;else break e}}return Z}function s(q,Z){var B=q.sortIndex-Z.sortIndex;return B!==0?B:q.id-Z.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 d=[],f=[],h=1,m=null,b=3,y=!1,x=!1,S=!1,E=!1,T=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function C(q){for(var Z=n(f);Z!==null;){if(Z.callback===null)r(f);else if(Z.startTime<=q)r(f),Z.sortIndex=Z.expirationTime,t(d,Z);else break;Z=n(f)}}function M(q){if(S=!1,C(q),!x)if(n(d)!==null)x=!0,A||(A=!0,W());else{var Z=n(f);Z!==null&&U(M,Z.startTime-q)}}var A=!1,N=-1,P=5,z=-1;function D(){return E?!0:!(e.unstable_now()-z<P)}function H(){if(E=!1,A){var q=e.unstable_now();z=q;var Z=!0;try{e:{x=!1,S&&(S=!1,R(N),N=-1),y=!0;var B=b;try{t:{for(C(q),m=n(d);m!==null&&!(m.expirationTime>q&&D());){var K=m.callback;if(typeof K=="function"){m.callback=null,b=m.priorityLevel;var O=K(m.expirationTime<=q);if(q=e.unstable_now(),typeof O=="function"){m.callback=O,C(q),Z=!0;break t}m===n(d)&&r(d),C(q)}else r(d);m=n(d)}if(m!==null)Z=!0;else{var $=n(f);$!==null&&U(M,$.startTime-q),Z=!1}}break e}finally{m=null,b=B,y=!1}Z=void 0}}finally{Z?W():A=!1}}}var W;if(typeof _=="function")W=function(){_(H)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,L=F.port2;F.port1.onmessage=H,W=function(){L.postMessage(null)}}else W=function(){T(H,0)};function U(q,Z){N=T(function(){q(e.unstable_now())},Z)}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(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(q){switch(b){case 1:case 2:case 3:var Z=3;break;default:Z=b}var B=b;b=Z;try{return q()}finally{b=B}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(q,Z){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var B=b;b=q;try{return Z()}finally{b=B}},e.unstable_scheduleCallback=function(q,Z,B){var K=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?K+B:K):B=K,q){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=B+O,q={id:h++,callback:Z,priorityLevel:q,startTime:B,expirationTime:O,sortIndex:-1},B>K?(q.sortIndex=B,t(f,q),n(d)===null&&q===n(f)&&(S?(R(N),N=-1):S=!0,U(M,B-K))):(q.sortIndex=O,t(d,q),x||y||(x=!0,A||(A=!0,W()))),q},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(q){var Z=b;return function(){var B=b;b=Z;try{return q.apply(this,arguments)}finally{b=B}}}})(Ib)),Ib}var B1;function h2(){return B1||(B1=1,Ob.exports=p2()),Ob.exports}var Mb={exports:{}},dr={};var F1;function m2(){if(F1)return dr;F1=1;var e=tf();function t(d){var f="https://react.dev/errors/"+d;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 #"+d+"; 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(d,f,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:m==null?null:""+m,children:d,containerInfo:f,implementation:h}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return dr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,dr.createPortal=function(d,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(d,f,null,h)},dr.flushSync=function(d){var f=l.T,h=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=h,r.d.f()}},dr.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},dr.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},dr.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var h=f.as,m=c(h,f.crossOrigin),b=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:m,integrity:b,fetchPriority:y}):h==="script"&&r.d.X(d,{crossOrigin:m,integrity:b,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},dr.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=c(f.as,f.crossOrigin);r.d.M(d,{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(d)},dr.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,m=c(h,f.crossOrigin);r.d.L(d,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})}},dr.preloadModule=function(d,f){if(typeof d=="string")if(f){var h=c(f.as,f.crossOrigin);r.d.m(d,{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(d)},dr.requestFormReset=function(d){r.d.r(d)},dr.unstable_batchedUpdates=function(d,f){return d(f)},dr.useFormState=function(d,f,h){return l.H.useFormState(d,f,h)},dr.useFormStatus=function(){return l.H.useHostTransitionStatus()},dr.version="19.2.6",dr}var U1;function AC(){if(U1)return Mb.exports;U1=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(),Mb.exports=m2(),Mb.exports}var q1;function g2(){if(q1)return Wu;q1=1;var e=h2(),t=tf(),n=AC();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 d(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,p=o;;){var k=u.return;if(k===null)break;var w=k.alternate;if(w===null){if(p=k.return,p!==null){u=p;continue}break}if(k.child===w.child){for(w=k.child;w;){if(w===u)return d(k),i;if(w===p)return d(k),o;w=w.sibling}throw Error(r(188))}if(u.return!==p.return)u=k,p=w;else{for(var I=!1,G=k.child;G;){if(G===u){I=!0,u=k,p=w;break}if(G===p){I=!0,p=k,u=w;break}G=G.sibling}if(!I){for(G=w.child;G;){if(G===u){I=!0,u=w,p=k;break}if(G===p){I=!0,p=w,u=k;break}G=G.sibling}if(!I)throw Error(r(189))}}if(u.alternate!==p)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,b=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),_=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function W(i){return i===null||typeof i!="object"?null:(i=H&&i[H]||i["@@iterator"],typeof i=="function"?i:null)}var F=Symbol.for("react.client.reference");function L(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===F?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case S:return"Fragment";case T:return"Profiler";case E:return"StrictMode";case M:return"Suspense";case A:return"SuspenseList";case z:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case x:return"Portal";case _: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 N:return o=i.displayName||null,o!==null?o:L(i.type)||"Memo";case P:o=i._payload,i=i._init;try{return L(i(o))}catch{}}return null}var U=Array.isArray,q=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},K=[],O=-1;function $(i){return{current:i}}function V(i){0>O||(i.current=K[O],K[O]=null,O--)}function j(i,o){O++,K[O]=i.current,i.current=o}var X=$(null),se=$(null),re=$(null),oe=$(null);function ue(i,o){switch(j(re,o),j(se,i),j(X,null),o.nodeType){case 9:case 11:i=(i=o.documentElement)&&(i=i.namespaceURI)?i1(i):0;break;default:if(i=o.tagName,o=o.namespaceURI)o=i1(o),i=s1(o,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}V(X),j(X,i)}function ce(){V(X),V(se),V(re)}function ge(i){i.memoizedState!==null&&j(oe,i);var o=X.current,u=s1(o,i.type);o!==u&&(j(se,i),j(X,u))}function Ce(i){se.current===i&&(V(X),V(se)),oe.current===i&&(V(oe),Uu._currentValue=B)}var ae,ye;function we(i){if(ae===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);ae=o&&o[1]||"",ye=-1<u.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+ae+i+ye}var Ae=!1;function Ee(i,o){if(!i||Ae)return"";Ae=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(o){var Oe=function(){throw Error()};if(Object.defineProperty(Oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Oe,[])}catch(ve){var me=ve}Reflect.construct(i,[],Oe)}else{try{Oe.call()}catch(ve){me=ve}i.call(Oe.prototype)}}else{try{throw Error()}catch(ve){me=ve}(Oe=i())&&typeof Oe.catch=="function"&&Oe.catch(function(){})}}catch(ve){if(ve&&me&&typeof ve.stack=="string")return[ve.stack,me.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var k=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");k&&k.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=p.DetermineComponentFrameRoot(),I=w[0],G=w[1];if(I&&G){var Q=I.split(`
|
|
4
|
+
`),pe=G.split(`
|
|
5
|
+
`);for(k=p=0;p<Q.length&&!Q[p].includes("DetermineComponentFrameRoot");)p++;for(;k<pe.length&&!pe[k].includes("DetermineComponentFrameRoot");)k++;if(p===Q.length||k===pe.length)for(p=Q.length-1,k=pe.length-1;1<=p&&0<=k&&Q[p]!==pe[k];)k--;for(;1<=p&&0<=k;p--,k--)if(Q[p]!==pe[k]){if(p!==1||k!==1)do if(p--,k--,0>k||Q[p]!==pe[k]){var Re=`
|
|
6
|
+
`+Q[p].replace(" at new "," at ");return i.displayName&&Re.includes("<anonymous>")&&(Re=Re.replace("<anonymous>",i.displayName)),Re}while(1<=p&&0<=k);break}}}finally{Ae=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?we(u):""}function xe(i,o){switch(i.tag){case 26:case 27:case 5:return we(i.type);case 16:return we("Lazy");case 13:return i.child!==o&&o!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return Ee(i.type,!1);case 11:return Ee(i.type.render,!1);case 1:return Ee(i.type,!0);case 31:return we("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(p){return`
|
|
7
|
+
Error generating stack: `+p.message+`
|
|
8
|
+
`+p.stack}}var Ie=Object.prototype.hasOwnProperty,je=e.unstable_scheduleCallback,Ue=e.unstable_cancelCallback,ke=e.unstable_shouldYield,Te=e.unstable_requestPaint,te=e.unstable_now,fe=e.unstable_getCurrentPriorityLevel,J=e.unstable_ImmediatePriority,ne=e.unstable_UserBlockingPriority,be=e.unstable_NormalPriority,Ge=e.unstable_LowPriority,Ze=e.unstable_IdlePriority,Xe=e.log,vt=e.unstable_setDisableYieldValue,Je=null,mt=null;function Tt(i){if(typeof Xe=="function"&&vt(i),mt&&typeof mt.setStrictMode=="function")try{mt.setStrictMode(Je,i)}catch{}}var st=Math.clz32?Math.clz32:ot,_t=Math.log,Ot=Math.LN2;function ot(i){return i>>>=0,i===0?32:31-(_t(i)/Ot|0)|0}var St=256,Pt=262144,jt=4194304;function Dt(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 Y(i,o,u){var p=i.pendingLanes;if(p===0)return 0;var k=0,w=i.suspendedLanes,I=i.pingedLanes;i=i.warmLanes;var G=p&134217727;return G!==0?(p=G&~w,p!==0?k=Dt(p):(I&=G,I!==0?k=Dt(I):u||(u=G&~i,u!==0&&(k=Dt(u))))):(G=p&~w,G!==0?k=Dt(G):I!==0?k=Dt(I):u||(u=p&~i,u!==0&&(k=Dt(u)))),k===0?0:o!==0&&o!==k&&(o&w)===0&&(w=k&-k,u=o&-o,w>=u||w===32&&(u&4194048)!==0)?o:k}function he(i,o){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&o)===0}function Le(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 Qe(){var i=jt;return jt<<=1,(jt&62914560)===0&&(jt=4194304),i}function wt(i){for(var o=[],u=0;31>u;u++)o.push(i);return o}function lt(i,o){i.pendingLanes|=o,o!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function qe(i,o,u,p,k,w){var I=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 G=i.entanglements,Q=i.expirationTimes,pe=i.hiddenUpdates;for(u=I&~u;0<u;){var Re=31-st(u),Oe=1<<Re;G[Re]=0,Q[Re]=-1;var me=pe[Re];if(me!==null)for(pe[Re]=null,Re=0;Re<me.length;Re++){var ve=me[Re];ve!==null&&(ve.lane&=-536870913)}u&=~Oe}p!==0&&_e(i,p,0),w!==0&&k===0&&i.tag!==0&&(i.suspendedLanes|=w&~(I&~o))}function _e(i,o,u){i.pendingLanes|=o,i.suspendedLanes&=~o;var p=31-st(o);i.entangledLanes|=o,i.entanglements[p]=i.entanglements[p]|1073741824|u&261930}function Se(i,o){var u=i.entangledLanes|=o;for(i=i.entanglements;u;){var p=31-st(u),k=1<<p;k&o|i[p]&o&&(i[p]|=o),u&=~k}}function Ye(i,o){var u=o&-o;return u=(u&42)!==0?1:Me(u),(u&(i.suspendedLanes|o))!==0?0:u}function Me(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 Pe(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function $e(){var i=Z.p;return i!==0?i:(i=window.event,i===void 0?32:C1(i.type))}function kt(i,o){var u=Z.p;try{return Z.p=i,o()}finally{Z.p=u}}var Ht=Math.random().toString(36).slice(2),bt="__reactFiber$"+Ht,Yt="__reactProps$"+Ht,zn="__reactContainer$"+Ht,Wr="__reactEvents$"+Ht,An="__reactListeners$"+Ht,Nr="__reactHandles$"+Ht,Ca="__reactResources$"+Ht,ns="__reactMarker$"+Ht;function eu(i){delete i[bt],delete i[Yt],delete i[Wr],delete i[An],delete i[Nr]}function Sr(i){var o=i[bt];if(o)return o;for(var u=i.parentNode;u;){if(o=u[zn]||u[bt]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(i=d1(i);i!==null;){if(u=i[bt])return u;i=d1(i)}return o}i=u,u=i.parentNode}return null}function rs(i){if(i=i[bt]||i[zn]){var o=i.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return i}return null}function js(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i.stateNode;throw Error(r(33))}function Ls(i){var o=i[Ca];return o||(o=i[Ca]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function qn(i){i[ns]=!0}var _f=new Set,Ao={};function is(i,o){Be(i,o),Be(i+"Capture",o)}function Be(i,o){for(Ao[i]=o,i=0;i<o.length;i++)_f.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]*$"),$t={},sn={};function Pn(i){return Ie.call(sn,i)?!0:Ie.call($t,i)?!1:at.test(i)?sn[i]=!0:($t[i]=!0,!1)}function fr(i,o,u){if(Pn(o))if(u===null)i.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":i.removeAttribute(o);return;case"boolean":var p=o.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){i.removeAttribute(o);return}}i.setAttribute(o,""+u)}}function Kr(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 Ar(i,o,u,p){if(p===null)i.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttributeNS(o,u,""+p)}}function vn(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Zr(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function Rf(i,o,u){var p=Object.getOwnPropertyDescriptor(i.constructor.prototype,o);if(!i.hasOwnProperty(o)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var k=p.get,w=p.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return k.call(this)},set:function(I){u=""+I,w.call(this,I)}}),Object.defineProperty(i,o,{enumerable:p.enumerable}),{getValue:function(){return u},setValue:function(I){u=""+I},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Na(i){if(!i._valueTracker){var o=Zr(i)?"checked":"value";i._valueTracker=Rf(i,o,""+i[o])}}function tu(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var u=o.getValue(),p="";return i&&(p=Zr(i)?i.checked?"true":"false":i.value),i=p,i!==u?(o.setValue(i),!0):!1}function Aa(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 Rm=/[\n"\\]/g;function Or(i){return i.replace(Rm,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function nu(i,o,u,p,k,w,I,G){i.name="",I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?i.type=I:i.removeAttribute("type"),o!=null?I==="number"?(o===0&&i.value===""||i.value!=o)&&(i.value=""+vn(o)):i.value!==""+vn(o)&&(i.value=""+vn(o)):I!=="submit"&&I!=="reset"||i.removeAttribute("value"),o!=null?Oa(i,I,vn(o)):u!=null?Oa(i,I,vn(u)):p!=null&&i.removeAttribute("value"),k==null&&w!=null&&(i.defaultChecked=!!w),k!=null&&(i.checked=k&&typeof k!="function"&&typeof k!="symbol"),G!=null&&typeof G!="function"&&typeof G!="symbol"&&typeof G!="boolean"?i.name=""+vn(G):i.removeAttribute("name")}function Oo(i,o,u,p,k,w,I,G){if(w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(i.type=w),o!=null||u!=null){if(!(w!=="submit"&&w!=="reset"||o!=null)){Na(i);return}u=u!=null?""+vn(u):"",o=o!=null?""+vn(o):u,G||o===i.value||(i.value=o),i.defaultValue=o}p=p??k,p=typeof p!="function"&&typeof p!="symbol"&&!!p,i.checked=G?i.checked:!!p,i.defaultChecked=!!p,I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(i.name=I),Na(i)}function Oa(i,o,u){o==="number"&&Aa(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function ir(i,o,u,p){if(i=i.options,o){o={};for(var k=0;k<u.length;k++)o["$"+u[k]]=!0;for(u=0;u<i.length;u++)k=o.hasOwnProperty("$"+i[u].value),i[u].selected!==k&&(i[u].selected=k),k&&p&&(i[u].defaultSelected=!0)}else{for(u=""+vn(u),o=null,k=0;k<i.length;k++){if(i[k].value===u){i[k].selected=!0,p&&(i[k].defaultSelected=!0);return}o!==null||i[k].disabled||(o=i[k])}o!==null&&(o.selected=!0)}}function Cf(i,o,u){if(o!=null&&(o=""+vn(o),o!==i.value&&(i.value=o),u==null)){i.defaultValue!==o&&(i.defaultValue=o);return}i.defaultValue=u!=null?""+vn(u):""}function Ia(i,o,u,p){if(o==null){if(p!=null){if(u!=null)throw Error(r(92));if(U(p)){if(1<p.length)throw Error(r(93));p=p[0]}u=p}u==null&&(u=""),o=u}u=vn(o),i.defaultValue=u,p=i.textContent,p===u&&p!==""&&p!==null&&(i.value=p),Na(i)}function yt(i,o){if(o){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=o;return}}i.textContent=o}var Nf=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 Hn(i,o,u){var p=o.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?p?i.setProperty(o,""):o==="float"?i.cssFloat="":i[o]="":p?i.setProperty(o,u):typeof u!="number"||u===0||Nf.has(o)?o==="float"?i.cssFloat=u:i[o]=(""+u).trim():i[o]=u+"px"}function on(i,o,u){if(o!=null&&typeof o!="object")throw Error(r(62));if(i=i.style,u!=null){for(var p in u)!u.hasOwnProperty(p)||o!=null&&o.hasOwnProperty(p)||(p.indexOf("--")===0?i.setProperty(p,""):p==="float"?i.cssFloat="":i[p]="");for(var k in o)p=o[k],o.hasOwnProperty(k)&&u[k]!==p&&Hn(i,k,p)}else for(var w in o)o.hasOwnProperty(w)&&Hn(i,w,o[w])}function Ps(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 ss=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"]]),ru=/^[\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 $s(i){return ru.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Ve(){}var rt=null;function Nt(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Gt=null,On=null;function ai(i){var o=rs(i);if(o&&(i=o.stateNode)){var u=i[Yt]||null;e:switch(i=o.stateNode,o.type){case"input":if(nu(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="'+Or(""+o)+'"][type="radio"]'),o=0;o<u.length;o++){var p=u[o];if(p!==i&&p.form===i.form){var k=p[Yt]||null;if(!k)throw Error(r(90));nu(p,k.value,k.defaultValue,k.defaultValue,k.checked,k.defaultChecked,k.type,k.name)}}for(o=0;o<u.length;o++)p=u[o],p.form===i.form&&tu(p)}break e;case"textarea":Cf(i,u.value,u.defaultValue);break e;case"select":o=u.value,o!=null&&ir(i,!!u.multiple,o,!1)}}}var iu=!1;function Af(i,o,u){if(iu)return i(o,u);iu=!0;try{var p=i(o);return p}finally{if(iu=!1,(Gt!==null||On!==null)&&(bd(),Gt&&(o=Gt,i=On,On=Gt=null,ai(o),i)))for(o=0;o<i.length;o++)ai(i[o])}}function su(i,o){var u=i.stateNode;if(u===null)return null;var p=u[Yt]||null;if(p===null)return null;u=p[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":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(r(231,o,typeof u));return u}var os=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cm=!1;if(os)try{var ou={};Object.defineProperty(ou,"passive",{get:function(){Cm=!0}}),window.addEventListener("test",ou,ou),window.removeEventListener("test",ou,ou)}catch{Cm=!1}var Bs=null,Nm=null,Of=null;function s0(){if(Of)return Of;var i,o=Nm,u=o.length,p,k="value"in Bs?Bs.value:Bs.textContent,w=k.length;for(i=0;i<u&&o[i]===k[i];i++);var I=u-i;for(p=1;p<=I&&o[u-p]===k[w-p];p++);return Of=k.slice(i,1<p?1-p:void 0)}function If(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 Mf(){return!0}function o0(){return!1}function Ir(i){function o(u,p,k,w,I){this._reactName=u,this._targetInst=k,this.type=p,this.nativeEvent=w,this.target=I,this.currentTarget=null;for(var G in i)i.hasOwnProperty(G)&&(u=i[G],this[G]=u?u(w):w[G]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?Mf:o0,this.isPropagationStopped=o0,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=Mf)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Mf)},persist:function(){},isPersistent:Mf}),o}var Io={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Df=Ir(Io),au=m({},Io,{view:0,detail:0}),oj=Ir(au),Am,Om,lu,zf=m({},au,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mm,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!==lu&&(lu&&i.type==="mousemove"?(Am=i.screenX-lu.screenX,Om=i.screenY-lu.screenY):Om=Am=0,lu=i),Am)},movementY:function(i){return"movementY"in i?i.movementY:Om}}),a0=Ir(zf),aj=m({},zf,{dataTransfer:0}),lj=Ir(aj),uj=m({},au,{relatedTarget:0}),Im=Ir(uj),cj=m({},Io,{animationName:0,elapsedTime:0,pseudoElement:0}),fj=Ir(cj),dj=m({},Io,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),pj=Ir(dj),hj=m({},Io,{data:0}),l0=Ir(hj),mj={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gj={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"},bj={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yj(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=bj[i])?!!o[i]:!1}function Mm(){return yj}var vj=m({},au,{key:function(i){if(i.key){var o=mj[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=If(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?gj[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mm,charCode:function(i){return i.type==="keypress"?If(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?If(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),kj=Ir(vj),xj=m({},zf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),u0=Ir(xj),Sj=m({},au,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mm}),wj=Ir(Sj),Ej=m({},Io,{propertyName:0,elapsedTime:0,pseudoElement:0}),Tj=Ir(Ej),_j=m({},zf,{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}),Rj=Ir(_j),Cj=m({},Io,{newState:0,oldState:0}),Nj=Ir(Cj),Aj=[9,13,27,32],Dm=os&&"CompositionEvent"in window,uu=null;os&&"documentMode"in document&&(uu=document.documentMode);var Oj=os&&"TextEvent"in window&&!uu,c0=os&&(!Dm||uu&&8<uu&&11>=uu),f0=" ",d0=!1;function p0(i,o){switch(i){case"keyup":return Aj.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function h0(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ma=!1;function Ij(i,o){switch(i){case"compositionend":return h0(o);case"keypress":return o.which!==32?null:(d0=!0,f0);case"textInput":return i=o.data,i===f0&&d0?null:i;default:return null}}function Mj(i,o){if(Ma)return i==="compositionend"||!Dm&&p0(i,o)?(i=s0(),Of=Nm=Bs=null,Ma=!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 c0&&o.locale!=="ko"?null:o.data;default:return null}}var Dj={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 m0(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!Dj[i.type]:o==="textarea"}function g0(i,o,u,p){Gt?On?On.push(p):On=[p]:Gt=p,o=Ed(o,"onChange"),0<o.length&&(u=new Df("onChange","change",null,u,p),i.push({event:u,listeners:o}))}var cu=null,fu=null;function zj(i){Qw(i,0)}function jf(i){var o=js(i);if(tu(o))return i}function b0(i,o){if(i==="change")return o}var y0=!1;if(os){var zm;if(os){var jm="oninput"in document;if(!jm){var v0=document.createElement("div");v0.setAttribute("oninput","return;"),jm=typeof v0.oninput=="function"}zm=jm}else zm=!1;y0=zm&&(!document.documentMode||9<document.documentMode)}function k0(){cu&&(cu.detachEvent("onpropertychange",x0),fu=cu=null)}function x0(i){if(i.propertyName==="value"&&jf(fu)){var o=[];g0(o,fu,i,Nt(i)),Af(zj,o)}}function jj(i,o,u){i==="focusin"?(k0(),cu=o,fu=u,cu.attachEvent("onpropertychange",x0)):i==="focusout"&&k0()}function Lj(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return jf(fu)}function Pj(i,o){if(i==="click")return jf(o)}function $j(i,o){if(i==="input"||i==="change")return jf(o)}function Bj(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Yr=typeof Object.is=="function"?Object.is:Bj;function du(i,o){if(Yr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var u=Object.keys(i),p=Object.keys(o);if(u.length!==p.length)return!1;for(p=0;p<u.length;p++){var k=u[p];if(!Ie.call(o,k)||!Yr(i[k],o[k]))return!1}return!0}function S0(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function w0(i,o){var u=S0(i);i=0;for(var p;u;){if(u.nodeType===3){if(p=i+u.textContent.length,i<=o&&p>=o)return{node:u,offset:o-i};i=p}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=S0(u)}}function E0(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?E0(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function T0(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=Aa(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=Aa(i.document)}return o}function Lm(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 Fj=os&&"documentMode"in document&&11>=document.documentMode,Da=null,Pm=null,pu=null,$m=!1;function _0(i,o,u){var p=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;$m||Da==null||Da!==Aa(p)||(p=Da,"selectionStart"in p&&Lm(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),pu&&du(pu,p)||(pu=p,p=Ed(Pm,"onSelect"),0<p.length&&(o=new Df("onSelect","select",null,o,u),i.push({event:o,listeners:p}),o.target=Da)))}function Mo(i,o){var u={};return u[i.toLowerCase()]=o.toLowerCase(),u["Webkit"+i]="webkit"+o,u["Moz"+i]="moz"+o,u}var za={animationend:Mo("Animation","AnimationEnd"),animationiteration:Mo("Animation","AnimationIteration"),animationstart:Mo("Animation","AnimationStart"),transitionrun:Mo("Transition","TransitionRun"),transitionstart:Mo("Transition","TransitionStart"),transitioncancel:Mo("Transition","TransitionCancel"),transitionend:Mo("Transition","TransitionEnd")},Bm={},R0={};os&&(R0=document.createElement("div").style,"AnimationEvent"in window||(delete za.animationend.animation,delete za.animationiteration.animation,delete za.animationstart.animation),"TransitionEvent"in window||delete za.transitionend.transition);function Do(i){if(Bm[i])return Bm[i];if(!za[i])return i;var o=za[i],u;for(u in o)if(o.hasOwnProperty(u)&&u in R0)return Bm[i]=o[u];return i}var C0=Do("animationend"),N0=Do("animationiteration"),A0=Do("animationstart"),Uj=Do("transitionrun"),qj=Do("transitionstart"),Hj=Do("transitioncancel"),O0=Do("transitionend"),I0=new Map,Fm="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(" ");Fm.push("scrollEnd");function _i(i,o){I0.set(i,o),is(o,[i])}var Lf=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)},li=[],ja=0,Um=0;function Pf(){for(var i=ja,o=Um=ja=0;o<i;){var u=li[o];li[o++]=null;var p=li[o];li[o++]=null;var k=li[o];li[o++]=null;var w=li[o];if(li[o++]=null,p!==null&&k!==null){var I=p.pending;I===null?k.next=k:(k.next=I.next,I.next=k),p.pending=k}w!==0&&M0(u,k,w)}}function $f(i,o,u,p){li[ja++]=i,li[ja++]=o,li[ja++]=u,li[ja++]=p,Um|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function qm(i,o,u,p){return $f(i,o,u,p),Bf(i)}function zo(i,o){return $f(i,null,null,o),Bf(i)}function M0(i,o,u){i.lanes|=u;var p=i.alternate;p!==null&&(p.lanes|=u);for(var k=!1,w=i.return;w!==null;)w.childLanes|=u,p=w.alternate,p!==null&&(p.childLanes|=u),w.tag===22&&(i=w.stateNode,i===null||i._visibility&1||(k=!0)),i=w,w=w.return;return i.tag===3?(w=i.stateNode,k&&o!==null&&(k=31-st(u),i=w.hiddenUpdates,p=i[k],p===null?i[k]=[o]:p.push(o),o.lane=u|536870912),w):null}function Bf(i){if(50<zu)throw zu=0,Qg=null,Error(r(185));for(var o=i.return;o!==null;)i=o,o=i.return;return i.tag===3?i.stateNode:null}var La={};function Gj(i,o,u,p){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=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xr(i,o,u,p){return new Gj(i,o,u,p)}function Hm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function as(i,o){var u=i.alternate;return u===null?(u=Xr(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 D0(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 Ff(i,o,u,p,k,w){var I=0;if(p=i,typeof i=="function")Hm(i)&&(I=1);else if(typeof i=="string")I=YL(i,u,X.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case z:return i=Xr(31,u,o,k),i.elementType=z,i.lanes=w,i;case S:return jo(u.children,k,w,o);case E:I=8,k|=24;break;case T:return i=Xr(12,u,o,k|2),i.elementType=T,i.lanes=w,i;case M:return i=Xr(13,u,o,k),i.elementType=M,i.lanes=w,i;case A:return i=Xr(19,u,o,k),i.elementType=A,i.lanes=w,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case _:I=10;break e;case R:I=9;break e;case C:I=11;break e;case N:I=14;break e;case P:I=16,p=null;break e}I=29,u=Error(r(130,i===null?"null":typeof i,"")),p=null}return o=Xr(I,u,o,k),o.elementType=i,o.type=p,o.lanes=w,o}function jo(i,o,u,p){return i=Xr(7,i,p,o),i.lanes=u,i}function Gm(i,o,u){return i=Xr(6,i,null,o),i.lanes=u,i}function z0(i){var o=Xr(18,null,null,0);return o.stateNode=i,o}function Vm(i,o,u){return o=Xr(4,i.children!==null?i.children:[],i.key,o),o.lanes=u,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}var j0=new WeakMap;function ui(i,o){if(typeof i=="object"&&i!==null){var u=j0.get(i);return u!==void 0?u:(o={value:i,source:o,stack:De(o)},j0.set(i,o),o)}return{value:i,source:o,stack:De(o)}}var Pa=[],$a=0,Uf=null,hu=0,ci=[],fi=0,Fs=null,ji=1,Li="";function ls(i,o){Pa[$a++]=hu,Pa[$a++]=Uf,Uf=i,hu=o}function L0(i,o,u){ci[fi++]=ji,ci[fi++]=Li,ci[fi++]=Fs,Fs=i;var p=ji;i=Li;var k=32-st(p)-1;p&=~(1<<k),u+=1;var w=32-st(o)+k;if(30<w){var I=k-k%5;w=(p&(1<<I)-1).toString(32),p>>=I,k-=I,ji=1<<32-st(o)+k|u<<k|p,Li=w+i}else ji=1<<w|u<<k|p,Li=i}function Wm(i){i.return!==null&&(ls(i,1),L0(i,1,0))}function Km(i){for(;i===Uf;)Uf=Pa[--$a],Pa[$a]=null,hu=Pa[--$a],Pa[$a]=null;for(;i===Fs;)Fs=ci[--fi],ci[fi]=null,Li=ci[--fi],ci[fi]=null,ji=ci[--fi],ci[fi]=null}function P0(i,o){ci[fi++]=ji,ci[fi++]=Li,ci[fi++]=Fs,ji=o.id,Li=o.overflow,Fs=i}var sr=null,En=null,Zt=!1,Us=null,di=!1,Zm=Error(r(519));function qs(i){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw mu(ui(o,i)),Zm}function $0(i){var o=i.stateNode,u=i.type,p=i.memoizedProps;switch(o[bt]=i,o[Yt]=p,u){case"dialog":Ut("cancel",o),Ut("close",o);break;case"iframe":case"object":case"embed":Ut("load",o);break;case"video":case"audio":for(u=0;u<Lu.length;u++)Ut(Lu[u],o);break;case"source":Ut("error",o);break;case"img":case"image":case"link":Ut("error",o),Ut("load",o);break;case"details":Ut("toggle",o);break;case"input":Ut("invalid",o),Oo(o,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":Ut("invalid",o);break;case"textarea":Ut("invalid",o),Ia(o,p.value,p.defaultValue,p.children)}u=p.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||o.textContent===""+u||p.suppressHydrationWarning===!0||n1(o.textContent,u)?(p.popover!=null&&(Ut("beforetoggle",o),Ut("toggle",o)),p.onScroll!=null&&Ut("scroll",o),p.onScrollEnd!=null&&Ut("scrollend",o),p.onClick!=null&&(o.onclick=Ve),o=!0):o=!1,o||qs(i,!0)}function B0(i){for(sr=i.return;sr;)switch(sr.tag){case 5:case 31:case 13:di=!1;return;case 27:case 3:di=!0;return;default:sr=sr.return}}function Ba(i){if(i!==sr)return!1;if(!Zt)return B0(i),Zt=!0,!1;var o=i.tag,u;if((u=o!==3&&o!==27)&&((u=o===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||pb(i.type,i.memoizedProps)),u=!u),u&&En&&qs(i),B0(i),o===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));En=f1(i)}else if(o===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));En=f1(i)}else o===27?(o=En,ro(i.type)?(i=yb,yb=null,En=i):En=o):En=sr?hi(i.stateNode.nextSibling):null;return!0}function Lo(){En=sr=null,Zt=!1}function Ym(){var i=Us;return i!==null&&(jr===null?jr=i:jr.push.apply(jr,i),Us=null),i}function mu(i){Us===null?Us=[i]:Us.push(i)}var Xm=$(null),Po=null,us=null;function Hs(i,o,u){j(Xm,o._currentValue),o._currentValue=u}function cs(i){i._currentValue=Xm.current,V(Xm)}function Qm(i,o,u){for(;i!==null;){var p=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,p!==null&&(p.childLanes|=o)):p!==null&&(p.childLanes&o)!==o&&(p.childLanes|=o),i===u)break;i=i.return}}function Jm(i,o,u,p){var k=i.child;for(k!==null&&(k.return=i);k!==null;){var w=k.dependencies;if(w!==null){var I=k.child;w=w.firstContext;e:for(;w!==null;){var G=w;w=k;for(var Q=0;Q<o.length;Q++)if(G.context===o[Q]){w.lanes|=u,G=w.alternate,G!==null&&(G.lanes|=u),Qm(w.return,u,i),p||(I=null);break e}w=G.next}}else if(k.tag===18){if(I=k.return,I===null)throw Error(r(341));I.lanes|=u,w=I.alternate,w!==null&&(w.lanes|=u),Qm(I,u,i),I=null}else I=k.child;if(I!==null)I.return=k;else for(I=k;I!==null;){if(I===i){I=null;break}if(k=I.sibling,k!==null){k.return=I.return,I=k;break}I=I.return}k=I}}function Fa(i,o,u,p){i=null;for(var k=o,w=!1;k!==null;){if(!w){if((k.flags&524288)!==0)w=!0;else if((k.flags&262144)!==0)break}if(k.tag===10){var I=k.alternate;if(I===null)throw Error(r(387));if(I=I.memoizedProps,I!==null){var G=k.type;Yr(k.pendingProps.value,I.value)||(i!==null?i.push(G):i=[G])}}else if(k===oe.current){if(I=k.alternate,I===null)throw Error(r(387));I.memoizedState.memoizedState!==k.memoizedState.memoizedState&&(i!==null?i.push(Uu):i=[Uu])}k=k.return}i!==null&&Jm(o,i,u,p),o.flags|=262144}function qf(i){for(i=i.firstContext;i!==null;){if(!Yr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function $o(i){Po=i,us=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function or(i){return F0(Po,i)}function Hf(i,o){return Po===null&&$o(i),F0(i,o)}function F0(i,o){var u=o._currentValue;if(o={context:o,memoizedValue:u,next:null},us===null){if(i===null)throw Error(r(308));us=o,i.dependencies={lanes:0,firstContext:o},i.flags|=524288}else us=us.next=o;return u}var Vj=typeof AbortController<"u"?AbortController:function(){var i=[],o=this.signal={aborted:!1,addEventListener:function(u,p){i.push(p)}};this.abort=function(){o.aborted=!0,i.forEach(function(u){return u()})}},Wj=e.unstable_scheduleCallback,Kj=e.unstable_NormalPriority,Gn={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function eg(){return{controller:new Vj,data:new Map,refCount:0}}function gu(i){i.refCount--,i.refCount===0&&Wj(Kj,function(){i.controller.abort()})}var bu=null,tg=0,Ua=0,qa=null;function Zj(i,o){if(bu===null){var u=bu=[];tg=0,Ua=ib(),qa={status:"pending",value:void 0,then:function(p){u.push(p)}}}return tg++,o.then(U0,U0),o}function U0(){if(--tg===0&&bu!==null){qa!==null&&(qa.status="fulfilled");var i=bu;bu=null,Ua=0,qa=null;for(var o=0;o<i.length;o++)(0,i[o])()}}function Yj(i,o){var u=[],p={status:"pending",value:null,reason:null,then:function(k){u.push(k)}};return i.then(function(){p.status="fulfilled",p.value=o;for(var k=0;k<u.length;k++)(0,u[k])(o)},function(k){for(p.status="rejected",p.reason=k,k=0;k<u.length;k++)(0,u[k])(void 0)}),p}var q0=q.S;q.S=function(i,o){_w=te(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&Zj(i,o),q0!==null&&q0(i,o)};var Bo=$(null);function ng(){var i=Bo.current;return i!==null?i:gn.pooledCache}function Gf(i,o){o===null?j(Bo,Bo.current):j(Bo,o.pool)}function H0(){var i=ng();return i===null?null:{parent:Gn._currentValue,pool:i}}var Ha=Error(r(460)),rg=Error(r(474)),Vf=Error(r(542)),Wf={then:function(){}};function G0(i){return i=i.status,i==="fulfilled"||i==="rejected"}function V0(i,o,u){switch(u=i[u],u===void 0?i.push(o):u!==o&&(o.then(Ve,Ve),o=u),o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,K0(i),i;default:if(typeof o.status=="string")o.then(Ve,Ve);else{if(i=gn,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=o,i.status="pending",i.then(function(p){if(o.status==="pending"){var k=o;k.status="fulfilled",k.value=p}},function(p){if(o.status==="pending"){var k=o;k.status="rejected",k.reason=p}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,K0(i),i}throw Uo=o,Ha}}function Fo(i){try{var o=i._init;return o(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Uo=u,Ha):u}}var Uo=null;function W0(){if(Uo===null)throw Error(r(459));var i=Uo;return Uo=null,i}function K0(i){if(i===Ha||i===Vf)throw Error(r(483))}var Ga=null,yu=0;function Kf(i){var o=yu;return yu+=1,Ga===null&&(Ga=[]),V0(Ga,i,o)}function vu(i,o){o=o.props.ref,i.ref=o!==void 0?o:null}function Zf(i,o){throw o.$$typeof===b?Error(r(525)):(i=Object.prototype.toString.call(o),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i)))}function Z0(i){function o(le,ie){if(i){var de=le.deletions;de===null?(le.deletions=[ie],le.flags|=16):de.push(ie)}}function u(le,ie){if(!i)return null;for(;ie!==null;)o(le,ie),ie=ie.sibling;return null}function p(le){for(var ie=new Map;le!==null;)le.key!==null?ie.set(le.key,le):ie.set(le.index,le),le=le.sibling;return ie}function k(le,ie){return le=as(le,ie),le.index=0,le.sibling=null,le}function w(le,ie,de){return le.index=de,i?(de=le.alternate,de!==null?(de=de.index,de<ie?(le.flags|=67108866,ie):de):(le.flags|=67108866,ie)):(le.flags|=1048576,ie)}function I(le){return i&&le.alternate===null&&(le.flags|=67108866),le}function G(le,ie,de,Ne){return ie===null||ie.tag!==6?(ie=Gm(de,le.mode,Ne),ie.return=le,ie):(ie=k(ie,de),ie.return=le,ie)}function Q(le,ie,de,Ne){var ut=de.type;return ut===S?Re(le,ie,de.props.children,Ne,de.key):ie!==null&&(ie.elementType===ut||typeof ut=="object"&&ut!==null&&ut.$$typeof===P&&Fo(ut)===ie.type)?(ie=k(ie,de.props),vu(ie,de),ie.return=le,ie):(ie=Ff(de.type,de.key,de.props,null,le.mode,Ne),vu(ie,de),ie.return=le,ie)}function pe(le,ie,de,Ne){return ie===null||ie.tag!==4||ie.stateNode.containerInfo!==de.containerInfo||ie.stateNode.implementation!==de.implementation?(ie=Vm(de,le.mode,Ne),ie.return=le,ie):(ie=k(ie,de.children||[]),ie.return=le,ie)}function Re(le,ie,de,Ne,ut){return ie===null||ie.tag!==7?(ie=jo(de,le.mode,Ne,ut),ie.return=le,ie):(ie=k(ie,de),ie.return=le,ie)}function Oe(le,ie,de){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return ie=Gm(""+ie,le.mode,de),ie.return=le,ie;if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case y:return de=Ff(ie.type,ie.key,ie.props,null,le.mode,de),vu(de,ie),de.return=le,de;case x:return ie=Vm(ie,le.mode,de),ie.return=le,ie;case P:return ie=Fo(ie),Oe(le,ie,de)}if(U(ie)||W(ie))return ie=jo(ie,le.mode,de,null),ie.return=le,ie;if(typeof ie.then=="function")return Oe(le,Kf(ie),de);if(ie.$$typeof===_)return Oe(le,Hf(le,ie),de);Zf(le,ie)}return null}function me(le,ie,de,Ne){var ut=ie!==null?ie.key:null;if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return ut!==null?null:G(le,ie,""+de,Ne);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case y:return de.key===ut?Q(le,ie,de,Ne):null;case x:return de.key===ut?pe(le,ie,de,Ne):null;case P:return de=Fo(de),me(le,ie,de,Ne)}if(U(de)||W(de))return ut!==null?null:Re(le,ie,de,Ne,null);if(typeof de.then=="function")return me(le,ie,Kf(de),Ne);if(de.$$typeof===_)return me(le,ie,Hf(le,de),Ne);Zf(le,de)}return null}function ve(le,ie,de,Ne,ut){if(typeof Ne=="string"&&Ne!==""||typeof Ne=="number"||typeof Ne=="bigint")return le=le.get(de)||null,G(ie,le,""+Ne,ut);if(typeof Ne=="object"&&Ne!==null){switch(Ne.$$typeof){case y:return le=le.get(Ne.key===null?de:Ne.key)||null,Q(ie,le,Ne,ut);case x:return le=le.get(Ne.key===null?de:Ne.key)||null,pe(ie,le,Ne,ut);case P:return Ne=Fo(Ne),ve(le,ie,de,Ne,ut)}if(U(Ne)||W(Ne))return le=le.get(de)||null,Re(ie,le,Ne,ut,null);if(typeof Ne.then=="function")return ve(le,ie,de,Kf(Ne),ut);if(Ne.$$typeof===_)return ve(le,ie,de,Hf(ie,Ne),ut);Zf(ie,Ne)}return null}function et(le,ie,de,Ne){for(var ut=null,Jt=null,it=ie,It=ie=0,Wt=null;it!==null&&It<de.length;It++){it.index>It?(Wt=it,it=null):Wt=it.sibling;var en=me(le,it,de[It],Ne);if(en===null){it===null&&(it=Wt);break}i&&it&&en.alternate===null&&o(le,it),ie=w(en,ie,It),Jt===null?ut=en:Jt.sibling=en,Jt=en,it=Wt}if(It===de.length)return u(le,it),Zt&&ls(le,It),ut;if(it===null){for(;It<de.length;It++)it=Oe(le,de[It],Ne),it!==null&&(ie=w(it,ie,It),Jt===null?ut=it:Jt.sibling=it,Jt=it);return Zt&&ls(le,It),ut}for(it=p(it);It<de.length;It++)Wt=ve(it,le,It,de[It],Ne),Wt!==null&&(i&&Wt.alternate!==null&&it.delete(Wt.key===null?It:Wt.key),ie=w(Wt,ie,It),Jt===null?ut=Wt:Jt.sibling=Wt,Jt=Wt);return i&&it.forEach(function(lo){return o(le,lo)}),Zt&&ls(le,It),ut}function gt(le,ie,de,Ne){if(de==null)throw Error(r(151));for(var ut=null,Jt=null,it=ie,It=ie=0,Wt=null,en=de.next();it!==null&&!en.done;It++,en=de.next()){it.index>It?(Wt=it,it=null):Wt=it.sibling;var lo=me(le,it,en.value,Ne);if(lo===null){it===null&&(it=Wt);break}i&&it&&lo.alternate===null&&o(le,it),ie=w(lo,ie,It),Jt===null?ut=lo:Jt.sibling=lo,Jt=lo,it=Wt}if(en.done)return u(le,it),Zt&&ls(le,It),ut;if(it===null){for(;!en.done;It++,en=de.next())en=Oe(le,en.value,Ne),en!==null&&(ie=w(en,ie,It),Jt===null?ut=en:Jt.sibling=en,Jt=en);return Zt&&ls(le,It),ut}for(it=p(it);!en.done;It++,en=de.next())en=ve(it,le,It,en.value,Ne),en!==null&&(i&&en.alternate!==null&&it.delete(en.key===null?It:en.key),ie=w(en,ie,It),Jt===null?ut=en:Jt.sibling=en,Jt=en);return i&&it.forEach(function(a2){return o(le,a2)}),Zt&&ls(le,It),ut}function fn(le,ie,de,Ne){if(typeof de=="object"&&de!==null&&de.type===S&&de.key===null&&(de=de.props.children),typeof de=="object"&&de!==null){switch(de.$$typeof){case y:e:{for(var ut=de.key;ie!==null;){if(ie.key===ut){if(ut=de.type,ut===S){if(ie.tag===7){u(le,ie.sibling),Ne=k(ie,de.props.children),Ne.return=le,le=Ne;break e}}else if(ie.elementType===ut||typeof ut=="object"&&ut!==null&&ut.$$typeof===P&&Fo(ut)===ie.type){u(le,ie.sibling),Ne=k(ie,de.props),vu(Ne,de),Ne.return=le,le=Ne;break e}u(le,ie);break}else o(le,ie);ie=ie.sibling}de.type===S?(Ne=jo(de.props.children,le.mode,Ne,de.key),Ne.return=le,le=Ne):(Ne=Ff(de.type,de.key,de.props,null,le.mode,Ne),vu(Ne,de),Ne.return=le,le=Ne)}return I(le);case x:e:{for(ut=de.key;ie!==null;){if(ie.key===ut)if(ie.tag===4&&ie.stateNode.containerInfo===de.containerInfo&&ie.stateNode.implementation===de.implementation){u(le,ie.sibling),Ne=k(ie,de.children||[]),Ne.return=le,le=Ne;break e}else{u(le,ie);break}else o(le,ie);ie=ie.sibling}Ne=Vm(de,le.mode,Ne),Ne.return=le,le=Ne}return I(le);case P:return de=Fo(de),fn(le,ie,de,Ne)}if(U(de))return et(le,ie,de,Ne);if(W(de)){if(ut=W(de),typeof ut!="function")throw Error(r(150));return de=ut.call(de),gt(le,ie,de,Ne)}if(typeof de.then=="function")return fn(le,ie,Kf(de),Ne);if(de.$$typeof===_)return fn(le,ie,Hf(le,de),Ne);Zf(le,de)}return typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint"?(de=""+de,ie!==null&&ie.tag===6?(u(le,ie.sibling),Ne=k(ie,de),Ne.return=le,le=Ne):(u(le,ie),Ne=Gm(de,le.mode,Ne),Ne.return=le,le=Ne),I(le)):u(le,ie)}return function(le,ie,de,Ne){try{yu=0;var ut=fn(le,ie,de,Ne);return Ga=null,ut}catch(it){if(it===Ha||it===Vf)throw it;var Jt=Xr(29,it,null,le.mode);return Jt.lanes=Ne,Jt.return=le,Jt}}}var qo=Z0(!0),Y0=Z0(!1),Gs=!1;function ig(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sg(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 Vs(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ws(i,o,u){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(rn&2)!==0){var k=p.pending;return k===null?o.next=o:(o.next=k.next,k.next=o),p.pending=o,o=Bf(i),M0(i,null,u),o}return $f(i,p,o,u),Bf(i)}function ku(i,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194048)!==0)){var p=o.lanes;p&=i.pendingLanes,u|=p,o.lanes=u,Se(i,u)}}function og(i,o){var u=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,u===p)){var k=null,w=null;if(u=u.firstBaseUpdate,u!==null){do{var I={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};w===null?k=w=I:w=w.next=I,u=u.next}while(u!==null);w===null?k=w=o:w=w.next=o}else k=w=o;u={baseState:p.baseState,firstBaseUpdate:k,lastBaseUpdate:w,shared:p.shared,callbacks:p.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=o:i.next=o,u.lastBaseUpdate=o}var ag=!1;function xu(){if(ag){var i=qa;if(i!==null)throw i}}function Su(i,o,u,p){ag=!1;var k=i.updateQueue;Gs=!1;var w=k.firstBaseUpdate,I=k.lastBaseUpdate,G=k.shared.pending;if(G!==null){k.shared.pending=null;var Q=G,pe=Q.next;Q.next=null,I===null?w=pe:I.next=pe,I=Q;var Re=i.alternate;Re!==null&&(Re=Re.updateQueue,G=Re.lastBaseUpdate,G!==I&&(G===null?Re.firstBaseUpdate=pe:G.next=pe,Re.lastBaseUpdate=Q))}if(w!==null){var Oe=k.baseState;I=0,Re=pe=Q=null,G=w;do{var me=G.lane&-536870913,ve=me!==G.lane;if(ve?(Vt&me)===me:(p&me)===me){me!==0&&me===Ua&&(ag=!0),Re!==null&&(Re=Re.next={lane:0,tag:G.tag,payload:G.payload,callback:null,next:null});e:{var et=i,gt=G;me=o;var fn=u;switch(gt.tag){case 1:if(et=gt.payload,typeof et=="function"){Oe=et.call(fn,Oe,me);break e}Oe=et;break e;case 3:et.flags=et.flags&-65537|128;case 0:if(et=gt.payload,me=typeof et=="function"?et.call(fn,Oe,me):et,me==null)break e;Oe=m({},Oe,me);break e;case 2:Gs=!0}}me=G.callback,me!==null&&(i.flags|=64,ve&&(i.flags|=8192),ve=k.callbacks,ve===null?k.callbacks=[me]:ve.push(me))}else ve={lane:me,tag:G.tag,payload:G.payload,callback:G.callback,next:null},Re===null?(pe=Re=ve,Q=Oe):Re=Re.next=ve,I|=me;if(G=G.next,G===null){if(G=k.shared.pending,G===null)break;ve=G,G=ve.next,ve.next=null,k.lastBaseUpdate=ve,k.shared.pending=null}}while(!0);Re===null&&(Q=Oe),k.baseState=Q,k.firstBaseUpdate=pe,k.lastBaseUpdate=Re,w===null&&(k.shared.lanes=0),Qs|=I,i.lanes=I,i.memoizedState=Oe}}function X0(i,o){if(typeof i!="function")throw Error(r(191,i));i.call(o)}function Q0(i,o){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)X0(u[i],o)}var Va=$(null),Yf=$(0);function J0(i,o){i=vs,j(Yf,i),j(Va,o),vs=i|o.baseLanes}function lg(){j(Yf,vs),j(Va,Va.current)}function ug(){vs=Yf.current,V(Va),V(Yf)}var Qr=$(null),pi=null;function Ks(i){var o=i.alternate;j($n,$n.current&1),j(Qr,i),pi===null&&(o===null||Va.current!==null||o.memoizedState!==null)&&(pi=i)}function cg(i){j($n,$n.current),j(Qr,i),pi===null&&(pi=i)}function eS(i){i.tag===22?(j($n,$n.current),j(Qr,i),pi===null&&(pi=i)):Zs()}function Zs(){j($n,$n.current),j(Qr,Qr.current)}function Jr(i){V(Qr),pi===i&&(pi=null),V($n)}var $n=$(0);function Xf(i){for(var o=i;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||gb(u)||bb(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 fs=0,At=null,un=null,Vn=null,Qf=!1,Wa=!1,Ho=!1,Jf=0,wu=0,Ka=null,Xj=0;function jn(){throw Error(r(321))}function fg(i,o){if(o===null)return!1;for(var u=0;u<o.length&&u<i.length;u++)if(!Yr(i[u],o[u]))return!1;return!0}function dg(i,o,u,p,k,w){return fs=w,At=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,q.H=i===null||i.memoizedState===null?LS:Rg,Ho=!1,w=u(p,k),Ho=!1,Wa&&(w=nS(o,u,p,k)),tS(i),w}function tS(i){q.H=_u;var o=un!==null&&un.next!==null;if(fs=0,Vn=un=At=null,Qf=!1,wu=0,Ka=null,o)throw Error(r(300));i===null||Wn||(i=i.dependencies,i!==null&&qf(i)&&(Wn=!0))}function nS(i,o,u,p){At=i;var k=0;do{if(Wa&&(Ka=null),wu=0,Wa=!1,25<=k)throw Error(r(301));if(k+=1,Vn=un=null,i.updateQueue!=null){var w=i.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}q.H=PS,w=o(u,p)}while(Wa);return w}function Qj(){var i=q.H,o=i.useState()[0];return o=typeof o.then=="function"?Eu(o):o,i=i.useState()[0],(un!==null?un.memoizedState:null)!==i&&(At.flags|=1024),o}function pg(){var i=Jf!==0;return Jf=0,i}function hg(i,o,u){o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~u}function mg(i){if(Qf){for(i=i.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}Qf=!1}fs=0,Vn=un=At=null,Wa=!1,wu=Jf=0,Ka=null}function wr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vn===null?At.memoizedState=Vn=i:Vn=Vn.next=i,Vn}function Bn(){if(un===null){var i=At.alternate;i=i!==null?i.memoizedState:null}else i=un.next;var o=Vn===null?At.memoizedState:Vn.next;if(o!==null)Vn=o,un=i;else{if(i===null)throw At.alternate===null?Error(r(467)):Error(r(310));un=i,i={memoizedState:un.memoizedState,baseState:un.baseState,baseQueue:un.baseQueue,queue:un.queue,next:null},Vn===null?At.memoizedState=Vn=i:Vn=Vn.next=i}return Vn}function ed(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Eu(i){var o=wu;return wu+=1,Ka===null&&(Ka=[]),i=V0(Ka,i,o),o=At,(Vn===null?o.memoizedState:Vn.next)===null&&(o=o.alternate,q.H=o===null||o.memoizedState===null?LS:Rg),i}function td(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Eu(i);if(i.$$typeof===_)return or(i)}throw Error(r(438,String(i)))}function gg(i){var o=null,u=At.updateQueue;if(u!==null&&(o=u.memoCache),o==null){var p=At.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(o={data:p.data.map(function(k){return k.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),u===null&&(u=ed(),At.updateQueue=u),u.memoCache=o,u=o.data[o.index],u===void 0)for(u=o.data[o.index]=Array(i),p=0;p<i;p++)u[p]=D;return o.index++,u}function ds(i,o){return typeof o=="function"?o(i):o}function nd(i){var o=Bn();return bg(o,un,i)}function bg(i,o,u){var p=i.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=u;var k=i.baseQueue,w=p.pending;if(w!==null){if(k!==null){var I=k.next;k.next=w.next,w.next=I}o.baseQueue=k=w,p.pending=null}if(w=i.baseState,k===null)i.memoizedState=w;else{o=k.next;var G=I=null,Q=null,pe=o,Re=!1;do{var Oe=pe.lane&-536870913;if(Oe!==pe.lane?(Vt&Oe)===Oe:(fs&Oe)===Oe){var me=pe.revertLane;if(me===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null}),Oe===Ua&&(Re=!0);else if((fs&me)===me){pe=pe.next,me===Ua&&(Re=!0);continue}else Oe={lane:0,revertLane:pe.revertLane,gesture:null,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null},Q===null?(G=Q=Oe,I=w):Q=Q.next=Oe,At.lanes|=me,Qs|=me;Oe=pe.action,Ho&&u(w,Oe),w=pe.hasEagerState?pe.eagerState:u(w,Oe)}else me={lane:Oe,revertLane:pe.revertLane,gesture:pe.gesture,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null},Q===null?(G=Q=me,I=w):Q=Q.next=me,At.lanes|=Oe,Qs|=Oe;pe=pe.next}while(pe!==null&&pe!==o);if(Q===null?I=w:Q.next=G,!Yr(w,i.memoizedState)&&(Wn=!0,Re&&(u=qa,u!==null)))throw u;i.memoizedState=w,i.baseState=I,i.baseQueue=Q,p.lastRenderedState=w}return k===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function yg(i){var o=Bn(),u=o.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var p=u.dispatch,k=u.pending,w=o.memoizedState;if(k!==null){u.pending=null;var I=k=k.next;do w=i(w,I.action),I=I.next;while(I!==k);Yr(w,o.memoizedState)||(Wn=!0),o.memoizedState=w,o.baseQueue===null&&(o.baseState=w),u.lastRenderedState=w}return[w,p]}function rS(i,o,u){var p=At,k=Bn(),w=Zt;if(w){if(u===void 0)throw Error(r(407));u=u()}else u=o();var I=!Yr((un||k).memoizedState,u);if(I&&(k.memoizedState=u,Wn=!0),k=k.queue,xg(oS.bind(null,p,k,i),[i]),k.getSnapshot!==o||I||Vn!==null&&Vn.memoizedState.tag&1){if(p.flags|=2048,Za(9,{destroy:void 0},sS.bind(null,p,k,u,o),null),gn===null)throw Error(r(349));w||(fs&127)!==0||iS(p,o,u)}return u}function iS(i,o,u){i.flags|=16384,i={getSnapshot:o,value:u},o=At.updateQueue,o===null?(o=ed(),At.updateQueue=o,o.stores=[i]):(u=o.stores,u===null?o.stores=[i]:u.push(i))}function sS(i,o,u,p){o.value=u,o.getSnapshot=p,aS(o)&&lS(i)}function oS(i,o,u){return u(function(){aS(o)&&lS(i)})}function aS(i){var o=i.getSnapshot;i=i.value;try{var u=o();return!Yr(i,u)}catch{return!0}}function lS(i){var o=zo(i,2);o!==null&&Lr(o,i,2)}function vg(i){var o=wr();if(typeof i=="function"){var u=i;if(i=u(),Ho){Tt(!0);try{u()}finally{Tt(!1)}}}return o.memoizedState=o.baseState=i,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:i},o}function uS(i,o,u,p){return i.baseState=u,bg(i,un,typeof p=="function"?p:ds)}function Jj(i,o,u,p,k){if(sd(i))throw Error(r(485));if(i=o.action,i!==null){var w={payload:k,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(I){w.listeners.push(I)}};q.T!==null?u(!0):w.isTransition=!1,p(w),u=o.pending,u===null?(w.next=o.pending=w,cS(o,w)):(w.next=u.next,o.pending=u.next=w)}}function cS(i,o){var u=o.action,p=o.payload,k=i.state;if(o.isTransition){var w=q.T,I={};q.T=I;try{var G=u(k,p),Q=q.S;Q!==null&&Q(I,G),fS(i,o,G)}catch(pe){kg(i,o,pe)}finally{w!==null&&I.types!==null&&(w.types=I.types),q.T=w}}else try{w=u(k,p),fS(i,o,w)}catch(pe){kg(i,o,pe)}}function fS(i,o,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(p){dS(i,o,p)},function(p){return kg(i,o,p)}):dS(i,o,u)}function dS(i,o,u){o.status="fulfilled",o.value=u,pS(o),i.state=u,o=i.pending,o!==null&&(u=o.next,u===o?i.pending=null:(u=u.next,o.next=u,cS(i,u)))}function kg(i,o,u){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do o.status="rejected",o.reason=u,pS(o),o=o.next;while(o!==p)}i.action=null}function pS(i){i=i.listeners;for(var o=0;o<i.length;o++)(0,i[o])()}function hS(i,o){return o}function mS(i,o){if(Zt){var u=gn.formState;if(u!==null){e:{var p=At;if(Zt){if(En){t:{for(var k=En,w=di;k.nodeType!==8;){if(!w){k=null;break t}if(k=hi(k.nextSibling),k===null){k=null;break t}}w=k.data,k=w==="F!"||w==="F"?k:null}if(k){En=hi(k.nextSibling),p=k.data==="F!";break e}}qs(p)}p=!1}p&&(o=u[0])}}return u=wr(),u.memoizedState=u.baseState=o,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hS,lastRenderedState:o},u.queue=p,u=DS.bind(null,At,p),p.dispatch=u,p=vg(!1),w=_g.bind(null,At,!1,p.queue),p=wr(),k={state:o,dispatch:null,action:i,pending:null},p.queue=k,u=Jj.bind(null,At,k,w,u),k.dispatch=u,p.memoizedState=i,[o,u,!1]}function gS(i){var o=Bn();return bS(o,un,i)}function bS(i,o,u){if(o=bg(i,o,hS)[0],i=nd(ds)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var p=Eu(o)}catch(I){throw I===Ha?Vf:I}else p=o;o=Bn();var k=o.queue,w=k.dispatch;return u!==o.memoizedState&&(At.flags|=2048,Za(9,{destroy:void 0},eL.bind(null,k,u),null)),[p,w,i]}function eL(i,o){i.action=o}function yS(i){var o=Bn(),u=un;if(u!==null)return bS(o,u,i);Bn(),o=o.memoizedState,u=Bn();var p=u.queue.dispatch;return u.memoizedState=i,[o,p,!1]}function Za(i,o,u,p){return i={tag:i,create:u,deps:p,inst:o,next:null},o=At.updateQueue,o===null&&(o=ed(),At.updateQueue=o),u=o.lastEffect,u===null?o.lastEffect=i.next=i:(p=u.next,u.next=i,i.next=p,o.lastEffect=i),i}function vS(){return Bn().memoizedState}function rd(i,o,u,p){var k=wr();At.flags|=i,k.memoizedState=Za(1|o,{destroy:void 0},u,p===void 0?null:p)}function id(i,o,u,p){var k=Bn();p=p===void 0?null:p;var w=k.memoizedState.inst;un!==null&&p!==null&&fg(p,un.memoizedState.deps)?k.memoizedState=Za(o,w,u,p):(At.flags|=i,k.memoizedState=Za(1|o,w,u,p))}function kS(i,o){rd(8390656,8,i,o)}function xg(i,o){id(2048,8,i,o)}function tL(i){At.flags|=4;var o=At.updateQueue;if(o===null)o=ed(),At.updateQueue=o,o.events=[i];else{var u=o.events;u===null?o.events=[i]:u.push(i)}}function xS(i){var o=Bn().memoizedState;return tL({ref:o,nextImpl:i}),function(){if((rn&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function SS(i,o){return id(4,2,i,o)}function wS(i,o){return id(4,4,i,o)}function ES(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 TS(i,o,u){u=u!=null?u.concat([i]):null,id(4,4,ES.bind(null,o,i),u)}function Sg(){}function _S(i,o){var u=Bn();o=o===void 0?null:o;var p=u.memoizedState;return o!==null&&fg(o,p[1])?p[0]:(u.memoizedState=[i,o],i)}function RS(i,o){var u=Bn();o=o===void 0?null:o;var p=u.memoizedState;if(o!==null&&fg(o,p[1]))return p[0];if(p=i(),Ho){Tt(!0);try{i()}finally{Tt(!1)}}return u.memoizedState=[p,o],p}function wg(i,o,u){return u===void 0||(fs&1073741824)!==0&&(Vt&261930)===0?i.memoizedState=o:(i.memoizedState=u,i=Cw(),At.lanes|=i,Qs|=i,u)}function CS(i,o,u,p){return Yr(u,o)?u:Va.current!==null?(i=wg(i,u,p),Yr(i,o)||(Wn=!0),i):(fs&42)===0||(fs&1073741824)!==0&&(Vt&261930)===0?(Wn=!0,i.memoizedState=u):(i=Cw(),At.lanes|=i,Qs|=i,o)}function NS(i,o,u,p,k){var w=Z.p;Z.p=w!==0&&8>w?w:8;var I=q.T,G={};q.T=G,_g(i,!1,o,u);try{var Q=k(),pe=q.S;if(pe!==null&&pe(G,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var Re=Yj(Q,p);Tu(i,o,Re,ni(i))}else Tu(i,o,p,ni(i))}catch(Oe){Tu(i,o,{then:function(){},status:"rejected",reason:Oe},ni())}finally{Z.p=w,I!==null&&G.types!==null&&(I.types=G.types),q.T=I}}function nL(){}function Eg(i,o,u,p){if(i.tag!==5)throw Error(r(476));var k=AS(i).queue;NS(i,k,o,B,u===null?nL:function(){return OS(i),u(p)})}function AS(i){var o=i.memoizedState;if(o!==null)return o;o={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:B},next:null};var u={};return o.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:u},next:null},i.memoizedState=o,i=i.alternate,i!==null&&(i.memoizedState=o),o}function OS(i){var o=AS(i);o.next===null&&(o=i.alternate.memoizedState),Tu(i,o.next.queue,{},ni())}function Tg(){return or(Uu)}function IS(){return Bn().memoizedState}function MS(){return Bn().memoizedState}function rL(i){for(var o=i.return;o!==null;){switch(o.tag){case 24:case 3:var u=ni();i=Vs(u);var p=Ws(o,i,u);p!==null&&(Lr(p,o,u),ku(p,o,u)),o={cache:eg()},i.payload=o;return}o=o.return}}function iL(i,o,u){var p=ni();u={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},sd(i)?zS(o,u):(u=qm(i,o,u,p),u!==null&&(Lr(u,i,p),jS(u,o,p)))}function DS(i,o,u){var p=ni();Tu(i,o,u,p)}function Tu(i,o,u,p){var k={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(sd(i))zS(o,k);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=o.lastRenderedReducer,w!==null))try{var I=o.lastRenderedState,G=w(I,u);if(k.hasEagerState=!0,k.eagerState=G,Yr(G,I))return $f(i,o,k,0),gn===null&&Pf(),!1}catch{}if(u=qm(i,o,k,p),u!==null)return Lr(u,i,p),jS(u,o,p),!0}return!1}function _g(i,o,u,p){if(p={lane:2,revertLane:ib(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},sd(i)){if(o)throw Error(r(479))}else o=qm(i,u,p,2),o!==null&&Lr(o,i,2)}function sd(i){var o=i.alternate;return i===At||o!==null&&o===At}function zS(i,o){Wa=Qf=!0;var u=i.pending;u===null?o.next=o:(o.next=u.next,u.next=o),i.pending=o}function jS(i,o,u){if((u&4194048)!==0){var p=o.lanes;p&=i.pendingLanes,u|=p,o.lanes=u,Se(i,u)}}var _u={readContext:or,use:td,useCallback:jn,useContext:jn,useEffect:jn,useImperativeHandle:jn,useLayoutEffect:jn,useInsertionEffect:jn,useMemo:jn,useReducer:jn,useRef:jn,useState:jn,useDebugValue:jn,useDeferredValue:jn,useTransition:jn,useSyncExternalStore:jn,useId:jn,useHostTransitionStatus:jn,useFormState:jn,useActionState:jn,useOptimistic:jn,useMemoCache:jn,useCacheRefresh:jn};_u.useEffectEvent=jn;var LS={readContext:or,use:td,useCallback:function(i,o){return wr().memoizedState=[i,o===void 0?null:o],i},useContext:or,useEffect:kS,useImperativeHandle:function(i,o,u){u=u!=null?u.concat([i]):null,rd(4194308,4,ES.bind(null,o,i),u)},useLayoutEffect:function(i,o){return rd(4194308,4,i,o)},useInsertionEffect:function(i,o){rd(4,2,i,o)},useMemo:function(i,o){var u=wr();o=o===void 0?null:o;var p=i();if(Ho){Tt(!0);try{i()}finally{Tt(!1)}}return u.memoizedState=[p,o],p},useReducer:function(i,o,u){var p=wr();if(u!==void 0){var k=u(o);if(Ho){Tt(!0);try{u(o)}finally{Tt(!1)}}}else k=o;return p.memoizedState=p.baseState=k,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:k},p.queue=i,i=i.dispatch=iL.bind(null,At,i),[p.memoizedState,i]},useRef:function(i){var o=wr();return i={current:i},o.memoizedState=i},useState:function(i){i=vg(i);var o=i.queue,u=DS.bind(null,At,o);return o.dispatch=u,[i.memoizedState,u]},useDebugValue:Sg,useDeferredValue:function(i,o){var u=wr();return wg(u,i,o)},useTransition:function(){var i=vg(!1);return i=NS.bind(null,At,i.queue,!0,!1),wr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,o,u){var p=At,k=wr();if(Zt){if(u===void 0)throw Error(r(407));u=u()}else{if(u=o(),gn===null)throw Error(r(349));(Vt&127)!==0||iS(p,o,u)}k.memoizedState=u;var w={value:u,getSnapshot:o};return k.queue=w,kS(oS.bind(null,p,w,i),[i]),p.flags|=2048,Za(9,{destroy:void 0},sS.bind(null,p,w,u,o),null),u},useId:function(){var i=wr(),o=gn.identifierPrefix;if(Zt){var u=Li,p=ji;u=(p&~(1<<32-st(p)-1)).toString(32)+u,o="_"+o+"R_"+u,u=Jf++,0<u&&(o+="H"+u.toString(32)),o+="_"}else u=Xj++,o="_"+o+"r_"+u.toString(32)+"_";return i.memoizedState=o},useHostTransitionStatus:Tg,useFormState:mS,useActionState:mS,useOptimistic:function(i){var o=wr();o.memoizedState=o.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=u,o=_g.bind(null,At,!0,u),u.dispatch=o,[i,o]},useMemoCache:gg,useCacheRefresh:function(){return wr().memoizedState=rL.bind(null,At)},useEffectEvent:function(i){var o=wr(),u={impl:i};return o.memoizedState=u,function(){if((rn&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},Rg={readContext:or,use:td,useCallback:_S,useContext:or,useEffect:xg,useImperativeHandle:TS,useInsertionEffect:SS,useLayoutEffect:wS,useMemo:RS,useReducer:nd,useRef:vS,useState:function(){return nd(ds)},useDebugValue:Sg,useDeferredValue:function(i,o){var u=Bn();return CS(u,un.memoizedState,i,o)},useTransition:function(){var i=nd(ds)[0],o=Bn().memoizedState;return[typeof i=="boolean"?i:Eu(i),o]},useSyncExternalStore:rS,useId:IS,useHostTransitionStatus:Tg,useFormState:gS,useActionState:gS,useOptimistic:function(i,o){var u=Bn();return uS(u,un,i,o)},useMemoCache:gg,useCacheRefresh:MS};Rg.useEffectEvent=xS;var PS={readContext:or,use:td,useCallback:_S,useContext:or,useEffect:xg,useImperativeHandle:TS,useInsertionEffect:SS,useLayoutEffect:wS,useMemo:RS,useReducer:yg,useRef:vS,useState:function(){return yg(ds)},useDebugValue:Sg,useDeferredValue:function(i,o){var u=Bn();return un===null?wg(u,i,o):CS(u,un.memoizedState,i,o)},useTransition:function(){var i=yg(ds)[0],o=Bn().memoizedState;return[typeof i=="boolean"?i:Eu(i),o]},useSyncExternalStore:rS,useId:IS,useHostTransitionStatus:Tg,useFormState:yS,useActionState:yS,useOptimistic:function(i,o){var u=Bn();return un!==null?uS(u,un,i,o):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:gg,useCacheRefresh:MS};PS.useEffectEvent=xS;function Cg(i,o,u,p){o=i.memoizedState,u=u(p,o),u=u==null?o:m({},o,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var Ng={enqueueSetState:function(i,o,u){i=i._reactInternals;var p=ni(),k=Vs(p);k.payload=o,u!=null&&(k.callback=u),o=Ws(i,k,p),o!==null&&(Lr(o,i,p),ku(o,i,p))},enqueueReplaceState:function(i,o,u){i=i._reactInternals;var p=ni(),k=Vs(p);k.tag=1,k.payload=o,u!=null&&(k.callback=u),o=Ws(i,k,p),o!==null&&(Lr(o,i,p),ku(o,i,p))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var u=ni(),p=Vs(u);p.tag=2,o!=null&&(p.callback=o),o=Ws(i,p,u),o!==null&&(Lr(o,i,u),ku(o,i,u))}};function $S(i,o,u,p,k,w,I){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,w,I):o.prototype&&o.prototype.isPureReactComponent?!du(u,p)||!du(k,w):!0}function BS(i,o,u,p){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,p),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,p),o.state!==i&&Ng.enqueueReplaceState(o,o.state,null)}function Go(i,o){var u=o;if("ref"in o){u={};for(var p in o)p!=="ref"&&(u[p]=o[p])}if(i=i.defaultProps){u===o&&(u=m({},u));for(var k in i)u[k]===void 0&&(u[k]=i[k])}return u}function FS(i){Lf(i)}function US(i){console.error(i)}function qS(i){Lf(i)}function od(i,o){try{var u=i.onUncaughtError;u(o.value,{componentStack:o.stack})}catch(p){setTimeout(function(){throw p})}}function HS(i,o,u){try{var p=i.onCaughtError;p(u.value,{componentStack:u.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(k){setTimeout(function(){throw k})}}function Ag(i,o,u){return u=Vs(u),u.tag=3,u.payload={element:null},u.callback=function(){od(i,o)},u}function GS(i){return i=Vs(i),i.tag=3,i}function VS(i,o,u,p){var k=u.type.getDerivedStateFromError;if(typeof k=="function"){var w=p.value;i.payload=function(){return k(w)},i.callback=function(){HS(o,u,p)}}var I=u.stateNode;I!==null&&typeof I.componentDidCatch=="function"&&(i.callback=function(){HS(o,u,p),typeof k!="function"&&(Js===null?Js=new Set([this]):Js.add(this));var G=p.stack;this.componentDidCatch(p.value,{componentStack:G!==null?G:""})})}function sL(i,o,u,p,k){if(u.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(o=u.alternate,o!==null&&Fa(o,u,k,!0),u=Qr.current,u!==null){switch(u.tag){case 31:case 13:return pi===null?yd():u.alternate===null&&Ln===0&&(Ln=3),u.flags&=-257,u.flags|=65536,u.lanes=k,p===Wf?u.flags|=16384:(o=u.updateQueue,o===null?u.updateQueue=new Set([p]):o.add(p),tb(i,p,k)),!1;case 22:return u.flags|=65536,p===Wf?u.flags|=16384:(o=u.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([p])},u.updateQueue=o):(u=o.retryQueue,u===null?o.retryQueue=new Set([p]):u.add(p)),tb(i,p,k)),!1}throw Error(r(435,u.tag))}return tb(i,p,k),yd(),!1}if(Zt)return o=Qr.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=k,p!==Zm&&(i=Error(r(422),{cause:p}),mu(ui(i,u)))):(p!==Zm&&(o=Error(r(423),{cause:p}),mu(ui(o,u))),i=i.current.alternate,i.flags|=65536,k&=-k,i.lanes|=k,p=ui(p,u),k=Ag(i.stateNode,p,k),og(i,k),Ln!==4&&(Ln=2)),!1;var w=Error(r(520),{cause:p});if(w=ui(w,u),Du===null?Du=[w]:Du.push(w),Ln!==4&&(Ln=2),o===null)return!0;p=ui(p,u),u=o;do{switch(u.tag){case 3:return u.flags|=65536,i=k&-k,u.lanes|=i,i=Ag(u.stateNode,p,i),og(u,i),!1;case 1:if(o=u.type,w=u.stateNode,(u.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Js===null||!Js.has(w))))return u.flags|=65536,k&=-k,u.lanes|=k,k=GS(k),VS(k,i,u,p),og(u,k),!1}u=u.return}while(u!==null);return!1}var Og=Error(r(461)),Wn=!1;function ar(i,o,u,p){o.child=i===null?Y0(o,null,u,p):qo(o,i.child,u,p)}function WS(i,o,u,p,k){u=u.render;var w=o.ref;if("ref"in p){var I={};for(var G in p)G!=="ref"&&(I[G]=p[G])}else I=p;return $o(o),p=dg(i,o,u,I,w,k),G=pg(),i!==null&&!Wn?(hg(i,o,k),ps(i,o,k)):(Zt&&G&&Wm(o),o.flags|=1,ar(i,o,p,k),o.child)}function KS(i,o,u,p,k){if(i===null){var w=u.type;return typeof w=="function"&&!Hm(w)&&w.defaultProps===void 0&&u.compare===null?(o.tag=15,o.type=w,ZS(i,o,w,p,k)):(i=Ff(u.type,null,p,o,o.mode,k),i.ref=o.ref,i.return=o,o.child=i)}if(w=i.child,!$g(i,k)){var I=w.memoizedProps;if(u=u.compare,u=u!==null?u:du,u(I,p)&&i.ref===o.ref)return ps(i,o,k)}return o.flags|=1,i=as(w,p),i.ref=o.ref,i.return=o,o.child=i}function ZS(i,o,u,p,k){if(i!==null){var w=i.memoizedProps;if(du(w,p)&&i.ref===o.ref)if(Wn=!1,o.pendingProps=p=w,$g(i,k))(i.flags&131072)!==0&&(Wn=!0);else return o.lanes=i.lanes,ps(i,o,k)}return Ig(i,o,u,p,k)}function YS(i,o,u,p){var k=p.children,w=i!==null?i.memoizedState:null;if(i===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((o.flags&128)!==0){if(w=w!==null?w.baseLanes|u:u,i!==null){for(p=o.child=i.child,k=0;p!==null;)k=k|p.lanes|p.childLanes,p=p.sibling;p=k&~w}else p=0,o.child=null;return XS(i,o,w,u,p)}if((u&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},i!==null&&Gf(o,w!==null?w.cachePool:null),w!==null?J0(o,w):lg(),eS(o);else return p=o.lanes=536870912,XS(i,o,w!==null?w.baseLanes|u:u,u,p)}else w!==null?(Gf(o,w.cachePool),J0(o,w),Zs(),o.memoizedState=null):(i!==null&&Gf(o,null),lg(),Zs());return ar(i,o,k,u),o.child}function Ru(i,o){return i!==null&&i.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function XS(i,o,u,p,k){var w=ng();return w=w===null?null:{parent:Gn._currentValue,pool:w},o.memoizedState={baseLanes:u,cachePool:w},i!==null&&Gf(o,null),lg(),eS(o),i!==null&&Fa(i,o,p,!0),o.childLanes=k,null}function ad(i,o){return o=ud({mode:o.mode,children:o.children},i.mode),o.ref=i.ref,i.child=o,o.return=i,o}function QS(i,o,u){return qo(o,i.child,null,u),i=ad(o,o.pendingProps),i.flags|=2,Jr(o),o.memoizedState=null,i}function oL(i,o,u){var p=o.pendingProps,k=(o.flags&128)!==0;if(o.flags&=-129,i===null){if(Zt){if(p.mode==="hidden")return i=ad(o,p),o.lanes=536870912,Ru(null,i);if(cg(o),(i=En)?(i=c1(i,di),i=i!==null&&i.data==="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Fs!==null?{id:ji,overflow:Li}:null,retryLane:536870912,hydrationErrors:null},u=z0(i),u.return=o,o.child=u,sr=o,En=null)):i=null,i===null)throw qs(o);return o.lanes=536870912,null}return ad(o,p)}var w=i.memoizedState;if(w!==null){var I=w.dehydrated;if(cg(o),k)if(o.flags&256)o.flags&=-257,o=QS(i,o,u);else if(o.memoizedState!==null)o.child=i.child,o.flags|=128,o=null;else throw Error(r(558));else if(Wn||Fa(i,o,u,!1),k=(u&i.childLanes)!==0,Wn||k){if(p=gn,p!==null&&(I=Ye(p,u),I!==0&&I!==w.retryLane))throw w.retryLane=I,zo(i,I),Lr(p,i,I),Og;yd(),o=QS(i,o,u)}else i=w.treeContext,En=hi(I.nextSibling),sr=o,Zt=!0,Us=null,di=!1,i!==null&&P0(o,i),o=ad(o,p),o.flags|=4096;return o}return i=as(i.child,{mode:p.mode,children:p.children}),i.ref=o.ref,o.child=i,i.return=o,i}function ld(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,p,k){return $o(o),u=dg(i,o,u,p,void 0,k),p=pg(),i!==null&&!Wn?(hg(i,o,k),ps(i,o,k)):(Zt&&p&&Wm(o),o.flags|=1,ar(i,o,u,k),o.child)}function JS(i,o,u,p,k,w){return $o(o),o.updateQueue=null,u=nS(o,p,u,k),tS(i),p=pg(),i!==null&&!Wn?(hg(i,o,w),ps(i,o,w)):(Zt&&p&&Wm(o),o.flags|=1,ar(i,o,u,w),o.child)}function ew(i,o,u,p,k){if($o(o),o.stateNode===null){var w=La,I=u.contextType;typeof I=="object"&&I!==null&&(w=or(I)),w=new u(p,w),o.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=Ng,o.stateNode=w,w._reactInternals=o,w=o.stateNode,w.props=p,w.state=o.memoizedState,w.refs={},ig(o),I=u.contextType,w.context=typeof I=="object"&&I!==null?or(I):La,w.state=o.memoizedState,I=u.getDerivedStateFromProps,typeof I=="function"&&(Cg(o,u,I,p),w.state=o.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(I=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),I!==w.state&&Ng.enqueueReplaceState(w,w.state,null),Su(o,p,w,k),xu(),w.state=o.memoizedState),typeof w.componentDidMount=="function"&&(o.flags|=4194308),p=!0}else if(i===null){w=o.stateNode;var G=o.memoizedProps,Q=Go(u,G);w.props=Q;var pe=w.context,Re=u.contextType;I=La,typeof Re=="object"&&Re!==null&&(I=or(Re));var Oe=u.getDerivedStateFromProps;Re=typeof Oe=="function"||typeof w.getSnapshotBeforeUpdate=="function",G=o.pendingProps!==G,Re||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(G||pe!==I)&&BS(o,w,p,I),Gs=!1;var me=o.memoizedState;w.state=me,Su(o,p,w,k),xu(),pe=o.memoizedState,G||me!==pe||Gs?(typeof Oe=="function"&&(Cg(o,u,Oe,p),pe=o.memoizedState),(Q=Gs||$S(o,u,Q,p,me,pe,I))?(Re||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(o.flags|=4194308)):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=p,o.memoizedState=pe),w.props=p,w.state=pe,w.context=I,p=Q):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),p=!1)}else{w=o.stateNode,sg(i,o),I=o.memoizedProps,Re=Go(u,I),w.props=Re,Oe=o.pendingProps,me=w.context,pe=u.contextType,Q=La,typeof pe=="object"&&pe!==null&&(Q=or(pe)),G=u.getDerivedStateFromProps,(pe=typeof G=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(I!==Oe||me!==Q)&&BS(o,w,p,Q),Gs=!1,me=o.memoizedState,w.state=me,Su(o,p,w,k),xu();var ve=o.memoizedState;I!==Oe||me!==ve||Gs||i!==null&&i.dependencies!==null&&qf(i.dependencies)?(typeof G=="function"&&(Cg(o,u,G,p),ve=o.memoizedState),(Re=Gs||$S(o,u,Re,p,me,ve,Q)||i!==null&&i.dependencies!==null&&qf(i.dependencies))?(pe||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(p,ve,Q),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(p,ve,Q)),typeof w.componentDidUpdate=="function"&&(o.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof w.componentDidUpdate!="function"||I===i.memoizedProps&&me===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&me===i.memoizedState||(o.flags|=1024),o.memoizedProps=p,o.memoizedState=ve),w.props=p,w.state=ve,w.context=Q,p=Re):(typeof w.componentDidUpdate!="function"||I===i.memoizedProps&&me===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&me===i.memoizedState||(o.flags|=1024),p=!1)}return w=p,ld(i,o),p=(o.flags&128)!==0,w||p?(w=o.stateNode,u=p&&typeof u.getDerivedStateFromError!="function"?null:w.render(),o.flags|=1,i!==null&&p?(o.child=qo(o,i.child,null,k),o.child=qo(o,null,u,k)):ar(i,o,u,k),o.memoizedState=w.state,i=o.child):i=ps(i,o,k),i}function tw(i,o,u,p){return Lo(),o.flags|=256,ar(i,o,u,p),o.child}var Mg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Dg(i){return{baseLanes:i,cachePool:H0()}}function zg(i,o,u){return i=i!==null?i.childLanes&~u:0,o&&(i|=ti),i}function nw(i,o,u){var p=o.pendingProps,k=!1,w=(o.flags&128)!==0,I;if((I=w)||(I=i!==null&&i.memoizedState===null?!1:($n.current&2)!==0),I&&(k=!0,o.flags&=-129),I=(o.flags&32)!==0,o.flags&=-33,i===null){if(Zt){if(k?Ks(o):Zs(),(i=En)?(i=c1(i,di),i=i!==null&&i.data!=="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Fs!==null?{id:ji,overflow:Li}:null,retryLane:536870912,hydrationErrors:null},u=z0(i),u.return=o,o.child=u,sr=o,En=null)):i=null,i===null)throw qs(o);return bb(i)?o.lanes=32:o.lanes=536870912,null}var G=p.children;return p=p.fallback,k?(Zs(),k=o.mode,G=ud({mode:"hidden",children:G},k),p=jo(p,k,u,null),G.return=o,p.return=o,G.sibling=p,o.child=G,p=o.child,p.memoizedState=Dg(u),p.childLanes=zg(i,I,u),o.memoizedState=Mg,Ru(null,p)):(Ks(o),jg(o,G))}var Q=i.memoizedState;if(Q!==null&&(G=Q.dehydrated,G!==null)){if(w)o.flags&256?(Ks(o),o.flags&=-257,o=Lg(i,o,u)):o.memoizedState!==null?(Zs(),o.child=i.child,o.flags|=128,o=null):(Zs(),G=p.fallback,k=o.mode,p=ud({mode:"visible",children:p.children},k),G=jo(G,k,u,null),G.flags|=2,p.return=o,G.return=o,p.sibling=G,o.child=p,qo(o,i.child,null,u),p=o.child,p.memoizedState=Dg(u),p.childLanes=zg(i,I,u),o.memoizedState=Mg,o=Ru(null,p));else if(Ks(o),bb(G)){if(I=G.nextSibling&&G.nextSibling.dataset,I)var pe=I.dgst;I=pe,p=Error(r(419)),p.stack="",p.digest=I,mu({value:p,source:null,stack:null}),o=Lg(i,o,u)}else if(Wn||Fa(i,o,u,!1),I=(u&i.childLanes)!==0,Wn||I){if(I=gn,I!==null&&(p=Ye(I,u),p!==0&&p!==Q.retryLane))throw Q.retryLane=p,zo(i,p),Lr(I,i,p),Og;gb(G)||yd(),o=Lg(i,o,u)}else gb(G)?(o.flags|=192,o.child=i.child,o=null):(i=Q.treeContext,En=hi(G.nextSibling),sr=o,Zt=!0,Us=null,di=!1,i!==null&&P0(o,i),o=jg(o,p.children),o.flags|=4096);return o}return k?(Zs(),G=p.fallback,k=o.mode,Q=i.child,pe=Q.sibling,p=as(Q,{mode:"hidden",children:p.children}),p.subtreeFlags=Q.subtreeFlags&65011712,pe!==null?G=as(pe,G):(G=jo(G,k,u,null),G.flags|=2),G.return=o,p.return=o,p.sibling=G,o.child=p,Ru(null,p),p=o.child,G=i.child.memoizedState,G===null?G=Dg(u):(k=G.cachePool,k!==null?(Q=Gn._currentValue,k=k.parent!==Q?{parent:Q,pool:Q}:k):k=H0(),G={baseLanes:G.baseLanes|u,cachePool:k}),p.memoizedState=G,p.childLanes=zg(i,I,u),o.memoizedState=Mg,Ru(i.child,p)):(Ks(o),u=i.child,i=u.sibling,u=as(u,{mode:"visible",children:p.children}),u.return=o,u.sibling=null,i!==null&&(I=o.deletions,I===null?(o.deletions=[i],o.flags|=16):I.push(i)),o.child=u,o.memoizedState=null,u)}function jg(i,o){return o=ud({mode:"visible",children:o},i.mode),o.return=i,i.child=o}function ud(i,o){return i=Xr(22,i,null,o),i.lanes=0,i}function Lg(i,o,u){return qo(o,i.child,null,u),i=jg(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function rw(i,o,u){i.lanes|=o;var p=i.alternate;p!==null&&(p.lanes|=o),Qm(i.return,o,u)}function Pg(i,o,u,p,k,w){var I=i.memoizedState;I===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:p,tail:u,tailMode:k,treeForkCount:w}:(I.isBackwards=o,I.rendering=null,I.renderingStartTime=0,I.last=p,I.tail=u,I.tailMode=k,I.treeForkCount=w)}function iw(i,o,u){var p=o.pendingProps,k=p.revealOrder,w=p.tail;p=p.children;var I=$n.current,G=(I&2)!==0;if(G?(I=I&1|2,o.flags|=128):I&=1,j($n,I),ar(i,o,p,u),p=Zt?hu:0,!G&&i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&rw(i,u,o);else if(i.tag===19)rw(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(k){case"forwards":for(u=o.child,k=null;u!==null;)i=u.alternate,i!==null&&Xf(i)===null&&(k=u),u=u.sibling;u=k,u===null?(k=o.child,o.child=null):(k=u.sibling,u.sibling=null),Pg(o,!1,k,u,w,p);break;case"backwards":case"unstable_legacy-backwards":for(u=null,k=o.child,o.child=null;k!==null;){if(i=k.alternate,i!==null&&Xf(i)===null){o.child=k;break}i=k.sibling,k.sibling=u,u=k,k=i}Pg(o,!0,u,null,w,p);break;case"together":Pg(o,!1,null,null,void 0,p);break;default:o.memoizedState=null}return o.child}function ps(i,o,u){if(i!==null&&(o.dependencies=i.dependencies),Qs|=o.lanes,(u&o.childLanes)===0)if(i!==null){if(Fa(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=as(i,i.pendingProps),o.child=u,u.return=o;i.sibling!==null;)i=i.sibling,u=u.sibling=as(i,i.pendingProps),u.return=o;u.sibling=null}return o.child}function $g(i,o){return(i.lanes&o)!==0?!0:(i=i.dependencies,!!(i!==null&&qf(i)))}function aL(i,o,u){switch(o.tag){case 3:ue(o,o.stateNode.containerInfo),Hs(o,Gn,i.memoizedState.cache),Lo();break;case 27:case 5:ge(o);break;case 4:ue(o,o.stateNode.containerInfo);break;case 10:Hs(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,cg(o),null;break;case 13:var p=o.memoizedState;if(p!==null)return p.dehydrated!==null?(Ks(o),o.flags|=128,null):(u&o.child.childLanes)!==0?nw(i,o,u):(Ks(o),i=ps(i,o,u),i!==null?i.sibling:null);Ks(o);break;case 19:var k=(i.flags&128)!==0;if(p=(u&o.childLanes)!==0,p||(Fa(i,o,u,!1),p=(u&o.childLanes)!==0),k){if(p)return iw(i,o,u);o.flags|=128}if(k=o.memoizedState,k!==null&&(k.rendering=null,k.tail=null,k.lastEffect=null),j($n,$n.current),p)break;return null;case 22:return o.lanes=0,YS(i,o,u,o.pendingProps);case 24:Hs(o,Gn,i.memoizedState.cache)}return ps(i,o,u)}function sw(i,o,u){if(i!==null)if(i.memoizedProps!==o.pendingProps)Wn=!0;else{if(!$g(i,u)&&(o.flags&128)===0)return Wn=!1,aL(i,o,u);Wn=(i.flags&131072)!==0}else Wn=!1,Zt&&(o.flags&1048576)!==0&&L0(o,hu,o.index);switch(o.lanes=0,o.tag){case 16:e:{var p=o.pendingProps;if(i=Fo(o.elementType),o.type=i,typeof i=="function")Hm(i)?(p=Go(i,p),o.tag=1,o=ew(null,o,i,p,u)):(o.tag=0,o=Ig(null,o,i,p,u));else{if(i!=null){var k=i.$$typeof;if(k===C){o.tag=11,o=WS(null,o,i,p,u);break e}else if(k===N){o.tag=14,o=KS(null,o,i,p,u);break e}}throw o=L(i)||i,Error(r(306,o,""))}}return o;case 0:return Ig(i,o,o.type,o.pendingProps,u);case 1:return p=o.type,k=Go(p,o.pendingProps),ew(i,o,p,k,u);case 3:e:{if(ue(o,o.stateNode.containerInfo),i===null)throw Error(r(387));p=o.pendingProps;var w=o.memoizedState;k=w.element,sg(i,o),Su(o,p,null,u);var I=o.memoizedState;if(p=I.cache,Hs(o,Gn,p),p!==w.cache&&Jm(o,[Gn],u,!0),xu(),p=I.element,w.isDehydrated)if(w={element:p,isDehydrated:!1,cache:I.cache},o.updateQueue.baseState=w,o.memoizedState=w,o.flags&256){o=tw(i,o,p,u);break e}else if(p!==k){k=ui(Error(r(424)),o),mu(k),o=tw(i,o,p,u);break e}else for(i=o.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,En=hi(i.firstChild),sr=o,Zt=!0,Us=null,di=!0,u=Y0(o,null,p,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Lo(),p===k){o=ps(i,o,u);break e}ar(i,o,p,u)}o=o.child}return o;case 26:return ld(i,o),i===null?(u=g1(o.type,null,o.pendingProps,null))?o.memoizedState=u:Zt||(u=o.type,i=o.pendingProps,p=Td(re.current).createElement(u),p[bt]=o,p[Yt]=i,lr(p,u,i),qn(p),o.stateNode=p):o.memoizedState=g1(o.type,i.memoizedProps,o.pendingProps,i.memoizedState),null;case 27:return ge(o),i===null&&Zt&&(p=o.stateNode=p1(o.type,o.pendingProps,re.current),sr=o,di=!0,k=En,ro(o.type)?(yb=k,En=hi(p.firstChild)):En=k),ar(i,o,o.pendingProps.children,u),ld(i,o),i===null&&(o.flags|=4194304),o.child;case 5:return i===null&&Zt&&((k=p=En)&&(p=LL(p,o.type,o.pendingProps,di),p!==null?(o.stateNode=p,sr=o,En=hi(p.firstChild),di=!1,k=!0):k=!1),k||qs(o)),ge(o),k=o.type,w=o.pendingProps,I=i!==null?i.memoizedProps:null,p=w.children,pb(k,w)?p=null:I!==null&&pb(k,I)&&(o.flags|=32),o.memoizedState!==null&&(k=dg(i,o,Qj,null,null,u),Uu._currentValue=k),ld(i,o),ar(i,o,p,u),o.child;case 6:return i===null&&Zt&&((i=u=En)&&(u=PL(u,o.pendingProps,di),u!==null?(o.stateNode=u,sr=o,En=null,i=!0):i=!1),i||qs(o)),null;case 13:return nw(i,o,u);case 4:return ue(o,o.stateNode.containerInfo),p=o.pendingProps,i===null?o.child=qo(o,null,p,u):ar(i,o,p,u),o.child;case 11:return WS(i,o,o.type,o.pendingProps,u);case 7:return ar(i,o,o.pendingProps,u),o.child;case 8:return ar(i,o,o.pendingProps.children,u),o.child;case 12:return ar(i,o,o.pendingProps.children,u),o.child;case 10:return p=o.pendingProps,Hs(o,o.type,p.value),ar(i,o,p.children,u),o.child;case 9:return k=o.type._context,p=o.pendingProps.children,$o(o),k=or(k),p=p(k),o.flags|=1,ar(i,o,p,u),o.child;case 14:return KS(i,o,o.type,o.pendingProps,u);case 15:return ZS(i,o,o.type,o.pendingProps,u);case 19:return iw(i,o,u);case 31:return oL(i,o,u);case 22:return YS(i,o,u,o.pendingProps);case 24:return $o(o),p=or(Gn),i===null?(k=ng(),k===null&&(k=gn,w=eg(),k.pooledCache=w,w.refCount++,w!==null&&(k.pooledCacheLanes|=u),k=w),o.memoizedState={parent:p,cache:k},ig(o),Hs(o,Gn,k)):((i.lanes&u)!==0&&(sg(i,o),Su(o,null,null,u),xu()),k=i.memoizedState,w=o.memoizedState,k.parent!==p?(k={parent:p,cache:p},o.memoizedState=k,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=k),Hs(o,Gn,p)):(p=w.cache,Hs(o,Gn,p),p!==k.cache&&Jm(o,[Gn],u,!0))),ar(i,o,o.pendingProps.children,u),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function hs(i){i.flags|=4}function Bg(i,o,u,p,k){if((o=(i.mode&32)!==0)&&(o=!1),o){if(i.flags|=16777216,(k&335544128)===k)if(i.stateNode.complete)i.flags|=8192;else if(Iw())i.flags|=8192;else throw Uo=Wf,rg}else i.flags&=-16777217}function ow(i,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!x1(o))if(Iw())i.flags|=8192;else throw Uo=Wf,rg}function cd(i,o){o!==null&&(i.flags|=4),i.flags&16384&&(o=i.tag!==22?Qe():536870912,i.lanes|=o,Ja|=o)}function Cu(i,o){if(!Zt)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 p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function Tn(i){var o=i.alternate!==null&&i.alternate.child===i.child,u=0,p=0;if(o)for(var k=i.child;k!==null;)u|=k.lanes|k.childLanes,p|=k.subtreeFlags&65011712,p|=k.flags&65011712,k.return=i,k=k.sibling;else for(k=i.child;k!==null;)u|=k.lanes|k.childLanes,p|=k.subtreeFlags,p|=k.flags,k.return=i,k=k.sibling;return i.subtreeFlags|=p,i.childLanes=u,o}function lL(i,o,u){var p=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 Tn(o),null;case 1:return Tn(o),null;case 3:return u=o.stateNode,p=null,i!==null&&(p=i.memoizedState.cache),o.memoizedState.cache!==p&&(o.flags|=2048),cs(Gn),ce(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(Ba(o)?hs(o):i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Ym())),Tn(o),null;case 26:var k=o.type,w=o.memoizedState;return i===null?(hs(o),w!==null?(Tn(o),ow(o,w)):(Tn(o),Bg(o,k,null,p,u))):w?w!==i.memoizedState?(hs(o),Tn(o),ow(o,w)):(Tn(o),o.flags&=-16777217):(i=i.memoizedProps,i!==p&&hs(o),Tn(o),Bg(o,k,i,p,u)),null;case 27:if(Ce(o),u=re.current,k=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==p&&hs(o);else{if(!p){if(o.stateNode===null)throw Error(r(166));return Tn(o),null}i=X.current,Ba(o)?$0(o):(i=p1(k,p,u),o.stateNode=i,hs(o))}return Tn(o),null;case 5:if(Ce(o),k=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==p&&hs(o);else{if(!p){if(o.stateNode===null)throw Error(r(166));return Tn(o),null}if(w=X.current,Ba(o))$0(o);else{var I=Td(re.current);switch(w){case 1:w=I.createElementNS("http://www.w3.org/2000/svg",k);break;case 2:w=I.createElementNS("http://www.w3.org/1998/Math/MathML",k);break;default:switch(k){case"svg":w=I.createElementNS("http://www.w3.org/2000/svg",k);break;case"math":w=I.createElementNS("http://www.w3.org/1998/Math/MathML",k);break;case"script":w=I.createElement("div"),w.innerHTML="<script><\/script>",w=w.removeChild(w.firstChild);break;case"select":w=typeof p.is=="string"?I.createElement("select",{is:p.is}):I.createElement("select"),p.multiple?w.multiple=!0:p.size&&(w.size=p.size);break;default:w=typeof p.is=="string"?I.createElement(k,{is:p.is}):I.createElement(k)}}w[bt]=o,w[Yt]=p;e:for(I=o.child;I!==null;){if(I.tag===5||I.tag===6)w.appendChild(I.stateNode);else if(I.tag!==4&&I.tag!==27&&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}o.stateNode=w;e:switch(lr(w,k,p),k){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&hs(o)}}return Tn(o),Bg(o,o.type,i===null?null:i.memoizedProps,o.pendingProps,u),null;case 6:if(i&&o.stateNode!=null)i.memoizedProps!==p&&hs(o);else{if(typeof p!="string"&&o.stateNode===null)throw Error(r(166));if(i=re.current,Ba(o)){if(i=o.stateNode,u=o.memoizedProps,p=null,k=sr,k!==null)switch(k.tag){case 27:case 5:p=k.memoizedProps}i[bt]=o,i=!!(i.nodeValue===u||p!==null&&p.suppressHydrationWarning===!0||n1(i.nodeValue,u)),i||qs(o,!0)}else i=Td(i).createTextNode(p),i[bt]=o,o.stateNode=i}return Tn(o),null;case 31:if(u=o.memoizedState,i===null||i.memoizedState!==null){if(p=Ba(o),u!==null){if(i===null){if(!p)throw Error(r(318));if(i=o.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[bt]=o}else Lo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Tn(o),i=!1}else u=Ym(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return o.flags&256?(Jr(o),o):(Jr(o),null);if((o.flags&128)!==0)throw Error(r(558))}return Tn(o),null;case 13:if(p=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(k=Ba(o),p!==null&&p.dehydrated!==null){if(i===null){if(!k)throw Error(r(318));if(k=o.memoizedState,k=k!==null?k.dehydrated:null,!k)throw Error(r(317));k[bt]=o}else Lo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Tn(o),k=!1}else k=Ym(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=k),k=!0;if(!k)return o.flags&256?(Jr(o),o):(Jr(o),null)}return Jr(o),(o.flags&128)!==0?(o.lanes=u,o):(u=p!==null,i=i!==null&&i.memoizedState!==null,u&&(p=o.child,k=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(k=p.alternate.memoizedState.cachePool.pool),w=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(w=p.memoizedState.cachePool.pool),w!==k&&(p.flags|=2048)),u!==i&&u&&(o.child.flags|=8192),cd(o,o.updateQueue),Tn(o),null);case 4:return ce(),i===null&&lb(o.stateNode.containerInfo),Tn(o),null;case 10:return cs(o.type),Tn(o),null;case 19:if(V($n),p=o.memoizedState,p===null)return Tn(o),null;if(k=(o.flags&128)!==0,w=p.rendering,w===null)if(k)Cu(p,!1);else{if(Ln!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(w=Xf(i),w!==null){for(o.flags|=128,Cu(p,!1),i=w.updateQueue,o.updateQueue=i,cd(o,i),o.subtreeFlags=0,i=u,u=o.child;u!==null;)D0(u,i),u=u.sibling;return j($n,$n.current&1|2),Zt&&ls(o,p.treeForkCount),o.child}i=i.sibling}p.tail!==null&&te()>md&&(o.flags|=128,k=!0,Cu(p,!1),o.lanes=4194304)}else{if(!k)if(i=Xf(w),i!==null){if(o.flags|=128,k=!0,i=i.updateQueue,o.updateQueue=i,cd(o,i),Cu(p,!0),p.tail===null&&p.tailMode==="hidden"&&!w.alternate&&!Zt)return Tn(o),null}else 2*te()-p.renderingStartTime>md&&u!==536870912&&(o.flags|=128,k=!0,Cu(p,!1),o.lanes=4194304);p.isBackwards?(w.sibling=o.child,o.child=w):(i=p.last,i!==null?i.sibling=w:o.child=w,p.last=w)}return p.tail!==null?(i=p.tail,p.rendering=i,p.tail=i.sibling,p.renderingStartTime=te(),i.sibling=null,u=$n.current,j($n,k?u&1|2:u&1),Zt&&ls(o,p.treeForkCount),i):(Tn(o),null);case 22:case 23:return Jr(o),ug(),p=o.memoizedState!==null,i!==null?i.memoizedState!==null!==p&&(o.flags|=8192):p&&(o.flags|=8192),p?(u&536870912)!==0&&(o.flags&128)===0&&(Tn(o),o.subtreeFlags&6&&(o.flags|=8192)):Tn(o),u=o.updateQueue,u!==null&&cd(o,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),p=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),p!==u&&(o.flags|=2048),i!==null&&V(Bo),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),cs(Gn),Tn(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function uL(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 cs(Gn),ce(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 26:case 27:case 5:return Ce(o),null;case 31:if(o.memoizedState!==null){if(Jr(o),o.alternate===null)throw Error(r(340));Lo()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 13:if(Jr(o),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(r(340));Lo()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return V($n),null;case 4:return ce(),null;case 10:return cs(o.type),null;case 22:case 23:return Jr(o),ug(),i!==null&&V(Bo),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 24:return cs(Gn),null;case 25:return null;default:return null}}function aw(i,o){switch(Km(o),o.tag){case 3:cs(Gn),ce();break;case 26:case 27:case 5:Ce(o);break;case 4:ce();break;case 31:o.memoizedState!==null&&Jr(o);break;case 13:Jr(o);break;case 19:V($n);break;case 10:cs(o.type);break;case 22:case 23:Jr(o),ug(),i!==null&&V(Bo);break;case 24:cs(Gn)}}function Nu(i,o){try{var u=o.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var k=p.next;u=k;do{if((u.tag&i)===i){p=void 0;var w=u.create,I=u.inst;p=w(),I.destroy=p}u=u.next}while(u!==k)}}catch(G){ln(o,o.return,G)}}function Ys(i,o,u){try{var p=o.updateQueue,k=p!==null?p.lastEffect:null;if(k!==null){var w=k.next;p=w;do{if((p.tag&i)===i){var I=p.inst,G=I.destroy;if(G!==void 0){I.destroy=void 0,k=o;var Q=u,pe=G;try{pe()}catch(Re){ln(k,Q,Re)}}}p=p.next}while(p!==w)}}catch(Re){ln(o,o.return,Re)}}function lw(i){var o=i.updateQueue;if(o!==null){var u=i.stateNode;try{Q0(o,u)}catch(p){ln(i,i.return,p)}}}function uw(i,o,u){u.props=Go(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(p){ln(i,o,p)}}function Au(i,o){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var p=i.stateNode;break;case 30:p=i.stateNode;break;default:p=i.stateNode}typeof u=="function"?i.refCleanup=u(p):u.current=p}}catch(k){ln(i,o,k)}}function Pi(i,o){var u=i.ref,p=i.refCleanup;if(u!==null)if(typeof p=="function")try{p()}catch(k){ln(i,o,k)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(k){ln(i,o,k)}else u.current=null}function cw(i){var o=i.type,u=i.memoizedProps,p=i.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":u.autoFocus&&p.focus();break e;case"img":u.src?p.src=u.src:u.srcSet&&(p.srcset=u.srcSet)}}catch(k){ln(i,i.return,k)}}function Fg(i,o,u){try{var p=i.stateNode;OL(p,i.type,u,o),p[Yt]=o}catch(k){ln(i,i.return,k)}}function fw(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&ro(i.type)||i.tag===4}function Ug(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||fw(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&&ro(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 qg(i,o,u){var p=i.tag;if(p===5||p===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=Ve));else if(p!==4&&(p===27&&ro(i.type)&&(u=i.stateNode,o=null),i=i.child,i!==null))for(qg(i,o,u),i=i.sibling;i!==null;)qg(i,o,u),i=i.sibling}function fd(i,o,u){var p=i.tag;if(p===5||p===6)i=i.stateNode,o?u.insertBefore(i,o):u.appendChild(i);else if(p!==4&&(p===27&&ro(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(fd(i,o,u),i=i.sibling;i!==null;)fd(i,o,u),i=i.sibling}function dw(i){var o=i.stateNode,u=i.memoizedProps;try{for(var p=i.type,k=o.attributes;k.length;)o.removeAttributeNode(k[0]);lr(o,p,u),o[bt]=i,o[Yt]=u}catch(w){ln(i,i.return,w)}}var ms=!1,Kn=!1,Hg=!1,pw=typeof WeakSet=="function"?WeakSet:Set,nr=null;function cL(i,o){if(i=i.containerInfo,fb=Id,i=T0(i),Lm(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var p=u.getSelection&&u.getSelection();if(p&&p.rangeCount!==0){u=p.anchorNode;var k=p.anchorOffset,w=p.focusNode;p=p.focusOffset;try{u.nodeType,w.nodeType}catch{u=null;break e}var I=0,G=-1,Q=-1,pe=0,Re=0,Oe=i,me=null;t:for(;;){for(var ve;Oe!==u||k!==0&&Oe.nodeType!==3||(G=I+k),Oe!==w||p!==0&&Oe.nodeType!==3||(Q=I+p),Oe.nodeType===3&&(I+=Oe.nodeValue.length),(ve=Oe.firstChild)!==null;)me=Oe,Oe=ve;for(;;){if(Oe===i)break t;if(me===u&&++pe===k&&(G=I),me===w&&++Re===p&&(Q=I),(ve=Oe.nextSibling)!==null)break;Oe=me,me=Oe.parentNode}Oe=ve}u=G===-1||Q===-1?null:{start:G,end:Q}}else u=null}u=u||{start:0,end:0}}else u=null;for(db={focusedElem:i,selectionRange:u},Id=!1,nr=o;nr!==null;)if(o=nr,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,nr=i;else for(;nr!==null;){switch(o=nr,w=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++)k=i[u],k.ref.impl=k.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&w!==null){i=void 0,u=o,k=w.memoizedProps,w=w.memoizedState,p=u.stateNode;try{var et=Go(u.type,k);i=p.getSnapshotBeforeUpdate(et,w),p.__reactInternalSnapshotBeforeUpdate=i}catch(gt){ln(u,u.return,gt)}}break;case 3:if((i&1024)!==0){if(i=o.stateNode.containerInfo,u=i.nodeType,u===9)mb(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":mb(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,nr=i;break}nr=o.return}}function hw(i,o,u){var p=u.flags;switch(u.tag){case 0:case 11:case 15:bs(i,u),p&4&&Nu(5,u);break;case 1:if(bs(i,u),p&4)if(i=u.stateNode,o===null)try{i.componentDidMount()}catch(I){ln(u,u.return,I)}else{var k=Go(u.type,o.memoizedProps);o=o.memoizedState;try{i.componentDidUpdate(k,o,i.__reactInternalSnapshotBeforeUpdate)}catch(I){ln(u,u.return,I)}}p&64&&lw(u),p&512&&Au(u,u.return);break;case 3:if(bs(i,u),p&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{Q0(i,o)}catch(I){ln(u,u.return,I)}}break;case 27:o===null&&p&4&&dw(u);case 26:case 5:bs(i,u),o===null&&p&4&&cw(u),p&512&&Au(u,u.return);break;case 12:bs(i,u);break;case 31:bs(i,u),p&4&&bw(i,u);break;case 13:bs(i,u),p&4&&yw(i,u),p&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=vL.bind(null,u),$L(i,u))));break;case 22:if(p=u.memoizedState!==null||ms,!p){o=o!==null&&o.memoizedState!==null||Kn,k=ms;var w=Kn;ms=p,(Kn=o)&&!w?ys(i,u,(u.subtreeFlags&8772)!==0):bs(i,u),ms=k,Kn=w}break;case 30:break;default:bs(i,u)}}function mw(i){var o=i.alternate;o!==null&&(i.alternate=null,mw(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&eu(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 _n=null,Mr=!1;function gs(i,o,u){for(u=u.child;u!==null;)gw(i,o,u),u=u.sibling}function gw(i,o,u){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(Je,u)}catch{}switch(u.tag){case 26:Kn||Pi(u,o),gs(i,o,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Kn||Pi(u,o);var p=_n,k=Mr;ro(u.type)&&(_n=u.stateNode,Mr=!1),gs(i,o,u),$u(u.stateNode),_n=p,Mr=k;break;case 5:Kn||Pi(u,o);case 6:if(p=_n,k=Mr,_n=null,gs(i,o,u),_n=p,Mr=k,_n!==null)if(Mr)try{(_n.nodeType===9?_n.body:_n.nodeName==="HTML"?_n.ownerDocument.body:_n).removeChild(u.stateNode)}catch(w){ln(u,o,w)}else try{_n.removeChild(u.stateNode)}catch(w){ln(u,o,w)}break;case 18:_n!==null&&(Mr?(i=_n,l1(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),al(i)):l1(_n,u.stateNode));break;case 4:p=_n,k=Mr,_n=u.stateNode.containerInfo,Mr=!0,gs(i,o,u),_n=p,Mr=k;break;case 0:case 11:case 14:case 15:Ys(2,u,o),Kn||Ys(4,u,o),gs(i,o,u);break;case 1:Kn||(Pi(u,o),p=u.stateNode,typeof p.componentWillUnmount=="function"&&uw(u,o,p)),gs(i,o,u);break;case 21:gs(i,o,u);break;case 22:Kn=(p=Kn)||u.memoizedState!==null,gs(i,o,u),Kn=p;break;default:gs(i,o,u)}}function bw(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{al(i)}catch(u){ln(o,o.return,u)}}}function yw(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{al(i)}catch(u){ln(o,o.return,u)}}function fL(i){switch(i.tag){case 31:case 13:case 19:var o=i.stateNode;return o===null&&(o=i.stateNode=new pw),o;case 22:return i=i.stateNode,o=i._retryCache,o===null&&(o=i._retryCache=new pw),o;default:throw Error(r(435,i.tag))}}function dd(i,o){var u=fL(i);o.forEach(function(p){if(!u.has(p)){u.add(p);var k=kL.bind(null,i,p);p.then(k,k)}})}function Dr(i,o){var u=o.deletions;if(u!==null)for(var p=0;p<u.length;p++){var k=u[p],w=i,I=o,G=I;e:for(;G!==null;){switch(G.tag){case 27:if(ro(G.type)){_n=G.stateNode,Mr=!1;break e}break;case 5:_n=G.stateNode,Mr=!1;break e;case 3:case 4:_n=G.stateNode.containerInfo,Mr=!0;break e}G=G.return}if(_n===null)throw Error(r(160));gw(w,I,k),_n=null,Mr=!1,w=k.alternate,w!==null&&(w.return=null),k.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)vw(o,i),o=o.sibling}var Ri=null;function vw(i,o){var u=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Dr(o,i),zr(i),p&4&&(Ys(3,i,i.return),Nu(3,i),Ys(5,i,i.return));break;case 1:Dr(o,i),zr(i),p&512&&(Kn||u===null||Pi(u,u.return)),p&64&&ms&&(i=i.updateQueue,i!==null&&(p=i.callbacks,p!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?p:u.concat(p))));break;case 26:var k=Ri;if(Dr(o,i),zr(i),p&512&&(Kn||u===null||Pi(u,u.return)),p&4){var w=u!==null?u.memoizedState:null;if(p=i.memoizedState,u===null)if(p===null)if(i.stateNode===null){e:{p=i.type,u=i.memoizedProps,k=k.ownerDocument||k;t:switch(p){case"title":w=k.getElementsByTagName("title")[0],(!w||w[ns]||w[bt]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=k.createElement(p),k.head.insertBefore(w,k.querySelector("head > title"))),lr(w,p,u),w[bt]=i,qn(w),p=w;break e;case"link":var I=v1("link","href",k).get(p+(u.href||""));if(I){for(var G=0;G<I.length;G++)if(w=I[G],w.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&w.getAttribute("rel")===(u.rel==null?null:u.rel)&&w.getAttribute("title")===(u.title==null?null:u.title)&&w.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){I.splice(G,1);break t}}w=k.createElement(p),lr(w,p,u),k.head.appendChild(w);break;case"meta":if(I=v1("meta","content",k).get(p+(u.content||""))){for(G=0;G<I.length;G++)if(w=I[G],w.getAttribute("content")===(u.content==null?null:""+u.content)&&w.getAttribute("name")===(u.name==null?null:u.name)&&w.getAttribute("property")===(u.property==null?null:u.property)&&w.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&w.getAttribute("charset")===(u.charSet==null?null:u.charSet)){I.splice(G,1);break t}}w=k.createElement(p),lr(w,p,u),k.head.appendChild(w);break;default:throw Error(r(468,p))}w[bt]=i,qn(w),p=w}i.stateNode=p}else k1(k,i.type,i.stateNode);else i.stateNode=y1(k,p,i.memoizedProps);else w!==p?(w===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):w.count--,p===null?k1(k,i.type,i.stateNode):y1(k,p,i.memoizedProps)):p===null&&i.stateNode!==null&&Fg(i,i.memoizedProps,u.memoizedProps)}break;case 27:Dr(o,i),zr(i),p&512&&(Kn||u===null||Pi(u,u.return)),u!==null&&p&4&&Fg(i,i.memoizedProps,u.memoizedProps);break;case 5:if(Dr(o,i),zr(i),p&512&&(Kn||u===null||Pi(u,u.return)),i.flags&32){k=i.stateNode;try{yt(k,"")}catch(et){ln(i,i.return,et)}}p&4&&i.stateNode!=null&&(k=i.memoizedProps,Fg(i,k,u!==null?u.memoizedProps:k)),p&1024&&(Hg=!0);break;case 6:if(Dr(o,i),zr(i),p&4){if(i.stateNode===null)throw Error(r(162));p=i.memoizedProps,u=i.stateNode;try{u.nodeValue=p}catch(et){ln(i,i.return,et)}}break;case 3:if(Cd=null,k=Ri,Ri=_d(o.containerInfo),Dr(o,i),Ri=k,zr(i),p&4&&u!==null&&u.memoizedState.isDehydrated)try{al(o.containerInfo)}catch(et){ln(i,i.return,et)}Hg&&(Hg=!1,kw(i));break;case 4:p=Ri,Ri=_d(i.stateNode.containerInfo),Dr(o,i),zr(i),Ri=p;break;case 12:Dr(o,i),zr(i);break;case 31:Dr(o,i),zr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,dd(i,p)));break;case 13:Dr(o,i),zr(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(hd=te()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,dd(i,p)));break;case 22:k=i.memoizedState!==null;var Q=u!==null&&u.memoizedState!==null,pe=ms,Re=Kn;if(ms=pe||k,Kn=Re||Q,Dr(o,i),Kn=Re,ms=pe,zr(i),p&8192)e:for(o=i.stateNode,o._visibility=k?o._visibility&-2:o._visibility|1,k&&(u===null||Q||ms||Kn||Vo(i)),u=null,o=i;;){if(o.tag===5||o.tag===26){if(u===null){Q=u=o;try{if(w=Q.stateNode,k)I=w.style,typeof I.setProperty=="function"?I.setProperty("display","none","important"):I.display="none";else{G=Q.stateNode;var Oe=Q.memoizedProps.style,me=Oe!=null&&Oe.hasOwnProperty("display")?Oe.display:null;G.style.display=me==null||typeof me=="boolean"?"":(""+me).trim()}}catch(et){ln(Q,Q.return,et)}}}else if(o.tag===6){if(u===null){Q=o;try{Q.stateNode.nodeValue=k?"":Q.memoizedProps}catch(et){ln(Q,Q.return,et)}}}else if(o.tag===18){if(u===null){Q=o;try{var ve=Q.stateNode;k?u1(ve,!0):u1(Q.stateNode,!1)}catch(et){ln(Q,Q.return,et)}}}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}p&4&&(p=i.updateQueue,p!==null&&(u=p.retryQueue,u!==null&&(p.retryQueue=null,dd(i,u))));break;case 19:Dr(o,i),zr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,dd(i,p)));break;case 30:break;case 21:break;default:Dr(o,i),zr(i)}}function zr(i){var o=i.flags;if(o&2){try{for(var u,p=i.return;p!==null;){if(fw(p)){u=p;break}p=p.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var k=u.stateNode,w=Ug(i);fd(i,w,k);break;case 5:var I=u.stateNode;u.flags&32&&(yt(I,""),u.flags&=-33);var G=Ug(i);fd(i,G,I);break;case 3:case 4:var Q=u.stateNode.containerInfo,pe=Ug(i);qg(i,pe,Q);break;default:throw Error(r(161))}}catch(Re){ln(i,i.return,Re)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function kw(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var o=i;kw(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),i=i.sibling}}function bs(i,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)hw(i,o.alternate,o),o=o.sibling}function Vo(i){for(i=i.child;i!==null;){var o=i;switch(o.tag){case 0:case 11:case 14:case 15:Ys(4,o,o.return),Vo(o);break;case 1:Pi(o,o.return);var u=o.stateNode;typeof u.componentWillUnmount=="function"&&uw(o,o.return,u),Vo(o);break;case 27:$u(o.stateNode);case 26:case 5:Pi(o,o.return),Vo(o);break;case 22:o.memoizedState===null&&Vo(o);break;case 30:Vo(o);break;default:Vo(o)}i=i.sibling}}function ys(i,o,u){for(u=u&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var p=o.alternate,k=i,w=o,I=w.flags;switch(w.tag){case 0:case 11:case 15:ys(k,w,u),Nu(4,w);break;case 1:if(ys(k,w,u),p=w,k=p.stateNode,typeof k.componentDidMount=="function")try{k.componentDidMount()}catch(pe){ln(p,p.return,pe)}if(p=w,k=p.updateQueue,k!==null){var G=p.stateNode;try{var Q=k.shared.hiddenCallbacks;if(Q!==null)for(k.shared.hiddenCallbacks=null,k=0;k<Q.length;k++)X0(Q[k],G)}catch(pe){ln(p,p.return,pe)}}u&&I&64&&lw(w),Au(w,w.return);break;case 27:dw(w);case 26:case 5:ys(k,w,u),u&&p===null&&I&4&&cw(w),Au(w,w.return);break;case 12:ys(k,w,u);break;case 31:ys(k,w,u),u&&I&4&&bw(k,w);break;case 13:ys(k,w,u),u&&I&4&&yw(k,w);break;case 22:w.memoizedState===null&&ys(k,w,u),Au(w,w.return);break;case 30:break;default:ys(k,w,u)}o=o.sibling}}function Gg(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&&gu(u))}function Vg(i,o){i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&gu(i))}function Ci(i,o,u,p){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)xw(i,o,u,p),o=o.sibling}function xw(i,o,u,p){var k=o.flags;switch(o.tag){case 0:case 11:case 15:Ci(i,o,u,p),k&2048&&Nu(9,o);break;case 1:Ci(i,o,u,p);break;case 3:Ci(i,o,u,p),k&2048&&(i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&gu(i)));break;case 12:if(k&2048){Ci(i,o,u,p),i=o.stateNode;try{var w=o.memoizedProps,I=w.id,G=w.onPostCommit;typeof G=="function"&&G(I,o.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(Q){ln(o,o.return,Q)}}else Ci(i,o,u,p);break;case 31:Ci(i,o,u,p);break;case 13:Ci(i,o,u,p);break;case 23:break;case 22:w=o.stateNode,I=o.alternate,o.memoizedState!==null?w._visibility&2?Ci(i,o,u,p):Ou(i,o):w._visibility&2?Ci(i,o,u,p):(w._visibility|=2,Ya(i,o,u,p,(o.subtreeFlags&10256)!==0||!1)),k&2048&&Gg(I,o);break;case 24:Ci(i,o,u,p),k&2048&&Vg(o.alternate,o);break;default:Ci(i,o,u,p)}}function Ya(i,o,u,p,k){for(k=k&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var w=i,I=o,G=u,Q=p,pe=I.flags;switch(I.tag){case 0:case 11:case 15:Ya(w,I,G,Q,k),Nu(8,I);break;case 23:break;case 22:var Re=I.stateNode;I.memoizedState!==null?Re._visibility&2?Ya(w,I,G,Q,k):Ou(w,I):(Re._visibility|=2,Ya(w,I,G,Q,k)),k&&pe&2048&&Gg(I.alternate,I);break;case 24:Ya(w,I,G,Q,k),k&&pe&2048&&Vg(I.alternate,I);break;default:Ya(w,I,G,Q,k)}o=o.sibling}}function Ou(i,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var u=i,p=o,k=p.flags;switch(p.tag){case 22:Ou(u,p),k&2048&&Gg(p.alternate,p);break;case 24:Ou(u,p),k&2048&&Vg(p.alternate,p);break;default:Ou(u,p)}o=o.sibling}}var Iu=8192;function Xa(i,o,u){if(i.subtreeFlags&Iu)for(i=i.child;i!==null;)Sw(i,o,u),i=i.sibling}function Sw(i,o,u){switch(i.tag){case 26:Xa(i,o,u),i.flags&Iu&&i.memoizedState!==null&&XL(u,Ri,i.memoizedState,i.memoizedProps);break;case 5:Xa(i,o,u);break;case 3:case 4:var p=Ri;Ri=_d(i.stateNode.containerInfo),Xa(i,o,u),Ri=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=Iu,Iu=16777216,Xa(i,o,u),Iu=p):Xa(i,o,u));break;default:Xa(i,o,u)}}function ww(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 Mu(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var p=o[u];nr=p,Tw(p,i)}ww(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Ew(i),i=i.sibling}function Ew(i){switch(i.tag){case 0:case 11:case 15:Mu(i),i.flags&2048&&Ys(9,i,i.return);break;case 3:Mu(i);break;case 12:Mu(i);break;case 22:var o=i.stateNode;i.memoizedState!==null&&o._visibility&2&&(i.return===null||i.return.tag!==13)?(o._visibility&=-3,pd(i)):Mu(i);break;default:Mu(i)}}function pd(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var p=o[u];nr=p,Tw(p,i)}ww(i)}for(i=i.child;i!==null;){switch(o=i,o.tag){case 0:case 11:case 15:Ys(8,o,o.return),pd(o);break;case 22:u=o.stateNode,u._visibility&2&&(u._visibility&=-3,pd(o));break;default:pd(o)}i=i.sibling}}function Tw(i,o){for(;nr!==null;){var u=nr;switch(u.tag){case 0:case 11:case 15:Ys(8,u,o);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var p=u.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:gu(u.memoizedState.cache)}if(p=u.child,p!==null)p.return=u,nr=p;else e:for(u=i;nr!==null;){p=nr;var k=p.sibling,w=p.return;if(mw(p),p===u){nr=null;break e}if(k!==null){k.return=w,nr=k;break e}nr=w}}}var dL={getCacheForType:function(i){var o=or(Gn),u=o.data.get(i);return u===void 0&&(u=i(),o.data.set(i,u)),u},cacheSignal:function(){return or(Gn).controller.signal}},pL=typeof WeakMap=="function"?WeakMap:Map,rn=0,gn=null,Ft=null,Vt=0,an=0,ei=null,Xs=!1,Qa=!1,Wg=!1,vs=0,Ln=0,Qs=0,Wo=0,Kg=0,ti=0,Ja=0,Du=null,jr=null,Zg=!1,hd=0,_w=0,md=1/0,gd=null,Js=null,Xn=0,eo=null,el=null,ks=0,Yg=0,Xg=null,Rw=null,zu=0,Qg=null;function ni(){return(rn&2)!==0&&Vt!==0?Vt&-Vt:q.T!==null?ib():$e()}function Cw(){if(ti===0)if((Vt&536870912)===0||Zt){var i=Pt;Pt<<=1,(Pt&3932160)===0&&(Pt=262144),ti=i}else ti=536870912;return i=Qr.current,i!==null&&(i.flags|=32),ti}function Lr(i,o,u){(i===gn&&(an===2||an===9)||i.cancelPendingCommit!==null)&&(tl(i,0),to(i,Vt,ti,!1)),lt(i,u),((rn&2)===0||i!==gn)&&(i===gn&&((rn&2)===0&&(Wo|=u),Ln===4&&to(i,Vt,ti,!1)),$i(i))}function Nw(i,o,u){if((rn&6)!==0)throw Error(r(327));var p=!u&&(o&127)===0&&(o&i.expiredLanes)===0||he(i,o),k=p?gL(i,o):eb(i,o,!0),w=p;do{if(k===0){Qa&&!p&&to(i,o,0,!1);break}else{if(u=i.current.alternate,w&&!hL(u)){k=eb(i,o,!1),w=!1;continue}if(k===2){if(w=o,i.errorRecoveryDisabledLanes&w)var I=0;else I=i.pendingLanes&-536870913,I=I!==0?I:I&536870912?536870912:0;if(I!==0){o=I;e:{var G=i;k=Du;var Q=G.current.memoizedState.isDehydrated;if(Q&&(tl(G,I).flags|=256),I=eb(G,I,!1),I!==2){if(Wg&&!Q){G.errorRecoveryDisabledLanes|=w,Wo|=w,k=4;break e}w=jr,jr=k,w!==null&&(jr===null?jr=w:jr.push.apply(jr,w))}k=I}if(w=!1,k!==2)continue}}if(k===1){tl(i,0),to(i,o,0,!0);break}e:{switch(p=i,w=k,w){case 0:case 1:throw Error(r(345));case 4:if((o&4194048)!==o)break;case 6:to(p,o,ti,!Xs);break e;case 2:jr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(k=hd+300-te(),10<k)){if(to(p,o,ti,!Xs),Y(p,0,!0)!==0)break e;ks=o,p.timeoutHandle=o1(Aw.bind(null,p,u,jr,gd,Zg,o,ti,Wo,Ja,Xs,w,"Throttled",-0,0),k);break e}Aw(p,u,jr,gd,Zg,o,ti,Wo,Ja,Xs,w,null,-0,0)}}break}while(!0);$i(i)}function Aw(i,o,u,p,k,w,I,G,Q,pe,Re,Oe,me,ve){if(i.timeoutHandle=-1,Oe=o.subtreeFlags,Oe&8192||(Oe&16785408)===16785408){Oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ve},Sw(o,w,Oe);var et=(w&62914560)===w?hd-te():(w&4194048)===w?_w-te():0;if(et=QL(Oe,et),et!==null){ks=w,i.cancelPendingCommit=et(Pw.bind(null,i,o,w,u,p,k,I,G,Q,Re,Oe,null,me,ve)),to(i,w,I,!pe);return}}Pw(i,o,w,u,p,k,I,G,Q)}function hL(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 p=0;p<u.length;p++){var k=u[p],w=k.getSnapshot;k=k.value;try{if(!Yr(w(),k))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 to(i,o,u,p){o&=~Kg,o&=~Wo,i.suspendedLanes|=o,i.pingedLanes&=~o,p&&(i.warmLanes|=o),p=i.expirationTimes;for(var k=o;0<k;){var w=31-st(k),I=1<<w;p[w]=-1,k&=~I}u!==0&&_e(i,u,o)}function bd(){return(rn&6)===0?(ju(0),!1):!0}function Jg(){if(Ft!==null){if(an===0)var i=Ft.return;else i=Ft,us=Po=null,mg(i),Ga=null,yu=0,i=Ft;for(;i!==null;)aw(i.alternate,i),i=i.return;Ft=null}}function tl(i,o){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,DL(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),ks=0,Jg(),gn=i,Ft=u=as(i.current,null),Vt=o,an=0,ei=null,Xs=!1,Qa=he(i,o),Wg=!1,Ja=ti=Kg=Wo=Qs=Ln=0,jr=Du=null,Zg=!1,(o&8)!==0&&(o|=o&32);var p=i.entangledLanes;if(p!==0)for(i=i.entanglements,p&=o;0<p;){var k=31-st(p),w=1<<k;o|=i[k],p&=~w}return vs=o,Pf(),u}function Ow(i,o){At=null,q.H=_u,o===Ha||o===Vf?(o=W0(),an=3):o===rg?(o=W0(),an=4):an=o===Og?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,ei=o,Ft===null&&(Ln=1,od(i,ui(o,i.current)))}function Iw(){var i=Qr.current;return i===null?!0:(Vt&4194048)===Vt?pi===null:(Vt&62914560)===Vt||(Vt&536870912)!==0?i===pi:!1}function Mw(){var i=q.H;return q.H=_u,i===null?_u:i}function Dw(){var i=q.A;return q.A=dL,i}function yd(){Ln=4,Xs||(Vt&4194048)!==Vt&&Qr.current!==null||(Qa=!0),(Qs&134217727)===0&&(Wo&134217727)===0||gn===null||to(gn,Vt,ti,!1)}function eb(i,o,u){var p=rn;rn|=2;var k=Mw(),w=Dw();(gn!==i||Vt!==o)&&(gd=null,tl(i,o)),o=!1;var I=Ln;e:do try{if(an!==0&&Ft!==null){var G=Ft,Q=ei;switch(an){case 8:Jg(),I=6;break e;case 3:case 2:case 9:case 6:Qr.current===null&&(o=!0);var pe=an;if(an=0,ei=null,nl(i,G,Q,pe),u&&Qa){I=0;break e}break;default:pe=an,an=0,ei=null,nl(i,G,Q,pe)}}mL(),I=Ln;break}catch(Re){Ow(i,Re)}while(!0);return o&&i.shellSuspendCounter++,us=Po=null,rn=p,q.H=k,q.A=w,Ft===null&&(gn=null,Vt=0,Pf()),I}function mL(){for(;Ft!==null;)zw(Ft)}function gL(i,o){var u=rn;rn|=2;var p=Mw(),k=Dw();gn!==i||Vt!==o?(gd=null,md=te()+500,tl(i,o)):Qa=he(i,o);e:do try{if(an!==0&&Ft!==null){o=Ft;var w=ei;t:switch(an){case 1:an=0,ei=null,nl(i,o,w,1);break;case 2:case 9:if(G0(w)){an=0,ei=null,jw(o);break}o=function(){an!==2&&an!==9||gn!==i||(an=7),$i(i)},w.then(o,o);break e;case 3:an=7;break e;case 4:an=5;break e;case 7:G0(w)?(an=0,ei=null,jw(o)):(an=0,ei=null,nl(i,o,w,7));break;case 5:var I=null;switch(Ft.tag){case 26:I=Ft.memoizedState;case 5:case 27:var G=Ft;if(I?x1(I):G.stateNode.complete){an=0,ei=null;var Q=G.sibling;if(Q!==null)Ft=Q;else{var pe=G.return;pe!==null?(Ft=pe,vd(pe)):Ft=null}break t}}an=0,ei=null,nl(i,o,w,5);break;case 6:an=0,ei=null,nl(i,o,w,6);break;case 8:Jg(),Ln=6;break e;default:throw Error(r(462))}}bL();break}catch(Re){Ow(i,Re)}while(!0);return us=Po=null,q.H=p,q.A=k,rn=u,Ft!==null?0:(gn=null,Vt=0,Pf(),Ln)}function bL(){for(;Ft!==null&&!ke();)zw(Ft)}function zw(i){var o=sw(i.alternate,i,vs);i.memoizedProps=i.pendingProps,o===null?vd(i):Ft=o}function jw(i){var o=i,u=o.alternate;switch(o.tag){case 15:case 0:o=JS(u,o,o.pendingProps,o.type,void 0,Vt);break;case 11:o=JS(u,o,o.pendingProps,o.type.render,o.ref,Vt);break;case 5:mg(o);default:aw(u,o),o=Ft=D0(o,vs),o=sw(u,o,vs)}i.memoizedProps=i.pendingProps,o===null?vd(i):Ft=o}function nl(i,o,u,p){us=Po=null,mg(o),Ga=null,yu=0;var k=o.return;try{if(sL(i,k,o,u,Vt)){Ln=1,od(i,ui(u,i.current)),Ft=null;return}}catch(w){if(k!==null)throw Ft=k,w;Ln=1,od(i,ui(u,i.current)),Ft=null;return}o.flags&32768?(Zt||p===1?i=!0:Qa||(Vt&536870912)!==0?i=!1:(Xs=i=!0,(p===2||p===9||p===3||p===6)&&(p=Qr.current,p!==null&&p.tag===13&&(p.flags|=16384))),Lw(o,i)):vd(o)}function vd(i){var o=i;do{if((o.flags&32768)!==0){Lw(o,Xs);return}i=o.return;var u=lL(o.alternate,o,vs);if(u!==null){Ft=u;return}if(o=o.sibling,o!==null){Ft=o;return}Ft=o=i}while(o!==null);Ln===0&&(Ln=5)}function Lw(i,o){do{var u=uL(i.alternate,i);if(u!==null){u.flags&=32767,Ft=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!o&&(i=i.sibling,i!==null)){Ft=i;return}Ft=i=u}while(i!==null);Ln=6,Ft=null}function Pw(i,o,u,p,k,w,I,G,Q){i.cancelPendingCommit=null;do kd();while(Xn!==0);if((rn&6)!==0)throw Error(r(327));if(o!==null){if(o===i.current)throw Error(r(177));if(w=o.lanes|o.childLanes,w|=Um,qe(i,u,w,I,G,Q),i===gn&&(Ft=gn=null,Vt=0),el=o,eo=i,ks=u,Yg=w,Xg=k,Rw=p,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,xL(be,function(){return qw(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||p){p=q.T,q.T=null,k=Z.p,Z.p=2,I=rn,rn|=4;try{cL(i,o,u)}finally{rn=I,Z.p=k,q.T=p}}Xn=1,$w(),Bw(),Fw()}}function $w(){if(Xn===1){Xn=0;var i=eo,o=el,u=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||u){u=q.T,q.T=null;var p=Z.p;Z.p=2;var k=rn;rn|=4;try{vw(o,i);var w=db,I=T0(i.containerInfo),G=w.focusedElem,Q=w.selectionRange;if(I!==G&&G&&G.ownerDocument&&E0(G.ownerDocument.documentElement,G)){if(Q!==null&&Lm(G)){var pe=Q.start,Re=Q.end;if(Re===void 0&&(Re=pe),"selectionStart"in G)G.selectionStart=pe,G.selectionEnd=Math.min(Re,G.value.length);else{var Oe=G.ownerDocument||document,me=Oe&&Oe.defaultView||window;if(me.getSelection){var ve=me.getSelection(),et=G.textContent.length,gt=Math.min(Q.start,et),fn=Q.end===void 0?gt:Math.min(Q.end,et);!ve.extend&>>fn&&(I=fn,fn=gt,gt=I);var le=w0(G,gt),ie=w0(G,fn);if(le&&ie&&(ve.rangeCount!==1||ve.anchorNode!==le.node||ve.anchorOffset!==le.offset||ve.focusNode!==ie.node||ve.focusOffset!==ie.offset)){var de=Oe.createRange();de.setStart(le.node,le.offset),ve.removeAllRanges(),gt>fn?(ve.addRange(de),ve.extend(ie.node,ie.offset)):(de.setEnd(ie.node,ie.offset),ve.addRange(de))}}}}for(Oe=[],ve=G;ve=ve.parentNode;)ve.nodeType===1&&Oe.push({element:ve,left:ve.scrollLeft,top:ve.scrollTop});for(typeof G.focus=="function"&&G.focus(),G=0;G<Oe.length;G++){var Ne=Oe[G];Ne.element.scrollLeft=Ne.left,Ne.element.scrollTop=Ne.top}}Id=!!fb,db=fb=null}finally{rn=k,Z.p=p,q.T=u}}i.current=o,Xn=2}}function Bw(){if(Xn===2){Xn=0;var i=eo,o=el,u=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||u){u=q.T,q.T=null;var p=Z.p;Z.p=2;var k=rn;rn|=4;try{hw(i,o.alternate,o)}finally{rn=k,Z.p=p,q.T=u}}Xn=3}}function Fw(){if(Xn===4||Xn===3){Xn=0,Te();var i=eo,o=el,u=ks,p=Rw;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Xn=5:(Xn=0,el=eo=null,Uw(i,i.pendingLanes));var k=i.pendingLanes;if(k===0&&(Js=null),Pe(u),o=o.stateNode,mt&&typeof mt.onCommitFiberRoot=="function")try{mt.onCommitFiberRoot(Je,o,void 0,(o.current.flags&128)===128)}catch{}if(p!==null){o=q.T,k=Z.p,Z.p=2,q.T=null;try{for(var w=i.onRecoverableError,I=0;I<p.length;I++){var G=p[I];w(G.value,{componentStack:G.stack})}}finally{q.T=o,Z.p=k}}(ks&3)!==0&&kd(),$i(i),k=i.pendingLanes,(u&261930)!==0&&(k&42)!==0?i===Qg?zu++:(zu=0,Qg=i):zu=0,ju(0)}}function Uw(i,o){(i.pooledCacheLanes&=o)===0&&(o=i.pooledCache,o!=null&&(i.pooledCache=null,gu(o)))}function kd(){return $w(),Bw(),Fw(),qw()}function qw(){if(Xn!==5)return!1;var i=eo,o=Yg;Yg=0;var u=Pe(ks),p=q.T,k=Z.p;try{Z.p=32>u?32:u,q.T=null,u=Xg,Xg=null;var w=eo,I=ks;if(Xn=0,el=eo=null,ks=0,(rn&6)!==0)throw Error(r(331));var G=rn;if(rn|=4,Ew(w.current),xw(w,w.current,I,u),rn=G,ju(0,!1),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot(Je,w)}catch{}return!0}finally{Z.p=k,q.T=p,Uw(i,o)}}function Hw(i,o,u){o=ui(u,o),o=Ag(i.stateNode,o,2),i=Ws(i,o,2),i!==null&&(lt(i,2),$i(i))}function ln(i,o,u){if(i.tag===3)Hw(i,i,u);else for(;o!==null;){if(o.tag===3){Hw(o,i,u);break}else if(o.tag===1){var p=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Js===null||!Js.has(p))){i=ui(u,i),u=GS(2),p=Ws(o,u,2),p!==null&&(VS(u,p,o,i),lt(p,2),$i(p));break}}o=o.return}}function tb(i,o,u){var p=i.pingCache;if(p===null){p=i.pingCache=new pL;var k=new Set;p.set(o,k)}else k=p.get(o),k===void 0&&(k=new Set,p.set(o,k));k.has(u)||(Wg=!0,k.add(u),i=yL.bind(null,i,o,u),o.then(i,i))}function yL(i,o,u){var p=i.pingCache;p!==null&&p.delete(o),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,gn===i&&(Vt&u)===u&&(Ln===4||Ln===3&&(Vt&62914560)===Vt&&300>te()-hd?(rn&2)===0&&tl(i,0):Kg|=u,Ja===Vt&&(Ja=0)),$i(i)}function Gw(i,o){o===0&&(o=Qe()),i=zo(i,o),i!==null&&(lt(i,o),$i(i))}function vL(i){var o=i.memoizedState,u=0;o!==null&&(u=o.retryLane),Gw(i,u)}function kL(i,o){var u=0;switch(i.tag){case 31:case 13:var p=i.stateNode,k=i.memoizedState;k!==null&&(u=k.retryLane);break;case 19:p=i.stateNode;break;case 22:p=i.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(o),Gw(i,u)}function xL(i,o){return je(i,o)}var xd=null,rl=null,nb=!1,Sd=!1,rb=!1,no=0;function $i(i){i!==rl&&i.next===null&&(rl===null?xd=rl=i:rl=rl.next=i),Sd=!0,nb||(nb=!0,wL())}function ju(i,o){if(!rb&&Sd){rb=!0;do for(var u=!1,p=xd;p!==null;){if(i!==0){var k=p.pendingLanes;if(k===0)var w=0;else{var I=p.suspendedLanes,G=p.pingedLanes;w=(1<<31-st(42|i)+1)-1,w&=k&~(I&~G),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(u=!0,Zw(p,w))}else w=Vt,w=Y(p,p===gn?w:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(w&3)===0||he(p,w)||(u=!0,Zw(p,w));p=p.next}while(u);rb=!1}}function SL(){Vw()}function Vw(){Sd=nb=!1;var i=0;no!==0&&ML()&&(i=no);for(var o=te(),u=null,p=xd;p!==null;){var k=p.next,w=Ww(p,o);w===0?(p.next=null,u===null?xd=k:u.next=k,k===null&&(rl=u)):(u=p,(i!==0||(w&3)!==0)&&(Sd=!0)),p=k}Xn!==0&&Xn!==5||ju(i),no!==0&&(no=0)}function Ww(i,o){for(var u=i.suspendedLanes,p=i.pingedLanes,k=i.expirationTimes,w=i.pendingLanes&-62914561;0<w;){var I=31-st(w),G=1<<I,Q=k[I];Q===-1?((G&u)===0||(G&p)!==0)&&(k[I]=Le(G,o)):Q<=o&&(i.expiredLanes|=G),w&=~G}if(o=gn,u=Vt,u=Y(i,i===o?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,u===0||i===o&&(an===2||an===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&Ue(p),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||he(i,u)){if(o=u&-u,o===i.callbackPriority)return o;switch(p!==null&&Ue(p),Pe(u)){case 2:case 8:u=ne;break;case 32:u=be;break;case 268435456:u=Ze;break;default:u=be}return p=Kw.bind(null,i),u=je(u,p),i.callbackPriority=o,i.callbackNode=u,o}return p!==null&&p!==null&&Ue(p),i.callbackPriority=2,i.callbackNode=null,2}function Kw(i,o){if(Xn!==0&&Xn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(kd()&&i.callbackNode!==u)return null;var p=Vt;return p=Y(i,i===gn?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(Nw(i,p,o),Ww(i,te()),i.callbackNode!=null&&i.callbackNode===u?Kw.bind(null,i):null)}function Zw(i,o){if(kd())return null;Nw(i,o,!0)}function wL(){zL(function(){(rn&6)!==0?je(J,SL):Vw()})}function ib(){if(no===0){var i=Ua;i===0&&(i=St,St<<=1,(St&261888)===0&&(St=256)),no=i}return no}function Yw(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:$s(""+i)}function Xw(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 EL(i,o,u,p,k){if(o==="submit"&&u&&u.stateNode===k){var w=Yw((k[Yt]||null).action),I=p.submitter;I&&(o=(o=I[Yt]||null)?Yw(o.formAction):I.getAttribute("formAction"),o!==null&&(w=o,I=null));var G=new Df("action","action",null,p,k);i.push({event:G,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(no!==0){var Q=I?Xw(k,I):new FormData(k);Eg(u,{pending:!0,data:Q,method:k.method,action:w},null,Q)}}else typeof w=="function"&&(G.preventDefault(),Q=I?Xw(k,I):new FormData(k),Eg(u,{pending:!0,data:Q,method:k.method,action:w},w,Q))},currentTarget:k}]})}}for(var sb=0;sb<Fm.length;sb++){var ob=Fm[sb],TL=ob.toLowerCase(),_L=ob[0].toUpperCase()+ob.slice(1);_i(TL,"on"+_L)}_i(C0,"onAnimationEnd"),_i(N0,"onAnimationIteration"),_i(A0,"onAnimationStart"),_i("dblclick","onDoubleClick"),_i("focusin","onFocus"),_i("focusout","onBlur"),_i(Uj,"onTransitionRun"),_i(qj,"onTransitionStart"),_i(Hj,"onTransitionCancel"),_i(O0,"onTransitionEnd"),Be("onMouseEnter",["mouseout","mouseover"]),Be("onMouseLeave",["mouseout","mouseover"]),Be("onPointerEnter",["pointerout","pointerover"]),Be("onPointerLeave",["pointerout","pointerover"]),is("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),is("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),is("onBeforeInput",["compositionend","keypress","textInput","paste"]),is("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),is("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),is("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lu="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(" "),RL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Lu));function Qw(i,o){o=(o&4)!==0;for(var u=0;u<i.length;u++){var p=i[u],k=p.event;p=p.listeners;e:{var w=void 0;if(o)for(var I=p.length-1;0<=I;I--){var G=p[I],Q=G.instance,pe=G.currentTarget;if(G=G.listener,Q!==w&&k.isPropagationStopped())break e;w=G,k.currentTarget=pe;try{w(k)}catch(Re){Lf(Re)}k.currentTarget=null,w=Q}else for(I=0;I<p.length;I++){if(G=p[I],Q=G.instance,pe=G.currentTarget,G=G.listener,Q!==w&&k.isPropagationStopped())break e;w=G,k.currentTarget=pe;try{w(k)}catch(Re){Lf(Re)}k.currentTarget=null,w=Q}}}}function Ut(i,o){var u=o[Wr];u===void 0&&(u=o[Wr]=new Set);var p=i+"__bubble";u.has(p)||(Jw(o,i,2,!1),u.add(p))}function ab(i,o,u){var p=0;o&&(p|=4),Jw(u,i,p,o)}var wd="_reactListening"+Math.random().toString(36).slice(2);function lb(i){if(!i[wd]){i[wd]=!0,_f.forEach(function(u){u!=="selectionchange"&&(RL.has(u)||ab(u,!1,i),ab(u,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[wd]||(o[wd]=!0,ab("selectionchange",!1,o))}}function Jw(i,o,u,p){switch(C1(o)){case 2:var k=t2;break;case 8:k=n2;break;default:k=wb}u=k.bind(null,o,u,i),k=void 0,!Cm||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(k=!0),p?k!==void 0?i.addEventListener(o,u,{capture:!0,passive:k}):i.addEventListener(o,u,!0):k!==void 0?i.addEventListener(o,u,{passive:k}):i.addEventListener(o,u,!1)}function ub(i,o,u,p,k){var w=p;if((o&1)===0&&(o&2)===0&&p!==null)e:for(;;){if(p===null)return;var I=p.tag;if(I===3||I===4){var G=p.stateNode.containerInfo;if(G===k)break;if(I===4)for(I=p.return;I!==null;){var Q=I.tag;if((Q===3||Q===4)&&I.stateNode.containerInfo===k)return;I=I.return}for(;G!==null;){if(I=Sr(G),I===null)return;if(Q=I.tag,Q===5||Q===6||Q===26||Q===27){p=w=I;continue e}G=G.parentNode}}p=p.return}Af(function(){var pe=w,Re=Nt(u),Oe=[];e:{var me=I0.get(i);if(me!==void 0){var ve=Df,et=i;switch(i){case"keypress":if(If(u)===0)break e;case"keydown":case"keyup":ve=kj;break;case"focusin":et="focus",ve=Im;break;case"focusout":et="blur",ve=Im;break;case"beforeblur":case"afterblur":ve=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":ve=a0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ve=lj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ve=wj;break;case C0:case N0:case A0:ve=fj;break;case O0:ve=Tj;break;case"scroll":case"scrollend":ve=oj;break;case"wheel":ve=Rj;break;case"copy":case"cut":case"paste":ve=pj;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ve=u0;break;case"toggle":case"beforetoggle":ve=Nj}var gt=(o&4)!==0,fn=!gt&&(i==="scroll"||i==="scrollend"),le=gt?me!==null?me+"Capture":null:me;gt=[];for(var ie=pe,de;ie!==null;){var Ne=ie;if(de=Ne.stateNode,Ne=Ne.tag,Ne!==5&&Ne!==26&&Ne!==27||de===null||le===null||(Ne=su(ie,le),Ne!=null&>.push(Pu(ie,Ne,de))),fn)break;ie=ie.return}0<gt.length&&(me=new ve(me,et,null,u,Re),Oe.push({event:me,listeners:gt}))}}if((o&7)===0){e:{if(me=i==="mouseover"||i==="pointerover",ve=i==="mouseout"||i==="pointerout",me&&u!==rt&&(et=u.relatedTarget||u.fromElement)&&(Sr(et)||et[zn]))break e;if((ve||me)&&(me=Re.window===Re?Re:(me=Re.ownerDocument)?me.defaultView||me.parentWindow:window,ve?(et=u.relatedTarget||u.toElement,ve=pe,et=et?Sr(et):null,et!==null&&(fn=a(et),gt=et.tag,et!==fn||gt!==5&>!==27&>!==6)&&(et=null)):(ve=null,et=pe),ve!==et)){if(gt=a0,Ne="onMouseLeave",le="onMouseEnter",ie="mouse",(i==="pointerout"||i==="pointerover")&&(gt=u0,Ne="onPointerLeave",le="onPointerEnter",ie="pointer"),fn=ve==null?me:js(ve),de=et==null?me:js(et),me=new gt(Ne,ie+"leave",ve,u,Re),me.target=fn,me.relatedTarget=de,Ne=null,Sr(Re)===pe&&(gt=new gt(le,ie+"enter",et,u,Re),gt.target=de,gt.relatedTarget=fn,Ne=gt),fn=Ne,ve&&et)t:{for(gt=CL,le=ve,ie=et,de=0,Ne=le;Ne;Ne=gt(Ne))de++;Ne=0;for(var ut=ie;ut;ut=gt(ut))Ne++;for(;0<de-Ne;)le=gt(le),de--;for(;0<Ne-de;)ie=gt(ie),Ne--;for(;de--;){if(le===ie||ie!==null&&le===ie.alternate){gt=le;break t}le=gt(le),ie=gt(ie)}gt=null}else gt=null;ve!==null&&e1(Oe,me,ve,gt,!1),et!==null&&fn!==null&&e1(Oe,fn,et,gt,!0)}}e:{if(me=pe?js(pe):window,ve=me.nodeName&&me.nodeName.toLowerCase(),ve==="select"||ve==="input"&&me.type==="file")var Jt=b0;else if(m0(me))if(y0)Jt=$j;else{Jt=Lj;var it=jj}else ve=me.nodeName,!ve||ve.toLowerCase()!=="input"||me.type!=="checkbox"&&me.type!=="radio"?pe&&Ps(pe.elementType)&&(Jt=b0):Jt=Pj;if(Jt&&(Jt=Jt(i,pe))){g0(Oe,Jt,u,Re);break e}it&&it(i,me,pe),i==="focusout"&&pe&&me.type==="number"&&pe.memoizedProps.value!=null&&Oa(me,"number",me.value)}switch(it=pe?js(pe):window,i){case"focusin":(m0(it)||it.contentEditable==="true")&&(Da=it,Pm=pe,pu=null);break;case"focusout":pu=Pm=Da=null;break;case"mousedown":$m=!0;break;case"contextmenu":case"mouseup":case"dragend":$m=!1,_0(Oe,u,Re);break;case"selectionchange":if(Fj)break;case"keydown":case"keyup":_0(Oe,u,Re)}var It;if(Dm)e:{switch(i){case"compositionstart":var Wt="onCompositionStart";break e;case"compositionend":Wt="onCompositionEnd";break e;case"compositionupdate":Wt="onCompositionUpdate";break e}Wt=void 0}else Ma?p0(i,u)&&(Wt="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(Wt="onCompositionStart");Wt&&(c0&&u.locale!=="ko"&&(Ma||Wt!=="onCompositionStart"?Wt==="onCompositionEnd"&&Ma&&(It=s0()):(Bs=Re,Nm="value"in Bs?Bs.value:Bs.textContent,Ma=!0)),it=Ed(pe,Wt),0<it.length&&(Wt=new l0(Wt,i,null,u,Re),Oe.push({event:Wt,listeners:it}),It?Wt.data=It:(It=h0(u),It!==null&&(Wt.data=It)))),(It=Oj?Ij(i,u):Mj(i,u))&&(Wt=Ed(pe,"onBeforeInput"),0<Wt.length&&(it=new l0("onBeforeInput","beforeinput",null,u,Re),Oe.push({event:it,listeners:Wt}),it.data=It)),EL(Oe,i,pe,u,Re)}Qw(Oe,o)})}function Pu(i,o,u){return{instance:i,listener:o,currentTarget:u}}function Ed(i,o){for(var u=o+"Capture",p=[];i!==null;){var k=i,w=k.stateNode;if(k=k.tag,k!==5&&k!==26&&k!==27||w===null||(k=su(i,u),k!=null&&p.unshift(Pu(i,k,w)),k=su(i,o),k!=null&&p.push(Pu(i,k,w))),i.tag===3)return p;i=i.return}return[]}function CL(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function e1(i,o,u,p,k){for(var w=o._reactName,I=[];u!==null&&u!==p;){var G=u,Q=G.alternate,pe=G.stateNode;if(G=G.tag,Q!==null&&Q===p)break;G!==5&&G!==26&&G!==27||pe===null||(Q=pe,k?(pe=su(u,w),pe!=null&&I.unshift(Pu(u,pe,Q))):k||(pe=su(u,w),pe!=null&&I.push(Pu(u,pe,Q)))),u=u.return}I.length!==0&&i.push({event:o,listeners:I})}var NL=/\r\n?/g,AL=/\u0000|\uFFFD/g;function t1(i){return(typeof i=="string"?i:""+i).replace(NL,`
|
|
9
|
+
`).replace(AL,"")}function n1(i,o){return o=t1(o),t1(i)===o}function cn(i,o,u,p,k,w){switch(u){case"children":typeof p=="string"?o==="body"||o==="textarea"&&p===""||yt(i,p):(typeof p=="number"||typeof p=="bigint")&&o!=="body"&&yt(i,""+p);break;case"className":Kr(i,"class",p);break;case"tabIndex":Kr(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":Kr(i,u,p);break;case"style":on(i,p,w);break;case"data":if(o!=="object"){Kr(i,"data",p);break}case"src":case"href":if(p===""&&(o!=="a"||u!=="href")){i.removeAttribute(u);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(u);break}p=$s(""+p),i.setAttribute(u,p);break;case"action":case"formAction":if(typeof p=="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 w=="function"&&(u==="formAction"?(o!=="input"&&cn(i,o,"name",k.name,k,null),cn(i,o,"formEncType",k.formEncType,k,null),cn(i,o,"formMethod",k.formMethod,k,null),cn(i,o,"formTarget",k.formTarget,k,null)):(cn(i,o,"encType",k.encType,k,null),cn(i,o,"method",k.method,k,null),cn(i,o,"target",k.target,k,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(u);break}p=$s(""+p),i.setAttribute(u,p);break;case"onClick":p!=null&&(i.onclick=Ve);break;case"onScroll":p!=null&&Ut("scroll",i);break;case"onScrollEnd":p!=null&&Ut("scrollend",i);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(u=p.__html,u!=null){if(k.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"multiple":i.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":i.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){i.removeAttribute("xlink:href");break}u=$s(""+p),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":p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,""+p):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":p&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":p===!0?i.setAttribute(u,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,p):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?i.setAttribute(u,p):i.removeAttribute(u);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?i.removeAttribute(u):i.setAttribute(u,p);break;case"popover":Ut("beforetoggle",i),Ut("toggle",i),fr(i,"popover",p);break;case"xlinkActuate":Ar(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":Ar(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":Ar(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":Ar(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":Ar(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":Ar(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":Ar(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":Ar(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":Ar(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":fr(i,"is",p);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=ss.get(u)||u,fr(i,u,p))}}function cb(i,o,u,p,k,w){switch(u){case"style":on(i,p,w);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(u=p.__html,u!=null){if(k.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"children":typeof p=="string"?yt(i,p):(typeof p=="number"||typeof p=="bigint")&&yt(i,""+p);break;case"onScroll":p!=null&&Ut("scroll",i);break;case"onScrollEnd":p!=null&&Ut("scrollend",i);break;case"onClick":p!=null&&(i.onclick=Ve);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ao.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(k=u.endsWith("Capture"),o=u.slice(2,k?u.length-7:void 0),w=i[Yt]||null,w=w!=null?w[u]:null,typeof w=="function"&&i.removeEventListener(o,w,k),typeof p=="function")){typeof w!="function"&&w!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(o,p,k);break e}u in i?i[u]=p:p===!0?i.setAttribute(u,""):fr(i,u,p)}}}function lr(i,o,u){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ut("error",i),Ut("load",i);var p=!1,k=!1,w;for(w in u)if(u.hasOwnProperty(w)){var I=u[w];if(I!=null)switch(w){case"src":p=!0;break;case"srcSet":k=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:cn(i,o,w,I,u,null)}}k&&cn(i,o,"srcSet",u.srcSet,u,null),p&&cn(i,o,"src",u.src,u,null);return;case"input":Ut("invalid",i);var G=w=I=k=null,Q=null,pe=null;for(p in u)if(u.hasOwnProperty(p)){var Re=u[p];if(Re!=null)switch(p){case"name":k=Re;break;case"type":I=Re;break;case"checked":Q=Re;break;case"defaultChecked":pe=Re;break;case"value":w=Re;break;case"defaultValue":G=Re;break;case"children":case"dangerouslySetInnerHTML":if(Re!=null)throw Error(r(137,o));break;default:cn(i,o,p,Re,u,null)}}Oo(i,w,G,Q,pe,I,k,!1);return;case"select":Ut("invalid",i),p=I=w=null;for(k in u)if(u.hasOwnProperty(k)&&(G=u[k],G!=null))switch(k){case"value":w=G;break;case"defaultValue":I=G;break;case"multiple":p=G;default:cn(i,o,k,G,u,null)}o=w,u=I,i.multiple=!!p,o!=null?ir(i,!!p,o,!1):u!=null&&ir(i,!!p,u,!0);return;case"textarea":Ut("invalid",i),w=k=p=null;for(I in u)if(u.hasOwnProperty(I)&&(G=u[I],G!=null))switch(I){case"value":p=G;break;case"defaultValue":k=G;break;case"children":w=G;break;case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(91));break;default:cn(i,o,I,G,u,null)}Ia(i,p,k,w);return;case"option":for(Q in u)u.hasOwnProperty(Q)&&(p=u[Q],p!=null)&&(Q==="selected"?i.selected=p&&typeof p!="function"&&typeof p!="symbol":cn(i,o,Q,p,u,null));return;case"dialog":Ut("beforetoggle",i),Ut("toggle",i),Ut("cancel",i),Ut("close",i);break;case"iframe":case"object":Ut("load",i);break;case"video":case"audio":for(p=0;p<Lu.length;p++)Ut(Lu[p],i);break;case"image":Ut("error",i),Ut("load",i);break;case"details":Ut("toggle",i);break;case"embed":case"source":case"link":Ut("error",i),Ut("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)&&(p=u[pe],p!=null))switch(pe){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:cn(i,o,pe,p,u,null)}return;default:if(Ps(o)){for(Re in u)u.hasOwnProperty(Re)&&(p=u[Re],p!==void 0&&cb(i,o,Re,p,u,void 0));return}}for(G in u)u.hasOwnProperty(G)&&(p=u[G],p!=null&&cn(i,o,G,p,u,null))}function OL(i,o,u,p){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var k=null,w=null,I=null,G=null,Q=null,pe=null,Re=null;for(ve in u){var Oe=u[ve];if(u.hasOwnProperty(ve)&&Oe!=null)switch(ve){case"checked":break;case"value":break;case"defaultValue":Q=Oe;default:p.hasOwnProperty(ve)||cn(i,o,ve,null,p,Oe)}}for(var me in p){var ve=p[me];if(Oe=u[me],p.hasOwnProperty(me)&&(ve!=null||Oe!=null))switch(me){case"type":w=ve;break;case"name":k=ve;break;case"checked":pe=ve;break;case"defaultChecked":Re=ve;break;case"value":I=ve;break;case"defaultValue":G=ve;break;case"children":case"dangerouslySetInnerHTML":if(ve!=null)throw Error(r(137,o));break;default:ve!==Oe&&cn(i,o,me,ve,p,Oe)}}nu(i,I,G,Q,pe,Re,w,k);return;case"select":ve=I=G=me=null;for(w in u)if(Q=u[w],u.hasOwnProperty(w)&&Q!=null)switch(w){case"value":break;case"multiple":ve=Q;default:p.hasOwnProperty(w)||cn(i,o,w,null,p,Q)}for(k in p)if(w=p[k],Q=u[k],p.hasOwnProperty(k)&&(w!=null||Q!=null))switch(k){case"value":me=w;break;case"defaultValue":G=w;break;case"multiple":I=w;default:w!==Q&&cn(i,o,k,w,p,Q)}o=G,u=I,p=ve,me!=null?ir(i,!!u,me,!1):!!p!=!!u&&(o!=null?ir(i,!!u,o,!0):ir(i,!!u,u?[]:"",!1));return;case"textarea":ve=me=null;for(G in u)if(k=u[G],u.hasOwnProperty(G)&&k!=null&&!p.hasOwnProperty(G))switch(G){case"value":break;case"children":break;default:cn(i,o,G,null,p,k)}for(I in p)if(k=p[I],w=u[I],p.hasOwnProperty(I)&&(k!=null||w!=null))switch(I){case"value":me=k;break;case"defaultValue":ve=k;break;case"children":break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(91));break;default:k!==w&&cn(i,o,I,k,p,w)}Cf(i,me,ve);return;case"option":for(var et in u)me=u[et],u.hasOwnProperty(et)&&me!=null&&!p.hasOwnProperty(et)&&(et==="selected"?i.selected=!1:cn(i,o,et,null,p,me));for(Q in p)me=p[Q],ve=u[Q],p.hasOwnProperty(Q)&&me!==ve&&(me!=null||ve!=null)&&(Q==="selected"?i.selected=me&&typeof me!="function"&&typeof me!="symbol":cn(i,o,Q,me,p,ve));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 gt in u)me=u[gt],u.hasOwnProperty(gt)&&me!=null&&!p.hasOwnProperty(gt)&&cn(i,o,gt,null,p,me);for(pe in p)if(me=p[pe],ve=u[pe],p.hasOwnProperty(pe)&&me!==ve&&(me!=null||ve!=null))switch(pe){case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(r(137,o));break;default:cn(i,o,pe,me,p,ve)}return;default:if(Ps(o)){for(var fn in u)me=u[fn],u.hasOwnProperty(fn)&&me!==void 0&&!p.hasOwnProperty(fn)&&cb(i,o,fn,void 0,p,me);for(Re in p)me=p[Re],ve=u[Re],!p.hasOwnProperty(Re)||me===ve||me===void 0&&ve===void 0||cb(i,o,Re,me,p,ve);return}}for(var le in u)me=u[le],u.hasOwnProperty(le)&&me!=null&&!p.hasOwnProperty(le)&&cn(i,o,le,null,p,me);for(Oe in p)me=p[Oe],ve=u[Oe],!p.hasOwnProperty(Oe)||me===ve||me==null&&ve==null||cn(i,o,Oe,me,p,ve)}function r1(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function IL(){if(typeof performance.getEntriesByType=="function"){for(var i=0,o=0,u=performance.getEntriesByType("resource"),p=0;p<u.length;p++){var k=u[p],w=k.transferSize,I=k.initiatorType,G=k.duration;if(w&&G&&r1(I)){for(I=0,G=k.responseEnd,p+=1;p<u.length;p++){var Q=u[p],pe=Q.startTime;if(pe>G)break;var Re=Q.transferSize,Oe=Q.initiatorType;Re&&r1(Oe)&&(Q=Q.responseEnd,I+=Re*(Q<G?1:(G-pe)/(Q-pe)))}if(--p,o+=8*(w+I)/(k.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 fb=null,db=null;function Td(i){return i.nodeType===9?i:i.ownerDocument}function i1(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 s1(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 pb(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 hb=null;function ML(){var i=window.event;return i&&i.type==="popstate"?i===hb?!1:(hb=i,!0):(hb=null,!1)}var o1=typeof setTimeout=="function"?setTimeout:void 0,DL=typeof clearTimeout=="function"?clearTimeout:void 0,a1=typeof Promise=="function"?Promise:void 0,zL=typeof queueMicrotask=="function"?queueMicrotask:typeof a1<"u"?function(i){return a1.resolve(null).then(i).catch(jL)}:o1;function jL(i){setTimeout(function(){throw i})}function ro(i){return i==="head"}function l1(i,o){var u=o,p=0;do{var k=u.nextSibling;if(i.removeChild(u),k&&k.nodeType===8)if(u=k.data,u==="/$"||u==="/&"){if(p===0){i.removeChild(k),al(o);return}p--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")p++;else if(u==="html")$u(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,$u(u);for(var w=u.firstChild;w;){var I=w.nextSibling,G=w.nodeName;w[ns]||G==="SCRIPT"||G==="STYLE"||G==="LINK"&&w.rel.toLowerCase()==="stylesheet"||u.removeChild(w),w=I}}else u==="body"&&$u(i.ownerDocument.body);u=k}while(u);al(o)}function u1(i,o){var u=i;i=0;do{var p=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||""),p&&p.nodeType===8)if(u=p.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=p}while(u)}function mb(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":mb(u),eu(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function LL(i,o,u,p){for(;i.nodeType===1;){var k=u;if(i.nodeName.toLowerCase()!==o.toLowerCase()){if(!p&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(p){if(!i[ns])switch(o){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(w=i.getAttribute("rel"),w==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(w!==k.rel||i.getAttribute("href")!==(k.href==null||k.href===""?null:k.href)||i.getAttribute("crossorigin")!==(k.crossOrigin==null?null:k.crossOrigin)||i.getAttribute("title")!==(k.title==null?null:k.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(w=i.getAttribute("src"),(w!==(k.src==null?null:k.src)||i.getAttribute("type")!==(k.type==null?null:k.type)||i.getAttribute("crossorigin")!==(k.crossOrigin==null?null:k.crossOrigin))&&w&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(o==="input"&&i.type==="hidden"){var w=k.name==null?null:""+k.name;if(k.type==="hidden"&&i.getAttribute("name")===w)return i}else return i;if(i=hi(i.nextSibling),i===null)break}return null}function PL(i,o,u){if(o==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=hi(i.nextSibling),i===null))return null;return i}function c1(i,o){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=hi(i.nextSibling),i===null))return null;return i}function gb(i){return i.data==="$?"||i.data==="$~"}function bb(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function $L(i,o){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=o;else if(i.data!=="$?"||u.readyState!=="loading")o();else{var p=function(){o(),u.removeEventListener("DOMContentLoaded",p)};u.addEventListener("DOMContentLoaded",p),i._reactRetry=p}}function hi(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 yb=null;function f1(i){i=i.nextSibling;for(var o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(o===0)return hi(i.nextSibling);o--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||o++}i=i.nextSibling}return null}function d1(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 p1(i,o,u){switch(o=Td(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 $u(i){for(var o=i.attributes;o.length;)i.removeAttributeNode(o[0]);eu(i)}var mi=new Map,h1=new Set;function _d(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var xs=Z.d;Z.d={f:BL,r:FL,D:UL,C:qL,L:HL,m:GL,X:WL,S:VL,M:KL};function BL(){var i=xs.f(),o=bd();return i||o}function FL(i){var o=rs(i);o!==null&&o.tag===5&&o.type==="form"?OS(o):xs.r(i)}var il=typeof document>"u"?null:document;function m1(i,o,u){var p=il;if(p&&typeof o=="string"&&o){var k=Or(o);k='link[rel="'+i+'"][href="'+k+'"]',typeof u=="string"&&(k+='[crossorigin="'+u+'"]'),h1.has(k)||(h1.add(k),i={rel:i,crossOrigin:u,href:o},p.querySelector(k)===null&&(o=p.createElement("link"),lr(o,"link",i),qn(o),p.head.appendChild(o)))}}function UL(i){xs.D(i),m1("dns-prefetch",i,null)}function qL(i,o){xs.C(i,o),m1("preconnect",i,o)}function HL(i,o,u){xs.L(i,o,u);var p=il;if(p&&i&&o){var k='link[rel="preload"][as="'+Or(o)+'"]';o==="image"&&u&&u.imageSrcSet?(k+='[imagesrcset="'+Or(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(k+='[imagesizes="'+Or(u.imageSizes)+'"]')):k+='[href="'+Or(i)+'"]';var w=k;switch(o){case"style":w=sl(i);break;case"script":w=ol(i)}mi.has(w)||(i=m({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:i,as:o},u),mi.set(w,i),p.querySelector(k)!==null||o==="style"&&p.querySelector(Bu(w))||o==="script"&&p.querySelector(Fu(w))||(o=p.createElement("link"),lr(o,"link",i),qn(o),p.head.appendChild(o)))}}function GL(i,o){xs.m(i,o);var u=il;if(u&&i){var p=o&&typeof o.as=="string"?o.as:"script",k='link[rel="modulepreload"][as="'+Or(p)+'"][href="'+Or(i)+'"]',w=k;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=ol(i)}if(!mi.has(w)&&(i=m({rel:"modulepreload",href:i},o),mi.set(w,i),u.querySelector(k)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Fu(w)))return}p=u.createElement("link"),lr(p,"link",i),qn(p),u.head.appendChild(p)}}}function VL(i,o,u){xs.S(i,o,u);var p=il;if(p&&i){var k=Ls(p).hoistableStyles,w=sl(i);o=o||"default";var I=k.get(w);if(!I){var G={loading:0,preload:null};if(I=p.querySelector(Bu(w)))G.loading=5;else{i=m({rel:"stylesheet",href:i,"data-precedence":o},u),(u=mi.get(w))&&vb(i,u);var Q=I=p.createElement("link");qn(Q),lr(Q,"link",i),Q._p=new Promise(function(pe,Re){Q.onload=pe,Q.onerror=Re}),Q.addEventListener("load",function(){G.loading|=1}),Q.addEventListener("error",function(){G.loading|=2}),G.loading|=4,Rd(I,o,p)}I={type:"stylesheet",instance:I,count:1,state:G},k.set(w,I)}}}function WL(i,o){xs.X(i,o);var u=il;if(u&&i){var p=Ls(u).hoistableScripts,k=ol(i),w=p.get(k);w||(w=u.querySelector(Fu(k)),w||(i=m({src:i,async:!0},o),(o=mi.get(k))&&kb(i,o),w=u.createElement("script"),qn(w),lr(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},p.set(k,w))}}function KL(i,o){xs.M(i,o);var u=il;if(u&&i){var p=Ls(u).hoistableScripts,k=ol(i),w=p.get(k);w||(w=u.querySelector(Fu(k)),w||(i=m({src:i,async:!0,type:"module"},o),(o=mi.get(k))&&kb(i,o),w=u.createElement("script"),qn(w),lr(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},p.set(k,w))}}function g1(i,o,u,p){var k=(k=re.current)?_d(k):null;if(!k)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(o=sl(u.href),u=Ls(k).hoistableStyles,p=u.get(o),p||(p={type:"style",instance:null,count:0,state:null},u.set(o,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=sl(u.href);var w=Ls(k).hoistableStyles,I=w.get(i);if(I||(k=k.ownerDocument||k,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(i,I),(w=k.querySelector(Bu(i)))&&!w._p&&(I.instance=w,I.state.loading=5),mi.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},mi.set(i,u),w||ZL(k,i,u,I.state))),o&&p===null)throw Error(r(528,""));return I}if(o&&p!==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=ol(u),u=Ls(k).hoistableScripts,p=u.get(o),p||(p={type:"script",instance:null,count:0,state:null},u.set(o,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function sl(i){return'href="'+Or(i)+'"'}function Bu(i){return'link[rel="stylesheet"]['+i+"]"}function b1(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function ZL(i,o,u,p){i.querySelector('link[rel="preload"][as="style"]['+o+"]")?p.loading=1:(o=i.createElement("link"),p.preload=o,o.addEventListener("load",function(){return p.loading|=1}),o.addEventListener("error",function(){return p.loading|=2}),lr(o,"link",u),qn(o),i.head.appendChild(o))}function ol(i){return'[src="'+Or(i)+'"]'}function Fu(i){return"script[async]"+i}function y1(i,o,u){if(o.count++,o.instance===null)switch(o.type){case"style":var p=i.querySelector('style[data-href~="'+Or(u.href)+'"]');if(p)return o.instance=p,qn(p),p;var k=m({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return p=(i.ownerDocument||i).createElement("style"),qn(p),lr(p,"style",k),Rd(p,u.precedence,i),o.instance=p;case"stylesheet":k=sl(u.href);var w=i.querySelector(Bu(k));if(w)return o.state.loading|=4,o.instance=w,qn(w),w;p=b1(u),(k=mi.get(k))&&vb(p,k),w=(i.ownerDocument||i).createElement("link"),qn(w);var I=w;return I._p=new Promise(function(G,Q){I.onload=G,I.onerror=Q}),lr(w,"link",p),o.state.loading|=4,Rd(w,u.precedence,i),o.instance=w;case"script":return w=ol(u.src),(k=i.querySelector(Fu(w)))?(o.instance=k,qn(k),k):(p=u,(k=mi.get(w))&&(p=m({},u),kb(p,k)),i=i.ownerDocument||i,k=i.createElement("script"),qn(k),lr(k,"link",p),i.head.appendChild(k),o.instance=k);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(p=o.instance,o.state.loading|=4,Rd(p,u.precedence,i));return o.instance}function Rd(i,o,u){for(var p=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),k=p.length?p[p.length-1]:null,w=k,I=0;I<p.length;I++){var G=p[I];if(G.dataset.precedence===o)w=G;else if(w!==k)break}w?w.parentNode.insertBefore(i,w.nextSibling):(o=u.nodeType===9?u.head:u,o.insertBefore(i,o.firstChild))}function vb(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.title==null&&(i.title=o.title)}function kb(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.integrity==null&&(i.integrity=o.integrity)}var Cd=null;function v1(i,o,u){if(Cd===null){var p=new Map,k=Cd=new Map;k.set(u,p)}else k=Cd,p=k.get(u),p||(p=new Map,k.set(u,p));if(p.has(i))return p;for(p.set(i,null),u=u.getElementsByTagName(i),k=0;k<u.length;k++){var w=u[k];if(!(w[ns]||w[bt]||i==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var I=w.getAttribute(o)||"";I=i+I;var G=p.get(I);G?G.push(w):p.set(I,[w])}}return p}function k1(i,o,u){i=i.ownerDocument||i,i.head.insertBefore(u,o==="title"?i.querySelector("head > title"):null)}function YL(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 x1(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function XL(i,o,u,p){if(u.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var k=sl(p.href),w=o.querySelector(Bu(k));if(w){o=w._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(i.count++,i=Nd.bind(i),o.then(i,i)),u.state.loading|=4,u.instance=w,qn(w);return}w=o.ownerDocument||o,p=b1(p),(k=mi.get(k))&&vb(p,k),w=w.createElement("link"),qn(w);var I=w;I._p=new Promise(function(G,Q){I.onload=G,I.onerror=Q}),lr(w,"link",p),u.instance=w}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=Nd.bind(i),o.addEventListener("load",u),o.addEventListener("error",u))}}var xb=0;function QL(i,o){return i.stylesheets&&i.count===0&&Od(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var p=setTimeout(function(){if(i.stylesheets&&Od(i,i.stylesheets),i.unsuspend){var w=i.unsuspend;i.unsuspend=null,w()}},6e4+o);0<i.imgBytes&&xb===0&&(xb=62500*IL());var k=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Od(i,i.stylesheets),i.unsuspend)){var w=i.unsuspend;i.unsuspend=null,w()}},(i.imgBytes>xb?50:800)+o);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(k)}}:null}function Nd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Od(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Ad=null;function Od(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Ad=new Map,o.forEach(JL,i),Ad=null,Nd.call(i))}function JL(i,o){if(!(o.state.loading&4)){var u=Ad.get(i);if(u)var p=u.get(null);else{u=new Map,Ad.set(i,u);for(var k=i.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<k.length;w++){var I=k[w];(I.nodeName==="LINK"||I.getAttribute("media")!=="not all")&&(u.set(I.dataset.precedence,I),p=I)}p&&u.set(null,p)}k=o.instance,I=k.getAttribute("data-precedence"),w=u.get(I)||p,w===p&&u.set(null,k),u.set(I,k),this.count++,p=Nd.bind(this),k.addEventListener("load",p),k.addEventListener("error",p),w?w.parentNode.insertBefore(k,w.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(k,i.firstChild)),o.state.loading|=4}}var Uu={$$typeof:_,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function e2(i,o,u,p,k,w,I,G,Q){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=wt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wt(0),this.hiddenUpdates=wt(null),this.identifierPrefix=p,this.onUncaughtError=k,this.onCaughtError=w,this.onRecoverableError=I,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function S1(i,o,u,p,k,w,I,G,Q,pe,Re,Oe){return i=new e2(i,o,u,I,Q,pe,Re,Oe,G),o=1,w===!0&&(o|=24),w=Xr(3,null,null,o),i.current=w,w.stateNode=i,o=eg(),o.refCount++,i.pooledCache=o,o.refCount++,w.memoizedState={element:p,isDehydrated:u,cache:o},ig(w),i}function w1(i){return i?(i=La,i):La}function E1(i,o,u,p,k,w){k=w1(k),p.context===null?p.context=k:p.pendingContext=k,p=Vs(o),p.payload={element:u},w=w===void 0?null:w,w!==null&&(p.callback=w),u=Ws(i,p,o),u!==null&&(Lr(u,i,o),ku(u,i,o))}function T1(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<o?u:o}}function Sb(i,o){T1(i,o),(i=i.alternate)&&T1(i,o)}function _1(i){if(i.tag===13||i.tag===31){var o=zo(i,67108864);o!==null&&Lr(o,i,67108864),Sb(i,67108864)}}function R1(i){if(i.tag===13||i.tag===31){var o=ni();o=Me(o);var u=zo(i,o);u!==null&&Lr(u,i,o),Sb(i,o)}}var Id=!0;function t2(i,o,u,p){var k=q.T;q.T=null;var w=Z.p;try{Z.p=2,wb(i,o,u,p)}finally{Z.p=w,q.T=k}}function n2(i,o,u,p){var k=q.T;q.T=null;var w=Z.p;try{Z.p=8,wb(i,o,u,p)}finally{Z.p=w,q.T=k}}function wb(i,o,u,p){if(Id){var k=Eb(p);if(k===null)ub(i,o,p,Md,u),N1(i,p);else if(i2(k,i,o,u,p))p.stopPropagation();else if(N1(i,p),o&4&&-1<r2.indexOf(i)){for(;k!==null;){var w=rs(k);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var I=Dt(w.pendingLanes);if(I!==0){var G=w;for(G.pendingLanes|=2,G.entangledLanes|=2;I;){var Q=1<<31-st(I);G.entanglements[1]|=Q,I&=~Q}$i(w),(rn&6)===0&&(md=te()+500,ju(0))}}break;case 31:case 13:G=zo(w,2),G!==null&&Lr(G,w,2),bd(),Sb(w,2)}if(w=Eb(p),w===null&&ub(i,o,p,Md,u),w===k)break;k=w}k!==null&&p.stopPropagation()}else ub(i,o,p,null,u)}}function Eb(i){return i=Nt(i),Tb(i)}var Md=null;function Tb(i){if(Md=null,i=Sr(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 Md=i,null}function C1(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(fe()){case J:return 2;case ne:return 8;case be:case Ge:return 32;case Ze:return 268435456;default:return 32}default:return 32}}var _b=!1,io=null,so=null,oo=null,qu=new Map,Hu=new Map,ao=[],r2="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 N1(i,o){switch(i){case"focusin":case"focusout":io=null;break;case"dragenter":case"dragleave":so=null;break;case"mouseover":case"mouseout":oo=null;break;case"pointerover":case"pointerout":qu.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hu.delete(o.pointerId)}}function Gu(i,o,u,p,k,w){return i===null||i.nativeEvent!==w?(i={blockedOn:o,domEventName:u,eventSystemFlags:p,nativeEvent:w,targetContainers:[k]},o!==null&&(o=rs(o),o!==null&&_1(o)),i):(i.eventSystemFlags|=p,o=i.targetContainers,k!==null&&o.indexOf(k)===-1&&o.push(k),i)}function i2(i,o,u,p,k){switch(o){case"focusin":return io=Gu(io,i,o,u,p,k),!0;case"dragenter":return so=Gu(so,i,o,u,p,k),!0;case"mouseover":return oo=Gu(oo,i,o,u,p,k),!0;case"pointerover":var w=k.pointerId;return qu.set(w,Gu(qu.get(w)||null,i,o,u,p,k)),!0;case"gotpointercapture":return w=k.pointerId,Hu.set(w,Gu(Hu.get(w)||null,i,o,u,p,k)),!0}return!1}function A1(i){var o=Sr(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,kt(i.priority,function(){R1(u)});return}}else if(o===31){if(o=c(u),o!==null){i.blockedOn=o,kt(i.priority,function(){R1(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 Dd(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var u=Eb(i.nativeEvent);if(u===null){u=i.nativeEvent;var p=new u.constructor(u.type,u);rt=p,u.target.dispatchEvent(p),rt=null}else return o=rs(u),o!==null&&_1(o),i.blockedOn=u,!1;o.shift()}return!0}function O1(i,o,u){Dd(i)&&u.delete(o)}function s2(){_b=!1,io!==null&&Dd(io)&&(io=null),so!==null&&Dd(so)&&(so=null),oo!==null&&Dd(oo)&&(oo=null),qu.forEach(O1),Hu.forEach(O1)}function zd(i,o){i.blockedOn===o&&(i.blockedOn=null,_b||(_b=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,s2)))}var jd=null;function I1(i){jd!==i&&(jd=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){jd===i&&(jd=null);for(var o=0;o<i.length;o+=3){var u=i[o],p=i[o+1],k=i[o+2];if(typeof p!="function"){if(Tb(p||u)===null)continue;break}var w=rs(u);w!==null&&(i.splice(o,3),o-=3,Eg(w,{pending:!0,data:k,method:u.method,action:p},p,k))}}))}function al(i){function o(Q){return zd(Q,i)}io!==null&&zd(io,i),so!==null&&zd(so,i),oo!==null&&zd(oo,i),qu.forEach(o),Hu.forEach(o);for(var u=0;u<ao.length;u++){var p=ao[u];p.blockedOn===i&&(p.blockedOn=null)}for(;0<ao.length&&(u=ao[0],u.blockedOn===null);)A1(u),u.blockedOn===null&&ao.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(p=0;p<u.length;p+=3){var k=u[p],w=u[p+1],I=k[Yt]||null;if(typeof w=="function")I||I1(u);else if(I){var G=null;if(w&&w.hasAttribute("formAction")){if(k=w,I=w[Yt]||null)G=I.formAction;else if(Tb(k)!==null)continue}else G=I.action;typeof G=="function"?u[p+1]=G:(u.splice(p,3),p-=3),I1(u)}}}function M1(){function i(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(I){return k=I})},focusReset:"manual",scroll:"manual"})}function o(){k!==null&&(k(),k=null),p||setTimeout(u,20)}function u(){if(!p&&!navigation.transition){var w=navigation.currentEntry;w&&w.url!=null&&navigation.navigate(w.url,{state:w.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,k=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(u,100),function(){p=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),k!==null&&(k(),k=null)}}}function Rb(i){this._internalRoot=i}Ld.prototype.render=Rb.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(r(409));var u=o.current,p=ni();E1(u,p,i,o,null,null)},Ld.prototype.unmount=Rb.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;E1(i.current,2,null,i,null,null),bd(),o[zn]=null}};function Ld(i){this._internalRoot=i}Ld.prototype.unstable_scheduleHydration=function(i){if(i){var o=$e();i={blockedOn:null,target:i,priority:o};for(var u=0;u<ao.length&&o!==0&&o<ao[u].priority;u++);ao.splice(u,0,i),u===0&&A1(i)}};var D1=t.version;if(D1!=="19.2.6")throw Error(r(527,D1,"19.2.6"));Z.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 o2={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pd.isDisabled&&Pd.supportsFiber)try{Je=Pd.inject(o2),mt=Pd}catch{}}return Wu.createRoot=function(i,o){if(!s(i))throw Error(r(299));var u=!1,p="",k=FS,w=US,I=qS;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(k=o.onUncaughtError),o.onCaughtError!==void 0&&(w=o.onCaughtError),o.onRecoverableError!==void 0&&(I=o.onRecoverableError)),o=S1(i,1,!1,null,null,u,p,null,k,w,I,M1),i[zn]=o.current,lb(i),new Rb(o)},Wu.hydrateRoot=function(i,o,u){if(!s(i))throw Error(r(299));var p=!1,k="",w=FS,I=US,G=qS,Q=null;return u!=null&&(u.unstable_strictMode===!0&&(p=!0),u.identifierPrefix!==void 0&&(k=u.identifierPrefix),u.onUncaughtError!==void 0&&(w=u.onUncaughtError),u.onCaughtError!==void 0&&(I=u.onCaughtError),u.onRecoverableError!==void 0&&(G=u.onRecoverableError),u.formState!==void 0&&(Q=u.formState)),o=S1(i,1,!0,o,u??null,p,k,Q,w,I,G,M1),o.context=w1(null),u=o.current,p=ni(),p=Me(p),k=Vs(p),k.callback=null,Ws(u,k,p),u=p,o.current.lanes=u,lt(o,u),$i(o),i[zn]=o.current,lb(i),new Ld(o)},Wu.version="19.2.6",Wu}var H1;function b2(){if(H1)return Ab.exports;H1=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(),Ab.exports=g2(),Ab.exports}var y2=b2(),Ku={},G1;function v2(){if(G1)return Ku;G1=1,Object.defineProperty(Ku,"__esModule",{value:!0}),Ku.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,b="",y=a?null:e,x=new Array(arguments.length),S=0;S<arguments.length;S++)x[S]=arguments[S];for(;x.length>0;){var E=x.pop();if(!(E==null||E===!1)){if(Array.isArray(E)){for(var T=0;T<E.length;T++)x.push(E[T]);continue}var R=c!=null?c(E):E;if(R.$$css!=null){var _="";if(y!=null&&y.has(R)){var C=y.get(R);C!=null&&(_=C[0],b=C[2],f.push.apply(f,C[1]),y=C[3])}else{var M=[];for(var A in R){var N=R[A];if(A===t){var P=R[A];P!==!0&&(b=b?P+"; "+b:P);continue}typeof N=="string"||N===null?f.includes(A)||(f.push(A),y!=null&&M.push(A),typeof N=="string"&&(_+=_?" "+N:N)):console.error("styleq: ".concat(A," typeof ").concat(String(N),' is not "string" or "null".'))}if(y!=null){var z=new WeakMap;y.set(R,[_,M,b,z]),y=z}}_&&(h=h?_+" "+h:_)}else if(l)m==null&&(m={}),m=Object.assign({},R,m);else{var D=null;for(var H in R){var W=R[H];W!==void 0&&(f.includes(H)||(W!=null&&(m==null&&(m={}),D==null&&(D={}),D[H]=W),f.push(H),y=null))}D!=null&&(m=Object.assign(D,m))}}}var F=[h,m,b];return F}}var r=Ku.styleq=n();return r.factory=n,Ku}var k2=v2();function Ct(...e){const[t,n,r]=k2.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 OC(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=OC(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function x2(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=OC(e))&&(r&&(r+=" "),r+=t);return r}function bn(...e){return x2(e)}function Lt({rootClass:e,stylexStyles:t,className:n,style:r}){const s=Ct(t);return{className:bn(e,s.className,n),style:{...s.style,...r}}}const Ai={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 S2({pill:e,size:t,variant:n}){return[Ai.base,t==="sm"?Ai.sizeSm:Ai.sizeBase,e?[Ai.pill,t==="sm"?Ai.pillSizeSm:Ai.pillSizeBase]:null,w2(n)]}function w2(e){switch(e){case"accent":return Ai.variantAccent;case"neutral":return Ai.variantNeutral;case"success":return Ai.variantSuccess;case"warn":return Ai.variantWarn;case"danger":return Ai.variantDanger}}function Zi({children:e,variant:t="neutral",size:n="base",pill:r=!1,as:s="span",className:a,style:l,...c}){const d=Lt({rootClass:"ui-status-badge",stylexStyles:S2({pill:r,size:n,variant:t}),className:a,style:l});return g.jsx(s,{className:d.className,style:d.style,"data-variant":t,"data-size":n,"data-pill":r||void 0,...c,children:e})}function E2(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 Mn=E2("https://base-ui.com/production-error","Base UI"),V1={};function Hr(e,t){const n=v.useRef(V1);return n.current===V1&&(n.current=e(t)),n}function bo(e,t,n,r){const s=Hr(IC).current;return _2(s,e,t,n,r)&&MC(s,[e,t,n,r]),s.callback}function T2(e){const t=Hr(IC).current;return R2(t,e)&&MC(t,e),t.callback}function IC(){return{callback:null,cleanup:null,refs:[]}}function _2(e,t,n,r,s){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==s}function R2(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function MC(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 C2=parseInt(v.version,10);function nk(e){return C2>=e}function W1(e){if(!v.isValidElement(e))return null;const t=e,n=t.props;return(nk(19)?n?.ref:t.ref)??null}function Yy(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Jn(){}const yo=Object.freeze([]),Un=Object.freeze({});function N2(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 A2(e,t){return typeof e=="function"?e(t):e}function DC(e,t){return typeof e=="function"?e(t):e}const rk={};function Gi(e,t,n,r,s){if(!n&&!r&&!s&&!e)return Lp(t);let a=Lp(e);return t&&(a=dc(a,t)),n&&(a=dc(a,n)),r&&(a=dc(a,r)),s&&(a=dc(a,s)),a}function O2(e){if(e.length===0)return rk;if(e.length===1)return Lp(e[0]);let t=Lp(e[0]);for(let n=1;n<e.length;n+=1)t=dc(t,e[n]);return t}function Lp(e){return ik(e)?{...jC(e,rk)}:I2(e)}function dc(e,t){return ik(t)?jC(t,e):M2(e,t)}function I2(e){const t={...e};for(const n in t){const r=t[n];zC(n,r)&&(t[n]=LC(r))}return t}function M2(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Yy(e.style,r);break}case"className":{e[n]=PC(e.className,r);break}default:zC(n,r)?e[n]=D2(e[n],r):e[n]=r}}return e}function zC(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 ik(e){return typeof e=="function"}function jC(e,t){return ik(e)?e(t):e??rk}function D2(e,t){return t?e?(...n)=>{const r=n[0];if($C(r)){const a=r;Pp(a);const l=t(...n);return a.baseUIHandlerPrevented||e?.(...n),l}const s=t(...n);return e?.(...n),s}:LC(t):e}function LC(e){return e&&((...t)=>{const n=t[0];return $C(n)&&Pp(n),e(...t)})}function Pp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function PC(e,t){return t?e?t+" "+e:t:e}function $C(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function mn(e,t,n={}){const r=t.render,s=z2(t,n);if(n.enabled===!1)return null;const a=n.state??Un;return P2(e,r,s,a)}function z2(e,t={}){const{className:n,style:r,render:s}=e,{state:a=Un,ref:l,props:c,stateAttributesMapping:d,enabled:f=!0}=t,h=f?A2(n,a):void 0,m=f?DC(r,a):void 0,b=f?N2(a,d):Un,y=f&&c?j2(c):void 0,x=f?Yy(b,y)??{}:Un;return typeof document<"u"&&(f?Array.isArray(l)?x.ref=T2([x.ref,W1(s),...l]):x.ref=bo(x.ref,W1(s),l):bo(null,null)),f?(h!==void 0&&(x.className=PC(x.className,h)),m!==void 0&&(x.style=Yy(x.style,m)),x):Un}function j2(e){return Array.isArray(e)?O2(e):Gi(void 0,e)}const L2=Symbol.for("react.lazy");function P2(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const s=Gi(n,t.props);s.ref=n.ref;let a=t;return a?.$$typeof===L2&&(a=v.Children.toArray(t)[0]),v.cloneElement(a,s)}if(e&&typeof e=="string")return $2(e,n);throw new Error(Mn(8))}function $2(e,t){return e==="button"?v.createElement("button",{type:"button",...t,key:t.key}):e==="img"?v.createElement("img",{alt:"",...t,key:t.key}):v.createElement(e,t)}let oa=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const B2={[oa.startingStyle]:""},F2={[oa.endingStyle]:""},xo={transitionStatus(e){return e==="starting"?B2:e==="ending"?F2:null}};let sk=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=oa.startingStyle]="startingStyle",e[e.endingStyle=oa.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),$p=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const U2={[$p.popupOpen]:""},q2={[$p.popupOpen]:"",[$p.pressed]:""},H2={[sk.open]:""},G2={[sk.closed]:""},V2={[sk.anchorHidden]:""},BC={open(e){return e?U2:null}},W2={open(e){return e?q2:null}},nf={open(e){return e?H2:G2},anchorHidden(e){return e?V2:null}};function Ch(){return typeof window<"u"}function er(e){return Nh(e)?(e.nodeName||"").toLowerCase():"#document"}function wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qi(e){var t;return(t=(Nh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Nh(e){return Ch()?e instanceof Node||e instanceof wn(e).Node:!1}function ft(e){return Ch()?e instanceof Element||e instanceof wn(e).Element:!1}function Bt(e){return Ch()?e instanceof HTMLElement||e instanceof wn(e).HTMLElement:!1}function vo(e){return!Ch()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof wn(e).ShadowRoot}function So(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=vr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function K2(e){return/^(table|td|th)$/.test(er(e))}function Ah(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Z2=/transform|translate|scale|rotate|perspective|filter/,Y2=/paint|layout|strict|content/,Ko=e=>!!e&&e!=="none";let Db;function ok(e){const t=ft(e)?vr(e):e;return Ko(t.transform)||Ko(t.translate)||Ko(t.scale)||Ko(t.rotate)||Ko(t.perspective)||!Oh()&&(Ko(t.backdropFilter)||Ko(t.filter))||Z2.test(t.willChange||"")||Y2.test(t.contain||"")}function X2(e){let t=Yi(e);for(;Bt(t)&&!xi(t);){if(ok(t))return t;if(Ah(t))return null;t=Yi(t)}return null}function Oh(){return Db==null&&(Db=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Db}function xi(e){return/^(html|body|#document)$/.test(er(e))}function vr(e){return wn(e).getComputedStyle(e)}function Ih(e){return ft(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yi(e){if(er(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vo(e)&&e.host||Qi(e);return vo(t)?t.host:t}function FC(e){const t=Yi(e);return xi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bt(t)&&So(t)?t:FC(t)}function mo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=FC(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),l=wn(s);if(a){const c=Xy(l);return t.concat(l,l.visualViewport||[],So(s)?s:[],c&&n?mo(c):[])}else return t.concat(s,mo(s,[],n))}function Xy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const ak={...tk},zb=ak.useInsertionEffect,Q2=zb&&zb!==ak.useLayoutEffect?zb:e=>e();function Ke(e){const t=Hr(J2).current;return t.next=e,Q2(t.effect),t.trampoline}function J2(){const e={next:void 0,callback:eP,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function eP(){}const tP=()=>{},He=typeof document<"u"?v.useLayoutEffect:tP,UC=v.createContext(void 0);function qC(e=!1){const t=v.useContext(UC);if(t===void 0&&!e)throw new Error(Mn(16));return t}function nP(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:v.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 Gl(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:s=!0,composite:a}=e,l=v.useRef(null),c=qC(!0),d=a??c!==void 0,{props:f}=nP({focusableWhenDisabled:n,disabled:t,composite:d,tabIndex:r,isNativeButton:s}),h=v.useCallback(()=>{const y=l.current;jb(y)&&d&&t&&f.disabled===void 0&&y.disabled&&(y.disabled=!1)},[t,f.disabled,d]);He(h,[h]);const m=v.useCallback((y={})=>{const{onClick:x,onMouseDown:S,onKeyUp:E,onKeyDown:T,onPointerDown:R,..._}=y;return Gi({onClick(C){if(t){C.preventDefault();return}x?.(C)},onMouseDown(C){t||S?.(C)},onKeyDown(C){if(t||(Pp(C),T?.(C),C.baseUIHandlerPrevented))return;const M=C.target===C.currentTarget,A=C.currentTarget,N=jb(A),P=!s&&rP(A),z=M&&(s?N:!P),D=C.key==="Enter",H=C.key===" ",W=A.getAttribute("role"),F=W?.startsWith("menuitem")||W==="option"||W==="gridcell";if(M&&d&&H){if(C.defaultPrevented&&F)return;C.preventDefault(),P||s&&N?(A.click(),C.preventBaseUIHandler()):z&&(x?.(C),C.preventBaseUIHandler());return}z&&(!s&&(H||D)&&C.preventDefault(),!s&&D&&x?.(C))},onKeyUp(C){if(!t){if(Pp(C),E?.(C),C.target===C.currentTarget&&s&&d&&jb(C.currentTarget)&&C.key===" "){C.preventDefault();return}C.baseUIHandlerPrevented||C.target===C.currentTarget&&!s&&!d&&C.key===" "&&x?.(C)}},onPointerDown(C){if(t){C.preventDefault();return}R?.(C)}},s?{type:"button"}:{role:"button"},f,_)},[t,f,d,s]),b=Ke(y=>{l.current=y,h()});return{getButtonProps:m,buttonRef:b}}function jb(e){return Bt(e)&&e.tagName==="BUTTON"}function rP(e){return!!(e?.tagName==="A"&&e?.href)}const Ii="none",Vl="trigger-press",_r="trigger-hover",Cp="trigger-focus",lk="outside-press",Lb="item-press",Mh="focus-out",uk="escape-key",K1="list-navigation",iP="cancel-open",HC="disabled",Z1="missing",Y1="initial",Bp="imperative-action",sP="window-resize";function Et(e,t,n,r){let s=!1,a=!1;const l=r??Un;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 X1=0;function oP(e,t="mui"){const[n,r]=v.useState(e),s=e||n;return v.useEffect(()=>{n==null&&(X1+=1,r(`${t}-${X1}`))},[n,t]),s}const Q1=ak.useId;function rf(e,t){if(Q1!==void 0){const n=Q1();return e??(t?`${t}-${n}`:n)}return oP(e,t)}function Wl(e){return rf(e,"base-ui")}const aP=[];function ck(e){v.useEffect(e,aP)}const Zu=0;class Mi{static create(){return new Mi}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 Si(){const e=Hr(Mi.create).current;return ck(e.disposeEffect),e}function lP(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:uP,platform:cP,maxTouchPoints:fP}=lP(),Dh=uP.toLowerCase(),Ac=cP.toLowerCase(),zh=/^i(os$|p)/.test(Ac)||Ac==="macintel"&&fP>1,J1="android",Qy=Ac===J1||Dh.includes(J1),GC=!zh&&Ac.startsWith("mac");Ac.startsWith("win");const dP=GC||zh,wo=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!wo&&Dh.includes("firefox");!wo&&Dh.includes("chrom");const pP=dP,fk=/jsdom|happydom/.test(Dh);function Ui(e){e.preventDefault(),e.stopPropagation()}function hP(e){return"nativeEvent"in e}function dk(e){return e.pointerType===""&&e.isTrusted?!0:Qy&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function VC(e){return fk?!1:!Qy&&e.width===0&&e.height===0||Qy&&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 aa(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function mP(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Jy="data-base-ui-focusable",WC="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",jh="ArrowLeft",Lh="ArrowRight",KC="ArrowUp",pk="ArrowDown";function mr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function dt(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&vo(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function yr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Fp(e,t){if(!ft(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(dt(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function Pb(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 gP(e){return e.matches("html,body")}function Ph(e){return Bt(e)&&e.matches(WC)}function bP(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${WC}`)!=null}function ev(e){return e?e.getAttribute("role")==="combobox"&&Ph(e):!1}function yP(e){if(!e||fk)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Up(e){return e?e.hasAttribute(Jy)?e:e.querySelector(`[${Jy}]`)||e:null}function vP(e,t){return t!=null&&!aa(t)?0:typeof e=="function"?e():e}function qp(e,t,n){const r=vP(e,n);return typeof r=="number"?r:r?.[t]}function eE(e){return typeof e=="function"?e():e}function ZC(e,t){return t||e==="click"||e==="mousedown"}function kP(e){return e?.includes("mouse")&&e!=="mousedown"}const xP=v.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Mi,currentIdRef:{current:null},currentContextRef:{current:null}});function SP(e,t){e.current=t.current}function wP(e,t={open:!1}){const{open:n}=t,r="rootStore"in e?e.rootStore:e,s=r.useState("floatingId"),a=v.useContext(xP),{currentIdRef:l,delayRef:c,timeoutMs:d,initialDelayRef:f,currentContextRef:h,hasProvider:m,timeout:b}=a,[y,x]=v.useState(!1),S=v.useRef(n),E=v.useRef(!1);return He(()=>{S.current=n},[n]),He(()=>()=>{E.current=!0},[]),He(()=>{function T(){E.current||x(!1),h.current?.setIsInstantPhase(!1),l.current=null,h.current=null,c.current=f.current,b.clear()}if(l.current&&!n&&l.current===s){if(x(!1),d){const R=s;return b.start(d,()=>{r.select("open")||l.current&&l.current!==R||T()}),()=>{(S.current||l.current!==R)&&b.clear()}}T()}},[n,s,l,c,d,f,h,b,r]),He(()=>{if(!n)return;const T=h.current,R=l.current;b.clear(),h.current={onOpenChange:r.setOpen,setIsInstantPhase:x},l.current=s,c.current={open:0,close:qp(f.current,"close")},R!==null&&R!==s?(x(!0),T?.setIsInstantPhase(!0),T?.onOpenChange(!1,Et(Ii))):(x(!1),T?.setIsInstantPhase(!1))},[n,s,r,l,c,f,h,b]),He(()=>()=>{if(l.current===s){if(h.current=null,!S.current)return;l.current=null,SP(c,f),b.clear()}},[h,l,c,s,f,b]),v.useMemo(()=>({hasProvider:m,delayRef:c,isInstantPhase:y}),[m,c,y])}function zt(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Vi(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function In(e){const t=Hr(EP,e).current;return t.next=e,He(t.effect),t}function EP(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const $d=null;class TP{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 Bd=new TP;class $r{static create(){return new $r}static request(t){return Bd.request(t)}static cancel(t){return Bd.cancel(t)}currentId=$d;request(t){this.cancel(),this.currentId=Bd.request(()=>{this.currentId=$d,t()})}cancel=()=>{this.currentId!==$d&&(Bd.cancel(this.currentId),this.currentId=$d)};disposeEffect=()=>this.cancel}function Dl(){const e=Hr($r.create).current;return ck(e.disposeEffect),e}function Kt(e){return e?.ownerDocument||document}const YC={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},XC={...YC,position:"fixed",top:0,left:0},_P={...YC,position:"absolute"},Hp=v.forwardRef(function(t,n){const[r,s]=v.useState();He(()=>{pP&&wo&&s("button")},[]);const a={tabIndex:0,role:r};return g.jsx("span",{...t,ref:n,style:XC,"aria-hidden":r?void 0:!0,...a,"data-base-ui-focus-guard":""})}),RP=["top","right","bottom","left"],zl=Math.min,si=Math.max,jl=Math.round,kl=Math.floor,Wi=e=>({x:e,y:e}),CP={left:"right",right:"left",bottom:"top",top:"bottom"};function tv(e,t,n){return si(e,zl(t,n))}function Os(e,t){return typeof e=="function"?e(t):e}function qr(e){return e.split("-")[0]}function Eo(e){return e.split("-")[1]}function hk(e){return e==="x"?"y":"x"}function mk(e){return e==="y"?"height":"width"}function vi(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function gk(e){return hk(vi(e))}function NP(e,t,n){n===void 0&&(n=!1);const r=Eo(e),s=gk(e),a=mk(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=Gp(l)),[l,Gp(l)]}function AP(e){const t=Gp(e);return[nv(e),t,nv(t)]}function nv(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const tE=["left","right"],nE=["right","left"],OP=["top","bottom"],IP=["bottom","top"];function MP(e,t,n){switch(e){case"top":case"bottom":return n?t?nE:tE:t?tE:nE;case"left":case"right":return t?OP:IP;default:return[]}}function DP(e,t,n,r){const s=Eo(e);let a=MP(qr(e),n==="start",r);return s&&(a=a.map(l=>l+"-"+s),t&&(a=a.concat(a.map(nv)))),a}function Gp(e){const t=qr(e);return CP[t]+e.slice(t.length)}function zP(e){return{top:0,right:0,bottom:0,left:0,...e}}function QC(e){return typeof e!="number"?zP(e):{top:e,right:e,bottom:e,left:e}}function Oc(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 gc(e,t){return t<0||t>=e.length}function Np(e,t){return Ns(e.current,{disabledIndices:t})}function rv(e,t){return Ns(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ns(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&&Vp(e,a,r));return a}function Vp(e,t,n){if(typeof n=="function"?n(t):n?.includes(t)??!1)return!0;const s=e[t];return s?$h(s)?!n&&(s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true"):!0:!1}function jP(e){return e.visibility==="hidden"||e.visibility==="collapse"}function $h(e,t=e?vr(e):null){return!e||!e.isConnected||!t||jP(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const LP='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function PP(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return vo(n)?n.host:null}function iv(e){for(const t of Array.from(e.children))if(er(t)==="summary")return t;return null}function $P(e,t){const n=iv(t);return!!n&&(e===n||dt(n,e))}function JC(e){const t=e?er(e):"";return e!=null&&e.matches(LP)&&(t!=="summary"||e.parentElement!=null&&er(e.parentElement)==="details"&&iv(e.parentElement)===e)&&(t!=="details"||iv(e)==null)&&(t!=="input"||e.type!=="hidden")}function eN(e){if(!JC(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=PP(t)){const n=t!==e,r=er(t)==="slot";if(t.hasAttribute("inert")||n&&er(t)==="details"&&!t.open&&!$P(e,t)||t.hasAttribute("hidden")||!r&&!BP(t,n))return!1}return!0}function BP(e,t){const n=vr(e);return t?n.display!=="none":$h(e,n)}function tN(e){const t=e.tabIndex;if(t<0){const n=er(e);if(n==="details"||n==="audio"||n==="video"||Bt(e)&&e.isContentEditable)return 0}return t}function $b(e){if(er(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function FP(e,t){const n=$b(e);if(!n)return!0;const r=t.find(s=>{const a=$b(s);return a?.name===n.name&&a.form===n.form&&a.checked});return r?r===n:t.find(s=>{const a=$b(s);return a?.name===n.name&&a.form===n.form})===n}function nN(e){if(Bt(e)&&er(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Bt(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function rN(e,t){nN(e).forEach(n=>{JC(n)&&t.push(n),rN(n,t)})}function iN(e,t,n){nN(e).forEach(r=>{Bt(r)&&r.matches(t)&&n.push(r),iN(r,t,n)})}function bk(e){return eN(e)&&tN(e)>=0}function sN(e){const t=[];return rN(e,t),t.filter(eN)}function Bh(e){const t=sN(e);return t.filter(n=>tN(n)>=0&&FP(n,t))}function oN(e,t){const n=Bh(e),r=n.length;if(r===0)return;const s=mr(Kt(e)),a=n.indexOf(s),l=a===-1?t===1?0:r-1:a+t;return n[l]}function aN(e){return oN(Kt(e).body,1)||e}function lN(e){return oN(Kt(e).body,-1)||e}function bc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!dt(n,r)}function UP(e){Bh(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function rE(e){const t=[];iN(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 ko(e,t,n=!0){return e.filter(s=>s.parentId===t).flatMap(s=>[...!n||s.context?.open?[s]:[],...ko(e,s.id,n)])}function iE(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 Ic(e){return`data-base-ui-${e}`}let Fd=0;function Ap(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:s}=t;cancelAnimationFrame(Fd);function a(){s&&!s()||e?.focus({preventScroll:n})}if(r)return a(),Jn;const l=requestAnimationFrame(a);return Fd=l,()=>{Fd===l&&(cancelAnimationFrame(l),Fd=0)}}const Bb={inert:new WeakMap,"aria-hidden":new WeakMap},sE="data-base-ui-inert",sv={inert:new WeakSet,"aria-hidden":new WeakSet};let Yu=new WeakMap,Fb=0;function qP(e){return sv[e]}function uN(e){return e?vo(e)?e.host:uN(e.parentNode):null}const oE=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=uN(n);return e.contains(r)?r:null}).filter(n=>n!=null),aE=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},lE=(e,t,n)=>{const r=[],s=a=>{!a||n.has(a)||Array.from(a.children).forEach(l=>{er(l)!=="script"&&(t.has(l)?s(l):r.push(l))})};return s(e),r};function HP(e,t,n,r,{mark:s=!0}){let a=null;r?a="inert":n&&(a="aria-hidden");let l=null,c=null;const d=oE(t,e),f=s?lE(t,aE(d),new Set(d)):[],h=[],m=[];if(a){const b=Bb[a],y=qP(a);c=y,l=b;const x=oE(t,Array.from(t.querySelectorAll("[aria-live]"))),S=d.concat(x);lE(t,aE(S),new Set(S)).forEach(T=>{const R=T.getAttribute(a),_=R!==null&&R!=="false",C=(b.get(T)||0)+1;b.set(T,C),h.push(T),C===1&&_&&y.add(T),_||T.setAttribute(a,a==="inert"?"":"true")})}return s&&f.forEach(b=>{const y=(Yu.get(b)||0)+1;Yu.set(b,y),m.push(b),y===1&&b.setAttribute(sE,"")}),Fb+=1,()=>{l&&h.forEach(b=>{const x=(l.get(b)||0)-1;l.set(b,x),x||(!c?.has(b)&&a&&b.removeAttribute(a),c?.delete(b))}),s&&m.forEach(b=>{const y=(Yu.get(b)||0)-1;Yu.set(b,y),y||b.removeAttribute(sE)}),Fb-=1,Fb||(Bb.inert=new WeakMap,Bb["aria-hidden"]=new WeakMap,sv.inert=new WeakSet,sv["aria-hidden"]=new WeakSet,Yu=new WeakMap)}}function uE(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:s=!0}=t,a=Kt(e[0]).body;return HP(e,a,n,r,{mark:s})}var zi=AC();const GP={style:{transition:"none"}},VP="data-base-ui-click-trigger",WP={fallbackAxisSide:"none"},cN={fallbackAxisSide:"end"},KP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},fN=v.createContext(null),dN=()=>v.useContext(fN),ZP=Ic("portal");function pN(e={}){const{ref:t,container:n,componentProps:r=Un,elementProps:s}=e,a=rf(),c=dN()?.portalNode,[d,f]=v.useState(null),[h,m]=v.useState(null),b=Ke(E=>{E!==null&&m(E)}),y=v.useRef(null);He(()=>{if(n===null){y.current&&(y.current=null,m(null),f(null));return}if(a==null)return;const E=(n&&(Nh(n)?n:n.current))??c??document.body;if(E==null){y.current&&(y.current=null,m(null),f(null));return}y.current!==E&&(y.current=E,m(null),f(E))},[n,c,a]);const x=mn("div",r,{ref:[t,b],props:[{id:a,[ZP]:""},s]});return{portalNode:h,portalSubtree:d&&x?zi.createPortal(x,d):null}}const YP=v.forwardRef(function(t,n){const{render:r,className:s,style:a,children:l,container:c,renderGuards:d,...f}=t,{portalNode:h,portalSubtree:m}=pN({container:c,ref:n,componentProps:t,elementProps:f}),b=v.useRef(null),y=v.useRef(null),x=v.useRef(null),S=v.useRef(null),[E,T]=v.useState(null),R=v.useRef(!1),_=E?.modal,C=E?.open,M=typeof d=="boolean"?d:!!E&&!E.modal&&E.open&&!!h;v.useEffect(()=>{if(!h||_)return;function N(P){h&&P.relatedTarget&&bc(P)&&(P.type==="focusin"?R.current&&(rE(h),R.current=!1):(UP(h),R.current=!0))}return Vi(zt(h,"focusin",N,!0),zt(h,"focusout",N,!0))},[h,_]),He(()=>{!h||C!==!0||!R.current||(rE(h),R.current=!1)},[C,h]);const A=v.useMemo(()=>({beforeOutsideRef:b,afterOutsideRef:y,beforeInsideRef:x,afterInsideRef:S,portalNode:h,setFocusManagerState:T}),[h]);return g.jsxs(v.Fragment,{children:[m,g.jsxs(fN.Provider,{value:A,children:[M&&h&&g.jsx(Hp,{"data-type":"outside",ref:b,onFocus:N=>{if(bc(N,h))x.current?.focus();else{const P=E?E.domReference:null;lN(P)?.focus()}}}),M&&h&&g.jsx("span",{"aria-owns":h.id,style:KP}),h&&zi.createPortal(l,h),M&&h&&g.jsx(Hp,{"data-type":"outside",ref:y,onFocus:N=>{if(bc(N,h))S.current?.focus();else{const P=E?E.domReference:null;aN(P)?.focus(),E?.closeOnFocusOut&&E?.onOpenChange(!1,Et(Mh,N.nativeEvent))}}})]})]})});function hN(){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)}}}class XP{nodesRef={current:[]};events=hN();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const mN=v.createContext(null),gN=v.createContext(null),Kl=()=>v.useContext(mN)?.id||null,ya=e=>{const t=v.useContext(gN);return e??t};function QP(e){const t=rf(),n=ya(e),r=Kl();return He(()=>{if(!t)return;const s={id:t,parentId:r};return n?.addNode(s),()=>{n?.removeNode(s)}},[n,t,r]),t}function JP(e){const{children:t,id:n}=e,r=Kl();return g.jsx(mN.Provider,{value:v.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function e$(e){const{children:t,externalTree:n}=e,r=Hr(()=>n??new XP).current;return g.jsx(gN.Provider,{value:r,children:t})}function Es(e){return e==null?e:"current"in e?e.current:e}function t$(e,t){const n=wn(yr(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 cE=20;let po=[];function yk(){po=po.filter(e=>e.deref()?.isConnected)}function fE(e){yk(),e&&er(e)!=="body"&&(po.push(new WeakRef(e)),po.length>cE&&(po=po.slice(-cE)))}function dE(){return yk(),po[po.length-1]?.deref()}function n$(e){return e?bk(e)?e:Bh(e)[0]||e:null}function pE(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const n=sN(e).filter(s=>{const a=s.getAttribute("data-tabindex")||"";return bk(s)||s.hasAttribute("data-tabindex")&&!a.startsWith("-")}),r=e.getAttribute("tabindex");n.length===0?r!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(r!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function r$(e){const{context:t,children:n,disabled:r=!1,initialFocus:s=!0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,closeOnFocusOut:d=!0,openInteractionType:f="",nextFocusableElement:h,previousFocusableElement:m,beforeContentFocusGuardRef:b,externalTree:y,getInsideElements:x}=e,S="rootStore"in t?t.rootStore:t,E=S.useState("open"),T=S.useState("domReferenceElement"),R=S.useState("floatingElement"),{events:_,dataRef:C}=S.context,M=Ke(()=>C.current.floatingContext?.nodeId),A=s===!1,N=ev(T)&&A,P=In(s),z=In(a),D=In(f),H=In(E),W=ya(y),F=dN(),L=v.useRef(!1),U=v.useRef(!1),q=v.useRef(!1),Z=v.useRef(null),B=v.useRef(""),K=v.useRef(""),O=v.useRef(null),$=v.useRef(null),V=bo(O,b,F?.beforeInsideRef),j=bo($,F?.afterInsideRef),X=Si(),se=Si(),re=Dl(),oe=F!=null,ue=Up(R),ce=Ke((ae=ue)=>ae?Bh(ae):[]),ge=Ke(()=>x?.().filter(ae=>ae!=null)??[]);v.useEffect(()=>{if(r||!c)return;function ae(we){we.key==="Tab"&&dt(ue,mr(Kt(ue)))&&ce().length===0&&!N&&Ui(we)}const ye=Kt(ue);return zt(ye,"keydown",ae)},[r,ue,c,N,ce]),v.useEffect(()=>{if(r||!E)return;const ae=Kt(ue);function ye(){q.current=!1}function we(Ee){const xe=yr(Ee),De=ge(),Ie=dt(R,xe)||dt(T,xe)||dt(F?.portalNode,xe)||De.some(je=>je===xe||dt(je,xe));q.current=!Ie,K.current=Ee.pointerType||"keyboard",xe?.closest(`[${VP}]`)&&(U.current=!0,se.start(0,()=>{U.current=!1}))}function Ae(){K.current="keyboard"}return Vi(zt(ae,"pointerdown",we,!0),zt(ae,"pointerup",ye,!0),zt(ae,"pointercancel",ye,!0),zt(ae,"keydown",Ae,!0),ye)},[r,R,T,ue,E,F,se,ge]),v.useEffect(()=>{if(r||!d)return;const ae=Kt(ue);function ye(){U.current=!0,se.start(0,()=>{U.current=!1})}function we(De){const Ie=yr(De);bk(Ie)&&(Z.current=Ie)}function Ae(De){const Ie=De.relatedTarget,je=De.currentTarget,Ue=yr(De);c&&Ie==null&&Ue!=null&&dt(R,Ue)&&fE(Ue),queueMicrotask(()=>{const ke=M(),Te=S.context.triggerElements,te=ge(),fe=Ie?.hasAttribute(Ic("focus-guard"))&&[O.current,$.current,F?.beforeInsideRef.current,F?.afterInsideRef.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,Es(m),Es(h)].includes(Ie),J=!(dt(T,Ie)||dt(R,Ie)||dt(Ie,R)||dt(F?.portalNode,Ie)||te.some(ne=>ne===Ie||dt(ne,Ie))||Ie!=null&&Te.hasElement(Ie)||Te.hasMatchingElement(ne=>dt(ne,Ie))||fe||W&&(ko(W.nodesRef.current,ke).find(ne=>dt(ne.context?.elements.floating,Ie)||dt(ne.context?.elements.domReference,Ie))||iE(W.nodesRef.current,ke).find(ne=>[ne.context?.elements.floating,Up(ne.context?.elements.floating)].includes(Ie)||ne.context?.elements.domReference===Ie)));if(je===T&&ue&&pE(ue),l&&je!==T&&!$h(Ue)&&mr(ae)===ae.body){if(Bt(ue)&&(ue.focus(),l==="popup")){re.request(()=>{ue.focus()});return}const ne=ce(),be=Z.current,Ge=(be&&ne.includes(be)?be:null)||ne[ne.length-1]||ue;Bt(Ge)&&Ge.focus()}if(C.current.insideReactTree){C.current.insideReactTree=!1;return}(N||!c)&&Ie&&J&&!U.current&&(N||Ie!==dE())&&(L.current=!0,S.setOpen(!1,Et(Mh,De)))})}function Ee(){q.current||(C.current.insideReactTree=!0,X.start(0,()=>{C.current.insideReactTree=!1}))}const xe=Bt(T)?T:null;if(!(!R&&!xe))return Vi(xe&&zt(xe,"focusout",Ae),xe&&zt(xe,"pointerdown",ye),R&&zt(R,"focusin",we),R&&zt(R,"focusout",Ae),R&&F&&zt(R,"focusout",Ee,!0))},[r,T,R,ue,c,W,F,S,d,l,ce,N,M,C,X,se,re,h,m,ge]),v.useEffect(()=>{if(r||!R||!E)return;const ae=Array.from(F?.portalNode?.querySelectorAll(`[${Ic("portal")}]`)||[]),we=(W?iE(W.nodesRef.current,M()):[]).find(je=>ev(je.context?.elements.domReference||null))?.context?.elements.domReference,Ee=[...[R,...ae,O.current,$.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,...ge()],we,Es(m),Es(h),N?T:null].filter(je=>je!=null),xe=uE(Ee,{ariaHidden:c||N,mark:!1}),De=[R,...ae].filter(je=>je!=null),Ie=uE(De);return()=>{Ie(),xe()}},[E,r,T,R,c,F,N,W,M,h,m,ge]),He(()=>{if(!E||r||!Bt(ue))return;const ae=Kt(ue),ye=mr(ae);queueMicrotask(()=>{const we=P.current,Ae=typeof we=="function"?we(D.current||""):we;if(Ae===void 0||Ae===!1||dt(ue,ye))return;let xe=null;const De=()=>(xe==null&&(xe=ce(ue)),xe[0]||ue);let Ie;Ae===!0||Ae===null?Ie=De():Ie=Es(Ae),Ie=Ie||De();const je=dt(ue,mr(ae));Ap(Ie,{preventScroll:Ie===ue,shouldFocus(){if(!H.current)return!1;if(je)return!0;const Ue=mr(ae);return!(Ue!==Ie&&dt(ue,Ue))}})})},[r,E,ue,ce,P,D,H]),He(()=>{if(r||!ue)return;const ae=Kt(ue),ye=mr(ae),we=D.current==null;fE(ye);function Ae(xe){if(xe.open||(B.current=t$(xe.nativeEvent,K.current)),xe.reason===_r&&xe.nativeEvent.type==="mouseleave"&&(L.current=!0),xe.reason===lk)if(xe.nested)L.current=!1;else if(dk(xe.nativeEvent)||VC(xe.nativeEvent))L.current=!1;else{let De=!1;Kt(ue).createElement("div").focus({get preventScroll(){return De=!0,!1}}),De?L.current=!1:L.current=!0}}_.on("openchange",Ae);function Ee(){const xe=z.current;let De=typeof xe=="function"?xe(B.current):xe;if(De===void 0||De===!1)return null;De===null&&(De=!0);const Ie=T?.isConnected?T:null,je=ye?.isConnected&&er(ye)!=="body"?ye:null;let Ue=we?je||Ie:Ie||je;return Ue||(Ue=dE()||null),typeof De=="boolean"?Ue:Es(De)||Ue||null}return()=>{_.off("openchange",Ae);const xe=mr(ae),De=ge(),Ie=dt(R,xe)||De.some(ke=>ke===xe||dt(ke,xe))||W&&ko(W.nodesRef.current,M(),!1).some(ke=>dt(ke.context?.elements.floating,xe)),je=z.current,Ue=Ee();queueMicrotask(()=>{const ke=n$(Ue),Te=typeof je!="boolean";je&&!L.current&&Bt(ke)&&(!(!Te&&ke!==xe&&xe!==ae.body)||Ie)&&ke.focus({preventScroll:!0}),L.current=!1})}},[r,R,ue,z,D,_,W,T,M,ge]),He(()=>{if(!wo||E||!R)return;const ae=mr(Kt(R));!Bt(ae)||!Ph(ae)||dt(R,ae)&&ae.blur()},[E,R]),He(()=>{if(!(r||!F))return F.setFocusManagerState({modal:c,closeOnFocusOut:d,open:E,onOpenChange:S.setOpen,domReference:T}),()=>{F.setFocusManagerState(null)}},[r,F,c,E,S,d,T]),He(()=>{if(!(r||!ue))return pE(ue),()=>{queueMicrotask(yk)}},[r,ue]);const Ce=!r&&(c?!N:!0)&&(oe||c);return g.jsxs(v.Fragment,{children:[Ce&&g.jsx(Hp,{"data-type":"inside",ref:V,onFocus:ae=>{if(c){const ye=ce();Ap(ye[ye.length-1])}else F?.portalNode&&(L.current=!1,bc(ae,F.portalNode)?aN(T)?.focus():Es(m??F.beforeOutsideRef)?.focus())}}),n,Ce&&g.jsx(Hp,{"data-type":"inside",ref:j,onFocus:ae=>{c?Ap(ce()[0]):F?.portalNode&&(d&&(L.current=!0),bc(ae,F.portalNode)?lN(T)?.focus():Es(h??F.afterOutsideRef)?.focus())}})]})}function i$(e,t={}){const{enabled:n=!0,event:r="click",toggle:s=!0,ignoreMouse:a=!1,stickIfOpen:l=!0,touchOpenDelay:c=0,reason:d=Vl}=t,f="rootStore"in e?e.rootStore:e,h=f.context.dataRef,m=v.useRef(void 0),b=Dl(),y=Si(),x=v.useMemo(()=>{function S(T,R,_,C){const M=Et(d,R,_);T&&C==="touch"&&c>0?y.start(c,()=>{f.setOpen(!0,M)}):f.setOpen(T,M)}function E(T,R,_){const C=h.current.openEvent,M=f.select("domReferenceElement")!==R;return T&&M||!T||!s?!0:C&&l?!_(C.type):!1}return{onPointerDown(T){m.current=T.pointerType},onMouseDown(T){const R=m.current,_=T.nativeEvent,C=f.select("open");if(T.button!==0||r==="click"||aa(R,!0)&&a)return;const M=E(C,T.currentTarget,P=>P==="click"||P==="mousedown"),A=yr(_);if(Ph(A)){S(M,_,A,R);return}const N=T.currentTarget;b.request(()=>{S(M,_,N,R)})},onClick(T){if(r==="mousedown-only")return;const R=m.current;if(r==="mousedown"&&R){m.current=void 0;return}if(aa(R,!0)&&a)return;const _=f.select("open"),C=E(_,T.currentTarget,M=>M==="click"||M==="mousedown"||M==="keydown"||M==="keyup");S(C,T.nativeEvent,T.currentTarget,R)},onKeyDown(){m.current=void 0}}},[h,r,a,d,f,l,s,b,y,c]);return v.useMemo(()=>n?{reference:x}:Un,[n,x])}function s$(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",d=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let f=a.width,h=a.height,m=a.x,b=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,b-=r||0,f=0,h=0,!s||d?(f=t.axis==="y"?a.width:0,h=t.axis==="x"?a.height:0,m=l&&t.x!=null?t.x:m,b=c&&t.y!=null?t.y:b):s&&!d&&(h=t.axis==="x"?a.height:h,f=t.axis==="y"?a.width:f),s=!0,{width:f,height:h,x:m,y:b,top:b,right:m+f,bottom:b+h,left:m}}}}function hE(e){return e!=null&&e.clientX!=null}function o$(e,t={}){const{enabled:n=!0,axis:r="both"}=t,s="rootStore"in e?e.rootStore:e,a=s.useState("open"),l=s.useState("floatingElement"),c=s.useState("domReferenceElement"),d=s.context.dataRef,f=v.useRef(!1),h=v.useRef(null),[m,b]=v.useState(),[y,x]=v.useState([]),S=Ke(C=>{s.set("positionReference",C)}),E=Ke((C,M,A)=>{f.current||d.current.openEvent&&!hE(d.current.openEvent)||s.set("positionReference",s$(A??c,{x:C,y:M,axis:r,dataRef:d,pointerType:m}))}),T=Ke(C=>{a?h.current||(E(C.clientX,C.clientY,C.currentTarget),x([])):E(C.clientX,C.clientY,C.currentTarget)}),R=aa(m)?l:a;v.useEffect(()=>{if(!n){S(c);return}if(!R)return;function C(){h.current?.(),h.current=null}const M=wn(l);function A(N){const P=yr(N);dt(l,P)?C():E(N.clientX,N.clientY)}return!d.current.openEvent||hE(d.current.openEvent)?h.current=zt(M,"mousemove",A):S(c),C},[R,n,l,d,c,s,E,S,y]),v.useEffect(()=>()=>{s.set("positionReference",null)},[s]),v.useEffect(()=>{n&&!l&&(f.current=!1)},[n,l]),v.useEffect(()=>{!n&&a&&(f.current=!0)},[n,a]);const _=v.useMemo(()=>{function C(M){b(M.pointerType)}return{onPointerDown:C,onPointerEnter:C,onMouseMove:T,onMouseEnter:T}},[T]);return v.useMemo(()=>n?{reference:_,trigger:_}:{},[n,_])}function a$(){return!1}function l$(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function vk(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:s=!0,outsidePressEvent:a="sloppy",referencePress:l=a$,bubbles:c,externalTree:d}=t,f="rootStore"in e?e.rootStore:e,h=f.useState("open"),m=f.useState("floatingElement"),{dataRef:b}=f.context,y=ya(d),x=Ke(typeof s=="function"?s:()=>!1),S=typeof s=="function"?x:s,E=S!==!1,T=Ke(()=>a),{escapeKey:R,outsidePress:_}=l$(c),C=v.useRef(!1),M=v.useRef(!1),A=v.useRef(!1),N=v.useRef(!1),P=v.useRef(""),z=v.useRef(null),D=Si(),H=Si(),W=Ke(()=>{H.clear(),b.current.insideReactTree=!1}),F=Ke(V=>{const j=b.current.floatingContext?.nodeId;return(y?ko(y.nodesRef.current,j):[]).some(se=>se.context?.open&&!se.context.dataRef.current[V])}),L=Ke(V=>Pb(V,f.select("floatingElement"))||Pb(V,f.select("domReferenceElement"))),U=Ke(V=>{l()&&f.setOpen(!1,Et(Vl,V.nativeEvent))}),q=Ke(V=>{if(!h||!n||!r||V.key!=="Escape"||N.current||!R&&F("__escapeKeyBubbles"))return;const j=hP(V)?V.nativeEvent:V,X=Et(uk,j);f.setOpen(!1,X),X.isCanceled||V.preventDefault(),!R&&!X.isPropagationAllowed&&V.stopPropagation()}),Z=Ke(()=>{b.current.insideReactTree=!0,H.start(0,W)}),B=Ke(V=>{if(!h||!n||V.button!==0)return;const j=yr(V.nativeEvent);dt(f.select("floatingElement"),j)&&(C.current||(C.current=!0,M.current=!1))}),K=Ke(V=>{!h||!n||(V.defaultPrevented||V.nativeEvent.defaultPrevented)&&C.current&&(M.current=!0)});v.useEffect(()=>{if(!h||!n)return;b.current.__escapeKeyBubbles=R,b.current.__outsidePressBubbles=_;const V=new Mi,j=new Mi;function X(){V.clear(),N.current=!0}function se(){V.start(wo?5:0,()=>{N.current=!1})}function re(){A.current=!0,j.start(0,()=>{A.current=!1})}function oe(){C.current=!1,M.current=!1}function ue(){const te=P.current,fe=te==="pen"||!te?"mouse":te,J=T(),ne=typeof J=="function"?J():J;return typeof ne=="string"?ne:ne[fe]}function ce(te){const fe=ue();return fe==="intentional"&&te.type!=="click"||fe==="sloppy"&&te.type==="click"}function ge(te){const fe=b.current.floatingContext?.nodeId,J=y&&ko(y.nodesRef.current,fe).some(ne=>Pb(te,ne.context?.elements.floating));return L(te)||J}function Ce(te){if(ce(te)){te.type!=="click"&&!L(te)&&(j.clear(),A.current=!1),W();return}if(b.current.insideReactTree){W();return}const fe=yr(te),J=`[${Ic("inert")}]`,ne=ft(fe)?fe.getRootNode():null,be=Array.from((vo(ne)?ne:Kt(f.select("floatingElement"))).querySelectorAll(J)),Ge=f.context.triggerElements;if(fe&&(Ge.hasElement(fe)||Ge.hasMatchingElement(Xe=>dt(Xe,fe))))return;let Ze=ft(fe)?fe:null;for(;Ze&&!xi(Ze);){const Xe=Yi(Ze);if(xi(Xe)||!ft(Xe))break;Ze=Xe}if(!(be.length&&ft(fe)&&!gP(fe)&&!dt(fe,f.select("floatingElement"))&&be.every(Xe=>!dt(Ze,Xe)))){if(Bt(fe)&&!("touches"in te)){const Xe=xi(fe),vt=vr(fe),Je=/auto|scroll/,mt=Xe||Je.test(vt.overflowX),Tt=Xe||Je.test(vt.overflowY),st=mt&&fe.clientWidth>0&&fe.scrollWidth>fe.clientWidth,_t=Tt&&fe.clientHeight>0&&fe.scrollHeight>fe.clientHeight,Ot=vt.direction==="rtl",ot=_t&&(Ot?te.offsetX<=fe.offsetWidth-fe.clientWidth:te.offsetX>fe.clientWidth),St=st&&te.offsetY>fe.clientHeight;if(ot||St)return}if(!ge(te)){if(ue()==="intentional"&&A.current){j.clear(),A.current=!1;return}typeof S=="function"&&!S(te)||F("__outsidePressBubbles")||(f.setOpen(!1,Et(lk,te)),W())}}}function ae(te){ue()!=="sloppy"||te.pointerType==="touch"||!f.select("open")||!n||L(te)||Ce(te)}function ye(te){if(ue()!=="sloppy"||!f.select("open")||!n||L(te))return;const fe=te.touches[0];fe&&(z.current={startTime:Date.now(),startX:fe.clientX,startY:fe.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{z.current&&(z.current.dismissOnTouchEnd=!1,z.current.dismissOnMouseDown=!1)}))}function we(te,fe){const J=yr(te);if(!J)return;const ne=zt(J,te.type,()=>{fe(te),ne()})}function Ae(te){P.current="touch",we(te,ye)}function Ee(te){D.clear(),te.type==="pointerdown"&&(P.current=te.pointerType),!(te.type==="mousedown"&&z.current&&!z.current.dismissOnMouseDown)&&we(te,fe=>{fe.type==="pointerdown"?ae(fe):Ce(fe)})}function xe(te){if(!C.current)return;const fe=M.current;if(oe(),ue()==="intentional"){if(te.type==="pointercancel"){fe&&re();return}if(!ge(te)){if(fe){re();return}typeof S=="function"&&!S(te)||(j.clear(),A.current=!0,W())}}}function De(te){if(ue()!=="sloppy"||!z.current||L(te))return;const fe=te.touches[0];if(!fe)return;const J=Math.abs(fe.clientX-z.current.startX),ne=Math.abs(fe.clientY-z.current.startY),be=Math.sqrt(J*J+ne*ne);be>5&&(z.current.dismissOnTouchEnd=!0),be>10&&(Ce(te),D.clear(),z.current=null)}function Ie(te){we(te,De)}function je(te){ue()!=="sloppy"||!z.current||L(te)||(z.current.dismissOnTouchEnd&&Ce(te),D.clear(),z.current=null)}function Ue(te){we(te,je)}const ke=Kt(m),Te=Vi(r&&Vi(zt(ke,"keydown",q),zt(ke,"compositionstart",X),zt(ke,"compositionend",se)),E&&Vi(zt(ke,"click",Ee,!0),zt(ke,"pointerdown",Ee,!0),zt(ke,"pointerup",xe,!0),zt(ke,"pointercancel",xe,!0),zt(ke,"mousedown",Ee,!0),zt(ke,"mouseup",xe,!0),zt(ke,"touchstart",Ae,!0),zt(ke,"touchmove",Ie,!0),zt(ke,"touchend",Ue,!0)));return()=>{Te(),V.clear(),j.clear(),oe(),A.current=!1}},[b,m,r,E,S,h,n,R,_,q,W,T,F,L,y,f,D]),v.useEffect(W,[S,W]);const O=v.useMemo(()=>({onKeyDown:q,onPointerDown:U,onClick:U}),[q,U]),$=v.useMemo(()=>({onKeyDown:q,onPointerDown:K,onMouseDown:K,onClickCapture:Z,onMouseDownCapture(V){Z(),B(V)},onPointerDownCapture(V){Z(),B(V)},onMouseUpCapture:Z,onTouchEndCapture:Z,onTouchMoveCapture:Z}),[q,Z,B,K]);return v.useMemo(()=>n?{reference:O,floating:$,trigger:O}:{},[n,O,$])}function mE(e,t,n){let{reference:r,floating:s}=e;const a=vi(t),l=gk(t),c=mk(l),d=qr(t),f=a==="y",h=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,b=r[c]/2-s[c]/2;let y;switch(d){case"top":y={x:h,y:r.y-s.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}switch(Eo(t)){case"start":y[l]-=b*(n&&f?-1:1);break;case"end":y[l]+=b*(n&&f?-1:1);break}return y}async function u$(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:l,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:m="floating",altBoundary:b=!1,padding:y=0}=Os(t,e),x=QC(y),E=c[b?m==="floating"?"reference":"floating":m],T=Oc(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(E)))==null||n?E:E.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:h,strategy:d})),R=m==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),C=await(a.isElement==null?void 0:a.isElement(_))?await(a.getScale==null?void 0:a.getScale(_))||{x:1,y:1}:{x:1,y:1},M=Oc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:R,offsetParent:_,strategy:d}):R);return{top:(T.top-M.top+x.top)/C.y,bottom:(M.bottom-T.bottom+x.bottom)/C.y,left:(T.left-M.left+x.left)/C.x,right:(M.right-T.right+x.right)/C.x}}const c$=50,f$=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:u$},d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:m}=mE(f,r,d),b=r,y=0;const x={};for(let S=0;S<a.length;S++){const E=a[S];if(!E)continue;const{name:T,fn:R}=E,{x:_,y:C,data:M,reset:A}=await R({x:h,y:m,initialPlacement:r,placement:b,strategy:s,middlewareData:x,rects:f,platform:c,elements:{reference:e,floating:t}});h=_??h,m=C??m,x[T]={...x[T],...M},A&&y<c$&&(y++,typeof A=="object"&&(A.placement&&(b=A.placement),A.rects&&(f=A.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):A.rects),{x:h,y:m}=mE(f,b,d)),S=-1)}return{x:h,y:m,placement:b,strategy:s,middlewareData:x}},d$=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:d,elements:f}=t,{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:b,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:S=!0,...E}=Os(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const T=qr(s),R=vi(c),_=qr(c)===c,C=await(d.isRTL==null?void 0:d.isRTL(f.floating)),M=b||(_||!S?[Gp(c)]:AP(c)),A=x!=="none";!b&&A&&M.push(...DP(c,S,x,C));const N=[c,...M],P=await d.detectOverflow(t,E),z=[];let D=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&z.push(P[T]),m){const L=NP(s,l,C);z.push(P[L[0]],P[L[1]])}if(D=[...D,{placement:s,overflows:z}],!z.every(L=>L<=0)){var H,W;const L=(((H=a.flip)==null?void 0:H.index)||0)+1,U=N[L];if(U&&(!(m==="alignment"?R!==vi(U):!1)||D.every(B=>vi(B.placement)===R?B.overflows[0]>0:!0)))return{data:{index:L,overflows:D},reset:{placement:U}};let q=(W=D.filter(Z=>Z.overflows[0]<=0).sort((Z,B)=>Z.overflows[1]-B.overflows[1])[0])==null?void 0:W.placement;if(!q)switch(y){case"bestFit":{var F;const Z=(F=D.filter(B=>{if(A){const K=vi(B.placement);return K===R||K==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(K=>K>0).reduce((K,O)=>K+O,0)]).sort((B,K)=>B[1]-K[1])[0])==null?void 0:F[0];Z&&(q=Z);break}case"initialPlacement":q=c;break}if(s!==q)return{reset:{placement:q}}}return{}}}};function gE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bE(e){return RP.some(t=>e[t]>=0)}const p$=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:s="referenceHidden",...a}=Os(e,t);switch(s){case"referenceHidden":{const l=await r.detectOverflow(t,{...a,elementContext:"reference"}),c=gE(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:bE(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...a,altBoundary:!0}),c=gE(l,n.floating);return{data:{escapedOffsets:c,escaped:bE(c)}}}default:return{}}}}},bN=new Set(["left","top"]);async function h$(e,t){const{placement:n,platform:r,elements:s}=e,a=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=qr(n),c=Eo(n),d=vi(n)==="y",f=bN.has(l)?-1:1,h=a&&d?-1:1,m=Os(t,e);let{mainAxis:b,crossAxis:y,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"&&(y=c==="end"?x*-1:x),d?{x:y*h,y:b*f}:{x:b*f,y:y*h}}const m$=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,d=await h$(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:s+d.x,y:a+d.y,data:{...d,placement:l}}}}},g$=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:d={fn:T=>{let{x:R,y:_}=T;return{x:R,y:_}}},...f}=Os(e,t),h={x:n,y:r},m=await a.detectOverflow(t,f),b=vi(qr(s)),y=hk(b);let x=h[y],S=h[b];if(l){const T=y==="y"?"top":"left",R=y==="y"?"bottom":"right",_=x+m[T],C=x-m[R];x=tv(_,x,C)}if(c){const T=b==="y"?"top":"left",R=b==="y"?"bottom":"right",_=S+m[T],C=S-m[R];S=tv(_,S,C)}const E=d.fn({...t,[y]:x,[b]:S});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[y]:l,[b]:c}}}}}},b$=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:d=!0,crossAxis:f=!0}=Os(e,t),h={x:n,y:r},m=vi(s),b=hk(m);let y=h[b],x=h[m];const S=Os(c,t),E=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const _=b==="y"?"height":"width",C=a.reference[b]-a.floating[_]+E.mainAxis,M=a.reference[b]+a.reference[_]-E.mainAxis;y<C?y=C:y>M&&(y=M)}if(f){var T,R;const _=b==="y"?"width":"height",C=bN.has(qr(s)),M=a.reference[m]-a.floating[_]+(C&&((T=l.offset)==null?void 0:T[m])||0)+(C?0:E.crossAxis),A=a.reference[m]+a.reference[_]+(C?0:((R=l.offset)==null?void 0:R[m])||0)-(C?E.crossAxis:0);x<M?x=M:x>A&&(x=A)}return{[b]:y,[m]:x}}}},y$=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:d=()=>{},...f}=Os(e,t),h=await l.detectOverflow(t,f),m=qr(s),b=Eo(s),y=vi(s)==="y",{width:x,height:S}=a.floating;let E,T;m==="top"||m==="bottom"?(E=m,T=b===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(T=m,E=b==="end"?"top":"bottom");const R=S-h.top-h.bottom,_=x-h.left-h.right,C=zl(S-h[E],R),M=zl(x-h[T],_),A=!t.middlewareData.shift;let N=C,P=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=_),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=R),A&&!b){const D=si(h.left,0),H=si(h.right,0),W=si(h.top,0),F=si(h.bottom,0);y?P=x-2*(D!==0||H!==0?D+H:si(h.left,h.right)):N=S-2*(W!==0||F!==0?W+F:si(h.top,h.bottom))}await d({...t,availableWidth:P,availableHeight:N});const z=await l.getDimensions(c.floating);return x!==z.width||S!==z.height?{reset:{rects:!0}}:{}}}};function yN(e){const t=vr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Bt(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:r,c=jl(n)!==a||jl(r)!==l;return c&&(n=a,r=l),{width:n,height:r,$:c}}function kk(e){return ft(e)?e:e.contextElement}function Tl(e){const t=kk(e);if(!Bt(t))return Wi(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=yN(t);let l=(a?jl(n.width):n.width)/r,c=(a?jl(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const v$=Wi(0);function vN(e){const t=wn(e);return!Oh()||!t.visualViewport?v$:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function k$(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==wn(e)?!1:t}function la(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=kk(e);let l=Wi(1);t&&(r?ft(r)&&(l=Tl(r)):l=Tl(e));const c=k$(a,n,r)?vN(a):Wi(0);let d=(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 b=wn(a),y=r&&ft(r)?wn(r):r;let x=b,S=Xy(x);for(;S&&r&&y!==x;){const E=Tl(S),T=S.getBoundingClientRect(),R=vr(S),_=T.left+(S.clientLeft+parseFloat(R.paddingLeft))*E.x,C=T.top+(S.clientTop+parseFloat(R.paddingTop))*E.y;d*=E.x,f*=E.y,h*=E.x,m*=E.y,d+=_,f+=C,x=wn(S),S=Xy(x)}}return Oc({width:h,height:m,x:d,y:f})}function Fh(e,t){const n=Ih(e).scrollLeft;return t?t.left+n:la(Qi(e)).left+n}function kN(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Fh(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function x$(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",l=Qi(r),c=t?Ah(t.floating):!1;if(r===l||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Wi(1);const h=Wi(0),m=Bt(r);if((m||!m&&!a)&&((er(r)!=="body"||So(l))&&(d=Ih(r)),m)){const y=la(r);f=Tl(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const b=l&&!m&&!a?kN(l,d):Wi(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+h.x+b.x,y:n.y*f.y-d.scrollTop*f.y+h.y+b.y}}function S$(e){return Array.from(e.getClientRects())}function w$(e){const t=Qi(e),n=Ih(e),r=e.ownerDocument.body,s=si(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=si(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Fh(e);const c=-n.scrollTop;return vr(r).direction==="rtl"&&(l+=si(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:l,y:c}}const yE=25;function E$(e,t){const n=wn(e),r=Qi(e),s=n.visualViewport;let a=r.clientWidth,l=r.clientHeight,c=0,d=0;if(s){a=s.width,l=s.height;const h=Oh();(!h||h&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}const f=Fh(r);if(f<=0){const h=r.ownerDocument,m=h.body,b=getComputedStyle(m),y=h.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,x=Math.abs(r.clientWidth-m.clientWidth-y);x<=yE&&(a-=x)}else f<=yE&&(a+=f);return{width:a,height:l,x:c,y:d}}function T$(e,t){const n=la(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Bt(e)?Tl(e):Wi(1),l=e.clientWidth*a.x,c=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:l,height:c,x:d,y:f}}function vE(e,t,n){let r;if(t==="viewport")r=E$(e,n);else if(t==="document")r=w$(Qi(e));else if(ft(t))r=T$(t,n);else{const s=vN(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Oc(r)}function xN(e,t){const n=Yi(e);return n===t||!ft(n)||xi(n)?!1:vr(n).position==="fixed"||xN(n,t)}function _$(e,t){const n=t.get(e);if(n)return n;let r=mo(e,[],!1).filter(c=>ft(c)&&er(c)!=="body"),s=null;const a=vr(e).position==="fixed";let l=a?Yi(e):e;for(;ft(l)&&!xi(l);){const c=vr(l),d=ok(l);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||So(l)&&!d&&xN(e,l))?r=r.filter(h=>h!==l):s=c,l=Yi(l)}return t.set(e,r),r}function R$(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?Ah(t)?[]:_$(t,this._c):[].concat(n),r],c=vE(t,l[0],s);let d=c.top,f=c.right,h=c.bottom,m=c.left;for(let b=1;b<l.length;b++){const y=vE(t,l[b],s);d=si(y.top,d),f=zl(y.right,f),h=zl(y.bottom,h),m=si(y.left,m)}return{width:f-m,height:h-d,x:m,y:d}}function C$(e){const{width:t,height:n}=yN(e);return{width:t,height:n}}function N$(e,t,n){const r=Bt(t),s=Qi(t),a=n==="fixed",l=la(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Wi(0);function f(){d.x=Fh(s)}if(r||!r&&!a)if((er(t)!=="body"||So(s))&&(c=Ih(t)),r){const y=la(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();a&&!r&&s&&f();const h=s&&!r&&!a?kN(s,c):Wi(0),m=l.left+c.scrollLeft-d.x-h.x,b=l.top+c.scrollTop-d.y-h.y;return{x:m,y:b,width:l.width,height:l.height}}function Ub(e){return vr(e).position==="static"}function kE(e,t){if(!Bt(e)||vr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Qi(e)===n&&(n=n.ownerDocument.body),n}function SN(e,t){const n=wn(e);if(Ah(e))return n;if(!Bt(e)){let s=Yi(e);for(;s&&!xi(s);){if(ft(s)&&!Ub(s))return s;s=Yi(s)}return n}let r=kE(e,t);for(;r&&K2(r)&&Ub(r);)r=kE(r,t);return r&&xi(r)&&Ub(r)&&!ok(r)?n:r||X2(e)||n}const A$=async function(e){const t=this.getOffsetParent||SN,n=this.getDimensions,r=await n(e.floating);return{reference:N$(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function O$(e){return vr(e).direction==="rtl"}const wN={convertOffsetParentRelativeRectToViewportRelativeRect:x$,getDocumentElement:Qi,getClippingRect:R$,getOffsetParent:SN,getElementRects:A$,getClientRects:S$,getDimensions:C$,getScale:Tl,isElement:ft,isRTL:O$};function EN(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function I$(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,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:h,top:m,width:b,height:y}=f;if(c||t(),!b||!y)return;const x=kl(m),S=kl(s.clientWidth-(h+b)),E=kl(s.clientHeight-(m+y)),T=kl(h),_={rootMargin:-x+"px "+-S+"px "+-E+"px "+-T+"px",threshold:si(0,zl(1,d))||1};let C=!0;function M(A){const N=A[0].intersectionRatio;if(N!==d){if(!C)return l();N?l(!1,N):r=setTimeout(()=>{l(!1,1e-7)},1e3)}N===1&&!EN(f,e.getBoundingClientRect())&&l(),C=!1}try{n=new IntersectionObserver(M,{..._,root:s.ownerDocument})}catch{n=new IntersectionObserver(M,_)}n.observe(e)}return l(!0),a}function Wp(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:d=!1}=r,f=kk(e),h=s||a?[...f?mo(f):[],...t?mo(t):[]]:[];h.forEach(T=>{s&&T.addEventListener("scroll",n,{passive:!0}),a&&T.addEventListener("resize",n)});const m=f&&c?I$(f,n):null;let b=-1,y=null;l&&(y=new ResizeObserver(T=>{let[R]=T;R&&R.target===f&&y&&t&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var _;(_=y)==null||_.observe(t)})),n()}),f&&!d&&y.observe(f),t&&y.observe(t));let x,S=d?la(e):null;d&&E();function E(){const T=la(e);S&&!EN(S,T)&&n(),S=T,x=requestAnimationFrame(E)}return n(),()=>{var T;h.forEach(R=>{s&&R.removeEventListener("scroll",n),a&&R.removeEventListener("resize",n)}),m?.(),(T=y)==null||T.disconnect(),y=null,d&&cancelAnimationFrame(x)}}const M$=m$,D$=g$,z$=d$,j$=y$,L$=p$,P$=b$,$$=(e,t,n)=>{const r=new Map,s={platform:wN,...n},a={...s.platform,_c:r};return f$(e,t,{...s,platform:a})};var B$=typeof document<"u",F$=function(){},Op=B$?v.useLayoutEffect:F$;function Kp(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(!Kp(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)&&!Kp(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function TN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xE(e,t){const n=TN(e);return Math.round(t*n)/n}function qb(e){const t=v.useRef(e);return Op(()=>{t.current=e}),t}function _N(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:d,open:f}=e,[h,m]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,y]=v.useState(r);Kp(b,r)||y(r);const[x,S]=v.useState(null),[E,T]=v.useState(null),R=v.useCallback(B=>{B!==A.current&&(A.current=B,S(B))},[]),_=v.useCallback(B=>{B!==N.current&&(N.current=B,T(B))},[]),C=a||x,M=l||E,A=v.useRef(null),N=v.useRef(null),P=v.useRef(h),z=d!=null,D=qb(d),H=qb(s),W=qb(f),F=v.useCallback(()=>{if(!A.current||!N.current)return;const B={placement:t,strategy:n,middleware:b};H.current&&(B.platform=H.current),$$(A.current,N.current,B).then(K=>{const O={...K,isPositioned:W.current!==!1};L.current&&!Kp(P.current,O)&&(P.current=O,zi.flushSync(()=>{m(O)}))})},[b,t,n,H,W]);Op(()=>{f===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,m(B=>({...B,isPositioned:!1})))},[f]);const L=v.useRef(!1);Op(()=>(L.current=!0,()=>{L.current=!1}),[]),Op(()=>{if(C&&(A.current=C),M&&(N.current=M),C&&M){if(D.current)return D.current(C,M,F);F()}},[C,M,F,D,z]);const U=v.useMemo(()=>({reference:A,floating:N,setReference:R,setFloating:_}),[R,_]),q=v.useMemo(()=>({reference:C,floating:M}),[C,M]),Z=v.useMemo(()=>{const B={position:n,left:0,top:0};if(!q.floating)return B;const K=xE(q.floating,h.x),O=xE(q.floating,h.y);return c?{...B,transform:"translate("+K+"px, "+O+"px)",...TN(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:O}},[n,c,q.floating,h.x,h.y]);return v.useMemo(()=>({...h,update:F,refs:U,elements:q,floatingStyles:Z}),[h,F,U,q,Z])}const xk=(e,t)=>{const n=M$(e);return{name:n.name,fn:n.fn,options:[e,t]}},Sk=(e,t)=>{const n=D$(e);return{name:n.name,fn:n.fn,options:[e,t]}},U$=(e,t)=>({fn:P$(e).fn,options:[e,t]}),wk=(e,t)=>{const n=z$(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ek=(e,t)=>{const n=j$(e);return{name:n.name,fn:n.fn,options:[e,t]}},q$=(e,t)=>{const n=L$(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Zp(e,t,n,r){return{left:e,top:t,right:n,bottom:r,x:e,y:t,width:n-e,height:r-t}}function H$(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function RN(e){const t=[];let n,r=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY;for(const c of Array.from(e).sort((d,f)=>d.top-f.top)){if(r=Math.min(r,c.left),s=Math.min(s,c.top),a=Math.max(a,c.right),l=Math.max(l,c.bottom),!n||c.top-n.top>n.height/2)t.push(H$(c));else{const d=t[t.length-1];d.left=Math.min(d.left,c.left),d.right=Math.max(d.right,c.right),d.bottom=Math.max(d.bottom,c.bottom),d.width=d.right-d.left,d.height=d.bottom-d.top}n=c}return{lines:t,fallback:Zp(r,s,a,l)}}function CN(e,t,n){return e.findIndex(r=>t>r.left-2&&t<r.right+2&&n>r.top-2&&n<r.bottom+2)}function SE(e){return Zp(e.left,e.top,e.right,e.bottom)}function G$(e,t,n){const{lines:r}=RN(e.getClientRects());if(r.length<2)return;const s=CN(r,t,n);return{x:t,y:n,lineIndex:s===-1?void 0:s,element:e}}function V$(e,t,n){const{lines:r,fallback:s}=RN(e.getClientRects());if(r.length<2)return null;const a=n?.x,l=n?.y,c=t[0];if(n?.lineIndex!=null&&r[n.lineIndex])return SE(r[n.lineIndex]);if(a!=null&&l!=null){const x=CN(r,a,l);if(x!==-1)return SE(r[x])}if(r.length===2&&r[0].left>r[1].right&&a!=null&&l!=null)return s;if(c==="t"||c==="b"){const x=r[0],S=r[r.length-1],E=c==="t"?x:S;return Zp(E.left,x.top,E.right,S.bottom)}const d=c==="l";let f=r[0].left,h=r[0].right,m=d?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY,b=r[0],y=r[0];for(const x of r){f=Math.min(f,x.left),h=Math.max(h,x.right);const S=d?x.left:x.right;d&&S<m||!d&&S>m?(m=S,b=x,y=x):S===m&&(y=x)}return Zp(f,b.top,h,y.bottom)}function W$(e){return"contextElement"in e&&e.contextElement?e.contextElement:ft(e)?e:void 0}function K$(e,t){function n(s){NN(e,s.currentTarget,s.clientX,s.clientY)}function r(s){t||n(s)}return{onFocus(){e.current=void 0},onMouseEnter:r,onMouseMove:r}}function NN(e,t,n,r){const s=G$(t,n,r);return e.current=s,s}function Z$(e){return{name:"inline",async fn(t){const n=t.elements.reference;if(typeof n?.getClientRects!="function")return{};const r=W$(n),s=e.current,a=s?.element===n||s?.element===r?s:void 0,l=V$(n,t.placement,a);if(!l||typeof t.platform.getElementRects!="function")return{};const c=await t.platform.getElementRects({reference:{contextElement:r,getBoundingClientRect(){return l}},floating:t.elements.floating,strategy:t.strategy});return t.rects.reference.x===c.reference.x&&t.rects.reference.y===c.reference.y&&t.rects.reference.width===c.reference.width&&t.rects.reference.height===c.reference.height?{}:{reset:{rects:c}}}}}function AN(e){const t=v.useRef(!0);t.current&&(t.current=!1,e())}const tt=(e,t,n,r,s,a,...l)=>{if(l.length>0)throw new Error(Mn(1));let c;if(e)c=e;else throw new Error("Missing arguments");return c};var Hb={exports:{}},Gb={};var wE;function Y$(){if(wE)return Gb;wE=1;var e=tf();function t(m,b){return m===b&&(m!==0||1/m===1/b)||m!==m&&b!==b}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,s=e.useEffect,a=e.useLayoutEffect,l=e.useDebugValue;function c(m,b){var y=b(),x=r({inst:{value:y,getSnapshot:b}}),S=x[0].inst,E=x[1];return a(function(){S.value=y,S.getSnapshot=b,d(S)&&E({inst:S})},[m,y,b]),s(function(){return d(S)&&E({inst:S}),m(function(){d(S)&&E({inst:S})})},[m]),l(y),y}function d(m){var b=m.getSnapshot;m=m.value;try{var y=b();return!n(m,y)}catch{return!0}}function f(m,b){return b()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return Gb.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,Gb}var EE;function ON(){return EE||(EE=1,Hb.exports=Y$()),Hb.exports}var Tk=ON(),Vb={exports:{}},Wb={};var TE;function X$(){if(TE)return Wb;TE=1;var e=tf(),t=ON();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,d=e.useDebugValue;return Wb.useSyncExternalStoreWithSelector=function(f,h,m,b,y){var x=a(null);if(x.current===null){var S={hasValue:!1,value:null};x.current=S}else S=x.current;x=c(function(){function T(A){if(!R){if(R=!0,_=A,A=b(A),y!==void 0&&S.hasValue){var N=S.value;if(y(N,A))return C=N}return C=A}if(N=C,r(_,A))return N;var P=b(A);return y!==void 0&&y(N,P)?(_=A,N):(_=A,C=P)}var R=!1,_,C,M=m===void 0?null:m;return[function(){return T(h())},M===null?void 0:function(){return T(M())}]},[h,m,b,y]);var E=s(f,x[0],x[1]);return l(function(){S.hasValue=!0,S.value=E},[E]),d(E),E},Wb}var _E;function Q$(){return _E||(_E=1,Vb.exports=X$()),Vb.exports}var J$=Q$();const ov=[];let av;function e3(){return av}function t3(e){ov.push(e)}function _k(e){const t=(n,r)=>{const s=Hr(n3).current;let a;try{av=s;for(const l of ov)l.before(s);a=e(n,r);for(const l of ov)l.after(s);s.didInitialize=!0}finally{av=void 0}return a};return t.displayName=e.displayName||e.name,t}function IN(e){return v.forwardRef(_k(e))}function n3(){return{didInitialize:!1}}const r3=nk(19),i3=r3?o3:a3;function pt(e,t,n,r,s){return i3(e,t,n,r,s)}function s3(e,t,n,r,s){const a=v.useCallback(()=>t(e.getSnapshot(),n,r,s),[e,t,n,r,s]);return Tk.useSyncExternalStore(e.subscribe,a,a)}t3({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);Object.is(r.value,s)||(t=!0,r.value=s)}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()}}),Tk.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function o3(e,t,n,r,s){const a=e3();if(!a)return s3(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.value=t(e.getSnapshot(),n,r,s))):(c={store:e,selector:t,a1:n,a2:r,a3:s,value:t(e.getSnapshot(),n,r,s)},a.syncHooks.push(c)),c.value}function a3(e,t,n,r,s){return J$.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a=>t(a,n,r,s))}class MN{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 pt(this,t,n,r,s)}}class Rk extends MN{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){v.useDebugValue(t);const r=this;He(()=>{r.state[t]!==n&&r.set(t,n)},[r,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){v.useDebugValue(t);const r=this,s=n!==void 0;He(()=>{s&&!Object.is(r.state[t],n)&&r.setState({...r.state,[t]:n})},[r,t,n,s])}select(t,n,r,s){const a=this.selectors[t];return a(this.state,n,r,s)}useState(t,n,r,s){return v.useDebugValue(t),pt(this,this.selectors[t],n,r,s)}useContextCallback(t,n){v.useDebugValue(t);const r=Ke(n??Jn);this.context[t]=r}useStateSetter(t){const n=v.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 l3(){const[,e]=v.useState({});return v.useCallback(()=>{e({})},[])}const u3={open:tt(e=>e.open),transitionStatus:tt(e=>e.transitionStatus),domReferenceElement:tt(e=>e.domReferenceElement),referenceElement:tt(e=>e.positionReference??e.referenceElement),floatingElement:tt(e=>e.floatingElement),floatingId:tt(e=>e.floatingId)};class Uh extends Rk{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:hN(),nested:r,triggerElements:a},u3),this.syncOnly=n}syncOpenEvent=(t,n)=>{(!t||!this.state.open||n!=null&&mP(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 c3(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:s,nested:a,onOpenChange:l}=e,c=t.useState("open"),d=t.useState("activeTriggerElement"),f=t.useState(n?"popupElement":"positionerElement"),h=t.context.triggerElements,m=l,b=v.useRef(null);r===void 0&&b.current===null&&(b.current=new Uh({open:c,transitionStatus:void 0,referenceElement:d,floatingElement:f,triggerElements:h,onOpenChange:m,floatingId:s,syncOnly:!0,nested:a}));const y=r??b.current;return t.useSyncedValue("floatingId",s),He(()=>{const x={open:c,floatingId:s,referenceElement:d,floatingElement:f};ft(d)&&(x.domReferenceElement=d),y.state.positionReference===y.state.referenceElement&&(x.positionReference=d),y.update(x)},[c,s,d,f,y]),y.context.onOpenChange=m,y.context.nested=a,y}function sf(e,t=!1,n=!1){const[r,s]=v.useState(e&&t?"idle":void 0),[a,l]=v.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=$r.request(()=>{s("ending")});return()=>{$r.cancel(c)}}},[e,a,r,n]),He(()=>{if(!e||t)return;const c=$r.request(()=>{s(void 0)});return()=>{$r.cancel(c)}},[t,e]),He(()=>{if(!e||!t)return;e&&a&&r!=="idle"&&s("starting");const c=$r.request(()=>{s("idle")});return()=>{$r.cancel(c)}},[t,e,a,r]),{mounted:a,setMounted:l,transitionStatus:r}}function DN(e,t=!1,n=!0){const r=Dl();return Ke((s,a=null)=>{r.cancel();const l=Es(e);if(l==null)return;const c=l,d=()=>{zi.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||d()}).catch(()=>{if(n){a?.aborted||d();return}const h=c.getAnimations();!a?.aborted&&h.length>0&&h.some(m=>m.pending||m.playState!=="finished")&&f()})}if(t){const h=oa.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 To(e){const{enabled:t=!0,open:n,ref:r,onComplete:s}=e,a=Ke(s),l=DN(r,n,!1);v.useEffect(()=>{if(!t)return;const c=new AbortController;return l(a,c.signal),()=>{c.abort()}},[t,n,a,l])}const Ck={tabIndex:-1,[Jy]:""};function zN(e,t,n=!1){const r=rf(),s=Kl()!=null,a=v.useRef(null);e===void 0&&a.current===null&&(a.current=t(r,s));const l=e??a.current;return c3({popupStore:l,treatPopupAsFloatingElement:n,floatingRootContext:l.state.floatingRootContext,floatingId:r,nested:s,onOpenChange:l.setOpen}),{store:l,internalStore:a.current}}function f3(e,t){const n=v.useRef(null),r=v.useRef(null);return v.useCallback(s=>{if(e===void 0)return;let a=!1;if(n.current!==null){const l=n.current,c=r.current,d=t.context.triggerElements.getById(l);c&&d===c&&(t.context.triggerElements.delete(l),a=!0),n.current=null,r.current=null}if(s!==null&&(n.current=e,r.current=s,t.context.triggerElements.add(e,s),a=!0),a){const l=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==l&&t.set("triggerCount",l)}},[t,e])}function d3(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);const s=n?.id??null;(s||t)&&(e.activeTriggerId=s,e.activeTriggerElement=n??null)}function p3(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function jN(e,t,n,r={}){const s=n.reason,a=s===_r,l=t&&s===Cp,c=!t&&(s===Vl||s===uk),d=p3(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);const f=()=>{const h={...r.extraState,open:t};l?h.instantType="focus":c?h.instantType="dismiss":a&&(h.instantType=void 0),d3(h,t,n.trigger,d()),e.update(h)};a?zi.flushSync(f):f()}function LN(e,t,n,r){AN(()=>{t===void 0&&e.state.open===!1&&n&&(e.state={...e.state,open:!0,activeTriggerId:r,preventUnmountingOnClose:!1})})}function PN(e,t,n,r){const s=n.useState("isMountedByTrigger",e),a=f3(e,n),l=Ke(c=>{if(a(c),!c)return;const d=n.select("open"),f=n.select("activeTriggerId");if(f===e){n.update({activeTriggerElement:c,...d?r:null});return}f==null&&d&&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 $N(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState("open"),s=e.useState("triggerCount");He(()=>{if(!r){e.state.triggerCount!==0&&e.set("triggerCount",0);return}const a=e.context.triggerElements.size,l={};e.state.triggerCount!==a&&(l.triggerCount=a);const c=e.select("activeTriggerId");let d=null;if(c){const f=e.context.triggerElements.getById(c);f?f!==e.state.activeTriggerElement&&(l.activeTriggerElement=f):d=c}if(!d&&!c&&a===1){const f=e.context.triggerElements.entries().next();if(!f.done){const[h,m]=f.value;l.activeTriggerId=h,l.activeTriggerElement=m}}(l.triggerCount!==void 0||l.activeTriggerId!==void 0||l.activeTriggerElement!==void 0)&&e.update(l),d&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===d&&!e.context.triggerElements.getById(d)){const f=Et(Ii);e.setOpen(!1,f),f.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,s,n])}function BN(e,t,n){const{mounted:r,setMounted:s,transitionStatus:a}=sf(e),l=t.useState("preventUnmountingOnClose"),c=e?!1:l;t.useSyncedValues({mounted:r,transitionStatus:a,preventUnmountingOnClose:c});const d=Ke(()=>{s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return To({enabled:r&&!e&&!c,open:e,ref:t.context.popupRef,onComplete(){e||d()}}),{forceUnmount:d,transitionStatus:a}}function FN(e,t){e.useSyncedValues(t),He(()=>()=>{e.update({activeTriggerProps:Un,inactiveTriggerProps:Un,popupProps:Un})},[e])}class qh{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 h3(){return new Uh({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new qh,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function UN(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:h3(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Un,inactiveTriggerProps:Un,popupProps:Un}}function qN(e,t,n=!1){return new Uh({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}const yc=tt(e=>e.triggerIdProp??e.activeTriggerId),Nk=tt(e=>e.openProp??e.open),RE=tt(e=>(e.popupElement?.id??e.floatingId)||void 0);function HN(e,t){return t!==void 0&&Nk(e)&&yc(e)===t}function m3(e,t){return HN(e,t)?!0:t!==void 0&&Nk(e)&&yc(e)==null&&e.triggerCount===1}const GN={open:Nk,mounted:tt(e=>e.mounted),transitionStatus:tt(e=>e.transitionStatus),floatingRootContext:tt(e=>e.floatingRootContext),triggerCount:tt(e=>e.triggerCount),preventUnmountingOnClose:tt(e=>e.preventUnmountingOnClose),payload:tt(e=>e.payload),activeTriggerId:yc,activeTriggerElement:tt(e=>e.mounted?e.activeTriggerElement:null),popupId:RE,isTriggerActive:tt((e,t)=>t!==void 0&&yc(e)===t),isOpenedByTrigger:tt((e,t)=>HN(e,t)),isMountedByTrigger:tt((e,t)=>t!==void 0&&yc(e)===t&&e.mounted),triggerProps:tt((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:tt((e,t)=>m3(e,t)?RE(e):void 0),popupProps:tt(e=>e.popupProps),popupElement:tt(e=>e.popupElement),positionerElement:tt(e=>e.positionerElement)};function VN(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,s=rf(),a=Kl()!=null,l=Hr(()=>new Uh({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new qh,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=ft(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 g3(e={}){const{nodeId:t,externalTree:n}=e,r=VN(e),s=e.rootContext||r,a=s.useState("referenceElement"),l=s.useState("floatingElement"),c=s.useState("domReferenceElement"),d=s.useState("open"),f=s.useState("floatingId"),[h,m]=v.useState(null),[b,y]=v.useState(void 0),[x,S]=v.useState(void 0),E=v.useRef(null),T=ya(n),R=v.useMemo(()=>({reference:a,floating:l,domReference:c}),[a,l,c]),_=_N({...e,elements:{...R,...h&&{reference:h}}}),C=ft(b)?b:null,M=x===void 0?s.state.floatingElement:x;s.useSyncedValue("referenceElement",b??null),s.useSyncedValue("domReferenceElement",b===void 0?c:C),s.useSyncedValue("floatingElement",M);const A=v.useCallback(W=>{const F=ft(W)?{getBoundingClientRect:()=>W.getBoundingClientRect(),getClientRects:()=>W.getClientRects(),contextElement:W}:W;m(F),_.refs.setReference(F)},[_.refs]),N=v.useCallback(W=>{(ft(W)||W===null)&&(E.current=W,y(W)),(ft(_.refs.reference.current)||_.refs.reference.current===null||W!==null&&!ft(W))&&_.refs.setReference(W)},[_.refs,y]),P=v.useCallback(W=>{S(W),_.refs.setFloating(W)},[_.refs]),z=v.useMemo(()=>({..._.refs,setReference:N,setFloating:P,setPositionReference:A,domReference:E}),[_.refs,N,P,A]),D=v.useMemo(()=>({..._.elements,domReference:c}),[_.elements,c]),H=v.useMemo(()=>({..._,dataRef:s.context.dataRef,open:d,onOpenChange:s.setOpen,events:s.context.events,floatingId:f,refs:z,elements:D,nodeId:t,rootStore:s}),[_,z,D,t,s,d,f]);return He(()=>{c&&(E.current=c)},[c]),He(()=>{s.context.dataRef.current.floatingContext=H;const W=T?.nodesRef.current.find(F=>F.id===t);W&&(W.context=H)}),v.useMemo(()=>({..._,context:H,refs:z,elements:D,rootStore:s}),[_,z,D,H,s])}const Kb=GC&&wo;function WN(e,t={}){const{enabled:n=!0,delay:r}=t,s="rootStore"in e?e.rootStore:e,{events:a,dataRef:l}=s.context,c=v.useRef(!1),d=v.useRef(null),f=v.useRef(!0),h=Si();v.useEffect(()=>{const b=s.select("domReferenceElement");if(!n)return;const y=wn(b);function x(){const T=s.select("domReferenceElement");!s.select("open")&&Bt(T)&&T===mr(Kt(T))&&(c.current=!0)}function S(){f.current=!0}function E(){f.current=!1}return Vi(zt(y,"blur",x),Kb&&zt(y,"keydown",S,!0),Kb&&zt(y,"pointerdown",E,!0))},[s,n]),v.useEffect(()=>{if(!n)return;function b(y){if(y.reason===Vl||y.reason===uk){const x=s.select("domReferenceElement");ft(x)&&(d.current=x,c.current=!0)}}return a.on("openchange",b),()=>{a.off("openchange",b)}},[a,n,s]);const m=v.useMemo(()=>{function b(){c.current=!1,d.current=null}return{onMouseLeave(){b()},onFocus(y){const x=y.currentTarget;if(c.current){if(d.current===x)return;b()}const S=yr(y.nativeEvent);if(ft(S)){if(Kb&&!y.relatedTarget){if(!f.current&&!Ph(S))return}else if(!yP(S))return}const E=Fp(y.relatedTarget,s.context.triggerElements),{nativeEvent:T,currentTarget:R}=y,_=typeof r=="function"?r():r;if(s.select("open")&&E||_===0||_===void 0){s.setOpen(!0,Et(Cp,T,R));return}h.start(_,()=>{c.current||s.setOpen(!0,Et(Cp,T,R))})},onBlur(y){b();const x=y.relatedTarget,S=y.nativeEvent,E=ft(x)&&x.hasAttribute(Ic("focus-guard"))&&x.getAttribute("data-type")==="outside";h.start(0,()=>{const T=s.select("domReferenceElement"),R=mr(Kt(T));!x&&R===T||dt(l.current.floatingContext?.refs.floating.current,R)||dt(T,R)||E||Fp(x??R,s.context.triggerElements)||s.setOpen(!1,Et(Cp,S))})}}},[l,r,s,h]);return v.useMemo(()=>n?{reference:m,trigger:m}:{},[n,m])}class Ak{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 Mi,this.restTimeout=new Mi,this.handleCloseOptions=void 0}static create(){return new Ak}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const Yp=new WeakMap;function Xp(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Yp.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Yp.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function KN(e,t){const{scopeElement:n,referenceElement:r,floatingElement:s}=t,a=Yp.get(n);a&&a!==e&&Xp(a),Xp(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=s,Yp.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",s.style.pointerEvents="auto"}function Ok(e){const t=e.context.dataRef.current,n=Hr(()=>t.hoverInteractionState??Ak.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),ck(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function ZN(e,t={}){const{enabled:n=!0,closeDelay:r=0,nodeId:s}=t,a="rootStore"in e?e.rootStore:e,l=a.useState("open"),c=a.useState("floatingElement"),d=a.useState("domReferenceElement"),{dataRef:f}=a.context,h=ya(),m=Kl(),b=Ok(a),y=Si(),x=Ke(()=>ZC(f.current.openEvent?.type,b.interactedInside)),S=Ke(()=>kP(f.current.openEvent?.type)),E=Ke(()=>{Xp(b)});He(()=>{l||(b.pointerType=void 0,b.restTimeoutPending=!1,b.interactedInside=!1,E())},[l,b,E]),v.useEffect(()=>E,[E]),He(()=>{if(n&&l&&b.handleCloseOptions?.blockPointerEvents&&S()&&ft(d)&&c){const T=d,R=c,_=Kt(c),C=h?.nodesRef.current.find(P=>P.id===m)?.context?.elements.floating;C&&(C.style.pointerEvents="");const M=b.pointerEventsScopeElement!==R?b.pointerEventsScopeElement:null,A=C!==R?C:null,N=b.handleCloseOptions?.getScope?.()??M??A??T.closest("[data-rootownerid]")??_.body;return KN(b,{scopeElement:N,referenceElement:T,floatingElement:R}),()=>{E()}}},[n,l,d,c,b,S,h,m,E]),v.useEffect(()=>{if(!n)return;function T(){return!!(h&&m&&ko(h.nodesRef.current,m).length>0)}function R(P){const z=qp(r,"close",b.pointerType),D=()=>{a.setOpen(!1,Et(_r,P)),h?.events.emit("floating.closed",P)};z?b.openChangeTimeout.start(z,D):(b.openChangeTimeout.clear(),D())}function _(P){const z=yr(P);if(!bP(z)){b.interactedInside=!1;return}b.interactedInside=z?.closest("[aria-haspopup]")!=null}function C(){b.openChangeTimeout.clear(),y.clear(),h?.events.off("floating.closed",A),E()}function M(P){if(T()&&h){h.events.on("floating.closed",A);return}if(Fp(P.relatedTarget,a.context.triggerElements))return;const z=f.current.floatingContext?.nodeId??s,D=P.relatedTarget;if(!(h&&z&&ft(D)&&ko(h.nodesRef.current,z,!1).some(W=>dt(W.context?.elements.floating,D)))){if(b.handler){b.handler(P);return}E(),S()&&!x()&&R(P)}}function A(P){!h||!m||T()||y.start(0,()=>{h.events.off("floating.closed",A),a.setOpen(!1,Et(_r,P)),h.events.emit("floating.closed",P)})}const N=c;return Vi(N&&zt(N,"mouseenter",C),N&&zt(N,"mouseleave",M),N&&zt(N,"pointerdown",_,!0),()=>{h?.events.off("floating.closed",A)})},[n,c,a,f,r,s,S,x,E,b,h,m,y])}const b3={current:null};function YN(e,t={}){const{enabled:n=!0,delay:r=0,handleClose:s=null,mouseOnly:a=!1,restMs:l=0,move:c=!0,triggerElementRef:d=b3,externalTree:f,isActiveTrigger:h=!0,getHandleCloseContext:m,isClosing:b,shouldOpen:y}=t,x="rootStore"in e?e.rootStore:e,{dataRef:S,events:E}=x.context,T=ya(f),R=Ok(x),_=v.useRef(!1),C=In(s),M=In(r),A=In(l),N=In(n),P=In(y),z=In(b),D=Ke(()=>ZC(S.current.openEvent?.type,R.interactedInside)),H=Ke(()=>P.current?.()!==!1),W=Ke((U,q,Z)=>{const B=x.context.triggerElements;if(B.hasElement(q))return!U||!dt(U,q);if(!ft(Z))return!1;const K=Z;return B.hasMatchingElement(O=>dt(O,K))&&(!U||!dt(U,K))}),F=Ke(()=>{if(!R.handler)return;Kt(x.select("domReferenceElement")).removeEventListener("mousemove",R.handler),R.handler=void 0}),L=Ke(()=>{Xp(R)});return h&&(R.handleCloseOptions=C.current?.__options),v.useEffect(()=>F,[F]),v.useEffect(()=>{if(!n)return;function U(q){q.open?_.current=!1:(_.current=q.reason===_r,F(),R.openChangeTimeout.clear(),R.restTimeout.clear(),R.blockMouseMove=!0,R.restTimeoutPending=!1)}return E.on("openchange",U),()=>{E.off("openchange",U)}},[n,E,R,F]),v.useEffect(()=>{if(!n)return;function U(K,O=!0){const $=qp(M.current,"close",R.pointerType);$?R.openChangeTimeout.start($,()=>{x.setOpen(!1,Et(_r,K)),T?.events.emit("floating.closed",K)}):O&&(R.openChangeTimeout.clear(),x.setOpen(!1,Et(_r,K)),T?.events.emit("floating.closed",K))}const q=d.current??(h?x.select("domReferenceElement"):null);if(!ft(q))return;function Z(K){if(R.openChangeTimeout.clear(),R.blockMouseMove=!1,a&&!aa(R.pointerType))return;const O=eE(A.current),$=qp(M.current,"open",R.pointerType),V=yr(K),j=K.currentTarget??null,X=x.select("domReferenceElement");let se=j;if(ft(V)&&!x.context.triggerElements.hasElement(V)){for(const we of x.context.triggerElements.elements())if(dt(we,V)){se=we;break}}ft(j)&&ft(X)&&!x.context.triggerElements.hasElement(j)&&dt(j,X)&&(se=X);const re=se==null?!1:W(X,se,V),oe=x.select("open"),ue=z.current?.()??x.select("transitionStatus")==="ending",ce=!oe&&ue&&_.current,ge=!re&&ft(se)&&ft(X)&&dt(X,se)&&ce,Ce=O>0&&!$,ae=re&&(oe||ce)||ge,ye=!oe||re;if(ae){H()&&x.setOpen(!0,Et(_r,K,se));return}Ce||($?R.openChangeTimeout.start($,()=>{ye&&H()&&x.setOpen(!0,Et(_r,K,se))}):ye&&H()&&x.setOpen(!0,Et(_r,K,se)))}function B(K){if(D()){L();return}F();const O=x.select("domReferenceElement"),$=Kt(O);R.restTimeout.clear(),R.restTimeoutPending=!1;const V=S.current.floatingContext??m?.();if(Fp(K.relatedTarget,x.context.triggerElements))return;if(C.current&&V){x.select("open")||R.openChangeTimeout.clear();const X=d.current;R.handler=C.current({...V,tree:T,x:K.clientX,y:K.clientY,onClose(){L(),F(),N.current&&!D()&&X===x.select("domReferenceElement")&&U(K,!0)}}),$.addEventListener("mousemove",R.handler),R.handler(K);return}(R.pointerType!=="touch"||!dt(x.select("floatingElement"),K.relatedTarget))&&U(K)}return c?Vi(zt(q,"mousemove",Z,{once:!0}),zt(q,"mouseenter",Z),zt(q,"mouseleave",B)):Vi(zt(q,"mouseenter",Z),zt(q,"mouseleave",B))},[F,L,S,M,x,n,C,R,h,W,D,a,c,A,d,T,N,m,z,H]),v.useMemo(()=>{if(!n)return;function U(q){R.pointerType=q.pointerType}return{onPointerDown:U,onPointerEnter:U,onMouseMove(q){const{nativeEvent:Z}=q,B=q.currentTarget,K=x.select("domReferenceElement"),O=x.select("open"),$=W(K,B,q.target);if(a&&!aa(R.pointerType))return;if(O&&$&&R.handleCloseOptions?.blockPointerEvents){const X=x.select("floatingElement");if(X){const se=R.handleCloseOptions?.getScope?.()??B.ownerDocument.body;KN(R,{scopeElement:se,referenceElement:B,floatingElement:X})}}const V=eE(A.current);if(O&&!$||V===0||!$&&R.restTimeoutPending&&q.movementX**2+q.movementY**2<2)return;R.restTimeout.clear();function j(){if(R.restTimeoutPending=!1,D())return;const X=x.select("open");!R.blockMouseMove&&(!X||$)&&H()&&x.setOpen(!0,Et(_r,Z,B))}R.pointerType==="touch"?zi.flushSync(()=>{j()}):$&&O?j():(R.restTimeoutPending=!0,R.restTimeout.start(V,j))}}},[n,R,D,W,a,x,A,H])}const y3="Escape";function Hh(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Ud(e,t){return Hh(t,e===KC||e===pk,e===jh||e===Lh)}function Zb(e,t,n){return Hh(t,e===pk,n?e===jh:e===Lh)||e==="Enter"||e===" "||e===""}function v3(e,t,n){return Hh(t,n?e===jh:e===Lh,e===pk)}function k3(e,t,n,r){const s=n?e===Lh:e===jh,a=e===KC;return t==="both"||t==="horizontal"&&r?e===y3:Hh(t,s,a)}function x3(e,t){const{listRef:n,activeIndex:r,onNavigate:s=()=>{},enabled:a=!0,selectedIndex:l=null,allowEscape:c=!1,loopFocus:d=!1,nested:f=!1,rtl:h=!1,virtual:m=!1,focusItemOnOpen:b="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:x=!0,disabledIndices:S=void 0,orientation:E="vertical",parentOrientation:T,id:R,resetOnPointerLeave:_=!0,externalTree:C,grid:M}=t,A=M!=null,N="rootStore"in e?e.rootStore:e,P=N.useState("open"),z=N.useState("floatingElement"),D=N.useState("domReferenceElement"),H=N.context.dataRef,W=Up(z),F=ev(D),L=In(W),U=Kl(),q=ya(C),Z=v.useRef(b),B=v.useRef(l??-1),K=v.useRef(null),O=v.useRef(!0),$=Ke(te=>{s(B.current===-1?null:B.current,te)}),V=v.useRef(!!z),j=v.useRef(P),X=v.useRef(!1),se=v.useRef(!1),re=v.useRef(null),oe=In(S),ue=In(P),ce=In(l),ge=In(_),Ce=Dl(),ae=Dl(),ye=Ke(()=>{function te(be){m?q?.events.emit("virtualfocus",be):re.current=Ap(be,{sync:X.current,preventScroll:!0})}const fe=n.current[B.current],J=se.current;fe&&te(fe),(X.current?be=>be():be=>Ce.request(be))(()=>{const be=n.current[B.current]||fe;if(!be)return;fe||te(be),Ie&&(J||!O.current)&&be.scrollIntoView?.({block:"nearest",inline:"nearest"})})});He(()=>{H.current.orientation=E},[H,E]),He(()=>{a&&(P&&z?(B.current=l??-1,Z.current&&l!=null&&(se.current=!0,$())):V.current&&(B.current=-1,$()))},[a,P,z,l,$]),He(()=>{if(a){if(!P){X.current=!1;return}if(z)if(r==null){if(X.current=!1,ce.current!=null)return;if(V.current&&(B.current=-1,ye()),(!j.current||!V.current)&&Z.current&&(K.current!=null||Z.current===!0&&K.current==null)){let te=0;const fe=()=>{n.current[0]==null?(te<2&&(te?ne=>ae.request(ne):queueMicrotask)(fe),te+=1):(B.current=K.current==null||Zb(K.current,E,h)||f?Np(n):rv(n),K.current=null,$())};fe()}}else gc(n.current,r)||(B.current=r,ye(),se.current=!1)}},[a,P,z,r,ce,f,n,E,h,$,ye,ae]),He(()=>{if(!a||z||!q||m||!V.current)return;const te=q.nodesRef.current,fe=te.find(be=>be.id===U)?.context?.elements.floating,J=mr(Kt(D??fe??null)),ne=te.some(be=>be.context&&dt(be.context.elements.floating,J));fe&&!ne&&O.current&&fe.focus({preventScroll:!0})},[a,z,D,q,U,m]),He(()=>{j.current=P,V.current=!!z}),He(()=>{P||(K.current=null,Z.current=b)},[P,b]);const we=r!=null,Ae=Ke(te=>{if(!ue.current)return;const fe=n.current.indexOf(te.currentTarget);fe!==-1&&(B.current!==fe||r!==fe)&&(B.current=fe,$(te))}),Ee=Ke(()=>T??q?.nodesRef.current.find(te=>te.id===U)?.context?.dataRef?.current.orientation),xe=Ke(()=>Np(n,oe.current)),De=Ke(te=>{if(O.current=!1,X.current=!0,te.which===229||!ue.current&&te.currentTarget===L.current)return;if(f&&k3(te.key,E,h,A)){Ud(te.key,Ee())||Ui(te),N.setOpen(!1,Et(K1,te.nativeEvent)),Bt(D)&&(m?q?.events.emit("virtualfocus",D):D.focus());return}const fe=B.current,J=Np(n,S),ne=rv(n,S);if(F||(te.key==="Home"&&(Ui(te),B.current=J,$(te)),te.key==="End"&&(Ui(te),B.current=ne,$(te))),M!=null){const be=M(te,B.current,n,E,d,h,S,J,ne);if(be!=null&&(B.current=be,$(te)),E==="both")return}if(Ud(te.key,E)){if(Ui(te),P&&!m&&mr(te.currentTarget.ownerDocument)===te.currentTarget){B.current=Zb(te.key,E,h)?J:ne,$(te);return}Zb(te.key,E,h)?d?fe>=ne?c&&fe!==n.current.length?B.current=-1:(X.current=!1,B.current=J):B.current=Ns(n.current,{startingIndex:fe,disabledIndices:S}):B.current=Math.min(ne,Ns(n.current,{startingIndex:fe,disabledIndices:S})):d?fe<=J?c&&fe!==-1?B.current=n.current.length:(X.current=!1,B.current=ne):B.current=Ns(n.current,{startingIndex:fe,decrement:!0,disabledIndices:S}):B.current=Math.max(J,Ns(n.current,{startingIndex:fe,decrement:!0,disabledIndices:S})),gc(n.current,B.current)&&(B.current=-1),$(te)}}),Ie=v.useMemo(()=>({onFocus(fe){X.current=!0,Ae(fe)},onClick:({currentTarget:fe})=>fe.focus({preventScroll:!0}),onMouseMove(fe){X.current=!0,se.current=!1,y&&Ae(fe)},onPointerLeave(fe){if(!ue.current||!O.current||fe.pointerType==="touch")return;X.current=!0;const J=fe.relatedTarget;if(!(!y||n.current.includes(J))&&ge.current&&(re.current?.(),re.current=null,B.current=-1,$(fe),!m)){const ne=L.current,be=mr(Kt(ne));ne&&dt(ne,be)&&ne.focus({preventScroll:!0})}}}),[Ae,ue,L,y,n,$,ge,m]),je=v.useMemo(()=>m&&P&&we&&{"aria-activedescendant":`${R}-${r}`},[m,P,we,R,r]),Ue=v.useMemo(()=>({"aria-orientation":E==="both"?void 0:E,...F?{}:je,onKeyDown(te){if(te.key==="Tab"&&te.shiftKey&&P&&!m){const fe=yr(te.nativeEvent);if(fe&&!dt(L.current,fe))return;Ui(te),N.setOpen(!1,Et(Mh,te.nativeEvent)),Bt(D)&&D.focus();return}De(te)},onPointerMove(){O.current=!0}}),[je,De,L,E,F,N,P,m,D]),ke=v.useMemo(()=>{function te(ne){N.setOpen(!0,Et(K1,ne.nativeEvent,ne.currentTarget))}function fe(ne){b==="auto"&&dk(ne.nativeEvent)&&(Z.current=!m)}function J(ne){Z.current=b,b==="auto"&&VC(ne.nativeEvent)&&(Z.current=!0)}return{onKeyDown(ne){const be=N.select("open");O.current=!1;const Ge=ne.key.startsWith("Arrow"),Ze=v3(ne.key,Ee(),h),Xe=Ud(ne.key,E),vt=(f?Ze:Xe)||ne.key==="Enter"||ne.key.trim()==="";if(m&&be)return De(ne);if(!(!be&&!x&&Ge)){if(vt){const Je=Ud(ne.key,Ee());K.current=f&&Je?null:ne.key}if(f){Ze&&(Ui(ne),be?(B.current=xe(),$(ne)):te(ne));return}Xe&&(ce.current!=null&&(B.current=ce.current),Ui(ne),!be&&x?te(ne):De(ne),be&&$(ne))}},onFocus(ne){N.select("open")&&!m&&(B.current=-1,$(ne))},onPointerDown:J,onPointerEnter:J,onMouseDown:fe,onClick:fe}},[De,b,xe,f,$,N,x,E,Ee,h,ce,m]),Te=v.useMemo(()=>({...je,...ke}),[je,ke]);return v.useMemo(()=>a?{reference:Te,floating:Ue,item:Ie,trigger:ke}:{},[a,Te,Ue,ke,Ie])}function S3(e,t){const{listRef:n,elementsRef:r,activeIndex:s,onMatch:a,disabledIndices:l,onTyping:c,enabled:d=!0,resetMs:f=750,selectedIndex:h=null}=t,m="rootStore"in e?e.rootStore:e,b=m.useState("open"),y=Si(),x=v.useRef(""),S=v.useRef(h??s??-1),E=v.useRef(null),T=Ke(C=>{function M(L){const U=r?.current[L];return!U||$h(U)}function A(L){return M(L)?l==null||!Vp(yo,L,l):!1}function N(L,U,q=0){if(L.length===0)return-1;const Z=(q%L.length+L.length)%L.length,B=U.toLowerCase();for(let K=0;K<L.length;K+=1){const O=(Z+K)%L.length;if(!(!L[O]?.toLowerCase().startsWith(B)||!A(O)))return O}return-1}const P=n.current;if(x.current.length>0&&C.key===" "&&(Ui(C),c?.(!0)),x.current.length>0&&x.current[0]!==" "&&N(P,x.current)===-1&&C.key!==" "&&c?.(!1),P==null||C.key.length!==1||C.ctrlKey||C.metaKey||C.altKey)return;b&&C.key!==" "&&(Ui(C),c?.(!0));const z=x.current==="";z&&(S.current=h??s??-1),P.every((L,U)=>L&&A(U)?L[0]?.toLowerCase()!==L[1]?.toLowerCase():!0)&&x.current===C.key&&(x.current="",S.current=E.current),x.current+=C.key,y.start(f,()=>{x.current="",S.current=E.current,c?.(!1)});const W=((z?h??s??-1:S.current)??0)+1,F=N(P,x.current,W);F!==-1?(a?.(F),E.current=F):C.key!==" "&&(x.current="",c?.(!1))}),R=Ke(C=>{const M=C.relatedTarget,A=m.select("domReferenceElement"),N=m.select("floatingElement");dt(A,M)||dt(N,M)||(y.clear(),x.current="",S.current=E.current,c?.(!1))});He(()=>{!b&&h!==null||(y.clear(),E.current=null,x.current!==""&&(x.current=""))},[b,h,y]),He(()=>{b&&x.current===""&&(S.current=h??s??-1)},[b,h,s]);const _=v.useMemo(()=>({onKeyDown:T,onBlur:R}),[T,R]);return v.useMemo(()=>d?{reference:_,floating:_}:{},[d,_])}const CE=.1,w3=CE*CE,dn=.5;function qd(e,t,n,r,s,a){return r>=t!=a>=t&&e<=(s-n)*(t-r)/(a-r)+n}function Hd(e,t,n,r,s,a,l,c,d,f){let h=!1;return qd(e,t,n,r,s,a)&&(h=!h),qd(e,t,s,a,l,c)&&(h=!h),qd(e,t,l,c,d,f)&&(h=!h),qd(e,t,d,f,n,r)&&(h=!h),h}function E3(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Gd(e,t,n,r,s,a){const l=Math.min(n,s),c=Math.max(n,s),d=Math.min(r,a),f=Math.max(r,a);return e>=l&&e<=c&&t>=d&&t<=f}function XN(e={}){const{blockPointerEvents:t=!1}=e,n=new Mi,r=({x:s,y:a,placement:l,elements:c,onClose:d,nodeId:f,tree:h})=>{const m=l?.split("-")[0];let b=!1,y=null,x=null,S=typeof performance<"u"?performance.now():0;function E(R,_){const C=performance.now(),M=C-S;if(y===null||x===null||M===0)return y=R,x=_,S=C,!1;const A=R-y,N=_-x,P=A*A+N*N,z=M*M*w3;return y=R,x=_,S=C,P<z}function T(){n.clear(),d()}return function(_){n.clear();const C=c.domReference,M=c.floating;if(!C||!M||m==null||s==null||a==null)return;const{clientX:A,clientY:N}=_,P=yr(_),z=_.type==="mouseleave",D=dt(M,P),H=dt(C,P);if(D&&(b=!0,!z))return;if(H&&(b=!1,!z)){b=!0;return}if(z&&ft(_.relatedTarget)&&dt(M,_.relatedTarget))return;function W(){return!!(h&&ko(h.nodesRef.current,f).length>0)}function F(){W()||T()}if(W())return;const L=C.getBoundingClientRect(),U=M.getBoundingClientRect(),q=s>U.right-U.width/2,Z=a>U.bottom-U.height/2,B=U.width>L.width,K=U.height>L.height,O=(B?L:U).left,$=(B?L:U).right,V=(K?L:U).top,j=(K?L:U).bottom;if(m==="top"&&a>=L.bottom-1||m==="bottom"&&a<=L.top+1||m==="left"&&s>=L.right-1||m==="right"&&s<=L.left+1){F();return}let X=!1;switch(m){case"top":X=Gd(A,N,O,L.top+1,$,U.bottom-1);break;case"bottom":X=Gd(A,N,O,U.top+1,$,L.bottom-1);break;case"left":X=Gd(A,N,U.right-1,j,L.left+1,V);break;case"right":X=Gd(A,N,L.right-1,j,U.left+1,V);break}if(X)return;if(b&&!E3(A,N,L)){F();return}if(!z&&E(A,N)){F();return}let se=!1;switch(m){case"top":{const re=B?dn/2:dn*4,oe=B||q?s+re:s-re,ue=B?s-re:q?s+re:s-re,ce=a+dn+1,ge=q||B?U.bottom-dn:U.top,Ce=q?B?U.bottom-dn:U.top:U.bottom-dn;se=Hd(A,N,oe,ce,ue,ce,U.left,ge,U.right,Ce);break}case"bottom":{const re=B?dn/2:dn*4,oe=B||q?s+re:s-re,ue=B?s-re:q?s+re:s-re,ce=a-dn,ge=q||B?U.top+dn:U.bottom,Ce=q?B?U.top+dn:U.bottom:U.top+dn;se=Hd(A,N,oe,ce,ue,ce,U.left,ge,U.right,Ce);break}case"left":{const re=K?dn/2:dn*4,oe=K||Z?a+re:a-re,ue=K?a-re:Z?a+re:a-re,ce=s+dn+1,ge=Z||K?U.right-dn:U.left,Ce=Z?K?U.right-dn:U.left:U.right-dn;se=Hd(A,N,ge,U.top,Ce,U.bottom,ce,oe,ce,ue);break}case"right":{const re=K?dn/2:dn*4,oe=K||Z?a+re:a-re,ue=K?a-re:Z?a+re:a-re,ce=s-dn,ge=Z||K?U.left+dn:U.right,Ce=Z?K?U.left+dn:U.right:U.left+dn;se=Hd(A,N,ce,oe,ce,ue,ge,U.top,Ce,U.bottom);break}}se?b||n.start(40,F):F()}};return r.__options={...e,blockPointerEvents:t},r}const vc="ArrowUp",kc="ArrowDown",Qp="ArrowLeft",Jp="ArrowRight",Gh="Home",Vh="End",QN=new Set([Qp,Jp]),T3=new Set([Qp,Jp,Gh,Vh]),JN=new Set([vc,kc]),_3=new Set([vc,kc,Gh,Vh]),eA=new Set([...QN,...JN]),tA=new Set([...eA,Gh,Vh]),R3="Shift",C3="Control",N3="Alt",A3="Meta",O3=new Set([R3,C3,N3,A3]);function I3(e){return Bt(e)&&e.tagName==="INPUT"}function NE(e){return!!(I3(e)&&e.selectionStart!=null||Bt(e)&&e.tagName==="TEXTAREA")}function AE(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 d=OE(e,t,"left"),f=Vd(e),h=Vd(t);n==="ltr"&&(d+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-f.scrollPaddingRight?s=d+t.offsetWidth+h.scrollMarginRight-e.clientWidth+f.scrollPaddingRight:d-h.scrollMarginLeft<e.scrollLeft+f.scrollPaddingLeft&&(s=d-h.scrollMarginLeft-f.scrollPaddingLeft)),n==="rtl"&&(d-h.scrollMarginRight<e.scrollLeft+f.scrollPaddingLeft?s=d-h.scrollMarginLeft-f.scrollPaddingLeft:d+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-f.scrollPaddingRight&&(s=d+t.offsetWidth+h.scrollMarginRight-e.clientWidth+f.scrollPaddingRight))}if(c&&r!=="horizontal"){const d=OE(e,t,"top"),f=Vd(e),h=Vd(t);d-h.scrollMarginTop<e.scrollTop+f.scrollPaddingTop?a=d-h.scrollMarginTop-f.scrollPaddingTop:d+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-f.scrollPaddingBottom&&(a=d+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+f.scrollPaddingBottom)}e.scrollTo({left:s,top:a,behavior:"auto"})}function OE(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 Vd(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 M3(e){return nk(19)?e:e?"true":void 0}const D3=v.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 g.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:a}})});let IE={},ME={},DE="";function z3(e){if(typeof document>"u")return!1;const t=Kt(e);return wn(t).innerWidth-t.documentElement.clientWidth>0}function j3(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Kt(e),r=n.documentElement,s=n.body,a=So(r)?r:s,l=a.style.overflowY,c=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",a.style.overflowY="scroll";const d=a.offsetWidth;a.style.overflowY="hidden";const f=a.offsetWidth;return a.style.overflowY=l,r.style.scrollbarGutter=c,d===f}function L3(e){const t=Kt(e),n=t.documentElement,r=t.body,s=So(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 P3(e){const t=Kt(e),n=t.documentElement,r=t.body,s=wn(n);let a=0,l=0,c=!1;const d=$r.create();if(wo&&(s.visualViewport?.scale??1)!==1)return()=>{};function f(){const y=s.getComputedStyle(n),x=s.getComputedStyle(r),T=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";a=n.scrollTop,l=n.scrollLeft,IE={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},DE=n.style.scrollBehavior,ME={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,_=n.scrollWidth>n.clientWidth,C=y.overflowY==="scroll"||x.overflowY==="scroll",M=y.overflowX==="scroll"||x.overflowX==="scroll",A=Math.max(0,s.innerWidth-r.clientWidth),N=Math.max(0,s.innerHeight-r.clientHeight),P=parseFloat(x.marginTop)+parseFloat(x.marginBottom),z=parseFloat(x.marginLeft)+parseFloat(x.marginRight),D=So(n)?n:r;if(c=j3(e),c){n.style.scrollbarGutter=T,D.style.overflowY="hidden",D.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:T,overflowY:"hidden",overflowX:"hidden"}),(R||C)&&(n.style.overflowY="scroll"),(_||M)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:P||N?`calc(100dvh - ${P+N}px)`:"100dvh",width:z||A?`calc(100vw - ${z+A}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,IE),Object.assign(r.style,ME),c||(n.scrollTop=a,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=DE)}function m(){h(),d.request(f)}f();const b=zt(s,"resize",m);return()=>{d.cancel(),h(),typeof s.removeEventListener=="function"&&b()}}class $3{lockCount=0;restore=null;timeoutLock=Mi.create();timeoutUnlock=Mi.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=Kt(t).documentElement,s=wn(r).getComputedStyle(r).overflowY;if(s==="hidden"||s==="clip"){this.restore=Jn;return}const a=zh||!z3(t);this.restore=a?L3(t):P3(t)}}const B3=new $3;function F3(e=!0,t=null){He(()=>{if(e)return B3.acquire(t)},[e,t])}function U3(e){const t=v.useRef(""),n=v.useCallback(s=>{s.defaultPrevented||(t.current=s.pointerType,e(s,s.pointerType))},[e]);return{onClick:v.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 nA(e,t){const n=v.useRef(e),r=Ke(t);He(()=>{n.current!==e&&r(n.current)},[e,r]),He(()=>{n.current=e},[e])}function q3(e,t){const n=Ke((a,l)=>{(typeof e=="function"?e():e)||t(l||(zh?"touch":""))}),{onClick:r,onPointerDown:s}=U3(n);return v.useMemo(()=>({onClick:r,onPointerDown:s}),[r,s])}function H3(e){const[t,n]=v.useState(null),r=q3(e,n);return nA(e,s=>{s&&!e&&n(null)}),v.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}const G3={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:""},V3={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 W3(e,t="outline"){return t==="filled"?V3[e]:G3[e]}const K3=new Set(["ui-progress-spin","cursor-icon-spin"]);function Z3(e){if(!(!e||typeof CSSAnimation>"u"))for(const t of e.getAnimations({subtree:!0}))t instanceof CSSAnimation&&K3.has(t.animationName)&&(t.startTime=0)}const lv=v.createContext(void 0);function Ms({iconSize:e,iconButtonSize:t,iconButtonVariant:n,iconButtonTone:r,iconButtonRootStyle:s,iconButtonIconStyle:a,iconButtonIconSize:l,buttonSize:c,buttonRootStyle:d,buttonVariant:f,buttonTone:h,buttonIconSize:m,buttonRounded:b,buttonFullWidth:y,menuSize:x,disabled:S,children:E}){const T=v.useContext(lv),R=v.useMemo(()=>({iconSize:e??T?.iconSize,iconButtonSize:t??T?.iconButtonSize,iconButtonVariant:n??T?.iconButtonVariant,iconButtonTone:r??T?.iconButtonTone,iconButtonRootStyle:s??T?.iconButtonRootStyle,iconButtonIconStyle:a??T?.iconButtonIconStyle,iconButtonIconSize:l??T?.iconButtonIconSize,buttonSize:c??T?.buttonSize,buttonRootStyle:d??T?.buttonRootStyle,buttonVariant:f??T?.buttonVariant,buttonTone:h??T?.buttonTone,buttonIconSize:m??T?.buttonIconSize,buttonRounded:b??T?.buttonRounded,buttonFullWidth:y??T?.buttonFullWidth,menuSize:x??T?.menuSize,disabled:S??T?.disabled}),[y,h,m,d,b,c,f,S,l,a,r,s,t,n,e,x,T]);return g.jsx(lv.Provider,{value:R,children:E})}function va(){return v.useContext(lv)}const Y3="sm",Xt={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",kQmYQc:"ui-1ehclkv",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},colorSuccess:{kMwMTN:"ui-1qphcl",$$css:!0},colorDanger:{kMwMTN:"ui-yz91fk",$$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 X3(e,t,n){return[Xt.base,rA(e),Q3(t),J3(n)]}function Ik(e){return typeof e=="string"&&!e.startsWith("var(")}function rA(e){if(!Ik(e))return Xt.noPresetSize;switch(e){case"xs":return Xt.sizeXs;case"sm":return Xt.sizeSm;case"base":return Xt.sizeBase;case"lg":return Xt.sizeLg;case"xl":return Xt.sizeXl;case"2xl":return Xt.size2xl}}function Q3(e){switch(e){case"primary":return Xt.colorPrimary;case"secondary":return Xt.colorSecondary;case"tertiary":return Xt.colorTertiary;case"quaternary":return Xt.colorQuaternary;case"git-added":return Xt.colorGitAdded;case"git-modified":return Xt.colorGitModified;case"git-removed":return Xt.colorGitRemoved;case"git-untracked":return Xt.colorGitUntracked;case"cyan":return Xt.colorCyan;case"blue":return Xt.colorBlue;case"red":return Xt.colorRed;case"green":return Xt.colorGreen;case"success":return Xt.colorSuccess;case"danger":return Xt.colorDanger;case"yellow":return Xt.colorYellow;case"magenta":return Xt.colorMagenta;case"orange":return Xt.colorOrange;case"purple":return Xt.colorPurple;case"accent":return Xt.colorAccent;case"brand":return Xt.colorBrand;case void 0:return Xt.noColor}}function J3(e){switch(e){case"spin":return Xt.modifierSpin;case"disabled":return Xt.modifierDisabled;case"hidden":return Xt.modifierHidden;case void 0:return Xt.noModifier}}function tn({name:e,modifier:t,syncSpin:n=!0,variant:r="outline",size:s,color:a,capTrim:l=!1,className:c,rootStyle:d,style:f,title:h,"aria-label":m,"aria-hidden":b,ref:y}){const x=va(),S=v.useCallback(M=>{typeof y=="function"?y(M):y&&(y.current=M),M&&t==="spin"&&n&&Z3(M)},[y,t,n]),E=s??x?.iconSize??Y3,T=Ik(E),R=W3(e,r),_={...R?{"--cursor-icon-content":`"${R}"`}:{},...T?{}:{"--icon-size":typeof E=="number"?`${E}px`:E},...f},C=Lt({rootClass:"ui-icon",stylexStyles:[X3(E,a,t),l&&Xt.capTrim,d],className:bn("cursor-icon",c),style:_});return g.jsx("i",{ref:S,className:C.className,"data-icon-name":e,"data-size":T?E:void 0,"data-color":a,style:C.style,title:h??m,"aria-hidden":b??(m?void 0:!0)})}const e6=v.createContext({root:null});function ka(){return v.useContext(e6).root}const t6={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"},n6={},r6=3e3,i6=10;let zE=r6;function s6(){const e=zE;return zE+=i6,{zIndex:e,release:()=>{}}}const o6=v.createContext(null);function a6(){return v.useContext(o6)}function Zl(e,t){const n=a6(),[r,s]=v.useState(null);v.useLayoutEffect(()=>{if(!t){s(null);return}const l=n?.claimZIndex()??s6();return s(l.zIndex),()=>{l.release()}},[t,n]);const a=v.useMemo(()=>r===null?n6:{[t6[e]]:String(r)},[r,e]);return v.useMemo(()=>({zIndex:r,portalLayerStyles:a}),[r,a])}const iA=v.forwardRef(function(t,n){const{render:r,className:s,disabled:a=!1,focusableWhenDisabled:l=!1,nativeButton:c=!0,style:d,...f}=t,{getButtonProps:h,buttonRef:m}=Gl({disabled:a,focusableWhenDisabled:l,native:c});return mn("button",t,{state:{disabled:a},ref:[n,m],props:[f,h]})}),sA={none:{kMzoRj:"ui-c342km",ksu8eU:"ui-ng3xce",kVAM5u:"ui-9r1u3d",$$css:!0},subtle:{kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kVAM5u:"ui-qz0629 ui-1njd9qq ui-8df9bq ui-1tkfsc1 ui-uv06hm",$$css:!0}},l6=["primary","secondary","tertiary","quaternary","accent","monochrome","neutral","info","success","warning","danger","git-added","git-modified","git-removed","git-untracked","plan"],u6=["primary","monochrome","neutral","success","danger","warning","plan","info","git-added"],c6=new Set(l6);new Set(u6);function f6(e){return e!==void 0&&c6.has(e)}const d6="primary",p6=["primary","secondary","media"],h6=["outline","ghost","text"],m6=new Set(p6),g6=new Set(h6);function b6(e){return m6.has(e)}function y6(e){return g6.has(e)}const v6=new Set(["primary","info"]);function oA(e,t){const n=e==="secondary"&&f6(t)&&!v6.has(t);return{applyControlTone:e!=="secondary"||n,applyFilledColors:b6(e)&&!n,applyNonFilledBackground:y6(e)||n}}const aA={foreground:{"--ui-button-fg":"ui-1h31wig ui-qalphj ui-alrmhx ui-q3k0am ui-1e1xjh9 ui-1eont2s ui-pgixgy ui-wk8qma ui-xziiuo ui-1ucl2ju ui-j3niug ui-7er5i6 ui-1cp1eyh ui-14es9l6 ui-1eiai0w ui-1kxdlmk ui-17h4ijr ui-1j296z ui-17et190 ui-v6bjuk ui-17og37h ui-1918n0c ui-rk6uvo ui-1mruliz ui-ezkm8d ui-10ch5e ui-1vi0emy ui-bcxwum ui-fu0rpv","--ui-button-fg-hover":"ui-ve8a38 ui-572mpw ui-vp5bk3 ui-16shgaf ui-mjj3su ui-1v3oqsu ui-1su77as ui-1ka6fbt ui-uutab7 ui-3g0s99 ui-d0yqgr",$$css:!0}},ea={appearance:{kWkggS:"ui-elcf9h ui-g74ub2 ui-86fbs8",kMwMTN:"ui-gl2jp8 ui-qfdz8i",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},media:{k6WDB:"ui-1hvsj6t",kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kVAM5u:"ui-1aml6k",$$css:!0},colors:{"--ui-button-bg":"ui-111vzy2 ui-125v35v ui-lxixrl ui-4462wj ui-ln9km0 ui-htinfv ui-1tjgpey ui-xytp3r ui-1le2bn6 ui-302ab4 ui-192h18d ui-1y7yjvm ui-18ab9qp","--ui-button-bg-hover":"ui-10ckxxq ui-10aqgsk ui-1m1z6q9 ui-nikh4q ui-v0nv0s ui-m9yhoz ui-1hx6fzk ui-3zafy5 ui-10w9v6x ui-1kvkcw9 ui-3liebu ui-o6xlxd ui-uontnf","--ui-button-fg":"ui-18rr0f6 ui-seil5j ui-1oum4wa ui-cq0tmb ui-rwu1v7 ui-1ka7nc5 ui-1hct86z ui-pzfz8q","--ui-button-fg-hover":"ui-ve8a38",$$css:!0}},eh={background:{"--ui-button-bg":"ui-1gwrc9l ui-302ab4 ui-1luhpj5 ui-14iu9ww","--ui-button-bg-hover":"ui-s16ggv ui-1kvkcw9 ui-hqa6pe ui-e032zu",$$css:!0},outline:{kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kVAM5u:"ui-13747pv",$$css:!0}},qi={xs:{kZKoxP:"ui-1vatr1o",$$css:!0},sm:{kZKoxP:"ui-1a6rlst",$$css:!0},md:{kZKoxP:"ui-1e94bgo",$$css:!0},lg:{kZKoxP:"ui-170hpbr",$$css:!0},xl:{kZKoxP:"ui-t8t6p",$$css:!0}},k6={rowActive:{k1xSpc:"ui-1s85apg ui-i8sxwt ui-14aajud ui-1gue9j1",kmuXW:"ui-2lah0s",$$css:!0}},lA={always:null,rowActive:k6.rowActive},uA={root:{kGuDYH:"ui-y5h43f",kLWn49:"ui-19ji09o",kb6lSQ:"ui-t1j8c4",$$css:!0}},Xi={root:{kGuDYH:"ui-1wm8ruf",kLWn49:"ui-spwq11",kb6lSQ:"ui-14s4slr",$$css:!0}},Ki={root:{kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-vu1jfw",$$css:!0}},cA={root:{kGuDYH:"ui-fc7y3v",kLWn49:"ui-1yxxptd",kb6lSQ:"ui-1bignsj",$$css:!0}},x6={root:{kGuDYH:"ui-19d36u7",kLWn49:"ui-dod15v",kb6lSQ:"ui-k22nv0",$$css:!0}},S6={root:{kGuDYH:"ui-wsyq91",kLWn49:"ui-19v9tvf",kb6lSQ:"ui-1h56xvc",$$css:!0}},w6={root:{kGuDYH:"ui-1i1m3gp",kLWn49:"ui-eqr9p9",kb6lSQ:"ui-qhv51x",$$css:!0}},Yl={root:{kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",$$css:!0}},Mk={root:{khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0}},ll={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-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},pressed:{kWkggS:"ui-1x1890e ui-xillm2",kMwMTN:"ui-8ech78 ui-y4kqua",$$css:!0},frameContent:{kE3dHu:"ui-1uhho1l",kpe85a:"ui-1xpa7k",$$css:!0},shapePill:{kaIpWk:"ui-1i4c3av",$$css:!0}},Xu={xs:{kLKAdn:"ui-exx8yu",kpe85a:"ui-g31tg3",kGO01o:"ui-18d9i69",kE3dHu:"ui-43mhey",kaIpWk:"ui-1e1y6u3",kOIVth:"ui-xhr3t",$$css:!0},sm:{kLKAdn:"ui-exx8yu",kpe85a:"ui-g31tg3",kGO01o:"ui-18d9i69",kE3dHu:"ui-43mhey",kaIpWk:"ui-1e1y6u3",$$css:!0},md:{kLKAdn:"ui-exx8yu",kpe85a:"ui-17v7654",kGO01o:"ui-18d9i69",kE3dHu:"ui-1lfpczk",kaIpWk:"ui-1043rbw",kOIVth:"ui-11twubx",$$css:!0},lg:{kLKAdn:"ui-exx8yu",kpe85a:"ui-1yxiud8",kGO01o:"ui-18d9i69",kE3dHu:"ui-yab65l",kaIpWk:"ui-1043rbw",kOIVth:"ui-pkkfsy",$$css:!0},xl:{kLKAdn:"ui-exx8yu",kpe85a:"ui-16b7oty",kGO01o:"ui-18d9i69",kE3dHu:"ui-o7x2bt",kaIpWk:"ui-1043rbw",$$css:!0}},E6={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}},jE={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}},ri={root:ll.root,fontSmoothing:Mk.root,align:{center:null,left:ll.alignLeft},fullWidth:ll.fullWidth,pressed:ll.pressed,reveal:lA,frame:{container:null,content:ll.frameContent},shape:{pill:ll.shapePill},size:{xs:[qi.xs,Xu.xs],sm:[qi.sm,Xu.sm],md:[qi.md,Xu.md],lg:[qi.lg,Xu.lg],xl:[qi.xl,Xu.xl]},pillSize:E6,typography:{xs:Xi.root,sm:Ki.root,md:Ki.root,lg:Ki.root,xl:cA.root},labelGroup:jE.labelGroup,kbs:[Xi.root,jE.kbs]};function T6({rounded:e,variant:t,enforcedRounded:n}){return e!==void 0?e:t==="text"?!1:n===!0}const _6="md",R6={xs:"sm",sm:"base",md:"sm",lg:"sm",xl:"lg"},C6={"ui--default-marker":"ui--default-marker",$$css:!0};function Cn({variant:e,tone:t,border:n,size:r,iconSize:s,rounded:a,frame:l="container",reveal:c="always",align:d,fullWidth:f,disabled:h,children:m,kbs:b,kbsStyle:y,labelGroupStyle:x,pressed:S,className:E,style:T,rootStyle:R,"aria-expanded":_,"aria-pressed":C,...M}){const A=va(),N=e??A?.buttonVariant??"secondary",P=r??A?.buttonSize??_6,z=T6({enforcedRounded:A?.buttonRounded,rounded:a,variant:N}),D=f??A?.buttonFullWidth??!1,H=h??A?.disabled,W=t??A?.buttonTone,F=W??(N==="primary"?d6:void 0),L=oA(N,W),U=s??A?.buttonIconSize??R6[P],q=M["data-pressed"],Z=Ct(ri.root,ri.fontSmoothing,ea.appearance,L.applyControlTone&&aA.foreground,L.applyFilledColors&&ea.colors,L.applyNonFilledBackground&&eh.background,N==="outline"&&eh.outline,N==="media"&&ea.media,S===!0&&ri.pressed,ri.size[P],ri.typography[P],ri.align[d??"center"],D&&ri.fullWidth,ri.reveal[c],z&&ri.shape.pill,z&&ri.pillSize[P],ri.frame[l],n&&sA[n],A?.buttonRootStyle,R,C6);let B=m;if(b!=null){const K=Ct(ri.labelGroup,x),O=Ct(ri.kbs,y);B=g.jsxs("span",{className:bn("ui-button__label-group",K.className),style:K.style,children:[m,g.jsx("span",{className:bn("ui-button__kbs",O.className),style:O.style,children:b})]})}return g.jsx(iA,{...M,"aria-expanded":_,"aria-pressed":_===void 0&&S!==void 0?S:C,className:bn("ui-button",Z.className,E),style:{...Z.style,...T},"data-variant":N,"data-size":P,"data-rounded":z||void 0,"data-frame":l!=="container"?l:void 0,"data-border":n,"data-tone":F,"data-align":d==="left"?d:void 0,"data-full-width":D||void 0,"data-reveal":c!=="always"?c:void 0,"data-pressed":S!==void 0?String(S):q,disabled:H,children:g.jsx(Ms,{iconSize:U,children:B})})}function of(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Ll({controlled:e,default:t,name:n,state:r="value"}){const{current:s}=v.useRef(e!==void 0),[a,l]=v.useState(t),c=s?e:a,d=v.useCallback(f=>{s||l(f)},[]);return[c,d]}let LE=(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})({}),PE=(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 N6={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},pc={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},A6={disabled:!1,...pc},af={valid(e){return e===null?null:e?{[PE.valid]:""}:{[PE.invalid]:""}}};function O6(e){return v.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[LE.checked]:""}:{[LE.unchecked]:""}},...af}),[e.indeterminate])}const I6={invalid:void 0,name:void 0,validityData:{state:N6,errors:[],error:"",value:"",initialValue:null},setValidityData:Jn,disabled:void 0,touched:pc.touched,setTouched:Jn,dirty:pc.dirty,setDirty:Jn,filled:pc.filled,setFilled:Jn,focused:pc.focused,setFocused:Jn,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:A6,markedDirtyRef:{current:!1},registerFieldControl:Jn,validation:{getValidationProps:(e,t=Un)=>t,inputRef:{current:null},registerInput:Jn,commit:async()=>{},change:Jn}},M6=v.createContext(I6);function Wh(e=!0){const t=v.useContext(M6);if(t.setValidityData===Jn&&!e)throw new Error(Mn(28));return t}function fA(e,t,n,r,s=!0,a){const{registerFieldControl:l}=Wh(),c=v.useRef(null);c.current||(c.current=Symbol()),He(()=>{const d=c.current;return!d||!s?void 0:(l(d,{controlRef:e,getValue:r,id:t,name:a,value:n}),()=>{l(d,void 0)})},[e,s,r,t,a,l,n])}const D6=v.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Jn,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function dA(){return v.useContext(D6)}const z6=v.createContext({controlId:void 0,registerControlId:Jn,labelId:void 0,setLabelId:Jn,messageIds:[],setMessageIds:Jn,getDescriptionProps:e=>e});function Dk(){return v.useContext(z6)}const j6=v.createContext(void 0);function L6(){const e=v.useContext(j6);if(e===void 0)throw new Error(Mn(14));return e}const P6=v.forwardRef(function(t,n){const{render:r,className:s,style:a,keepMounted:l=!1,...c}=t,d=L6(),f=d.checked||d.indeterminate,{mounted:h,transitionStatus:m,setMounted:b}=sf(f),y=v.useRef(null),x={...d,transitionStatus:m};To({open:f,ref:y,onComplete(){f||b(!1)}});const E={...O6(d),...xo,...af},T=l||h,R=mn("span",t,{ref:[n,y],state:x,stateAttributesMapping:E,props:c});return T?R:null}),$6="md",$E={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-1e1y6u3",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}},B6={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}},F6={sm:9,md:10,lg:11},BE={"--icon-weight":"700"};function U6({indeterminate:e,interactive:t,size:n,variant:r}){const s=Ct($E.root,$E[n],B6[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=F6[n];return g.jsx("span",{"aria-hidden":"true",className:bn("ui-checkbox__box",s.className),style:s.style,children:t?g.jsx(P6,{className:bn("ui-checkbox__icon",a.className),keepMounted:!0,render:(c,d)=>g.jsx("span",{...c,children:g.jsx(tn,{name:d.indeterminate?"minus":"check",size:l,style:BE})}),style:a.style}):g.jsx("span",{className:bn("ui-checkbox__icon",a.className),style:a.style,children:g.jsx(tn,{name:e?"minus":"check",size:l,style:BE})})})}function pA({checked:e,disabled:t,indeterminate:n=!1,size:r=$6,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 g.jsx("span",{"aria-hidden":"true",className:bn("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:g.jsx(U6,{indeterminate:n,interactive:!1,size:r,variant:s})})}function q6(e,t,n=(r,s)=>r===s){return e.length===t.length&&e.every((r,s)=>n(r,t[s]))}function H6(e){const{open:t,defaultOpen:n,onOpenChange:r,disabled:s}=e,[a,l]=Ll({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:c,setMounted:d,transitionStatus:f}=sf(a,!0,!0),h=Wl(),[m,b]=v.useState(),y=m??h,x=Ke(S=>{const E=!a,T=Et(Vl,S.nativeEvent);r(E,T),!T.isCanceled&&l(E)});return v.useMemo(()=>({disabled:s,handleTrigger:x,mounted:c,open:a,panelId:y,setMounted:d,setOpen:l,setPanelIdState:b,transitionStatus:f}),[s,x,c,a,y,d,l,b,f])}const hA=v.createContext(void 0);function mA(){const e=v.useContext(hA);if(e===void 0)throw new Error(Mn(15));return e}let zk=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=oa.startingStyle]="startingStyle",e[e.endingStyle=oa.endingStyle]="endingStyle",e})({}),G6=(function(e){return e.panelOpen="data-panel-open",e})({});const V6={[zk.open]:""},W6={[zk.closed]:""},K6={open(e){return e?{[G6.panelOpen]:""}:null}},Z6={open(e){return e?V6:W6}},gA={...Z6,...xo},Y6=v.forwardRef(function(t,n){const{render:r,className:s,defaultOpen:a=!1,disabled:l=!1,onOpenChange:c,open:d,style:f,...h}=t,m=Ke(c),b=H6({open:d,defaultOpen:a,onOpenChange:m,disabled:l}),y=v.useMemo(()=>({open:b.open,disabled:b.disabled,transitionStatus:b.transitionStatus}),[b.open,b.disabled,b.transitionStatus]),x=v.useMemo(()=>({...b,onOpenChange:m,state:y}),[b,m,y]),S=mn("div",t,{state:y,ref:n,props:h,stateAttributesMapping:gA});return g.jsx(hA.Provider,{value:x,children:S})}),X6={...K6,...xo},FE=v.forwardRef(function(t,n){const{panelId:r,open:s,handleTrigger:a,state:l,disabled:c}=mA(),{className:d,disabled:f=c,render:h,nativeButton:m=!0,style:b,...y}=t,{getButtonProps:x,buttonRef:S}=Gl({disabled:f,focusableWhenDisabled:!0,native:m});return mn("button",t,{state:l,ref:[n,S],props:[{"aria-controls":s?r:void 0,"aria-expanded":s,onClick:a},y,x],stateAttributesMapping:X6})}),Qu={height:void 0,width:void 0};function Q6(e){const{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:s,mounted:a,onOpenChange:l,open:c,setMounted:d,setOpen:f,transitionStatus:h}=e,m=v.useRef(null),b=v.useRef(null),[y,x]=v.useState(Qu),S=v.useRef(Qu),E=v.useRef(!1),T=v.useRef(c),R=v.useRef(!1),[_,C]=v.useState(!1),M=v.useRef(null),A=bo(t,m),N=In({mounted:a,open:c}),P=DN(m,!1,!1),z=!c&&!a,D=_?"idle":h,H=c&&(T.current||R.current),W=!c&&a&&b.current==="css-animation"&&y.height===void 0&&y.width===void 0?S.current:y,F=n&&z&&b.current!=="css-animation",L=Ke((K,O=!0)=>{O&&(S.current=K),x(K)}),U=Ke(()=>{M.current?.(),M.current=null}),q=Ke(K=>{U(),M.current=()=>{M.current=null,K()}}),Z=Ke(()=>{c&&a&&b.current==="css-animation"&&(R.current=!0)});He(()=>{!_||h==="starting"||C(!1)},[_,h]),v.useEffect(()=>()=>{Z(),U()},[Z,U]),He(()=>{const K=m.current;if(!K)return;!c&&M.current&&U();const O=J6(K,H);if(b.current=O,c&&h==="idle"&&T.current&&O==="css-animation"){S.current=ul(K);return}if(c&&h==="starting"){const j=E.current;if(E.current=!1,O==="none"){L(ul(K)),C(!0);return}if(O==="css-transition"){const X=e4(K);if(L(ul(K)),!j)return X;const se=Ju(K,"transition-duration","0s");return q(se),C(!0),X}if(O==="css-animation"){if(L(ul(K)),!j){Ju(K,"animation-name","none")();return}const X=Ju(K,"animation-name","none"),se=Ju(K,"animation-duration","0s");X(),q(se),C(!0);return}}if(!c&&a&&(h==="idle"||h==="starting")){if(T.current=!1,R.current=!1,O==="none"){L(Qu,!1),d(!1);return}L(ul(K));return}if(h!=="ending")return;if(O==="none"){d(!1);return}const $=ul(K);if(!(($.height??0)>0||($.width??0)>0)){d(!1);return}L($),O==="css-animation"&&Ju(K,"animation-name","none")()},[a,c,U,L,d,q,H,h]),To({enabled:c&&a&&D==="idle",open:!0,ref:m,onComplete(){c&&L(Qu,!1)}}),v.useEffect(()=>{if(c||!a||D!=="ending"||!m.current)return;const O=new AbortController;let $=-1;function V(){N.current.open||(d(!1),L(Qu,!1))}return $=$r.request(()=>{O.signal.aborted||P(V,O.signal)}),()=>{$r.cancel($),O.abort()}},[N,a,c,D,P,L,d]),He(()=>{const K=m.current;!K||!n||!z||K.setAttribute("hidden","until-found")},[z,n]),v.useEffect(function(){const O=m.current;if(!O)return;function $(V){const j=Et(Ii,V);l(!0,j),!j.isCanceled&&(E.current=!0,f(!0))}return zt(O,"beforematch",$)},[l,f]);const B=s||n||a||c;return{height:W.height,props:{...F?{[zk.startingStyle]:""}:void 0,hidden:z,id:r},ref:A,shouldPreventOpenAnimation:H,shouldRender:B,transitionStatus:D,width:W.width}}function ul(e){return{height:e.scrollHeight,width:e.scrollWidth}}function J6(e,t=!1){const n=wn(e).getComputedStyle(e),r=(n.animationName.split(",").map(a=>a.trim()).some(a=>a!==""&&a!=="none")||t)&&UE(n.animationDuration),s=UE(n.transitionDuration);return r&&s||s?"css-transition":r?"css-animation":"none"}function UE(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function Ju(e,t,n){const r=e.style.getPropertyValue(t),s=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===""){e.style.removeProperty(t);return}e.style.setProperty(t,r,s)}}function e4(e){const t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(s=>{e.style.setProperty(s,"initial","important")});function n(){Object.entries(t).forEach(([s,a])=>{if(a===""){e.style.removeProperty(s);return}e.style.setProperty(s,a)})}const r=$r.request(n);return()=>{$r.cancel(r),n()}}let qE=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});const t4=v.forwardRef(function(t,n){const{className:r,hiddenUntilFound:s,keepMounted:a,render:l,id:c,style:d,...f}=t,{mounted:h,onOpenChange:m,open:b,panelId:y,setMounted:x,setPanelIdState:S,setOpen:E,state:T,transitionStatus:R}=mA(),_=s??!1,C=a??!1;He(()=>{if(c)return S(c),()=>{S(void 0)}},[c,S]);const{height:M,props:A,ref:N,shouldPreventOpenAnimation:P,shouldRender:z,transitionStatus:D,width:H}=Q6({externalRef:n,hiddenUntilFound:_,id:y,keepMounted:C,mounted:h,onOpenChange:m,open:b,setMounted:x,setOpen:E,transitionStatus:R}),W={...T,transitionStatus:D},F=DC(d,W),L=mn("div",{...t,style:void 0},{state:W,ref:N,props:[A,{style:{[qE.collapsiblePanelHeight]:M===void 0?"auto":`${M}px`,[qE.collapsiblePanelWidth]:H===void 0?"auto":`${H}px`}},f,F?{style:F}:void 0,P?{style:{animationName:"none"}}:void 0],stateAttributesMapping:gA});return z?L:null}),n4={"ui--default-marker":"ui--default-marker",$$css:!0},Zo={base:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kfSwDN:"ui-87ps6o",kOIVth:"ui-11twubx",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",kGuDYH:"ui-hwpfco",kLWn49:"ui-1bcdmom",$$css:!0},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},presentational:{kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",$$css:!0},clickable:{kkrTdU:"ui-1ypdohk",$$css:!0},disabled:{kSiTet:"ui-byyjgo",$$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}},r4={base:{kKwaWg:"ui-1o6vebl ui-phioz4",kgSjnq:"ui-akli9p",kHypHr:"ui-1ta4xzc ui-15mlgz9",kBahZS:"ui-1t23j8t ui-nqxwjk",kUisrP:"ui-g7jpbn ui-1xgngqn",kKVMdj:"ui-17xo24v ui-1aquc0h",k44tkh:"ui-1c74tu6",kyAemX:"ui-1esw782",ko0y90:"ui-a4qsjk",$$css:!0}};function i4({action:e,chevronRef:t,details:n,detailsRef:r,leadingIcon:s,loading:a,shimmerDetails:l,showChevron:c,tabularNums:d,tone:f}){const h={0:{className:"ui-2lah0s ui-19aaqeu ui-1dkqrid ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1"},4:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-4b2ntj ui-1uq8sgy"},2:{className:"ui-2lah0s ui-19aaqeu ui-1dkqrid ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-ss6m8b"},6:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-4b2ntj ui-1uq8sgy ui-ss6m8b"},1:{className:"ui-2lah0s ui-19aaqeu ui-1dkqrid ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1o6vebl ui-phioz4 ui-akli9p ui-1ta4xzc ui-15mlgz9 ui-1t23j8t ui-nqxwjk ui-g7jpbn ui-1xgngqn ui-17xo24v ui-1aquc0h ui-1c74tu6 ui-1esw782 ui-a4qsjk"},5:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-4b2ntj ui-1uq8sgy ui-1o6vebl ui-phioz4 ui-akli9p ui-1ta4xzc ui-15mlgz9 ui-1t23j8t ui-nqxwjk ui-g7jpbn ui-1xgngqn ui-17xo24v ui-1aquc0h 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-phioz4 ui-akli9p ui-1ta4xzc ui-15mlgz9 ui-1t23j8t ui-nqxwjk ui-g7jpbn ui-1xgngqn ui-17xo24v ui-1aquc0h ui-1c74tu6 ui-1esw782 ui-a4qsjk"},7:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-4b2ntj ui-1uq8sgy ui-ss6m8b ui-1o6vebl ui-phioz4 ui-akli9p ui-1ta4xzc ui-15mlgz9 ui-1t23j8t ui-nqxwjk ui-g7jpbn ui-1xgngqn ui-17xo24v ui-1aquc0h ui-1c74tu6 ui-1esw782 ui-a4qsjk"}}[(f==="muted"||f==="tertiary")<<2|!!d<<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|!!d<<0],b={className:"ui-2lah0s ui-1kde42o ui-1urst0s ui-1lbmi28 ui-18tq7xr ui-g01cxk ui-bthccv ui-7p49u4 ui-1tty4wy ui-p33vsb ui-4f0zl0 ui-93pzih ui-1bt1wk1"},y={className:"ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui-14ju556 ui-1urst0s"};return g.jsxs(g.Fragment,{children:[s!=null&&g.jsx("span",{className:bn("ui-collapsible-leading-icon",y.className),style:y.style,children:s}),g.jsx("span",{className:bn("ui-collapsible-action",h.className),style:h.style,children:e}),n&&g.jsx("span",{ref:r,className:bn("ui-collapsible-details",m.className),style:m.style,children:n}),c&&g.jsx(tn,{ref:t,name:"chevron-right",className:bn("ui-collapsible-chevron",b.className),style:b.style,size:"sm"})]})}function Di({action:e,details:t,onDetailsClick:n,detailsButtonStyle:r,headerStyle:s,leadingIcon:a,disabled:l=!1,expandable:c=!0,loading:d=!1,shimmerDetails:f=!0,tabularNums:h=!1,tone:m="default",children:b,headerRef:y,detailsRef:x,chevronRef:S,className:E,contentClassName:T,open:R,defaultOpen:_,onOpenChange:C,...M}){const A=n!==void 0,N=c&&A,P=R!==void 0,[z,D]=v.useState(()=>_??!1),H=P?!!R:z,W=(X,se)=>{P||D(X),C?.(X,se)},F=A?g.jsx("button",{type:"button",...Ct(Zo.buttonReset,Zo.detailsButton,r),disabled:l,onClick:X=>{X.stopPropagation(),n(X)},children:t}):t,L=c&&b!=null&&typeof b!="boolean",U={className:"ui-78zum5 ui-dt5ytf"},q=Ct(Zo.base,c&&!A?Zo.buttonReset:Zo.presentational,c&&!l&&Zo.clickable,l&&Zo.disabled,d&&f&&r4.base,n4,s),Z={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"}}[!l<<0],B={className:"ui-2lah0s ui-1kde42o ui-1urst0s ui-1lbmi28 ui-18tq7xr ui-7p49u4 ui-1tty4wy ui-p33vsb ui-4f0zl0 ui-93pzih ui-1bt1wk1 ui-1hc1fzr"},K={className:"ui-1lliihq ui-1kd3hbs ui-uan8c8 ui-1fe7yth ui-12wejat ui-6ikm8r ui-10wlt62 ui-pv8u57 ui-ua3uq3 ui-4wkmsb ui-g3p6pi ui-ptf4uz"},O={className:"ui-6ikm8r ui-10wlt62 ui-2lwn1j"},$={className:"ui-78zum5 ui-dt5ytf ui-1y48gol ui-1vdilah ui-1hc1fzr ui-19991ni ui-4wkmsb ui-g3p6pi ui-1bt1wk1"},V={"data-component":"collapsible-header",className:bn("ui-collapsible-header",q.className),style:q.style},j=g.jsx(i4,{action:e,chevronRef:S,details:F,detailsRef:x,leadingIcon:a,loading:d,shimmerDetails:f,showChevron:c&&!A,tabularNums:h,tone:m});return g.jsxs(Y6,{...M,open:N?H:R,defaultOpen:N?void 0:_,onOpenChange:N?W:C,disabled:l,"data-expandable":c?"":void 0,"data-loading":d?"":void 0,"data-tone":m,className:bn("ui-collapsible",U.className,E),style:U.style,children:[N?g.jsxs("div",{...V,ref:y,onClick:()=>{l||W(!H)},children:[j,g.jsx(FE,{"data-component":"collapsible-header","aria-label":typeof t=="string"?`Toggle ${t}`:"Toggle details",className:Z.className,style:Z.style,...L?null:{"aria-controls":void 0},onClick:X=>{l||X.stopPropagation()},children:g.jsx(tn,{ref:S,name:"chevron-right",className:bn("ui-collapsible-chevron",B.className),style:B.style,size:"sm"})})]}):c?g.jsx(FE,{...V,ref:y,...L?null:{"aria-controls":void 0},onClick:X=>{l||X.stopPropagation()},children:j}):g.jsx("div",{...V,ref:y,children:j}),L&&g.jsx(t4,{keepMounted:!0,className:bn("ui-collapsible-content-view",K.className),style:K.style,children:g.jsx("div",{className:O.className,style:O.style,children:g.jsx("div",{className:bn("ui-collapsible-content",$.className,T),style:$.style,children:b})})})]})}const s4=(e,t)=>Object.is(e,t);function ua(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function o4(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:ua(t,r,n))}function xc(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:ua(r,t,n))}function a4(e,t,n){return e.filter(r=>!ua(t,r,n))}function uv(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function bA(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function l4(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(bA(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 yA(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 uv(e)}function Qo(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?uv(e.value):uv(e)}function vA(e,t,n){function r(){return yA(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=bA(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 u4(e,t,n){return e.reduce((r,s,a)=>(a>0&&r.push(", "),r.push(g.jsx(v.Fragment,{children:vA(s,t,n)},a)),r),[])}function jk(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:s,registerControlId:a}=Dk(),l=Wl(t),c=n?s:void 0,d=Hr(()=>Symbol("labelable-control")),f=v.useRef(!1),h=v.useRef(t!=null),m=Ke(()=>{!f.current||a===Jn||(f.current=!1,a(d.current,void 0))});return He(()=>{if(a===Jn)return;let b;if(n){const y=r?.current;ft(y)&&y.closest("label")!=null?b=t??null:b=c??l}else if(t!=null)h.current=!0,b=t;else if(h.current)b=l;else{m();return}if(b===void 0){m();return}f.current=!0,a(d.current,b)},[t,r,c,a,n,l,d,m]),v.useEffect(()=>m,[m]),s??l}const c4=v.createContext(void 0);function Lk(){return v.useContext(c4)?.direction??"ltr"}function f4(e,t){return e??t}function d4(e){const t=e.getBoundingClientRect(),n=wn(e);if(fk)return t;const 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,d=parseFloat(s.width)||0,f=parseFloat(s.height)||0,h=Math.max(t.width,l,d),m=Math.max(t.height,c,f),b=h-t.width,y=m-t.height;return{left:t.left-b/2,right:t.right+b/2,top:t.top-y/2,bottom:t.bottom+y/2}}const kA=v.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function p4(){return v.useContext(kA)}function Pk(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:s}=e,a=Ke(s),l=v.useRef(0),c=Hr(m4).current,d=Hr(h4).current,[f,h]=v.useState(0),m=v.useRef(f),b=Ke((T,R)=>{d.set(T,R??null),m.current+=1,h(m.current)}),y=Ke(T=>{d.delete(T),m.current+=1,h(m.current)}),x=v.useMemo(()=>{const T=new Map;return Array.from(d.keys()).filter(_=>_.isConnected).sort(g4).forEach((_,C)=>{const M=d.get(_)??{};T.set(_,{...M,index:C})}),T},[d,f]);He(()=>{if(typeof MutationObserver!="function"||x.size===0)return;const T=new MutationObserver(R=>{const _=new Set,C=M=>_.has(M)?_.delete(M):_.add(M);R.forEach(M=>{M.removedNodes.forEach(C),M.addedNodes.forEach(C)}),_.size===0&&(m.current+=1,h(m.current))});return x.forEach((R,_)=>{_.parentElement&&T.observe(_.parentElement,{childList:!0})}),()=>{T.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 S=Ke(T=>(c.add(T),()=>{c.delete(T)}));He(()=>{c.forEach(T=>T(x))},[c,x]);const E=v.useMemo(()=>({register:b,unregister:y,subscribeMapChange:S,elementsRef:n,labelsRef:r,nextIndexRef:l}),[b,y,S,n,r,l]);return g.jsx(kA.Provider,{value:E,children:t})}function h4(){return new Map}function m4(){return new Set}function g4(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 b4=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:a,platform:l,elements:c,middlewareData:d}=t,{element:f,padding:h=0,offsetParent:m="real"}=Os(e,t)||{};if(f==null)return{};const b=QC(h),y={x:n,y:r},x=gk(s),S=mk(x),E=await l.getDimensions(f),T=x==="y",R=T?"top":"left",_=T?"bottom":"right",C=T?"clientHeight":"clientWidth",M=a.reference[S]+a.reference[x]-y[x]-a.floating[S],A=y[x]-a.reference[x],N=m==="real"?await l.getOffsetParent?.(f):c.floating;let P=c.floating[C]||a.floating[S];(!P||!await l.isElement?.(N))&&(P=c.floating[C]||a.floating[S]);const z=M/2-A/2,D=P/2-E[S]/2-1,H=Math.min(b[R],D),W=Math.min(b[_],D),F=H,L=P-E[S]-W,U=P/2-E[S]/2+z,q=tv(F,U,L),Z=!d.arrow&&Eo(s)!=null&&U!==q&&a.reference[S]/2-(U<F?H:W)-E[S]/2<0,B=Z?U<F?U-F:U-L:0;return{[x]:y[x]+B,data:{[x]:q,centerOffset:U-q-B,...Z&&{alignmentOffset:B}},reset:Z}}}),y4=(e,t)=>({...b4(e),options:[e,t]}),v4=q$().fn,k4={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 v4(e)).data?.referenceHidden||a}}}},Ip={sideX:"left",sideY:"top"},xA={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:s},platform:a,strategy:l,placement:c}=e,d=wn(s),f=d.getComputedStyle(s);if(!(f.transitionDuration!=="0s"&&f.transitionDuration!==""))return{x:t,y:n,data:Ip};const m=await a.getOffsetParent?.(s);let b={width:0,height:0};if(l==="fixed"&&d?.visualViewport)b={width:d.visualViewport.width,height:d.visualViewport.height};else if(m===d){const R=Kt(s);b={width:R.documentElement.clientWidth,height:R.documentElement.clientHeight}}else await a.isElement?.(m)&&(b=await a.getDimensions(m));const y=qr(c);let x=t,S=n;y==="left"&&(x=b.width-(t+r.width)),y==="top"&&(S=b.height-(n+r.height));const E=y==="left"?"right":Ip.sideX,T=y==="top"?"bottom":Ip.sideY;return{x,y:S,data:{sideX:E,sideY:T}}}};function SA(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 HE(e,t,n){const{rects:r,placement:s}=e;return{side:SA(t,qr(s),n),align:Eo(s)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function $k(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:s=0,align:a="center",alignOffset:l=0,collisionBoundary:c,collisionPadding:d=5,sticky:f=!1,arrowPadding:h=5,disableAnchorTracking:m=!1,inline:b,keepMounted:y=!1,floatingRootContext:x,mounted:S,collisionAvoidance:E,shiftCrossAxis:T=!1,nodeId:R,adaptiveOrigin:_,lazyFlip:C=!1,externalTree:M}=e,[A,N]=v.useState(null);!S&&A!==null&&N(null);const P=E.side||"flip",z=E.align||"flip",D=E.fallbackAxisSide||"end",H=typeof t=="function"?t:void 0,W=Ke(H),F=H?W:t,L=In(t),U=In(S),Z=Lk()==="rtl",B=A||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":Z?"left":"right","inline-start":Z?"right":"left"}[r],K=a==="center"?B:`${B}-${a}`;let O=d;const $=1,V=r==="bottom"?$:0,j=r==="top"?$:0,X=r==="right"?$:0,se=r==="left"?$:0;typeof O=="number"?O={top:O+V,right:O+se,bottom:O+j,left:O+X}:O&&(O={top:(O.top||0)+V,right:(O.right||0)+se,bottom:(O.bottom||0)+j,left:(O.left||0)+X});const re={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:O},oe=v.useRef(null),ue=In(s),ce=In(l),ge=typeof s!="function"?s:0,Ce=typeof l!="function"?l:0,ae=[];b&&ae.push(b),ae.push(xk(ot=>{const St=HE(ot,r,Z),Pt=typeof ue.current=="function"?ue.current(St):ue.current,jt=typeof ce.current=="function"?ce.current(St):ce.current;return{mainAxis:Pt,crossAxis:jt,alignmentAxis:jt}},[ge,Ce,Z,r]));const ye=z==="none"&&P!=="shift",we=!ye&&(f||T||P==="shift"),Ae=P==="none"?null:wk({...re,padding:{top:O.top+$,right:O.right+$,bottom:O.bottom+$,left:O.left+$},mainAxis:!T&&P==="flip",crossAxis:z==="flip"?"alignment":!1,fallbackAxisSideDirection:D}),Ee=ye?null:Sk(ot=>{const St=Kt(ot.elements.floating).documentElement;return{...re,rootBoundary:T?{x:0,y:0,width:St.clientWidth,height:St.clientHeight}:void 0,mainAxis:z!=="none",crossAxis:we,limiter:f||T?void 0:U$(Pt=>{if(!oe.current)return{};const{width:jt,height:Dt}=oe.current.getBoundingClientRect(),Y=vi(qr(Pt.placement)),he=Y==="y"?jt:Dt,Le=Y==="y"?O.left+O.right:O.top+O.bottom;return{offset:he/2+Le/2}})}},[re,f,T,O,z]);P==="shift"||z==="shift"||a==="center"?ae.push(Ee,Ae):ae.push(Ae,Ee),ae.push(Ek({...re,apply({elements:{floating:ot},availableWidth:St,availableHeight:Pt,rects:jt}){if(!U.current)return;const Dt=ot.style;Dt.setProperty("--available-width",`${St}px`),Dt.setProperty("--available-height",`${Pt}px`);const Y=wn(ot).devicePixelRatio||1,{x:he,y:Le,width:Qe,height:wt}=jt.reference,lt=(Math.round((he+Qe)*Y)-Math.round(he*Y))/Y,qe=(Math.round((Le+wt)*Y)-Math.round(Le*Y))/Y;Dt.setProperty("--anchor-width",`${lt}px`),Dt.setProperty("--anchor-height",`${qe}px`)}}),y4(ot=>({element:oe.current||Kt(ot.elements.floating).createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(ot){const{elements:St,middlewareData:Pt,placement:jt,rects:Dt,y:Y}=ot,he=qr(jt),Le=vi(he),Qe=oe.current,wt=Pt.arrow?.x||0,lt=Pt.arrow?.y||0,qe=Qe?.clientWidth||0,_e=Qe?.clientHeight||0,Se=wt+qe/2,Ye=lt+_e/2,Me=Math.abs(Pt.shift?.y||0),Pe=Dt.reference.height/2,$e=typeof s=="function"?s(HE(ot,r,Z)):s,kt=Me>$e,Ht={top:`${Se}px calc(100% + ${$e}px)`,bottom:`${Se}px ${-$e}px`,left:`calc(100% + ${$e}px) ${Ye}px`,right:`${-$e}px ${Ye}px`}[he],bt=`${Se}px ${Dt.reference.y+Pe-Y}px`;return St.floating.style.setProperty("--transform-origin",we&&Le==="y"&&kt?bt:Ht),{}}},k4,_),He(()=>{!S&&x&&x.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[S,x]);const xe=v.useMemo(()=>({elementResize:!m&&typeof ResizeObserver<"u",layoutShift:!m&&typeof IntersectionObserver<"u"}),[m]),{refs:De,elements:Ie,x:je,y:Ue,middlewareData:ke,update:Te,placement:te,context:fe,isPositioned:J,floatingStyles:ne}=g3({rootContext:x,open:y?S:void 0,placement:K,middleware:ae,strategy:n,whileElementsMounted:y?void 0:(...ot)=>Wp(...ot,xe),nodeId:R,externalTree:M}),{sideX:be,sideY:Ge}=ke.adaptiveOrigin||Ip,Ze=J?n:"fixed",Xe=v.useMemo(()=>{const ot=_?{position:Ze,[be]:je,[Ge]:Ue}:{position:Ze,...ne};return J||(ot.opacity=0),ot},[_,Ze,be,je,Ge,Ue,ne,J]),vt=v.useRef(null);He(()=>{if(!S)return;const ot=L.current,St=typeof ot=="function"?ot():ot,jt=(GE(St)?St.current:St)||null||null;jt!==vt.current&&(De.setPositionReference(jt),vt.current=jt)},[S,De,F,L]),v.useEffect(()=>{if(!S)return;const ot=L.current;typeof ot!="function"&&GE(ot)&&ot.current!==vt.current&&(De.setPositionReference(ot.current),vt.current=ot.current)},[S,De,F,L]),v.useEffect(()=>{if(y&&S&&Ie.reference&&Ie.floating)return Wp(Ie.reference,Ie.floating,Te,xe)},[y,S,Ie,Te,xe]);const Je=qr(te),mt=SA(r,Je,Z),Tt=Eo(te)||"center",st=!!ke.hide?.referenceHidden;He(()=>{C&&S&&J&&N(Je)},[C,S,J,Je]);const _t=v.useMemo(()=>({position:"absolute",top:ke.arrow?.y,left:ke.arrow?.x}),[ke.arrow]),Ot=ke.arrow?.centerOffset!==0;return v.useMemo(()=>({positionerStyles:Xe,arrowStyles:_t,arrowRef:oe,arrowUncentered:Ot,side:mt,align:Tt,physicalSide:Je,anchorHidden:st,refs:De,context:fe,isPositioned:J,update:Te}),[Xe,_t,oe,Ot,mt,Tt,Je,st,De,fe,J,Te])}function GE(e){return e!=null&&"current"in e}function Kh(e){return e==="starting"?GP:Un}function Bk(e,t,{styles:n,transitionStatus:r,props:s,refs:a,hidden:l,inert:c=!1}){const d={...n};return c&&(d.pointerEvents="none"),mn("div",e,{state:t,ref:a,props:[{role:"presentation",hidden:l,style:d},Kh(r),s],stateAttributesMapping:nf})}const x4=20;function S4(e,t,n,r){const[s,a]=v.useState(!1);He(()=>{if(!e||!t||n==null){a(!1);return}const l=Kt(n).documentElement.clientWidth,c=n.offsetWidth;a(l>0&&c>0&&c>=l-x4)},[e,t,n]),F3(e&&(!t||s),r)}let wA=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function EA(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:s,index:a}=e,{register:l,unregister:c,subscribeMapChange:d,elementsRef:f,labelsRef:h,nextIndexRef:m}=p4(),b=v.useRef(-1),[y,x]=v.useState(a??(s===wA.GuessFromOrder?()=>{if(b.current===-1){const T=m.current;m.current+=1,b.current=T}return b.current}:-1)),S=v.useRef(null),E=v.useCallback(T=>{if(S.current=T,y!==-1&&T!==null&&(f.current[y]=T,h)){const R=t!==void 0;h.current[y]=R?t:r?.current?.textContent??T.textContent}},[y,f,h,t,r]);return He(()=>{if(a!=null)return;const T=S.current;if(T)return l(T,n),()=>{c(T)}},[a,l,c,n]),He(()=>{if(a==null)return d(T=>{const R=S.current?T.get(S.current)?.index:null;R!=null&&x(R)})},[a,d,x]),{ref:E,index:y}}const w4={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}},Zh=w4.root,Yh={border:{k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",k3foIR:"ui-1m1drc7",kLxBhq:"ui-nbfe2x",k8Iv0R:"ui-1xrz1ek",kH8cDV:"ui-17cx49",kDVEDD:"ui-itxdhh",kUfP38:"ui-1k48kgn",kbMawA:"ui-1o7vem3",kloYau:"ui-2q1x1w",$$css:!0}},cr={positioner:{kY2c9j:"ui-2hst0z",$$css:!0},popupPositioner:{kY2c9j:"ui-fc2p8",$$css:!0},popupShadow:{kGVxlE:"ui-1x78n9t",$$css:!0},tooltipShadow:{kGVxlE:"ui-4l6n3x",$$css:!0},popupRadius:{kaIpWk:"ui-1pkpdue",$$css:!0},tooltipRadius:{kaIpWk:"ui-15ujvgx",$$css:!0},surface:{kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kWkggS:"ui-f1vpex",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kWqL5O:"ui-gfja2r",kSWEuD:"ui-11pwa6s",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kZ1KPB:"ui-yj58a3",k4WBpm:"ui-1b16gh4",kaIpWk:"ui-1pkpdue",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-1acoasx",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-vu1jfw",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0},popupLayout:{k1xSpc:"ui-1lliihq",kzqmXN:"ui-ezivpi",ks0D6T:"ui-w5ewwj",kHjlTd:"ui-j0a0fe",$$css:!0},popupInset:{kLKAdn:"ui-uve7l6",kpe85a:"ui-1yxiud8",kGO01o:"ui-1rgtt3y",kE3dHu:"ui-yab65l",$$css:!0},previewCardInset:{kLKAdn:"ui-oyc9vk",kpe85a:"ui-16b7oty",kGO01o:"ui-2lprc",kE3dHu:"ui-o7x2bt",$$css:!0},popupInteractive:{kfzvcC:"ui-67bb7w",kfSwDN:"ui-1hx0egp",$$css:!0},popupSurfaceMd:{kaIpWk:"ui-1pkpdue",$$css:!0},tooltipSurface:{"--ui-surface-hairline-width":"ui-10ssw4j",kGuDYH:"ui-mppzg7",kLWn49:"ui-l68z86",kb6lSQ:"ui-55tv1j",kLKAdn:"ui-3jsnqb",kGO01o:"ui-1w5ico7",kpe85a:"ui-1gztb6q",kE3dHu:"ui-8t86qi",$$css:!0}},TA=cr.positioner,Fk=[cr.surface,Yh.border],_A=[TA,cr.popupShadow,cr.popupRadius],E4=[TA,cr.tooltipShadow,cr.tooltipRadius],T4=[cr.tooltipRadius,cr.tooltipSurface],_4=cr.popupLayout,R4=cr.popupInset,RA=cr.previewCardInset,CA=[_4,R4],C4=cr.popupInteractive,NA=[cr.surface,Yh.border],N4=cr.popupSurfaceMd,A4=cr.popupPositioner,O4=[A4,cr.popupShadow,cr.popupRadius],xa={popupFrame:{kB7OPa:"ui-9f619",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kHBbk8:"ui-c8icb0",kfSwDN:"ui-87ps6o",kY4cRS:"ui-lvsv26",$$css:!0},list:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kAzted:"ui-2lwn1j",kXHlph:"ui-6ikm8r",kORKVm:"ui-ryxfnj",$$css:!0},row:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-6s0dn4",kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kkrTdU:"ui-1ypdohk ui-mh7c9n",kMwMTN:"ui-1wd3ewq ui-1kosevp",kWkggS:"ui-jbqb8w ui-1sbws7q",$$css:!0},rowFrame:{kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kOIVth:"ui-xhr3t",kaIpWk:"ui-2u8bby","--ui-popup-list-row-highlighted-opacity":"ui-5i412e ui-1nlrr02",kWkggS:"ui-jbqb8w ui-9wl9qz",$$css:!0},rowInsetHighlight:{kfYRhQ:"ui-1b16mni",k7VdEw:"ui-1nwgpwx",kXO8Uu:"ui-1r87rg3",kDFFfQ:"ui-1wv1pz9",klb2pz:"ui-1m6apz3",kinjII:"ui-114susd",k3JYP4:"ui-t2or2s",kDMCui:"ui-tj3xra",kWQQwa:"ui-50seq6",kYNu72:"ui-95qkr9",$$css:!0},rowSectionTrailing:{keTefX:"ui-kiyga0",$$css:!0},rowSectionDescription:{kSGwAc:"ui-qcrz7y",keoZOQ:"ui-1k5org8",$$css:!0}},I4=xa.list,M4=xa.row,D4=xa.popupFrame,z4=xa.rowFrame,j4=xa.rowInsetHighlight,L4=xa.rowSectionTrailing,P4=xa.rowSectionDescription,Gr={popup:{k7Eaqz:"ui-1i9suas",ks0D6T:"ui-13kvn80",kskxy:"ui-2pj5ht",$$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)}],popupDefaultWidth:{kzqmXN:"ui-ezivpi",k7Eaqz:"ui-lopysa",$$css:!0},list:{kOIVth:"ui-ihas45",kLKAdn:"ui-9g4tyx",kpe85a:"ui-1xpa7k",kGO01o:"ui-x776sp",kE3dHu:"ui-1uhho1l",$$css:!0},row:{kAzted:"ui-14dnd5q ui-12uk8lx",kLKAdn:"ui-p90ga9 ui-17apzky",kpe85a:"ui-1ccxv1t",kGO01o:"ui-1ep5yuf ui-zkc5ih",kE3dHu:"ui-eomcf8",$$css:!0},rowText:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",kVAEAm:"ui-1n2onr6",kY2c9j:"ui-1vjfegm",$$css:!0},rowLabel:{k1xSpc:"ui-1lliihq",kzQI83:"ui-1iyjqo2",kmuXW:"ui-s83m0k",kCS8Yb:"ui-dl72j9",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",kVQacm:"ui-b3r6kr",kg5iWk:"ui-lyipyv",khDVqt:"ui-uxw1ft",$$css:!0},itemTextWithMeta:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1pha0wt",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",$$css:!0},rowTextWithDescription:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kGNEyG:"ui-1cy8zhl",kOIVth:"ui-137clkk",$$css:!0},rowDescription:{k1xSpc:"ui-1lliihq",ks0D6T:"ui-193iq5w",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",khDVqt:"ui-uxw1ft",kMwMTN:"ui-4b2ntj",$$css:!0},rowMeta:{keTefX:"ui-1uokl23",$$css:!0},rowSection:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kmuXW:"ui-2lah0s",kVAEAm:"ui-1n2onr6",kY2c9j:"ui-1vjfegm",kMwMTN:"ui-19aaqeu",$$css:!0},rowSectionLeading:{k71WvV:"ui-17adnql",$$css:!0},rowSectionEnd:{kOIVth:"ui-1jcujwu",$$css:!0}},$4=[NA,D4,Gr.popup],B4={sm:null,md:N4},F4=Gr.popupWidth,U4=Gr.popupDefaultWidth,q4=[I4,Gr.list],H4=[M4,z4,Gr.row,j4,Ki.root],G4=Gr.rowText,V4=Gr.rowLabel,W4=Gr.itemTextWithMeta,K4=Gr.rowTextWithDescription,Z4=Gr.rowDescription,Y4=Gr.rowMeta,Yb=Gr.rowSection,X4=Gr.rowSectionLeading,VE=L4,Q4=Gr.rowSectionEnd,Xb=P4;function cl(e,t,n){let r=n.initialDeps??[],s,a=!0;function l(){var c,d,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,S)=>r[S]!==x)))return s;r=m;let y;if(n.key&&((d=n.debug)!=null&&d.call(n))&&(y=Date.now()),s=t(...m),n.key&&((f=n.debug)!=null&&f.call(n))){const x=Math.round((Date.now()-h)*100)/100,S=Math.round((Date.now()-y)*100)/100,E=S/16,T=(R,_)=>{for(R=String(R);R.length<_;)R=" "+R;return R};console.info(`%c⏱ ${T(S,5)} /${T(x,5)} ms`,`
|
|
10
|
+
font-size: .6rem;
|
|
11
|
+
font-weight: bold;
|
|
12
|
+
color: hsl(${Math.max(0,Math.min(120-120*E,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 WE(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const J4=(e,t)=>Math.abs(e-t)<1.01,eB=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},KE=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},tB=e=>e,nB=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},rB=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const s=l=>{const{width:c,height:d}=l;t({width:Math.round(c),height:Math.round(d)})};if(s(KE(n)),!r.ResizeObserver)return()=>{};const a=new r.ResizeObserver(l=>{const c=()=>{const d=l[0];if(d?.borderBoxSize){const f=d.borderBoxSize[0];if(f){s({width:f.inlineSize,height:f.blockSize});return}}s(KE(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},ZE={passive:!0},YE=typeof window>"u"?!0:"onscrollend"in window,iB=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const a=e.options.useScrollendEvent&&YE?()=>{}:eB(r,()=>{t(s,!1)},e.options.isScrollingResetDelay),l=h=>()=>{const{horizontal:m,isRtl:b}=e.options;s=m?n.scrollLeft*(b&&-1||1):n.scrollTop,a(),t(s,h)},c=l(!0),d=l(!1);n.addEventListener("scroll",c,ZE);const f=e.options.useScrollendEvent&&YE;return f&&n.addEventListener("scrollend",d,ZE),()=>{n.removeEventListener("scroll",c),f&&n.removeEventListener("scrollend",d)}},sB=(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"]},oB=(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 aB{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,d=this.indexFromElement(c);if(!c.isConnected){this.observer.unobserve(c);return}this.shouldMeasureDuringScroll(d)&&this.resizeItem(d,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:tB,rangeExtractor:nB,onChange:()=>{},measureElement:sB,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=cl(()=>(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 d=a.get(c.lane);if(d==null||c.end>d.end?a.set(c.lane,c):c.end<d.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=cl(()=>[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=cl(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:a,enabled:l,lanes:c},d)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const b of this.laneAssignments.keys())b>=n&&this.laneAssignments.delete(b);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(b=>{this.itemSizeCache.set(b.key,b.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 b=0;b<f;b++){const y=h[b];y&&(m[y.lane]=b)}for(let b=f;b<n;b++){const y=a(b),x=this.laneAssignments.get(b);let S,E;if(x!==void 0&&this.options.lanes>1){S=x;const C=m[S],M=C!==void 0?h[C]:void 0;E=M?M.end+this.options.gap:r+s}else{const C=this.options.lanes===1?h[b-1]:this.getFurthestMeasurement(h,b);E=C?C.end+this.options.gap:r+s,S=C?C.lane:b%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(b,S)}const T=d.get(y),R=typeof T=="number"?T:this.options.estimateSize(b),_=E+R;h[b]={index:b,start:E,size:R,end:_,key:y,lane:S},m[S]=b}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=cl(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,s,a)=>this.range=n.length>0&&r>0?lB({measurements:n,outerSize:r,scrollOffset:s,lanes:a}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=cl(()=>{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=cl(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let a=0,l=n.length;a<l;a++){const c=n[a],d=r[c];s.push(d)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return WE(r[AA(0,r.length-1,s=>WE(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,d=this.now();this.scrollState={index:n,align:c,behavior:s,startedAt:d,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&&J4(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 AA=(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 lB({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const s=e.length-1,a=d=>e[d].start;if(e.length<=r)return{startIndex:0,endIndex:s};let l=AA(0,s,a,n),c=l;if(r===1)for(;c<s&&e[c].end<n+t;)c++;else if(r>1){const d=Array(r).fill(0);for(;c<s&&d.some(h=>h<n+t);){const h=e[c];d[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}}function uB(){const e=v.useRef(void 0),t=v.useCallback(()=>{const r=e.current;r!==void 0&&(e.current=void 0,cancelAnimationFrame(r))},[]),n=v.useCallback(r=>{t(),e.current=requestAnimationFrame(s=>{e.current=void 0,r(s)})},[t]);return v.useEffect(()=>t,[t]),v.useMemo(()=>({dispose:t,request:n}),[t,n])}function OA(e){return typeof ResizeObserver>"u"?null:new ResizeObserver(e)}function cv({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 cB="hover",fB=4,dB={kn1fP1:"ui-xqa2ke",kJcbqH:"ui-16fucec",$$css:!0};function pB(e){const{scrollTop:t,scrollHeight:n,clientHeight:r,threshold:s}=e;return{isAtTop:t<=s,isAtBottom:t+r>=n-s}}function hB(e){const{scrollLeft:t,scrollWidth:n,clientWidth:r,threshold:s}=e,a=Math.abs(t);return{isAtStart:a<=s,isAtEnd:a+r>=n-s}}const XE={maskGeometry:e=>[dB,{kQB4zb:(e>1?"intersect":null)!=null?"ui-1xrn8sl":e>1?"intersect":null,kRVSR3:(e>1?"source-in":null)!=null?"ui-60m5pi":e>1?"source-in":null,$$css:!0},{"--x-maskSize":(e>1?"100% 100%, 100% 100%":"100% 100%")!=null?e>1?"100% 100%, 100% 100%":"100% 100%":void 0,"--x-maskComposite":(e>1?"intersect":null)!=null?e>1?"intersect":null:void 0,"--x-WebkitMaskComposite":(e>1?"source-in":null)!=null?e>1?"source-in":null:void 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 mB({topFadePx:e,bottomFadePx:t,topFadeStartOpacity:n=0,bottomFadeStartOpacity:r=0,startFadePx:s=0,endFadePx:a=0}){const l=[];return(e>0||t>0)&&l.push(`linear-gradient(to bottom, rgba(0, 0, 0, ${n}) 0px, black ${e}px, black calc(100% - ${t}px), rgba(0, 0, 0, ${r}) 100%)`),(s>0||a>0)&&l.push(`linear-gradient(to right, transparent 0px, black ${s}px, black calc(100% - ${a}px), transparent 100%)`),l.length===0?null:[XE.maskGeometry(l.length),XE.mask(l.join(", "))]}const gB=20;class bB{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),d=Math.round(s);return this._trackSize===a&&this._viewportSize===l&&this._scrollSize===c&&this._scrollPosition===d?!1:(this._trackSize=a,this._viewportSize=l,this._scrollSize=c,this._scrollPosition=d,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(gB,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 El=class El{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 bB,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}refresh(){this.scheduleSyncThumb()}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=OA(()=>this.scheduleSyncThumb()),this.resizeObserver!==null&&(this.resizeObserver.observe(this.viewport),this.content!==void 0&&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 d=(this.horizontal?c.clientX:c.clientY)-n,f=this.state.getScrollPositionFromThumbDelta(d,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=cv({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},El.WHEEL_GESTURE_RESET_MS),this.horizontalWheelAxisLock!=="x")return;if(r=cv({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(El.VERTICAL_THUMB_OFFSET_CSS_VAR),n=Number.parseFloat(t);return Number.isFinite(n)?Math.max(0,n):0}};El.VERTICAL_THUMB_OFFSET_CSS_VAR="--scrollbar-thumb-top-offset",El.WHEEL_GESTURE_RESET_MS=150;let th=El;const yB={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}},Qb={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}},Jb={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}},ec={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}},ey={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 vB(){return yB.base}function kB({direction:e}){return[Qb.base,e==="horizontal"?Qb.horizontal:null,e==="both"?Qb.both:null]}function xB(e){return[Jb.base,e==="horizontal"?Jb.horizontal:null,e==="both"?Jb.both:null]}function QE({direction:e,orientation:t,visibility:n}){return[ec.base,t==="horizontal"?ec.horizontal:null,e==="both"&&t==="vertical"?ec.bothVertical:null,e==="both"&&t==="horizontal"?ec.bothHorizontal:null,n==="never"?ec.visibilityNever:null]}function JE(e,t){return[ey.base,e==="horizontal"?ey.horizontal:null,t?ey.hoverHidden:null]}const SB=1e4,tc=5,lf=v.forwardRef(function({children:t,height:n,maxHeight:r,width:s,className:a,viewportClassName:l,rootStyle:c,viewportStyle:d,allowScrollChaining:f=!1,contentStyle:h,overlay:m,style:b,scrollbarVisibility:y=cB,isScrollbarRevealed:x=!1,direction:S="vertical",topFadeSize:E,bottomFadeSize:T,topFadeStartOpacity:R=0,bottomFadeStartOpacity:_=0,startFadeSize:C,endFadeSize:M,autoScrollToBottom:A=!1,scrollTrigger:N,autoScrollPauseTimeout:P=SB,onScrollStateChange:z,mapVerticalWheelToHorizontal:D=!1,scrollPadding:H=fB,scrollbarInset:W,onPointerEnter:F,onPointerLeave:L,...U},q){const Z=v.useRef(null),B=v.useRef(null),K=v.useRef(null),O=v.useRef(null),$=v.useRef(null),V=v.useRef(null),j=v.useRef(null),X=S!=="horizontal",se=S!=="vertical",re=D&&!X,[oe,ue]=v.useState(!1),[ce,ge]=v.useState(!1),[Ce,ae]=v.useState(!1),[ye,we]=v.useState(!1),[Ae,Ee]=v.useState(!1),xe=v.useRef(!1);xe.current=Ae;const De=v.useRef(0),Ie=v.useRef(0),je=v.useRef(null),Ue=v.useRef(null);v.useLayoutEffect(()=>{const _e=B.current,Se=K.current;if(!_e||!Se)return;const Ye=[];if(X){const Me=O.current,Pe=$.current;Me&&Pe&&Ye.push(new th({viewport:_e,content:Se,scrollbar:Me,thumb:Pe,direction:"vertical",mapVerticalWheelToHorizontal:re}))}if(se){const Me=V.current,Pe=j.current;Me&&Pe&&Ye.push(new th({viewport:_e,content:Se,scrollbar:Me,thumb:Pe,direction:"horizontal",mapVerticalWheelToHorizontal:re}))}if(Ye.length!==0){for(const Me of Ye)Me.attach();return()=>{for(const Me of Ye)Me.detach()}}},[X,se,re]);const ke=v.useCallback(()=>{const _e=B.current;return _e?{scrollTop:_e.scrollTop,scrollHeight:_e.scrollHeight,clientHeight:_e.clientHeight}:{scrollTop:0,scrollHeight:0,clientHeight:0}},[]),Te=v.useCallback((_e=!1)=>{const Se=B.current;Se&&Se.scrollTo({top:Se.scrollHeight,behavior:_e?"smooth":"instant"})},[]),te=v.useCallback((_e=!1)=>{const Se=B.current;Se&&Se.scrollTo({top:0,behavior:_e?"smooth":"instant"})},[]),fe=v.useCallback(()=>{Ue.current===null&&(Ue.current=requestAnimationFrame(()=>{Ue.current=null,!xe.current&&Te(!1)}))},[Te]),J=v.useCallback(()=>{A&&(xe.current||fe())},[A,fe]);v.useImperativeHandle(q,()=>({scrollToBottom:Te,scrollToTop:te,requestAutoScroll:J,getScrollPosition:ke,get rootElement(){return Z.current},get viewportElement(){return B.current}}),[Te,te,J,ke]);const ne=v.useCallback(()=>{const _e=B.current;if(!_e)return;const{scrollTop:Se,scrollHeight:Ye,clientHeight:Me}=_e,{isAtTop:Pe,isAtBottom:$e}=pB({scrollTop:Se,scrollHeight:Ye,clientHeight:Me,threshold:tc});ue(!Pe),ge(!$e);const{isAtStart:kt,isAtEnd:Ht}=hB({scrollLeft:_e.scrollLeft,scrollWidth:_e.scrollWidth,clientWidth:_e.clientWidth,threshold:tc});ae(!kt),we(!Ht),z?.({isAtBottom:$e,isAtTop:Pe}),$e&&xe.current&&(Ee(!1),je.current&&(clearTimeout(je.current),je.current=null));const bt=Ye<Ie.current-tc,Yt=Ye>Ie.current+tc,zn=Se<De.current-tc;zn&&!bt&&!$e&&A&&!xe.current&&(Ee(!0),je.current&&clearTimeout(je.current),je.current=setTimeout(()=>{Ee(!1),je.current=null},P)),Yt&&A&&!xe.current&&!$e&&!zn&&fe(),bt&&A&&!xe.current&&!$e&&fe(),De.current=Se,Ie.current=Ye},[z,A,P,fe]),be=uB(),Ge=v.useCallback(()=>{be.request(ne)},[be,ne]);v.useEffect(()=>{const _e=B.current,Se=K.current;if(!_e)return;const Ye=()=>{Ge()};_e.addEventListener("scroll",Ye,{passive:!0});const Me=OA(ne);return Me!==null&&(Me.observe(_e),Se&&Me.observe(Se)),()=>{_e.removeEventListener("scroll",Ye),Me?.disconnect(),be.dispose()}},[ne,Ge,be]),v.useEffect(()=>{N!==void 0&&A&&(xe.current||fe())},[N,A,fe]),v.useEffect(()=>{if(!X)return;const _e=B.current;if(!_e)return;const Se=Ye=>{const Me=Ye.deltaY;if(Me===0)return;const Pe=_e.scrollHeight-_e.clientHeight;if(Pe<=0)return;const $e=_e.scrollTop,kt=$e<=0&&Me<0,Ht=$e>=Pe-.5&&Me>0;kt||Ht||Ye.stopPropagation()};return _e.addEventListener("wheel",Se,{passive:!0}),()=>_e.removeEventListener("wheel",Se)},[X]),v.useEffect(()=>{if(!se)return;const _e=B.current;if(!_e)return;const Se=Me=>{const Pe=cv({deltaX:Me.deltaX,deltaY:Me.deltaY,mapVerticalWheelToHorizontal:re});if(Pe===null)return;const $e=_e.scrollWidth-_e.clientWidth;if($e<=0)return;const kt=_e.scrollLeft;if(!(Pe<0&&kt<=0)&&!(Pe>0&&kt>=$e-.5)){if(!re){Me.stopPropagation();return}Me.preventDefault(),_e.scrollLeft=kt+Pe}},Ye=re?{passive:!1,capture:!0}:{passive:!0,capture:!0};return _e.addEventListener("wheel",Se,Ye),()=>_e.removeEventListener("wheel",Se,Ye)},[se,re]);const Ze=E!==void 0||T!==void 0,Xe=C!==void 0||M!==void 0,vt=Ze||Xe,Je=Ze?E??24:0,mt=Ze?T??24:0,Tt=Xe?C??24:0,st=Xe?M??24:0,_t=y==="hover",[Ot,ot]=v.useState(!1);v.useLayoutEffect(()=>{_t&&ot(Z.current?.matches(":hover")??!1)},[_t]);const St=v.useCallback(_e=>{ot(!0),F?.(_e)},[F]),Pt=v.useCallback(_e=>{ot(!1),L?.(_e)},[L]),jt=_t&&!Ot&&!x;v.useEffect(()=>()=>{je.current&&clearTimeout(je.current),Ue.current!==null&&(cancelAnimationFrame(Ue.current),Ue.current=null)},[]);const Dt={"--scroll-area-scroll-padding":`${H}px`,...W!==void 0?{"--scrollbar-inset":`${W}px`}:void 0},Y=Lt({rootClass:"ui-scroll-area",stylexStyles:[vB(),c],className:bn(vt&&"ui-scroll-area--masked",a),style:{height:n,maxHeight:r,width:s,...Dt,...b}}),he=Lt({rootClass:"ui-scroll-area__viewport",stylexStyles:[kB({direction:S}),d,vt?mB({topFadePx:oe?Je:0,bottomFadePx:ce?mt:0,topFadeStartOpacity:R,bottomFadeStartOpacity:_,startFadePx:Ce?Tt:0,endFadePx:ye?st:0}):null],className:l,style:f?{overscrollBehavior:"auto"}:void 0}),Le=Lt({rootClass:"ui-scroll-area__content",stylexStyles:[xB(S),h]}),Qe=Lt({rootClass:"ui-scroll-area__scrollbar",stylexStyles:QE({direction:S,orientation:"vertical",visibility:y})}),wt=Ct(JE("vertical",jt)),lt=Lt({rootClass:"ui-scroll-area__scrollbar",stylexStyles:QE({direction:S,orientation:"horizontal",visibility:y})}),qe=Ct(JE("horizontal",jt));return g.jsxs("div",{ref:Z,className:Y.className,style:Y.style,"data-scroll-padding":H,"data-visibility":y,"data-direction":S,...U,onPointerEnter:_t?St:F,onPointerLeave:_t?Pt:L,children:[g.jsx("div",{ref:B,className:he.className,style:he.style,"data-native-scrollbar":"none",children:g.jsx("div",{ref:K,className:Le.className,style:Le.style,children:t})}),m,X&&g.jsx("div",{ref:O,className:Qe.className,style:Qe.style,"data-orientation":"vertical","data-scrollable":"false",role:"presentation","aria-hidden":"true",children:g.jsx("div",{ref:$,className:wt.className,style:wt.style,"data-orientation":"vertical"})}),se&&g.jsx("div",{ref:V,className:lt.className,style:lt.style,"data-orientation":"horizontal","data-scrollable":"false",role:"presentation","aria-hidden":"true",children:g.jsx("div",{ref:j,className:qe.className,style:qe.style,"data-orientation":"horizontal"})})]})}),ty={root:{kzQI83:"ui-1iyjqo2",kmuXW:"ui-s83m0k",kCS8Yb:"ui-dl72j9",kAzted:"ui-2lwn1j",k7Eaqz:"ui-euugli",$$css:!0},rootHidden:{k1xSpc:"ui-1s85apg",$$css:!0},viewport:{kaPefq:"ui-1uzft2t",k9lH4S:"ui-pt7jon",$$css:!0}};function wB({children:e,hidden:t=!1,ref:n}){return g.jsx(lf,{ref:n,"data-component":"list-popup-scroll",maxHeight:"none",rootStyle:[ty.root,t&&ty.rootHidden],viewportStyle:ty.viewport,children:e})}const Xh="top",Uk=300,Qh=100;function EB(e){const[t,n="center"]=e.split("-");return{side:t,align:n}}function TB(e){return typeof e=="number"?{sideOffset:e}:{sideOffset:e.mainAxis,alignOffset:e.alignmentAxis}}function _B(e){return e?{side:"flip",align:"shift",fallbackAxisSide:"none"}:{side:"flip",align:"shift",fallbackAxisSide:"start"}}function Jh(e,t,n){const{side:r,align:s}=v.useMemo(()=>EB(e),[e]),{sideOffset:a,alignOffset:l}=v.useMemo(()=>TB(t),[t]),c=v.useMemo(()=>_B(n),[n]);return{side:r,align:s,sideOffset:a,alignOffset:l,collisionAvoidance:c,positionMethod:"fixed"}}const RB=v.forwardRef(function(t,n){const{render:r,className:s,id:a,name:l,value:c,disabled:d=!1,onValueChange:f,defaultValue:h,autoFocus:m=!1,style:b,...y}=t,{state:x,name:S,disabled:E,setTouched:T,setDirty:R,validityData:_,setFocused:C,setFilled:M,validationMode:A,validation:N}=Wh(),{clearErrors:P}=dA(),z=E||d,D=S??l,H={...x,disabled:z},{labelId:W}=Dk(),F=jk({id:a});He(()=>{const O=c!=null;N.inputRef.current?.value||O&&c!==""?M(!0):O&&c===""&&M(!1)},[N.inputRef,M,c]);const L=v.useRef(null);He(()=>{m&&L.current===mr(Kt(L.current))&&C(!0)},[m,C]);const[U]=Ll({controlled:c,default:h,name:"FieldControl",state:"value"}),q=c!==void 0,Z=q?U:void 0,B=Ke(()=>N.inputRef.current?.value);return fA(N.inputRef,F,Z,B,!z,l),mn("input",t,{ref:[n,L],state:H,props:[{id:F,disabled:z,name:D,ref:N.inputRef,"aria-labelledby":W,autoFocus:m,...q?{value:Z}:{defaultValue:h},onChange(O){const $=O.currentTarget.value;f?.($,Et(Ii,O.nativeEvent)),R($!==_.initialValue),M($!==""),O.nativeEvent.defaultPrevented||(P(D),N.change($))},onFocus(){C(!0)},onBlur(O){T(!0),C(!1),A==="onBlur"&&N.commit(O.currentTarget.value)},onKeyDown(O){O.currentTarget.tagName==="INPUT"&&O.key==="Enter"&&(T(!0),N.commit(O.currentTarget.value))}},y,O=>N.getValidationProps(z,O)],stateAttributesMapping:af})}),CB=v.forwardRef(function(t,n){return g.jsx(RB,{ref:n,...t})});var NB=["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] *)"],nh=NB.join(","),IA=typeof Element>"u",Pl=IA?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,rh=!IA&&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},ih=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]"):ih(t.parentNode));return l},AB=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},MA=function(t,n,r){if(ih(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(nh));return n&&Pl.call(t,nh)&&s.unshift(t),s=s.filter(r),s},sh=function(t,n,r){for(var s=[],a=Array.from(t);a.length;){var l=a.shift();if(!ih(l,!1))if(l.tagName==="SLOT"){var c=l.assignedElements(),d=c.length?c:l.children,f=sh(d,!0,r);r.flatten?s.push.apply(s,f):s.push({scopeParent:l,candidates:f})}else{var h=Pl.call(l,nh);h&&r.filter(l)&&(n||!t.includes(l))&&s.push(l);var m=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),b=!ih(m,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(m&&b){var y=sh(m===!0?l.children:m.children,!0,r);r.flatten?s.push.apply(s,y):s.push({scopeParent:l,candidates:y})}else a.unshift.apply(a,l.children)}}return s},DA=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},zA=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||AB(t))&&!DA(t)?0:t.tabIndex},OB=function(t,n){var r=zA(t);return r<0&&n&&!DA(t)?0:r},IB=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},jA=function(t){return t.tagName==="INPUT"},MB=function(t){return jA(t)&&t.type==="hidden"},DB=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},zB=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},jB=function(t){if(!t.name)return!0;var n=t.form||rh(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=zB(s,t.form);return!a||a===t},LB=function(t){return jA(t)&&t.type==="radio"},PB=function(t){return LB(t)&&!jB(t)},$B=function(t){var n,r=t&&rh(t),s=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var l,c,d;for(a=!!((l=s)!==null&&l!==void 0&&(c=l.ownerDocument)!==null&&c!==void 0&&c.contains(s)||t!=null&&(d=t.ownerDocument)!==null&&d!==void 0&&d.contains(t));!a&&s;){var f,h,m;r=rh(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},eT=function(t){var n=t.getBoundingClientRect(),r=n.width,s=n.height;return r===0&&s===0},BB=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=Pl.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(Pl.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof s=="function"){for(var d=t;t;){var f=t.parentElement,h=rh(t);if(f&&!f.shadowRoot&&s(f)===!0)return eT(t);t.assignedSlot?t=t.assignedSlot:!f&&h!==t.ownerDocument?t=h.host:t=f}t=d}if($B(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return eT(t);return!1},FB=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 Pl.call(n,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}n=n.parentElement}return!1},fv=function(t,n){return!(n.disabled||MB(n)||BB(n,t)||DB(n)||FB(n))},dv=function(t,n){return!(PB(n)||zA(n)<0||!fv(t,n))},UB=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},LA=function(t){var n=[],r=[];return t.forEach(function(s,a){var l=!!s.scopeParent,c=l?s.scopeParent:s,d=OB(c,l),f=l?LA(s.candidates):c;d===0?l?n.push.apply(n,f):n.push(c):r.push({documentOrder:a,tabIndex:d,item:s,isScope:l,content:f})}),r.sort(IB).reduce(function(s,a){return a.isScope?s.push.apply(s,a.content):s.push(a.content),s},[]).concat(n)},em=function(t,n){n=n||{};var r;return n.getShadowRoot?r=sh([t],n.includeContainer,{filter:dv.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:UB}):r=MA(t,n.includeContainer,dv.bind(null,n)),LA(r)},qB=function(t,n){n=n||{};var r;return n.getShadowRoot?r=sh([t],n.includeContainer,{filter:fv.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=MA(t,n.includeContainer,fv.bind(null,n)),r},PA=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Pl.call(t,nh)===!1?!1:dv(n,t)};function HB(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function $A(){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 GB(){return/apple/i.test(navigator.vendor)}function pv(){const e=/android/i;return e.test(HB())||e.test($A())}function VB(){return $A().includes("jsdom/")}const tT="data-floating-ui-focusable",WB="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",ny="ArrowLeft",ry="ArrowRight",KB="ArrowUp",ZB="ArrowDown";function co(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 Er(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&vo(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function fo(e){return"composedPath"in e?e.composedPath()[0]:e.target}function iy(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 YB(e){return e.matches("html,body")}function gr(e){return e?.ownerDocument||document}function BA(e){return Bt(e)&&e.matches(WB)}function hv(e){return e?e.getAttribute("role")==="combobox"&&BA(e):!1}function oh(e){return e?e.hasAttribute(tT)?e:e.querySelector("["+tT+"]")||e:null}function ra(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,...ra(e,s.id,n)])}function XB(e,t){let n,r=-1;function s(a,l){l>r&&(n=a,r=l),ra(e,a).forEach(d=>{s(d.id,l+1)})}return s(t,0),e.find(a=>a.id===n)}function nT(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 ur(e){e.preventDefault(),e.stopPropagation()}function QB(e){return"nativeEvent"in e}function FA(e){return e.mozInputSource===0&&e.isTrusted?!0:pv()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function UA(e){return VB()?!1:!pv()&&e.width===0&&e.height===0||pv()&&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 Mc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var JB=typeof document<"u",e9=function(){},hn=JB?v.useLayoutEffect:e9;const t9={...tk};function rr(e){const t=v.useRef(e);return hn(()=>{t.current=e}),t}const n9=t9.useInsertionEffect,r9=n9||(e=>e());function Fn(e){const t=v.useRef(()=>{});return r9(()=>{t.current=e}),v.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 Wd(e,t,n){return Math.floor(e/t)!==n}function Sc(e,t){return t<0||t>=e.current.length}function sy(e,t){return hr(e,{disabledIndices:t})}function rT(e,t){return hr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function hr(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&&Mp(e,l,s));return l}function i9(e,t){let{event:n,orientation:r,loop:s,rtl:a,cols:l,disabledIndices:c,minIndex:d,maxIndex:f,prevIndex:h,stopEvent:m=!1}=t,b=h;if(n.key===KB){if(m&&ur(n),h===-1)b=f;else if(b=hr(e,{startingIndex:b,amount:l,decrement:!0,disabledIndices:c}),s&&(h-l<d||b<0)){const y=h%l,x=f%l,S=f-(x-y);x===y?b=f:b=x>y?S:S-l}Sc(e,b)&&(b=h)}if(n.key===ZB&&(m&&ur(n),h===-1?b=d:(b=hr(e,{startingIndex:h,amount:l,disabledIndices:c}),s&&h+l>f&&(b=hr(e,{startingIndex:h%l-l,amount:l,disabledIndices:c}))),Sc(e,b)&&(b=h)),r==="both"){const y=kl(h/l);n.key===(a?ny:ry)&&(m&&ur(n),h%l!==l-1?(b=hr(e,{startingIndex:h,disabledIndices:c}),s&&Wd(b,l,y)&&(b=hr(e,{startingIndex:h-h%l-1,disabledIndices:c}))):s&&(b=hr(e,{startingIndex:h-h%l-1,disabledIndices:c})),Wd(b,l,y)&&(b=h)),n.key===(a?ry:ny)&&(m&&ur(n),h%l!==0?(b=hr(e,{startingIndex:h,decrement:!0,disabledIndices:c}),s&&Wd(b,l,y)&&(b=hr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c}))):s&&(b=hr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c})),Wd(b,l,y)&&(b=h));const x=kl(f/l)===y;Sc(e,b)&&(s&&x?b=n.key===(a?ry:ny)?f:hr(e,{startingIndex:h-h%l-1,disabledIndices:c}):b=h)}return b}function s9(e,t,n){const r=[];let s=0;return e.forEach((a,l)=>{let{width:c,height:d}=a,f=!1;for(n&&(s=0);!f;){const h=[];for(let m=0;m<c;m++)for(let b=0;b<d;b++)h.push(s+m+b*t);s%t+c<=t&&h.every(m=>r[m]==null)?(h.forEach(m=>{r[m]=l}),f=!0):s++}}),[...r]}function o9(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 a9(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Mp(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 uf=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function qA(e,t){const n=em(e,uf()),r=n.length;if(r===0)return;const s=co(gr(e)),a=n.indexOf(s),l=a===-1?t===1?0:r-1:a+t;return n[l]}function HA(e){return qA(gr(e).body,1)||e}function GA(e){return qA(gr(e).body,-1)||e}function wc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Er(n,r)}function l9(e){em(e,uf()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function iT(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 cf(e){const t=v.useRef(void 0),n=v.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 v.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function u9(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 VA=v.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function WA(e){const{children:t,elementsRef:n,labelsRef:r}=e,[s,a]=v.useState(()=>new Set),l=v.useCallback(f=>{a(h=>new Set(h).add(f))},[]),c=v.useCallback(f=>{a(h=>{const m=new Set(h);return m.delete(f),m})},[]),d=v.useMemo(()=>{const f=new Map;return Array.from(s.keys()).sort(u9).forEach((m,b)=>{f.set(m,b)}),f},[s]);return g.jsx(VA.Provider,{value:v.useMemo(()=>({register:l,unregister:c,map:d,elementsRef:n,labelsRef:r}),[l,c,d,n,r]),children:t})}function tm(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:s,elementsRef:a,labelsRef:l}=v.useContext(VA),[c,d]=v.useState(null),f=v.useRef(null),h=v.useCallback(m=>{if(f.current=m,c!==null&&(a.current[c]=m,l)){var b;const y=t!==void 0;l.current[c]=y?t:(b=m?.textContent)!=null?b:null}},[c,a,l,t]);return hn(()=>{const m=f.current;if(m)return n(m),()=>{r(m)}},[n,r]),hn(()=>{const m=f.current?s.get(f.current):null;m!=null&&d(m)},[s]),v.useMemo(()=>({ref:h,index:c??-1}),[c,h])}const c9="data-floating-ui-focusable",sT="active",oT="selected",ff="ArrowLeft",df="ArrowRight",KA="ArrowUp",nm="ArrowDown",f9={...tk};let aT=!1,d9=0;const lT=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+d9++;function p9(){const[e,t]=v.useState(()=>aT?lT():void 0);return hn(()=>{e==null&&t(lT())},[]),v.useEffect(()=>{aT=!0},[]),e}const h9=f9.useId,rm=h9||p9;function ZA(){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 YA=v.createContext(null),XA=v.createContext(null),_o=()=>{var e;return((e=v.useContext(YA))==null?void 0:e.id)||null},Ro=()=>v.useContext(XA);function qk(e){const t=rm(),n=Ro(),s=_o();return hn(()=>{if(!t)return;const a={id:t,parentId:s};return n?.addNode(a),()=>{n?.removeNode(a)}},[n,t,s]),t}function Hk(e){const{children:t,id:n}=e,r=_o();return g.jsx(YA.Provider,{value:v.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function m9(e){const{children:t}=e,n=v.useRef([]),r=v.useCallback(l=>{n.current=[...n.current,l]},[]),s=v.useCallback(l=>{n.current=n.current.filter(c=>c!==l)},[]),[a]=v.useState(()=>ZA());return g.jsx(XA.Provider,{value:v.useMemo(()=>({nodesRef:n,addNode:r,removeNode:s,events:a}),[r,s,a]),children:t})}function $l(e){return"data-floating-ui-"+e}function pr(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const uT=$l("safe-polygon");function oy(e,t,n){if(n&&!Mc(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 ay(e){return typeof e=="function"?e():e}function QA(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,events:a,elements:l}=e,{enabled:c=!0,delay:d=0,handleClose:f=null,mouseOnly:h=!1,restMs:m=0,move:b=!0}=t,y=Ro(),x=_o(),S=rr(f),E=rr(d),T=rr(n),R=rr(m),_=v.useRef(),C=v.useRef(-1),M=v.useRef(),A=v.useRef(-1),N=v.useRef(!0),P=v.useRef(!1),z=v.useRef(()=>{}),D=v.useRef(!1),H=Fn(()=>{var Z;const B=(Z=s.current.openEvent)==null?void 0:Z.type;return B?.includes("mouse")&&B!=="mousedown"});v.useEffect(()=>{if(!c)return;function Z(B){let{open:K}=B;K||(pr(C),pr(A),N.current=!0,D.current=!1)}return a.on("openchange",Z),()=>{a.off("openchange",Z)}},[c,a]),v.useEffect(()=>{if(!c||!S.current||!n)return;function Z(K){H()&&r(!1,K,"hover")}const B=gr(l.floating).documentElement;return B.addEventListener("mouseleave",Z),()=>{B.removeEventListener("mouseleave",Z)}},[l.floating,n,r,c,S,H]);const W=v.useCallback(function(Z,B,K){B===void 0&&(B=!0),K===void 0&&(K="hover");const O=oy(E.current,"close",_.current);O&&!M.current?(pr(C),C.current=window.setTimeout(()=>r(!1,Z,K),O)):B&&(pr(C),r(!1,Z,K))},[E,r]),F=Fn(()=>{z.current(),M.current=void 0}),L=Fn(()=>{if(P.current){const Z=gr(l.floating).body;Z.style.pointerEvents="",Z.removeAttribute(uT),P.current=!1}}),U=Fn(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);v.useEffect(()=>{if(!c)return;function Z(V){if(pr(C),N.current=!1,h&&!Mc(_.current)||ay(R.current)>0&&!oy(E.current,"open"))return;const j=oy(E.current,"open",_.current);j?C.current=window.setTimeout(()=>{T.current||r(!0,V,"hover")},j):n||r(!0,V,"hover")}function B(V){if(U()){L();return}z.current();const j=gr(l.floating);if(pr(A),D.current=!1,S.current&&s.current.floatingContext){n||pr(C),M.current=S.current({...s.current.floatingContext,tree:y,x:V.clientX,y:V.clientY,onClose(){L(),F(),U()||W(V,!0,"safe-polygon")}});const se=M.current;j.addEventListener("mousemove",se),z.current=()=>{j.removeEventListener("mousemove",se)};return}(_.current!=="touch"||!Er(l.floating,V.relatedTarget))&&W(V)}function K(V){U()||s.current.floatingContext&&(S.current==null||S.current({...s.current.floatingContext,tree:y,x:V.clientX,y:V.clientY,onClose(){L(),F(),U()||W(V)}})(V))}function O(){pr(C)}function $(V){U()||W(V,!1)}if(ft(l.domReference)){const V=l.domReference,j=l.floating;return n&&V.addEventListener("mouseleave",K),b&&V.addEventListener("mousemove",Z,{once:!0}),V.addEventListener("mouseenter",Z),V.addEventListener("mouseleave",B),j&&(j.addEventListener("mouseleave",K),j.addEventListener("mouseenter",O),j.addEventListener("mouseleave",$)),()=>{n&&V.removeEventListener("mouseleave",K),b&&V.removeEventListener("mousemove",Z),V.removeEventListener("mouseenter",Z),V.removeEventListener("mouseleave",B),j&&(j.removeEventListener("mouseleave",K),j.removeEventListener("mouseenter",O),j.removeEventListener("mouseleave",$))}}},[l,c,e,h,b,W,F,L,r,n,T,y,E,S,s,U,R]),hn(()=>{var Z;if(c&&n&&(Z=S.current)!=null&&(Z=Z.__options)!=null&&Z.blockPointerEvents&&H()){P.current=!0;const K=l.floating;if(ft(l.domReference)&&K){var B;const O=gr(l.floating).body;O.setAttribute(uT,"");const $=l.domReference,V=y==null||(B=y.nodesRef.current.find(j=>j.id===x))==null||(B=B.context)==null?void 0:B.elements.floating;return V&&(V.style.pointerEvents=""),O.style.pointerEvents="none",$.style.pointerEvents="auto",K.style.pointerEvents="auto",()=>{O.style.pointerEvents="",$.style.pointerEvents="",K.style.pointerEvents=""}}}},[c,n,x,l,y,S,H]),hn(()=>{n||(_.current=void 0,D.current=!1,F(),L())},[n,F,L]),v.useEffect(()=>()=>{F(),pr(C),pr(A),L()},[c,l.domReference,F,L]);const q=v.useMemo(()=>{function Z(B){_.current=B.pointerType}return{onPointerDown:Z,onPointerEnter:Z,onMouseMove(B){const{nativeEvent:K}=B;function O(){!N.current&&!T.current&&r(!0,K,"hover")}h&&!Mc(_.current)||n||ay(R.current)===0||D.current&&B.movementX**2+B.movementY**2<2||(pr(A),_.current==="touch"?O():(D.current=!0,A.current=window.setTimeout(O,ay(R.current))))}}},[h,r,n,T,R]);return v.useMemo(()=>c?{reference:q}:{},[c,q])}let cT=0;function Jo(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=t;r&&cancelAnimationFrame(cT);const a=()=>e?.focus({preventScroll:n});s?a():cT=requestAnimationFrame(a)}function ly(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&vo(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function g9(e){return"composedPath"in e?e.composedPath()[0]:e.target}function b9(e){return e?.ownerDocument||document}const _l={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function fT(e){return e==="inert"?_l.inert:e==="aria-hidden"?_l["aria-hidden"]:_l.none}let Kd=new WeakSet,Zd={},uy=0;const y9=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,JA=e=>e&&(e.host||JA(e.parentNode)),v9=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=JA(n);return e.contains(r)?r:null}).filter(n=>n!=null);function k9(e,t,n,r){const s="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,l=v9(t,e),c=new Set,d=new Set(l),f=[];Zd[s]||(Zd[s]=new WeakMap);const h=Zd[s];l.forEach(m),b(t),c.clear();function m(y){!y||c.has(y)||(c.add(y),y.parentNode&&m(y.parentNode))}function b(y){!y||d.has(y)||[].forEach.call(y.children,x=>{if(er(x)!=="script")if(c.has(x))b(x);else{const S=a?x.getAttribute(a):null,E=S!==null&&S!=="false",T=fT(a),R=(T.get(x)||0)+1,_=(h.get(x)||0)+1;T.set(x,R),h.set(x,_),f.push(x),R===1&&E&&Kd.add(x),_===1&&x.setAttribute(s,""),!E&&a&&x.setAttribute(a,a==="inert"?"":"true")}})}return uy++,()=>{f.forEach(y=>{const x=fT(a),E=(x.get(y)||0)-1,T=(h.get(y)||0)-1;x.set(y,E),h.set(y,T),E||(!Kd.has(y)&&a&&y.removeAttribute(a),Kd.delete(y)),T||y.removeAttribute(s)}),uy--,uy||(_l.inert=new WeakMap,_l["aria-hidden"]=new WeakMap,_l.none=new WeakMap,Kd=new WeakSet,Zd={})}}function dT(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=b9(e[0]).body;return k9(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const im={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},ah=v.forwardRef(function(t,n){const[r,s]=v.useState();hn(()=>{GB()&&s("button")},[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[$l("focus-guard")]:"",style:im};return g.jsx("span",{...t,...a})}),eO=v.createContext(null),pT=$l("portal");function x9(e){e===void 0&&(e={});const{id:t,root:n}=e,r=rm(),s=tO(),[a,l]=v.useState(null),c=v.useRef(null);return hn(()=>()=>{a?.remove(),queueMicrotask(()=>{c.current=null})},[a]),hn(()=>{if(!r||c.current)return;const d=t?document.getElementById(t):null;if(!d)return;const f=document.createElement("div");f.id=r,f.setAttribute(pT,""),d.appendChild(f),c.current=f,l(f)},[t,r]),hn(()=>{if(n===null||!r||c.current)return;let d=n||s?.portalNode;d&&!Nh(d)&&(d=d.current),d=d||document.body;let f=null;t&&(f=document.createElement("div"),f.id=t,d.appendChild(f));const h=document.createElement("div");h.id=r,h.setAttribute(pT,""),d=f||d,d.appendChild(h),c.current=h,l(h)},[t,n,r,s]),a}function Gk(e){const{children:t,id:n,root:r,preserveTabOrder:s=!0}=e,a=x9({id:n,root:r}),[l,c]=v.useState(null),d=v.useRef(null),f=v.useRef(null),h=v.useRef(null),m=v.useRef(null),b=l?.modal,y=l?.open,x=!!l&&!l.modal&&l.open&&s&&!!(r||a);return v.useEffect(()=>{if(!a||!s||b)return;function S(E){a&&wc(E)&&(E.type==="focusin"?iT:l9)(a)}return a.addEventListener("focusin",S,!0),a.addEventListener("focusout",S,!0),()=>{a.removeEventListener("focusin",S,!0),a.removeEventListener("focusout",S,!0)}},[a,s,b]),v.useEffect(()=>{a&&(y||iT(a))},[y,a]),g.jsxs(eO.Provider,{value:v.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:h,afterInsideRef:m,portalNode:a,setFocusManagerState:c}),[s,a]),children:[x&&a&&g.jsx(ah,{"data-type":"outside",ref:d,onFocus:S=>{if(wc(S,a)){var E;(E=h.current)==null||E.focus()}else{const T=l?l.domReference:null,R=GA(T);R?.focus()}}}),x&&a&&g.jsx("span",{"aria-owns":a.id,style:im}),a&&zi.createPortal(t,a),x&&a&&g.jsx(ah,{"data-type":"outside",ref:f,onFocus:S=>{if(wc(S,a)){var E;(E=m.current)==null||E.focus()}else{const T=l?l.domReference:null,R=HA(T);R?.focus(),l?.closeOnFocusOut&&l?.onOpenChange(!1,S.nativeEvent,"focus-out")}}})]})}const tO=()=>v.useContext(eO);function hT(e){return v.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const S9=20;let ho=[];function Vk(){ho=ho.filter(e=>e.isConnected)}function w9(e){Vk(),e&&er(e)!=="body"&&(ho.push(e),ho.length>S9&&(ho=ho.slice(-20)))}function mT(){return Vk(),ho[ho.length-1]}function E9(e){const t=uf();return PA(e,t)?e:em(e,t)[0]||e}function gT(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=uf(),a=qB(e,r).filter(c=>{const d=c.getAttribute("data-tabindex")||"";return PA(c,r)||c.hasAttribute("data-tabindex")&&!d.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 T9=v.forwardRef(function(t,n){return g.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:im})});function Wk(e){const{context:t,children:n,disabled:r=!1,order:s=["content"],guards:a=!0,initialFocus:l=0,returnFocus:c=!0,restoreFocus:d=!1,modal:f=!0,visuallyHiddenDismiss:h=!1,closeOnFocusOut:m=!0,outsideElementsInert:b=!1,getInsideElements:y=()=>[]}=e,{open:x,onOpenChange:S,events:E,dataRef:T,elements:{domReference:R,floating:_}}=t,C=Fn(()=>{var ae;return(ae=T.current.floatingContext)==null?void 0:ae.nodeId}),M=Fn(y),A=typeof l=="number"&&l<0,N=hv(R)&&A,P=y9(),z=P?a:!0,D=!z||P&&b,H=rr(s),W=rr(l),F=rr(c),L=Ro(),U=tO(),q=v.useRef(null),Z=v.useRef(null),B=v.useRef(!1),K=v.useRef(!1),O=v.useRef(-1),$=v.useRef(-1),V=U!=null,j=oh(_),X=Fn(function(ae){return ae===void 0&&(ae=j),ae?em(ae,uf()):[]}),se=Fn(ae=>{const ye=X(ae);return H.current.map(we=>R&&we==="reference"?R:j&&we==="floating"?j:ye).filter(Boolean).flat()});v.useEffect(()=>{if(r||!f)return;function ae(we){if(we.key==="Tab"){Er(j,co(gr(j)))&&X().length===0&&!N&&ur(we);const Ae=se(),Ee=fo(we);H.current[0]==="reference"&&Ee===R&&(ur(we),we.shiftKey?Jo(Ae[Ae.length-1]):Jo(Ae[1])),H.current[1]==="floating"&&Ee===j&&we.shiftKey&&(ur(we),Jo(Ae[0]))}}const ye=gr(j);return ye.addEventListener("keydown",ae),()=>{ye.removeEventListener("keydown",ae)}},[r,R,j,f,H,N,X,se]),v.useEffect(()=>{if(r||!_)return;function ae(ye){const we=fo(ye),Ee=X().indexOf(we);Ee!==-1&&(O.current=Ee)}return _.addEventListener("focusin",ae),()=>{_.removeEventListener("focusin",ae)}},[r,_,X]),v.useEffect(()=>{if(r||!m)return;function ae(){K.current=!0,setTimeout(()=>{K.current=!1})}function ye(Ee){const xe=Ee.relatedTarget,De=Ee.currentTarget,Ie=fo(Ee);queueMicrotask(()=>{const je=C(),Ue=!(Er(R,xe)||Er(_,xe)||Er(xe,_)||Er(U?.portalNode,xe)||xe!=null&&xe.hasAttribute($l("focus-guard"))||L&&(ra(L.nodesRef.current,je).find(ke=>{var Te,te;return Er((Te=ke.context)==null?void 0:Te.elements.floating,xe)||Er((te=ke.context)==null?void 0:te.elements.domReference,xe)})||nT(L.nodesRef.current,je).find(ke=>{var Te,te,fe;return[(Te=ke.context)==null?void 0:Te.elements.floating,oh((te=ke.context)==null?void 0:te.elements.floating)].includes(xe)||((fe=ke.context)==null?void 0:fe.elements.domReference)===xe})));if(De===R&&j&&gT(j,H),d&&De!==R&&!(Ie!=null&&Ie.isConnected)&&co(gr(j))===gr(j).body){Bt(j)&&j.focus();const ke=O.current,Te=X(),te=Te[ke]||Te[Te.length-1]||j;Bt(te)&&te.focus()}if(T.current.insideReactTree){T.current.insideReactTree=!1;return}(N||!f)&&xe&&Ue&&!K.current&&xe!==mT()&&(B.current=!0,S(!1,Ee,"focus-out"))})}const we=!!(!L&&U);function Ae(){pr($),T.current.insideReactTree=!0,$.current=window.setTimeout(()=>{T.current.insideReactTree=!1})}if(_&&Bt(R))return R.addEventListener("focusout",ye),R.addEventListener("pointerdown",ae),_.addEventListener("focusout",ye),we&&_.addEventListener("focusout",Ae,!0),()=>{R.removeEventListener("focusout",ye),R.removeEventListener("pointerdown",ae),_.removeEventListener("focusout",ye),we&&_.removeEventListener("focusout",Ae,!0)}},[r,R,_,j,f,L,U,S,m,d,X,N,C,H,T]);const re=v.useRef(null),oe=v.useRef(null),ue=hT([re,U?.beforeInsideRef]),ce=hT([oe,U?.afterInsideRef]);v.useEffect(()=>{var ae,ye;if(r||!_)return;const we=Array.from((U==null||(ae=U.portalNode)==null?void 0:ae.querySelectorAll("["+$l("portal")+"]"))||[]),Ee=(ye=(L?nT(L.nodesRef.current,C()):[]).find(Ie=>{var je;return hv(((je=Ie.context)==null?void 0:je.elements.domReference)||null)}))==null||(ye=ye.context)==null?void 0:ye.elements.domReference,xe=[_,Ee,...we,...M(),q.current,Z.current,re.current,oe.current,U?.beforeOutsideRef.current,U?.afterOutsideRef.current,H.current.includes("reference")||N?R:null].filter(Ie=>Ie!=null),De=f||N?dT(xe,!D,D):dT(xe);return()=>{De()}},[r,R,_,f,H,U,N,z,D,L,C,M]),hn(()=>{if(r||!Bt(j))return;const ae=gr(j),ye=co(ae);queueMicrotask(()=>{const we=se(j),Ae=W.current,Ee=(typeof Ae=="number"?we[Ae]:Ae.current)||j,xe=Er(j,ye);!A&&!xe&&x&&Jo(Ee,{preventScroll:Ee===j})})},[r,x,j,A,se,W]),hn(()=>{if(r||!j)return;const ae=gr(j),ye=co(ae);w9(ye);function we(xe){let{reason:De,event:Ie,nested:je}=xe;if(["hover","safe-polygon"].includes(De)&&Ie.type==="mouseleave"&&(B.current=!0),De==="outside-press")if(je)B.current=!1;else if(FA(Ie)||UA(Ie))B.current=!1;else{let Ue=!1;document.createElement("div").focus({get preventScroll(){return Ue=!0,!1}}),Ue?B.current=!1:B.current=!0}}E.on("openchange",we);const Ae=ae.createElement("span");Ae.setAttribute("tabindex","-1"),Ae.setAttribute("aria-hidden","true"),Object.assign(Ae.style,im),V&&R&&R.insertAdjacentElement("afterend",Ae);function Ee(){if(typeof F.current=="boolean"){const xe=R||mT();return xe&&xe.isConnected?xe:Ae}return F.current.current||Ae}return()=>{E.off("openchange",we);const xe=co(ae),De=Er(_,xe)||L&&ra(L.nodesRef.current,C(),!1).some(je=>{var Ue;return Er((Ue=je.context)==null?void 0:Ue.elements.floating,xe)}),Ie=Ee();queueMicrotask(()=>{const je=E9(Ie);F.current&&!B.current&&Bt(je)&&(!(je!==xe&&xe!==ae.body)||De)&&je.focus({preventScroll:!0}),Ae.remove()})}},[r,_,j,F,T,E,L,V,R,C]),v.useEffect(()=>(queueMicrotask(()=>{B.current=!1}),()=>{queueMicrotask(Vk)}),[r]),hn(()=>{if(!r&&U)return U.setFocusManagerState({modal:f,closeOnFocusOut:m,open:x,onOpenChange:S,domReference:R}),()=>{U.setFocusManagerState(null)}},[r,U,f,x,S,m,R]),hn(()=>{r||j&&gT(j,H)},[r,j,H]);function ge(ae){return r||!h||!f?null:g.jsx(T9,{ref:ae==="start"?q:Z,onClick:ye=>S(!1,ye.nativeEvent),children:typeof h=="string"?h:"Dismiss"})}const Ce=!r&&z&&(f?!N:!0)&&(V||f);return g.jsxs(g.Fragment,{children:[Ce&&g.jsx(ah,{"data-type":"inside",ref:ue,onFocus:ae=>{if(f){const we=se();Jo(s[0]==="reference"?we[0]:we[we.length-1])}else if(U!=null&&U.preserveTabOrder&&U.portalNode)if(B.current=!1,wc(ae,U.portalNode)){const we=HA(R);we?.focus()}else{var ye;(ye=U.beforeOutsideRef.current)==null||ye.focus()}}}),!N&&ge("start"),n,ge("end"),Ce&&g.jsx(ah,{"data-type":"inside",ref:ce,onFocus:ae=>{if(f)Jo(se()[0]);else if(U!=null&&U.preserveTabOrder&&U.portalNode)if(m&&(B.current=!0),wc(ae,U.portalNode)){const we=GA(R);we?.focus()}else{var ye;(ye=U.afterOutsideRef.current)==null||ye.focus()}}})]})}function bT(e){return Bt(e.target)&&e.target.tagName==="BUTTON"}function _9(e){return Bt(e.target)&&e.target.tagName==="A"}function yT(e){return BA(e)}function nO(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,elements:{domReference:a}}=e,{enabled:l=!0,event:c="click",toggle:d=!0,ignoreMouse:f=!1,keyboardHandlers:h=!0,stickIfOpen:m=!0}=t,b=v.useRef(),y=v.useRef(!1),x=v.useMemo(()=>({onPointerDown(S){b.current=S.pointerType},onMouseDown(S){const E=b.current;S.button===0&&c!=="click"&&(Mc(E,!0)&&f||(n&&d&&(!(s.current.openEvent&&m)||s.current.openEvent.type==="mousedown")?r(!1,S.nativeEvent,"click"):(S.preventDefault(),r(!0,S.nativeEvent,"click"))))},onClick(S){const E=b.current;if(c==="mousedown"&&b.current){b.current=void 0;return}Mc(E,!0)&&f||(n&&d&&(!(s.current.openEvent&&m)||s.current.openEvent.type==="click")?r(!1,S.nativeEvent,"click"):r(!0,S.nativeEvent,"click"))},onKeyDown(S){b.current=void 0,!(S.defaultPrevented||!h||bT(S))&&(S.key===" "&&!yT(a)&&(S.preventDefault(),y.current=!0),!_9(S)&&S.key==="Enter"&&r(!(n&&d),S.nativeEvent,"click"))},onKeyUp(S){S.defaultPrevented||!h||bT(S)||yT(a)||S.key===" "&&y.current&&(y.current=!1,r(!(n&&d),S.nativeEvent,"click"))}}),[s,a,c,f,h,r,n,m,d]);return v.useMemo(()=>l?{reference:x}:{},[l,x])}const R9={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},C9={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},vT=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 rO(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:s,dataRef:a}=e,{enabled:l=!0,escapeKey:c=!0,outsidePress:d=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:b=!1,bubbles:y,capture:x}=t,S=Ro(),E=Fn(typeof d=="function"?d:()=>!1),T=typeof d=="function"?E:d,R=v.useRef(!1),{escapeKey:_,outsidePress:C}=vT(y),{escapeKey:M,outsidePress:A}=vT(x),N=v.useRef(!1),P=Fn(L=>{var U;if(!n||!l||!c||L.key!=="Escape"||N.current)return;const q=(U=a.current.floatingContext)==null?void 0:U.nodeId,Z=S?ra(S.nodesRef.current,q):[];if(!_&&(L.stopPropagation(),Z.length>0)){let B=!0;if(Z.forEach(K=>{var O;if((O=K.context)!=null&&O.open&&!K.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}r(!1,QB(L)?L.nativeEvent:L,"escape-key")}),z=Fn(L=>{var U;const q=()=>{var Z;P(L),(Z=fo(L))==null||Z.removeEventListener("keydown",q)};(U=fo(L))==null||U.addEventListener("keydown",q)}),D=Fn(L=>{var U;const q=a.current.insideReactTree;a.current.insideReactTree=!1;const Z=R.current;if(R.current=!1,f==="click"&&Z||q||typeof T=="function"&&!T(L))return;const B=fo(L),K="["+$l("inert")+"]",O=gr(s.floating).querySelectorAll(K);let $=ft(B)?B:null;for(;$&&!xi($);){const se=Yi($);if(xi(se)||!ft(se))break;$=se}if(O.length&&ft(B)&&!YB(B)&&!Er(B,s.floating)&&Array.from(O).every(se=>!Er($,se)))return;if(Bt(B)&&F){const se=xi(B),re=vr(B),oe=/auto|scroll/,ue=se||oe.test(re.overflowX),ce=se||oe.test(re.overflowY),ge=ue&&B.clientWidth>0&&B.scrollWidth>B.clientWidth,Ce=ce&&B.clientHeight>0&&B.scrollHeight>B.clientHeight,ae=re.direction==="rtl",ye=Ce&&(ae?L.offsetX<=B.offsetWidth-B.clientWidth:L.offsetX>B.clientWidth),we=ge&&L.offsetY>B.clientHeight;if(ye||we)return}const V=(U=a.current.floatingContext)==null?void 0:U.nodeId,j=S&&ra(S.nodesRef.current,V).some(se=>{var re;return iy(L,(re=se.context)==null?void 0:re.elements.floating)});if(iy(L,s.floating)||iy(L,s.domReference)||j)return;const X=S?ra(S.nodesRef.current,V):[];if(X.length>0){let se=!0;if(X.forEach(re=>{var oe;if((oe=re.context)!=null&&oe.open&&!re.context.dataRef.current.__outsidePressBubbles){se=!1;return}}),!se)return}r(!1,L,"outside-press")}),H=Fn(L=>{var U;const q=()=>{var Z;D(L),(Z=fo(L))==null||Z.removeEventListener(f,q)};(U=fo(L))==null||U.addEventListener(f,q)});v.useEffect(()=>{if(!n||!l)return;a.current.__escapeKeyBubbles=_,a.current.__outsidePressBubbles=C;let L=-1;function U(O){r(!1,O,"ancestor-scroll")}function q(){window.clearTimeout(L),N.current=!0}function Z(){L=window.setTimeout(()=>{N.current=!1},Oh()?5:0)}const B=gr(s.floating);c&&(B.addEventListener("keydown",M?z:P,M),B.addEventListener("compositionstart",q),B.addEventListener("compositionend",Z)),T&&B.addEventListener(f,A?H:D,A);let K=[];return b&&(ft(s.domReference)&&(K=mo(s.domReference)),ft(s.floating)&&(K=K.concat(mo(s.floating))),!ft(s.reference)&&s.reference&&s.reference.contextElement&&(K=K.concat(mo(s.reference.contextElement)))),K=K.filter(O=>{var $;return O!==(($=B.defaultView)==null?void 0:$.visualViewport)}),K.forEach(O=>{O.addEventListener("scroll",U,{passive:!0})}),()=>{c&&(B.removeEventListener("keydown",M?z:P,M),B.removeEventListener("compositionstart",q),B.removeEventListener("compositionend",Z)),T&&B.removeEventListener(f,A?H:D,A),K.forEach(O=>{O.removeEventListener("scroll",U)}),window.clearTimeout(L)}},[a,s,c,T,f,n,r,b,l,_,C,P,M,z,D,A,H]),v.useEffect(()=>{a.current.insideReactTree=!1},[a,T,f]);const W=v.useMemo(()=>({onKeyDown:P,...h&&{[R9[m]]:L=>{r(!1,L.nativeEvent,"reference-press")},...m!=="click"&&{onClick(L){r(!1,L.nativeEvent,"reference-press")}}}}),[P,r,h,m]),F=v.useMemo(()=>({onKeyDown:P,onMouseDown(){R.current=!0},onMouseUp(){R.current=!0},[C9[f]]:()=>{a.current.insideReactTree=!0}}),[P,f,a]);return v.useMemo(()=>l?{reference:W,floating:F}:{},[l,W,F])}function N9(e){const{open:t=!1,onOpenChange:n,elements:r}=e,s=rm(),a=v.useRef({}),[l]=v.useState(()=>ZA()),c=_o()!=null,[d,f]=v.useState(r.reference),h=Fn((y,x,S)=>{a.current.openEvent=y?x:void 0,l.emit("openchange",{open:y,event:x,reason:S,nested:c}),n?.(y,x,S)}),m=v.useMemo(()=>({setPositionReference:f}),[]),b=v.useMemo(()=>({reference:d||r.reference||null,floating:r.floating||null,domReference:r.reference}),[d,r.reference,r.floating]);return v.useMemo(()=>({dataRef:a,open:t,onOpenChange:h,elements:b,events:l,floatingId:s,refs:m}),[t,h,b,l,s,m])}function Kk(e){e===void 0&&(e={});const{nodeId:t}=e,n=N9({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,s=r.elements,[a,l]=v.useState(null),[c,d]=v.useState(null),h=s?.domReference||a,m=v.useRef(null),b=Ro();hn(()=>{h&&(m.current=h)},[h]);const y=_N({...e,elements:{...s,...c&&{reference:c}}}),x=v.useCallback(_=>{const C=ft(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),getClientRects:()=>_.getClientRects(),contextElement:_}:_;d(C),y.refs.setReference(C)},[y.refs]),S=v.useCallback(_=>{(ft(_)||_===null)&&(m.current=_,l(_)),(ft(y.refs.reference.current)||y.refs.reference.current===null||_!==null&&!ft(_))&&y.refs.setReference(_)},[y.refs]),E=v.useMemo(()=>({...y.refs,setReference:S,setPositionReference:x,domReference:m}),[y.refs,S,x]),T=v.useMemo(()=>({...y.elements,domReference:h}),[y.elements,h]),R=v.useMemo(()=>({...y,...r,refs:E,elements:T,nodeId:t}),[y,E,T,t,r]);return hn(()=>{r.dataRef.current.floatingContext=R;const _=b?.nodesRef.current.find(C=>C.id===t);_&&(_.context=R)}),v.useMemo(()=>({...y,context:R,refs:E,elements:T}),[y,E,T,R])}function cy(e,t,n){const r=new Map,s=n==="item";let a=e;if(s&&e){const{[sT]:l,[oT]:c,...d}=e;a=d}return{...n==="floating"&&{tabIndex:-1,[c9]:""},...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(d=>{let[f,h]=d;if(!(s&&[sT,oT].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 b,y=arguments.length,x=new Array(y),S=0;S<y;S++)x[S]=arguments[S];return(b=r.get(f))==null?void 0:b.map(E=>E(...x)).find(E=>E!==void 0)}}}else l[f]=h}),l),{})}}function iO(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=v.useCallback(c=>cy(c,e,"reference"),t),a=v.useCallback(c=>cy(c,e,"floating"),n),l=v.useCallback(c=>cy(c,e,"item"),r);return v.useMemo(()=>({getReferenceProps:s,getFloatingProps:a,getItemProps:l}),[s,a,l])}const A9="Escape";function sm(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Yd(e,t){return sm(t,e===KA||e===nm,e===ff||e===df)}function fy(e,t,n){return sm(t,e===nm,n?e===ff:e===df)||e==="Enter"||e===" "||e===""}function kT(e,t,n){return sm(t,n?e===ff:e===df,e===nm)}function xT(e,t,n,r){const s=n?e===df:e===ff,a=e===KA;return t==="both"||t==="horizontal"&&r&&r>1?e===A9:sm(t,s,a)}function sO(e,t){const{open:n,onOpenChange:r,elements:s,floatingId:a}=e,{listRef:l,activeIndex:c,onNavigate:d=()=>{},enabled:f=!0,selectedIndex:h=null,allowEscape:m=!1,loop:b=!1,nested:y=!1,rtl:x=!1,virtual:S=!1,focusItemOnOpen:E="auto",focusItemOnHover:T=!0,openOnArrowKeyDown:R=!0,disabledIndices:_=void 0,orientation:C="vertical",parentOrientation:M,cols:A=1,scrollItemIntoView:N=!0,virtualItemRef:P,itemSizes:z,dense:D=!1}=t,H=oh(s.floating),W=rr(H),F=_o(),L=Ro();hn(()=>{e.dataRef.current.orientation=C},[e,C]);const U=Fn(()=>{d(B.current===-1?null:B.current)}),q=hv(s.domReference),Z=v.useRef(E),B=v.useRef(h??-1),K=v.useRef(null),O=v.useRef(!0),$=v.useRef(U),V=v.useRef(!!s.floating),j=v.useRef(n),X=v.useRef(!1),se=v.useRef(!1),re=rr(_),oe=rr(n),ue=rr(N),ce=rr(h),[ge,Ce]=v.useState(),[ae,ye]=v.useState(),we=Fn(()=>{function ke(J){if(S){var ne;(ne=J.id)!=null&&ne.endsWith("-fui-option")&&(J.id=a+"-"+Math.random().toString(16).slice(2,10)),Ce(J.id),L?.events.emit("virtualfocus",J),P&&(P.current=J)}else Jo(J,{sync:X.current,preventScroll:!0})}const Te=l.current[B.current],te=se.current;Te&&ke(Te),(X.current?J=>J():requestAnimationFrame)(()=>{const J=l.current[B.current]||Te;if(!J)return;Te||ke(J);const ne=ue.current;ne&&Ee&&(te||!O.current)&&(J.scrollIntoView==null||J.scrollIntoView(typeof ne=="boolean"?{block:"nearest",inline:"nearest"}:ne))})});hn(()=>{f&&(n&&s.floating?Z.current&&h!=null&&(se.current=!0,B.current=h,U()):V.current&&(B.current=-1,$.current()))},[f,n,s.floating,h,U]),hn(()=>{if(f&&n&&s.floating)if(c==null){if(X.current=!1,ce.current!=null)return;if(V.current&&(B.current=-1,we()),(!j.current||!V.current)&&Z.current&&(K.current!=null||Z.current===!0&&K.current==null)){let ke=0;const Te=()=>{l.current[0]==null?(ke<2&&(ke?requestAnimationFrame:queueMicrotask)(Te),ke++):(B.current=K.current==null||fy(K.current,C,x)||y?sy(l,re.current):rT(l,re.current),K.current=null,U())};Te()}}else Sc(l,c)||(B.current=c,we(),se.current=!1)},[f,n,s.floating,c,ce,y,l,C,x,U,we,re]),hn(()=>{var ke;if(!f||s.floating||!L||S||!V.current)return;const Te=L.nodesRef.current,te=(ke=Te.find(ne=>ne.id===F))==null||(ke=ke.context)==null?void 0:ke.elements.floating,fe=co(gr(s.floating)),J=Te.some(ne=>ne.context&&Er(ne.context.elements.floating,fe));te&&!J&&O.current&&te.focus({preventScroll:!0})},[f,s.floating,L,F,S]),hn(()=>{if(!f||!L||!S||F)return;function ke(Te){ye(Te.id),P&&(P.current=Te)}return L.events.on("virtualfocus",ke),()=>{L.events.off("virtualfocus",ke)}},[f,L,S,F,P]),hn(()=>{$.current=U,j.current=n,V.current=!!s.floating}),hn(()=>{n||(K.current=null,Z.current=E)},[n,E]);const Ae=c!=null,Ee=v.useMemo(()=>{function ke(te){if(!oe.current)return;const fe=l.current.indexOf(te);fe!==-1&&B.current!==fe&&(B.current=fe,U())}return{onFocus(te){let{currentTarget:fe}=te;X.current=!0,ke(fe)},onClick:te=>{let{currentTarget:fe}=te;return fe.focus({preventScroll:!0})},onMouseMove(te){let{currentTarget:fe}=te;X.current=!0,se.current=!1,T&&ke(fe)},onPointerLeave(te){let{pointerType:fe}=te;if(!(!O.current||fe==="touch")&&(X.current=!0,!!T&&(B.current=-1,U(),!S))){var J;(J=W.current)==null||J.focus({preventScroll:!0})}}}},[oe,W,T,l,U,S]),xe=v.useCallback(()=>{var ke;return M??(L==null||(ke=L.nodesRef.current.find(Te=>Te.id===F))==null||(ke=ke.context)==null||(ke=ke.dataRef)==null?void 0:ke.current.orientation)},[F,L,M]),De=Fn(ke=>{if(O.current=!1,X.current=!0,ke.which===229||!oe.current&&ke.currentTarget===W.current)return;if(y&&xT(ke.key,C,x,A)){Yd(ke.key,xe())||ur(ke),r(!1,ke.nativeEvent,"list-navigation"),Bt(s.domReference)&&(S?L?.events.emit("virtualfocus",s.domReference):s.domReference.focus());return}const Te=B.current,te=sy(l,_),fe=rT(l,_);if(q||(ke.key==="Home"&&(ur(ke),B.current=te,U()),ke.key==="End"&&(ur(ke),B.current=fe,U())),A>1){const J=z||Array.from({length:l.current.length},()=>({width:1,height:1})),ne=s9(J,A,D),be=ne.findIndex(Xe=>Xe!=null&&!Mp(l,Xe,_)),Ge=ne.reduce((Xe,vt,Je)=>vt!=null&&!Mp(l,vt,_)?Je:Xe,-1),Ze=ne[i9({current:ne.map(Xe=>Xe!=null?l.current[Xe]:null)},{event:ke,orientation:C,loop:b,rtl:x,cols:A,disabledIndices:a9([...(typeof _!="function"?_:null)||l.current.map((Xe,vt)=>Mp(l,vt,_)?vt:void 0),void 0],ne),minIndex:be,maxIndex:Ge,prevIndex:o9(B.current>fe?te:B.current,J,ne,A,ke.key===nm?"bl":ke.key===(x?ff:df)?"tr":"tl"),stopEvent:!0})];if(Ze!=null&&(B.current=Ze,U()),C==="both")return}if(Yd(ke.key,C)){if(ur(ke),n&&!S&&co(ke.currentTarget.ownerDocument)===ke.currentTarget){B.current=fy(ke.key,C,x)?te:fe,U();return}fy(ke.key,C,x)?b?B.current=Te>=fe?m&&Te!==l.current.length?-1:te:hr(l,{startingIndex:Te,disabledIndices:_}):B.current=Math.min(fe,hr(l,{startingIndex:Te,disabledIndices:_})):b?B.current=Te<=te?m&&Te!==-1?l.current.length:fe:hr(l,{startingIndex:Te,decrement:!0,disabledIndices:_}):B.current=Math.max(te,hr(l,{startingIndex:Te,decrement:!0,disabledIndices:_})),Sc(l,B.current)&&(B.current=-1),U()}}),Ie=v.useMemo(()=>S&&n&&Ae&&{"aria-activedescendant":ae||ge},[S,n,Ae,ae,ge]),je=v.useMemo(()=>({"aria-orientation":C==="both"?void 0:C,...q?{}:Ie,onKeyDown:De,onPointerMove(){O.current=!0}}),[Ie,De,C,q]),Ue=v.useMemo(()=>{function ke(te){E==="auto"&&FA(te.nativeEvent)&&(Z.current=!0)}function Te(te){Z.current=E,E==="auto"&&UA(te.nativeEvent)&&(Z.current=!0)}return{...Ie,onKeyDown(te){O.current=!1;const fe=te.key.startsWith("Arrow"),J=["Home","End"].includes(te.key),ne=fe||J,be=kT(te.key,C,x),Ge=xT(te.key,C,x,A),Ze=kT(te.key,xe(),x),Xe=Yd(te.key,C),vt=(y?Ze:Xe)||te.key==="Enter"||te.key.trim()==="";if(S&&n){const st=L?.nodesRef.current.find(Ot=>Ot.parentId==null),_t=L&&st?XB(L.nodesRef.current,st.id):null;if(ne&&_t&&P){const Ot=new KeyboardEvent("keydown",{key:te.key,bubbles:!0});if(be||Ge){var Je,mt;const ot=((Je=_t.context)==null?void 0:Je.elements.domReference)===te.currentTarget,St=Ge&&!ot?(mt=_t.context)==null?void 0:mt.elements.domReference:be?l.current.find(Pt=>Pt?.id===ge):null;St&&(ur(te),St.dispatchEvent(Ot),ye(void 0))}if((Xe||J)&&_t.context&&_t.context.open&&_t.parentId&&te.currentTarget!==_t.context.elements.domReference){var Tt;ur(te),(Tt=_t.context.elements.domReference)==null||Tt.dispatchEvent(Ot);return}}return De(te)}if(!(!n&&!R&&fe)){if(vt){const st=Yd(te.key,xe());K.current=y&&st?null:te.key}if(y){Ze&&(ur(te),n?(B.current=sy(l,re.current),U()):r(!0,te.nativeEvent,"list-navigation"));return}Xe&&(h!=null&&(B.current=h),ur(te),!n&&R?r(!0,te.nativeEvent,"list-navigation"):De(te),n&&U())}},onFocus(){n&&!S&&(B.current=-1,U())},onPointerDown:Te,onPointerEnter:Te,onMouseDown:ke,onClick:ke}},[ge,Ie,A,De,re,E,l,y,U,r,n,R,C,xe,x,h,L,S,P]);return v.useMemo(()=>f?{reference:Ue,floating:je,item:Ee}:{},[f,Ue,je,Ee])}const O9=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function oO(e,t){var n,r;t===void 0&&(t={});const{open:s,elements:a,floatingId:l}=e,{enabled:c=!0,role:d="dialog"}=t,f=rm(),h=((n=a.domReference)==null?void 0:n.id)||f,m=v.useMemo(()=>{var R;return((R=oh(a.floating))==null?void 0:R.id)||l},[a.floating,l]),b=(r=O9.get(d))!=null?r:d,x=_o()!=null,S=v.useMemo(()=>b==="tooltip"||d==="label"?{["aria-"+(d==="label"?"labelledby":"describedby")]:s?m:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":b==="alertdialog"?"dialog":b,"aria-controls":s?m:void 0,...b==="listbox"&&{role:"combobox"},...b==="menu"&&{id:h},...b==="menu"&&x&&{role:"menuitem"},...d==="select"&&{"aria-autocomplete":"none"},...d==="combobox"&&{"aria-autocomplete":"list"}},[b,m,x,s,h,d]),E=v.useMemo(()=>{const R={id:m,...b&&{role:b}};return b==="tooltip"||d==="label"?R:{...R,...b==="menu"&&{"aria-labelledby":h}}},[b,m,h,d]),T=v.useCallback(R=>{let{active:_,selected:C}=R;const M={role:"option",..._&&{id:m+"-fui-option"}};switch(d){case"select":case"combobox":return{...M,"aria-selected":C}}return{}},[m,d]);return v.useMemo(()=>c?{reference:S,floating:E,item:T}:{},[c,S,E,T])}const ST=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function fl(e,t){return typeof e=="function"?e(t):e}function I9(e,t){const[n,r]=v.useState(e);return e&&!n&&r(!0),v.useEffect(()=>{if(!e&&n){const s=setTimeout(()=>r(!1),t);return()=>clearTimeout(s)}},[e,n,t]),n}function M9(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,d]=v.useState("unmounted"),f=I9(n,l);return!f&&c==="close"&&d("unmounted"),hn(()=>{if(r){if(n){d("initial");const h=requestAnimationFrame(()=>{zi.flushSync(()=>{d("open")})});return()=>{cancelAnimationFrame(h)}}d("close")}},[n,r]),{isMounted:f,status:c}}function aO(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:s,common:a,duration:l=250}=t,c=e.placement,d=c.split("-")[0],f=v.useMemo(()=>({side:d,placement:c}),[d,c]),h=typeof l=="number",m=(h?l:l.open)||0,b=(h?l:l.close)||0,[y,x]=v.useState(()=>({...fl(a,f),...fl(n,f)})),{isMounted:S,status:E}=M9(e,{duration:l}),T=rr(n),R=rr(r),_=rr(s),C=rr(a);return hn(()=>{const M=fl(T.current,f),A=fl(_.current,f),N=fl(C.current,f),P=fl(R.current,f)||Object.keys(M).reduce((z,D)=>(z[D]="",z),{});if(E==="initial"&&x(z=>({transitionProperty:z.transitionProperty,...N,...M})),E==="open"&&x({transitionProperty:Object.keys(P).map(ST).join(","),transitionDuration:m+"ms",...N,...P}),E==="close"){const z=A||M;x({transitionProperty:Object.keys(z).map(ST).join(","),transitionDuration:b+"ms",...N,...z})}},[b,_,T,R,C,m,E,f]),{isMounted:S,styles:y}}function lO(e,t){var n;const{open:r,dataRef:s}=e,{listRef:a,activeIndex:l,onMatch:c,onTypingChange:d,enabled:f=!0,findMatch:h=null,resetMs:m=750,ignoreKeys:b=[],selectedIndex:y=null}=t,x=v.useRef(-1),S=v.useRef(""),E=v.useRef((n=y??l)!=null?n:-1),T=v.useRef(null),R=Fn(c),_=Fn(d),C=rr(h),M=rr(b);hn(()=>{r&&(pr(x),T.current=null,S.current="")},[r]),hn(()=>{if(r&&S.current===""){var D;E.current=(D=y??l)!=null?D:-1}},[r,y,l]);const A=Fn(D=>{D?s.current.typing||(s.current.typing=D,_(D)):s.current.typing&&(s.current.typing=D,_(D))}),N=Fn(D=>{function H(q,Z,B){const K=C.current?C.current(Z,B):Z.find(O=>O?.toLocaleLowerCase().indexOf(B.toLocaleLowerCase())===0);return K?q.indexOf(K):-1}const W=a.current;if(S.current.length>0&&S.current[0]!==" "&&(H(W,W,S.current)===-1?A(!1):D.key===" "&&ur(D)),W==null||M.current.includes(D.key)||D.key.length!==1||D.ctrlKey||D.metaKey||D.altKey)return;r&&D.key!==" "&&(ur(D),A(!0)),W.every(q=>{var Z,B;return q?((Z=q[0])==null?void 0:Z.toLocaleLowerCase())!==((B=q[1])==null?void 0:B.toLocaleLowerCase()):!0})&&S.current===D.key&&(S.current="",E.current=T.current),S.current+=D.key,pr(x),x.current=window.setTimeout(()=>{S.current="",E.current=T.current,A(!1)},m);const L=E.current,U=H(W,[...W.slice((L||0)+1),...W.slice(0,(L||0)+1)],S.current);U!==-1?(R(U),T.current=U):D.key!==" "&&(S.current="",A(!1))}),P=v.useMemo(()=>({onKeyDown:N}),[N]),z=v.useMemo(()=>({onKeyDown:N,onKeyUp(D){D.key===" "&&A(!1)}}),[N,A]);return v.useMemo(()=>f?{reference:P,floating:z}:{},[f,P,z])}function uO(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,...uO(e,s.id,n)])}function wT(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[d,f]=t[l]||[0,0],[h,m]=t[c]||[0,0];f>=r!=m>=r&&n<=(h-d)*(r-f)/(m-f)+d&&(s=!s)}return s}function D9(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function cO(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,d=typeof performance<"u"?performance.now():0;function f(m,b){const y=performance.now(),x=y-d;if(l===null||c===null||x===0)return l=m,c=b,d=y,null;const S=m-l,E=b-c,R=Math.sqrt(S*S+E*E)/x;return l=m,c=b,d=y,R}const h=m=>{let{x:b,y,placement:x,elements:S,onClose:E,nodeId:T,tree:R}=m;return function(C){function M(){pr(s),E()}if(pr(s),!S.domReference||!S.floating||x==null||b==null||y==null)return;const{clientX:A,clientY:N}=C,P=[A,N],z=g9(C),D=C.type==="mouseleave",H=ly(S.floating,z),W=ly(S.domReference,z),F=S.domReference.getBoundingClientRect(),L=S.floating.getBoundingClientRect(),U=x.split("-")[0],q=b>L.right-L.width/2,Z=y>L.bottom-L.height/2,B=D9(P,F),K=L.width>F.width,O=L.height>F.height,$=(K?F:L).left,V=(K?F:L).right,j=(O?F:L).top,X=(O?F:L).bottom;if(H&&(a=!0,!D))return;if(W&&(a=!1),W&&!D){a=!0;return}if(D&&ft(C.relatedTarget)&&ly(S.floating,C.relatedTarget)||R&&uO(R.nodesRef.current,T).length)return;if(U==="top"&&y>=F.bottom-1||U==="bottom"&&y<=F.top+1||U==="left"&&b>=F.right-1||U==="right"&&b<=F.left+1)return M();let se=[];switch(U){case"top":se=[[$,F.top+1],[$,L.bottom-1],[V,L.bottom-1],[V,F.top+1]];break;case"bottom":se=[[$,L.top+1],[$,F.bottom-1],[V,F.bottom-1],[V,L.top+1]];break;case"left":se=[[L.right-1,X],[L.right-1,j],[F.left+1,j],[F.left+1,X]];break;case"right":se=[[F.right-1,X],[F.right-1,j],[L.left+1,j],[L.left+1,X]];break}function re(oe){let[ue,ce]=oe;switch(U){case"top":{const ge=[K?ue+t/2:q?ue+t*4:ue-t*4,ce+t+1],Ce=[K?ue-t/2:q?ue+t*4:ue-t*4,ce+t+1],ae=[[L.left,q||K?L.bottom-t:L.top],[L.right,q?K?L.bottom-t:L.top:L.bottom-t]];return[ge,Ce,...ae]}case"bottom":{const ge=[K?ue+t/2:q?ue+t*4:ue-t*4,ce-t],Ce=[K?ue-t/2:q?ue+t*4:ue-t*4,ce-t],ae=[[L.left,q||K?L.top+t:L.bottom],[L.right,q?K?L.top+t:L.bottom:L.top+t]];return[ge,Ce,...ae]}case"left":{const ge=[ue+t+1,O?ce+t/2:Z?ce+t*4:ce-t*4],Ce=[ue+t+1,O?ce-t/2:Z?ce+t*4:ce-t*4];return[...[[Z||O?L.right-t:L.left,L.top],[Z?O?L.right-t:L.left:L.right-t,L.bottom]],ge,Ce]}case"right":{const ge=[ue-t,O?ce+t/2:Z?ce+t*4:ce-t*4],Ce=[ue-t,O?ce-t/2:Z?ce+t*4:ce-t*4],ae=[[Z||O?L.left+t:L.right,L.top],[Z?O?L.left+t:L.right:L.left+t,L.bottom]];return[ge,Ce,...ae]}}}if(!wT([A,N],se)){if(a&&!B)return M();if(!D&&r){const oe=f(C.clientX,C.clientY);if(oe!==null&&oe<.1)return M()}wT([A,N],re([b,y]))?!a&&r&&(s.current=window.setTimeout(M,40)):M()}}};return h.__options={blockPointerEvents:n},h}function fO(e){return mn(e.defaultTagName??"div",e,e)}const z9=v.createContext(void 0);function j9(){return v.useContext(z9)}const dy={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 L9(e){return[dy.base,e==="green"?dy.colorGreen:dy.colorBlue]}function P9({color:e="blue",className:t}){const n=Lt({rootClass:"ui-indicator-dot",stylexStyles:L9(e),className:t});return g.jsx("span",{"aria-hidden":!0,className:n.className,"data-color":e,style:n.style})}const $9={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-r5ixlt ui-1yhsa9g",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",k63SB2:"ui-1pd3egz",kLWn49:"ui-15bjb6t",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}},nc={xs:{kzqmXN:"ui-1pwdyn5",$$css:!0},sm:{kzqmXN:"ui-16bvwqk",$$css:!0},md:{kzqmXN:"ui-1eu7oa3",$$css:!0},lg:{kzqmXN:"ui-jst10v",$$css:!0},xl:{kzqmXN:"ui-mjrt60",$$css:!0}},B9={xs:{keoZOQ:"ui-zrgnep",km5ZXQ:"ui-1erxc0b",k1K539:"ui-11b1quy",koQZXg:"ui-3zwt15",$$css:!0},sm:{keoZOQ:"ui-vqhhvk",km5ZXQ:"ui-1bxntau",k1K539:"ui-1dy9ubm",koQZXg:"ui-rwqdqc",$$css:!0},md:{keoZOQ:"ui-kv60qn",km5ZXQ:"ui-1t00xno",k1K539:"ui-1hi8m59",koQZXg:"ui-eqy94b",$$css:!0},lg:{keoZOQ:"ui-4xtw7q",km5ZXQ:"ui-1ksdkmg",k1K539:"ui-eci9o5",koQZXg:"ui-1bitjok",$$css:!0},xl:{keoZOQ:"ui-1fm9hdn",km5ZXQ:"ui-q7nay2",k1K539:"ui-foffu7",koQZXg:"ui-15lxhye",$$css:!0}},py={root:$9.root,size:{xs:[qi.xs,nc.xs],sm:[qi.sm,nc.sm],md:[qi.md,nc.md],lg:[qi.lg,nc.lg],xl:[qi.xl,nc.xl]},contentFrame:B9},F9="md",U9={root:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kzqmXN:"ui-1oai4fc",kZKoxP:"ui-higkf7",kGuDYH:"ui-1tachi3",kLWn49:"ui-o5v014",$$css:!0}};function dO(e){if(Ik(e))return Ct(U9.root,rA(e));const t={className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1oai4fc ui-higkf7 ui-1tachi3 ui-o5v014"};return{...t,style:{...t.style,"--icon-size":typeof e=="number"?`${e}px`:e}}}function pO(e){return{border:e??"variant"}}function hO({chrome:e,variant:t,rounded:n,frame:r,reveal:s="always",size:a,tone:l,indicatorDot:c}){return{"data-variant":t,"data-border":e.border==="variant"?void 0:e.border,"data-rounded":n||void 0,"data-frame":r,"data-size":a,"data-tone":l,"data-fg-channel":"icon","data-indicator-dot":c||void 0,"data-reveal":s!=="always"?s:void 0}}function mO({size:e,iconSize:t,disabled:n,enforced:r}){const s=e??r?.iconButtonSize??F9,a=s==="lg"||s==="xl"?"base":"sm";return{size:s,innerIconSize:t??r?.iconButtonIconSize??a,disabled:n??r?.disabled}}function gO({chrome:e,variant:t,size:n,frame:r,reveal:s="always",tone:a,enforcedRootStyle:l,rootStyle:c}){const d=oA(t,a);return[py.root,d.applyControlTone&&aA.foreground,ea.appearance,ea.press,d.applyFilledColors&&ea.colors,d.applyNonFilledBackground&&eh.background,t==="outline"&&eh.outline,t==="media"&&ea.media,py.size[n],r==="content"&&py.contentFrame[n],e.border!=="variant"&&sA[e.border],lA[s],l,c]}function kr({icon:e,iconVariant:t="outline",variant:n,border:r,rounded:s,frame:a="container",reveal:l="always",size:c,iconSize:d,tone:f,isSuccess:h=!1,className:m,style:b,rootStyle:y,iconStyle:x,disabled:S,indicatorDot:E=!1,indicatorDotColor:T="blue","aria-label":R,"aria-labelledby":_,...C}){const M=va(),A=n??M?.iconButtonVariant??"ghost",N=f??M?.iconButtonTone,{size:P,innerIconSize:z,disabled:D}=mO({disabled:S,enforced:M,iconSize:d,size:c}),H=h?"check":e,W=pO(r),F=Ct(gO({chrome:W,tone:N,enforcedRootStyle:M?.iconButtonRootStyle,frame:a,reveal:l,rootStyle:y,size:P,variant:A}));return g.jsxs(iA,{...C,className:bn("ui-icon-button",F.className,m),style:{...F.style,...b},...hO({chrome:W,tone:N,frame:a,indicatorDot:E,reveal:l,rounded:s,size:P,variant:A}),disabled:D,"aria-label":R,"aria-labelledby":_,children:[typeof H=="string"?g.jsx(tn,{name:H,rootStyle:[M?.iconButtonIconStyle,x],variant:t,size:z,"aria-hidden":"true"}):g.jsx("span",{...dO(z),"aria-hidden":"true",children:H}),E?g.jsx(P9,{color:T}):null]})}function q9(){return typeof navigator<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)}function Zk(e){if(!(q9()?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 Xd={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 H9({className:e,disabled:t=!1,mono:n=!1,ref:r,rootStyle:s,style:a,onKeyDown:l,...c}){const d=Lt({rootClass:"ui-input-group__input",stylexStyles:[Xd.base,t?Xd.disabled:null,n?Xd.mono:null,n?Xd.monoInput:null,s],className:e,style:a}),f=v.useCallback(h=>{l?.(h),!h.defaultPrevented&&Zk(h)},[l]);return g.jsx("input",{ref:r,className:d.className,style:d.style,disabled:t,onKeyDown:f,...c})}const Cr={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-1gwrjia",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},variantDefault:{kLZC3w:"ui-2kampu",k26BEO:"ui-hnkhp4",kL6WhQ:"ui-1jfuf7k",kaZRDh:"ui-1l09f48",$$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}},Qd={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}},Bl={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}},ET={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}},G9={base:Cr.sizeBase,lg:Cr.sizeLg,xl:Cr.sizeXl},V9={base:Cr.layoutTextareaBase,lg:Cr.layoutTextareaLg,xl:null},W9={container:null,content:Cr.frameContent},K9={default:Cr.variantDefault,elevated:Cr.variantElevated,ghost:Cr.variantGhost,unfilled:Cr.variantUnfilled},Z9={rounded:null,pill:Cr.shapePill},bO=v.createContext(null);function Sa(e){const t=v.useContext(bO);if(!t)throw new Error(`${e} must be used within InputGroup.Root`);return t}function Y9(){return Sa("InputGroup.useContext")}const X9={base:"sm",lg:"base",xl:"lg"},Q9={base:"xs",lg:"xs",xl:"sm"},J9={base:"xs",lg:"sm",xl:"md"};function TT({variant:e="default",frame:t="container",size:n="lg",shape:r="rounded",layout:s="default",mono:a=!1,disabled:l=!1,rootStyle:c,className:d,children:f}){const h=j9(),m=l||h?.disabled===!0,b=Lt({rootClass:"ui-input-group",stylexStyles:[Cr.base,G9[n],s==="textarea"?Cr.layoutTextarea:null,s==="textarea"?V9[n]:null,W9[t],K9[e],e==="unfilled"?Cr.variantUnfilledSize:null,Z9[r],m?Cr.disabled:null,c],className:d});return g.jsx(bO.Provider,{value:{disabled:m,layout:s,mono:a},children:g.jsx(Ms,{iconSize:X9[n],iconButtonSize:Q9[n],buttonSize:J9[n],disabled:m||void 0,children:g.jsx("div",{className:b.className,style:b.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 eF({className:e,disabled:t,ref:n,rootStyle:r,style:s,...a}){const l=Sa("InputGroup.Input"),c=l.disabled||t===!0;return g.jsx(CB,{...a,className:e,disabled:c,ref:n,render:g.jsx(H9,{mono:l.mono,rootStyle:r}),style:s})}function tF({className:e,disabled:t,ref:n,rootStyle:r,style:s,onKeyDown:a,onInput:l,onFocus:c,onBlur:d,minRows:f=1,maxRows:h,autoResize:m=!0,collapseToSingleLineWhenBlurred:b=!1,rows:y,value:x,placeholder:S,focusedPlaceholder:E,...T}){const R=Sa("InputGroup.Textarea"),_=R.disabled||t===!0,C=Lt({rootClass:"ui-input-group__textarea",stylexStyles:[Qd.field,_?Qd.disabled:null,R.mono?Qd.mono:null,b?Qd.collapseBlur:null,r],className:e,style:s}),M=v.useRef(null),A=cf([M,n]),[N,P]=v.useState(!1),z=f<1?1:f,D=h===void 0?void 0:h<z?z:h,H=v.useCallback(()=>{if(!m)return;const B=M.current;if(!B)return;if(D===z&&(y===void 0||y===z)){B.style.height="",B.style.overflowY="auto";return}B.style.height="auto";const K=window.getComputedStyle(B),O=Number.parseFloat(K.lineHeight),$=Number.parseFloat(K.paddingTop)||0,V=Number.parseFloat(K.paddingBottom)||0,j=Number.parseFloat(K.borderTopWidth)||0,X=Number.parseFloat(K.borderBottomWidth)||0,se=$+V+j+X,re=Number.isFinite(O)&&O>0?se+O*z:0,oe=D!==void 0&&Number.isFinite(O)&&O>0?se+O*D:void 0,ue=Math.max(B.scrollHeight,re),ce=oe!==void 0?Math.min(ue,oe):ue;B.style.height=`${ce}px`,B.style.overflowY=oe!==void 0&&B.scrollHeight>oe?"auto":"hidden"},[m,D,z,y]);v.useLayoutEffect(()=>{H()},[x,H]);const W=v.useCallback(B=>{a?.(B),!B.defaultPrevented&&Zk(B)},[a]),F=v.useCallback(B=>{l?.(B),B.defaultPrevented||H()},[l,H]),L=v.useCallback(B=>{P(!0),c?.(B)},[c]),U=v.useCallback(B=>{P(!1),d?.(B)},[d]),q=y??z,Z=N&&E!==void 0?E:S;return g.jsx("textarea",{ref:A,className:C.className,style:C.style,disabled:_,onKeyDown:W,rows:q,value:x,placeholder:Z,...T,"data-textarea-collapse-blur":b?"":void 0,onInput:F,onFocus:L,onBlur:U})}function nF({addonStyle:e,className:t,ref:n,...r}){const s=Sa("InputGroup.Icon"),a=Lt({rootClass:"ui-input-group__addon",stylexStyles:[Bl.base,s.layout==="textarea"?Bl.textareaLayout:null,e],className:t});return g.jsx("span",{className:a.className,style:a.style,children:g.jsx(tn,{ref:n,...r})})}function rF({addonStyle:e,className:t,disabled:n,ref:r,...s}){const a=Sa("InputGroup.IconButton"),l=a.disabled?!0:n,c=Lt({rootClass:"ui-input-group__addon",stylexStyles:[Bl.base,a.layout==="textarea"?Bl.textareaLayout:null,e],className:t});return g.jsx("span",{className:c.className,style:c.style,children:g.jsx(kr,{ref:r,disabled:l,...s})})}function iF({addonStyle:e,className:t,disabled:n,ref:r,...s}){const a=Sa("InputGroup.Button"),l=a.disabled?!0:n,c=Lt({rootClass:"ui-input-group__addon",stylexStyles:[Bl.base,a.layout==="textarea"?Bl.textareaLayout:null,e],className:t});return g.jsx("span",{className:c.className,style:c.style,children:g.jsx(Cn,{ref:r,disabled:l,...s})})}function sF({className:e,children:t}){const n=Sa("InputGroup.Span"),r=Lt({rootClass:"ui-input-group__span",stylexStyles:[ET.base,n.mono?ET.mono:null],className:e});return g.jsx("span",{className:r.className,style:r.style,children:t})}const Jd=Object.assign(TT,{Root:TT,Input:eF,Textarea:tF,Icon:nF,IconButton:rF,Button:iF,Span:sF,useContext:Y9}),oF=v.createContext(void 0);function aF(e){return v.useContext(oF)}function yO(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=qC(),{ref:s,index:a}=EA(e),l=n===a,c=v.useRef(null),d=bo(s,c);return{compositeProps:{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()}},compositeRef:d,index:a}}function lF(e){const{render:t,className:n,style:r,state:s=Un,props:a=yo,refs:l=yo,metadata:c,stateAttributesMapping:d,tag:f="div",...h}=e,{compositeProps:m,compositeRef:b}=yO({metadata:c});return mn(f,e,{state:s,ref:[...l,b],props:[m,...a,h],stateAttributesMapping:d})}function uF(e){const[t,n]=v.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}function _T(e){const t=vr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Bt(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:r;return(jl(n)!==a||jl(r)!==l)&&(n=a,r=l),{width:n,height:r}}function vO(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const kO=v.createContext(void 0);function pf(e){const t=v.useContext(kO);if(t===void 0&&!e)throw new Error(Mn(50));return t}const cF=600,xO=300,fF={...GN,instantType:tt(e=>e.instantType),hasViewport:tt(e=>e.hasViewport)};class om extends Rk{constructor(t,n,r=!1){const s=new qh,a={...dF(),...t};a.floatingRootContext=qN(s,n,r),super(a,{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:s,closeDelayRef:{current:xO},inlineRectCoordsRef:{current:void 0}},fF)}setOpen=(t,n)=>{const{inlineRectCoordsRef:r}=this.context;jN(this,t,n,{onBeforeDispatch(){const s=n.event;t&&n.reason===_r&&n.trigger&&"clientX"in s&&"clientY"in s&&r.current?.element!==n.trigger&&NN(r,n.trigger,s.clientX,s.clientY)}})};static useStore(t,n){return zN(t,(s,a)=>new om(n,s,a)).store}}function dF(){return{...UN(),instantType:void 0,hasViewport:!1}}function RT(e){const{open:t,defaultOpen:n=!1,onOpenChange:r,onOpenChangeComplete:s,actionsRef:a,handle:l,triggerId:c,defaultTriggerId:d=null,children:f}=e,h=om.useStore(l?.store,{open:n,openProp:t,activeTriggerId:d,triggerIdProp:c});LN(h,t,n,d),h.useControlledProp("openProp",t),h.useControlledProp("triggerIdProp",c),h.useContextCallback("onOpenChange",r),h.useContextCallback("onOpenChangeComplete",s);const m=h.useState("open"),b=h.useState("activeTriggerId"),y=h.useState("mounted"),x=h.useState("payload");$N(h,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:S}=BN(m,h,()=>{h.context.inlineRectCoordsRef.current=void 0});He(()=>{m&&b==null&&h.set("payload",void 0)},[h,b,m]);const E=v.useCallback(()=>{h.setOpen(!1,Et(Bp))},[h]);v.useImperativeHandle(a,()=>({unmount:S,close:E}),[S,E]);const T=m||y;return g.jsxs(kO.Provider,{value:h,children:[T&&g.jsx(pF,{store:h}),typeof f=="function"?f({payload:x}):f]})}function pF({store:e}){const t=e.useState("floatingRootContext"),n=vk(t),r=n.reference??Un,s=n.trigger??Un,a=v.useMemo(()=>Gi(Ck,n.floating),[n.floating]);return FN(e,{activeTriggerProps:r,inactiveTriggerProps:s,popupProps:a}),null}const SO=_k(function(t){return pf(!0)?g.jsx(RT,{...t}):g.jsx(e$,{children:g.jsx(RT,{...t})})}),wO=v.createContext(void 0);function hF(){const e=v.useContext(wO);if(e===void 0)throw new Error(Mn(48));return e}const EO=v.forwardRef(function(t,n){const{children:r,container:s,className:a,render:l,style:c,...d}=t,{portalNode:f,portalSubtree:h}=pN({container:s,ref:n,componentProps:t,elementProps:d});return!h&&!f?null:g.jsxs(v.Fragment,{children:[h,f&&zi.createPortal(r,f)]})}),TO=v.forwardRef(function(t,n){const{keepMounted:r=!1,...s}=t;return pf().useState("mounted")||r?g.jsx(wO.Provider,{value:r,children:g.jsx(EO,{ref:n,...s})}):null}),_O=IN(function(t,n){const{render:r,className:s,delay:a,closeDelay:l,id:c,payload:d,handle:f,style:h,...m}=t,b=pf(!0),y=f?.store??b;if(!y)throw new Error(Mn(89));const x=Wl(c),S=y.useState("isTriggerActive",x),E=y.useState("isOpenedByTrigger",x),T=y.useState("floatingRootContext"),R=y.context.inlineRectCoordsRef,_=v.useRef(null),C=a??cF,M=l??xO,{registerTrigger:A,isMountedByThisTrigger:N}=PN(x,_,y,{payload:d});He(()=>{N&&(y.context.closeDelayRef.current=M)},[y,N,M]);const P=YN(T,{mouseOnly:!0,move:!1,handleClose:XN(),delay:()=>({open:C,close:M}),triggerElementRef:_,isActiveTrigger:S,isClosing:()=>y.select("transitionStatus")==="ending"}),z=WN(T,{delay:C}),D={open:E},H=y.useState("triggerProps",N),W=K$(R,E);return mn("a",t,{state:D,ref:[n,A,_],props:[P,z.reference,H,W,{id:x},m],stateAttributesMapping:BC})}),RO=v.createContext(void 0);function mF(){const e=v.useContext(RO);if(e===void 0)throw new Error(Mn(49));return e}const CO=v.forwardRef(function(t,n){const{render:r,className:s,anchor:a,positionMethod:l="absolute",side:c="bottom",align:d="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b=5,arrowPadding:y=5,sticky:x=!1,disableAnchorTracking:S=!1,collisionAvoidance:E=cN,style:T,...R}=t,_=pf(),C=hF(),M=QP(),A=_.useState("open"),N=_.useState("mounted"),P=_.useState("floatingRootContext"),z=_.useState("instantType"),D=_.useState("transitionStatus"),H=_.useState("hasViewport"),W=_.context.inlineRectCoordsRef,F=$k({anchor:a,floatingRootContext:P,positionMethod:l,mounted:N,side:c,sideOffset:f,align:d,alignOffset:h,arrowPadding:y,collisionBoundary:m,collisionPadding:b,sticky:x,disableAnchorTracking:S,keepMounted:C,nodeId:M,collisionAvoidance:E,adaptiveOrigin:H?xA:void 0,inline:Z$(W)}),L=F.update;He(()=>{A&&N&&L()},[A,N,L]);const U={open:A,side:F.side,align:F.align,anchorHidden:F.anchorHidden,instant:z},q=Bk(t,U,{styles:F.positionerStyles,transitionStatus:D,props:R,refs:[n,_.useStateSetter("positionerElement")],hidden:!N,inert:!A});return g.jsx(RO.Provider,{value:F,children:g.jsx(JP,{id:M,children:q})})}),gF={...nf,...xo},NO=v.forwardRef(function(t,n){const{className:r,render:s,style:a,...l}=t,c=pf(),{side:d,align:f}=mF(),h=c.useState("open"),m=c.useState("instantType"),b=c.useState("transitionStatus"),y=c.useState("popupProps"),x=c.useState("floatingRootContext");To({open:h,ref:c.context.popupRef,onComplete(){h&&c.context.onOpenChangeComplete?.(!0)}});const S=Ke(()=>c.context.closeDelayRef.current);return ZN(x,{closeDelay:S}),mn("div",t,{state:{open:h,side:d,align:f,instant:m,transitionStatus:b},ref:[n,c.context.popupRef,c.useStateSetter("popupElement")],props:[y,Kh(b),l],stateAttributesMapping:gF})});class bF{constructor(){this.store=new om}open(t){const n=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!n)throw new Error(Mn(88,t));this.store.setOpen(!0,Et(Bp,void 0,n))}close(){this.store.setOpen(!1,Et(Bp,void 0,void 0))}get isOpen(){return this.store.select("open")}}function yF(){return new bF}const AO="never",hy={base:{kVAEAm:"ui-1n2onr6",kfSwDN:"ui-1hx0egp",kfzvcC:"ui-67bb7w",$$css:!0},width:e=>[{kzqmXN:e!=null?"ui-5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}],maxWidth:e=>[{ks0D6T:e!=null?"ui-f68679":e,$$css:!0},{"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]},vF={base:{kB7OPa:"ui-9f619",$$css:!0}};function kF({ariaLabel:e,close:t,content:n,contentStyle:r,maxHeight:s,maxWidth:a,offset:l,placement:c,sameAxisOnly:d,scrollbarVisibility:f,surfaceClassName:h,surfaceStyle:m,width:b}){const{portalLayerStyles:y}=Zl("tooltip",!0),{side:x,align:S,sideOffset:E,alignOffset:T,collisionAvoidance:R,positionMethod:_}=Jh(c??Xh,l,d),C=Ct(_A),M=Ct(Fk,hy.base,Zh,hy.width(b),a!==void 0&&hy.maxWidth(a),m),A=Ct(RA,vF.base,r);return g.jsx(CO,{align:S,alignOffset:T,className:C.className,collisionAvoidance:R,collisionPadding:8,positionMethod:_,side:x,sideOffset:E,style:{...C.style,...y},children:g.jsx(NO,{"aria-label":e,className:bn("ui-preview-card",h,M.className),role:"dialog",style:M.style,children:g.jsx(lf,{maxHeight:s,scrollbarVisibility:f,children:g.jsx("div",{className:bn("ui-preview-card__content",A.className),style:A.style,children:typeof n=="function"?n(t):n})})})})}function OO({children:e,content:t,placement:n=Xh,sameAxisOnly:r=!1,offset:s=8,openDelay:a=Uk,closeDelay:l=Qh,disabled:c=!1,maxHeight:d=300,maxWidth:f,scrollbarVisibility:h=AO,width:m=280,className:b,surfaceStyle:y,contentStyle:x,"aria-label":S,ref:E,defaultOpen:T=!1,open:R,onOpenChange:_,onOpenChangeComplete:C,...M}){const A=v.useRef(null),N=v.Children.only(e),P=v.isValidElement(N),z=v.useCallback(L=>{L!==null&&(A.current?.close(),R===void 0&&A.current?.unmount())},[R]),D=fO({defaultTagName:"span",props:M,ref:[E,z],render:P?N:void 0}),H=ka(),W=v.useCallback((L,U)=>{if(c){L&&U.cancel();return}if(U.reason==="outside-press"||U.reason==="trigger-press"){U.cancel();return}_?.(L,U)},[c,_]),F=v.useCallback(()=>A.current?.close(),[]);return P?g.jsxs(SO,{actionsRef:A,defaultOpen:T,onOpenChange:W,onOpenChangeComplete:C,open:R,children:[c?D:g.jsx(_O,{...M,closeDelay:l,delay:a,ref:E,render:N}),c?null:g.jsx(TO,{container:H??void 0,children:g.jsx(kF,{ariaLabel:S,close:F,content:t,contentStyle:x,maxHeight:d,maxWidth:f,offset:s,placement:n,sameAxisOnly:r,scrollbarVisibility:h,surfaceClassName:b,surfaceStyle:y,width:m})})]}):g.jsx(g.Fragment,{children:e})}function CT(e){const t=v.useRef(e);return v.useLayoutEffect(()=>{t.current=e},[e]),t}function xF(e,t){const n=CT(e),r=CT(t);return v.useCallback(s=>{if(s==null)return;const{ownerDocument:a}=s,l=c=>{const d=c.target,f=a.defaultView?.Element;if(f===void 0||!(d instanceof f))return;const h=r.current;if(h==null)return;const m=a.getElementById(h);m!=null&&d.contains(m)&&n.current.close()};return a.addEventListener("scroll",l,{capture:!0,passive:!0}),()=>{a.removeEventListener("scroll",l,!0)}},[n,r])}const lh=v.createContext(!1);function IO({children:e,dismiss:t}){const n=v.use(lh);return g.jsx(lh.Provider,{value:n||t,children:e})}const MO=v.createContext(null),DO=v.createContext(null),zO=v.createContext(null);function jO(e){const t=v.use(MO);if(t===null)throw new Error(`${e} must be used within PreviewCardLayer`);return t}function SF(){const e=v.use(DO);if(e===null)throw new Error("PreviewCardLayer.Popup must be inside an open PreviewCardLayer");return e}function wF(){const e=v.use(zO);if(e===null)throw new Error("PreviewCardLayer.Popup must be inside an open PreviewCardLayer");return e}function EF({children:e}){const t=qk();return Kk({nodeId:t,open:!0}),g.jsx(Hk,{id:t,children:e})}function Dc({children:e,placement:t=Xh,offset:n=8,sameAxisOnly:r=!1,openDelay:s=Uk,closeDelay:a=Qh,controlledTargetId:l}){const c=v.useMemo(()=>yF(),[]),d=v.useRef(null),f=v.useRef(null),h=v.useRef(null),m=v.useRef(!1),b=v.useRef(new Map),y=v.useRef(l),[x,S]=v.useState(!1),E=v.use(lh),T=Jh(t,n,r),R=v.useCallback(P=>{d.current===P&&(d.current=null,c.close())},[c]),_=v.useCallback(()=>{const P=y.current;if(P===void 0)return;const z=P===null?void 0:b.current.get(P);if(P===null||z===void 0||z.suppressed){d.current=null,c.close();return}d.current=z.triggerId,c.open(z.triggerId)},[c]),C=v.useCallback(()=>{const P=m.current;m.current=!1;const z=f.current;if(z===null)return;const D=h.current;D===null||D.id!==z||!D.isConnected||D.hasAttribute("data-preview-card-layer-trigger-suppressed")||!P&&D!==D.ownerDocument.activeElement&&!D.matches(":hover")||(d.current=z,c.open(z))},[c]),M=v.useCallback((P,z)=>(b.current.set(P,z),_(),()=>{b.current.get(P)===z&&(b.current.delete(P),_())}),[_]);v.useLayoutEffect(()=>{const P=y.current;if(P===void 0&&l!==void 0&&(f.current=d.current),y.current=l,l===void 0){P!==void 0&&C();return}P!==l&&(m.current=!1),_()},[l,_,C]);const A=v.useCallback((P,z)=>{if(y.current!==void 0&&z.reason!=="imperative-action"){P&&z.trigger!==void 0&&!z.trigger.hasAttribute("data-preview-card-layer-trigger-suppressed")?(f.current=z.trigger.id,h.current=z.trigger,m.current=!0):!P&&z.trigger?.id===f.current&&(f.current=null,h.current=null,m.current=!1),z.cancel(),_();return}if(P&&z.trigger?.hasAttribute("data-preview-card-layer-trigger-suppressed")){if(z.cancel(),y.current!==void 0){_();return}d.current=null,f.current=null,c.close();return}if(!P&&z.reason==="trigger-focus"&&z.event instanceof FocusEvent&&z.event.relatedTarget===null&&z.event.target instanceof Element&&z.event.target.matches(":hover")){z.cancel();return}!P&&z.reason!=="imperative-action"&&z.trigger?.id===f.current&&(f.current=null,h.current=null,m.current=!1),d.current=P?z.trigger?.id??d.current:null,y.current===void 0&&(f.current=d.current),S(P),y.current===void 0&&z.trigger!==void 0&&(h.current=P?z.trigger:null)},[c,_]),N=v.useMemo(()=>({handle:c,instantDismiss:E,openDelay:s,closeDelay:a,positioner:T,closeIfActive:R,registerTarget:M}),[a,R,c,E,s,T,M]);return g.jsxs(MO.Provider,{value:N,children:[e,g.jsx(SO,{handle:c,onOpenChange:A,children:({payload:P})=>!E&&x&&P!==void 0?g.jsx(DO.Provider,{value:P.triggerId,children:g.jsx(zO.Provider,{value:P.contentKey,children:g.jsx(EF,{children:P.content})})}):null})]})}function TF({children:e,content:t,targetId:n,contentKey:r,disabled:s=!1,openDelay:a,closeDelay:l}){const{handle:c,instantDismiss:d,openDelay:f,closeDelay:h,closeIfActive:m,registerTarget:b}=jO("PreviewCardLayer.Trigger"),y=v.useId(),x=e.props.id,S=typeof x=="string"?x:y,E=s||d,T=v.useMemo(()=>({content:t,contentKey:r??S,triggerId:S}),[t,r,S]);return v.useLayoutEffect(()=>{const R=n===void 0?void 0:b(n,{triggerId:S,suppressed:E});return E&&m(S),()=>{R?.(),m(S)}},[m,b,E,n,S]),g.jsx(_O,{closeDelay:l??h,delay:a??f,handle:c,id:S,payload:T,"data-preview-card-layer-trigger-suppressed":E?"":void 0,render:e})}function _F({children:e,maxHeight:t,surfaceClassName:n,surfaceStyle:r}){const{handle:s,positioner:a}=jO("PreviewCardLayer.Popup"),l=SF(),c=wF(),d=ka(),f=xF(s,l),{portalLayerStyles:h}=Zl("tooltip",!0),m=Ct(_A),b=Ct(Fk,CA,RA,Zh,C4,r);return g.jsx(TO,{container:d??void 0,children:g.jsx(CO,{align:a.align,alignOffset:a.alignOffset,className:m.className,collisionAvoidance:a.collisionAvoidance,collisionPadding:8,positionMethod:a.positionMethod,side:a.side,sideOffset:a.sideOffset,style:{...m.style,...h},children:g.jsx(NO,{"data-component":"preview-card-layer-popup",className:bn("ui-preview-card-layer",n,b.className),ref:f,role:"dialog",style:b.style,children:t===void 0?e:g.jsx(lf,{maxHeight:`min(${typeof t=="number"?`${t}px`:t}, var(--available-height, 100vh))`,scrollbarVisibility:AO,children:e})},c)})})}(function(e){e.Trigger=TF,e.Popup=_F})(Dc||(Dc={}));function zc(e,t,n,r){const[s,a]=v.useState(t),l=v.useRef(n),c=v.useRef(s),d=e!==void 0,f=v.useRef(d);v.useLayoutEffect(()=>{l.current=n},[n]),v.useEffect(()=>{c.current!==s&&l.current?.(s),c.current=s},[s]),v.useEffect(()=>{f.current,f.current=d},[r,d]);const h=d?e:s,m=v.useCallback(b=>{if(!d){a(b);return}const y=typeof b=="function"?b(e):b;y!==e&&l.current?.(y)},[e,d]);return[h,m]}const LO="data-composite-item-active",RF=[];function CF(e){const{loopFocus:t=!0,orientation:n="both",grid:r,onLoop:s,direction:a,highlightedIndex:l,onHighlightedIndexChange:c,rootRef:d,enableHomeAndEndKeys:f=!1,stopEventPropagation:h=!1,disabledIndices:m,modifierKeys:b=RF}=e,[y,x]=v.useState(0),S=r!=null,E=v.useRef(null),T=bo(E,d),R=v.useRef([]),_=v.useRef(!1),C=l??y,M=Ke((D,H=!1)=>{if((c??x)(D),H){const W=R.current[D];AE(E.current,W,a,n)}}),A=Ke(D=>{if(D.size===0||_.current)return;_.current=!0;const H=Array.from(D.keys()),W=H.find(L=>L?.hasAttribute(LO))??null,F=W?H.indexOf(W):-1;if(F!==-1)M(F);else if(Vp(H,C,m)){const L=Ns(H,{disabledIndices:m});gc(H,L)||M(L)}AE(E.current,W,a,n)});He(()=>{if(m==null||l!=null||!_.current)return;const D=R.current;if(Vp(D,C,m)){const H=Ns(D,{disabledIndices:m});gc(D,H)||M(H)}},[m,l,C,R,M]);const N=Ke((D,H,W)=>s?s(D,H,W,R):W),P=Ke(D=>{const H=f?tA:eA;if(!H.has(D.key)||NF(D,b)||!E.current)return;const F=a==="rtl",L=F?Qp:Jp,U={horizontal:L,vertical:kc,both:L}[n],q=F?Jp:Qp,Z={horizontal:q,vertical:vc,both:q}[n],B=yr(D.nativeEvent);if(B!=null&&NE(B)&&!vO(B)){const se=B.selectionStart,re=B.selectionEnd,oe=B.value??"";if(se==null||D.shiftKey||se!==re||D.key!==Z&&se<oe.length||D.key!==U&&se>0)return}let K=C;const O=Np(R,m),$=rv(R,m);r!=null&&(K=r({disabledIndices:m,elementsRef:R,event:D,highlightedIndex:C,loopFocus:t,maxIndex:$,minIndex:O,onLoop:N,orientation:n,rtl:F}));const V={horizontal:[L],vertical:[kc],both:[L,kc]}[n],j={horizontal:[q],vertical:[vc],both:[q,vc]}[n],X=S?H:{horizontal:f?T3:QN,vertical:f?_3:JN,both:H}[n];f&&(D.key===Gh?K=O:D.key===Vh&&(K=$)),K===C&&(V.includes(D.key)||j.includes(D.key))&&(t&&K===$&&V.includes(D.key)?(K=O,s&&(K=s(D,C,K,R))):t&&K===O&&j.includes(D.key)?(K=$,s&&(K=s(D,C,K,R))):K=Ns(R.current,{startingIndex:K,decrement:j.includes(D.key),disabledIndices:m})),K!==C&&!gc(R.current,K)&&(h&&D.stopPropagation(),X.has(D.key)&&D.preventDefault(),M(K,!0),queueMicrotask(()=>{R.current[K]?.focus()}))});return{props:{ref:T,onFocus(D){const H=E.current,W=yr(D.nativeEvent);!H||W==null||!NE(W)||W.setSelectionRange(0,W.value.length??0)},onKeyDown:P},highlightedIndex:C,onHighlightedIndexChange:M,elementsRef:R,disabledIndices:m,onMapChange:A,relayKeyboardEvent:P}}function NF(e,t){for(const n of O3.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function AF(e){const{render:t,className:n,style:r,refs:s=yo,props:a=yo,state:l=Un,stateAttributesMapping:c,highlightedIndex:d,onHighlightedIndexChange:f,orientation:h,grid:m,loopFocus:b,onLoop:y,enableHomeAndEndKeys:x,onMapChange:S,stopEventPropagation:E=!0,rootRef:T,disabledIndices:R,modifierKeys:_,highlightItemOnHover:C=!1,tag:M="div",...A}=e,N=Lk(),{props:P,highlightedIndex:z,onHighlightedIndexChange:D,elementsRef:H,onMapChange:W,relayKeyboardEvent:F}=CF({grid:m,loopFocus:b,onLoop:y,orientation:h,highlightedIndex:d,onHighlightedIndexChange:f,rootRef:T,stopEventPropagation:E,enableHomeAndEndKeys:x,direction:N,disabledIndices:R,modifierKeys:_}),L=mn(M,e,{state:l,ref:s,props:[P,...a,A],stateAttributesMapping:c}),U=v.useMemo(()=>({highlightedIndex:z,onHighlightedIndexChange:D,highlightItemOnHover:C,relayKeyboardEvent:F}),[z,D,C,F]);return g.jsx(UC.Provider,{value:U,children:g.jsx(Pk,{elementsRef:H,onMapChange:q=>{S?.(q),W(q)},children:L})})}const OF=v.createContext(void 0);function IF(){const e=v.useContext(OF);if(e===void 0)throw new Error(Mn(63));return e}let NT=(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 MF={...af,checked(e){return e?{[NT.checked]:""}:{[NT.unchecked]:""}}},DF=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,c=IF();return mn("span",t,{state:c,ref:n,stateAttributesMapping:MF,props:l})}),zF="md",AT={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},regular:{kzqmXN:"ui-1849jeq",kZKoxP:"ui-mix8c7","--ui-switch-thumb-travel":"ui-9pb0k7",kWkggS:"ui-3dhcaw ui-1jnhqrh",kGVxlE:"ui-1gnnqk1 ui-10yfhlr",$$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}},jF={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},monochrome:{"--ui-switch-active-bg":"ui-1iuey4n","--ui-switch-thumb-bg":"ui-1bnmce8",$$css:!0}};function LF({interactive:e,size:t,variant:n}){const r=g.jsx("span",{className:"ui-1lliihq ui-h8yej3 ui-5yr21d ui-1i4c3av ui-hwtojv ui-10z6xd1 ui-19ule2h ui-1g0ag68 ui-3oybdh ui-27jcm2 ui-11xpdln ui-622pbu ui-99dd5c ui-sagj69 ui-6tor67"}),s=e?g.jsx(DF,{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}):g.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 g.jsx("span",{"aria-hidden":"true",...Ct(AT.root,AT[t],jF[n]),children:s})}function PF({checked:e,disabled:t,size:n=zF,variant:r="green"}){return g.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:g.jsx(LF,{interactive:!1,size:n,variant:r})})}const kn={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}},$F={xs:uA.root,sm:Xi.root,md:Ki.root,lg:cA.root,xl:x6.root,"2xl":S6.root,"3xl":w6.root,inherit:kn.sizeInherit},BF={regular:kn.weightRegular,medium:kn.weightMedium,semibold:kn.weightSemibold,bold:kn.weightBold},FF={primary:kn.colorPrimary,secondary:kn.colorSecondary,tertiary:kn.colorTertiary,quaternary:kn.colorQuaternary,active:kn.colorActive,focused:kn.colorFocused,red:kn.colorRed,"red-secondary":kn.colorRedSecondary,yellow:kn.colorYellow,"yellow-secondary":kn.colorYellowSecondary,green:kn.colorGreen,"green-secondary":kn.colorGreenSecondary,magenta:kn.colorMagenta,"magenta-secondary":kn.colorMagentaSecondary,cyan:kn.colorCyan,"cyan-secondary":kn.colorCyanSecondary,orange:kn.colorOrange,"orange-secondary":kn.colorOrangeSecondary};function UF({color:e,size:t,truncate:n,variant:r,weight:s}){return[kn.base,Mk.root,$F[t],BF[s],r==="code"?kn.variantCode:null,e?FF[e]:null,n==="start"?kn.truncateStart:null,n==="end"?Yl.root:null]}function uh({as:e="span",variant:t="default",size:n="md",weight:r="regular",color:s,truncate:a,numeric:l,children:c,rootStyle:d,className:f,style:h,ref:m,...b}){const y=a===!0?"end":a===!1?void 0:a??void 0,{className:x,style:S}=Ct(UF({color:s,size:n,truncate:y,variant:t,weight:r}),d);return g.jsx(e,{ref:m,className:bn("ui-text",x,f),style:{...S,...h},"data-variant":t,"data-size":n,"data-weight":r,"data-color":s,"data-truncate":y,"data-numeric":l||void 0,...b,children:y==="start"?g.jsxs(g.Fragment,{children:["",c,""]}):c})}const am={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 qF(){return am.root}function HF(){return am.content}function GF(){return am.message}function VF(){return am.actions}function As({message:e,actions:t,errorText:n,className:r}){const s=Lt({rootClass:"ui-empty-state",stylexStyles:qF(),className:r}),a=Ct(HF()),l=Ct(GF()),c=Ct(VF());return g.jsx("div",{className:s.className,style:s.style,children:g.jsxs("div",{className:a.className,style:a.style,children:[g.jsx(uh,{as:"p",className:l.className,style:l.style,color:"tertiary",size:"lg",children:e}),n!=null?g.jsx(uh,{as:"p",className:l.className,style:l.style,color:"red",size:"lg",children:n}):null,t!=null?g.jsx("div",{className:c.className,style:c.style,children:t}):null]})})}function hf({className:e,variant:t="default",size:n="lg",ref:r,disabled:s,startIcon:a,endIcon:l,inputGroupRootStyle:c,...d}){return g.jsxs(Jd.Root,{className:e,rootStyle:c,variant:t,size:n,disabled:s,children:[a!=null&&g.jsx(Jd.Icon,{name:a}),g.jsx(Jd.Input,{ref:r,...d}),l!=null&&g.jsx(Jd.Icon,{name:l})]})}const Rs=class Rs{constructor(){this.data=null,this.listeners=new Set}static getInstance(){return Rs.instance||(Rs.instance=new Rs),Rs.instance}static subscribe(t){return Rs.getInstance().subscribeToChanges(t)}static isDragActive(){return Rs.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}};Rs.instance=null;let ki=Rs;const my={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:"oklch(0.878 0.01 286.202)",background:"oklch(0.209 0 0)",keyword:"oklch(0.811 0.079 191.639)",string:"oklch(0.769 0.132 329.919)",function:"oklch(0.805 0.097 58.138)",number:"oklch(0.849 0.086 80.222)",comment:"oklch(0.919 0 0 / 0.369)",constant:"oklch(0.854 0.131 83.385)",parameter:"oklch(0.878 0.01 286.202)",punctuation:"oklch(0.878 0.01 286.202)",link:"oklch(0.799 0.106 249.274)",stringExpression:"oklch(0.769 0.132 329.919)"}},WF={1:1,2:2},mv={instant:50,fast:100,normal:150,slow:200,slower:300},PO={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)",outCubic:"cubic-bezier(0.215, 0.61, 0.355, 1)",outQuint:"cubic-bezier(0.16, 1, 0.3, 1)",inOutStrong:"cubic-bezier(0.77, 0, 0.175, 1)"},KF={"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},ZF={none:0,xs:2,sm:4,base:6,lg:8,xl:12,"2xl":14,"3xl":16,"4xl":18,full:9999},YF={xs:20,sm:24,base:28,lg:32},XF={xs:11,sm:12,base:13,lg:14},QF={xs:14,sm:16,base:18,lg:22},JF={xs:.07,sm:0,base:-.08,lg:-.15,xl:.08,"2xl":-.46,"3xl":-.26},eU=.98,tU=2,OT={open:mv.fast,close:mv.fast},nU=PO.outQuint;function $O(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 rU(e){const{side:t,alignment:n}=$O(e);switch(t){case"top":return`${IT(n)} bottom`;case"right":return`left ${MT(n)}`;case"bottom":return`${IT(n)} top`;case"left":return`right ${MT(n)}`}}function iU(e,t={}){const{side:n}=$O(e),r=t.offset??tU,s=t.scale??eU;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 sU(e,t){return{opacity:0,transform:iU(e,t)}}function oU(e){return{transformOrigin:rU(e),transitionTimingFunction:nU}}function aU({closeDuration:e=OT.close,transform:t}={}){return{duration:{open:OT.open,close:e},initial:({placement:n})=>sU(n,t),common:({placement:n})=>oU(n)}}function IT(e){switch(e){case"start":return"left";case"end":return"right";case void 0:return"center"}}function MT(e){switch(e){case"start":return"top";case"end":return"bottom";case void 0:return"center"}}function lU(){const e=v.useRef(!0),t=v.useRef(void 0),n=v.useCallback(()=>{t.current!==void 0&&(clearTimeout(t.current),t.current=void 0)},[]),r=v.useCallback((s,a)=>{e.current&&(n(),t.current=setTimeout(()=>{t.current=void 0,s()},a))},[n]);return v.useEffect(()=>(e.current=!0,()=>{e.current=!1,n()}),[n]),v.useMemo(()=>({cancel:n,schedule:r}),[n,r])}const uU=300,BO=v.createContext(null);function FO({children:e}){const[t,n]=v.useState(null),r=lU(),s=v.useCallback(c=>{r.cancel(),n(c)},[r]),a=v.useCallback(c=>{r.schedule(()=>{n(d=>d===c?null:d)},uU)},[r]),l=v.useMemo(()=>({activeId:t,markOpen:s,markClosed:a}),[t,s,a]);return g.jsx(BO.Provider,{value:l,children:e})}function cU(e,t){const n=v.useContext(BO),r=n?.markOpen,s=n?.markClosed;return v.useEffect(()=>{if(!(!t||e==null||r==null||s==null))return r(e),()=>s(e)},[t,e,r,s]),{activeId:n?.activeId??null}}const Xl="data-ui-menu-item-region",UO=v.createContext("body");function Rl({value:e,children:t}){return g.jsx(UO.Provider,{value:e,children:t})}function mf(){return v.useContext(UO)}const fU='[role="menuitem"]',DT=["pointermove","mousemove"];function qO(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"||t==="j"||t==="k"}function dU(e,t){if(t==null)return null;const n=e.current[t];return n instanceof HTMLElement?n:null}function pU(e,t){const n=e.current;for(let r=0;r<n.length;r++)if(n[r]?.getAttribute(Xl)===t)return r;return null}function HO(e,t,n){queueMicrotask(()=>{const r=pU(e,t);n(r??null)})}function GO(e,t){if(!(e instanceof Element))return null;const n=e.closest(fU);if(!n)return null;const r=t.current.indexOf(n);return r>=0?r:null}function hU(e,t){if(!e)return()=>{};for(const n of DT)e.addEventListener(n,t,{passive:!0});return()=>{for(const n of DT)e.removeEventListener(n,t)}}function zT({event:e,direction:t,activeIndex:n,listRef:r,restoreFocus:s}){const a=dU(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 VO(){const[e,t]=v.useState(!0),n=v.useCallback(()=>{t(!1)},[]),r=v.useCallback(()=>{t(!0)},[]),s=v.useCallback(()=>{t(!0)},[]);return{focusItemOnHoverEnabled:e,markKeyboardNavigation:n,markPointerNavigation:r,resetFocusItemOnHover:s}}const mU=360,WO="--ui-menu-available-width",Yk="--ui-menu-available-height",gU=new Set(["none","auto","initial","inherit","unset","revert","revert-layer","min-content","max-content","fit-content","stretch"]);function KO(e){const t=`var(${Yk}, 100vh)`;return e==null||bU(e)?t:`min(${gl(e)}, ${t})`}function bU(e){return typeof e=="string"&&gU.has(e.trim().toLowerCase())}const yU="320px";function gl(e){return typeof e=="number"?`${e}px`:e}function gy(e){return`min(${e}, var(${WO}, 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":gl(t??"200px");return s?{width:l==="max-content"?l:gy(l),...n!=null&&{minWidth:gy(gl(n))},maxWidth:gy(r!=null?gl(r):yU)}:{width:l,...n!=null&&{minWidth:gl(n)},...r!=null&&{maxWidth:gl(r)}}}const vU=50;function Qk({isOpen:e,isPositioned:t}){return e&&!t?{opacity:0}:void 0}function kU(e,t){v.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 xU(){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 lm(e=200){const t=v.useRef(0);return v.useEffect(()=>{const n=()=>{t.current=Date.now()+e};return window.addEventListener("focus",n),()=>{window.removeEventListener("focus",n)}},[e]),v.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 SU={open:0,close:0},wU={opacity:1,transform:"none"},Jk=v.createContext(null);function Ji(e){const t=v.useContext(Jk);if(!t)throw new Error(`${e} must be used within LegacyMenu`);return t}function ZO(){return Ji("LegacyMenu.useContext")}function EU({children:e,open:t,defaultOpen:n=!1,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l="bottom-start",offset:c=4,flip:d=!0,closeOnSelect:f,instantClose:h=!1,instantTransitions:m=!1,returnFocusOnSelect:b=!0,returnFocus:y,focusItemOnOpen:x=!1,virtualFocus:S=!1,shouldKeepOpenDuringDrag:E=!1,lockPositionWhileOpen:T=!1,dismissOnReferenceScroll:R=!1,enableClick:_=!0,strategy:C,shouldDismissOutsidePress:M}){const A=qk(),[N,P]=zc(t,n,r,"LegacyMenu.Root (open)"),[z,D]=v.useState(""),H=v.useRef(null),[W,F]=v.useState(!1),[L,U]=v.useState(!1),[q,Z]=zc(s,null,a,"LegacyMenu.Root (activeIndex)"),{focusItemOnHoverEnabled:B,markKeyboardNavigation:K,markPointerNavigation:O,resetFocusItemOnHover:$}=VO(),V=v.useRef([]),j=v.useRef([]),X=v.useRef(null),se=v.useCallback(be=>{P(be),be?(D(""),X.current=null):Z(null),$()},[$,P,Z]),re=v.useRef(!1);v.useLayoutEffect(()=>{const be=re.current;re.current=N,!be&&N&&D(""),be!==N&&$()},[N,$]);const{refs:oe,floatingStyles:ue,middlewareData:ce,context:ge,update:Ce}=Kk({nodeId:A,open:N,onOpenChange:se,placement:l,strategy:C,middleware:[xk(c),...d?[wk()]:[],Sk(),Ek({padding:8,apply({availableHeight:be,elements:Ge}){Ge.floating.style.setProperty(Yk,`${Math.max(0,Math.floor(be))}px`)}}),xU()],whileElementsMounted:T?void 0:Wp,transform:!1}),ae=QA(ge,{enabled:L,delay:{open:75},handleClose:cO({blockPointerEvents:!0,requireIntent:!1})}),ye=nO(ge,{enabled:_&&!L}),we=lm(),Ae=v.useCallback(be=>M!==void 0&&!M(be)||E&&ki.getInstance().hasData()?!1:we(be),[M,E,we]),Ee=rO(ge,{ancestorScroll:R,outsidePressEvent:"click",outsidePress:Ae}),xe=oO(ge,{role:"menu"}),De=sO(ge,{listRef:V,activeIndex:q,onNavigate:Z,loop:!1,virtual:S||W,focusItemOnOpen:x,focusItemOnHover:B}),Ie=lO(ge,{listRef:j,activeIndex:q,onMatch:W?void 0:Z,enabled:!W}),{getReferenceProps:je,getFloatingProps:Ue,getItemProps:ke}=iO([ae,ye,Ee,xe,De,Ie]),Te=v.useCallback(be=>({...je(be),ref:oe.setReference,"aria-haspopup":"menu","aria-expanded":N}),[je,oe.setReference,N]),te=m?{duration:SU,initial:wU}:aU(h?{closeDuration:0}:void 0),{isMounted:fe,styles:J}=aO(ge,te),ne=v.useMemo(()=>({isOpen:N,isMounted:fe,setIsOpen:P,activeIndex:q,setActiveIndex:Z,markKeyboardNavigation:K,markPointerNavigation:O,virtualFocus:S,searchValue:z,setSearchValue:D,hasSearchInput:W,setHasSearchInput:F,enableHover:L,setHasHoverTrigger:U,closeOnSelect:f,returnFocusOnSelect:b,returnFocus:y,nodeId:A,listRef:V,labelsRef:j,searchInputRef:H,refs:oe,floatingStyles:ue,middlewareData:ce,transitionStyles:J,context:ge,updateFloating:Ce,getReferenceProps:je,getFloatingProps:Ue,getItemProps:ke,getTriggerProps:Te,dismissCauseRef:X,shouldAllowPointerInteraction:Ae}),[N,fe,P,q,Z,K,O,S,z,W,L,f,b,y,A,oe,ue,ce,J,ge,Ce,je,Ue,ke,Te,Ae]);return g.jsx(Hk,{id:A,children:g.jsx(Jk.Provider,{value:ne,children:g.jsx(FO,{children:e})})})}function rc(e,t){return n=>{e?.(n),n.defaultPrevented||t(n)}}function ze(e,t,n){function r(c,d){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,d);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=d}const s=n?.Parent??Object;class a extends s{}Object.defineProperty(a,"name",{value:e});function l(c){var d;const f=n?.Parent?new a:this;r(f,c),(d=f._zod).deferred??(d.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 Cl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class YO extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const XO={};function ca(e){return XO}function TU(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 gv(e,t){return typeof t=="bigint"?t.toString():t}function ex(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function tx(e){return e==null}function nx(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const jT=Symbol("evaluating");function Sn(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==jT)return r===void 0&&(r=jT,r=n()),r},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function wa(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ea(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function LT(e){return JSON.stringify(e)}const QO="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ch(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const _U=ex(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function jc(e){if(ch(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(ch(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function JO(e){return jc(e)?{...e}:Array.isArray(e)?[...e]:e}const RU=new Set(["string","number","symbol"]);function um(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Co(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 CU(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function NU(e,t){const n=e._zod.def,r=Ea(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 wa(this,"shape",s),s},checks:[]});return Co(e,r)}function AU(e,t){const n=e._zod.def,r=Ea(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 wa(this,"shape",s),s},checks:[]});return Co(e,r)}function OU(e,t){if(!jc(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=Ea(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return wa(this,"shape",a),a},checks:[]});return Co(e,s)}function IU(e,t){if(!jc(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 wa(this,"shape",r),r},checks:e._zod.def.checks};return Co(e,n)}function MU(e,t){const n=Ea(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return wa(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Co(e,n)}function DU(e,t,n){const r=Ea(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 wa(this,"shape",a),a},checks:[]});return Co(t,r)}function zU(e,t,n){const r=Ea(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 wa(this,"shape",a),a},checks:[]});return Co(t,r)}function xl(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 eI(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function ep(e){return typeof e=="string"?e:e?.message}function fa(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const s=ep(e.inst?._zod.def?.error?.(e))??ep(t?.error?.(e))??ep(n.customError?.(e))??ep(n.localeError?.(e))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function rx(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Lc(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const tI=(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,gv,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},nI=ze("$ZodError",tI),rI=ze("$ZodError",tI,{Parent:Error});function jU(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 LU(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,d=0;for(;d<l.path.length;){const f=l.path[d];d===l.path.length-1?(c[f]=c[f]||{_errors:[]},c[f]._errors.push(n(l))):c[f]=c[f]||{_errors:[]},c=c[f],d++}}};return s(e),r}const ix=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 Cl;if(l.issues.length){const c=new(s?.Err??e)(l.issues.map(d=>fa(d,a,ca())));throw QO(c,s?.callee),c}return l.value},sx=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(d=>fa(d,a,ca())));throw QO(c,s?.callee),c}return l.value},cm=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 Cl;return a.issues.length?{success:!1,error:new(e??nI)(a.issues.map(l=>fa(l,s,ca())))}:{success:!0,data:a.value}},PU=cm(rI),fm=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=>fa(l,s,ca())))}:{success:!0,data:a.value}},$U=fm(rI),BU=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ix(e)(t,n,s)},FU=e=>(t,n,r)=>ix(e)(t,n,r),UU=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return sx(e)(t,n,s)},qU=e=>async(t,n,r)=>sx(e)(t,n,r),HU=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return cm(e)(t,n,s)},GU=e=>(t,n,r)=>cm(e)(t,n,r),VU=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return fm(e)(t,n,s)},WU=e=>async(t,n,r)=>fm(e)(t,n,r),KU=/^[cC][^\s-]{8,}$/,ZU=/^[0-9a-z]+$/,YU=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,XU=/^[0-9a-vA-V]{20}$/,QU=/^[A-Za-z0-9]{27}$/,JU=/^[a-zA-Z0-9_-]{21}$/,e5=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,t5=/^([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})$/,PT=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)$/,n5=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,r5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function i5(){return new RegExp(r5,"u")}const s5=/^(?:(?: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])$/,o5=/^(([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}|:))$/,a5=/^((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])$/,l5=/^(([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])$/,u5=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,iI=/^[A-Za-z0-9_-]*$/,c5=/^(?=.{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])?)*\.?$/,f5=/^\+(?:[0-9]){6,14}[0-9]$/,sI="(?:(?:\\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])))",d5=new RegExp(`^${sI}$`);function oI(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 p5(e){return new RegExp(`^${oI(e)}$`)}function h5(e){const t=oI({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(`^${sI}T(?:${r})$`)}const m5=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},g5=/^(?:true|false)$/i,b5=/^[^A-Z]*$/,y5=/^[^a-z]*$/,es=ze("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),v5=ze("$ZodCheckMaxLength",(e,t)=>{var n;es.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!tx(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=rx(s);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),k5=ze("$ZodCheckMinLength",(e,t)=>{var n;es.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!tx(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=rx(s);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),x5=ze("$ZodCheckLengthEquals",(e,t)=>{var n;es.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!tx(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=rx(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})}}),dm=ze("$ZodCheckStringFormat",(e,t)=>{var n,r;es.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=()=>{})}),S5=ze("$ZodCheckRegex",(e,t)=>{dm.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})}}),w5=ze("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=b5),dm.init(e,t)}),E5=ze("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=y5),dm.init(e,t)}),T5=ze("$ZodCheckIncludes",(e,t)=>{es.init(e,t);const n=um(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})}}),_5=ze("$ZodCheckStartsWith",(e,t)=>{es.init(e,t);const n=new RegExp(`^${um(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})}}),R5=ze("$ZodCheckEndsWith",(e,t)=>{es.init(e,t);const n=new RegExp(`.*${um(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})}}),C5=ze("$ZodCheckOverwrite",(e,t)=>{es.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class N5{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(`
|
|
13
|
+
`).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(`
|
|
14
|
+
`))}}const A5={major:4,minor:1,patch:11},Yn=ze("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=A5;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,d)=>{let f=xl(l),h;for(const m of c){if(m._zod.def.when){if(!m._zod.def.when(l))continue}else if(f)continue;const b=l.issues.length,y=m._zod.check(l);if(y instanceof Promise&&d?.async===!1)throw new Cl;if(h||y instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await y,l.issues.length!==b&&(f||(f=xl(l,b)))});else{if(l.issues.length===b)continue;f||(f=xl(l,b))}}return h?h.then(()=>l):l},a=(l,c,d)=>{if(xl(l))return l.aborted=!0,l;const f=s(c,r,d);if(f instanceof Promise){if(d.async===!1)throw new Cl;return f.then(h=>e._zod.parse(h,d))}return e._zod.parse(f,d)};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 d=e._zod.parse(l,c);if(d instanceof Promise){if(c.async===!1)throw new Cl;return d.then(f=>s(f,r,c))}return s(d,r,c)}}e["~standard"]={validate:s=>{try{const a=PU(e,s);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return $U(e,s).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}}),ox=ze("$ZodString",(e,t)=>{Yn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??m5(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}}),Nn=ze("$ZodStringFormat",(e,t)=>{dm.init(e,t),ox.init(e,t)}),O5=ze("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=t5),Nn.init(e,t)}),I5=ze("$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=PT(r))}else t.pattern??(t.pattern=PT());Nn.init(e,t)}),M5=ze("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=n5),Nn.init(e,t)}),D5=ze("$ZodURL",(e,t)=>{Nn.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:c5.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})}}}),z5=ze("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=i5()),Nn.init(e,t)}),j5=ze("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=JU),Nn.init(e,t)}),L5=ze("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=KU),Nn.init(e,t)}),P5=ze("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ZU),Nn.init(e,t)}),$5=ze("$ZodULID",(e,t)=>{t.pattern??(t.pattern=YU),Nn.init(e,t)}),B5=ze("$ZodXID",(e,t)=>{t.pattern??(t.pattern=XU),Nn.init(e,t)}),F5=ze("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=QU),Nn.init(e,t)}),U5=ze("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=h5(t)),Nn.init(e,t)}),q5=ze("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=d5),Nn.init(e,t)}),H5=ze("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=p5(t)),Nn.init(e,t)}),G5=ze("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=e5),Nn.init(e,t)}),V5=ze("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=s5),Nn.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv4"})}),W5=ze("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=o5),Nn.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})}}}),K5=ze("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=a5),Nn.init(e,t)}),Z5=ze("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=l5),Nn.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 aI(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Y5=ze("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=u5),Nn.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{aI(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function X5(e){if(!iI.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return aI(n)}const Q5=ze("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=iI),Nn.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{X5(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),J5=ze("$ZodE164",(e,t)=>{t.pattern??(t.pattern=f5),Nn.init(e,t)});function eq(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 tq=ze("$ZodJWT",(e,t)=>{Nn.init(e,t),e._zod.check=n=>{eq(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),nq=ze("$ZodBoolean",(e,t)=>{Yn.init(e,t),e._zod.pattern=g5,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}}),rq=ze("$ZodUnknown",(e,t)=>{Yn.init(e,t),e._zod.parse=n=>n}),iq=ze("$ZodNever",(e,t)=>{Yn.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function $T(e,t,n){e.issues.length&&t.issues.push(...eI(n,e.issues)),t.value[n]=e.value}const sq=ze("$ZodArray",(e,t)=>{Yn.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],d=t.element._zod.run({value:c,issues:[]},r);d instanceof Promise?a.push(d.then(f=>$T(f,n,l))):$T(d,n,l)}return a.length?Promise.all(a).then(()=>n):n}});function fh(e,t,n,r){e.issues.length&&t.issues.push(...eI(n,e.issues)),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function lI(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=CU(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function uI(e,t,n,r,s,a){const l=[],c=s.keySet,d=s.catchall._zod,f=d.def.type;for(const h of Object.keys(t)){if(c.has(h))continue;if(f==="never"){l.push(h);continue}const m=d.run({value:t[h],issues:[]},r);m instanceof Promise?e.push(m.then(b=>fh(b,n,h,t))):fh(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 oq=ze("$ZodObject",(e,t)=>{if(Yn.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...c};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=ex(()=>lI(t));Sn(e._zod,"propValues",()=>{const c=t.shape,d={};for(const f in c){const h=c[f]._zod;if(h.values){d[f]??(d[f]=new Set);for(const m of h.values)d[f].add(m)}}return d});const s=ch,a=t.catchall;let l;e._zod.parse=(c,d)=>{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 b of l.keys){const x=m[b]._zod.run({value:f[b],issues:[]},d);x instanceof Promise?h.push(x.then(S=>fh(S,c,b,f))):fh(x,c,b,f)}return a?uI(h,f,c,d,r.value,e):h.length?Promise.all(h).then(()=>c):c}}),aq=ze("$ZodObjectJIT",(e,t)=>{oq.init(e,t);const n=e._zod.parse,r=ex(()=>lI(t)),s=b=>{const y=new N5(["shape","payload","ctx"]),x=r.value,S=_=>{const C=LT(_);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};y.write("const input = payload.value;");const E=Object.create(null);let T=0;for(const _ of x.keys)E[_]=`key_${T++}`;y.write("const newResult = {};");for(const _ of x.keys){const C=E[_],M=LT(_);y.write(`const ${C} = ${S(_)};`),y.write(`
|
|
15
|
+
if (${C}.issues.length) {
|
|
16
|
+
payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
|
|
17
|
+
...iss,
|
|
18
|
+
path: iss.path ? [${M}, ...iss.path] : [${M}]
|
|
19
|
+
})));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
if (${C}.value === undefined) {
|
|
24
|
+
if (${M} in input) {
|
|
25
|
+
newResult[${M}] = undefined;
|
|
26
|
+
}
|
|
27
|
+
} else {
|
|
28
|
+
newResult[${M}] = ${C}.value;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
`)}y.write("payload.value = newResult;"),y.write("return payload;");const R=y.compile();return(_,C)=>R(b,_,C)};let a;const l=ch,c=!XO.jitless,f=c&&_U.value,h=t.catchall;let m;e._zod.parse=(b,y)=>{m??(m=r.value);const x=b.value;return l(x)?c&&f&&y?.async===!1&&y.jitless!==!0?(a||(a=s(t.shape)),b=a(b,y),h?uI([],x,b,y,m,e):b):n(b,y):(b.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),b)}});function BT(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=>!xl(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=>fa(l,r,ca())))}),t)}const lq=ze("$ZodUnion",(e,t)=>{Yn.init(e,t),Sn(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),Sn(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),Sn(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),Sn(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=>nx(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 d of t.options){const f=d._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(d=>BT(d,s,e,a)):BT(c,s,e,a)}}),uq=ze("$ZodIntersection",(e,t)=>{Yn.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(([d,f])=>FT(n,d,f)):FT(n,a,l)}});function bv(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(jc(e)&&jc(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=bv(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=bv(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 FT(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),xl(e))return e;const r=bv(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 cq=ze("$ZodEnum",(e,t)=>{Yn.init(e,t);const n=TU(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(s=>RU.has(typeof s)).map(s=>typeof s=="string"?um(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}}),fq=ze("$ZodTransform",(e,t)=>{Yn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new YO(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 Cl;return n.value=s,n}});function UT(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const dq=ze("$ZodOptional",(e,t)=>{Yn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Sn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Sn(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${nx(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=>UT(a,n.value)):UT(s,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),pq=ze("$ZodNullable",(e,t)=>{Yn.init(e,t),Sn(e._zod,"optin",()=>t.innerType._zod.optin),Sn(e._zod,"optout",()=>t.innerType._zod.optout),Sn(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${nx(n.source)}|null)$`):void 0}),Sn(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)}),hq=ze("$ZodDefault",(e,t)=>{Yn.init(e,t),e._zod.optin="optional",Sn(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=>qT(a,t)):qT(s,t)}});function qT(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const mq=ze("$ZodPrefault",(e,t)=>{Yn.init(e,t),e._zod.optin="optional",Sn(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))}),gq=ze("$ZodNonOptional",(e,t)=>{Yn.init(e,t),Sn(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=>HT(a,e)):HT(s,e)}});function HT(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 bq=ze("$ZodCatch",(e,t)=>{Yn.init(e,t),Sn(e._zod,"optin",()=>t.innerType._zod.optin),Sn(e._zod,"optout",()=>t.innerType._zod.optout),Sn(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=>fa(l,r,ca()))},input:n.value}),n.issues=[]),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(a=>fa(a,r,ca()))},input:n.value}),n.issues=[]),n)}}),yq=ze("$ZodPipe",(e,t)=>{Yn.init(e,t),Sn(e._zod,"values",()=>t.in._zod.values),Sn(e._zod,"optin",()=>t.in._zod.optin),Sn(e._zod,"optout",()=>t.out._zod.optout),Sn(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=>tp(l,t.in,r)):tp(a,t.in,r)}const s=t.in._zod.run(n,r);return s instanceof Promise?s.then(a=>tp(a,t.out,r)):tp(s,t.out,r)}});function tp(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const vq=ze("$ZodReadonly",(e,t)=>{Yn.init(e,t),Sn(e._zod,"propValues",()=>t.innerType._zod.propValues),Sn(e._zod,"values",()=>t.innerType._zod.values),Sn(e._zod,"optin",()=>t.innerType._zod.optin),Sn(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(GT):GT(s)}});function GT(e){return e.value=Object.freeze(e.value),e}const kq=ze("$ZodCustom",(e,t)=>{es.init(e,t),Yn.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=>VT(a,n,r,e));VT(s,n,r,e)}});function VT(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(Lc(s))}}class xq{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 Sq(){return new xq}const np=Sq();function wq(e,t){return new e({type:"string",...xt(t)})}function Eq(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...xt(t)})}function WT(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...xt(t)})}function Tq(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...xt(t)})}function _q(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...xt(t)})}function Rq(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...xt(t)})}function Cq(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...xt(t)})}function Nq(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...xt(t)})}function Aq(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...xt(t)})}function Oq(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...xt(t)})}function Iq(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...xt(t)})}function Mq(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...xt(t)})}function Dq(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...xt(t)})}function zq(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...xt(t)})}function jq(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...xt(t)})}function Lq(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...xt(t)})}function Pq(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...xt(t)})}function $q(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...xt(t)})}function Bq(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...xt(t)})}function Fq(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...xt(t)})}function Uq(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...xt(t)})}function qq(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...xt(t)})}function Hq(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...xt(t)})}function Gq(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...xt(t)})}function Vq(e,t){return new e({type:"string",format:"date",check:"string_format",...xt(t)})}function Wq(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...xt(t)})}function Kq(e,t){return new e({type:"string",format:"duration",check:"string_format",...xt(t)})}function Zq(e,t){return new e({type:"boolean",...xt(t)})}function Yq(e){return new e({type:"unknown"})}function Xq(e,t){return new e({type:"never",...xt(t)})}function cI(e,t){return new v5({check:"max_length",...xt(t),maximum:e})}function dh(e,t){return new k5({check:"min_length",...xt(t),minimum:e})}function fI(e,t){return new x5({check:"length_equals",...xt(t),length:e})}function Qq(e,t){return new S5({check:"string_format",format:"regex",...xt(t),pattern:e})}function Jq(e){return new w5({check:"string_format",format:"lowercase",...xt(e)})}function e8(e){return new E5({check:"string_format",format:"uppercase",...xt(e)})}function t8(e,t){return new T5({check:"string_format",format:"includes",...xt(t),includes:e})}function n8(e,t){return new _5({check:"string_format",format:"starts_with",...xt(t),prefix:e})}function r8(e,t){return new R5({check:"string_format",format:"ends_with",...xt(t),suffix:e})}function gf(e){return new C5({check:"overwrite",tx:e})}function i8(e){return gf(t=>t.normalize(e))}function s8(){return gf(e=>e.trim())}function o8(){return gf(e=>e.toLowerCase())}function a8(){return gf(e=>e.toUpperCase())}function l8(e,t,n){return new e({type:"array",element:t,...xt(n)})}function u8(e,t,n){return new e({type:"custom",check:"custom",fn:t,...xt(n)})}function c8(e){const t=f8(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Lc(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(Lc(s))}},e(n.value,n)));return t}function f8(e,t){const n=new es({check:"custom",...xt(t)});return n._zod.check=e,n}const d8=ze("ZodISODateTime",(e,t)=>{U5.init(e,t),Dn.init(e,t)});function p8(e){return Gq(d8,e)}const h8=ze("ZodISODate",(e,t)=>{q5.init(e,t),Dn.init(e,t)});function m8(e){return Vq(h8,e)}const g8=ze("ZodISOTime",(e,t)=>{H5.init(e,t),Dn.init(e,t)});function b8(e){return Wq(g8,e)}const y8=ze("ZodISODuration",(e,t)=>{G5.init(e,t),Dn.init(e,t)});function v8(e){return Kq(y8,e)}const k8=(e,t)=>{nI.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>LU(e,n)},flatten:{value:n=>jU(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,gv,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,gv,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ti=ze("ZodError",k8,{Parent:Error}),x8=ix(Ti),S8=sx(Ti),w8=cm(Ti),E8=fm(Ti),T8=BU(Ti),_8=FU(Ti),R8=UU(Ti),C8=qU(Ti),N8=HU(Ti),A8=GU(Ti),O8=VU(Ti),I8=WU(Ti),tr=ze("ZodType",(e,t)=>(Yn.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Ea(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]})),e.clone=(n,r)=>Co(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>x8(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>w8(e,n,r),e.parseAsync=async(n,r)=>S8(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>E8(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>T8(e,n,r),e.decode=(n,r)=>_8(e,n,r),e.encodeAsync=async(n,r)=>R8(e,n,r),e.decodeAsync=async(n,r)=>C8(e,n,r),e.safeEncode=(n,r)=>N8(e,n,r),e.safeDecode=(n,r)=>A8(e,n,r),e.safeEncodeAsync=async(n,r)=>O8(e,n,r),e.safeDecodeAsync=async(n,r)=>I8(e,n,r),e.refine=(n,r)=>e.check(wH(n,r)),e.superRefine=n=>e.check(EH(n)),e.overwrite=n=>e.check(gf(n)),e.optional=()=>YT(e),e.nullable=()=>XT(e),e.nullish=()=>YT(XT(e)),e.nonoptional=n=>gH(e,n),e.array=()=>rH(e),e.or=n=>oH([e,n]),e.and=n=>lH(e,n),e.transform=n=>QT(e,cH(n)),e.default=n=>pH(e,n),e.prefault=n=>mH(e,n),e.catch=n=>yH(e,n),e.pipe=n=>QT(e,n),e.readonly=()=>xH(e),e.describe=n=>{const r=e.clone();return np.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return np.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return np.get(e);const r=e.clone();return np.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),dI=ze("_ZodString",(e,t)=>{ox.init(e,t),tr.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(Qq(...r)),e.includes=(...r)=>e.check(t8(...r)),e.startsWith=(...r)=>e.check(n8(...r)),e.endsWith=(...r)=>e.check(r8(...r)),e.min=(...r)=>e.check(dh(...r)),e.max=(...r)=>e.check(cI(...r)),e.length=(...r)=>e.check(fI(...r)),e.nonempty=(...r)=>e.check(dh(1,...r)),e.lowercase=r=>e.check(Jq(r)),e.uppercase=r=>e.check(e8(r)),e.trim=()=>e.check(s8()),e.normalize=(...r)=>e.check(i8(...r)),e.toLowerCase=()=>e.check(o8()),e.toUpperCase=()=>e.check(a8())}),M8=ze("ZodString",(e,t)=>{ox.init(e,t),dI.init(e,t),e.email=n=>e.check(Eq(D8,n)),e.url=n=>e.check(Nq(z8,n)),e.jwt=n=>e.check(Hq(Y8,n)),e.emoji=n=>e.check(Aq(j8,n)),e.guid=n=>e.check(WT(KT,n)),e.uuid=n=>e.check(Tq(rp,n)),e.uuidv4=n=>e.check(_q(rp,n)),e.uuidv6=n=>e.check(Rq(rp,n)),e.uuidv7=n=>e.check(Cq(rp,n)),e.nanoid=n=>e.check(Oq(L8,n)),e.guid=n=>e.check(WT(KT,n)),e.cuid=n=>e.check(Iq(P8,n)),e.cuid2=n=>e.check(Mq($8,n)),e.ulid=n=>e.check(Dq(B8,n)),e.base64=n=>e.check(Fq(W8,n)),e.base64url=n=>e.check(Uq(K8,n)),e.xid=n=>e.check(zq(F8,n)),e.ksuid=n=>e.check(jq(U8,n)),e.ipv4=n=>e.check(Lq(q8,n)),e.ipv6=n=>e.check(Pq(H8,n)),e.cidrv4=n=>e.check($q(G8,n)),e.cidrv6=n=>e.check(Bq(V8,n)),e.e164=n=>e.check(qq(Z8,n)),e.datetime=n=>e.check(p8(n)),e.date=n=>e.check(m8(n)),e.time=n=>e.check(b8(n)),e.duration=n=>e.check(v8(n))});function pI(e){return wq(M8,e)}const Dn=ze("ZodStringFormat",(e,t)=>{Nn.init(e,t),dI.init(e,t)}),D8=ze("ZodEmail",(e,t)=>{M5.init(e,t),Dn.init(e,t)}),KT=ze("ZodGUID",(e,t)=>{O5.init(e,t),Dn.init(e,t)}),rp=ze("ZodUUID",(e,t)=>{I5.init(e,t),Dn.init(e,t)}),z8=ze("ZodURL",(e,t)=>{D5.init(e,t),Dn.init(e,t)}),j8=ze("ZodEmoji",(e,t)=>{z5.init(e,t),Dn.init(e,t)}),L8=ze("ZodNanoID",(e,t)=>{j5.init(e,t),Dn.init(e,t)}),P8=ze("ZodCUID",(e,t)=>{L5.init(e,t),Dn.init(e,t)}),$8=ze("ZodCUID2",(e,t)=>{P5.init(e,t),Dn.init(e,t)}),B8=ze("ZodULID",(e,t)=>{$5.init(e,t),Dn.init(e,t)}),F8=ze("ZodXID",(e,t)=>{B5.init(e,t),Dn.init(e,t)}),U8=ze("ZodKSUID",(e,t)=>{F5.init(e,t),Dn.init(e,t)}),q8=ze("ZodIPv4",(e,t)=>{V5.init(e,t),Dn.init(e,t)}),H8=ze("ZodIPv6",(e,t)=>{W5.init(e,t),Dn.init(e,t)}),G8=ze("ZodCIDRv4",(e,t)=>{K5.init(e,t),Dn.init(e,t)}),V8=ze("ZodCIDRv6",(e,t)=>{Z5.init(e,t),Dn.init(e,t)}),W8=ze("ZodBase64",(e,t)=>{Y5.init(e,t),Dn.init(e,t)}),K8=ze("ZodBase64URL",(e,t)=>{Q5.init(e,t),Dn.init(e,t)}),Z8=ze("ZodE164",(e,t)=>{J5.init(e,t),Dn.init(e,t)}),Y8=ze("ZodJWT",(e,t)=>{tq.init(e,t),Dn.init(e,t)}),X8=ze("ZodBoolean",(e,t)=>{nq.init(e,t),tr.init(e,t)});function Q8(e){return Zq(X8,e)}const J8=ze("ZodUnknown",(e,t)=>{rq.init(e,t),tr.init(e,t)});function ZT(){return Yq(J8)}const eH=ze("ZodNever",(e,t)=>{iq.init(e,t),tr.init(e,t)});function tH(e){return Xq(eH,e)}const nH=ze("ZodArray",(e,t)=>{sq.init(e,t),tr.init(e,t),e.element=t.element,e.min=(n,r)=>e.check(dh(n,r)),e.nonempty=n=>e.check(dh(1,n)),e.max=(n,r)=>e.check(cI(n,r)),e.length=(n,r)=>e.check(fI(n,r)),e.unwrap=()=>e.element});function rH(e,t){return l8(nH,e,t)}const iH=ze("ZodObject",(e,t)=>{aq.init(e,t),tr.init(e,t),Sn(e,"shape",()=>t.shape),e.keyof=()=>hI(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ZT()}),e.loose=()=>e.clone({...e._zod.def,catchall:ZT()}),e.strict=()=>e.clone({...e._zod.def,catchall:tH()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>OU(e,n),e.safeExtend=n=>IU(e,n),e.merge=n=>MU(e,n),e.pick=n=>NU(e,n),e.omit=n=>AU(e,n),e.partial=(...n)=>DU(mI,e,n[0]),e.required=(...n)=>zU(gI,e,n[0])});function ax(e,t){const n={type:"object",shape:e??{},...xt(t)};return new iH(n)}const sH=ze("ZodUnion",(e,t)=>{lq.init(e,t),tr.init(e,t),e.options=t.options});function oH(e,t){return new sH({type:"union",options:e,...xt(t)})}const aH=ze("ZodIntersection",(e,t)=>{uq.init(e,t),tr.init(e,t)});function lH(e,t){return new aH({type:"intersection",left:e,right:t})}const yv=ze("ZodEnum",(e,t)=>{cq.init(e,t),tr.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 yv({...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 yv({...t,checks:[],...xt(s),entries:a})}});function hI(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new yv({type:"enum",entries:n,...xt(t)})}const uH=ze("ZodTransform",(e,t)=>{fq.init(e,t),tr.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new YO(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(Lc(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(Lc(l))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(a=>(n.value=a,n)):(n.value=s,n)}});function cH(e){return new uH({type:"transform",transform:e})}const mI=ze("ZodOptional",(e,t)=>{dq.init(e,t),tr.init(e,t),e.unwrap=()=>e._zod.def.innerType});function YT(e){return new mI({type:"optional",innerType:e})}const fH=ze("ZodNullable",(e,t)=>{pq.init(e,t),tr.init(e,t),e.unwrap=()=>e._zod.def.innerType});function XT(e){return new fH({type:"nullable",innerType:e})}const dH=ze("ZodDefault",(e,t)=>{hq.init(e,t),tr.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function pH(e,t){return new dH({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():JO(t)}})}const hH=ze("ZodPrefault",(e,t)=>{mq.init(e,t),tr.init(e,t),e.unwrap=()=>e._zod.def.innerType});function mH(e,t){return new hH({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():JO(t)}})}const gI=ze("ZodNonOptional",(e,t)=>{gq.init(e,t),tr.init(e,t),e.unwrap=()=>e._zod.def.innerType});function gH(e,t){return new gI({type:"nonoptional",innerType:e,...xt(t)})}const bH=ze("ZodCatch",(e,t)=>{bq.init(e,t),tr.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function yH(e,t){return new bH({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const vH=ze("ZodPipe",(e,t)=>{yq.init(e,t),tr.init(e,t),e.in=t.in,e.out=t.out});function QT(e,t){return new vH({type:"pipe",in:e,out:t})}const kH=ze("ZodReadonly",(e,t)=>{vq.init(e,t),tr.init(e,t),e.unwrap=()=>e._zod.def.innerType});function xH(e){return new kH({type:"readonly",innerType:e})}const SH=ze("ZodCustom",(e,t)=>{kq.init(e,t),tr.init(e,t)});function wH(e,t={}){return u8(SH,e,t)}function EH(e){return c8(e)}function bI(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 TH=v.createContext(null);function _H(){return v.useContext(TH)}const RH=v.createContext("copy-with-plain-text");function CH(){return v.useContext(RH)}const NH="application/x-cursor-draggable",ip=OH("ui-i9pz9s"),AH="data-no-drag";let ta=!1,JT=!1;function OH(e){return e?.split(/\s+/).filter(Boolean)??[]}function sp(e,t,n){for(const r of t)e.classList.toggle(r,n)}function IH(){if(JT||typeof document>"u")return;JT=!0,document.addEventListener("pointerdown",t=>{if(t.button!==0||!(t.target instanceof Element)){ta=!1;return}ta=t.target.closest(`[${AH}]`)!==null},{capture:!0});const e=()=>{ta=!1};document.addEventListener("pointerup",e,{capture:!0}),document.addEventListener("pointercancel",e,{capture:!0})}function MH({id:e,data:t,disabled:n=!1,dragImageOffset:r,onDragStart:s,onDragEnd:a}){const l=_H(),c=CH(),d=v.useRef(null),f=v.useRef({onDragStart:s,onDragEnd:a});f.current={onDragStart:s,onDragEnd:a};const h=v.useRef(t);h.current=t;const m=v.useRef(r);m.current=r;const b=v.useRef(l);b.current=l;const y=l?.activeDragId===e,x=v.useRef(y);return x.current=y,v.useEffect(()=>{const E=d.current;if(E)return sp(E,ip,!n&&y),()=>{sp(E,ip,!1)}},[n,y]),v.useEffect(()=>{const E=d.current;if(!E)return;if(n){E.removeAttribute("aria-grabbed");return}const T=y?"true":"false";E.getAttribute("aria-grabbed")!==T&&E.setAttribute("aria-grabbed",T)},[n,y]),{ref:v.useCallback(E=>{if(d.current=E,!E)return;sp(E,ip,!n&&x.current);const T=!n;if(E.draggable!==T&&(E.draggable=T),n)return;IH();const R=ki.getInstance(),_=M=>{if(ta){ta=!1,M.preventDefault(),M.stopPropagation();return}const A=h.current;R.setData(A);const N=E.ownerDocument,P=()=>{N.removeEventListener("dragend",P,!0),N.removeEventListener("drop",P,!0),N.removeEventListener("mousemove",P,!0),setTimeout(()=>{R.getData()===A&&(R.clearData(),ta=!1,b.current?.setDragging(null,null))},0)};if(N.addEventListener("dragend",P,!0),N.addEventListener("drop",P,!0),N.addEventListener("mousemove",P,!0),M.dataTransfer){const z=c==="copy-with-plain-text";M.dataTransfer.effectAllowed=z?"copyMove":"move",M.dataTransfer.setData(NH,A.type),z&&M.dataTransfer.setData("text/plain",A.type);const D=m.current;D&&M.dataTransfer.setDragImage(E,D.x,D.y)}b.current?.setDragging(e,A,{x:M.clientX,y:M.clientY}),f.current.onDragStart?.(M)},C=M=>{R.clearData(),ta=!1,b.current?.setDragging(null,null),f.current.onDragEnd?.(M)};return E.addEventListener("dragstart",_),E.addEventListener("dragend",C),()=>{E.removeEventListener("dragstart",_),E.removeEventListener("dragend",C),sp(E,ip,!1)}},[e,n,c]),isDragging:y}}const Dp={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",kVAEAm:"ui-1n2onr6",kGVxlE:"ui-1gnnqk1",k7Eaqz:"ui-1i9suas",ks0D6T:"ui-1va8c73",kfSwDN:"ui-87ps6o",kY4cRS:"ui-lvsv26",k6sLGO:"ui-1q1rmc8",k3aq6I:"ui-17dzmu4",kgyCeQ:"ui-lp1x4z",kdrBUz:"ui-7iibnf",kHBbk8:"ui-c8icb0",ktR8K2:"ui-awy1a7",kgeoSG:"ui-1cpjm7i",kEoFBp:"ui-1hmns74",kFcpXp:"ui-xx281p",kPB484:"ui-xyica1",ktNmms:"ui-wfqmlb",km8f2m:"ui-kk1bqk",k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",kv0HGH:"ui-arstr8",kDVEDD:"ui-itxdhh",kUfP38:"ui-1k48kgn",kbMawA:"ui-1o7vem3",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-s7jddj",kaIpWk:"ui-1pkpdue",$$css:!0},hasAttachment:{kWkggS:"ui-jbqb8w",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",khm7nJ:"ui-3r2rup",kP1sEF:"ui-15ozc13",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}},DH={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}},wi={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-1x78n9t",$$css:!0},attachment:{kVAEAm:"ui-1n2onr6",kmuXW:"ui-2lah0s",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kWkggS:"ui-f1vpex",kaIpWk:"ui-1pjcqnp",kGVxlE:"ui-1x78n9t",$$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:{kzqmXN:"ui-h8yej3",kXHlph:"ui-6ikm8r",k5wCbM:"ui-1rohswg",kAnDOJ:"ui-6ehuon",kOuLrU:"ui-fk6m8",$$css:!0}},gi={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}},Fr={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}},ia={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}},ph={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",kYzy8m:"ui-1b3rhy7",k4QksK:"ui-azug9i",kA8bO0:"ui-p35uty",kOegPX:"ui-11nj3wz",kMHwGy:"ui-1db8ipi",kcy3WD:"ui-1xjs8pl",kScVoH:"ui-13d4rqg",kSTvrD:"ui-ejpia5",kb9Gwk:"ui-qcn5tc",kysnry:"ui-1hw1hzy",$$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}},zH={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}},jH={row:{kLKAdn:"ui-fs8kq3",kpe85a:"ui-9cta2o",kGO01o:"ui-b6dno7",kE3dHu:"ui-1166h4g",$$css:!0}},vv={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}},hh={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 LH(e,t=!1){return[NA,Dp.base,Ki.root,e==="md"&&Dp.sizeMd,t&&Dp.hasAttachment]}function PH(e=!1){return e&&Dp.dropIndicator}function $H(){return DH.base}function BH(){return wi.inner}function FH(){return wi.dropIndicatorSlot}function UH(e=!1){return[wi.layout,e&&wi.layoutCard,e&&Yh.border]}function qH(){return[wi.attachment,Yh.border]}function HH(){return wi.bodyScroll}function GH(){return wi.header}function VH(){return wi.footer}function WH(e=!1){return[wi.list,e&&wi.virtualizedList]}function KH(){return wi.virtualizedRow}function ZH(){return wi.virtualizedScroller}function lx(e={}){return[gi.base,e.selected&&gi.selected,e.inSubmenu&&!e.disabled&&gi.submenuHover,e.focused&&gi.focused,e.expanded&&gi.expanded,e.disabled&&gi.disabled,e.disabled&&e.focused&&gi.disabledFocused,e.hasDescription&&gi.hasDescription,e.variant==="muted"&&gi.muted,e.variant==="muted"&&e.focused&&gi.mutedFocused,e.indent&&gi.indent,e.topAlign&&gi.topAlign]}const YH={disabled:{kkrTdU:"ui-1h6gzvc",$$css:!0}};function XH(){return YH.disabled}function QH(e={}){return[Fr.left,e.hasDescription&&Fr.leftDescription,e.wideLeft&&Fr.leftWide,e.topAlign&&Fr.leftTopAlign]}function JH(){return Fr.content}function e7(e={}){return[Fr.right,e.hasDescription&&Fr.rightDescription,e.disabled&&Fr.rightDisabled,e.topAlign&&Fr.rightTopAlign,e.trailingHidden&&Fr.rightHidden]}function t7(){return Fr.submenuRight}function n7(){return Fr.wrapper}function r7(){return[Yl.root,Fr.title]}function i7(){return[Xi.root,Yl.root,Fr.description]}function s7(e){return[ia.wrapper,e&&ia.wrapperInline]}function o7(e){return[Yl.root,ia.title,e&&ia.titleInline]}function a7({inline:e,wrap:t}){return[Xi.root,Yl.root,ia.subtitle,e&&ia.subtitleInline,t&&ia.subtitleWrap]}function l7(){return jH.row}function u7(){return ph.wrapper}function c7(e){return[Xi.root,ph.title,e&&ph.titleAction]}function f7(){return ph.textAction}function d7(){return zH.divider}function ux(){return vv.surface}function yI(e){switch(e){case"default":return;case"medium":return vv.surfaceMedium;case"wide":return vv.surfaceWide;default:return e}}function p7(e){return[Xi.root,hh.empty,e&&hh.emptyIndent]}function h7(){return[Ki.root,hh.loading]}function m7(){return hh.loadingSpinner}const vI=v.createContext(null);function bf(e){const t=v.useContext(vI);if(!t)throw new Error(`${e} must be used within LegacyMenu.Content or LegacyMenu.SubMenuContent`);return t}function kI({children:e,activeIndex:t,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l=!1}){const c=v.useMemo(()=>({activeIndex:t,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l}),[t,n,r,s,a,l]);return g.jsx(vI.Provider,{value:c,children:e})}const xI=v.createContext(void 0);function pm(e){const t=v.useContext(xI);if(t===void 0&&!e)throw new Error(Mn(72));return t}const g7={...GN,disabled:tt(e=>e.disabled),instantType:tt(e=>e.instantType),isInstantPhase:tt(e=>e.isInstantPhase),trackCursorAxis:tt(e=>e.trackCursorAxis),disableHoverablePopup:tt(e=>e.disableHoverablePopup),lastOpenChangeReason:tt(e=>e.openChangeReason),closeOnClick:tt(e=>e.closeOnClick),closeDelay:tt(e=>e.closeDelay),hasViewport:tt(e=>e.hasViewport)};class cx extends Rk{constructor(t,n,r=!1){const s=new qh,a={...b7(),...t};a.floatingRootContext=qN(s,n,r),super(a,{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:s},g7)}setOpen=(t,n)=>{jN(this,t,n,{extraState:{openChangeReason:n.reason}})};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,Et(Vl,t))}static useStore(t,n){return zN(t,(s,a)=>new cx(n,s,a)).store}}function b7(){return{...UN(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}const y7=_k(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:s,disableHoverablePopup:a=!1,trackCursorAxis:l="none",actionsRef:c,onOpenChange:d,onOpenChangeComplete:f,handle:h,triggerId:m,defaultTriggerId:b=null,children:y}=t,x=cx.useStore(h?.store,{open:r,openProp:s,activeTriggerId:b,triggerIdProp:m});LN(x,s,r,b),x.useControlledProp("openProp",s),x.useControlledProp("triggerIdProp",m),x.useContextCallback("onOpenChange",d),x.useContextCallback("onOpenChangeComplete",f);const S=x.useState("open"),E=!n&&S,T=x.useState("activeTriggerId"),R=x.useState("mounted"),_=x.useState("payload");x.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:a}),x.useSyncedValue("disabled",n),$N(x,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:C,transitionStatus:M}=BN(E,x),A=x.useState("isInstantPhase"),N=x.useState("instantType"),P=x.useState("lastOpenChangeReason"),z=v.useRef(null);He(()=>{S&&n&&x.setOpen(!1,Et(HC))},[S,n,x]),He(()=>{M==="ending"&&P===Ii||M!=="ending"&&A?(N!=="delay"&&(z.current=N),x.set("instantType","delay")):z.current!==null&&(x.set("instantType",z.current),z.current=null)},[M,A,P,N,x]),He(()=>{E&&T==null&&x.set("payload",void 0)},[x,T,E]);const D=v.useCallback(()=>{x.setOpen(!1,Et(Bp))},[x]);v.useImperativeHandle(c,()=>({unmount:C,close:D}),[C,D]);const H=E||R||!n&&l!=="none";return g.jsxs(xI.Provider,{value:x,children:[H&&g.jsx(v7,{store:x,disabled:n,trackCursorAxis:l}),typeof y=="function"?y({payload:_}):y]})});function v7({store:e,disabled:t,trackCursorAxis:n}){const r=e.useState("floatingRootContext"),s=vk(r,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),a=o$(r,{enabled:!t&&n!=="none",axis:n==="none"?void 0:n}),l=v.useMemo(()=>Gi(a.reference,s.reference),[a.reference,s.reference]),c=v.useMemo(()=>Gi(a.trigger,s.trigger),[a.trigger,s.trigger]),d=v.useMemo(()=>Gi(Ck,a.floating,s.floating),[a.floating,s.floating]);return FN(e,{activeTriggerProps:l,inactiveTriggerProps:c,popupProps:d}),null}const k7=v.createContext(void 0);function x7(){return v.useContext(k7)}let S7=(function(e){return e[e.popupOpen=$p.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const w7=600,SI="data-base-ui-tooltip-trigger";function e_(e){if("composedPath"in e){const n=e.composedPath();for(let r=0;r<n.length;r+=1){const s=n[r];if(ft(s))return s}}const t=e.target;return ft(t)?t:null}function E7(e){let t=e;for(;t;){if(t.hasAttribute(SI))return t;const n=t.parentElement;if(n){t=n;continue}const r=t.getRootNode();t="host"in r&&ft(r.host)?r.host:null}return null}const T7=IN(function(t,n){const{render:r,className:s,style:a,handle:l,payload:c,disabled:d,delay:f,closeOnClick:h=!0,closeDelay:m,id:b,...y}=t,x=pm(!0),S=l?.store??x;if(!S)throw new Error(Mn(82));const E=Wl(b),T=S.useState("isTriggerActive",E),R=S.useState("isOpenedByTrigger",E),_=S.useState("floatingRootContext"),C=v.useRef(null),M=f??w7,A=m??0,{registerTrigger:N,isMountedByThisTrigger:P}=PN(E,C,S,{payload:c,closeOnClick:h,closeDelay:A}),z=x7(),{delayRef:D,isInstantPhase:H,hasProvider:W}=wP(_,{open:R}),F=Ok(_);S.useSyncedValue("isInstantPhase",H);const L=S.useState("disabled"),U=d??L,q=In(U),Z=S.useState("trackCursorAxis"),B=S.useState("disableHoverablePopup"),K=v.useRef(!1),O=Si(),$=v.useRef(void 0);function V(){const ae=z?.delay,ye=typeof D.current=="object"?D.current.open:void 0;let we=M;return W&&(ye!==0?we=f??ae??M:we=0),we}function j(ae){const ye=C.current;if(!ye||!ae)return!1;const we=E7(ae);return we!==null&&we!==ye&&dt(ye,we)}function X(ae){const ye=j(ae);return K.current=ye,ye&&(F.openChangeTimeout.clear(),F.restTimeout.clear(),F.restTimeoutPending=!1,O.clear()),ye}const se=YN(_,{enabled:!U,mouseOnly:!0,move:!1,handleClose:!B&&Z!=="both"?XN():null,restMs:V,delay(){const ae=typeof D.current=="object"?D.current.close:void 0;let ye=A;return m==null&&W&&(ye=ae),{close:ye}},triggerElementRef:C,isActiveTrigger:T,isClosing:()=>S.select("transitionStatus")==="ending",shouldOpen(){return!K.current}}),re=WN(_,{enabled:!U}).reference,oe=ae=>{const ye=K.current,we=e_(ae),Ae=X(we),Ee=C.current,xe=Ee&&we&&dt(Ee,we);if(Ae&&S.select("open")&&S.select("lastOpenChangeReason")===_r){S.setOpen(!1,Et(_r,ae));return}if(ye&&!Ae&&xe&&!q.current&&!S.select("open")&&Ee&&aa($.current)){const De=()=>{!K.current&&!q.current&&!S.select("open")&&S.setOpen(!0,Et(_r,ae,Ee))},Ie=V();Ie===0?(O.clear(),De()):O.start(Ie,De)}},ue=S.useState("triggerProps",P);return mn("button",t,{state:{open:R},ref:[n,N,C],props:[se,re,P||Z!=="none"?ue:void 0,{onMouseOver(ae){oe(ae.nativeEvent)},onFocus(ae){j(e_(ae.nativeEvent))&&ae.preventBaseUIHandler()},onMouseLeave(){K.current=!1,O.clear(),$.current=void 0},onPointerEnter(ae){$.current=ae.pointerType},onPointerDown(ae){$.current=ae.pointerType,S.set("closeOnClick",h),h&&!S.select("open")&&S.cancelPendingOpen(ae.nativeEvent)},onClick(ae){h&&!S.select("open")&&S.cancelPendingOpen(ae.nativeEvent)},id:E,[S7.triggerDisabled]:U?"":void 0,[SI]:U?void 0:""},y],stateAttributesMapping:BC})}),wI=v.createContext(void 0);function _7(){const e=v.useContext(wI);if(e===void 0)throw new Error(Mn(70));return e}const R7=v.forwardRef(function(t,n){const{keepMounted:r=!1,...s}=t;return pm().useState("mounted")||r?g.jsx(wI.Provider,{value:r,children:g.jsx(EO,{ref:n,...s})}):null}),EI=v.createContext(void 0);function C7(){const e=v.useContext(EI);if(e===void 0)throw new Error(Mn(71));return e}const N7=v.forwardRef(function(t,n){const{render:r,className:s,anchor:a,positionMethod:l="absolute",side:c="top",align:d="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b=5,arrowPadding:y=5,sticky:x=!1,disableAnchorTracking:S=!1,collisionAvoidance:E=cN,style:T,...R}=t,_=pm(),C=_7(),M=_.useState("open"),A=_.useState("mounted"),N=_.useState("trackCursorAxis"),P=_.useState("disableHoverablePopup"),z=_.useState("floatingRootContext"),D=_.useState("instantType"),H=_.useState("transitionStatus"),W=_.useState("hasViewport"),F=$k({anchor:a,positionMethod:l,floatingRootContext:z,mounted:A,side:c,sideOffset:f,align:d,alignOffset:h,collisionBoundary:m,collisionPadding:b,sticky:x,arrowPadding:y,disableAnchorTracking:S,keepMounted:C,collisionAvoidance:E,adaptiveOrigin:W?xA:void 0}),L=v.useMemo(()=>({open:M,side:F.side,align:F.align,anchorHidden:F.anchorHidden,instant:N!=="none"?"tracking-cursor":D}),[M,F.side,F.align,F.anchorHidden,N,D]),U=Bk(t,L,{styles:F.positionerStyles,transitionStatus:H,props:R,refs:[n,_.useStateSetter("positionerElement")],hidden:!A,inert:!M||N==="both"||P});return g.jsx(EI.Provider,{value:F,children:U})}),A7={...nf,...xo},O7=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,c=pm(),{side:d,align:f}=C7(),h=c.useState("open"),m=c.useState("instantType"),b=c.useState("transitionStatus"),y=c.useState("popupProps"),x=c.useState("floatingRootContext"),S=c.useState("disabled"),E=c.useState("closeDelay");To({open:h,ref:c.context.popupRef,onComplete(){h&&c.context.onOpenChangeComplete?.(!0)}}),ZN(x,{enabled:!S,closeDelay:E});const T=c.useStateSetter("popupElement");return mn("div",t,{state:{open:h,side:d,align:f,instant:m,transitionStatus:b},ref:[n,c.context.popupRef,T],props:[y,Kh(b),l],stateAttributesMapping:A7})}),I7=v.createContext(null),M7={base:{kfSwDN:"ui-87ps6o",kfzvcC:"ui-47corl",$$css:!0}},TI=v.createContext(null);function _I(e){const t=v.use(TI);if(t===null)throw new Error(`${e} must be used within Tooltip.Root`);return t}function RI({children:e,placement:t=Xh,offset:n=8,openDelay:r=Uk,closeDelay:s=Qh,disabled:a=!1,defaultOpen:l,open:c,sameAxisOnly:d=!1,onOpenChange:f,onOpenChangeComplete:h}){const m=v.use(I7),b=v.use(lh),y=a||b,x=m?.open??r,S=m?.close??s,E=v.useMemo(()=>({disabled:y,instantDismiss:b,offset:n,placement:t,sameAxisOnly:d,triggerCloseDelay:S,triggerDelay:x}),[y,b,n,t,d,S,x]);return g.jsx(TI.Provider,{value:E,children:g.jsx(y7,{defaultOpen:l,disabled:y,disableHoverablePopup:!0,onOpenChange:f,onOpenChangeComplete:h,open:c,children:e})})}function CI({children:e,ref:t,...n}){const{disabled:r,triggerCloseDelay:s,triggerDelay:a}=_I("Tooltip.Trigger"),l=e.props?.id;return g.jsx(T7,{...n,closeDelay:s,delay:a,disabled:r,id:l??n.id,ref:t,render:e})}function NI({content:e,anchor:t,ariaLabel:n,width:r,minWidth:s,maxWidth:a}){const{instantDismiss:l,offset:c,placement:d,sameAxisOnly:f}=_I("Tooltip.Popup"),h=ka(),{side:m,align:b,sideOffset:y,alignOffset:x,collisionAvoidance:S,positionMethod:E}=Jh(d,c,f),T=Ct(E4),R=Ct(Fk,CA,T4,M7.base,Zh);return l?null:g.jsx(R7,{container:h??void 0,children:g.jsx(N7,{align:b,alignOffset:x,anchor:t,className:T.className,collisionAvoidance:S,collisionPadding:8,positionMethod:E,side:m,sideOffset:y,style:T.style,children:g.jsx(O7,{"aria-label":n,className:R.className,"data-component":"tooltip-popup",role:"tooltip",style:r===void 0&&s===void 0&&a===void 0?R.style:{...R.style,width:r,minWidth:s,maxWidth:a},children:typeof e=="function"?e():e})})})}function D7({children:e,anchor:t,"aria-label":n,width:r,minWidth:s,maxWidth:a}){return g.jsx(NI,{anchor:t,ariaLabel:n,content:e,maxWidth:a,minWidth:s,width:r})}function kv({children:e,content:t,placement:n,offset:r,openDelay:s,closeDelay:a,disabled:l,defaultOpen:c,open:d,"aria-label":f,width:h,minWidth:m,maxWidth:b,sameAxisOnly:y,onOpenChange:x,onOpenChangeComplete:S,ref:E,...T}){const R=v.Children.only(e);return v.isValidElement(R)?g.jsxs(RI,{closeDelay:a,defaultOpen:c,disabled:l,offset:r,onOpenChange:x,onOpenChangeComplete:S,open:d,openDelay:s,placement:n,sameAxisOnly:y,children:[g.jsx(CI,{...T,ref:E,children:R}),g.jsx(NI,{ariaLabel:f,content:t,maxWidth:b,minWidth:m,width:h})]}):g.jsx(g.Fragment,{children:e})}(function(e){e.Root=RI,e.Trigger=CI,e.Popup=D7})(kv||(kv={}));const z7="ui-menu",fx="ui-menu__backdrop",j7="ui-menu__list",L7="ui-menu__content",P7="ui-menu__drop-indicator-slot",$7="ui-menu__layout",B7="ui-menu__body-scroll",F7="ui-menu__header",U7="ui-menu__footer",q7="ui-menu__attachment",H7="ui-menu__row",G7="ui-menu__item-left",V7="ui-menu__item-content",W7="ui-menu__item-right",K7="ui-menu__item-wrapper",Z7="ui-menu__item-title",Y7="ui-menu__item-description",X7="ui-menu__text-wrapper",Q7="ui-menu__title",J7="ui-menu__subtitle",eG="ui-menu__search-row",tG="ui-menu__section",nG="ui-menu__section-title",rG="ui-menu__section-text-action",iG="ui-menu__virtualized-section-divider",sG="ui-menu__submenu-trigger",oG="ui-menu__submenu-right-section",aG="ui-menu__toggle-row",lG="ui-menu__tooltip",uG="ui-menu__empty",cG="ui-menu__loading",fG="ui-menu__loading-spinner",dG="ui-menu__virtualized-row",pG="ui-menu__virtualized-scroller";function nn(e,t,n={}){return Lt({rootClass:e,stylexStyles:t,className:n.className,style:n.style})}function dx({className:e,hasDropIndicator:t=!1,size:n,style:r,hasAttachment:s=!1,surfaceStyle:a}){return a=[PH(t),a],nn(z7,[LH(n,s),a],{className:e,style:r})}function AI(e){return nn(fx,$H(),{style:e})}function px(e=!1,t){return nn(j7,[WH(e),t],{className:e?"ui-menu__list--virtualized":void 0})}function hx(e){return nn(L7,[BH(),e])}function hG(){return nn(P7,FH())}function OI(e,t=!1,n){return nn($7,[UH(t),n],{style:e})}function mG(){return nn(q7,qH())}function II(){return nn(F7,GH())}function MI(){return nn(U7,VH())}function mx(e={},t){return nn(H7,[{"ui--default-marker":"ui--default-marker",$$css:!0},lx(e),t],{className:e.className})}function gG(e={},t){return nn(aG,[lx(e),e.disabled&&XH(),t],{className:e.className})}function bG(e={}){return nn(sG,lx(e),{className:e.className})}function yG(e={},t){return nn(G7,[QH(e),t])}function vG(e){return nn(V7,[JH(),e])}function kG(e={},t){return nn(W7,[e7(e),t])}function gx(){return nn(K7,n7())}function bx(){return nn(Z7,r7())}function yx(){return nn(Y7,i7())}function xG(e){return nn(X7,s7(e))}function SG(e){return nn(Q7,o7(e))}function wG({inline:e,wrap:t}){return nn(J7,a7({inline:e,wrap:t}))}function EG(e,t){return nn(eG,[l7(),t],{className:e})}function TG(e){return nn(tG,[u7(),e])}function DI(e,t){return nn(nG,[c7(e),t])}function _G(){return nn(rG,f7())}function RG(){return nn(iG,d7())}function CG(){return nn(oG,t7())}function NG(e,t){return nn(uG,[p7(e),t])}function AG(){return nn(cG,h7())}function OG(){return nn(dG,KH())}function IG(){return nn(pG,ZH())}const MG=nn(fG,m7()).className,mh="submenuOpenChange",vx=v.createContext(null);function kx(e){return Math.max(e,Qh)}function xx(){return v.use(vx)}function Sx({children:e,layerNodeId:t,placement:n="right-start"}){const r=Ro(),[s,a]=v.useState(new Set);v.useEffect(()=>{if(!r)return;const d=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(mh,d),()=>{r.events.off(mh,d)}},[r,t]);const l=s.size>0,c=v.useMemo(()=>({hasOpenChild:l}),[l]);return g.jsx(vx.Provider,{value:c,children:g.jsx(Dc,{offset:6,placement:n,sameAxisOnly:!0,children:e})})}function DG({content:e,surfaceStyle:t}){return g.jsx(Dc.Popup,{surfaceClassName:lG,surfaceStyle:[ux(),t],children:typeof e=="function"?e():e})}function zI({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,surfaceStyle:l}){const c=v.use(vx);return c==null?g.jsx(g.Fragment,{children:e}):g.jsx(Dc.Trigger,{closeDelay:kx(a),content:g.jsx(DG,{content:t,surfaceStyle:l}),contentKey:n,openDelay:s,disabled:r||c.hasOpenChild,children:e})}function zG(e,t){const n=Ro(),r=_o();v.useEffect(()=>{if(!n||e===void 0)return;const s={nodeId:e,parentId:r,isOpen:t};return n.events.emit(mh,s),()=>{t&&n.events.emit(mh,{nodeId:e,parentId:r,isOpen:!1})}},[n,e,r,t])}function yf({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,interactive:l=!0,surfaceStyle:c}){return xx()!=null?g.jsx(zI,{closeDelay:a,content:t,contentKey:n,disabled:r,openDelay:s,surfaceStyle:c,children:e}):l?g.jsx(OO,{closeDelay:kx(a),content:t,disabled:r,offset:6,openDelay:s,placement:"right",sameAxisOnly:!0,surfaceStyle:[ux(),c],children:e}):g.jsx(kv,{closeDelay:a,content:t,disabled:r,offset:6,openDelay:s,placement:"right",sameAxisOnly:!0,children:e})}function Fl({children:e,disabled:t=!1,hasDescription:n=!1,leading:r,trailing:s,rightFallback:a,trailingAccessory:l,topAlign:c=!1,trailingHidden:d=!1,wideLeft:f=!1,leadingStyle:h,contentStyle:m,trailingStyle:b}){const y=s??a,x=y!=null||l!=null,S=yG({hasDescription:n,topAlign:c,wideLeft:f},h),E=vG(m),T=kG({disabled:t,hasDescription:n,topAlign:c,trailingHidden:d},b);return g.jsxs(Ms,{iconSize:"base",children:[r!=null?g.jsx("span",{className:S.className,style:S.style,"data-component":"menu-item-left",children:r}):null,g.jsx("div",{className:E.className,style:E.style,"data-component":"menu-item-content",children:e}),x?g.jsxs("span",{className:T.className,style:T.style,"data-component":"menu-item-right",children:[y,l]}):null]})}const jI=v.createContext(!1);function vf(){return v.useContext(jI)}const hm=v.createContext(null);function mm(e){const t=v.useContext(hm);if(!t)throw new Error(`${e} must be used within LegacyMenu.SubMenu`);return t}function jG(){return mm("LegacyMenu.SubMenu.useContext")}function wx(){const e=v.useContext(hm),{setIsOpen:t,dismissCauseRef:n}=ZO();return v.useCallback(r=>{n.current="selection",r(!1),e!=null&&t(!1)},[e,t,n])}function Ex(e,t,n){const{searchValue:r}=bf(n);return t||!r||!e?!0:e.toLowerCase().includes(r.toLowerCase())}const LG=bI("@@menu-item-noop",()=>ax({})),PG=new LG({}),LI=v.createContext(null);function $G(){return v.useContext(LI)}function PI({children:e,label:t,ignoreSearch:n=!1,...r}){const s=t??(typeof e=="string"?e:"");return Ex(s,n,"LegacyMenu.Item")?g.jsx($I,{...r,contextPart:"LegacyMenu.Item",itemLabel:s,children:e}):null}function $I({children:e,"data-testid":t,"aria-haspopup":n,"aria-expanded":r,mentionMenuFlatIndex:s,disabled:a=!1,onMouseDown:l,onAuxClick:c,onSelect:d,onKeyDown:f,leading:h,trailing:m,tooltip:b,tooltipDisabled:y=!1,tooltipOpenDelay:x=0,tooltipCloseDelay:S=0,tooltipSurface:E="default",closeOnSelect:T,description:R,rootStyle:_,leadingStyle:C,contentStyle:M,trailingStyle:A,variant:N="default",trailingVisibility:P="always",selected:z=!1,radioChecked:D,indent:H=!1,wideLeftSection:W=!1,draggable:F,ref:L,itemLabel:U,referenceRef:q,itemPropsTransform:Z,trailingAccessory:B,contextPart:K}){const{activeIndex:O,setIsOpen:$,getItemProps:V,closeOnSelect:j,virtualFocus:X}=bf(K),{shouldAllowPointerInteraction:se}=Ji(K),re=vf(),oe=wx(),ue=mf(),ce=ue==="body",ge=T??j??!0,{ref:Ce,index:ae}=tm({label:U||null}),ye=O===ae,[we,Ae]=v.useState(!1);xx();const Ee=v.useRef(null),xe=v.useId(),De=F!=null,Ie=F?.mode==="pointer",je=v.useSyncExternalStore(ki.subscribe,ki.isDragActive,ki.isDragActive),Ue=v.useRef(null),ke=v.useRef(null),Te=v.useRef(null),te=v.useRef(null),fe=v.useRef(!1),[J,ne]=v.useState(null),{ref:be,isDragging:Ge}=MH({id:F?.id??`menu-item-${xe}`,data:F?.data??PG,disabled:!De||Ie||(F?.disabled??!1),dragImageOffset:F?.dragImageOffset,onDragStart:F?.onDragStart,onDragEnd:F?.onDragEnd}),Ze=cf([Ce,q,L,De&&!Ie?be:null]),Xe=v.useCallback($e=>{Ee.current=$e},[]),vt=v.useMemo(()=>({setSubMenuOpen:Ae,isSubMenuOpen:we,registerSubMenuOpener:Xe}),[we,Xe]),Je=yI(E);v.useEffect(()=>()=>{Ue.current?.(),Te.current!=null&&cancelAnimationFrame(Te.current)},[]);const mt=v.useCallback(()=>{Te.current=null;const $e=ke.current,kt=te.current;!$e||!kt||($e.style.transform=`translate3d(${kt.x+8}px, ${kt.y+8}px, 0)`)},[]),Tt=v.useCallback($e=>{te.current=$e,Te.current==null&&(Te.current=requestAnimationFrame(mt))},[mt]),st=v.useCallback($e=>{ke.current=$e,mt()},[mt]),_t=()=>{if(a)return;const $e={defaultPrevented:!1,preventDefault:()=>{$e.defaultPrevented=!0}};d?.($e),ge&&!$e.defaultPrevented&&oe($)},Ot=$e=>{if(fe.current){fe.current=!1,$e.preventDefault(),$e.stopPropagation();return}if(!se($e.nativeEvent)){$e.preventDefault(),$e.stopPropagation();return}_t()},ot=v.useCallback($e=>{if(!se($e.nativeEvent)){$e.preventDefault(),$e.stopPropagation();return}if(l?.($e),!$e.defaultPrevented){if(Ie&&F!=null&&!F.disabled&&$e.button===0){Ue.current?.();const kt=ki.getInstance(),Ht=$e.currentTarget,bt={clientX:$e.clientX,clientY:$e.clientY,isDragging:!1},Yt=()=>{document.removeEventListener("mousemove",zn,!0),document.removeEventListener("mouseup",Wr,!0),Te.current!=null&&(cancelAnimationFrame(Te.current),Te.current=null),te.current=null,Ue.current=null,kt.clearData(),setTimeout(()=>{fe.current=!1},0)},zn=An=>{const Nr=An.clientX-bt.clientX,Ca=An.clientY-bt.clientY;if(!(!bt.isDragging&&Math.hypot(Nr,Ca)<4)){if(!bt.isDragging){bt.isDragging=!0,fe.current=!0,kt.setData(F.data);const ns=Ht.getBoundingClientRect().width;Tt({x:An.clientX,y:An.clientY}),ne(ns),F.onPointerDragStart?.(An)}An.preventDefault(),Tt({x:An.clientX,y:An.clientY}),F.onPointerDragMove?.(An)}},Wr=An=>{if(!bt.isDragging){Yt();return}An.preventDefault(),ne(null),F.onPointerDragEnd?.(An),Yt()};Ue.current=Yt,document.addEventListener("mousemove",zn,!0),document.addEventListener("mouseup",Wr,!0)}X&&!De&&$e.preventDefault()}},[F,De,Ie,l,Tt,se,X]),St=v.useCallback($e=>{if(!se($e.nativeEvent)){$e.preventDefault(),$e.stopPropagation();return}c?.($e)},[c,se]),jt=V({onClick:Ot,onKeyDown:$e=>{a||(f?.($e),!$e.defaultPrevented&&(($e.key==="Enter"||$e.key===" ")&&($e.preventDefault(),$e.stopPropagation(),_t()),$e.key==="ArrowRight"&&Ee.current&&($e.preventDefault(),$e.stopPropagation(),Ee.current())))},onMouseDown:ot,onAuxClick:St}),Dt=Z?.(jt)??jt,Y=m!=null?g.jsx(LI.Provider,{value:vt,children:m}):void 0,he=gx(),Le=bx(),Qe=yx(),wt=R!=null?g.jsxs("div",{className:he.className,style:he.style,children:[g.jsx("div",{className:Le.className,style:Le.style,children:e}),g.jsx("div",{className:Qe.className,style:Qe.style,"data-component":"menu-item-description",children:R})]}):e,lt=y||je||we,qe=P==="focused"&&(je||!ye),_e=mx({disabled:a,expanded:r===!0,focused:!je&&ye,hasDescription:R!=null,indent:H,inSubmenu:re,selected:z,variant:N},_),Se={role:D===void 0?"menuitem":"menuitemradio",tabIndex:ye?0:-1,...D!==void 0?{"aria-checked":D}:{},...n!==void 0?{"aria-haspopup":n}:{},...r!==void 0?{"aria-expanded":r}:{},"aria-disabled":a||void 0,"data-component":"menu-row","data-expanded":r===!0||void 0,draggable:Ie?!1:void 0,"data-disabled":a||void 0,"data-focused":!je&&ye?!0:void 0,"data-menu-draggable":De||void 0,"data-selected":z||void 0,"data-has-description":R!=null||void 0,"data-variant":N!=="default"?N:void 0,"data-indent":H||void 0,"data-wide-left":W||void 0,"data-dragging":Ge||J!=null||void 0,...t?{"data-testid":t}:{},...s!==void 0?{"data-mention-menu-flat-index":String(s)}:{},[Xl]:ue,className:_e.className,style:_e.style,...Dt},Ye={className:"ui-u96u03 ui-47corl ui-ixxii4 ui-13vifvy ui-u1ixa1 ui-1so62im ui-18ivbjn"},Me=J!=null&&F?.preview!=null?zi.createPortal(g.jsx("div",{"aria-hidden":"true",ref:st,className:Ye.className,style:{...Ye.style,width:J},children:F.preview}),document.body):null,Pe=ce?g.jsxs("li",{ref:Ze,...Se,children:[g.jsx(Fl,{disabled:a,hasDescription:R!=null,leading:h,trailing:Y,trailingAccessory:B,trailingHidden:qe,wideLeft:W,leadingStyle:C,contentStyle:M,trailingStyle:A,children:wt}),Me]}):g.jsxs("div",{ref:Ze,...Se,children:[g.jsx(Fl,{disabled:a,hasDescription:R!=null,leading:h,trailing:Y,trailingAccessory:B,trailingHidden:qe,wideLeft:W,leadingStyle:C,contentStyle:M,trailingStyle:A,children:wt}),Me]});return b!=null?g.jsx(yf,{closeDelay:S,content:lt?null:b,disabled:lt,openDelay:x,surfaceStyle:Je,children:Pe}):Pe}const BI=v.createContext(null);function FI(e){const t=v.useContext(BI);if(!t)throw new Error(`${e} must be used within LegacyMenu.ExpandableSection`);return t}function BG({children:e,defaultExpanded:t=!1,expanded:n,onExpandedChange:r}){const[s,a]=v.useState(t),l=n!==void 0,c=l?n:s,d=h=>{l||a(h),r?.(h)},f=()=>d(!c);return g.jsx(BI.Provider,{value:{expanded:c,setExpanded:d,toggle:f},children:e})}function FG({children:e,contentStyle:t,leading:n,leadingStyle:r,rootStyle:s,trailing:a,trailingStyle:l,label:c}){const{expanded:d,setExpanded:f,toggle:h}=FI("LegacyMenu.ExpandableSectionTrigger"),m=typeof n=="function"?n(d):n,b=y=>{if(y.key==="ArrowRight"&&!d){y.preventDefault(),y.stopPropagation(),f(!0);return}y.key==="ArrowLeft"&&d&&(y.preventDefault(),y.stopPropagation(),f(!1))};return g.jsx(PI,{closeOnSelect:!1,contentStyle:t,wideLeftSection:!0,leading:m,leadingStyle:r,rootStyle:s,trailing:a,trailingStyle:l,label:c??(typeof e=="string"?e:void 0),onKeyDown:b,onSelect:h,children:e})}function UG({children:e}){const{expanded:t}=FI("LegacyMenu.ExpandableSectionContent");return t?g.jsx(g.Fragment,{children:e}):null}function qG({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return Ex(s,n,"LegacyMenu.CheckboxItem")?g.jsx(HG,{...r,itemLabel:s,children:e}):null}function HG({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,trailing:l,description:c,tooltip:d,tooltipOpenDelay:f=0,tooltipCloseDelay:h=0,tooltipSurface:m="default",closeOnSelect:b,itemLabel:y,rootStyle:x,contentStyle:S,trailingStyle:E}){const{activeIndex:T,getItemProps:R,setIsOpen:_,closeOnSelect:C}=bf("LegacyMenu.CheckboxItem"),{shouldAllowPointerInteraction:M}=Ji("LegacyMenu.CheckboxItem"),A=vf(),N=wx(),P=mf(),z=P==="body",D=b??C??!1,[H,W]=v.useState(r),F=n!==void 0,L=F?n:H,{ref:U,index:q}=tm({label:y||null}),Z=T===q,B=xx(),K=yI(m),O=v.useCallback(()=>{if(a)return;const Ae=!L;F||W(Ae);const Ee={defaultPrevented:!1,preventDefault:()=>{Ee.defaultPrevented=!0}};s?.(Ae,Ee),D&&!Ee.defaultPrevented&&N(_)},[a,L,F,s,D,_,N]),$=v.useCallback(Ae=>{if(!M(Ae.nativeEvent)){Ae.preventDefault(),Ae.stopPropagation();return}Ae.preventDefault(),Ae.stopPropagation(),O()},[O,M]),V=v.useCallback(Ae=>{a||(Ae.key==="Enter"||Ae.key===" ")&&(Ae.preventDefault(),Ae.stopPropagation(),O())},[a,O]),j=R({onClick:$,onKeyDown:V}),X=c!=null,se=mx({disabled:a,focused:Z,hasDescription:X,inSubmenu:A},x),re={role:"menuitemcheckbox","aria-checked":L,tabIndex:Z?0:-1,"aria-disabled":a||void 0,"data-checked":L||void 0,"data-component":"menu-row","data-disabled":a||void 0,"data-focused":Z||void 0,"data-has-description":X||void 0,...t?{"data-testid":t}:{},[Xl]:P,className:se.className,style:se.style,...j},oe=g.jsx(pA,{checked:L,disabled:a}),ue=gx(),ce=bx(),ge=yx(),Ce=X?g.jsxs("div",{className:ue.className,style:ue.style,children:[g.jsx("div",{className:ce.className,style:ce.style,children:e}),g.jsx("div",{className:ge.className,style:ge.style,"data-component":"menu-item-description",children:c})]}):e,ae=g.jsx(Fl,{disabled:a,hasDescription:X,leading:oe,trailing:l,contentStyle:S,trailingStyle:E,children:Ce}),ye=d!=null&&B!=null,we=z?g.jsx("li",{ref:U,...re,children:ae}):g.jsx("div",{ref:U,...re,children:ae});return ye?g.jsx(zI,{closeDelay:h,content:d,openDelay:f,surfaceStyle:K,children:we}):d!=null?g.jsx(OO,{content:d,placement:"right",offset:6,openDelay:f,closeDelay:kx(h),sameAxisOnly:!0,surfaceStyle:[ux(),K],children:we}):we}function by(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 GG(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 VG(e){const{accept:t,disabled:n=!1,acceptNativeTypes:r,onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c}=e,d=v.useRef(null),f=v.useRef(null),h=v.useRef(0),m=v.useRef(null),[b,y]=v.useState(!1),[x,S]=v.useState(!1),E=v.useRef(b);E.current=b;const T=v.useCallback(()=>{h.current=0,y(!1),S(!1)},[]),R=v.useCallback(()=>{m.current!==null&&(cancelAnimationFrame(m.current),m.current=null)},[]);v.useEffect(()=>{if(!b)return;const N=f.current?.ownerDocument??document,P=()=>{R(),T()};return N.addEventListener("mousemove",P,!0),()=>{N.removeEventListener("mousemove",P,!0)}},[b,R,T]);const _=v.useRef({onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c});_.current={onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c};const C=v.useRef(r);C.current=r;const M=v.useRef(Array.isArray(t)?t:[t]);M.current=Array.isArray(t)?t:[t];const A=v.useCallback(N=>{if(f.current=N,d.current&&(d.current(),d.current=null),h.current=0,N!==null&&(y(!1),S(!1)),!N||n)return;const P=ki.getInstance(),z=B=>{if(h.current++,h.current===1){y(!0);const K=M.current,O=!n&&P.hasAnyClass(K),$=O||!n&&by(B,C.current);S($);const V=O?P.getValidatedData(K):null;_.current.onDragEnter?.(B,V)}},D=B=>{h.current=Math.max(0,h.current-1),h.current===0&&(R(),T(),_.current.onDragLeave?.(B))},H=B=>{const K=M.current,O=!n&&P.hasAnyClass(K),$=!O&&!n&&by(B,C.current);if(O||$){if(B.preventDefault(),B.dataTransfer&&(B.dataTransfer.dropEffect=O?"move":"copy"),h.current===0){h.current=1,y(!0),S(!0);const V=O?P.getValidatedData(K):null;_.current.onDragEnter?.(B,V)}if(_.current.onDragOver&&m.current===null){const V=O?P.getValidatedData(K):null;m.current=requestAnimationFrame(()=>{m.current=null,_.current.onDragOver?.(B,V)})}}},W=B=>{B.preventDefault(),R(),T();const K=M.current;if(P.hasAnyClass(K)){const O=P.getValidatedData(K),{onDrop:$}=_.current;$&&($(B,O),B.stopPropagation())}else if(by(B,C.current)){const{onDrop:O}=_.current;O&&(O(B,null),B.stopPropagation())}};N.addEventListener("dragenter",z),N.addEventListener("dragleave",D),N.addEventListener("dragover",H),N.addEventListener("drop",W);const F=N.ownerDocument,L=()=>{(h.current!==0||E.current)&&(R(),T())},U=()=>L(),q=()=>L(),Z=B=>{GG(B,F)&&L()};F.addEventListener("drop",U,!0),F.addEventListener("dragend",q,!0),F.addEventListener("dragleave",Z,!0),d.current=()=>{N.removeEventListener("dragenter",z),N.removeEventListener("dragleave",D),N.removeEventListener("dragover",H),N.removeEventListener("drop",W),F.removeEventListener("drop",U,!0),F.removeEventListener("dragend",q,!0),F.removeEventListener("dragleave",Z,!0),m.current!==null&&(cancelAnimationFrame(m.current),m.current=null)}},[n,T,R]);return v.useEffect(()=>()=>{d.current&&(d.current(),d.current=null)},[]),{ref:A,isOver:b,canDrop:x,isDropBlocked:b&&!x}}const WG=bI("@@menu-content-noop",()=>ax({}));function KG({children:e,header:t,footer:n,attachment:r,"aria-label":s,"data-testid":a,className:l,surfaceStyle:c,contentStyle:d,layoutStyle:f,listStyle:h,scrollAreaStyles:m,style:b,dropIndicatorTop:y,maxHeight:x,width:S,minWidth:E,maxWidth:T,tooltipPlacement:R,size:_,backdrop:C,adaptiveHeight:M=!0,returnFocus:A,onKeyDownCapture:N,onBodyPointerEnter:P,droppable:z,ref:D}){const H=va(),{isOpen:W,isMounted:F,activeIndex:L,setActiveIndex:U,setIsOpen:q,markKeyboardNavigation:Z,markPointerNavigation:B,virtualFocus:K,searchValue:O,setSearchValue:$,hasSearchInput:V,searchInputRef:j,enableHover:X,closeOnSelect:se,nodeId:re,listRef:oe,labelsRef:ue,refs:ce,floatingStyles:ge,middlewareData:Ce,transitionStyles:ae,context:ye,getFloatingProps:we,getItemProps:Ae,dismissCauseRef:Ee,returnFocusOnSelect:xe,returnFocus:De}=Ji("LegacyMenu.Content"),Ie=C??!X,[je,Ue]=v.useState(null),ke=K&&!V,Te=lm(),te=v.useSyncExternalStore(ki.subscribe,ki.isDragActive,ki.isDragActive),fe=ye.placement.startsWith("top"),J=fe&&F?Ce.bottomAnchor?.bottom??null:null,ne=v.useRef(null),be=v.useRef(L),Ge=v.useRef(!1);v.useLayoutEffect(()=>{be.current=L},[L]),v.useLayoutEffect(()=>{if(!W){Ge.current=!1;return}const Pe=bt=>{qO(bt)&&(Ge.current=!0,Z())},$e=bt=>{const Yt=GO(bt,oe);Yt==null||Yt===be.current||U(Yt)},kt=bt=>{const Yt=Ge.current;Ge.current=!1,B(),Yt&&$e(bt.target)};document.addEventListener("keydown",Pe,!0);const Ht=hU(je,kt);return()=>{document.removeEventListener("keydown",Pe,!0),Ht()}},[W,oe,Z,B,je,U]),v.useLayoutEffect(()=>{if(!W){ne.current=null;return}if(!K||L==null||ne.current===L||(ne.current=L,!Ge.current))return;const Pe=oe.current[L]??null;if(!Pe)return;const $e=requestAnimationFrame(()=>{Pe.scrollIntoView({block:"nearest",inline:"nearest"})});return()=>cancelAnimationFrame($e)},[W,K,L,oe]);const Ze=v.useCallback(Pe=>{if(Pe.key==="Escape"){Ee.current="escape";return}if(Pe.ctrlKey&&!Pe.metaKey){const kt=Pe.key.toLowerCase(),Ht=kt==="n"||kt==="j";if(Ht||(kt==="p"||kt==="k")){Pe.preventDefault();const Yt=oe.current,zn=Yt.length;if(zn===0)return;const Wr=be.current,An=Ht?1:-1;let Nr=Wr==null?Ht?0:zn-1:Wr+An;for(;Nr>=0&&Nr<zn;){if(Yt[Nr]!=null){U(Nr);return}Nr+=An}return}}if(!V)return;if(Pe.key.length===1&&!Pe.ctrlKey&&!Pe.metaKey&&!Pe.altKey){if(document.activeElement===j.current)return;Pe.preventDefault(),Pe.stopPropagation(),j.current?.focus(),$(O+Pe.key),HO(oe,"body",U)}},[Ee,V,oe,j,O,U,$]),Xe=v.useCallback(Pe=>{Te(Pe.nativeEvent)&&(Ee.current="backdrop",q(!1))},[Ee,q,Te]),vt=v.useCallback(Pe=>{if(Pe.stopPropagation(),!Te(Pe.nativeEvent))return;Pe.preventDefault(),Ee.current="backdrop",q(!1);const Ht=document.elementsFromPoint(Pe.clientX,Pe.clientY).find(bt=>!bt.classList.contains(fx));Ht&&Ht.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:Pe.clientX,clientY:Pe.clientY,screenX:Pe.screenX,screenY:Pe.screenY,button:Pe.button,buttons:Pe.buttons,ctrlKey:Pe.ctrlKey,shiftKey:Pe.shiftKey,altKey:Pe.altKey,metaKey:Pe.metaKey}))},[Ee,q,Te]),Je=z!=null,{ref:mt,isOver:Tt,isDropBlocked:st}=VG({accept:z?.accept??WG,disabled:!Je||(z?.disabled??!1),onDragEnter:z?.onDragEnter,onDragOver:z?.onDragOver,onDragLeave:z?.onDragLeave,onDrop:z?.onDrop}),_t=cf([ce.setFloating,Ue,D,Je?mt:null]),Ot=ka(),{zIndex:ot,portalLayerStyles:St}=Zl("popover",F);if(!F)return null;const Pt=_??H?.menuSize??"sm",jt={...ge,...ae,...St,...ot!==null?{zIndex:ot}:{},...b,...y!==void 0?{"--ui-menu-drop-indicator-top":`${y}px`}:{},...Xk({width:S,minWidth:E,maxWidth:T}),...fe&&J!==null?{top:"auto",bottom:J}:{},...Qk({isOpen:W,isPositioned:ye.isPositioned})},Dt={...St,...ot!==null?{zIndex:ot-1}:{},pointerEvents:Je&&te?"none":void 0},Y=M?KO(x):x,he=r!=null,Le=AI(Dt),Qe=dx({className:l,hasDropIndicator:y!==void 0,size:Pt,surfaceStyle:c,style:he&&Y!==void 0?{...jt,maxHeight:Y}:jt,hasAttachment:he}),wt=OI(he||Y===void 0?void 0:{maxHeight:Y},he,f),lt=II(),qe=hx(d),_e=px(!1,h),Se=MI(),Ye=mG(),Me=hG();return g.jsxs(Gk,{...Ot?{root:Ot}:{},children:[Ie&&g.jsx("div",{className:Le.className,style:Le.style,"data-component":"menu-backdrop",onClick:Xe,onContextMenu:vt,role:"none"}),g.jsx(Wk,{context:ye,initialFocus:ke?-1:j,returnFocus:A??De??(Ee.current!=="backdrop"&&(Ee.current!=="selection"||xe)),modal:!ke,children:g.jsxs("div",{ref:_t,className:Qe.className,style:Qe.style,tabIndex:-1,"data-component":"menu-popup","data-size":Pt,"data-drop-active":Je&&Tt&&!st?"":void 0,"data-drop-blocked":Je&&st?"":void 0,...a?{"data-testid":a}:{},...he?{"aria-label":s??"Menu"}:{},...we({onKeyDown:Ze,onKeyDownCapture:N,onMouseDown:K?Pe=>{Pe.stopPropagation()}:void 0}),children:[Je&&z?.indicator!=null?g.jsx("div",{"aria-hidden":"true",className:Me.className,style:Me.style,children:z.indicator}):null,g.jsx(Ms,{menuSize:Pt,children:g.jsx(IO,{dismiss:!W,children:g.jsx(Sx,{layerNodeId:re,placement:R,children:g.jsx(kI,{activeIndex:L,setIsOpen:q,getItemProps:Ae,searchValue:O,closeOnSelect:se,virtualFocus:K,children:g.jsxs(WA,{elementsRef:oe,labelsRef:ue,children:[g.jsxs("div",{className:wt.className,style:wt.style,"data-component":"menu-layout",...he?{}:{role:"menu","aria-label":s??"Menu"},children:[t!=null?g.jsx("div",{className:lt.className,style:lt.style,"data-component":"menu-header",children:g.jsx(Rl,{value:"header",children:t})}):null,g.jsx(lf,{className:B7,rootStyle:[HH(),m?.root],viewportStyle:m?.viewport,contentStyle:m?.content,maxHeight:"none","data-component":"menu-body-scroll",children:g.jsx("div",{className:qe.className,style:qe.style,"data-component":"menu-content",onPointerEnter:P,children:g.jsx("ul",{role:"presentation",className:_e.className,style:_e.style,"data-component":"menu-list",children:e})})}),n!=null?g.jsx("div",{className:Se.className,style:Se.style,"data-component":"menu-footer",children:g.jsx(Rl,{value:"footer",children:n})}):null]}),r!=null?g.jsx("div",{className:Ye.className,style:Ye.style,"data-component":"menu-attachment",children:g.jsx("div",{className:qe.className,style:qe.style,"data-component":"menu-content",children:g.jsx(Rl,{value:"footer",children:r})})}):null]})})})})})]})})]})}function ZG({children:e,indent:t=!1,rootStyle:n}){const r=NG(t,n);return g.jsx("div",{className:r.className,style:r.style,"data-component":"menu-empty","data-indent":t||void 0,children:e})}function UI(e){const t=v.useContext(hm),n=v.useContext(Jk),r=t??n;if(!r)throw new Error(`${e} must be used within LegacyMenu or LegacyMenu.SubMenu`);return r}function YG(){return UI("LegacyMenu.useLayerContext")}function XG({children:e}){const t=AG();return g.jsxs("div",{className:t.className,style:t.style,role:"status","aria-live":"polite","aria-busy":"true",children:[g.jsx(tn,{name:"loading",size:"base",className:MG}),g.jsx("span",{children:e??"Loading..."})]})}function QG({placeholder:e="Search...","aria-label":t,className:n,rootStyle:r,inputGroupRootStyle:s,value:a,onValueChange:l,autoFocus:c=!1}){const f=mf()==="body",h=vf(),{searchValue:m,setSearchValue:b,searchInputRef:y,activeIndex:x,setActiveIndex:S,listRef:E,setHasSearchInput:T}=UI("LegacyMenu.SearchInput"),R=v.useRef(null),_=a!==void 0&&l!==void 0,M=!_||c||h?y:R,A=_?a:m;v.useEffect(()=>{if(!_)return T(!0),()=>T(!1)},[_,T]),v.useLayoutEffect(()=>{if(_&&!c)return;const H=y.current;if(!H)return;H.focus({preventScroll:!0});const W=requestAnimationFrame(()=>{document.activeElement!==H&&H.focus({preventScroll:!0})});return()=>cancelAnimationFrame(W)},[_,c,y]);const N=H=>{_?l(H.target.value):(b(H.target.value),HO(E,"body",S),l?.(H.target.value))},P=H=>{if(Zk(H))return;if(H.ctrlKey&&!H.metaKey){const F=H.key.toLowerCase();if(F==="n"||F==="p"||F==="j"||F==="k"){H.preventDefault();return}}if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Tab","Escape"].includes(H.key)&&!H.metaKey&&!H.ctrlKey&&!H.altKey&&H.stopPropagation(),_&&H.key==="Enter"){H.preventDefault(),H.stopPropagation();return}if(!_&&H.key==="Enter"&&x!=null){H.preventDefault();const F=E.current[x];F&&(F.click(),y.current?.focus())}if(H.key==="ArrowRight"){const F=H.currentTarget;if(!(F.selectionStart===F.value.length&&F.selectionEnd===F.value.length)){H.stopPropagation();return}zT({event:H,direction:"ArrowRight",activeIndex:x,listRef:E,restoreFocus:()=>y.current?.focus()});return}if(H.key==="ArrowLeft"){const F=H.currentTarget;if(!(F.selectionStart===0&&F.selectionEnd===0)){H.stopPropagation();return}zT({event:H,direction:"ArrowLeft",activeIndex:x,listRef:E,restoreFocus:()=>y.current?.focus()})}},z=EG(n,r),D=g.jsx(hf,{ref:M,type:"text",variant:"unfilled",size:"base",inputGroupRootStyle:s,value:A,onChange:N,onKeyDown:P,placeholder:e,"aria-label":t??"Search menu items"});return f?g.jsx("li",{className:z.className,style:z.style,"data-component":"menu-search-row",role:"none",children:D}):g.jsx("div",{className:z.className,style:z.style,"data-component":"menu-search-row",role:"none",children:D})}function JG(e){const[t,n]=v.useState(!1);return v.useLayoutEffect(()=>{const r=e.current;if(r===null||r.parentElement===null)return;const s=()=>{n(r.nextElementSibling?.hasAttribute("data-menu-section")??!1)};s();const a=new MutationObserver(s);return a.observe(r.parentElement,{childList:!0}),()=>a.disconnect()},[e]),t}function eV({children:e,title:t,dividerVisibility:n="default",trailingDividerVisibility:r="default",textAction:s,titleTrailing:a,tooltip:l,noDivider:c,rootStyle:d,titleStyle:f}){const h=v.useRef(null),m=JG(h),b=TG(d),y=s!=null||a!=null,x=DI(y,f),S=_G(),E=t!=null&&t!==!1?g.jsxs("div",{role:"presentation",className:x.className,style:x.style,"data-component":"menu-section-title","data-has-action":y||void 0,children:[g.jsx("span",{children:t}),a,s!=null?g.jsx("button",{type:"button",className:S.className,style:S.style,onClick:s.onClick,children:s.label}):null]}):null,T=E!=null&&l!=null?g.jsx(yf,{content:l,openDelay:0,closeDelay:0,children:E}):E;return g.jsxs("div",{ref:h,role:"group","aria-label":typeof t=="string"?t:void 0,className:b.className,style:b.style,"data-menu-section":!0,"data-next-is-section":m||void 0,"data-divider-visibility":n!=="default"?n:void 0,"data-trailing-divider-visibility":r!=="default"?r:void 0,"data-no-divider":c||void 0,children:[T,e]})}function qI({children:e,trigger:t="hover",placement:n,anchorRef:r,offset:s,keepHoverSubmenuInset:a=!1,closeOnSelect:l,open:c,defaultOpen:d=!1,onOpenChange:f,hoverOpenDelay:h,keepOpenOnHoverOut:m=!1,dismissOnReferenceScroll:b=!1,suppressSiblingPointerGuard:y=!1,virtualFocus:x=!1,focusItemOnOpen:S}){const E=qk(),[T,R]=zc(c,d,f,"LegacyMenu.SubMenu"),_=c!==void 0,C=t==="hover"&&(!_||r==null),[M,A]=v.useState(null),{focusItemOnHoverEnabled:N,markKeyboardNavigation:P,markPointerNavigation:z,resetFocusItemOnHover:D}=VO(),[H,W]=v.useState(""),[F,L]=v.useState(!1),U=v.useRef([]),q=v.useRef([]),Z=v.useRef(null);zG(E,T);const B=$G();v.useEffect(()=>{B&&B.setSubMenuOpen(T)},[T,B]);const K=v.useRef(T);v.useEffect(()=>{const be=K.current;K.current=T,be!==T&&(W(""),T||A(null),D())},[T,D]);const O=v.useCallback(be=>{R(be)},[R]);v.useEffect(()=>{if(B)return B.registerSubMenuOpener(()=>O(!0)),()=>{B.registerSubMenuOpener(null)}},[B,O]);const $=v.useCallback((be,Ge,Ze)=>{const Xe=Z.current;!be&&t==="hover"&&(Ze==="hover"||Ze==="safe-polygon")&&(m||Xe?.value&&Xe.ownerDocument.activeElement===Xe)||O(be)},[m,O,t]),V=v.useCallback(()=>{O(!1)},[O]),X=n??(t==="hover"?"right-start":"bottom-start"),se={mainAxis:-2,alignmentAxis:-2},ue=s??(a?se:t==="hover"?se:4),{refs:ce,floatingStyles:ge,context:Ce}=Kk({nodeId:E,open:T,onOpenChange:$,placement:X,middleware:[xk(ue),wk(),Sk({crossAxis:X.startsWith("left")||X.startsWith("right")}),Ek({padding:8,apply({availableWidth:be,availableHeight:Ge,elements:Ze}){Ze.floating.style.setProperty(WO,`${Math.max(0,Math.floor(be))}px`),Ze.floating.style.setProperty(Yk,`${Math.max(0,Math.floor(Ge))}px`)}})],whileElementsMounted:Wp,transform:!1});v.useLayoutEffect(()=>{const be=r?.current;be&&ce.setReference(be)}),kU(C&&T&&!y,ce.domReference);const{activeId:ae}=cU(E,T),ye=ae!=null?0:h??75,we=QA(Ce,{enabled:C,delay:{open:ye},handleClose:cO({blockPointerEvents:!1,requireIntent:!1})}),Ae=nO(Ce,{enabled:t==="click"&&!_}),Ee=lm(),xe=rO(Ce,{ancestorScroll:b,bubbles:!0,outsidePressEvent:"click",outsidePress:Ee}),De=oO(Ce,{role:"menu"}),Ie=sO(Ce,{listRef:U,activeIndex:M,onNavigate:A,nested:!0,loop:!0,focusItemOnOpen:x?!1:S??!0,virtual:F||x,focusItemOnHover:N&&!x}),je=lO(Ce,{listRef:q,activeIndex:M,onMatch:F?void 0:A,enabled:!F&&!x}),{getReferenceProps:Ue,getFloatingProps:ke,getItemProps:Te}=iO([we,Ae,xe,De,Ie,je]),te=v.useCallback(()=>({...Ue(),ref:r?void 0:ce.setReference,"aria-haspopup":"menu","aria-expanded":T}),[Ue,ce.setReference,T,r]),{isMounted:fe,styles:J}=aO(Ce,{duration:{open:0,close:vU},initial:{opacity:0,transform:"scale(1)"}}),ne=v.useMemo(()=>({isOpen:T,isMounted:fe,setIsOpen:O,closeFromKeyboard:V,activeIndex:M,setActiveIndex:A,markKeyboardNavigation:P,markPointerNavigation:z,trigger:t,closeOnSelect:l,nodeId:E,listRef:U,labelsRef:q,searchInputRef:Z,searchValue:H,setSearchValue:W,hasSearchInput:F,setHasSearchInput:L,refs:ce,floatingStyles:ge,transitionStyles:J,context:Ce,getReferenceProps:Ue,getFloatingProps:ke,getItemProps:Te,getTriggerProps:te,virtualFocus:x}),[T,fe,O,V,M,t,P,z,l,E,H,F,x,ce,ge,J,Ce,Ue,ke,Te,te]);return g.jsx(Hk,{id:E,children:g.jsx(hm.Provider,{value:ne,children:e})})}function tV({children:e,disabled:t=!1,label:n,leading:r,leadingStyle:s,topAlign:a=!1,trailing:l,contentStyle:c,trailingStyle:d}){const{activeIndex:f,getItemProps:h}=bf("LegacyMenu.SubMenuTrigger"),{shouldAllowPointerInteraction:m}=Ji("LegacyMenu.SubMenuTrigger"),b=mm("LegacyMenu.SubMenuTrigger"),y=mf(),x=y==="body",S=n??(typeof e=="string"?e:""),{ref:E,index:T}=tm({label:S||null}),R=f===T,_=cf([E,b.refs.setReference]),C=g.jsx(tn,{name:"chevron-right",color:"tertiary"}),M=bG({disabled:t,expanded:b.isOpen,focused:R,topAlign:a}),A={role:"menuitem","aria-haspopup":"menu","aria-expanded":b.isOpen,"data-component":"menu-submenu-trigger","data-expanded":b.isOpen||void 0,tabIndex:R?0:-1,"aria-disabled":t||void 0,"data-disabled":t||void 0,"data-focused":R||void 0,"data-top-align":a||void 0,[Xl]:y,className:M.className,style:M.style,...b.getReferenceProps(h({onMouseDown(z){m(z.nativeEvent)||(z.preventDefault(),z.stopPropagation())},onClick(z){if(!m(z.nativeEvent)){z.preventDefault(),z.stopPropagation();return}!t&&b.trigger==="hover"&&b.setIsOpen(!0)},onKeyDown(z){(z.key==="ArrowRight"||z.key==="Enter"||z.key===" ")&&!t&&(z.preventDefault(),z.stopPropagation(),b.setIsOpen(!0))}}))},N=CG(),P=g.jsx(Fl,{disabled:t,leading:r,leadingStyle:s,contentStyle:c,topAlign:a,trailing:l!=null?g.jsx("div",{className:N.className,style:N.style,"data-component":"menu-submenu-right-section",children:l}):void 0,rightFallback:C,trailingStyle:d,children:e});return x?g.jsx("li",{ref:_,...A,children:P}):g.jsx("div",{ref:_,...A,children:P})}function nV({children:e,label:t,showChevron:n=!0,onKeyDown:r,closeOnSelect:s,...a}){const l=mm("LegacyMenu.SubMenuItem"),c=t??(typeof e=="string"?e:""),d=h=>{a.disabled||(r?.(h),!h.defaultPrevented&&h.key==="ArrowRight"&&(h.preventDefault(),h.stopPropagation(),l.setIsOpen(!0)))},f=n?g.jsx(tn,{name:"chevron-right",color:"tertiary"}):void 0;return g.jsx($I,{...a,contextPart:"LegacyMenu.SubMenuItem",itemLabel:c,closeOnSelect:s??l.closeOnSelect,"aria-haspopup":"menu","aria-expanded":l.isOpen,referenceRef:l.refs.setReference,itemPropsTransform:l.getReferenceProps,onKeyDown:d,trailingAccessory:f,children:e})}function rV({children:e,"aria-label":t,"data-testid":n,onPointerEnter:r,keepSearchFocus:s=!1,className:a,surfaceStyle:l,contentStyle:c,listStyle:d,width:f,minWidth:h,maxWidth:m,maxHeight:b,size:y,contentPadding:x}){const S=va(),E=mm("LegacyMenu.SubMenuContent"),T=ka(),{portalLayerStyles:R}=Zl("popover",E.isMounted),_=y??S?.menuSize??"sm",{virtualFocus:C}=E;if(!E.isMounted)return null;const M={...E.floatingStyles,...E.transitionStyles,...R,...Xk({width:f,minWidth:h,maxWidth:m,clampToAvailableWidth:!0}),...Qk({isOpen:E.isOpen,isPositioned:E.context.isPositioned})},A=dx({className:a,size:_,surfaceStyle:l,style:M}),N=hx(c),P=px(!1,d),z=H=>{H.stopPropagation()},D=H=>{E.markPointerNavigation();const W=GO(H,E.listRef);if(W!=null&&W!==E.activeIndex&&E.setActiveIndex(W),!s||W==null)return;const F=E.searchInputRef.current;if(F==null)return;const L=F.ownerDocument.activeElement;L!==F&&(L instanceof HTMLInputElement||L instanceof HTMLTextAreaElement||F.focus({preventScroll:!0}))};return g.jsx(Gk,{...T?{root:T}:{},children:g.jsx(Wk,{context:E.context,disabled:C,initialFocus:E.hasSearchInput?E.searchInputRef:-1,returnFocus:!1,modal:!1,closeOnFocusOut:E.trigger==="click",children:g.jsx("div",{ref:E.refs.setFloating,className:A.className,style:A.style,"data-component":"menu-popup","data-submenu":"","data-size":_,...n?{"data-testid":n}:{},...E.getFloatingProps({onClick:z,onPointerEnter:r,onMouseMove(H){D(H.target)},onPointerMove(H){D(H.target)},onKeyDown(H){if(qO(H)&&E.markKeyboardNavigation(),H.key==="ArrowLeft"||H.key==="Escape"){H.preventDefault(),H.stopPropagation(),E.closeFromKeyboard();const W=E.refs.domReference.current;W instanceof HTMLElement&&W.focus()}}}),children:g.jsx(jI.Provider,{value:!0,children:g.jsx(Ms,{menuSize:_,children:g.jsx(lf,{maxHeight:KO(b),children:g.jsx("div",{className:N.className,style:x===void 0?N.style:{...N.style,padding:x,scrollPaddingBlock:x},"data-component":"menu-content",children:g.jsx(Sx,{layerNodeId:E.nodeId,children:g.jsx(kI,{activeIndex:E.activeIndex,setIsOpen:E.setIsOpen,getItemProps:E.getItemProps,searchValue:E.searchValue,closeOnSelect:E.closeOnSelect,virtualFocus:C,children:g.jsx(WA,{elementsRef:E.listRef,labelsRef:E.labelsRef,children:g.jsx("ul",{role:"menu","aria-label":t??"Submenu",className:P.className,style:P.style,"data-component":"menu-list",children:g.jsx(Rl,{value:"body",children:g.jsx(FO,{children:e})})})})})})})})})})})})})}function iV({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return Ex(s,n,"LegacyMenu.SwitchItem")?g.jsx(sV,{...r,itemLabel:s,children:e}):null}function sV({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,switchVariant:l,leading:c,leadingStyle:d,trailing:f,contentStyle:h,trailingStyle:m,rootStyle:b,tooltip:y,closeOnSelect:x,topAlign:S=!1,itemLabel:E}){const{activeIndex:T,getItemProps:R,setIsOpen:_,closeOnSelect:C}=bf("LegacyMenu.SwitchItem"),{shouldAllowPointerInteraction:M}=Ji("LegacyMenu.SwitchItem"),A=vf(),N=wx(),P=mf(),z=P==="body",D=x??C??!1,[H,W]=v.useState(r),F=n!==void 0,L=F?n:H,{ref:U,index:q}=tm({label:E||null}),Z=T===q,B=v.useCallback(()=>{if(a)return;const re=!L;F||W(re);const oe={defaultPrevented:!1,preventDefault:()=>{oe.defaultPrevented=!0}};s?.(re,oe),D&&!oe.defaultPrevented&&N(_)},[a,L,F,s,D,_,N]),K=v.useCallback(re=>{if(!M(re.nativeEvent)){re.preventDefault(),re.stopPropagation();return}re.preventDefault(),re.stopPropagation(),B()},[B,M]),O=v.useCallback(re=>{a||(re.key==="Enter"||re.key===" ")&&(re.preventDefault(),re.stopPropagation(),B())},[a,B]),$=R({onClick:K,onKeyDown:O}),V=gG({disabled:a,focused:Z,inSubmenu:A,topAlign:S},b),j={role:"menuitemcheckbox","aria-checked":L,tabIndex:Z?0:-1,"aria-disabled":a||void 0,"data-checked":L||void 0,"data-component":"menu-toggle-row","data-disabled":a||void 0,"data-focused":Z||void 0,"data-top-align":S||void 0,...t?{"data-testid":t}:{},[Xl]:P,className:V.className,style:V.style,...$},X=g.jsx(Fl,{disabled:a,leading:c,leadingStyle:d,contentStyle:h,trailing:f,trailingStyle:m,trailingAccessory:g.jsx(PF,{checked:L,disabled:a,size:"sm",variant:l}),children:e}),se=z?g.jsx("li",{ref:U,...j,children:X}):g.jsx("div",{ref:U,...j,children:X});return y!=null?g.jsx(yf,{content:y,openDelay:0,closeDelay:0,children:se}):se}function oV({title:e,subtitle:t,inline:n=!1,wrapSubtitle:r=!1}){const s=xG(n),a=SG(n),l=wG({inline:n,wrap:r});return g.jsxs("div",{className:s.className,style:s.style,"data-inline":n||void 0,children:[g.jsx(uh,{size:"md",weight:"regular",color:"primary",className:a.className,style:a.style,children:e}),t!=null?g.jsx(uh,{size:"sm",weight:"regular",color:"tertiary",className:l.className,style:l.style,"data-wrap":r||void 0,children:t}):null]})}const aV={title:{kZKoxP:"ui-xk0z11",kB7OPa:"ui-9f619",kVQacm:"ui-b3r6kr",$$css:!0}};function lV({title:e,divider:t}){const n=DI(!1,aV.title),r=RG();return g.jsxs(g.Fragment,{children:[t?g.jsx("div",{role:"presentation","aria-hidden":"true",className:r.className,style:r.style}):null,e!==void 0?g.jsx("div",{role:"presentation",className:n.className,"data-component":"menu-section-title",style:n.style,children:g.jsx("span",{children:e})}):null]})}const Pc=typeof window<"u"?v.useLayoutEffect:v.useEffect;function t_(e){if(e!==void 0)switch(typeof e){case"number":return e;case"string":{if(e.endsWith("px"))return parseFloat(e);break}}}function uV({box:e,defaultHeight:t,defaultWidth:n,disabled:r,element:s,mode:a,style:l}){const{styleHeight:c,styleWidth:d}=v.useMemo(()=>({styleHeight:t_(l?.height),styleWidth:t_(l?.width)}),[l?.height,l?.width]),[f,h]=v.useState({height:t,width:n}),m=r||c!==void 0||a==="only-width"||c!==void 0&&d!==void 0;return Pc(()=>{if(s===null||m)return;const b=new ResizeObserver(y=>{for(const x of y){const{contentRect:S,target:E}=x;s===E&&h(T=>T.height===S.height&&T.width===S.width?T:{height:S.height,width:S.width})}});return b.observe(s,{box:e}),()=>{b?.unobserve(s)}},[e,m,s,c,d]),v.useMemo(()=>({height:c??f.height,width:d??f.width}),[f,c,d])}function cV(e){const t=v.useRef(()=>{throw new Error("Cannot call during render.")});return Pc(()=>{t.current=e},[e]),v.useCallback(n=>t.current?.(n),[t])}function yy({containerElement:e,direction:t,isRtl:n,scrollOffset:r}){return r}function go(e,t="Assertion error"){if(!e)throw console.error(t),Error(t)}function Ec(e,t){if(e===t)return!0;if(!!e!=!!t||(go(e!==void 0),go(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 HI({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);go(r!==void 0,"Unexpected bounds cache miss");const s=(r.scrollOffset+r.size)/e.size;return t*s}}function fV({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=HI({cachedBounds:t,itemCount:r,itemSize:s}),d=t.get(n),f=Math.max(0,Math.min(c-l,d.scrollOffset)),h=Math.max(0,d.scrollOffset-l+d.size);switch(e==="smart"&&(a>=h&&a<=f?e="auto":e="center"),e){case"start":return f;case"end":return h;case"center":return d.scrollOffset<=l/2?0:d.scrollOffset+d.size/2>=c-l/2?c-l:d.scrollOffset+d.size/2-l/2;default:return a>=h&&a<=f?a:a<h?h:f}}function n_({cachedBounds:e,containerScrollOffset:t,containerSize:n,itemCount:r,overscanCount:s}){const a=r-1;let l=0,c=-1,d=0,f=-1,h=0;for(;h<a;){const m=e.get(h);if(m.scrollOffset+m.size>t)break;h++}for(l=h,d=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,d=0,f=-1),{startIndexVisible:l,stopIndexVisible:c,startIndexOverscan:d,stopIndexOverscan:f}}function dV({itemCount:e,itemProps:t,itemSize:n}){const r=new Map;return{get(s){for(go(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 d=r.get(l-1);go(d!==void 0,`Unexpected bounds cache miss for index ${s}`),r.set(l,{scrollOffset:d.scrollOffset+d.size,size:c})}}const a=r.get(s);return go(a!==void 0,`Unexpected bounds cache miss for index ${s}`),a},set(s,a){r.set(s,a)},get size(){return r.size}}}function pV({itemCount:e,itemProps:t,itemSize:n}){return v.useMemo(()=>dV({itemCount:e,itemProps:t,itemSize:n}),[e,t,n])}function hV({containerSize:e,itemSize:t}){let n;return typeof t==="string"?(go(t.endsWith("%"),`Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`),go(e!==void 0,"Container size must be defined if a percentage item size is specified"),n=e*parseInt(t)/100):n=t,n}function mV({containerElement:e,containerStyle:t,defaultContainerSize:n=0,direction:r,isRtl:s=!1,itemCount:a,itemProps:l,itemSize:c,onResize:d,overscanCount:f}){const[h,m]=v.useState({startIndexVisible:0,startIndexOverscan:0,stopIndexVisible:-1,stopIndexOverscan:-1}),{startIndexVisible:b,startIndexOverscan:y,stopIndexVisible:x,stopIndexOverscan:S}={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:E=n,width:T=n}=uV({defaultHeight:n,defaultWidth:void 0,element:e,mode:"only-height",style:t}),R=v.useRef({height:0,width:0}),_=E,C=hV({containerSize:_,itemSize:c});v.useLayoutEffect(()=>{if(typeof d=="function"){const D=R.current;(D.height!==E||D.width!==T)&&(d({height:E,width:T},{...D}),D.height=E,D.width=T)}},[E,d,T]);const M=pV({itemCount:a,itemProps:l,itemSize:C}),A=v.useCallback(D=>M.get(D),[M]),N=v.useCallback(()=>HI({cachedBounds:M,itemCount:a,itemSize:C}),[M,a,C]),P=v.useCallback(D=>{const H=yy({containerElement:e,direction:r,isRtl:s,scrollOffset:D});return n_({cachedBounds:M,containerScrollOffset:H,containerSize:_,itemCount:a,overscanCount:f})},[M,e,_,r,s,a,f]);Pc(()=>{const D=e?.scrollTop??0;m(P(D))},[e,r,P]),Pc(()=>{if(!e)return;const D=()=>{m(H=>{const{scrollLeft:W,scrollTop:F}=e,L=yy({containerElement:e,direction:r,isRtl:s,scrollOffset:F}),U=n_({cachedBounds:M,containerScrollOffset:L,containerSize:_,itemCount:a,overscanCount:f});return Ec(U,H)?H:U})};return e.addEventListener("scroll",D),()=>{e.removeEventListener("scroll",D)}},[M,e,_,r,a,f]);const z=cV(({align:D="auto",containerScrollOffset:H,index:W})=>{let F=fV({align:D,cachedBounds:M,containerScrollOffset:H,containerSize:_,index:W,itemCount:a,itemSize:C});if(e){if(F=yy({containerElement:e,direction:r,isRtl:s,scrollOffset:F}),typeof e.scrollTo!="function"){const L=P(F);Ec(h,L)||m(L)}return F}});return{getCellBounds:A,getEstimatedSize:N,scrollToIndex:z,startIndexOverscan:y,startIndexVisible:b,stopIndexOverscan:S,stopIndexVisible:x}}function gV(e){return v.useMemo(()=>e,Object.values(e))}function bV(e,t){const{ariaAttributes:n,style:r,...s}=e,{ariaAttributes:a,style:l,...c}=t;return Ec(n,a)&&Ec(r,l)&&Ec(s,c)}function yV(e){return e!=null&&typeof e=="object"&&"getAverageRowHeight"in e&&typeof e.getAverageRowHeight=="function"}const vV="data-react-window-index";function kV({children:e,className:t,defaultHeight:n=0,listRef:r,onResize:s,onRowsRendered:a,overscanCount:l=3,rowComponent:c,rowCount:d,rowHeight:f,rowProps:h,tagName:m="div",style:b,...y}){const x=gV(h),S=v.useMemo(()=>v.memo(c,bV),[c]),[E,T]=v.useState(null),R=yV(f),_=v.useMemo(()=>R?F=>f.getRowHeight(F)??f.getAverageRowHeight():f,[R,f]),{getCellBounds:C,getEstimatedSize:M,scrollToIndex:A,startIndexOverscan:N,startIndexVisible:P,stopIndexOverscan:z,stopIndexVisible:D}=mV({containerElement:E,containerStyle:b,defaultContainerSize:n,direction:"vertical",itemCount:d,itemProps:x,itemSize:_,onResize:s,overscanCount:l});v.useImperativeHandle(r,()=>({get element(){return E},scrollToRow({align:F="auto",behavior:L="auto",index:U}){const q=A({align:F,containerScrollOffset:E?.scrollTop??0,index:U});typeof E?.scrollTo=="function"&&E.scrollTo({behavior:L,top:q})}}),[E,A]),Pc(()=>{if(!E)return;const F=Array.from(E.children).filter((L,U)=>{if(L.hasAttribute("aria-hidden"))return!1;const q=`${N+U}`;return L.setAttribute(vV,q),!0});if(R)return f.observeRowElements(F)},[E,R,f,N,z]),v.useEffect(()=>{N>=0&&z>=0&&a&&a({startIndex:P,stopIndex:D},{startIndex:N,stopIndex:z})},[a,N,P,z,D]);const H=v.useMemo(()=>{const F=[];if(d>0)for(let L=N;L<=z;L++){const U=C(L);F.push(v.createElement(S,{...x,ariaAttributes:{"aria-posinset":L+1,"aria-setsize":d,role:"listitem"},key:L,index:L,style:{position:"absolute",left:0,transform:`translateY(${U.scrollOffset}px)`,height:R?void 0:U.size,width:"100%"}}))}return F},[S,C,R,d,x,N,z]),W=g.jsx("div",{"aria-hidden":!0,style:{height:M(),width:"100%",zIndex:-1}});return v.createElement(m,{role:"list",...y,className:t,ref:T,style:{position:"relative",maxHeight:"100%",flexGrow:1,overflowY:"auto",...b}},H,e,W)}const GI=v.createContext(null);function xV(e){const t=v.useContext(GI);if(!t)throw new Error(`${e} must be used within LegacyMenu.VirtualizedContent`);return t}function SV({children:e,activeIndex:t,setIsOpen:n,getItemProps:r,listRef:s,closeOnSelect:a,onRowElementChange:l}){const c=v.useMemo(()=>({activeIndex:t,setIsOpen:n,getItemProps:r,listRef:s,closeOnSelect:a,onRowElementChange:l}),[t,n,r,s,a,l]);return g.jsx(GI.Provider,{value:c,children:e})}const wV=4,r_="ui-menu--virtualized";function EV({index:e,style:t,items:n,activeIndex:r,renderItem:s,onMouseMove:a}){const l=n[e],c=r===e,d=OG();return g.jsx("div",{className:d.className,style:{...t,...d.style},onMouseMove:f=>a(e,f),children:s(l,e,c)})}function TV({items:e,itemHeight:t,renderItem:n,getItemLabel:r,header:s,footer:a,emptyState:l,"aria-label":c,className:d,style:f,maxHeight:h,width:m="200px",size:b,backdrop:y,closeOnSelect:x=!0,overscanCount:S=5,getItemKey:E,onPreserveActiveIndex:T,renderActivePreview:R,ref:_}){const C=va(),{isOpen:M,isMounted:A,activeIndex:N,setActiveIndex:P,setIsOpen:z,virtualFocus:D,enableHover:H,nodeId:W,listRef:F,labelsRef:L,searchValue:U,refs:q,floatingStyles:Z,middlewareData:B,transitionStyles:K,context:O,getFloatingProps:$,getItemProps:V,dismissCauseRef:j,returnFocusOnSelect:X,returnFocus:se}=Ji("LegacyMenu.VirtualizedContent"),re=v.useRef(null),oe=v.useRef(null),ue=v.useRef(N);ue.current=N;const ce=v.useRef(null),[ge,Ce]=v.useState(null),[ae,ye]=v.useState(null),we=y??!H,Ae=lm(),{portalLayerStyles:Ee}=Zl("popover",A),xe=v.useRef(null),De=v.useRef(void 0),Ie=v.useRef(e),je=v.useRef(N),Ue=v.useRef(null);v.useEffect(()=>{r?L.current=e.map(Se=>r(Se)):L.current=e.map(()=>null),F.current.length!==e.length&&(F.current.length=e.length)},[e,r,L,F]),v.useLayoutEffect(()=>{const Se=Ie.current!==e,Ye=je.current!==N;if(Ie.current=e,je.current=N,E===void 0||N==null){De.current=void 0;return}const Me=De.current;if(Se&&!Ye&&Me!==void 0){const $e=e.findIndex(kt=>E(kt)===Me);if($e>=0&&$e!==N){Ue.current=$e,T===void 0?P($e):T($e);return}}const Pe=e[N];De.current=Pe===void 0?void 0:E(Pe)},[N,E,e,T,P]);const ke=O.placement.startsWith("top"),Te=ke&&A?B.bottomAnchor?.bottom??null:null,te=v.useRef(null);v.useLayoutEffect(()=>{if(!M){te.current=null,xe.current=null;return}if(N==null||te.current===N)return;te.current=N;const Se=Ue.current===N;if(Ue.current=null,Se)return;const Ye=xe.current===N;xe.current=null,!Ye&&(N<0||N>=e.length||oe.current?.scrollToRow({index:N,align:"smart",behavior:"instant"}))},[M,N,e.length]);const fe=v.useRef(U),J=v.useRef(M);v.useEffect(()=>{const Se=fe.current,Ye=J.current;fe.current=U,J.current=M,!(!M||!Ye||Se===U)&&(e.length>0&&oe.current?.scrollToRow({index:0,align:"start",behavior:"instant"}),P(e.length>0?0:null))},[M,e.length,U,P]);const ne=v.useCallback((Se,Ye)=>{ce.current=Se,Ce(Me=>Me===Se?Me:Se),ye(Me=>Me===Ye?Me:Ye)},[]);v.useLayoutEffect(()=>{if(!M||N==null||N<0||N>=e.length){ne(null,null);return}const Se=F.current[N];Se!=null&&ne(Se,N)},[N,M,e.length,F,ne]);const be=v.useCallback((Se,Ye)=>{Se===ue.current&&Ye!=null&&ne(Ye,Se)},[ne]),Ge=v.useRef(null),Ze=v.useCallback((Se,Ye)=>{const Me=Ge.current;Ge.current={x:Ye.clientX,y:Ye.clientY},!(Me!==null&&Me.x===Ye.clientX&&Me.y===Ye.clientY)&&N!==Se&&(xe.current=Se,P(Se))},[N,P]),Xe=v.useCallback(Se=>{Se.key==="Escape"&&(j.current="escape")},[j]),vt=v.useCallback(Se=>{Ae(Se.nativeEvent)&&(j.current="backdrop",z(!1))},[j,z,Ae]),Je=v.useCallback(Se=>{if(!Ae(Se.nativeEvent))return;Se.preventDefault(),j.current="backdrop",z(!1);const Pe=document.elementsFromPoint(Se.clientX,Se.clientY).find($e=>!$e.classList.contains(fx));Pe&&Pe.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:Se.clientX,clientY:Se.clientY,screenX:Se.screenX,screenY:Se.screenY,button:Se.button,buttons:Se.buttons,ctrlKey:Se.ctrlKey,shiftKey:Se.shiftKey,altKey:Se.altKey,metaKey:Se.metaKey}))},[j,z,Ae]),mt=cf([q.setFloating,re,_]),Tt=ka();if(!A)return null;const st=h??mU,_t=typeof t=="number"?e.length*t:e.reduce((Se,Ye,Me)=>Se+t(Me),0),Ot=Math.min(_t,Math.max(0,st-wV*2)),ot=b??C?.menuSize??"sm",St={...Z,...K,...f,...Xk({width:m}),...Ee,...ke&&Te!==null?{top:"auto",bottom:Te}:{},...Qk({isOpen:M,isPositioned:O.isPositioned})},Pt=AI(Ee),jt=dx({className:d?`${r_} ${d}`:r_,size:ot,style:St}),Dt=OI(),Y=II(),he=hx(),Le=px(!0),Qe=IG(),wt=MI(),lt=M&&ae!=null&&ae>=0&&ae<e.length&&ge!=null&&R!=null?R(ae,{rowElement:ge,menuContentElement:re.current}):null,qe=lt!=null&&ge!=null,_e={items:e,activeIndex:N,renderItem:n,onMouseMove:Ze};return g.jsxs(Gk,{...Tt?{root:Tt}:{},children:[we&&g.jsx("div",{className:Pt.className,style:Pt.style,"data-component":"menu-backdrop",onClick:vt,onContextMenu:Je,role:"none"}),g.jsx(Wk,{context:O,initialFocus:-1,returnFocus:se??(j.current!=="backdrop"&&(j.current!=="selection"||X)),modal:!D&&M,children:g.jsx("div",{ref:mt,className:jt.className,style:jt.style,tabIndex:-1,"data-component":"menu-popup","data-virtualized":"","data-size":ot,...$({onKeyDown:Xe,onMouseDown:D?Se=>{Se.stopPropagation()}:void 0}),children:g.jsx(Ms,{menuSize:ot,children:g.jsx("div",{className:Dt.className,style:Dt.style,"data-component":"menu-layout",role:"menu","aria-label":c??"Menu",children:g.jsx(IO,{dismiss:!M,children:g.jsx(Sx,{layerNodeId:W,children:g.jsxs(SV,{activeIndex:N,setIsOpen:z,getItemProps:V,listRef:F,closeOnSelect:x,onRowElementChange:be,children:[s!=null?g.jsx("div",{className:Y.className,style:Y.style,"data-component":"menu-header",children:g.jsx(Rl,{value:"header",children:s})}):null,e.length>0?g.jsx("div",{className:he.className,style:he.style,"data-component":"menu-content",children:g.jsx("div",{className:Le.className,style:Le.style,"data-component":"menu-list",role:"presentation",children:g.jsx(kV,{listRef:oe,className:Qe.className,rowComponent:EV,rowProps:_e,rowCount:e.length,rowHeight:t,overscanCount:S,"data-native-scrollbar":"none",style:{height:Ot}})})}):l,a!=null?g.jsx("div",{className:wt.className,style:wt.style,"data-component":"menu-footer",children:g.jsx(Rl,{value:"footer",children:a})}):null,R!=null?g.jsx(qI,{open:qe,placement:"right-start",anchorRef:ce,offset:6,closeOnSelect:!1,virtualFocus:!0,children:qe?lt:null}):null]})})})})})})})]})}function _V({index:e,children:t,disabled:n=!1,onSelect:r,onMouseDown:s,leading:a,leadingStyle:l,contentStyle:c,trailing:d,trailingStyle:f,wideLeftSection:h=!1,tooltip:m,tooltipContentKey:b,closeOnSelect:y,description:x,variant:S="default",checked:E,ref:T}){const{shouldAllowPointerInteraction:R,virtualFocus:_}=Ji("LegacyMenu.VirtualizedItem"),C=vf(),{activeIndex:M,setIsOpen:A,getItemProps:N,listRef:P,closeOnSelect:z,onRowElementChange:D}=xV("LegacyMenu.VirtualizedItem"),H=y??z??!0,W=M===e,F=v.useCallback(ge=>{P.current[e]=ge,D?.(e,ge),typeof T=="function"?T(ge):T&&(T.current=ge)},[e,P,D,T]),L=()=>{if(n)return;const ge={defaultPrevented:!1,preventDefault:()=>{ge.defaultPrevented=!0}};r?.(ge),H&&!ge.defaultPrevented&&A(!1)},U=ge=>{if(!R(ge.nativeEvent)){ge.preventDefault(),ge.stopPropagation();return}L()},q=ge=>{n||(ge.key==="Enter"||ge.key===" ")&&(ge.preventDefault(),L())},Z=ge=>{if(!R(ge.nativeEvent)){ge.preventDefault(),ge.stopPropagation();return}s?.(ge),!ge.defaultPrevented&&_&&ge.preventDefault()},{onMouseMove:B,onPointerLeave:K,...O}=N({onClick:U,onKeyDown:q,onMouseDown:Z}),$=gx(),V=bx(),j=yx(),X=x!=null?g.jsxs("div",{className:$.className,style:$.style,children:[g.jsx("div",{className:V.className,style:V.style,children:t}),g.jsx("div",{className:j.className,style:j.style,"data-component":"menu-item-description",children:x})]}):t,se=mx({disabled:n,focused:W,hasDescription:x!=null,inSubmenu:C,variant:S}),re=E!==void 0,oe=re&&a==null?g.jsx(pA,{checked:E,disabled:n}):a,ue=re?{role:"menuitemcheckbox","aria-checked":E,"data-checked":E||void 0}:{role:"menuitem"},ce=g.jsx("li",{ref:F,...ue,tabIndex:W?0:-1,"aria-disabled":n||void 0,"data-component":"menu-row","data-disabled":n||void 0,"data-focused":W||void 0,"data-has-description":x!=null||void 0,"data-variant":S!=="default"?S:void 0,"data-wide-left":h||void 0,[Xl]:"body",className:se.className,style:se.style,...O,children:g.jsx(Fl,{disabled:n,hasDescription:x!=null,leading:oe,leadingStyle:l,contentStyle:c,trailing:d,trailingStyle:f,wideLeft:h,children:X})});return m!=null?g.jsx(yf,{content:m,contentKey:b,children:ce}):ce}function i_({children:e,open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:d,closeOnSelect:f,instantClose:h,instantTransitions:m,returnFocusOnSelect:b,returnFocus:y,focusItemOnOpen:x,virtualFocus:S,shouldKeepOpenDuringDrag:E,lockPositionWhileOpen:T,dismissOnReferenceScroll:R}){return g.jsx(EU,{open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:d,closeOnSelect:f,instantClose:h,instantTransitions:m,returnFocusOnSelect:b,returnFocus:y,focusItemOnOpen:x,virtualFocus:S,shouldKeepOpenDuringDrag:E,lockPositionWhileOpen:T,dismissOnReferenceScroll:R,children:e})}function RV(e){return _o()===null?g.jsx(m9,{children:g.jsx(i_,{...e})}):g.jsx(i_,{...e})}function VI(e,t,n){const{ref:r,...s}=n,a=fO({defaultTagName:"button",props:s,ref:r,render:e});return t?e:a}function CV({children:e,disabled:t=!1}){const{getTriggerProps:n}=Ji("LegacyMenu.Trigger");return VI(e,t,n())}function NV({children:e,onClick:t,disabled:n=!1}){const{getTriggerProps:r,setHasHoverTrigger:s,setIsOpen:a}=Ji("LegacyMenu.HoverTrigger");v.useEffect(()=>{if(!n)return s(!0),()=>s(!1)},[n,s]);const l=r();return VI(e,n,{...l,onPointerDown:rc(void 0,rc(l.onPointerDown,c=>{c.button===2&&a(!1)})),onContextMenu:rc(void 0,rc(l.onContextMenu,c=>{a(!1),c.stopPropagation()})),onClick:rc(t,c=>{l.onClick?.(c)})})}const AV=Object.assign(qI,{useContext:jG}),Br=Object.assign(RV,{useContext:ZO,useLayerContext:YG,Trigger:CV,HoverTrigger:NV,Content:KG,Item:PI,CheckboxItem:qG,TextItem:oV,SwitchItem:iV,Section:eV,SearchInput:QG,EmptyState:ZG,LoadingState:XG,ExpandableSection:BG,ExpandableSectionTrigger:FG,ExpandableSectionContent:UG,SubMenu:AV,SubMenuItem:nV,SubMenuTrigger:tV,SubMenuContent:rV,VirtualizedContent:TV,VirtualizedItem:_V,VirtualizedSectionHeader:lV}),WI=v.createContext(void 0);function Tx(){const e=v.useContext(WI);if(e===void 0)throw new Error(Mn(64));return e}let OV=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const gm={tabActivationDirection:e=>({[OV.activationDirection]:e})},KI=v.forwardRef(function(t,n){const{className:r,defaultValue:s=0,onValueChange:a,orientation:l="horizontal",render:c,value:d,style:f,...h}=t,m=t.defaultValue!==void 0,b=v.useRef([]),[y,x]=v.useState(()=>new Map),[S,E]=Ll({controlled:d,default:s,name:"Tabs",state:"value"}),T=d!==void 0,[R,_]=v.useState(()=>new Map),C=v.useRef(void 0),M=v.useCallback(ce=>{if(ce===void 0)return null;for(const[ge,Ce]of R.entries())if(Ce!=null&&ce===(Ce.value??Ce.index))return ge;return null},[R]),[A,N]=v.useState(()=>({previousValue:S,tabActivationDirection:"none"})),{previousValue:P,tabActivationDirection:z}=A;let D=z,H=!1;P!==S&&(D=s_(P,S,l,R),H=P!=null&&S!=null&&M(S)==null);const W=H?P:S,F=P!==W||z!==D;He(()=>{F&&N({previousValue:W,tabActivationDirection:D})},[W,F,D]);const L=Ke((ce,ge)=>{const Ce=s_(S,ce,l,R);ge.activationDirection=Ce,a?.(ce,ge),!ge.isCanceled&&E(ce)}),U=Ke((ce,ge)=>{a?.(ce,Et(ge,void 0,void 0,{activationDirection:"none"}))}),q=Ke((ce,ge)=>{x(Ce=>{if(Ce.get(ce)===ge)return Ce;const ae=new Map(Ce);return ae.set(ce,ge),ae})}),Z=Ke((ce,ge)=>{x(Ce=>{if(!Ce.has(ce)||Ce.get(ce)!==ge)return Ce;const ae=new Map(Ce);return ae.delete(ce),ae})}),B=v.useCallback(ce=>y.get(ce),[y]),K=v.useCallback(ce=>{for(const ge of R.values())if(ce===ge?.value)return ge?.id},[R]),O=v.useMemo(()=>({getTabElementBySelectedValue:M,getTabIdByPanelValue:K,getTabPanelIdByValue:B,onValueChange:L,orientation:l,registerMountedTabPanel:q,setTabMap:_,unregisterMountedTabPanel:Z,tabActivationDirection:D,value:S}),[M,K,B,L,l,q,_,Z,D,S]),$=v.useMemo(()=>{for(const ce of R.values())if(ce!=null&&ce.value===S)return ce},[R,S]),V=v.useMemo(()=>{for(const ce of R.values())if(ce!=null&&!ce.disabled)return ce.value},[R]),j=v.useRef(!m),X=v.useRef(s),se=v.useRef(m),re=v.useRef(!1);He(()=>{if(T)return;function ce(ye,we){E(ye),N(Ae=>Ae.previousValue===ye&&Ae.tabActivationDirection==="none"?Ae:{previousValue:ye,tabActivationDirection:"none"}),U(ye,we),j.current=!1}if(R.size===0){re.current&&S!==null&&!C.current?.isConnected&&ce(null,Z1);return}re.current=!0,C.current=R.keys().next().value;const ge=$?.disabled,Ce=$==null&&S!==null;if(!ge&&S===X.current&&(se.current=!1),se.current&&ge&&S===X.current)return;const ae=j.current;if(ge||Ce){const ye=V??null;if(S===ye){j.current=!1;return}let we=Z1;ae?we=Y1:ge&&(we=HC),ce(ye,we);return}ae&&$!=null&&(U(S,Y1),j.current=!1)},[V,T,U,$,E,R,S]);const ue=mn("div",t,{state:{orientation:l,tabActivationDirection:D},ref:n,props:h,stateAttributesMapping:gm});return g.jsx(WI.Provider,{value:O,children:g.jsx(Pk,{elementsRef:b,children:ue})})});function s_(e,t,n,r){if(e==null||t==null)return"none";let s=null,a=null;for(const[d,f]of r.entries()){if(f==null)continue;const h=f.value??f.index;if(e===h&&(s=d),t===h&&(a=d),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 ZI=v.createContext(void 0);function YI(){const e=v.useContext(ZI);if(e===void 0)throw new Error(Mn(65));return e}const XI=v.forwardRef(function(t,n){const{className:r,disabled:s=!1,render:a,value:l,id:c,nativeButton:d=!0,style:f,...h}=t,{value:m,getTabPanelIdByValue:b,orientation:y,tabActivationDirection:x}=Tx(),{activateOnFocus:S,highlightedTabIndex:E,onTabActivation:T,registerTabResizeObserverElement:R,setHighlightedTabIndex:_,tabsListElement:C}=YI(),M=Wl(c),A=v.useMemo(()=>({disabled:s,id:M,value:l}),[s,M,l]),{compositeProps:N,compositeRef:P,index:z}=yO({metadata:A}),D=l===m,H=v.useRef(!1),W=v.useRef(null);He(()=>{const j=W.current;if(j)return R(j)},[R]),He(()=>{if(H.current){H.current=!1;return}if(!(D&&z>-1&&E!==z))return;const j=C;if(j!=null){const X=mr(Kt(j));if(X&&dt(j,X))return}s||_(z)},[D,z,E,_,s,C]);const{getButtonProps:F,buttonRef:L}=Gl({disabled:s,native:d,focusableWhenDisabled:!0}),U=b(l),q=v.useRef(!1),Z=v.useRef(!1);function B(j){D||s||T(l,Et(Ii,j.nativeEvent,void 0,{activationDirection:"none"}))}function K(j){D||(z>-1&&!s&&_(z),!s&&S&&(!q.current||q.current&&Z.current)&&T(l,Et(Ii,j.nativeEvent,void 0,{activationDirection:"none"})))}function O(j){if(D||s)return;q.current=!0;function X(){q.current=!1,Z.current=!1}(!j.button||j.button===0)&&(Z.current=!0,Kt(j.currentTarget).addEventListener("pointerup",X,{once:!0}))}return mn("button",t,{state:{disabled:s,active:D,orientation:y,tabActivationDirection:x},ref:[n,L,P,W],props:[N,{role:"tab","aria-controls":U,"aria-selected":D,id:M,onClick:B,onFocus:K,onPointerDown:O,[LO]:D?"":void 0,onKeyDownCapture(){H.current=!0}},h,F],stateAttributesMapping:gm})});function IV(){return Jn}function MV(){return!1}function DV(){return!0}function zV(){return Tk.useSyncExternalStore(IV,MV,DV)}const jV='!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 dl=(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 LV=v.createContext(void 0),PV={disableStyleElements:!1};function QI(){return v.useContext(LV)??PV}const $V={...gm,activeTabPosition:()=>null,activeTabSize:()=>null},BV=v.forwardRef(function(t,n){const{className:r,render:s,renderBeforeHydration:a=!1,style:l,...c}=t,{nonce:d}=QI(),{getTabElementBySelectedValue:f,orientation:h,tabActivationDirection:m,value:b}=Tx(),{tabsListElement:y,registerIndicatorUpdateListener:x}=YI(),S=zV(),E=l3();v.useEffect(()=>x(E),[x,E]);let T=0,R=0,_=0,C=0,M=0,A=0,N=!1;if(b!=null&&y!=null){const L=f(b);if(L!=null){N=!0;const{width:U,height:q}=_T(L),{width:Z,height:B}=_T(y),K=L.getBoundingClientRect(),O=y.getBoundingClientRect(),$=Z>0?O.width/Z:1,V=B>0?O.height/B:1;if(Math.abs($)>Number.EPSILON&&Math.abs(V)>Number.EPSILON){const X=K.left-O.left,se=K.top-O.top;T=X/$+y.scrollLeft-y.clientLeft,_=se/V+y.scrollTop-y.clientTop}else T=L.offsetLeft,_=L.offsetTop;M=U,A=q,R=y.scrollWidth-T-M,C=y.scrollHeight-_-A}}const P=N?{left:T,right:R,top:_,bottom:C}:null,z=N?{width:M,height:A}:null,D=N?{[dl.activeTabLeft]:`${T}px`,[dl.activeTabRight]:`${R}px`,[dl.activeTabTop]:`${_}px`,[dl.activeTabBottom]:`${C}px`,[dl.activeTabWidth]:`${M}px`,[dl.activeTabHeight]:`${A}px`}:void 0,H=N&&M>0&&A>0,F=mn("span",t,{state:{orientation:h,activeTabPosition:P,activeTabSize:z,tabActivationDirection:m},ref:n,props:[{role:"presentation",style:D,hidden:!H},c,{suppressHydrationWarning:!0}],stateAttributesMapping:$V});return b==null?null:g.jsxs(v.Fragment,{children:[F,S&&a&&g.jsx("script",{nonce:d,dangerouslySetInnerHTML:{__html:jV},suppressHydrationWarning:!0})]})}),JI=v.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:s,loopFocus:a=!0,render:l,style:c,...d}=t,{onValueChange:f,orientation:h,value:m,setTabMap:b,tabActivationDirection:y}=Tx(),[x,S]=v.useState(0),[E,T]=v.useState(null),R=v.useRef(new Set),_=v.useRef(new Set),C=v.useRef(null);He(()=>{if(typeof ResizeObserver>"u")return;const H=new ResizeObserver(()=>{R.current.forEach(W=>{W()})});return C.current=H,E&&H.observe(E),_.current.forEach(W=>{H.observe(W)}),()=>{H.disconnect(),C.current=null}},[E]);const M=Ke(H=>(R.current.add(H),()=>{R.current.delete(H)})),A=Ke(H=>(_.current.add(H),C.current?.observe(H),()=>{_.current.delete(H),C.current?.unobserve(H)})),N=Ke((H,W)=>{H!==m&&f(H,W)}),P={orientation:h,tabActivationDirection:y},z={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},D=v.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:x,registerIndicatorUpdateListener:M,registerTabResizeObserverElement:A,onTabActivation:N,setHighlightedTabIndex:S,tabsListElement:E}),[r,x,M,A,N,S,E]);return g.jsx(ZI.Provider,{value:D,children:g.jsx(AF,{render:l,className:s,style:c,state:P,refs:[n,T],props:[z,d],stateAttributesMapping:gm,highlightedIndex:x,enableHomeAndEndKeys:!0,loopFocus:a,orientation:h,onHighlightedIndexChange:S,onMapChange:b,disabledIndices:yo})})}),o_={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}},FV={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}},UV={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}},qV={sm:{kaIpWk:"ui-1bl94mz",$$css:!0},md:{kaIpWk:"ui-1e1y6u3",$$css:!0},lg:{kaIpWk:"ui-1e1y6u3",$$css:!0}},vy={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}},HV={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}},GV={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}},eM=v.createContext(null);function VV(){const e=v.use(eM);if(e===null)throw new Error("SegmentedControl.Item must be used within SegmentedControl");return e}function WV({value:e,defaultValue:t,onValueChange:n,variant:r="default",size:s="md",disabled:a=!1,fullWidth:l=!1,children:c,"aria-label":d,"aria-labelledby":f,...h}){const m=v.useMemo(()=>({variant:r,size:s,disabled:a,fullWidth:l}),[a,l,s,r]);return g.jsx(eM.Provider,{value:m,children:g.jsx(KI,{...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:g.jsxs(JI,{activateOnFocus:!0,"aria-label":d,"aria-labelledby":f,"data-component":"segmented-control-list",...Ct(o_.base,r==="default"&&o_.default,r==="default"&&FV[s]),children:[c,r==="default"?g.jsx(BV,{"data-component":"segmented-control-indicator",...Ct(UV.base,qV[s])}):null]})})})}function KV({value:e,disabled:t=!1,children:n,...r}){const s=VV();return g.jsx(XI,{...r,value:e,disabled:s.disabled||t,"data-component":"segmented-control-item","data-size":s.size,"data-variant":s.variant,...Ct(vy.base,s.size==="sm"?Xi.root:Ki.root,s.variant==="default"?HV[s.size]:GV[s.size],s.variant==="compact"&&vy.compact,s.fullWidth&&vy.fullWidth),children:n})}const Tc=Object.assign(WV,{Item:KV}),tM=v.createContext(null),nM=v.createContext(null);function Ds(){const e=v.useContext(tM);if(e===null)throw new Error(Mn(60));return e}function rM(){const e=v.useContext(nM);if(e===null)throw new Error(Mn(61));return e}const ct={id:tt(e=>e.id),labelId:tt(e=>e.labelId),modal:tt(e=>e.modal),multiple:tt(e=>e.multiple),items:tt(e=>e.items),itemToStringLabel:tt(e=>e.itemToStringLabel),itemToStringValue:tt(e=>e.itemToStringValue),isItemEqualToValue:tt(e=>e.isItemEqualToValue),value:tt(e=>e.value),hasSelectedValue:tt(e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Qo(t,r)!==""}),hasNullItemLabel:tt((e,t)=>t?l4(e.items):!1),open:tt(e=>e.open),mounted:tt(e=>e.mounted),forceMount:tt(e=>e.forceMount),transitionStatus:tt(e=>e.transitionStatus),openMethod:tt(e=>e.openMethod),activeIndex:tt(e=>e.activeIndex),selectedIndex:tt(e=>e.selectedIndex),isActive:tt((e,t)=>e.activeIndex===t),isSelected:tt((e,t)=>{const n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(s=>ua(t,s,n)):ua(t,r,n)}),isSelectedByFocus:tt((e,t)=>e.selectedIndex===t),popupProps:tt(e=>e.popupProps),triggerProps:tt(e=>e.triggerProps),triggerElement:tt(e=>e.triggerElement),positionerElement:tt(e=>e.positionerElement),listElement:tt(e=>e.listElement),popupSide:tt(e=>e.popupSide),scrollUpArrowVisible:tt(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:tt(e=>e.scrollDownArrowVisible),hasScrollArrows:tt(e=>e.hasScrollArrows)};function hc(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const Ts=1;function iM(e,t){return Math.max(0,e-t)}function ZV(e,t){if(t<=0)return 0;const n=hc(e,0,t),r=n,s=t-n,a=r<=Ts,l=s<=Ts;return a&&l?r<=s?0:t:a?0:l?t:n}function YV(e){const{id:t,value:n,defaultValue:r=null,onValueChange:s,open:a,defaultOpen:l=!1,onOpenChange:c,name:d,form:f,autoComplete:h,disabled:m=!1,readOnly:b=!1,required:y=!1,modal:x=!0,actionsRef:S,inputRef:E,onOpenChangeComplete:T,items:R,multiple:_=!1,itemToStringLabel:C,itemToStringValue:M,isItemEqualToValue:A=s4,highlightItemOnHover:N=!0,children:P}=e,{clearErrors:z}=dA(),{setDirty:D,setTouched:H,setFocused:W,validityData:F,setFilled:L,name:U,disabled:q,validation:Z,validationMode:B}=Wh(),K=jk({id:t}),O=q||m,$=U??d,[V,j]=Ll({controlled:n,default:_?r??yo:r,name:"Select",state:"value"}),[X,se]=Ll({controlled:a,default:l,name:"Select",state:"open"}),re=v.useRef([]),oe=v.useRef([]),ue=v.useRef(null),ce=v.useRef(null),ge=v.useRef(0),Ce=v.useRef(null),ae=v.useRef([]),ye=v.useRef(!1),we=v.useRef(null),Ae=v.useRef(null),Ee=v.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),xe=v.useRef(!1),{mounted:De,setMounted:Ie,transitionStatus:je}=sf(X),{openMethod:Ue,triggerProps:ke}=H3(X),Te=Hr(()=>new MN({id:K,labelId:void 0,modal:x,multiple:_,itemToStringLabel:C,itemToStringValue:M,isItemEqualToValue:A,value:V,open:X,mounted:De,transitionStatus:je,items:R,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,te=pt(Te,ct.activeIndex),fe=pt(Te,ct.selectedIndex),J=pt(Te,ct.triggerElement),ne=pt(Te,ct.positionerElement),be=uF(Ue),Ge=Ue??be??null,Ze=v.useMemo(()=>_?"":Qo(V,M),[_,V,M]),Xe=v.useMemo(()=>_&&Array.isArray(V)?V.map(Me=>Qo(Me,M)):Qo(V,M),[_,V,M]),vt=In(Te.state.triggerElement),Je=Ke(()=>Xe);fA(vt,K,V,Je,!O,d);const mt=v.useRef(V),Tt=_?Array.isArray(V)&&V.length>0:V!=null&&Qo(V,M)!=="";He(()=>{V!==mt.current&&Te.set("forceMount",!0)},[Te,V]),He(()=>{L(Tt)},[Tt,L]),He(function(){const Pe=ae.current;let $e;if(_){const kt=Array.isArray(V)?V:[];if(kt.length===0)$e=null;else{const Ht=kt[kt.length-1],bt=xc(Pe,Ht,A);$e=bt===-1?null:bt}}else{const kt=xc(Pe,V,A);$e=kt===-1?null:kt}$e===null&&(Ae.current=null),!X&&Te.set("selectedIndex",$e)},[Tt,_,X,V,ae,A,Te,Ae]);function st(Me){const Pe=F.initialValue;return Array.isArray(Me)&&Array.isArray(Pe)?!q6(Me,Pe,($e,kt)=>ua($e,kt,A)):Me!==Pe}nA(V,()=>{z($),D(st(V)),Z.change(V)});const _t=Ke((Me,Pe)=>{c?.(Me,Pe),!Pe.isCanceled&&(se(Me),!Me&&(Pe.reason===Mh||Pe.reason===lk)&&(H(!0),W(!1),B==="onBlur"&&Z.commit(V)))}),Ot=Ke(()=>{Ie(!1),Te.update({activeIndex:null,openMethod:null}),T?.(!1)});To({enabled:!S,open:X,ref:ue,onComplete(){X||Ot()}}),v.useImperativeHandle(S,()=>({unmount:Ot}),[Ot]);const ot=Ke((Me,Pe)=>{s?.(Me,Pe),!Pe.isCanceled&&j(Me)}),St=Ke(()=>{const Me=Te.state.listElement||ue.current;if(!Me)return;const Pe=iM(Me.scrollHeight,Me.clientHeight),$e=ZV(Me.scrollTop,Pe),kt=$e>0,Ht=$e<Pe;Te.state.scrollUpArrowVisible!==kt&&Te.set("scrollUpArrowVisible",kt),Te.state.scrollDownArrowVisible!==Ht&&Te.set("scrollDownArrowVisible",Ht)}),Pt=VN({open:X,onOpenChange:_t,elements:{reference:J,floating:ne}}),jt=i$(Pt,{enabled:!b&&!O,event:"mousedown"}),Dt=vk(Pt),Y=x3(Pt,{enabled:!b&&!O,listRef:re,activeIndex:te,selectedIndex:fe,disabledIndices:yo,onNavigate(Me){Me===null&&!X||Te.set("activeIndex",Me)},focusItemOnHover:N}),he=S3(Pt,{enabled:!b&&!O&&(X||!_),listRef:oe,activeIndex:te,selectedIndex:fe,disabledIndices:Me=>vO(re.current[Me]),onMatch(Me){X?Te.set("activeIndex",Me):ot(ae.current[Me],Et("none"))},onTyping(Me){ye.current=Me}}),Le=v.useMemo(()=>{const Me=Gi(he.reference,Y.reference,Dt.reference,jt.reference,ke);return K&&(Me.id=K),Me},[jt.reference,he.reference,Y.reference,Dt.reference,ke,K]),Qe=v.useMemo(()=>Gi(Ck,he.floating,Y.floating,Dt.floating),[he.floating,Y.floating,Dt.floating]),wt=Y.item??Un;AN(()=>{Te.update({popupProps:Qe,triggerProps:Le})}),He(()=>{Te.update({id:K,modal:x,multiple:_,value:V,open:X,mounted:De,transitionStatus:je,popupProps:Qe,triggerProps:Le,items:R,itemToStringLabel:C,itemToStringValue:M,isItemEqualToValue:A,openMethod:Ge})},[Te,K,x,_,V,X,De,je,Qe,Le,R,C,M,A,Ge]);const lt=v.useMemo(()=>({store:Te,name:$,required:y,disabled:O,readOnly:b,multiple:_,highlightItemOnHover:N,setValue:ot,setOpen:_t,listRef:re,popupRef:ue,scrollHandlerRef:ce,handleScrollArrowVisibility:St,scrollArrowsMountedCountRef:ge,itemProps:wt,valueRef:Ce,valuesRef:ae,labelsRef:oe,typingRef:ye,selectionRef:Ee,firstItemTextRef:we,selectedItemTextRef:Ae,validation:Z,onOpenChangeComplete:T,alignItemWithTriggerActiveRef:xe,initialValueRef:mt}),[Te,$,y,O,b,_,N,ot,_t,wt,Z,T,St]),qe=bo(E,Z.inputRef),_e=_&&Array.isArray(V)&&V.length>0,Se=_?void 0:$,Ye=v.useMemo(()=>!_||!Array.isArray(V)||!$?null:V.map(Me=>{const Pe=Qo(Me,M);return g.jsx("input",{type:"hidden",form:f,name:$,value:Pe,disabled:O},Pe)}),[_,V,f,$,M,O]);return g.jsx(tM.Provider,{value:lt,children:g.jsxs(nM.Provider,{value:Pt,children:[P,g.jsx("input",{...Z.getValidationProps(O,{onFocus(){Te.state.triggerElement?.focus({focusVisible:!0})},onChange(Me){if(Me.nativeEvent.defaultPrevented||O||b)return;const Pe=Me.currentTarget.value,$e=Et(Ii,Me.nativeEvent);function kt(){if(_)return;const Ht=Pe.toLowerCase();let bt=ae.current.findIndex(zn=>Qo(zn,M).toLowerCase()===Ht||yA(zn,C).toLowerCase()===Ht);bt===-1&&(bt=ae.current.findIndex((zn,Wr)=>{const An=oe.current[Wr];return An!=null&&An.toLowerCase()===Ht}));const Yt=bt===-1?void 0:ae.current[bt];Yt!=null&&ot(Yt,$e)}Te.set("forceMount",!0),queueMicrotask(kt)}}),id:K&&Se==null?`${K}-hidden-input`:void 0,form:f,name:Se,autoComplete:h,value:Ze,disabled:O,required:y&&!_e,readOnly:b,ref:qe,style:$?_P:XC,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Ye]})})}const op=2,XV=400,QV={...W2,...af,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},JV=v.forwardRef(function(t,n){const{render:r,className:s,id:a,disabled:l=!1,nativeButton:c=!0,style:d,...f}=t,{setTouched:h,setFocused:m,validationMode:b,state:y,disabled:x}=Wh(),{labelId:S}=Dk(),{store:E,setOpen:T,selectionRef:R,validation:_,readOnly:C,required:M,alignItemWithTriggerActiveRef:A,disabled:N}=Ds(),P=x||N||l,z=pt(E,ct.open),D=pt(E,ct.mounted),H=pt(E,ct.value),W=pt(E,ct.triggerProps),F=pt(E,ct.positionerElement),L=pt(E,ct.listElement),U=pt(E,ct.popupSide),q=pt(E,ct.id),Z=pt(E,ct.labelId),B=pt(E,ct.hasSelectedValue),K=D&&F?U:null,O=a??q,$=f4(S,Z);jk({id:O});const V=In(F),j=v.useRef(null),{getButtonProps:X,buttonRef:se}=Gl({disabled:P,native:c}),re=Ke(ye=>{E.set("triggerElement",ye)}),oe=Si(),ue=Si(),ce=Si();v.useEffect(()=>{if(z)return ce.start(XV,()=>{R.current.allowUnselectedMouseUp=!0,R.current.allowSelectedMouseUp=!0}),()=>{ce.clear()};R.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},ue.clear()},[z,R,ue,ce]);const ge=Gi(W,{id:O,role:"combobox","aria-expanded":z?"true":"false","aria-haspopup":"listbox","aria-controls":z?L?.id??Up(F)?.id:void 0,"aria-labelledby":$,"aria-readonly":C||void 0,"aria-required":M||void 0,tabIndex:P?-1:0,onFocus(ye){m(!0),z&&A.current&&T(!1,Et(Ii,ye.nativeEvent)),oe.start(0,()=>{E.set("forceMount",!0)})},onBlur(ye){dt(F,ye.relatedTarget)||(h(!0),m(!1),b==="onBlur"&&_.commit(H))},onMouseDown(ye){if(z)return;const we=Kt(ye.currentTarget);function Ae(Ee){if(!j.current)return;const xe=Ee.target;if(dt(j.current,xe)||dt(V.current,xe))return;const De=d4(j.current);Ee.clientX>=De.left-op&&Ee.clientX<=De.right+op&&Ee.clientY>=De.top-op&&Ee.clientY<=De.bottom+op||T(!1,Et(iP,Ee))}ue.start(0,()=>{we.addEventListener("mouseup",Ae,{once:!0})})}},f,X),Ce=_.getValidationProps(P,ge);Ce.role="combobox";const ae={...y,open:z,disabled:P,value:H,readOnly:C,popupSide:K,placeholder:!B};return mn("button",t,{ref:[n,j,se,re],state:ae,stateAttributesMapping:QV,props:Ce})}),eW={value:()=>null},tW=v.forwardRef(function(t,n){const{className:r,render:s,children:a,placeholder:l,style:c,...d}=t,{store:f,valueRef:h}=Ds(),m=pt(f,ct.value),b=pt(f,ct.items),y=pt(f,ct.itemToStringLabel),x=pt(f,ct.hasSelectedValue),S=!x&&l!=null&&a==null,E=pt(f,ct.hasNullItemLabel,S),T={value:m,placeholder:!x};let R=null;return typeof a=="function"?R=a(m):a!=null?R=a:!x&&l!=null&&!E?R=l:Array.isArray(m)?R=u4(m,b,y):R=vA(m,b,y),mn("span",t,{state:T,ref:[n,h],props:[{children:R},d],stateAttributesMapping:eW})}),nW=v.createContext(void 0),rW=v.forwardRef(function(t,n){const{store:r}=Ds(),s=pt(r,ct.mounted),a=pt(r,ct.forceMount);return s||a?g.jsx(nW.Provider,{value:!0,children:g.jsx(YP,{ref:n,...t})}):null}),iW={...nf,...xo},sW=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,{store:c}=Ds(),d=pt(c,ct.open),f=pt(c,ct.mounted),h=pt(c,ct.transitionStatus);return mn("div",t,{state:{open:d,transitionStatus:h},ref:n,props:[{role:"presentation",hidden:!f,style:{userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:iW})}),sM=v.createContext(void 0);function oM(){const e=v.useContext(sM);if(!e)throw new Error(Mn(59));return e}function gh(e,t){e&&Object.assign(e.style,t)}const aM={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},oW={position:"fixed"},aW=v.forwardRef(function(t,n){const{anchor:r,positionMethod:s="absolute",className:a,render:l,side:c="bottom",align:d="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b,arrowPadding:y=5,sticky:x=!1,disableAnchorTracking:S,alignItemWithTrigger:E=!0,collisionAvoidance:T=WP,style:R,..._}=t,{store:C,listRef:M,labelsRef:A,alignItemWithTriggerActiveRef:N,selectedItemTextRef:P,valuesRef:z,initialValueRef:D,popupRef:H,setValue:W}=Ds(),F=rM(),L=pt(C,ct.open),U=pt(C,ct.mounted),q=pt(C,ct.modal),Z=pt(C,ct.value),B=pt(C,ct.openMethod),K=pt(C,ct.positionerElement),O=pt(C,ct.triggerElement),$=pt(C,ct.isItemEqualToValue),V=pt(C,ct.transitionStatus),j=v.useRef(null),X=v.useRef(null),[se,re]=v.useState(E),oe=U&&se&&B!=="touch";!U&&se!==E&&re(E),He(()=>{U||(ct.scrollUpArrowVisible(C.state)&&C.set("scrollUpArrowVisible",!1),ct.scrollDownArrowVisible(C.state)&&C.set("scrollDownArrowVisible",!1))},[C,U]),v.useImperativeHandle(N,()=>oe),S4((oe||q)&&L,B==="touch",K,O);const ue=$k({anchor:r,floatingRootContext:F,positionMethod:s,mounted:U,side:c,sideOffset:f,align:d,alignOffset:h,arrowPadding:y,collisionBoundary:m,collisionPadding:b,sticky:x,disableAnchorTracking:S??oe,collisionAvoidance:T,keepMounted:!0}),ce=oe?"none":ue.side,ge=oe?oW:ue.positionerStyles,Ce={open:L,side:ce,align:ue.align,anchorHidden:ue.anchorHidden};He(()=>{C.set("popupSide",ue.side)},[C,ue.side]);const ae=Ke(xe=>{C.set("positionerElement",xe)}),ye=Bk(t,Ce,{styles:ge,transitionStatus:V,props:_,refs:[n,ae],hidden:!U,inert:!L}),we=v.useRef(0),Ae=Ke(xe=>{if(xe.size===0&&we.current===0||z.current.length===0)return;const De=we.current;if(we.current=xe.size,xe.size===De)return;const Ie=Et(Ii);if(De!==0&&!C.state.multiple&&Z!==null&&xc(z.current,Z,$)===-1){const Ue=D.current,Te=Ue!=null&&xc(z.current,Ue,$)!==-1?Ue:null;W(Te,Ie),Te===null&&(C.set("selectedIndex",null),P.current=null)}if(De!==0&&C.state.multiple&&Array.isArray(Z)){const je=ke=>xc(z.current,ke,$)!==-1,Ue=Z.filter(ke=>je(ke));(Ue.length!==Z.length||Ue.some(ke=>!o4(Z,ke,$)))&&(W(Ue,Ie),Ue.length===0&&(C.set("selectedIndex",null),P.current=null))}if(L&&oe){C.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const je={height:""};gh(K,je),gh(H.current,je)}}),Ee=v.useMemo(()=>({...ue,side:ce,alignItemWithTriggerActive:oe,setControlledAlignItemWithTrigger:re,scrollUpArrowRef:j,scrollDownArrowRef:X}),[ue,ce,oe,re]);return g.jsx(Pk,{elementsRef:M,labelsRef:A,onMapChange:Ae,children:g.jsxs(sM.Provider,{value:Ee,children:[U&&q&&g.jsx(D3,{inert:M3(!L),cutout:O}),ye]})})}),ap="base-ui-disable-scrollbar",xv={className:ap,getElement(e){return g.jsx("style",{nonce:e,href:ap,precedence:"base-ui:low",children:`.${ap}{scrollbar-width:none}.${ap}::-webkit-scrollbar{display:none}`})}},lW={...nf,...xo},uW=v.forwardRef(function(t,n){const{render:r,className:s,style:a,finalFocus:l,...c}=t,{store:d,popupRef:f,onOpenChangeComplete:h,setOpen:m,valueRef:b,firstItemTextRef:y,selectedItemTextRef:x,multiple:S,handleScrollArrowVisibility:E,scrollHandlerRef:T,listRef:R,highlightItemOnHover:_}=Ds(),{side:C,align:M,alignItemWithTriggerActive:A,isPositioned:N,setControlledAlignItemWithTrigger:P}=oM(),z=aF()!=null,D=rM(),H=Lk(),{nonce:W,disableStyleElements:F}=QI(),L=pt(d,ct.id),U=pt(d,ct.open),q=pt(d,ct.openMethod),Z=pt(d,ct.mounted),B=pt(d,ct.popupProps),K=pt(d,ct.transitionStatus),O=pt(d,ct.triggerElement),$=pt(d,ct.positionerElement),V=pt(d,ct.listElement),j=v.useRef(!1),X=v.useRef(!1),se=v.useRef({}),re=Dl(),oe=Ke(Ce=>{if(!$||!f.current||!X.current)return;if(j.current||!A){E();return}const ae=$.style.top==="0px",ye=$.style.bottom==="0px";if(!ae&&!ye){E();return}const we=l_($),Ae=mc($.getBoundingClientRect().height,"y",we),Ee=Kt($),xe=wn($),De=xe.getComputedStyle($),Ie=parseFloat(De.marginTop),je=parseFloat(De.marginBottom),Ue=a_(xe.getComputedStyle(f.current)),ke=Math.min(Ee.documentElement.clientHeight-Ie-je,Ue),Te=Ce.scrollTop,te=lp(Ce);let fe=0,J=null,ne=!1,be=!1;const Ge=Je=>{$.style.height=`${Je}px`},Ze=(Je,mt)=>{const Tt=hc(Je,0,ke-Ae);Tt>0&&Ge(Ae+Tt),Ce.scrollTop=mt,ke-(Ae+Tt)<=Ts&&(j.current=!0),E()},Xe=ae?te-Te:Te,vt=Math.min(Ae+Xe,ke);if(fe=vt,Xe<=Ts){Ze(Xe,ae?te:0);return}if(ke-vt>Ts)ae?be=!0:J=0;else if(ne=!0,ye&&Te<te){const Je=Ae+Xe-ke;J=Te-(Xe-Je)}if(fe=Math.ceil(fe),fe!==0&&Ge(fe),be||J!=null){const Je=lp(Ce),mt=be?Je:hc(J,0,Je);Math.abs(Ce.scrollTop-mt)>Ts&&(Ce.scrollTop=mt)}(ne||fe>=ke-Ts)&&(j.current=!0),E()});v.useImperativeHandle(T,()=>oe,[oe]),To({open:U,ref:f,onComplete(){U&&h?.(!0)}});const ue={open:U,transitionStatus:K,side:C,align:M};He(()=>{!$||!f.current||Object.keys(se.current).length||(se.current={top:$.style.top||"0",left:$.style.left||"0",right:$.style.right,height:$.style.height,bottom:$.style.bottom,minHeight:$.style.minHeight,maxHeight:$.style.maxHeight,marginTop:$.style.marginTop,marginBottom:$.style.marginBottom})},[f,$]),He(()=>{U||A||(X.current=!1,j.current=!1,gh($,se.current))},[U,A,$,f]),He(()=>{const Ce=f.current;if(!U||!O||!$||!Ce||A&&!N||d.state.transitionStatus==="ending")return;if(!A){X.current=!0,re.request(E),Ce.style.removeProperty("--transform-origin");return}const ae=cW(Ce);Ce.style.removeProperty("--transform-origin");try{let ye=x.current;ye?.isConnected||(ye=!ct.hasSelectedValue(d.state)&&y.current?.isConnected?y.current:null);const we=b.current,Ae=wn($),Ee=Ae.getComputedStyle($),xe=Ae.getComputedStyle(Ce),De=Kt(O),Ie=l_(O),je=up(O.getBoundingClientRect(),Ie),Ue=up($.getBoundingClientRect(),Ie),ke=je.height,Te=V||Ce,te=Te.scrollHeight,fe=parseFloat(xe.borderBottomWidth),J=parseFloat(Ee.marginTop)||10,ne=parseFloat(Ee.marginBottom)||10,be=parseFloat(Ee.minHeight)||100,Ge=a_(xe),Ze=5,Xe=5,vt=20,Je=De.documentElement.clientHeight-J-ne,mt=De.documentElement.clientWidth,Tt=Je-je.bottom+ke;let st,_t=H==="rtl"?je.right-Ue.width:je.left,Ot=0;if(ye&&we){const lt=up(we.getBoundingClientRect(),Ie);st=up(ye.getBoundingClientRect(),Ie),_t=Ue.left+(H==="rtl"?lt.right-st.right:lt.left-st.left);const qe=lt.top-je.top+lt.height/2;Ot=st.top-Ue.top+st.height/2-qe}const ot=Tt+Ot+ne+fe;let St=Math.min(Je,ot);const Pt=Je-J-ne,jt=ot-St,Dt=mt-Xe;$.style.left=`${hc(_t,Ze,Dt-Ue.width)}px`,$.style.height=`${St}px`,$.style.maxHeight="none",$.style.marginTop=`${J}px`,$.style.marginBottom=`${ne}px`,Ce.style.height="100%";const Y=lp(Te),he=jt>=Y-Ts;he&&(St=Math.min(Je,Ue.height)-(jt-Y));const Le=je.top<vt||je.bottom>Je-vt||Math.ceil(St)+Ts<Math.min(te,be),Qe=(Ae.visualViewport?.scale??1)!==1&&wo;if(Le||Qe){X.current=!0,gh($,se.current),P(!1);return}const wt=Math.max(be,St);if(he){const lt=Math.max(0,Je-ot);$.style.top=Ue.height>=Pt?"0":`${lt}px`,$.style.height=`${St}px`,Te.scrollTop=lp(Te)}else $.style.bottom="0",Te.scrollTop=jt;if(st){const lt=Ue.top,qe=Ue.height,_e=st.top+st.height/2,Se=qe>0?(_e-lt)/qe*100:50,Ye=hc(Se,0,100);Ce.style.setProperty("--transform-origin",`50% ${Ye}%`)}(wt===Je||St>=Ge)&&(j.current=!0),E(),_&&d.state.selectedIndex===null&&d.state.activeIndex===null&&R.current[0]!=null&&d.set("activeIndex",0),X.current=!0}finally{ae()}},[d,U,$,O,b,y,x,f,E,A,P,re,V,R,_,H,N]),v.useEffect(()=>{if(!A||!$||!U)return;const Ce=wn($);function ae(ye){m(!1,Et(sP,ye))}return zt(Ce,"resize",ae)},[m,A,$,U]);const ce={...V?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":S||void 0,id:`${L}-list`},onKeyDown(Ce){z&&tA.has(Ce.key)&&Ce.stopPropagation()},onScroll(Ce){V||oe(Ce.currentTarget)},...A&&{style:V?{height:"100%"}:aM}},ge=mn("div",t,{ref:[n,f],state:ue,stateAttributesMapping:lW,props:[B,ce,Kh(K),{className:!V&&A?xv.className:void 0},c]});return g.jsxs(v.Fragment,{children:[!F&&xv.getElement(W),g.jsx(r$,{context:D,modal:!1,disabled:!Z,openInteractionType:q,returnFocus:l,restoreFocus:!0,children:ge})]})});function a_(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function lp(e){return iM(e.scrollHeight,e.clientHeight)}function l_(e){return wN.getScale(e)}function mc(e,t,n){return e/n[t]}function up(e,t){return Oc({x:mc(e.x,"x",t),y:mc(e.y,"y",t),width:mc(e.width,"x",t),height:mc(e.height,"y",t)})}const u_=[["transform","none"],["scale","1"],["translate","0 0"]];function cW(e){const{style:t}=e,n={};for(const[r,s]of u_)n[r]=t.getPropertyValue(r),t.setProperty(r,s,"important");return()=>{for(const[r]of u_){const s=n[r];s?t.setProperty(r,s):t.removeProperty(r)}}}const fW=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,{store:c,scrollHandlerRef:d}=Ds(),{alignItemWithTriggerActive:f}=oM(),h=pt(c,ct.hasScrollArrows),m=pt(c,ct.openMethod),b=pt(c,ct.multiple),x={id:`${pt(c,ct.id)}-list`,role:"listbox","aria-multiselectable":b||void 0,onScroll(E){d.current?.(E.currentTarget)},...f&&{style:aM},className:h&&m!=="touch"?xv.className:void 0},S=Ke(E=>{c.set("listElement",E)});return mn("div",t,{ref:[n,S],props:[x,l]})}),lM=v.createContext(void 0);function _x(){const e=v.useContext(lM);if(!e)throw new Error(Mn(57));return e}const dW=v.memo(v.forwardRef(function(t,n){const{render:r,className:s,style:a,value:l=null,label:c,disabled:d=!1,nativeButton:f=!1,...h}=t,m=v.useRef(null),b=EA({label:c,textRef:m,indexGuessBehavior:wA.GuessFromOrder}),{store:y,itemProps:x,setOpen:S,setValue:E,selectionRef:T,typingRef:R,valuesRef:_,multiple:C,selectedItemTextRef:M,disabled:A,readOnly:N}=Ds(),P=pt(y,ct.isActive,b.index),z=pt(y,ct.open),D=pt(y,ct.isSelected,l),H=pt(y,ct.isSelectedByFocus,b.index),W=pt(y,ct.isItemEqualToValue),F=b.index,L=F!==-1,U=v.useRef(null);He(()=>{if(!L)return;const oe=_.current;return oe[F]=l,()=>{delete oe[F]}},[L,F,l,_]),He(()=>{if(!L)return;const oe=y.state.value;let ue=oe;C&&Array.isArray(oe)&&(ue=oe.length>0?oe[oe.length-1]:void 0),ue!==void 0&&ua(l,ue,W)&&(y.set("selectedIndex",F),m.current&&(M.current=m.current))},[L,F,C,W,y,l,M]);const q=v.useRef(null),Z=v.useRef("mouse"),B=v.useRef(!1),{getButtonProps:K,buttonRef:O}=Gl({disabled:d,focusableWhenDisabled:!0,native:f,composite:!0}),$={disabled:d,selected:D,highlighted:P};function V(oe){if(A||N)return;const ue=y.state.value;if(C){const ce=Array.isArray(ue)?ue:[],ge=D?a4(ce,l,W):[...ce,l];E(ge,Et(Lb,oe))}else E(l,Et(Lb,oe)),S(!1,Et(Lb,oe))}function j(){T.current.dragY=0}const X={role:"option","aria-selected":D,tabIndex:z&&P?0:-1,onKeyDown(oe){q.current=oe.key,y.set("activeIndex",F),oe.key===" "&&R.current&&oe.preventDefault()},onClick(oe){const ue=oe.type==="click"&&Z.current!=="touch",ce=oe.nativeEvent.pointerType,ge=ue&&dk(oe.nativeEvent)&&(ce!==void 0||P),Ce=ue&&!ge&&!B.current;B.current=!1,!(oe.type==="keydown"&&q.current===null)&&(d||oe.type==="keydown"&&q.current===" "&&R.current||Ce||(q.current=null,V(oe.nativeEvent)))},onPointerEnter(oe){Z.current=oe.pointerType},onPointerMove(oe){if(oe.pointerType==="mouse"&&oe.buttons===1){const ue=T.current;ue.dragY+=oe.movementY,ue.dragY**2>=64&&(ue.allowUnselectedMouseUp=!0)}},onPointerDown(oe){Z.current=oe.pointerType,B.current=!0,j()},onMouseUp(){if(j(),d||Z.current==="touch"||B.current)return;const oe=!T.current.allowSelectedMouseUp&&D,ue=!T.current.allowUnselectedMouseUp&&!D;oe||ue||(B.current=!0,U.current?.click(),B.current=!1)}},se=mn("div",t,{ref:[O,n,b.ref,U],state:$,props:[x,X,h,K]}),re=v.useMemo(()=>({selected:D,index:F,textRef:m,selectedByFocus:H,hasRegistered:L}),[D,F,m,H,L]);return g.jsx(lM.Provider,{value:re,children:se})})),c_=v.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:s}=_x();return r||s?g.jsx(pW,{...t,ref:n}):null}),pW=v.memo(v.forwardRef((e,t)=>{const{render:n,className:r,style:s,keepMounted:a,...l}=e,{selected:c}=_x(),d=v.useRef(null),{transitionStatus:f,setMounted:h}=sf(c),b=mn("span",e,{ref:[t,d],state:{selected:c,transitionStatus:f},props:[{"aria-hidden":!0,children:"✔️"},l],stateAttributesMapping:xo});return To({open:c,ref:d,onComplete(){c||h(!1)}}),b})),hW=v.memo(v.forwardRef(function(t,n){const{index:r,textRef:s,selectedByFocus:a,hasRegistered:l}=_x(),{firstItemTextRef:c,selectedItemTextRef:d}=Ds(),{render:f,className:h,style:m,...b}=t,y=v.useCallback(S=>{S&&(l&&r===0&&(c.current=S),l&&a&&(d.current=S))},[c,d,r,a,l]);return mn("div",t,{ref:[y,n,s],props:b})})),uM="lg",Rn={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}},f_={base:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",k9WMMc:"ui-dpxx8g",kMwMTN:"ui-15rks2t",$$css:!0},placeholder:{kMwMTN:"ui-4b2ntj",$$css:!0}},ky={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}},cp={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}},mW="sm";function gW(e){return[Rn.base,Ki.root,{"ui--default-marker":"ui--default-marker",$$css:!0},e.animated?Rn.animated:null,kW(e.variant),xW(e.size),e.variant==="filled"?Rn.variantFilled:null,e.hug?null:Rn.hugFalse,e.shape==="pill"?Rn.shapePill:Rn.shapeRounded,e.frame==="content"?SW(e):null,e.frame==="content"&&!e.hug?wW(e):null]}function bW(e){return[Yl.root,Mk.root,f_.base,e?f_.placeholder:null]}function yW(e,t){return[ky.base,e==="ghost"||e==="unfilled"?ky.muted:null,e==="ghost"&&t?ky.ghostOpen:null]}function vW(e,t){return[cp.base,e==="ghost"?cp.ghost:null,t&&e!=="ghost"?cp.open:null,t&&e==="ghost"?cp.ghostOpen:null]}function kW(e){switch(e){case"default":return Rn.variantDefault;case"outline":return Rn.variantOutline;case"filled":return null;case"ghost":return Rn.variantGhost;case"unfilled":return Rn.variantUnfilled}}function xW(e){switch(e){case"lg":return Rn.sizeLg;case"md":case"base":return Rn.sizeMd}}function SW(e){const t=e.size==="lg";return e.variant==="filled"?t?Rn.frameContentFilledLg:Rn.frameContentFilledMd:e.variant==="unfilled"?t?Rn.frameContentUnfilledLg:Rn.frameContentUnfilledMd:t?Rn.frameContentLg:Rn.frameContentMd}function wW(e){const t=e.size==="lg";return e.variant==="filled"?t?Rn.frameContentHugFalseFilledLg:Rn.frameContentHugFalseFilledMd:e.variant==="unfilled"?t?Rn.frameContentHugFalseUnfilledLg:Rn.frameContentHugFalseUnfilledMd:t?Rn.frameContentHugFalseLg:Rn.frameContentHugFalseMd}function EW({children:e,variant:t="default",frame:n="container",shape:r="rounded",size:s=uM,hug:a=!0,className:l,style:c,rootStyle:d,labelStyle:f,disabled:h=!1,id:m,leading:b,trailing:y,open:x,animated:S=!1,placeholder:E,hideChevron:T=!1,ref:R,"data-popup-open":_,...C}){const M=e==null&&E!=null,A=x??(_!==void 0&&_!==!1),N=x===void 0?_:x||void 0,P=Lt({rootClass:"ui-select-trigger",stylexStyles:[gW({animated:S,frame:n,hug:a,shape:r,size:s,variant:t}),d],className:l,style:c}),z=Lt({rootClass:"ui-select-label",stylexStyles:[bW(M),f]}),D=Ct(yW(t,A)),H=Lt({rootClass:"ui-select-icon",stylexStyles:vW(t,A)});return g.jsxs("button",{...C,ref:R,type:"button",id:m,className:P.className,style:P.style,"data-popup-open":N,"data-disabled":h||void 0,disabled:h,children:[b!=null&&g.jsx("span",{className:D.className,style:D.style,children:b}),g.jsx("span",{className:z.className,style:z.style,children:M?E:e}),y!=null&&g.jsx("span",{className:D.className,style:D.style,children:y}),T?null:g.jsx(tn,{name:t==="filled"||t==="ghost"||t==="unfilled"?"chevron-down":"chevrons-up-down",size:10,className:H.className,style:H.style})]})}const d_={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}]},cM=v.createContext(null);function Rx(){const e=v.useContext(cM);if(!e)throw new Error("Select internals must be used within Select");return e}function TW(){const e=Rx(),t=e.hasValue?g.jsx(tW,{}):void 0;return g.jsx(JV,{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)=>g.jsx(EW,{...n,animated:e.animated,className:bn(n.className,e.className),disabled:e.disabled,frame:e.frame,hug:e.hug,hideChevron:e.hideChevron,leading:e.leading,labelStyle:e.labelStyle,open:r.open,placeholder:e.placeholder,rootStyle:e.rootStyle,trailing:e.trailing,shape:e.shape,size:e.size,variant:e.variant})),children:t})}function _W({children:e}){const t=Rx(),n=ka(),{zIndex:r,portalLayerStyles:s}=Zl("popover",t.open),a=Jh(t.placement,t.offset,!1),l=t.matchAnchorWidth?"var(--anchor-width)":t.contentWidth;return g.jsxs(rW,{container:n??void 0,style:s,children:[g.jsx(sW,{"data-component":"select-backdrop",...Ct(d_.backdrop,r!==null&&d_.backdropZIndex(r-1))}),g.jsx(aW,{align:a.align,alignItemWithTrigger:!1,alignOffset:a.alignOffset,collisionAvoidance:a.collisionAvoidance,"data-component":"select-positioner",positionMethod:a.positionMethod,side:a.side,sideOffset:a.sideOffset,...Ct(O4),children:g.jsx(uW,{"data-component":"select-popup","data-size":t.menuSize,...Ct($4,Zh,B4[t.menuSize],l!==void 0?F4(l):U4,t.contentStyle),children:g.jsx(Ms,{menuSize:t.menuSize,children:g.jsx(wB,{children:g.jsx(fW,{"aria-label":t.ariaLabel??"Select an option",...Ct(q4),children:e})})})})})]})}function RW({option:e}){Rx();const t=e.description!==void 0,n=g.jsxs(dW,{disabled:e.disabled,label:typeof e.label=="string"?e.label:void 0,value:e.value,"data-component":"select-item","data-has-description":t||void 0,...Ct(H4),children:[e.leading!=null?g.jsx("span",{...Ct(Yb,X4,t&&Xb),children:e.leading}):null,g.jsxs("span",{...Ct(G4,t&&K4),children:[g.jsxs(hW,{...Ct(e.labelMeta!=null&&W4),children:[g.jsx("span",{...Ct(V4),children:e.label}),e.labelMeta!=null?g.jsx("span",{...Ct(Y4),children:e.labelMeta}):null]}),t?g.jsx("span",{"data-component":"select-item-description",...Ct(Z4,Xi.root),children:e.description}):null]}),e.trailing!=null?g.jsxs("span",{"data-component":"select-item-end",...Ct(Yb,VE,Q4,t&&Xb),children:[e.trailing,g.jsx(c_,{"data-component":"select-item-indicator",children:g.jsx(tn,{color:"primary",name:"check","aria-hidden":!0})})]}):g.jsx(c_,{"data-component":"select-item-indicator",...Ct(Yb,VE,t&&Xb),children:g.jsx(tn,{color:"primary",name:"check","aria-hidden":!0})})]});return e.tooltip==null?n:g.jsx(yf,{closeDelay:e.tooltipCloseDelay,content:e.tooltip,openDelay:e.tooltipOpenDelay,children:n})}function CW({value:e,defaultValue:t,onValueChange:n,open:r,defaultOpen:s,onOpenChange:a,options:l,placeholder:c,variant:d="default",frame:f="container",shape:h="rounded",size:m=uM,menuSize:b,contentWidth:y,matchAnchorWidth:x=!1,hug:S=!0,disabled:E=!1,animated:T=!1,className:R,renderTrigger:_,placement:C="bottom-start",offset:M=4,"aria-label":A,"aria-labelledby":N,id:P,leading:z,trailing:D,labelStyle:H,rootStyle:W,hideChevron:F=!1,contentStyle:L,...U}){const[q,Z]=zc(e,t,void 0,"Select.Root (value)"),B=q!=null&&l.some(re=>re.value===q),[K,O]=zc(r,s??!1,void 0,"Select.Root (open)"),$=b??"sm",V=v.useCallback((re,oe)=>{n?.(re,oe),!oe.isCanceled&&Z(re)},[n,Z]),j=v.useCallback((re,oe)=>{a?.(re,oe),!oe.isCanceled&&O(re)},[a,O]),X=v.useMemo(()=>({hasValue:B,variant:d,frame:f,shape:h,size:m,menuSize:$,hug:S,disabled:E,animated:T,open:K,placement:C,offset:M,id:P,ariaLabel:A,ariaLabelledBy:N,placeholder:c,leading:z,trailing:D,labelStyle:H,rootStyle:W,hideChevron:F,contentStyle:L,className:R,renderTrigger:_,contentWidth:y,matchAnchorWidth:x}),[T,A,N,R,L,y,E,f,S,B,F,P,K,H,z,x,M,C,c,$,W,D,_,h,m,d]),se=l.map(re=>({label:re.label,value:re.value}));return g.jsx(cM.Provider,{value:X,children:g.jsx(Ms,{iconSize:mW,children:g.jsxs(YV,{...U,defaultOpen:s,defaultValue:t,disabled:E,id:P,items:se,onOpenChange:j,onValueChange:V,open:r,value:e,children:[g.jsx(TW,{}),g.jsx(_W,{children:l.map((re,oe)=>g.jsx(RW,{option:re},typeof re.value=="string"||typeof re.value=="number"?String(re.value):oe))})]})})})}const NW=v.createContext(void 0);function AW(e=!0){const t=v.useContext(NW);if(t===void 0&&!e)throw new Error(Mn(7));return t}const OW=v.forwardRef(function(t,n){const{className:r,defaultPressed:s=!1,disabled:a=!1,form:l,onPressedChange:c,pressed:d,render:f,type:h,value:m,nativeButton:b=!0,style:y,...x}=t,S=Wl(m||void 0),E=AW(),T=E?.value??[],R=E?void 0:s,_=(a||E?.disabled)??!1,[C,M]=Ll({controlled:E?S!==void 0&&T.indexOf(S)>-1:d,default:R,name:"Toggle",state:"pressed"}),{getButtonProps:A,buttonRef:N}=Gl({disabled:_,native:b}),P={disabled:_,pressed:C},z=[N,n],D=[{"aria-pressed":C,onClick(F){const L=!C,U=Et(Ii,F.nativeEvent);c?.(L,U),!U.isCanceled&&(S&&E?.setGroupValue?.(S,L,U),!U.isCanceled&&M(L))}},x,A],H=mn("button",t,{enabled:!E,state:P,ref:z,props:D}),W=v.useMemo(()=>({disabled:_,focusableWhenDisabled:!1}),[_]);return E?g.jsx(lF,{tag:"button",render:f,className:r,style:y,metadata:W,state:P,refs:z,props:D}):H});function p_(e,t,n,r){return typeof e=="string"?g.jsx(tn,{"aria-hidden":"true",name:e,rootStyle:r,size:n,variant:t}):g.jsx("span",{...dO(n),"aria-hidden":"true",children:e})}function IW({icon:e,pressedIcon:t,pressed:n,iconVariant:r,iconSize:s,iconStyle:a}){return g.jsxs("span",{className:"ui-rvj5dj ui-6s0dn4 ui-1o2pa38 ui-c8icb0 ui-47corl ui-1heor9g","aria-hidden":"true",children:[g.jsx("span",{className:"ui-1ms6mhf ui-gkxs2y ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1g0ag68 ui-g01cxk ui-6rycqq ui-fimr68 ui-1owdx9d ui-tea3wc ui-1qzdkne ui-nejef0 ui-4wkmsb ui-7pq1vu ui-6ekqhr","data-swap-active":!n||void 0,children:p_(e,r,s,a)}),g.jsx("span",{className:"ui-1ms6mhf ui-gkxs2y ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1g0ag68 ui-g01cxk ui-6rycqq ui-fimr68 ui-1owdx9d ui-tea3wc ui-1qzdkne ui-nejef0 ui-4wkmsb ui-7pq1vu ui-6ekqhr","data-swap-active":n||void 0,children:p_(t,r,s,a)})]})}function MW({icon:e,pressedIcon:t=e,iconVariant:n="outline",variant:r="ghost",border:s,rounded:a,frame:l="container",reveal:c="always",size:d,iconSize:f,tone:h,rootStyle:m,iconStyle:b,disabled:y,"aria-label":x,"aria-labelledby":S,...E}){const T=va(),{size:R,innerIconSize:_,disabled:C}=mO({disabled:y,enforced:T,iconSize:f,size:d}),M=pO(s),A=Ct(gO({chrome:M,tone:h,enforcedRootStyle:T?.iconButtonRootStyle,frame:l,reveal:c,size:R,variant:r})),N=Ct(m);return g.jsx(OW,{...E,className:bn("ui-icon-button",A.className,N.className),style:{...A.style,...N.style},...hO({chrome:M,tone:h,frame:l,reveal:c,rounded:a,size:R,variant:r}),"aria-label":x,"aria-labelledby":S,"data-component":"toggle-icon-button",disabled:C,render:(P,z)=>g.jsx("button",{...P,"data-pressed":void 0,children:g.jsx(IW,{icon:e,iconSize:_,iconStyle:[T?.iconButtonIconStyle,b],iconVariant:n,pressed:z.pressed,pressedIcon:t})})})}function DW({pressed:e,...t}){return g.jsx(MW,{...t,pressed:e,variant:e?"secondary":"ghost"})}const h_=e=>Number.isFinite(e)?e:0;function zW(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(h_(e*1e3)%1e3),nanoseconds:Math.trunc(h_(e*1e6)%1e3)}}function jW(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 LW(e){switch(typeof e){case"number":{if(Number.isFinite(e))return zW(e);break}case"bigint":return jW(e)}throw new TypeError("Expected a finite number or bigint")}const PW=e=>e===0||e===0n,$W=(e,t)=>t===1||t===1n?e:`${e}s`,BW=1e-7,FW=24n*60n*60n*1000n;function UW(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 b=Math.floor(h*10**m+BW);return(Math.round(b)/10**m).toFixed(m)},l=(h,m,b,y)=>{if(!((s.length===0||!t.colonNotation)&&PW(h)&&!(t.colonNotation&&b==="m"))){if(y??=String(h),t.colonNotation){const x=y.includes(".")?y.split(".")[0].length:y.length,S=s.length>0?2:1;y="0".repeat(Math.max(0,S-x))+y}else y+=t.verbose?" "+$W(m,h):b;s.push(y)}},c=LW(e),d=BigInt(c.days);if(t.hideYearAndDays?l(BigInt(d)*24n+BigInt(c.hours),"hour","h"):(t.hideYear?l(d,"day","d"):(l(d/365n,"year","y"),l(d%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),b=Number(c.microseconds),y=Number(c.nanoseconds);if(l(h,"second","s"),t.formatSubMilliseconds)l(m,"millisecond","ms"),l(b,"microsecond","µs"),l(y,"nanosecond","ns");else{const x=m+b/1e3+y/1e6,S=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,E=x>=1?Math.round(x):Math.ceil(x),T=S?x.toFixed(S):E;l(Number.parseFloat(T),"millisecond","ms",T)}}else{const h=(n?Number(e%FW):e)/1e3%60,m=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,b=a(h,m),y=t.keepDecimalsOnWholeSeconds?b:b.replace(/\.0+$/,"");l(Number.parseFloat(y),"second","s",y)}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 fM="en",Cx={},Sv={};function dM(){return fM}function pM(e){fM=e}function qW(e){return Cx[e]}function hM(e){if(!e)throw new Error("No locale data passed");Cx[e.locale]=e,Sv[e.locale.toLowerCase()]=e.locale}function m_(e){if(Cx[e])return e;if(Sv[e.toLowerCase()])return Sv[e.toLowerCase()]}function mM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.localeMatcher||"lookup";switch(n){case"lookup":return g_(e);case"best fit":return g_(e);default:throw new RangeError('Invalid "localeMatcher" option: '.concat(n))}}function g_(e){var t=m_(e);if(t)return t;for(var n=e.split("-");e.length>1;){n.pop(),e=n.join("-");var r=m_(e);if(r)return r}}var ee={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),d=s.slice(-1),f=s.slice(-2);return a&&l==1&&c!=11||d==1&&f!=11?"one":a&&l>=2&&l<=4&&(c<12||c>14)||d>=2&&d<=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),d=r.slice(-2),f=r.slice(-1);return a&&l==0||c>=11&&c<=19||s==2&&d>=11&&d<=19?"zero":l==1&&c!=11||s==2&&f==1&&d!=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),d=s.slice(-1),f=s.slice(-2);return a&&l==1&&c!=11||d==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"}};ee.as=ee.am;ee.az=ee.af;ee.bal=ee.af;ee.bg=ee.af;ee.bn=ee.am;ee.brx=ee.af;ee.ce=ee.af;ee.chr=ee.af;ee.csw=ee.ak;ee.cv=ee.blo;ee.de=ee.ast;ee.doi=ee.am;ee.ee=ee.af;ee.el=ee.af;ee.en=ee.ast;ee.eo=ee.af;ee.et=ee.ast;ee.eu=ee.af;ee.fa=ee.am;ee.fi=ee.ast;ee.fil=ee.ceb;ee.fo=ee.af;ee.fur=ee.af;ee.fy=ee.ast;ee.gl=ee.ast;ee.gu=ee.am;ee.ha=ee.af;ee.hi=ee.am;ee.hr=ee.bs;ee.hsb=ee.dsb;ee.hu=ee.af;ee.hy=ee.ff;ee.ia=ee.ast;ee.id=ee.dz;ee.ie=ee.ast;ee.ig=ee.dz;ee.ii=ee.dz;ee.it=ee.ca;ee.ja=ee.dz;ee.jgo=ee.af;ee.jv=ee.dz;ee.ka=ee.af;ee.kea=ee.dz;ee.kk=ee.af;ee.kl=ee.af;ee.km=ee.dz;ee.kn=ee.am;ee.ko=ee.dz;ee.kok=ee.am;ee.ks=ee.af;ee.ksh=ee.blo;ee.ku=ee.af;ee.ky=ee.af;ee.lb=ee.af;ee.lkt=ee.dz;ee.lld=ee.ca;ee.lo=ee.dz;ee.ml=ee.af;ee.mn=ee.af;ee.mr=ee.af;ee.ms=ee.dz;ee.my=ee.dz;ee.nb=ee.af;ee.ne=ee.af;ee.nl=ee.ast;ee.nn=ee.af;ee.no=ee.af;ee.nqo=ee.dz;ee.nso=ee.ak;ee.om=ee.af;ee.or=ee.af;ee.pa=ee.ak;ee.pcm=ee.am;ee.ps=ee.af;ee.rm=ee.af;ee.sah=ee.dz;ee.sc=ee.ast;ee.scn=ee.ca;ee.sd=ee.af;ee.sk=ee.cs;ee.so=ee.af;ee.sq=ee.af;ee.sr=ee.bs;ee.su=ee.dz;ee.sv=ee.ast;ee.sw=ee.ast;ee.syr=ee.af;ee.ta=ee.af;ee.te=ee.af;ee.th=ee.dz;ee.ti=ee.ak;ee.tk=ee.af;ee.tn=ee.af;ee.to=ee.dz;ee.tr=ee.af;ee.ug=ee.af;ee.uk=ee.ru;ee.ur=ee.ast;ee.uz=ee.af;ee.vec=ee.ca;ee.vi=ee.dz;ee.wae=ee.af;ee.wo=ee.dz;ee.xh=ee.af;ee.yi=ee.ast;ee.yo=ee.dz;ee.yue=ee.dz;ee.zh=ee.dz;ee.zu=ee.am;function b_(e){return e==="pt-PT"?e:GW(e)}var HW=/^([a-z0-9]+)/i;function GW(e){var t=e.match(HW);if(!t)throw new TypeError("Invalid locale: ".concat(e));return t[1]}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 VW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y_(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,KW(r.key),r)}}function WW(e,t,n){return t&&y_(e.prototype,t),n&&y_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function KW(e){var t=ZW(e,"string");return $c(t)=="symbol"?t:t+""}function ZW(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 String(e)}var wv=(function(){function e(t,n){VW(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.$=ee[b_(r[0])]}return WW(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 ee[b_(r)]})}}]),e})();function Ul(e){"@babel/helpers - typeof";return Ul=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},Ul(e)}function v_(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 k_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v_(Object(n),!0).forEach(function(r){YW(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function YW(e,t,n){return(t=gM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x_(e,t){return eK(e)||JW(e,t)||QW(e,t)||XW()}function XW(){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 QW(e,t){if(e){if(typeof e=="string")return S_(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)?S_(e,t):void 0}}function S_(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 JW(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],d=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(d=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(h){f=!0,s=h}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw s}}return c}}function eK(e){if(Array.isArray(e))return e}function tK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nK(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,gM(r.key),r)}}function rK(e,t,n){return t&&nK(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gM(e){var t=iK(e,"string");return Ul(t)=="symbol"?t:t+""}function iK(e,t){if(Ul(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ul(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var sK=["second","minute","hour","day","week","month","quarter","year"],oK=["auto","always"],aK=["long","short","narrow"],lK=["lookup","best fit"],Is=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};tK(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(oK.indexOf(r)<0)throw new RangeError('Invalid "numeric" option: '.concat(r));this.numeric=r}if(s!==void 0){if(aK.indexOf(s)<0)throw new RangeError('Invalid "style" option: '.concat(s));this.style=s}if(a!==void 0){if(lK.indexOf(a)<0)throw new RangeError('Invalid "localeMatcher" option: '.concat(a));this.localeMatcher=a}if(typeof t=="string"&&(t=[t]),t.push(dM()),this.locale=e.supportedLocalesOf(t,{localeMatcher:this.localeMatcher})[0],!this.locale)throw new Error("Unsupported locale");wv.supportedLocalesOf(this.locale).length>0?this.pluralRules=new wv(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=mM(this.locale,{localeMatcher:this.localeMatcher})}return rK(e,[{key:"format",value:function(){var n=w_(arguments),r=x_(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=w_(arguments),r=x_(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 d=[];return c>0&&d.push({type:"literal",value:l.slice(0,c)}),d=d.concat(this.formatNumberToParts(Math.abs(s)).map(function(f){return k_(k_({},f),{},{unit:a})})),c+3<l.length-1&&d.push({type:"literal",value:l.slice(c+3)}),d}},{key:"getRule",value:function(n,r){var s=qW(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[pK(n)?"past":"future"];if(typeof c=="string")return c;var d=this.pluralRules&&this.pluralRules.select(Math.abs(n))||"other";return c[d]||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})();Is.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 mM(n,t)})};Is.addLocale=hM;Is.addDefaultLocale=function(e){hM(e),pM(e.locale)};Is.setDefaultLocale=pM;Is.getDefaultLocale=dM;Is.PluralRules=wv;var xy='Invalid "unit" argument';function uK(e){if(Ul(e)==="symbol")throw new TypeError(xy);if(typeof e!="string")throw new RangeError("".concat(xy,": ").concat(e));if(e[e.length-1]==="s"&&(e=e.slice(0,e.length-1)),sK.indexOf(e)<0)throw new RangeError("".concat(xy,": ").concat(e));return e}var cK='Invalid "number" argument';function fK(e){if(e=Number(e),Number.isFinite&&!Number.isFinite(e))throw new RangeError("".concat(cK,": ").concat(e));return e}function dK(e){return 1/e===-1/0}function pK(e){return e<0||e===0&&dK(e)}function w_(e){if(e.length<2)throw new TypeError('"unit" argument is required');return[fK(e[0]),uK(e[1])]}function da(e){"@babel/helpers - typeof";return da=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},da(e)}function hK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mK(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,bK(r.key),r)}}function gK(e,t,n){return t&&mK(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bK(e){var t=yK(e,"string");return da(t)=="symbol"?t:t+""}function yK(e,t){if(da(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(da(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var E_=(function(){function e(){hK(this,e),this.cache={}}return gK(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 d=c[l];if(da(n)!=="object")return;n=n[d]}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,d=0,f=r;d<f.length;d++){var h=f[d];da(c[h])!=="object"&&(c[h]={}),c=c[h]}return c[l]=a}}]),e})();function Ev(e){"@babel/helpers - typeof";return Ev=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},Ev(e)}function vK(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=kK(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.
|
|
33
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kK(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 xK(e,t){for(var n=vK(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 SK(){var e=(typeof Intl>"u"?"undefined":Ev(Intl))==="object";return e&&typeof Intl.DateTimeFormat=="function"}function Tv(e){"@babel/helpers - typeof";return Tv=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},Tv(e)}function wK(e){return TK(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 EK={}.constructor;function TK(e){return Tv(e)!==void 0&&e!==null&&e.constructor===EK}var Cs=60,bh=60*Cs,sa=24*bh,_v=7*sa,Rv=30.44*sa,bM=146097/400*sa;function Nl(e){switch(e){case"second":return 1;case"minute":return Cs;case"hour":return bh;case"day":return sa;case"week":return _v;case"month":return Rv;case"year":return bM}}function yM(e){return e.factor!==void 0?e.factor:Nl(e.unit||e.formatAs)||1}function Bc(e){return e==="floor"?Math.floor:Math.round}function Nx(e){return e==="floor"?1:.5}function Cv(e){"@babel/helpers - typeof";return Cv=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},Cv(e)}function vM(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),Cv(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 __(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=__(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 __(e,t,n){var r=n.round,s=Nl(e),a=Nl(t==="now"?e:t);if(s!==void 0&&a!==void 0)return s-a*(1-Nx(r))}function Fc(e){"@babel/helpers - typeof";return Fc=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},Fc(e)}function R_(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 _K(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?R_(Object(n),!0).forEach(function(r){RK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RK(e,t,n){return(t=CK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CK(e){var t=NK(e,"string");return Fc(t)=="symbol"?t:t+""}function NK(e,t){if(Fc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function AK(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.units;e=IK(e,l);var c=OK(e,t,{now:r,future:s,round:a});{if(c){var d=e[e.indexOf(c)-1],f=e[e.indexOf(c)+1];return[d,c,f]}return[void 0,void 0,e[0]]}}function OK(e,t,n){var r=n.now,s=n.future,a=n.round;if(e.length!==0){var l=kM(e,t,{now:r,future:s||t<0,round:a});if(l!==-1){var c=e[l];if(c.granularity){var d=Bc(a)(Math.abs(t)/yM(c)/c.granularity)*c.granularity;if(d===0&&l>0)return e[l-1]}return c}}}function kM(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=vM(e[r],_K({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:kM(e,t,n,r+1)}function IK(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 MK(e,t,n){var r=n.now,s=n.round;if(Nl(e)){var a=Nl(e)*1e3,l=t>r,c=Math.abs(t-r),d=Bc(s)(c/a)*a;return l?d>0?c-d+zK(s,a):c-d+1:-(c-d)+DK(s,a)}}function DK(e,t){return Nx(e)*t}function zK(e,t){return(1-Nx(e))*t+1}var jK=365*24*60*60*1e3,xM=1e3*jK;function LK(e,t,n){var r=n.prevStep,s=n.nextStep,a=n.now,l=n.future,c=n.round,d=e.getTime?e.getTime():e,f=function(x){return MK(x,d,{now:a,round:c})},h=$K(l?t:s,d,{future:l,now:a,round:c,prevStep:l?r:t});if(h!==void 0){var m;if(t&&(t.getTimeToNextUpdate&&(m=t.getTimeToNextUpdate(d,{getTimeToNextUpdateForUnit:f,getRoundFunction:Bc,now:a,future:l,round:c})),m===void 0)){var b=t.unit||t.formatAs;b&&(m=f(b))}return m===void 0?h:Math.min(m,h)}}function PK(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep,c=vM(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?xM:t+c*1e3}function $K(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep;if(e){var c=PK(e,t,{now:r,future:s,round:a,prevStep:l});return c===void 0?void 0:c-r}else return s?t-r+1:xM}var SM={};function Sl(e){return SM[e]}function wM(e){if(!e)throw new Error("[javascript-time-ago] No locale data passed.");SM[e.locale]=e}const BK=[{formatAs:"now"},{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"}],Nv={steps:BK,labels:"long"};function Uc(e){"@babel/helpers - typeof";return Uc=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},Uc(e)}function C_(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 N_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?C_(Object(n),!0).forEach(function(r){FK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function FK(e,t,n){return(t=UK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UK(e){var t=qK(e,"string");return Uc(t)=="symbol"?t:t+""}function qK(e,t){if(Uc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const Av=N_(N_({},Nv),{},{steps:Nv.steps.filter(function(e){return e.formatAs!=="second"})}),EM=[{factor:1,unit:"now"},{threshold:1,threshold_for_now:45.5,factor:1,unit:"second"},{threshold:45.5,factor:Cs,unit:"minute"},{threshold:2.5*Cs,granularity:5,factor:Cs,unit:"minute"},{threshold:22.5*Cs,factor:.5*bh,unit:"half-hour"},{threshold:42.5*Cs,threshold_for_minute:52.5*Cs,factor:bh,unit:"hour"},{threshold:20.5/24*sa,factor:sa,unit:"day"},{threshold:5.5*sa,factor:_v,unit:"week"},{threshold:3.5*_v,factor:Rv,unit:"month"},{threshold:10.5*Rv,factor:bM,unit:"year"}],A_={gradation:EM,flavour:"long",units:["now","minute","hour","day","week","month","year"]},HK={gradation:EM,flavour:"long-time",units:["now","minute","hour","day","week","month","year"]};function TM(e){return e instanceof Date?e:new Date(e)}var Ov=[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"}],Hi={},GK={minTime:function(t,n){n.future;var r=n.getMinTimeForUnit;return r("day")},format:function(t,n){return Hi[n]||(Hi[n]={}),Hi[n].dayMonth||(Hi[n].dayMonth=new Intl.DateTimeFormat(n,{month:"short",day:"numeric"})),Hi[n].dayMonth.format(TM(t))}},VK={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 Hi[n]||(Hi[n]={}),Hi[n].dayMonthYear||(Hi[n].dayMonthYear=new Intl.DateTimeFormat(n,{year:"numeric",month:"short",day:"numeric"})),Hi[n].dayMonthYear.format(TM(t))}};SK()?Ov.push(GK,VK):Ov.push({formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"});const pa={steps:Ov,labels:["mini","short-time","narrow","short"]};function qc(e){"@babel/helpers - typeof";return qc=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},qc(e)}function O_(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 I_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?O_(Object(n),!0).forEach(function(r){WK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WK(e,t,n){return(t=KK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KK(e){var t=ZK(e,"string");return qc(t)=="symbol"?t:t+""}function ZK(e,t){if(qc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const YK=I_(I_({},pa),{},{steps:[{formatAs:"now"}].concat(pa.steps)});function Hc(e){"@babel/helpers - typeof";return Hc=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},Hc(e)}function M_(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 D_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M_(Object(n),!0).forEach(function(r){XK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XK(e,t,n){return(t=QK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QK(e){var t=JK(e,"string");return Hc(t)=="symbol"?t:t+""}function JK(e,t){if(Hc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const Iv=D_(D_({},pa),{},{steps:pa.steps.filter(function(e){return e.formatAs!=="second"})});function Gc(e){"@babel/helpers - typeof";return Gc=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},Gc(e)}function z_(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 j_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z_(Object(n),!0).forEach(function(r){eZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eZ(e,t,n){return(t=tZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tZ(e){var t=nZ(e,"string");return Gc(t)=="symbol"?t:t+""}function nZ(e,t){if(Gc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const rZ=j_(j_({},Iv),{},{steps:[{formatAs:"now"}].concat(Iv.steps)});function Vc(e){"@babel/helpers - typeof";return Vc=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},Vc(e)}function L_(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 fp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?L_(Object(n),!0).forEach(function(r){iZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iZ(e,t,n){return(t=sZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sZ(e){var t=oZ(e,"string");return Vc(t)=="symbol"?t:t+""}function oZ(e,t){if(Vc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const aZ=fp(fp({},pa),{},{steps:pa.steps.filter(function(e){return e.formatAs!=="second"}).map(function(e){return e.formatAs==="minute"?fp(fp({},e),{},{minTime:Cs}):e})}),Wc={steps:[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"month"},{formatAs:"year"}],labels:["mini","short-time","narrow","short"]};function Kc(e){"@babel/helpers - typeof";return Kc=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},Kc(e)}function P_(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 $_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?P_(Object(n),!0).forEach(function(r){lZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lZ(e,t,n){return(t=uZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uZ(e){var t=cZ(e,"string");return Kc(t)=="symbol"?t:t+""}function cZ(e,t){if(Kc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const fZ=$_($_({},Wc),{},{steps:[{formatAs:"now"}].concat(Wc.steps)});function Zc(e){"@babel/helpers - typeof";return Zc=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},Zc(e)}function B_(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 F_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B_(Object(n),!0).forEach(function(r){dZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dZ(e,t,n){return(t=pZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pZ(e){var t=hZ(e,"string");return Zc(t)=="symbol"?t:t+""}function hZ(e,t){if(Zc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const Mv=F_(F_({},Wc),{},{steps:Wc.steps.filter(function(e){return e.formatAs!=="second"})});function Yc(e){"@babel/helpers - typeof";return Yc=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},Yc(e)}function U_(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 q_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U_(Object(n),!0).forEach(function(r){mZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mZ(e,t,n){return(t=gZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gZ(e){var t=bZ(e,"string");return Yc(t)=="symbol"?t:t+""}function bZ(e,t){if(Yc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const yZ=q_(q_({},Mv),{},{steps:[{formatAs:"now"}].concat(Mv.steps)});function vZ(e){switch(e){case"default":case"round":return Nv;case"round-minute":return Av;case"approximate":return A_;case"time":case"approximate-time":return HK;case"mini":return Wc;case"mini-now":return fZ;case"mini-minute":return Mv;case"mini-minute-now":return yZ;case"twitter":return pa;case"twitter-now":return YK;case"twitter-minute":return Iv;case"twitter-minute-now":return rZ;case"twitter-first-minute":return aZ;default:return A_}}function ha(e){"@babel/helpers - typeof";return ha=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},ha(e)}function kZ(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=_M(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.
|
|
34
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xZ(e,t){return EZ(e)||wZ(e,t)||_M(e,t)||SZ()}function SZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
35
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _M(e,t){if(e){if(typeof e=="string")return H_(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)?H_(e,t):void 0}}function H_(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 wZ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],d=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(d=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(h){f=!0,s=h}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw s}}return c}}function EZ(e){if(Array.isArray(e))return e}function TZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _Z(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,CZ(r.key),r)}}function RZ(e,t,n){return t&&_Z(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function CZ(e){var t=NZ(e,"string");return ha(t)=="symbol"?t:t+""}function NZ(e,t){if(ha(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ha(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ur=(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;TZ(this,e),typeof t=="string"&&(t=[t]),this.locale=xK(t.concat(e.getDefaultLocale()),Sl),typeof Intl<"u"&&Intl.NumberFormat&&(this.numberFormat=new Intl.NumberFormat(this.locale)),r===!1?(this.IntlRelativeTimeFormat=Intl.RelativeTimeFormat,this.IntlPluralRules=Intl.PluralRules):(this.IntlRelativeTimeFormat=Is,this.IntlPluralRules=Is.PluralRules),this.relativeTimeFormatCache=new E_,this.pluralRulesCache=new E_}return RZ(e,[{key:"format",value:function(n,r,s){var a=this;s||(r&&!DZ(r)?(s=r,r=void 0):s={}),r||(r=Av),typeof r=="string"&&(r=vZ(r));var l=AZ(n),c=this.getLabels(r.flavour||r.labels),d=c.labels,f=c.labelsType,h=s.round||r.round,m,b=Date.now();r.now!==void 0&&(m=r.now),m===void 0&&s.now!==void 0&&(m=s.now),m===void 0&&(m=b);var y=function(A){var N=A.now,P=(N-l)/1e3,z=s.future||P<0,D=MZ(d,Sl(a.locale).now,Sl(a.locale).long,z);if(r.custom){var H=r.custom({now:N,date:new Date(l),time:l,elapsed:P,locale:a.locale});if(H!==void 0)return{getText:function(){return H},getTextRefreshDelay:function(){throw new Error('`getTimeToNextUpdate: true` feature is not supported by legacy "styles" that have a `custom` function')}}}var W=IZ(r.units,d,D),F=AK(r.gradation||r.steps||Av.steps,P,{now:N,units:W,round:h,future:z}),L=xZ(F,3),U=L[0],q=L[1],Z=L[2],B=function(){return a.formatDateForStep(l,q,P,{labels:d,labelsType:f,nowLabel:D,now:N,future:z,round:h})||""},K=function(){var $=LK(l,q,{nextStep:Z,prevStep:U,now:N,future:z,round:h});if(typeof $=="number")return s.getTimeToNextUpdateUncapped?$:CM($)};return{getText:B,getTextRefreshDelay:K}},x=y({now:m}),S=x.getText,E=x.getTextRefreshDelay;if(s.getTimeToNextUpdate)return[S(),E()];if(s.refresh){var T=6e4,R,_=function M(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:T;R=zZ(function(){var N=y({now:m+(Date.now()-b)}),P=N.getText,z=N.getTextRefreshDelay;s.refresh(P()),M(z())},A)};_(E());var C=function(){clearTimeout(R)};return[S(),C]}return S()}},{key:"formatDateForStep",value:function(n,r,s,a){var l=this,c=a.labels,d=a.labelsType,f=a.nowLabel,h=a.now,m=a.future,b=a.round;if(r){if(r.format)return r.format(n,this.locale,{formatAs:function(T,R){return l.formatValue(R,T,{labels:c,future:m})},now:h,future:m});var y=r.unit||r.formatAs;if(!y)throw new Error("[javascript-time-ago] Each step must define either `formatAs` or `format()`. Step: ".concat(JSON.stringify(r)));if(y==="now")return f;var x=Math.abs(s)/yM(r);r.granularity&&(x=Bc(b)(x/r.granularity)*r.granularity);var S=-1*Math.sign(s)*Bc(b)(x);switch(S===0&&(m?S=0:S=-0),d){case"long":case"short":case"narrow":return this.getFormatter(d).format(S,y);default:return this.formatValue(S,y,{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",d=n[c]||n;if(typeof d=="string")return d;var f=this.getPluralRules().select(Math.abs(s));return d[f]||d.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=Sl(this.locale),s=kZ(n),a;!(a=s()).done;){var l=a.value;if(r[l])return{labelsType:l,labels:r[l]}}}}]),e})(),RM="en";Ur.getDefaultLocale=function(){return RM};Ur.setDefaultLocale=function(e){Dv=!0,RM=e};Ur.addDefaultLocale=function(e){Dv&&Ur.getDefaultLocale()!==e.locale&&console.warn(`[javascript-time-ago] You're adding "`.concat(e.locale,'" as the default locale but you have already added "').concat(Ur.getDefaultLocale(),'" as the default locale. "').concat(e.locale,'" is the default locale now.')),Dv=!0,Ur.addLocale(e),Ur.setDefaultLocale(e.locale)};var Dv=!1;Ur.addLocale=function(e){wM(e),Is.addLocale(e)};Ur.locale=Ur.addLocale;Ur.addLabels=function(e,t,n){var r=Sl(e);r||(wM({locale:e}),r=Sl(e)),r[t]=n};function AZ(e){if(e.constructor===Date||OZ(e))return e.getTime();if(typeof e=="number")return e;throw new Error("Unsupported relative time formatter input: ".concat(ha(e),", ").concat(e))}function OZ(e){return ha(e)==="object"&&typeof e.getTime=="function"}function IZ(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 MZ(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 DZ(e){return typeof e=="string"||wK(e)}function zZ(e,t){return setTimeout(e,CM(t))}function CM(e){return Math.min(e,jZ)}var jZ=2147483647;const NM={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"}}};Ur.addLocale(NM);Ur.addDefaultLocale(NM);const LZ=new Ur("en-US");function Qn(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 Ni(e,t){const n=String(e??"").replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t-1)}…`:n}function PZ(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 Al(e){if(!e)return null;const t=Date.parse(e);return Number.isNaN(t)?null:t}function Ei(e){return e==null||!Number.isFinite(e)?"—":UW(e)}function Ax(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 $Z=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3,hour12:!1});function G_(e){return e==null||!Number.isFinite(e)?"—":$Z.format(e)}function yh(e,t=Date.now()){const n=Al(e);return n===null?null:LZ.format(Math.min(n,t),"mini",{now:t})}function ma(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 BZ=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1});function vh(e){return e==null||!Number.isFinite(e)?"0":BZ.format(e)}function bm(e){return e==null||!Number.isFinite(e)?"—":e===0?"$0.00":e>=.1?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}function zv(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 Ox(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:(/^origin(-[a-z0-9]+)?\.cursor\.com$/i.test(t.hostname)||t.hostname==="localhost")&&n.length>=4&&n[2]==="github"}catch{return!1}}function FZ(e){return typeof e=="string"?e:e&&typeof e=="object"&&typeof e.id=="string"?e.id:e?JSON.stringify(e):""}const V_=e=>{let t;const n=new Set,r=(f,h)=>{const m=typeof f=="function"?f(t):f;if(!Object.is(m,t)){const b=t;t=h??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(y=>y(t,b))}},s=()=>t,c={setState:r,getState:s,getInitialState:()=>d,subscribe:f=>(n.add(f),()=>n.delete(f))},d=t=e(r,s,c);return c},UZ=(e=>e?V_(e):V_),qZ=e=>e;function HZ(e,t=qZ){const n=fc.useSyncExternalStore(e.subscribe,fc.useCallback(()=>t(e.getState()),[e,t]),fc.useCallback(()=>t(e.getInitialState()),[e,t]));return fc.useDebugValue(n),n}const GZ=/^\/internal\/agent-serve\/agents\/(asd_[0-9a-f]{32})\/engine(?:\/|$)/,VZ=/^asd-([0-9a-f]{32})\.agents\.cursorusercontent\.com$/;function WZ(e=window.location.pathname,t=window.location.hostname){const n=VZ.exec(t.toLowerCase());if(n!==null)return{publicId:`asd_${n[1]}`,mountPath:""};const r=GZ.exec(e);if(r===null)return null;const s=r[1];return{publicId:s,mountPath:`/internal/agent-serve/agents/${s}/engine`}}function KZ(e=window.location.search){return new URLSearchParams(e).get("embed")==="1"}function AM(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 ZZ(e,t=window){const n=()=>{const r=AM(t.location,t.history);r!==""&&e(r)};return t.addEventListener("hashchange",n),()=>t.removeEventListener("hashchange",n)}class YZ{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")}artifacts(t={}){const n=new URLSearchParams;t.sessionId!==void 0&&t.sessionId!==""&&n.set("sessionId",t.sessionId),t.limit!==void 0&&n.set("limit",String(t.limit));const r=n.toString();return this.request(`/v1/artifacts${r===""?"":`?${r}`}`)}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[d,f]of Object.entries(r.query))f!==""&&l.set(d,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`)}sessionCost(t){return this.request(`/v1/session/${encodeURIComponent(t)}/cost`)}}function OM(e){const t=typeof e=="string"?e:e!==null&&typeof e=="object"&&typeof e.url=="string"?e.url:null;if(t===null)return null;let n;try{n=new URL(t)}catch{return null}return n.protocol==="http:"||n.protocol==="https:"?t:null}function IM(e){return{kind:typeof e.kind=="string"&&e.kind!==""?e.kind:"artifact",title:typeof e.title=="string"&&e.title.trim()!==""?e.title:void 0,url:OM(e.data)??void 0}}function XZ(e){const t=e.title?.trim();return t!==void 0&&t!==""?t:`${e.kind} · ${e.id}`}function QZ(e){const t=new Set;for(const n of e)t.add(n.kind);return[...t].sort((n,r)=>n.localeCompare(r))}function W_(e){const t=Date.parse(e.updatedAt);return Number.isNaN(t)?0:t}function MM(e){return[...e].sort((t,n)=>W_(n)-W_(t))}function JZ(e,t){return t===null?e:e.filter(n=>n.kind===t)}function eY(e){const t=new Map,n=[];for(const s of MM(e)){const a=s.sessionId;if(a===void 0||a===""){n.push(s);continue}const l=t.get(a);l===void 0?t.set(a,[s]):l.push(s)}const r=[...t.entries()].map(([s,a])=>({sessionId:s,artifacts:a}));return n.length>0&&r.push({sessionId:null,artifacts:n}),r}const tY=["home","runs","evals","logs"],jv="section",nY="home",rY={agent:"home"};function iY(e){const t=e?.trim()??"";return t===""?null:tY.includes(t)?t:rY[t]??null}function sY(e){let t=null,n=null,r=null;try{const s=new URL(e,"https://playground.invalid"),a=s.searchParams.get("sessionId")?.trim()??"";t=a.length>0?a:null;const l=s.searchParams.get("view")?.trim()??"";n=l.length>0?l:null,r=iY(s.searchParams.get(jv))}catch{return{sessionId:null,view:null,section:null}}return n==="logs"&&r===null&&(r="logs"),{sessionId:t,view:n,section:r}}function DM(e){try{const t=new URL(window.location.href);e===nY?t.searchParams.delete(jv):t.searchParams.set(jv,e);const n=t.toString();if(n===window.location.href)return;history.replaceState(null,"",n)}catch{}}const oY="cursor-playground",aY=["https://cursor.com","https://www.cursor.com","https://prod.cursor.com","https://staging.cursor.com","http://localhost:4000","https://localhost:4000"];function lY(e=document.referrer,t=window.parent!==window){if(!t||e==="")return null;let n;try{n=new URL(e).origin}catch{return null}return aY.includes(n)?n:null}function uY(e,t,n=lY(),r){if(n===null)return;const s={source:oY,type:"state",view:e};t!==void 0&&(s.sessionId=t),r!==void 0&&(s.section=r),window.parent.postMessage(s,n)}function zM(e){return e!=="http"}const cY=new Set(["chat","trace","raw","artifacts"]);function fY(e){if(!e.seeded||!e.embedded)return{action:"none"};const n=e.sessions.filter(s=>!e.knownIds.has(s.sessionId)&&zM(s.channelId)&&s.running===!0)[0];return n===void 0?{action:"none"}:e.currentSessionId===null&&cY.has(e.view)?{action:"select",sessionId:n.sessionId}:{action:"reveal",sessionId:n.sessionId}}function dY(e){return e.filter(t=>zM(t.channelId)&&t.running===!0).length}const pY=new Set(["github","slack"]);function hY(e){return/^\s*\//.test(e)}function ym(e){const t=[];for(const n of e??[])if(n.id!=="http"&&!(n.kind!==void 0&&pY.has(n.kind)))for(const r of n.routes??[]){const s=vY(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:kh(n.method)-kh(r.method)}),t}function jM(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 mY(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 gY(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=Ix(s[0]),d=LM(c);t.push(d?`- \`${r}\` (${a}) — ${l}${l?" ":""}${d}`:`- \`${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(`
|
|
36
|
+
`)}function bY(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=jM(t);return{ok:!1,error:m.length===0?`Unknown command \`${s}\`. No channel commands on this agent.`:`Unknown command \`${s}\`. Try ${m.map(b=>`\`${b}\``).join(", ")} or \`/help\`.`,commandName:s}}const c=yY(l,a),d=Ix(c),f=SY(a,d);if(!f.ok)return{ok:!1,error:f.error,commandName:s};const h=kY(d,f.value);return h.length>0?{ok:!1,error:`Missing required field${h.length>1?"s":""}: ${h.join(", ")}. ${LM(d)||""}`.trim(),commandName:s}:c.method==="GET"||c.method==="HEAD"?{ok:!0,command:c,query:TY(f.value)}:{ok:!0,command:c,body:f.value,query:c.querySchema!==void 0?_Y(f.value,c.querySchema):void 0}}function yY(e,t){if(e.length===1)return e[0];const n=[...e].sort((a,l)=>kh(a.method)-kh(l.method)),r=PM(t);if(r!==null){let a=null,l=-1;for(const c of n){const d=Ix(c),f=xY(d,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 vY(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 kh(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 Ix(e){return e.method==="GET"||e.method==="HEAD"?e.querySchema:e.bodySchema??e.querySchema}function LM(e){if(e===void 0)return"";const t=vm(e);if(t===void 0)return"";const n=km(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 vm(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 km(e){return e===void 0||!Array.isArray(e.required)?new Set:new Set(e.required.filter(t=>typeof t=="string"))}function kY(e,t){const n=km(e),r=[];for(const s of n){const a=t[s];(a==null||typeof a=="string"&&a.trim()==="")&&r.push(s)}return r}function xY(e,t){const n=vm(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 km(e))s in t&&(r+=3);return r}function PM(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 SY(e,t){if(e==="")return{ok:!0,value:{}};const n=PM(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=vm(t),s={},a=[];for(const l of wY(e)){const c=l.indexOf("=");if(c>0){const d=l.slice(0,c),f=l.slice(c+1);s[d]=EY(f,r?.[d])}else a.push(l)}if(a.length>0){const l=[...km(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}),d=c.find(f=>s[f]===void 0)??c[0];if(d===void 0)return{ok:!1,error:`Unexpected positional args: ${a.join(" ")}`};a.length===1?s[d]=a[0]:s[d]=a.join(" ")}return{ok:!0,value:s}}function wY(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 EY(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 TY(e){const t={};for(const[n,r]of Object.entries(e))r!=null&&(t[n]=typeof r=="string"?r:String(r));return t}function _Y(e,t){const n=vm(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 RY=new Set(["action.result","actions.requested","action.approval_requested","action.approval_resolved"]),CY=new Set(["actions.requested","action.result","action.approval_requested","action.approval_resolved","subagent.called","subagent.completed","artifact.tagged"]),NY=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","artifact.tagged","turn.completed","turn.failed","agent.bound","session.failed"]);function $M(){const e=window.location.pathname,t=e.replace(/\/playground\/?$/,"");return t===e?"":t}function AY(){const e=WZ()!==null,t=e?AM():"";return{meta:{name:"agent",dev:!1,basePath:$M()},info:null,health:"unknown",sessions:[],current:null,localTrace:!1,view:"overview",running:!1,turnStartedAt:null,queued:[],composerDraft:null,authToken:"",aliasToken:t,aliasHosted:e,embedded:e&&KZ(),transcript:[],traceEvents:[],sessionCostUsd:null,barTitle:"No session",barId:"",externalUrl:null,drawerOpen:!1,overviewSection:"home",overviewRunId:null,surfaceFocusNonce:0,chatPanelOpen:!0,toast:null,evalCases:[],evalConfig:null,evalRun:null,evalRuns:[],evalNavReturn:!1}}const na=UZ(()=>AY());class OY{constructor(){this.api=new YZ($M(),()=>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=na.subscribe,this.getState=()=>na.getState()}get historyOnly(){return this.state.meta.readonly===!0}get state(){return na.getState()}set(t){na.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})}setOverviewSection(t,n=null){this.set({overviewSection:t,overviewRunId:n}),this.setView("overview")}focusAgentSurface(){this.setOverviewSection("home"),this.set({drawerOpen:!1,surfaceFocusNonce:this.state.surfaceFocusNonce+1})}setChatPanelOpen(t){this.set({chatPanelOpen: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(d=>d.kind==="tool"&&d.callId===n);if(c>=0){const d=l[c];if(d?.kind!=="tool")return l;const f=l.slice();return f[c]={...d,name:r||d.name,args:s??d.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 d=c.findIndex(b=>b.kind==="tool"&&b.callId===n),f=s==null?"(no output)":Qn(s,4e3);if(d<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[d];if(h?.kind!=="tool")return c;const m=c.slice();return m[d]={...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(d=>d.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)":Qn(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&&!CY.has(t.type)&&t.type!=="message.received"&&t.type!=="agent.bound")return;const n=t.data||{},r=Al(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=Al(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"artifact.tagged":{const s=IM(n);this.push({kind:"artifact",id:this.nextId("artifact"),artifactKind:s.kind,title:s.title,url:s.url});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&&Al(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,costUsd:typeof n.cost?.totalUsd=="number"?n.cost.totalUsd:void 0});const a=this.state.current?.sessionId;a&&this.refreshSessionCost(a),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){if(t==="logs"){this.set({view:"overview",overviewSection:"logs",evalNavReturn:!1});try{const s=new URL(window.location.href);s.searchParams.delete("view"),history.replaceState(null,"",s.toString())}catch{}DM("logs");return}const n=t==="overview"||t==="chat"||t==="trace"||t==="raw"||t==="evals"||t==="abs"||t==="artifacts"?t:"overview",r=(this.state.view==="evals"||this.state.view==="abs")&&(n==="chat"||n==="trace"||n==="raw"||n==="artifacts");this.set({view:n,...n==="evals"||n==="overview"?{evalNavReturn:!1}:r?{evalNavReturn:!0}:{}}),r&&this.state.current===null&&this.attachEvalCaseSessionForView(n);try{const s=new URL(window.location.href);n==="overview"?s.searchParams.delete("view"):s.searchParams.set("view",n),history.replaceState(null,"",s.toString())}catch{}n==="evals"&&(this.refreshEvalRuns(),this.restoreEvalRun())}backToEvals(){this.set({evalNavReturn:!1}),this.setView("evals")}backToOverview(){this.set({evalNavReturn:!1}),this.setView("overview")}newChat(){this.historyOnly||(this.deselectSession(),this.setView("chat"))}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=fY({knownIds:this.knownSessionIds,sessions:n,currentSessionId:this.state.current?.sessionId??null,embedded:this.state.embedded,view:this.state.view,seeded:this.sessionsSeeded});this.knownSessionIds=new Set(n.map(l=>l.sessionId)),this.sessionsSeeded=!0;const s={sessions:n};let a=!1;if(this.state.current){const l=n.find(c=>c.sessionId===this.state.current?.sessionId);l?.continuationToken&&(s.current={...this.state.current,continuationToken:l.continuationToken}),l?.running===!0&&!this.state.running&&this.streamAbort===null&&!this.historyOnly&&(s.running=!0,a=!0)}if(this.set(s),a&&this.state.current!==null&&this.startStream(this.state.current.sessionId,this.lastIndex+1),r.action==="select"){const l=n.find(c=>c.sessionId===r.sessionId);l!==void 0&&this.selectSession(l);return}r.action==="reveal"&&this.revealEmbeddedTriggeredRun(r.sessionId,n)}revealEmbeddedTriggeredRun(t,n){if(this.state.view==="overview"){this.set({overviewSection:"runs"});return}const r=n.find(l=>l.sessionId===t),s=r?.channelId??"triggered",a=r?.title?.trim();this.toast(a===void 0||a===""?`New ${s} run started`:`New ${s} run: ${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){if(this.historyOnly)return;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 d=await a.read();if(d.done){this.scheduleReconnect(t,r);return}c+=l.decode(d.value,{stream:!0});const f=c.split(`
|
|
37
|
+
`);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),RY.has(m.type)&&await new Promise(b=>requestAnimationFrame(()=>b(null))))}}}).catch(()=>{r.signal.aborted||this.scheduleReconnect(t,r)})}scheduleReconnect(t,n){n.signal.aborted||this.historyOnly||this.isCurrent(t)&&setTimeout(()=>{!this.isCurrent(t)||this.streamAbort!==n||this.startStream(t,this.lastIndex+1)},1e3)}async refreshSessionCost(t){try{const n=await this.api.sessionCost(t);if(!n.ok||n.body===null||this.state.current?.sessionId!==t)return;this.set({sessionCostUsd:n.body.source==="unavailable"?null:n.body.costUsd})}catch{}}selectSession(t){this.stopStream(),this.resetTranscript(),this.lastIndex=-1,this.state.traceEvents=[];const n=this.state.view==="evals"||this.state.view==="abs";if(this.set({localTrace:!1,current:{sessionId:t.sessionId,channelId:t.channelId,mode:t.mode,continuationToken:t.continuationToken,externalUrl:t.externalUrl||null,prUrl:t.prUrl||null},running:!!t.running,turnStartedAt:null,queued:[],composerDraft:null,barTitle:t.title||"Session",barId:t.sessionId,externalUrl:t.externalUrl||null,transcript:[],traceEvents:[],sessionCostUsd:null,chatPanelOpen:!0,evalNavReturn:!1}),this.syncSessionUrl(t.sessionId),(n||this.state.view==="overview")&&(this.setView("chat"),this.set({evalNavReturn:!1})),this.refreshSessions(),this.refreshSessionCost(t.sessionId),this.historyOnly){this.loadEventsSnapshot(t.sessionId);return}t.running?this.startStream(t.sessionId,0):this.loadEventsSnapshot(t.sessionId)}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.historyOnly?this.toast(`Could not load trace (${n.status})`):(this.toast(`Could not load trace (${n.status}) — falling back to stream`),this.startStream(t,0));return}const r=await n.text();this.ingestEventsCompact(zv(r))}catch(n){this.toast(`Trace load failed: ${IY(n)}`),this.historyOnly||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),NY.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:[],sessionCostUsd:null,barTitle:"No session",barId:"",externalUrl:null,chatPanelOpen:!0,evalNavReturn:!1}),this.syncSessionUrl(null),this.state.embedded||this.setView("overview"),this.refreshSessions()}loadLocalTrace(t,n){this.stopStream(),this.resetTranscript(),this.lastIndex=-1;const r=zv(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,chatPanelOpen:!0}),this.setView("trace"),this.syncSessionUrl(null),this.ingestEventsCompact(r),this.toast(`Loaded ${r.length} events — Trace timeline ready`)}slashCommands(){return ym(this.state.info?.channels)}hasReviewChannel(){return(this.state.info?.channels||[]).some(t=>t.id==="review")}shouldUseReview(t){return this.state.current===null&&this.hasReviewChannel()&&Ox(t)}async sendMessage(t,n={}){const r=t.trim();if(!r||this.state.localTrace||this.historyOnly)return!1;const s=this.state.current;if(hY(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: ${Qn(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: ${Qn(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})}setComposerDraft(t){this.set({composerDraft:t})}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||this.historyOnly||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.historyOnly||!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: ${Qn(n.body,160)}`);return}this.refreshSessions()}async submitApproval(t,n){const r=this.state.current?.sessionId;if(!r||this.historyOnly)return;const s=await this.api.resolveApproval(r,t,n);s.ok||this.toast(`Approval failed: ${Qn(s.body,160)}`)}async dispatchSchedule(t){if(this.historyOnly)return;const n=await this.api.dispatchSchedule(t);if(!n.ok||!n.body){this.toast(`Dispatch failed: ${Qn(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}): ${Qn(t.body,120)}`);return}this.set({evalCases:t.body.evals??[],evalConfig:t.body.config??null})}async refreshEvalRuns(){const t=await this.api.evalsListRuns();if(!t.ok||t.body===null)return;const n=Array.isArray(t.body.runs)?t.body.runs:null;n!==null&&this.set({evalRuns:n})}async selectEvalRun(t){const n=t.trim();if(n==="")return;this.set({chatPanelOpen:!0});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 openEvalRunInOverview(t){const n=t.trim();n!==""&&(this.setOverviewSection("runs",n),await this.selectEvalRun(n))}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=zY();if(n!==null){const f=await this.api.evalsRunStatus(n);if(t!==this.evalRestoreGeneration)return;if(f.ok&&f.body){this.applyRestoredEvalRun(f.body),this.refreshEvalRuns();return}}const r=await this.api.evalsListRuns();if(t!==this.evalRestoreGeneration)return;const s=r.ok?r.body:null,a=Array.isArray(s?.runs)?s.runs:null;if(a!==null&&this.set({evalRuns:a}),s?.activeRunId!==void 0&&a!==null){const f=s.activeRunId,h=a.find(m=>m.runId===f)??await this.fetchEvalRunIfCurrent(t,f);if(t!==this.evalRestoreGeneration)return;if(h!==void 0){this.state.evalRun?.runId===h.runId?(this.set({evalRun:h}),h.status==="running"&&this.evalPollTimer===null&&this.startEvalRunPoll(h.runId)):this.applyRestoredEvalRun(h);return}}const l=this.state.evalRun;if(l!==null){l.status==="running"&&this.evalPollTimer===null&&this.startEvalRunPoll(l.runId);return}const c=DY(this.state.meta.basePath);if(c!==null){const f=await this.api.evalsRunStatus(c);if(t!==this.evalRestoreGeneration||this.state.evalRun!==null)return;if(f.ok&&f.body){this.applyRestoredEvalRun(f.body);return}}if(a===null)return;const d=a[0];d!==void 0&&this.state.evalRun===null&&this.applyRestoredEvalRun(d)}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),dp(this.state.meta.basePath,t.runId),jY(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.historyOnly)return;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: ${Qn(n.body,160)}`);return}this.set({evalRun:n.body}),dp(this.state.meta.basePath,n.body.runId),(this.state.view==="overview"||this.state.view==="chat")&&(this.set({overviewSection:"runs",overviewRunId:n.body.runId,chatPanelOpen:!0}),this.mergeEvalRunIntoList(n.body)),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: ${Qn(r.body,160)}`);return}this.set({evalRun:r.body}),dp(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}),dp(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:d,total:f}=l.body.summary;this.toast(l.body.status==="failed"?`Eval run failed: ${l.body.error??"unknown error"}`:`Evals done — ${c} passed, ${d} failed, ${f} total`)}}finally{r=!1}}};a(),this.evalPollTimer=setInterval(()=>{a()},1500)}async attachEvalCaseSessionForView(t){const r=(this.state.evalRun??this.state.evalRuns[0]??null)?.cases.find(a=>a.sessionId!==void 0)?.sessionId;if(r===void 0||(await this.refreshSessions(),this.state.current!==null||this.state.view!==t))return;const s=this.state.sessions.find(a=>a.sessionId===r);s!==void 0?this.selectSession({...s,running:s.running===!0}):this.selectSession({sessionId:r,channelId:"http",mode:"conversation",title:"Eval session",turnCount:0,running:!1}),this.set({evalNavReturn:!0}),this.setView(t)}async openEvalCaseSession(t){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.set({evalNavReturn:!0}),this.setView("chat")}async openEvalCaseTrace(t){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.set({evalNavReturn:!0}),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,d=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:d,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:gY(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=bY(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"+MY(l.body)+"\n```",streaming:!1}),this.assistantId=null,this.commitTranscript(),!0):(this.setRunning(!1),this.update(a,{text:`Command failed (${l.status}): ${Qn(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,version:t.body.version,readonly:t.body.readonly===!0}}),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 (⋯ menu) 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;if(this.pendingSessionDeepLink=null,r!==null){await this.refreshSessions(),this.selectDeepLinkedSession(r);try{new URL(window.location.href).searchParams.get("view")==="overview"&&this.setView("overview")}catch{}}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,r=null;try{const a=sY(window.location.href);t=a.sessionId,n=a.view,r=a.section}catch{}const s=await this.loadEngineMeta();s?this.refreshEngineStatus():(this.pendingSessionDeepLink=t,this.set({health:"bad"}),this.pollEngineMetaUntilReady()),n?this.setView(n):this.setView("overview"),r!==null&&this.set({overviewSection:r}),await this.refreshSessions(),this.refreshEvalCases(),this.refreshEvalRuns(),this.restoreEvalRun(),t&&s&&(this.selectDeepLinkedSession(t),n==="overview"&&this.setView("overview")),this.historyOnly||setInterval(()=>{this.refreshSessions()},this.state.meta.dev?2e3:5e3)}modelLabel(){return FZ(this.state.info?.model)}}function IY(e){return e instanceof Error?e.message:String(e)}function MY(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function BM(e){return`agent-serve:evalRunId:${e||"/"}`}function DY(e){try{const t=sessionStorage.getItem(BM(e));return t!==null&&t!==""?t:null}catch{return null}}function zY(){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 jY(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 dp(e,t){try{sessionStorage.setItem(BM(e),t)}catch{}}const nt=new OY;nt.getState().aliasHosted&&ZZ(e=>nt.acceptAliasTokenHandoff(e));let K_=nt.getState().overviewSection;na.subscribe(e=>{e.overviewSection!==K_&&(K_=e.overviewSection,DM(e.overviewSection))});if(nt.getState().embedded){let e=nt.getState().view,t=nt.getState().current?.sessionId??null,n=nt.getState().overviewSection,r=t!==null;na.subscribe(s=>{const a=s.current?.sessionId??null;a!==null&&(r=!0),!(s.view===e&&a===t&&s.overviewSection===n)&&(e=s.view,t=a,n=s.overviewSection,uY(s.view,r?a:void 0,void 0,s.overviewSection))})}function We(e){return HZ(na,e)}function LY(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:Ei(e.wallTimeMs)}];e.costUsd!==void 0&&t.push({key:"cost",value:bm(e.costUsd)});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 FM(e){return e.turns>0||e.turnFailures>0||e.toolCalls>0||e.toolErrors>0||e.inputTokens>0||e.outputTokens>0||(e.costUsd??0)>0||e.wallTimeMs>0||Object.keys(e.custom).length>0}function UM({metrics:e}){return g.jsx("div",{className:"ab-metrics",children:LY(e).map(t=>g.jsxs("span",{className:"ab-metric",children:[g.jsx("span",{className:"ab-metric-k",children:t.key}),g.jsx("span",{className:"ab-metric-v",children:t.value})]},t.key))})}function PY({arm:e}){const t=e.variantLabel??e.variant,n=e.sessions>0||FM(e.metrics);return g.jsxs("div",{className:"ab-arm",children:[g.jsxs("div",{className:"ab-arm-head",children:[g.jsx("span",{className:"ab-kind",children:"Arm"}),g.jsx("span",{className:"ab-arm-name",children:t}),g.jsxs("span",{className:"ab-arm-n",children:[e.sessions," session",e.sessions===1?"":"s"]})]}),e.description!==void 0?g.jsx("div",{className:"ab-arm-desc",children:e.description}):null,n?g.jsx(UM,{metrics:e.metrics}):null]})}function $Y({row:e,active:t}){return g.jsxs("button",{type:"button",className:`ab-session${t?" active":""}`,onClick:()=>{nt.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}}),nt.setView("chat")},children:[g.jsxs("div",{className:"ab-session-head",children:[g.jsx("span",{className:"ab-session-id",children:e.title||e.sessionId}),g.jsxs("span",{className:"ab-session-meta",children:[e.channelId,e.updatedAt!==void 0?` · ${yh(e.updatedAt)??e.updatedAt}`:""]})]}),g.jsx("div",{className:"ab-session-arms",children:e.assignments.map(n=>{const r=n.variant===null,s=r?"Skipped":n.variantLabel??n.variant;return g.jsxs("div",{className:"ab-assignment",children:[g.jsxs("div",{className:"ab-assignment-row",children:[g.jsx("span",{className:"ab-assignment-exp",children:n.experiment}),g.jsx("span",{className:"ab-assignment-arrow","aria-hidden":!0,children:"→"}),g.jsx(Zi,{variant:r?"neutral":"accent",size:"sm",pill:!0,children:s})]}),n.metrics!==void 0&&FM(n.metrics)?g.jsx(UM,{metrics:n.metrics}):null]},`${e.sessionId}:${n.experiment}`)})})]})}function qM(){const e=We(y=>y.current),[t,n]=v.useState(null),[r,s]=v.useState(null),[a,l]=v.useState(!0),c=v.useRef(!1),d=v.useCallback(async()=>{if(!c.current){c.current=!0,l(!0),s(null);try{const y=await nt.api.abs();if(!y.ok||y.body===null){s(`Failed to load A/Bs (${y.status})`),n(null);return}n(y.body)}catch(y){s(y instanceof Error?y.message:String(y)),n(null)}finally{l(!1),c.current=!1}}},[]);if(v.useEffect(()=>{d();const y=setInterval(()=>{d()},4e3);return()=>clearInterval(y)},[d]),a&&t===null)return g.jsx("div",{className:"pg-abs is-empty",children:g.jsxs("div",{className:"ab-empty",children:[g.jsx("span",{className:"spin"})," Loading A/B metrics…"]})});if(r!==null&&t===null)return g.jsxs("div",{className:"pg-abs is-empty",children:[g.jsx("div",{className:"ab-empty ab-error",children:r}),g.jsx(Cn,{variant:"secondary",size:"sm",onClick:()=>{d()},children:"Retry"})]});const f=t?.experiments??[],h=t?.sessions??[];if(f.length===0&&h.length===0)return g.jsx("div",{className:"pg-abs is-empty",children:g.jsxs("div",{className:"ab-empty",children:["No A/B experiments loaded.",g.jsxs("div",{className:"ab-hint",children:["Author ",g.jsx("code",{children:"agent/ab.ts"})," with ",g.jsx("code",{children:"defineAB"}),", then run sessions — enrollment lands as durable ",g.jsx("code",{children:"ab.assigned"})," ","events at session create. Optional"," ",g.jsx("code",{children:"agent/ab.config.ts"})," controls fold retention and sample / snapshot persistence."]})]})});const b=t?.config?.maxPlaygroundSessions??200;return g.jsxs("div",{className:"pg-abs",children:[g.jsxs("div",{className:"ab-toolbar",children:[g.jsx("span",{className:"ab-toolbar-title",children:"A/B metrics"}),g.jsxs("span",{className:"ab-toolbar-meta",children:["last ",b," sessions"]}),r!==null?g.jsx("span",{className:"ab-error",children:r}):null,g.jsx("span",{className:"grow"}),g.jsx(Cn,{variant:"secondary",size:"sm",onClick:()=>{d()},children:"Refresh"})]}),g.jsxs("section",{className:"ab-section",children:[g.jsx("h3",{children:"Experiments"}),f.length===0?g.jsx("div",{className:"ab-empty",children:"No declared experiments."}):g.jsx("div",{className:"ab-exp-list",children:f.map(y=>g.jsxs("div",{className:"ab-exp-card",children:[g.jsxs("div",{className:"ab-exp-card-head",children:[g.jsx("span",{className:"ab-kind",children:"Experiment"}),g.jsx("span",{className:"ab-exp-name",children:y.name}),y.skipped>0?g.jsxs(Zi,{variant:"neutral",size:"sm",pill:!0,children:[y.skipped," skipped"]}):null]}),g.jsx("div",{className:"ab-arm-list",children:y.arms.map(x=>g.jsx(PY,{arm:x},x.variant))})]},y.name))})]}),g.jsxs("section",{className:"ab-section",children:[g.jsx("h3",{children:"Sessions"}),h.length===0?g.jsx("div",{className:"ab-empty",children:"No enrolled sessions yet. Start a chat to assign arms."}):g.jsx("div",{className:"ab-session-list",children:h.map(y=>g.jsx($Y,{row:y,active:e?.sessionId===y.sessionId},y.sessionId))})]})]})}function BY(){const[e,t]=v.useState(""),[n,r]=v.useState(null),[s,a]=v.useState(!1);async function l(c){c.preventDefault(),a(!0),r(null);const d=await nt.signInWithAliasToken(e);a(!1),d.ok||r(d.error)}return g.jsx("div",{className:"pg-alias-signin",children:g.jsxs("div",{className:"pg-alias-signin-box",children:[g.jsx("h1",{children:"agent-serve playground"}),g.jsx("p",{children:"This deployment requires its alias token."}),n!==null?g.jsx("div",{className:"pg-alias-signin-error",children:n}):null,g.jsxs("form",{onSubmit:c=>{l(c)},children:[g.jsx(hf,{type:"password",size:"base","aria-label":"Alias token",placeholder:"adt_…",autoComplete:"off",autoFocus:!0,value:e,onChange:c=>t(c.target.value),disabled:s}),g.jsx(Cn,{type:"submit",variant:"primary",disabled:s||e.trim()==="",children:s?"Checking…":"Open playground"})]}),g.jsxs("div",{className:"pg-alias-signin-hint",children:["The alias token was shown once when the agent was deployed. Lost it?",g.jsx("code",{children:"agent-sdk rotate-token <slug>"})," mints a replacement. The token stays in this tab only — refresh to sign in again."]})]})})}function FY(){return g.jsx("div",{className:"pg-alias-signin",children:g.jsxs("div",{className:"pg-alias-signin-box",children:[g.jsx("h1",{children:"Playground disconnected"}),g.jsx("p",{children:"This playground connects through your Cursor dashboard. Use Reconnect on the dashboard, or reload the page."})]})})}const UY=["noopener","noreferrer"];function Mx(e){return e.trim()===""}function HM(e){const t=e.trim();if(Mx(t)||t.startsWith("#"))return!1;try{const n=new URL(t,"https://playground.invalid").protocol.toLowerCase();return n!=="javascript:"&&n!=="data:"&&n!=="vbscript:"&&n!=="file:"}catch{return!0}}function qY(e){if(e.hasAttribute("download"))return;const t=e.getAttribute("href");if(t===null||!HM(t))return;e.target="_blank";const n=new Set(e.rel.split(/\s+/).map(r=>r.toLowerCase()).filter(r=>r!==""));for(const r of UY)n.add(r);e.rel=[...n].join(" ")}function Z_(e){const t=e.target;if(!(t instanceof Element))return;const n=t.closest("a");if(!(n instanceof HTMLAnchorElement))return;qY(n);const r=n.getAttribute("href");r!==null&&Mx(r)&&!n.hasAttribute("download")&&e.preventDefault()}function HY(e=document){return e.addEventListener("click",Z_,!0),()=>e.removeEventListener("click",Z_,!0)}function ga({href:e,onClick:t,...n}){const s=e!==void 0&&Mx(e)?a=>{a.preventDefault(),t?.(a)}:t;return e===void 0||!HM(e)?g.jsx("a",{href:e,...n,onClick:s}):g.jsx("a",{href:e,...n,onClick:s,target:"_blank",rel:"noopener noreferrer"})}const Y_=280,GY=8,Sy=1e3;function VY({record:e}){const[t,n]=v.useState(!1),r=v.useMemo(()=>{const a=OM(e.data);return a!==null?{url:a,json:"",short:""}:{url:null,json:ma(e.data),short:Qn(e.data,Y_)}},[e.data]);if(r.url!==null)return g.jsx(ga,{className:"artifact-link",href:r.url,children:r.url});if(r.json==="")return null;const s=r.json.length>Y_||r.json.split(`
|
|
38
|
+
`).length>GY;return g.jsxs("div",{className:"artifact-data",children:[g.jsx("pre",{className:"artifact-json",children:s&&!t?r.short:r.json}),s?g.jsx("button",{type:"button",className:"link-btn",onClick:()=>n(!t),children:t?"Collapse":"Expand"}):null]})}const X_=v.memo(function({record:t}){return g.jsxs("div",{className:"artifact-row",children:[g.jsxs("div",{className:"artifact-row-head",children:[g.jsx("span",{className:"artifact-title",children:XZ(t)}),g.jsx(Zi,{variant:"accent",size:"sm",pill:!0,children:t.kind}),g.jsx(Zi,{variant:t.source==="model"?"success":"neutral",size:"sm",pill:!0,children:t.source}),g.jsx("span",{className:"artifact-updated",title:`updated ${t.updatedAt}`,children:yh(t.updatedAt)??t.updatedAt})]}),g.jsx(VY,{record:t})]})});function WY({sessionId:e,count:t,title:n}){const r=`${t} artifact${t===1?"":"s"}`;return e===null?g.jsxs("div",{className:"artifact-group-head",children:[g.jsx("span",{className:"artifact-group-id",children:"No session"}),g.jsx("span",{className:"artifact-group-n",children:r})]}):g.jsxs("button",{type:"button",className:"artifact-group-head",onClick:()=>{nt.openSessionById(e)},title:"Open this session's replay",children:[g.jsx("span",{className:"artifact-group-id",children:n||e}),n?g.jsx("span",{className:"artifact-group-sub",children:e}):null,g.jsxs("span",{className:"artifact-group-n",children:[r," →"]})]})}function GM(){const e=We(A=>A.current),t=We(A=>A.sessions),[n,r]=v.useState(null),[s,a]=v.useState(null),[l,c]=v.useState(null),[d,f]=v.useState("all"),[h,m]=v.useState(0);e===null&&d==="session"&&f("all");const b=d==="session"&&e!==null?e.sessionId:null,y=n!==null&&n.scope===b?n.rows:null;v.useEffect(()=>{let A=!1,N=!1;a(null);const P=async()=>{if(!N){N=!0;try{const D=await nt.api.artifacts({sessionId:b??void 0,limit:Sy});if(A)return;if(!D.ok||D.body===null){a(`Failed to load artifacts (${D.status})`);return}a(null),r({scope:b,rows:D.body.artifacts??[]})}catch(D){A||a(D instanceof Error?D.message:String(D))}finally{N=!1}}};P();const z=setInterval(()=>{P()},4e3);return()=>{A=!0,clearInterval(z)}},[b,h]);const x=()=>m(A=>A+1),S=b!==null;if(y===null)return g.jsx("div",{className:"pg-artifacts is-empty",children:s!==null?g.jsx(As,{className:"pg-empty",message:s,actions:g.jsx(Cn,{variant:"secondary",size:"sm",onClick:x,children:"Retry"})}):g.jsx(As,{className:"pg-empty",message:"Loading artifacts…"})});const E=MM(y);if(E.length===0)return g.jsx("div",{className:"pg-artifacts is-empty",children:g.jsx(As,{className:"pg-empty",message:S?"No artifacts tagged for this session.":"No artifacts tagged yet."})});const T=QZ(E),R=l!==null&&T.includes(l)?l:null,_=JZ(E,R),C=S?[]:eY(_),M=new Map(t.map(A=>[A.sessionId,A.title]));return g.jsxs("div",{className:"pg-artifacts",children:[g.jsxs("div",{className:"ab-toolbar",children:[g.jsx("span",{className:"ab-toolbar-title",children:"Artifacts"}),g.jsxs("span",{className:"ab-toolbar-meta",children:[_.length," of ",E.length,E.length>=Sy?` (newest ${Sy})`:""]}),s!==null?g.jsx("span",{className:"ab-error",children:s}):null,g.jsx("span",{className:"grow"}),e!==null?g.jsxs(Tc,{size:"sm",variant:"compact",value:d,onValueChange:A=>f(A==="session"?"session":"all"),"aria-label":"Artifact scope",children:[g.jsx(Tc.Item,{value:"all",children:"All sessions"}),g.jsx(Tc.Item,{value:"session",children:"This session"})]}):null,g.jsx(Cn,{variant:"secondary",size:"sm",onClick:x,children:"Refresh"})]}),T.length>1?g.jsxs("div",{className:"artifact-kinds",role:"group","aria-label":"Filter by kind",children:[g.jsx("button",{type:"button",className:`artifact-kind-chip${R===null?" active":""}`,onClick:()=>c(null),children:"All"}),T.map(A=>g.jsx("button",{type:"button",className:`artifact-kind-chip${R===A?" active":""}`,onClick:()=>c(R===A?null:A),children:A},A))]}):null,_.length===0?g.jsx(As,{className:"pg-empty",message:"No artifacts match this kind filter."}):S?g.jsx("div",{className:"artifact-list",children:_.map(A=>g.jsx(X_,{record:A},A.id))}):g.jsx("div",{className:"artifact-group-list",children:C.map(A=>g.jsxs("section",{className:"artifact-group",children:[g.jsx(WY,{sessionId:A.sessionId,count:A.artifacts.length,title:A.sessionId===null?void 0:M.get(A.sessionId)}),g.jsx("div",{className:"artifact-list",children:A.artifacts.map(N=>g.jsx(X_,{record:N},N.id))})]},A.sessionId??"(none)"))})]})}function KY(e){const{localTrace:t,historyOnly:n,current:r,running:s,slashNames:a,hasReview:l}=e;if(n)return{disabled:!0,hint:"This agent is stopped. Open a session from Runs to inspect its chat and trace."};if(t)return{disabled:!0,hint:"Local trace (view only). Click New or pick a live session to chat."};if(r===null){const f=a.length>0?` Slash commands: ${a.slice(0,4).join(", ")}${a.length>4?", …":""}, /help.`:"";return l?{disabled:!1,hint:`Paste a PR URL for /review, type a channel command, or send a message for a new http session.${f}`}:{disabled:!1,hint:f.trimStart()}}if(r.mode==="task"||r.channelId!=="http")return r.mode==="task"?{disabled:!0,hint:"Task sessions (schedules) are fire-and-forget; watch only."}:r.channelId==="slack"?{disabled:!0,hint:`Slack thread — watch here, reply in Slack${r.externalUrl?" (Open in Slack above).":"."}`}:{disabled:!0,hint:`Sessions owned by the “${r.channelId}” channel take follow-ups through that channel; watch only here.`};if(!r.continuationToken)return{disabled:!0,hint:"This session has no continuation token; watch only."};const d=a.length>0?` Channel commands (${a.slice(0,3).join(", ")}${a.length>3?", …":""}) also work from here.`:"";return{disabled:!1,hint:s?"Turn running — Enter queues the follow-up; ⌘Enter sends now and interrupts.":`Follow-ups reuse this session’s rotating continuation token.${d}`}}function ZY(){const e=We(t=>t.queued);return e.length===0?null:g.jsx("div",{className:"pg-queue",role:"list","aria-label":"Queued messages",children:e.map(t=>g.jsxs("div",{className:"pg-queue-item",role:"listitem",children:[g.jsx("button",{type:"button",className:"pg-queue-label",title:"Edit queued message",onClick:()=>nt.editQueued(t.id),children:t.text}),g.jsxs("span",{className:"pg-queue-actions",children:[g.jsx(kr,{icon:"arrow-up",size:"sm",variant:"ghost","aria-label":"Send now (interrupts the running turn)",onClick:()=>{nt.sendQueuedNow(t.id)}}),g.jsx(kr,{icon:"x",size:"sm",variant:"ghost","aria-label":"Remove queued message",onClick:()=>nt.removeQueued(t.id)})]})]},t.id))})}function VM(){const[e,t]=v.useState(""),[n,r]=v.useState(0),s=v.useRef(null),a=We(N=>N.localTrace),l=We(N=>N.meta.readonly===!0),c=We(N=>N.current),d=We(N=>N.running),f=We(N=>N.composerDraft),h=We(N=>N.info),m=(h?.channels||[]).some(N=>N.id==="review");v.useEffect(()=>{f!==null&&(t(N=>N.trim()?`${N} ${f}`:f),nt.consumeComposerDraft(),s.current?.focus())},[f]);const b=v.useMemo(()=>ym(h?.channels),[h]),y=v.useMemo(()=>jM(b),[b]),x=v.useMemo(()=>{if(a||l)return null;const N=e.replace(/^\s+/,"");return!N.startsWith("/")||/\s/.test(N)?null:N},[e,a,l]),S=v.useMemo(()=>x===null?[]:mY(x,b),[x,b]),E=x!==null&&S.length>0,{disabled:T,hint:R}=KY({localTrace:a,historyOnly:l,current:c,running:d,slashNames:y,hasReview:m}),_=d&&c!==null&&!a&&!l,C=async(N=e,P=!1)=>{if(!N.trim())return;await nt.sendMessage(N,{force:P})&&(t(""),r(0))},M=N=>{t(`${N} `),r(0)},A=N=>{if(E){if(N.key==="ArrowDown"){N.preventDefault(),r(P=>(P+1)%S.length);return}if(N.key==="ArrowUp"){N.preventDefault(),r(P=>(P-1+S.length)%S.length);return}if(N.key==="Tab"||N.key==="Enter"&&!N.shiftKey){const P=S[n]??S[0];if(P!==void 0&&x!==P.name){N.preventDefault(),M(P.name);return}}if(N.key==="Escape"){N.preventDefault(),t(""),r(0);return}}N.key==="Enter"&&!N.shiftKey&&(N.preventDefault(),C(e,N.metaKey||N.ctrlKey))};return g.jsxs("div",{className:"pg-composer",children:[E?g.jsxs("ul",{className:"pg-slash-menu",role:"listbox","aria-label":"Slash commands",children:[S.map((N,P)=>g.jsx("li",{children:g.jsxs("button",{type:"button",role:"option","aria-selected":P===n,className:P===n?"pg-slash-item is-active":"pg-slash-item",onMouseDown:z=>{z.preventDefault(),M(N.name)},onMouseEnter:()=>r(P),children:[g.jsx("code",{className:"pg-slash-name",children:N.name}),g.jsx("span",{className:"pg-slash-method",children:N.method}),N.description?g.jsx("span",{className:"pg-slash-desc",children:N.description}):null]})},`${N.name}:${N.method}`)),g.jsxs("li",{className:"pg-slash-footer",children:[g.jsx("code",{children:"/help"})," lists all channel commands"]})]}):null,g.jsxs("div",{className:"inner",children:[g.jsx(ZY,{}),g.jsxs("div",{className:T&&!_?"pg-prompt disabled":"pg-prompt",children:[g.jsx("textarea",{ref:s,className:"pg-prompt-input",rows:1,placeholder:y.length>0?`Message the agent, or ${y[0]} …`:"Message the agent...","aria-label":"Message the agent","aria-autocomplete":E?"list":void 0,"aria-expanded":E,value:e,onChange:N=>{t(N.target.value),r(0)},onKeyDown:A,disabled:T,autoFocus:!0}),g.jsxs("div",{className:"pg-prompt-toolbar",children:[g.jsx("span",{className:"pg-prompt-hint",title:R,children:R}),_&&!e.trim()?g.jsx(kr,{icon:"square",iconVariant:"filled",variant:"primary",tone:"monochrome",rounded:!0,size:"lg",className:"pg-prompt-stop","aria-label":"Stop the running turn",onClick:()=>{nt.stopTurn()}}):g.jsx(kr,{icon:"arrow-up",variant:"primary",tone:"monochrome",rounded:!0,size:"lg","aria-label":d?"Queue message (⌘Enter sends now)":"Send message",disabled:T,onClick:()=>{C()}})]})]})]})]})}function YY(e){return{filename:`${e.runId}.eval-results.json`,text:`${JSON.stringify(e,null,2)}
|
|
39
|
+
`}}function XY(e,t,n="application/json"){const r=new Blob([t],{type:n}),s=URL.createObjectURL(r),a=document.createElement("a");a.href=s,a.download=e,a.target="_self",document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(s)}function bi(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 WM(e){const t=[];let n=null,r={};const s=new Map;let a=null,l="";const c=new Map;let d=null,f=1,h=0,m=0;function b(E){return n&&n.endedAt===null||(n={turnId:E?.turnId||`turn_${t.length+1}`,startedAt:E?.at?Al(E.at):null,endedAt:null,usage:null,rows:[],provisional:!0},t.push(n)),n}function y(E){b({turnId:E.turnId,at:null}).rows.push(E),E.ms&&E.ms>f&&(f=E.ms)}function x(E){if(a===null)return;const T=b(),R=E!==null&&a!==null?Math.max(0,E-a):null,_=l.trim()||void 0;T.rows.push(bi({kind:"think",label:_?Ni(_,80):"thinking",body:_,ms:R,at:E,startAt:a})),R&&R>f&&(f=R),a=null,l=""}for(const E of e){const T=E.data||{},R=Al(E.at);switch(E.type){case"turn.started":n&&n.provisional&&n.endedAt===null?(n.turnId=E.turnId||n.turnId,n.startedAt=R,n.provisional=!1):(n={turnId:E.turnId||`turn_${t.length+1}`,startedAt:R,endedAt:null,usage:null,rows:[],provisional:!1},t.push(n)),a=null,l="",d=null;break;case"message.received":y(bi({kind:"user",label:Ni(T.text,140),body:typeof T.text=="string"?T.text:void 0,at:R,startAt:R,ms:0,turnId:E.turnId}));break;case"reasoning.appended":if(typeof T.parentCallId=="string"&&T.parentCallId!==""){const _=c.get(T.parentCallId)??{start:R,text:""};_.start===null&&(_.start=R),typeof T.text=="string"&&(_.text=T.text),c.set(T.parentCallId,_);break}a===null&&(a=R),typeof T.text=="string"&&(l=T.text);break;case"reasoning.completed":if(typeof T.parentCallId=="string"&&T.parentCallId!==""){const _=T.parentCallId,C=c.get(_);c.delete(_);const M=C?.text.trim()||void 0;if(M!==void 0){const A=C?.start??R,N=A!==null&&R!==null?Math.max(0,R-A):null;y(bi({kind:"think",label:Ni(M,80),body:M,ms:N,at:R,startAt:A,turnId:E.turnId,depth:1,parentCallId:_}))}break}x(R);break;case"message.appended":if(typeof T.parentCallId=="string"&&T.parentCallId!=="")break;d===null&&(d=R);break;case"message.completed":{if(typeof T.parentCallId=="string"&&T.parentCallId!==""){const M=T.parentCallId;y(bi({kind:"agent",label:Ni(T.text,160)||"(empty reply)",body:typeof T.text=="string"?T.text:void 0,at:R,startAt:R,ms:0,turnId:E.turnId,depth:1,parentCallId:M}));break}const _=d??R,C=_!==null&&R!==null?Math.max(0,R-_):null;y(bi({kind:"agent",label:Ni(T.text,160)||"(empty reply)",body:typeof T.text=="string"?T.text:void 0,at:R,startAt:_,ms:C,turnId:E.turnId})),C&&C>f&&(f=C),d=null;break}case"actions.requested":for(const _ of T.calls||[]){const C=typeof _.parentCallId=="string"&&_.parentCallId!==""?_.parentCallId:typeof T.parentCallId=="string"&&T.parentCallId!==""?T.parentCallId:void 0;if(C===void 0&&_.toolName==="task")continue;const M=C===void 0?_.callId:`${C}:${_.callId}`;r[M]={name:_.toolName,args:_.args,start:R,turnId:E.turnId,parentCallId:C}}break;case"action.result":{const _=T.callId;if(_==null)break;const C=typeof T.parentCallId=="string"&&T.parentCallId!==""?T.parentCallId:void 0;if(C===void 0&&T.toolName==="task"){delete r[_];break}const M=C===void 0?_:`${C}:${_}`,A=r[M];delete r[M];const N=A&&A.start!==null&&R!==null?R-A.start:null;h+=1,T.isError&&(m+=1);{const P=T.toolName||A?.name||"tool",z=A?.args;y(bi({kind:"tool",label:P+(z?` ${Ni(Qn(z,60),60)}`:""),toolName:P,callId:typeof _=="string"?_:String(_),toolArgs:z,toolOutput:T.output,body:typeof T.output=="string"?T.output:T.output!=null?Qn(T.output,4e3):void 0,ms:N,error:!!T.isError,at:R,startAt:A?.start??null,turnId:E.turnId,depth:C===void 0?0:1,parentCallId:C}))}N&&N>f&&(f=N);break}case"subagent.called":{const _=`task:${T.name||"subagent"}`,C=typeof T.callId=="string"?T.callId:String(T.callId);r[`sub:${C}`]={name:_,args:T.description,start:R,turnId:E.turnId};const M=b(E);M.rows.push(bi({kind:"tool",label:_,toolName:_,callId:C,toolArgs:T.description,ms:null,at:R,startAt:R,turnId:E.turnId,depth:0})),s.set(C,{turn:M,index:M.rows.length-1});break}case"subagent.completed":{const _=typeof T.callId=="string"?T.callId:String(T.callId),C=`sub:${_}`,M=r[C];delete r[C];const A=M&&M.start!==null&&R!==null?R-M.start:null;h+=1;const N=s.get(_);s.delete(_);const P=N!==void 0?N.turn.rows[N.index]:void 0;P!==void 0&&P.kind==="tool"?(P.ms=A,P.at=R,A&&A>f&&(f=A)):y(bi({kind:"tool",label:M?.name||"subagent",toolName:M?.name||"subagent",callId:_,toolArgs:M?.args,ms:A,at:R,startAt:M?.start??null,turnId:E.turnId}));break}case"artifact.tagged":{const _=IM(T);y(bi({kind:"artifact",label:Ni(_.title===void 0?_.kind:`${_.kind} · ${_.title}`,120),body:T.data!=null?Qn(T.data,4e3):void 0,url:_.url,at:R,startAt:R,ms:0,turnId:E.turnId}));break}case"turn.completed":case"turn.failed":case"session.waiting":{if(E.type==="session.waiting"&&(n===null||n.endedAt!==null))break;const _=b(E);if((E.type==="turn.completed"||E.type==="turn.failed")&&(_.endedAt=R,_.usage=T.usage||null,_.cost=T.cost||null,_.failed=E.type==="turn.failed",_.error=T.message,_.startedAt!==null&&_.endedAt!==null)){const C=_.endedAt-_.startedAt;C>f&&(f=C),_.wallMs=C}if(x(R),d!==null&&R!==null){const C=Math.max(0,R-d);_.rows.push(bi({kind:"agent",label:"(streaming…)",ms:C,at:R,startAt:d})),d=null}for(const C of Object.keys(r)){const M=r[C],A=M.start!==null&&R!==null?R-M.start:null;_.rows.push(bi({kind:"tool",label:`${M.name||"tool"} (no result)`,ms:A,error:!0,at:R,startAt:M.start,turnId:M.turnId})),A&&A>f&&(f=A)}r={},(E.type==="turn.completed"||E.type==="turn.failed")&&(n=null);break}}}for(const E of Object.keys(r)){const T=r[E];y(bi({kind:"tool",label:`${T.name||"tool"} (running…)`,ms:null,at:T.start,startAt:T.start,turnId:T.turnId}))}let S=null;for(const E of t){const T=E.cost?.totalUsd;typeof T=="number"&&Number.isFinite(T)&&(S=(S??0)+T)}return{turns:t,maxWallMs:f,totalTools:h,failedTools:m,eventCount:e.length,totalCostUsd:S}}function QY(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 JY({case:e}){const t=Object.entries(e.metrics??{});return t.length===0?null:g.jsx("div",{className:"eval-metrics","aria-label":"Eval metrics",children:t.map(([n,r])=>g.jsxs("span",{className:"eval-metric",title:n,children:[g.jsx("span",{className:"eval-metric-name",children:n}),g.jsx("span",{className:"eval-metric-value",children:String(r)})]},n))})}const eX="VulnScanner";function Ol(e,t){const n=e?.[t];if(n===void 0)return;const r=String(n).trim();return r===""?void 0:r}function tX(e){return e.id==="overall"||e.id.endsWith("/overall")||(e.tags?.includes("summary")??!1)}function nX({case:e}){const t=Ol(e.metrics,"recall");if(t===void 0){const n=Object.entries(e.metrics??{});return n.length===0?null:g.jsx("div",{className:"eval-metrics","aria-label":"Eval metrics",children:n.map(([r,s])=>g.jsxs("span",{className:"eval-metric",title:r,children:[g.jsx("span",{className:"eval-metric-name",children:r}),g.jsx("span",{className:"eval-metric-value",children:String(s)})]},r))})}return g.jsxs("div",{className:"eval-metrics","aria-label":"Eval metrics",children:[g.jsxs("span",{className:"eval-metric eval-metric-recall",title:"recall",children:[g.jsx("span",{className:"eval-metric-name",children:"recall"}),g.jsx("span",{className:"eval-metric-value",children:t})]}),Object.entries(e.metrics??{}).filter(([n])=>n!=="recall"&&n!=="matched"&&n!=="missing").map(([n,r])=>g.jsxs("span",{className:"eval-metric",title:n,children:[g.jsx("span",{className:"eval-metric-name",children:n}),g.jsx("span",{className:"eval-metric-value",children:String(r)})]},n))]})}function rX({case:e}){const t=Ol(e.metrics,"matched"),n=Ol(e.metrics,"missing");return t===void 0&&n===void 0?null:g.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 iX({run:e}){const t=[...e.cases].reverse().find(r=>tX(r)&&Ol(r.metrics,"recall")!==void 0),n=Ol(t?.metrics,"recall")??[...e.cases].map(r=>Ol(r.metrics,"recall")).find(r=>r!==void 0);return n===void 0?null:g.jsxs("span",{className:"eval-run-recall",title:"Suite recall",children:[g.jsx("span",{className:"eval-run-recall-label",children:"recall"}),g.jsx("span",{className:"eval-run-recall-value",children:n})]})}const sX={RunSummary:iX,CaseMetrics:nX,CaseExtras:rX},oX=Object.freeze(Object.defineProperty({__proto__:null,agentName:eX,default:sX},Symbol.toStringTag,{value:"Module"})),aX=Object.assign({"../../../../../../factory/vulnerability-scanner/agent/playground/evals.tsx":oX});function lX(e){return/\/(?:examples|factory)\/([^/]+)\/agent\/playground\//.exec(e)?.[1]}const KM=new Map;for(const[e,t]of Object.entries(aX)){if(t?.default==null)continue;const n=typeof t.agentName=="string"&&t.agentName.trim()!==""?t.agentName.trim():void 0,r=lX(e),s=new Set;n!==void 0&&s.add(n),r!==void 0&&s.add(r);for(const a of s)KM.set(a,t.default)}function uX(e){if(!(e===void 0||e.trim()===""))return KM.get(e.trim())}const cX={passed:"Pass",failed:"Fail",scored:"Scored",skipped:"Skipped"},fX={passed:"success",failed:"danger",scored:"warn",skipped:"neutral"};function dX(e){return e.verdict??(e.ok===!0?"passed":"failed")}function pX(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?void 0:t.join(" · ")}function hX({a:e}){return e.passed?g.jsx(tn,{name:"check-circle",variant:"filled",size:"sm",color:"green"}):e.severity==="soft"?g.jsx(tn,{name:"minus-circle",variant:"filled",size:"sm",color:"yellow"}):g.jsx(tn,{name:"x-circle",variant:"filled",size:"sm",color:"red"})}function ZM(e,t=200){const[n,r]=v.useState(e);return v.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 mX={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench",artifact:"bookmark"},gX={user:"User",agent:"Assistant",think:"Thinking",tool:"Tool call",artifact:"Artifact"},bX={user:"accent",agent:"green",think:"yellow",tool:"purple",artifact:"orange"};function yX({row:e}){const[t,n]=v.useState(!1),r=e.body!==void 0&&e.body.length>0||e.toolArgs!==void 0||e.toolOutput!==void 0,s=t&&r,a=ZM(s),l=e.error?"error":e.kind;return g.jsxs("div",{className:`eval-step eval-step-${e.kind}${e.error?" error":""}`,children:[g.jsxs("button",{type:"button",className:"eval-step-head",disabled:!r,onClick:()=>n(c=>!c),"aria-expanded":t,children:[g.jsxs("span",{className:`eval-step-kind kind-${l}`,children:[g.jsx(tn,{name:mX[e.kind],size:"sm",color:e.error?"red":bX[e.kind]}),g.jsx("span",{className:"eval-step-kind-label",children:gX[e.kind]})]}),g.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?g.jsx("span",{className:"eval-step-ms",children:Ei(e.ms)}):null,r?g.jsx("span",{className:t?"eval-chevron open":"eval-chevron",children:g.jsx(tn,{name:"chevron-right",size:10})}):null]}),a?g.jsx("div",{className:s?"eval-collapse-clip":"eval-collapse-clip collapsed","aria-hidden":!s,inert:s?void 0:!0,children:g.jsxs("div",{className:"eval-step-detail",children:[e.kind==="tool"&&e.toolArgs!==void 0?g.jsxs("div",{className:"eval-step-block",children:[g.jsx("div",{className:"eval-step-block-label",children:"args"}),g.jsx("pre",{children:ma(e.toolArgs)})]}):null,e.kind==="tool"&&e.toolOutput!==void 0?g.jsxs("div",{className:"eval-step-block",children:[g.jsx("div",{className:"eval-step-block-label",children:e.error?"error":"result"}),g.jsx("pre",{children:typeof e.toolOutput=="string"?e.toolOutput:ma(e.toolOutput)})]}):null,e.kind!=="tool"&&e.body!==void 0?g.jsx("div",{className:"eval-step-block",children:g.jsx("pre",{children:e.body})}):null,e.kind==="tool"&&e.body!==void 0&&e.toolOutput===void 0?g.jsx("div",{className:"eval-step-block",children:g.jsx("pre",{children:e.body})}):null]})}):null]})}function vX({sessionId:e,live:t}){const[n,r]=v.useState([]),[s,a]=v.useState(null),[l,c]=v.useState(!0),[d,f]=v.useState(!1),h=v.useRef(null);v.useEffect(()=>{let b=!1;const y=new AbortController;return c(!0),a(null),r([]),f(!1),(async()=>{let x=-1;try{const S=await nt.api.eventsText(e);if(b)return;if(S.ok){const E=await S.text();if(b)return;const T=zv(E);for(const R of T)typeof R.index=="number"&&R.index>x&&(x=R.index);r(T)}}catch(S){b||a(S instanceof Error?S.message:String(S))}finally{b||c(!1)}if(!(!t||b)){f(!0);try{const S=await nt.api.streamFetch(e,x+1,y.signal);if(!S.ok||!S.body){b||(a(`Stream failed (${S.status})`),f(!1));return}const E=S.body.getReader(),T=new TextDecoder;let R="";for(;;){const{done:_,value:C}=await E.read();if(_||b)break;R+=T.decode(C,{stream:!0});const M=R.split(`
|
|
40
|
+
`);R=M.pop()??"";const A=[];for(const N of M){const P=N.trim();if(P)try{const z=JSON.parse(P);A.push(z),typeof z.index=="number"&&z.index>x&&(x=z.index)}catch{}}A.length>0&&!b&&r(N=>[...N,...A])}}catch(S){!b&&!(S instanceof DOMException&&S.name==="AbortError")&&a(S instanceof Error?S.message:String(S))}finally{b||f(!1)}}})(),()=>{b=!0,y.abort()}},[e,t]),v.useEffect(()=>{t&&h.current&&h.current.scrollIntoView({block:"nearest"})},[n.length,t]);const m=v.useMemo(()=>WM(n),[n]);return l&&n.length===0?g.jsxs("div",{className:"eval-trace",children:[g.jsx("span",{className:"spin"})," Loading session trace…"]}):s!==null&&n.length===0?g.jsx("div",{className:"eval-error",children:s}):m.turns.length===0?g.jsx("div",{className:"eval-trace",children:g.jsx("div",{className:"eval-trace-empty",children:t?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"spin"})," Waiting for first events…"]}):"No events in this session."})}):g.jsxs("div",{className:"eval-trace",children:[g.jsxs("div",{className:"eval-trace-meta",children:[m.eventCount," events · ",m.totalTools," tool",m.totalTools===1?"":"s",m.failedTools>0?` · ${m.failedTools} failed`:"",t||d?g.jsxs(g.Fragment,{children:[" · ",g.jsxs("span",{className:"eval-live",children:[g.jsx("span",{className:"spin"})," live"]})]}):null]}),s!==null?g.jsx("div",{className:"eval-error",children:s}):null,m.turns.map((b,y)=>g.jsxs("div",{className:"eval-turn",children:[g.jsxs("div",{className:"eval-turn-head",children:["Turn ",y+1,b.failed?" · failed":"",b.wallMs!=null&&b.wallMs>0?` · ${Ei(b.wallMs)}`:""]}),b.rows.map((x,S)=>g.jsx(yX,{row:x},`${b.turnId}-${S}-${x.kind}`))]},b.turnId)),g.jsx("div",{ref:h})]})}function kX({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?g.jsxs("div",{className:"eval-io",children:[g.jsxs("div",{className:"eval-io-section",children:[g.jsx("div",{className:"eval-io-heading",children:"Inputs"}),t.length===0?g.jsx("div",{className:"eval-trace-empty",children:"None yet"}):t.map((s,a)=>g.jsxs("div",{className:"eval-step-block",children:[g.jsxs("div",{className:"eval-step-block-label",children:["message ",t.length>1?a+1:""]}),g.jsx("pre",{children:s})]},`in-${a}`))]}),g.jsxs("div",{className:"eval-io-section",children:[g.jsx("div",{className:"eval-io-heading",children:"Tool calls"}),n.length===0?g.jsx("div",{className:"eval-trace-empty",children:e.tools&&e.tools.length>0?e.tools.join(", "):"None"}):n.map((s,a)=>g.jsxs("div",{className:`eval-step eval-step-tool${s.isError?" error":""}`,children:[g.jsxs("div",{className:"eval-step-head",style:{cursor:"default"},children:[g.jsxs("span",{className:`eval-step-kind kind-${s.isError?"error":"tool"}`,children:[g.jsx(tn,{name:"wrench",size:"sm",color:s.isError?"red":"purple"}),g.jsx("span",{className:"eval-step-kind-label",children:"Tool call"})]}),g.jsx("span",{className:"eval-step-label",children:s.toolName})]}),g.jsxs("div",{className:"eval-step-detail",children:[s.args!==void 0?g.jsxs("div",{className:"eval-step-block",children:[g.jsx("div",{className:"eval-step-block-label",children:"args"}),g.jsx("pre",{children:ma(s.args)})]}):null,s.output!==void 0?g.jsxs("div",{className:"eval-step-block",children:[g.jsx("div",{className:"eval-step-block-label",children:s.isError?"error":"result"}),g.jsx("pre",{children:typeof s.output=="string"?s.output:ma(s.output)})]}):null]})]},`tc-${a}-${s.toolName}`))]}),g.jsxs("div",{className:"eval-io-section",children:[g.jsx("div",{className:"eval-io-heading",children:"Output"}),e.finalText!==void 0&&e.finalText!==""?g.jsxs("div",{className:"eval-step-block",children:[g.jsx("div",{className:"eval-step-block-label",children:"final reply"}),g.jsx("pre",{children:e.finalText})]}):g.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?"Waiting for reply…":"No final reply"})]})]}):g.jsx("div",{className:"eval-io",children:g.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?"Waiting for inputs / outputs…":"No captured inputs or outputs."})})}function xX({c:e,batchRunning:t,customization:n}){const[r,s]=v.useState(!1),[a,l]=v.useState(!1),c=r||a,d=ZM(c),f=v.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,b=dX(e),y=e.status==="pending"?"Queued":e.status==="running"?"Running":cX[b],x=e.status==="done"?fX[b]:e.status==="running"?"accent":"neutral",S=e.sessionId!==void 0||e.status==="done"||e.status==="running",E=e.status==="done"||e.status==="running"||e.inputs!==void 0&&e.inputs.length>0||e.finalText!==void 0,T=n?.CaseMetrics,R=n?.CaseExtras;return g.jsxs("div",{className:`eval-case${r||a?" expanded":""}`,children:[g.jsxs("div",{className:"eval-case-head",children:[g.jsxs("button",{type:"button",className:"eval-id-btn",disabled:!S,"aria-expanded":r,title:S?r?"Collapse":"Expand live trace":void 0,onClick:()=>s(_=>!_),children:[g.jsx("span",{className:r?"eval-chevron open":"eval-chevron",children:g.jsx(tn,{name:"chevron-right",size:10})}),g.jsx(Zi,{variant:x,size:"sm",children:y}),g.jsx("span",{className:"eval-id",children:e.id})]}),g.jsxs("div",{className:"eval-case-actions",children:[e.durationMs!==void 0?g.jsxs("span",{className:"eval-dur",children:[(e.durationMs/1e3).toFixed(1),"s"]}):null,E?g.jsx(Cn,{variant:a?"secondary":"ghost",size:"sm",onClick:()=>l(_=>!_),title:"View eval inputs, tool results, and final output",children:"I/O"}):null,e.sessionId!==void 0?g.jsxs(g.Fragment,{children:[g.jsx(Cn,{variant:"ghost",size:"sm",onClick:()=>{nt.openEvalCaseTrace(e.sessionId)},children:"Full trace"}),g.jsx(Cn,{variant:"ghost",size:"sm",onClick:()=>{nt.openEvalCaseSession(e.sessionId)},children:"Chat"})]}):null]})]}),e.description!==void 0?g.jsx("div",{className:"eval-desc",children:e.description}):null,T!==void 0?g.jsx(T,{case:e,batchRunning:t}):g.jsx(JY,{case:e}),R!==void 0?g.jsx(R,{case:e,batchRunning:t}):null,e.error!==void 0?g.jsxs("div",{className:"eval-error",children:["error: ",e.error]}):null,e.skipReason!==void 0?g.jsxs("div",{className:"eval-desc",children:["skipped: ",e.skipReason]}):null,e.assertions!==void 0&&e.assertions.length>0?g.jsx("div",{className:"eval-assertions",children:e.assertions.map(_=>{const C=pX(_);return g.jsxs("div",{className:_.passed||_.severity==="soft"?"eval-assertion":"eval-assertion fail",children:[g.jsx("span",{className:"eval-assertion-icon",children:g.jsx(hX,{a:_})}),g.jsxs("span",{className:"eval-assertion-text",children:[g.jsx("span",{className:"eval-assertion-name",children:_.name}),C!==void 0?g.jsx("span",{className:"eval-assertion-detail",children:C}):null]})]},`${_.name}-${_.passed}-${_.detail??""}`)})}):null,e.logs!==void 0&&e.logs.length>0?g.jsx("div",{className:"eval-logs",children:e.logs.map((_,C)=>g.jsx("div",{className:"eval-log-line",children:_},`${C}:${_}`))}):null,d?g.jsxs("div",{className:c?"eval-collapse-clip":"eval-collapse-clip collapsed","aria-hidden":!c,inert:c?void 0:!0,children:[h?g.jsx(kX,{c:e}):null,m&&e.sessionId!==void 0?g.jsx(vX,{sessionId:e.sessionId,live:e.status==="running"&&t},e.sessionId):null,m&&e.sessionId===void 0?g.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"spin"})," ",Q_(e)?"Aggregating sibling cases…":"Waiting for session…"]}):Q_(e)?g.jsxs(g.Fragment,{children:["Suite summary (no agent session)",e.finalText!==void 0?g.jsx("pre",{className:"eval-final-text",children:e.finalText}):null]}):g.jsxs(g.Fragment,{children:["No session for this case",e.finalText!==void 0?g.jsx("pre",{className:"eval-final-text",children:e.finalText}):null]})}):null]}):null]})}function Q_(e){return e.id==="overall"||e.id.endsWith("/overall")||(e.tags?.includes("summary")??!1)}function YM(){const e=We(y=>y.evalRun),t=We(y=>y.evalCases),n=We(y=>y.evalConfig),r=We(y=>y.meta.name),s=We(y=>y.meta.readonly===!0),a=v.useMemo(()=>uX(r),[r]),l=e?.status==="running",c=!s&&t.length>0,d=a?.RunSummary;if(e===null)return g.jsx("div",{className:"pg-evals",children:g.jsxs("div",{className:"eval-empty",children:[g.jsx("p",{children:"No eval run selected."}),g.jsxs("p",{className:"eval-hint",children:[t.length>0?`${t.length} case${t.length===1?"":"s"} discovered.`:"No evals/ cases found for this agent.",n?.maxConcurrency!==void 0?` Concurrency: ${n.maxConcurrency}.`:""]}),c?g.jsx("p",{className:"eval-hint",children:n?.durableRuns===!0?`Runs persist via the agent/storage.ts evals table (keeps last ${n.maxPlaygroundRuns??20}).`:`Runs stay in memory only (last ${n?.maxPlaygroundRuns??20}); lost when serve exits. Add an evals table to agent/storage.ts to keep them.`}):null,c?g.jsx(Cn,{variant:"secondary",size:"sm",disabled:l,onClick:()=>{nt.startEvalRun()},children:"Run all"}):null]})});const{summary:f,status:h}=e,m=h==="failed"||h==="cancelled"?"danger":l?"accent":"success",b=h==="failed"?"Failed":h==="cancelled"?"Cancelled":l?"Running":"Completed";return g.jsxs("div",{className:"pg-evals",children:[g.jsxs("div",{className:"eval-summary",children:[g.jsx(Zi,{variant:m,size:"sm",children:b}),g.jsx("span",{className:"eval-run-id",title:"Eval ID",children:e.runId}),g.jsxs("span",{className:"eval-summary-stats",children:[g.jsxs("span",{className:"eval-summary-muted",children:[f.done,"/",f.total," done · ",f.passed," passed"]})," · ",f.failed," failed",f.scored!==void 0&&f.scored>0?g.jsxs("span",{className:"eval-summary-muted",children:[" · ",f.scored," scored"]}):null,f.skipped!==void 0&&f.skipped>0?g.jsxs("span",{className:"eval-summary-muted",children:[" · ",f.skipped," skipped"]}):null]}),d!==void 0?g.jsx(d,{run:e}):null,l?g.jsx("span",{className:"spin"}):null,e.error!==void 0?g.jsx("span",{className:"eval-error",children:e.error}):null,g.jsxs("div",{className:"eval-actions",children:[g.jsx(Cn,{variant:"ghost",size:"sm",onClick:()=>{const y=YY(e);XY(y.filename,y.text)},title:"Download this eval run's results (assertions, metrics, I/O) as JSON",children:"Download run"}),l?g.jsx(Cn,{variant:"secondary",size:"sm",onClick:()=>{nt.cancelEvalRun(e.runId)},children:"Cancel"}):null,c?g.jsx(Cn,{variant:"secondary",size:"sm",disabled:l,onClick:()=>{nt.startEvalRun()},children:"Run all"}):null]})]}),g.jsx("div",{className:"eval-case-list",children:e.cases.map(y=>g.jsx(xX,{c:y,batchRunning:l,customization:a},y.id))})]})}const J_=typeof document<"u"?v.useLayoutEffect:v.useEffect;function SX({useFlushSync:e=!0,...t}){const n=v.useReducer(()=>({}),{})[1],r={...t,onChange:(a,l)=>{var c;e&&l?zi.flushSync(n):n(),(c=t.onChange)==null||c.call(t,a,l)}},[s]=v.useState(()=>new aB(r));return s.setOptions(r),J_(()=>s._didMount(),[]),J_(()=>s._willUpdate()),s}function XM(e){return SX({observeElementRect:rB,observeElementOffset:iB,scrollToFn:oB,...e})}const QM=48;function wX(e){return e.scrollHeight-e.scrollTop-e.clientHeight}function EX(e,t=QM){return wX(e)<=t}function wy(e){e.scrollTop=e.scrollHeight}function JM(e){const{contentKey:t,latchKey:n,thresholdPx:r=QM}=e,s=v.useRef(null),a=v.useRef(!0);return v.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current=EX(l,r)};return l.addEventListener("scroll",c,{passive:!0}),()=>l.removeEventListener("scroll",c)},[r,t,n]),v.useLayoutEffect(()=>{if(n===void 0)return;a.current=!0;const l=s.current;l&&wy(l)},[n]),v.useLayoutEffect(()=>{if(!a.current)return;const l=s.current;l&&wy(l)},[t]),v.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current&&wy(l)};c();const d=new Set,f=new ResizeObserver(c),h=y=>{d.has(y)||(d.add(y),f.observe(y))},m=y=>{h(y);for(const x of y.children)m(x)};m(l);const b=new MutationObserver(y=>{for(const x of y)x.addedNodes.forEach(S=>{S instanceof Element&&m(S)});c()});return b.observe(l,{childList:!0,subtree:!0}),()=>{f.disconnect(),b.disconnect()}},[t,n]),{scrollRef:s}}function eD(){const e=We(a=>a.traceEvents),t=We(a=>a.current),n=e.length,{scrollRef:r}=JM({contentKey:n,latchKey:`${t?.sessionId??"none"}:${n}`}),s=XM({count:n,getScrollElement:()=>r.current,estimateSize:()=>18,overscan:24});return n===0?g.jsx("div",{className:"pg-raw",children:g.jsx(As,{className:"pg-empty",message:"Select a session or Open trace to see the raw event stream."})}):g.jsxs("div",{className:"pg-raw",children:[g.jsx("div",{className:"head",children:"Raw NDJSON stream"}),g.jsx("div",{className:"raw-lines",ref:r,children:g.jsx("div",{style:{height:s.getTotalSize(),position:"relative",width:"100%"},children:s.getVirtualItems().map(a=>{const l=e[a.index];return g.jsxs("div",{"data-index":a.index,ref:s.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${a.start}px)`},children:[g.jsx("span",{children:`[${l.index??a.index}] `}),g.jsx("span",{className:"etype",children:l.type}),g.jsx("span",{children:` ${Qn(l.data,240)}`})]},a.key)})})})]})}const TX={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench",artifact:"bookmark"},_X={user:"User",agent:"Assistant",think:"Thinking",tool:"Tool call",artifact:"Artifact"},RX={user:"accent",agent:"green",think:"yellow",tool:"purple",artifact:"orange"};function CX(e,t){return t?"red":RX[e]}function tD({kind:e,error:t,showLabel:n=!0}){const r=CX(e,t),s=`${_X[e]}${t?" · error":""}`;return g.jsxs("span",{className:`wf-kind kind-${t?"error":e}`,title:n?void 0:s,"aria-label":n?void 0:s,children:[g.jsx(tn,{name:TX[e],size:"sm",color:r}),n?g.jsx("span",{className:"wf-kind-label",children:s}):null]})}function NX(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 AX(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 OX(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,d=c===null||c===0,f=s*.012,h=d?f:Math.max(c,f),m=Math.max(0,Math.min(100,l/s*100)),b=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:b,instant:d}}function nD(e){return e===null?"—":e===0?"instant":Ei(e)}function Ss({label:e,value:t}){return g.jsxs("div",{children:[g.jsx("dt",{children:e}),g.jsx("dd",{title:t,children:t})]})}function IX({span:e,onClose:t}){const{row:n,turnId:r,startMs:s,trueDurMs:a,wallMs:l}=e,c=a!=null?s+a:s,d=a!=null&&a>0&&l>0?`${(a/l*100).toFixed(1)}%`:"—",f=n.body?.trim()||"",h=n.toolArgs!=null?ma(n.toolArgs):"",m=n.toolOutput!=null?ma(n.toolOutput):n.kind==="tool"&&f?f:"";return g.jsxs("aside",{className:"trace-detail","aria-label":"Span details",children:[g.jsxs("div",{className:"trace-detail-head",children:[g.jsx(tD,{kind:n.kind,error:n.error}),g.jsx(kr,{icon:"x",size:"sm",variant:"ghost","aria-label":"Close",onClick:t})]}),n.toolName?g.jsx("div",{className:"trace-detail-title",children:n.toolName}):null,n.url?g.jsx(ga,{className:"artifact-link",href:n.url,children:n.url}):null,n.kind!=="tool"&&f?g.jsx("pre",{className:"trace-detail-body",children:f}):null,n.kind!=="tool"&&!f&&n.label?g.jsx("div",{className:"trace-detail-label",children:n.label}):null,g.jsxs("dl",{className:"trace-detail-meta",children:[g.jsx(Ss,{label:"Turn",value:r}),n.error?g.jsx(Ss,{label:"Status",value:"error"}):null,g.jsx(Ss,{label:"Start +",value:Ei(s)}),g.jsx(Ss,{label:"End +",value:Ei(c)}),g.jsx(Ss,{label:"Duration",value:nD(a)}),g.jsx(Ss,{label:"% of turn",value:d}),g.jsx(Ss,{label:"Started",value:G_(n.startAt)}),g.jsx(Ss,{label:"Ended",value:G_(n.at)}),n.callId?g.jsx(Ss,{label:"Call id",value:n.callId}):null]}),h?g.jsxs("div",{className:"trace-detail-section",children:[g.jsx("div",{className:"trace-detail-section-title",children:"Args"}),g.jsx("pre",{className:"trace-detail-body",children:h})]}):null,m?g.jsxs("div",{className:"trace-detail-section",children:[g.jsx("div",{className:"trace-detail-section-title",children:n.error?"Error":"Output"}),g.jsx("pre",{className:"trace-detail-body",children:m})]}):null]})}function MX({span:e,selected:t,detailOpen:n,onSelect:r}){const{row:s}=e,a=`${s.kind}${s.error?" error":""}`,l=nD(e.trueDurMs),c=e.widthPct>=8,d=s.depth??0;return g.jsxs("button",{type:"button",className:`wf-row ${a}${t?" selected":""}${d>0?" nested":""}`,onClick:r,"aria-pressed":t,style:d>0?{paddingLeft:`${8+d*14}px`}:void 0,children:[g.jsx(tD,{kind:s.kind,error:s.error,showLabel:!n}),g.jsx("span",{className:"wf-name",title:s.label,children:d>0?`↳ ${s.label||"—"}`:s.label||"—"}),g.jsx("span",{className:"wf-track","aria-hidden":"true",children:g.jsx("span",{className:`wf-bar ${a}${e.instant?" instant":""}`,style:{left:`${e.leftPct}%`,width:`${e.widthPct}%`},children:c?g.jsx("span",{className:"wf-bar-label",children:l}):null})}),g.jsx("span",{className:"wf-dur",children:l})]})}function DX({turn:e,index:t,selectedId:n,onSelect:r}){const s=NX(e),a=AX(e,s),l=v.useMemo(()=>e.rows.map((h,m)=>OX(h,m,e.turnId,s,a)),[e,s,a]),c=v.useMemo(()=>QY(a),[a]),d=[];e.wallMs!==void 0&&d.push(`Worked for ${Ax(e.wallMs)}`),e.usage&&d.push(`in ${vh(e.usage.inputTokens)} · out ${vh(e.usage.outputTokens)}`);const f=e.cost?.totalUsd;return typeof f=="number"&&Number.isFinite(f)&&d.push(bm(f)),g.jsxs("div",{className:e.failed?"trace-turn trace-turn--failed":"trace-turn",children:[g.jsxs("div",{className:"thead",children:[g.jsxs("span",{className:"thead-title",children:["Turn ",t+1,g.jsx("code",{className:"thead-id",children:e.turnId}),e.failed?g.jsxs("span",{className:"thead-failed",children:[g.jsx(tn,{name:"x-circle",size:"sm",variant:"filled",color:"red","aria-hidden":"true"}),"Failed"]}):null]}),g.jsx("span",{className:"wall",children:d.join(" · ")||"In progress"})]}),g.jsxs("div",{className:"wf",children:[g.jsxs("div",{className:"wf-ruler","aria-hidden":"true",children:[g.jsx("span",{className:"wf-kind"}),g.jsx("span",{className:"wf-name"}),g.jsx("span",{className:"wf-track wf-ruler-track",children:c.map(h=>g.jsxs("span",{className:"wf-tick",style:{left:`${h/a*100}%`},children:[g.jsx("span",{className:"wf-tick-line"}),g.jsx("span",{className:"wf-tick-label",children:Ei(h)})]},h))}),g.jsx("span",{className:"wf-dur"})]}),l.length===0?g.jsx("div",{className:"trace-empty-turn",children:"No timed spans in this turn."}):l.map(h=>g.jsx(MX,{span:h,selected:n===h.id,detailOpen:n!=null,onSelect:()=>r(n===h.id?null:h)},h.id))]})]})}function rD(){const e=We(c=>c.traceEvents),t=We(c=>c.sessionCostUsd),n=v.useMemo(()=>WM(e),[e]),[r,s]=v.useState(null);if(!e.length)return g.jsx("div",{className:"pg-trace",children:g.jsx(As,{className:"pg-empty",message:"Select a session or Open trace to see the timeline."})});const a=t??n.totalCostUsd,l=[`${n.eventCount} events`,`${n.turns.length} turn${n.turns.length===1?"":"s"}`,`${n.totalTools} tool call${n.totalTools===1?"":"s"}`,n.failedTools?`${n.failedTools} error${n.failedTools===1?"":"s"}`:null,a!==null?`cost ${bm(a)}`:null].filter(Boolean).join(" · ");return g.jsx("div",{className:"pg-trace",children:g.jsxs("div",{className:"trace-rows",children:[g.jsx("div",{className:"trace-summary",children:l}),g.jsxs("div",{className:`trace-layout${r?" has-detail":""}`,children:[g.jsx("div",{className:"trace-main",children:n.turns.map((c,d)=>g.jsx(DX,{turn:c,index:d,selectedId:r?.id??null,onSelect:s},`${c.turnId||"turn"}-${d}`))}),r?g.jsx(IX,{span:r,onClose:()=>s(null)}):null]})]})})}function zX(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const jX=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,LX=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,PX={};function eR(e,t){return(PX.jsx?LX:jX).test(e)}const $X=/[ \t\n\f\r]/g;function BX(e){return typeof e=="object"?e.type==="text"?tR(e.value):!1:tR(e)}function tR(e){return e.replace($X,"")===""}class kf{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}kf.prototype.normal={};kf.prototype.property={};kf.prototype.space=void 0;function iD(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new kf(n,r,t)}function Lv(e){return e.toLowerCase()}class Vr{constructor(t,n){this.attribute=n,this.property=t}}Vr.prototype.attribute="";Vr.prototype.booleanish=!1;Vr.prototype.boolean=!1;Vr.prototype.commaOrSpaceSeparated=!1;Vr.prototype.commaSeparated=!1;Vr.prototype.defined=!1;Vr.prototype.mustUseProperty=!1;Vr.prototype.number=!1;Vr.prototype.overloadedBoolean=!1;Vr.prototype.property="";Vr.prototype.spaceSeparated=!1;Vr.prototype.space=void 0;let FX=0;const Mt=Ta(),Zn=Ta(),Pv=Ta(),Fe=Ta(),xn=Ta(),Il=Ta(),ii=Ta();function Ta(){return 2**++FX}const $v=Object.freeze(Object.defineProperty({__proto__:null,boolean:Mt,booleanish:Zn,commaOrSpaceSeparated:ii,commaSeparated:Il,number:Fe,overloadedBoolean:Pv,spaceSeparated:xn},Symbol.toStringTag,{value:"Module"})),Ey=Object.keys($v);class Dx extends Vr{constructor(t,n,r,s){let a=-1;if(super(t,n),nR(this,"space",s),typeof r=="number")for(;++a<Ey.length;){const l=Ey[a];nR(this,Ey[a],(r&$v[l])===$v[l])}}}Dx.prototype.defined=!0;function nR(e,t,n){n&&(e[t]=n)}function Ql(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new Dx(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Lv(r)]=r,n[Lv(a.attribute)]=r}return new kf(t,n,e.space)}const sD=Ql({properties:{ariaActiveDescendant:null,ariaAtomic:Zn,ariaAutoComplete:null,ariaBusy:Zn,ariaChecked:Zn,ariaColCount:Fe,ariaColIndex:Fe,ariaColSpan:Fe,ariaControls:xn,ariaCurrent:null,ariaDescribedBy:xn,ariaDetails:null,ariaDisabled:Zn,ariaDropEffect:xn,ariaErrorMessage:null,ariaExpanded:Zn,ariaFlowTo:xn,ariaGrabbed:Zn,ariaHasPopup:null,ariaHidden:Zn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xn,ariaLevel:Fe,ariaLive:null,ariaModal:Zn,ariaMultiLine:Zn,ariaMultiSelectable:Zn,ariaOrientation:null,ariaOwns:xn,ariaPlaceholder:null,ariaPosInSet:Fe,ariaPressed:Zn,ariaReadOnly:Zn,ariaRelevant:null,ariaRequired:Zn,ariaRoleDescription:xn,ariaRowCount:Fe,ariaRowIndex:Fe,ariaRowSpan:Fe,ariaSelected:Zn,ariaSetSize:Fe,ariaSort:null,ariaValueMax:Fe,ariaValueMin:Fe,ariaValueNow:Fe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function oD(e,t){return t in e?e[t]:t}function aD(e,t){return oD(e,t.toLowerCase())}const UX=Ql({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Il,acceptCharset:xn,accessKey:xn,action:null,allow:null,allowFullScreen:Mt,allowPaymentRequest:Mt,allowUserMedia:Mt,alt:null,as:null,async:Mt,autoCapitalize:null,autoComplete:xn,autoFocus:Mt,autoPlay:Mt,blocking:xn,capture:null,charSet:null,checked:Mt,cite:null,className:xn,cols:Fe,colSpan:null,content:null,contentEditable:Zn,controls:Mt,controlsList:xn,coords:Fe|Il,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Mt,defer:Mt,dir:null,dirName:null,disabled:Mt,download:Pv,draggable:Zn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Mt,formTarget:null,headers:xn,height:Fe,hidden:Pv,high:Fe,href:null,hrefLang:null,htmlFor:xn,httpEquiv:xn,id:null,imageSizes:null,imageSrcSet:null,inert:Mt,inputMode:null,integrity:null,is:null,isMap:Mt,itemId:null,itemProp:xn,itemRef:xn,itemScope:Mt,itemType:xn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Mt,low:Fe,manifest:null,max:null,maxLength:Fe,media:null,method:null,min:null,minLength:Fe,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:Fe,pattern:null,ping:xn,placeholder:null,playsInline:Mt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Mt,referrerPolicy:null,rel:xn,required:Mt,reversed:Mt,rows:Fe,rowSpan:Fe,sandbox:xn,scope:null,scoped:Mt,seamless:Mt,selected:Mt,shadowRootClonable:Mt,shadowRootDelegatesFocus:Mt,shadowRootMode:null,shape:null,size:Fe,sizes:null,slot:null,span:Fe,spellCheck:Zn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Fe,step:null,style:null,tabIndex:Fe,target:null,title:null,translate:null,type:null,typeMustMatch:Mt,useMap:null,value:Zn,width:Fe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xn,axis:null,background:null,bgColor:null,border:Fe,borderColor:null,bottomMargin:Fe,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:Fe,leftMargin:Fe,link:null,longDesc:null,lowSrc:null,marginHeight:Fe,marginWidth:Fe,noResize:Mt,noHref:Mt,noShade:Mt,noWrap:Mt,object:null,profile:null,prompt:null,rev:null,rightMargin:Fe,rules:null,scheme:null,scrolling:Zn,standby:null,summary:null,text:null,topMargin:Fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Fe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Mt,disableRemotePlayback:Mt,prefix:null,property:null,results:Fe,security:null,unselectable:null},space:"html",transform:aD}),qX=Ql({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:ii,accentHeight:Fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Fe,amplitude:Fe,arabicForm:null,ascent:Fe,attributeName:null,attributeType:null,azimuth:Fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Fe,by:null,calcMode:null,capHeight:Fe,className:xn,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:Fe,diffuseConstant:Fe,direction:null,display:null,dur:null,divisor:Fe,dominantBaseline:null,download:Mt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Fe,enableBackground:null,end:null,event:null,exponent:Fe,externalResourcesRequired:null,fill:null,fillOpacity:Fe,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:Il,g2:Il,glyphName:Il,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Fe,horizOriginX:Fe,horizOriginY:Fe,id:null,ideographic:Fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Fe,k:Fe,k1:Fe,k2:Fe,k3:Fe,k4:Fe,kernelMatrix:ii,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Fe,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:Fe,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:Fe,overlineThickness:Fe,paintOrder:null,panose1:null,path:null,pathLength:Fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Fe,pointsAtY:Fe,pointsAtZ:Fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ii,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ii,rev:ii,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ii,requiredFeatures:ii,requiredFonts:ii,requiredFormats:ii,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:Fe,specularExponent:Fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Fe,strikethroughThickness:Fe,string:null,stroke:null,strokeDashArray:ii,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Fe,strokeOpacity:Fe,strokeWidth:null,style:null,surfaceScale:Fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ii,tabIndex:Fe,tableValues:null,target:null,targetX:Fe,targetY:Fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ii,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Fe,underlineThickness:Fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Fe,values:null,vAlphabetic:Fe,vMathematical:Fe,vectorEffect:null,vHanging:Fe,vIdeographic:Fe,version:null,vertAdvY:Fe,vertOriginX:Fe,vertOriginY:Fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:oD}),lD=Ql({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()}}),uD=Ql({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:aD}),cD=Ql({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),HX={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"},GX=/[A-Z]/g,rR=/-[a-z]/g,VX=/^data[-\w.:]+$/i;function WX(e,t){const n=Lv(t);let r=t,s=Vr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&VX.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(rR,ZX);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!rR.test(a)){let l=a.replace(GX,KX);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}s=Dx}return new s(r,t)}function KX(e){return"-"+e.toLowerCase()}function ZX(e){return e.charAt(1).toUpperCase()}const YX=iD([sD,UX,lD,uD,cD],"html"),zx=iD([sD,qX,lD,uD,cD],"svg");function XX(e){return e.join(" ").trim()}var pl={},Ty,iR;function QX(){if(iR)return Ty;iR=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
41
|
+
`,f="/",h="*",m="",b="comment",y="declaration";Ty=function(S,E){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];E=E||{};var T=1,R=1;function _(F){var L=F.match(t);L&&(T+=L.length);var U=F.lastIndexOf(d);R=~U?F.length-U:R+F.length}function C(){var F={line:T,column:R};return function(L){return L.position=new M(F),P(),L}}function M(F){this.start=F,this.end={line:T,column:R},this.source=E.source}M.prototype.content=S;function A(F){var L=new Error(E.source+":"+T+":"+R+": "+F);if(L.reason=F,L.filename=E.source,L.line=T,L.column=R,L.source=S,!E.silent)throw L}function N(F){var L=F.exec(S);if(L){var U=L[0];return _(U),S=S.slice(U.length),L}}function P(){N(n)}function z(F){var L;for(F=F||[];L=D();)L!==!1&&F.push(L);return F}function D(){var F=C();if(!(f!=S.charAt(0)||h!=S.charAt(1))){for(var L=2;m!=S.charAt(L)&&(h!=S.charAt(L)||f!=S.charAt(L+1));)++L;if(L+=2,m===S.charAt(L-1))return A("End of comment missing");var U=S.slice(2,L-2);return R+=2,_(U),S=S.slice(L),R+=2,F({type:b,comment:U})}}function H(){var F=C(),L=N(r);if(L){if(D(),!N(s))return A("property missing ':'");var U=N(a),q=F({type:y,property:x(L[0].replace(e,m)),value:U?x(U[0].replace(e,m)):m});return N(l),q}}function W(){var F=[];z(F);for(var L;L=H();)L!==!1&&(F.push(L),z(F));return F}return P(),W()};function x(S){return S?S.replace(c,m):m}return Ty}var sR;function JX(){if(sR)return pl;sR=1;var e=pl&&pl.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pl,"__esModule",{value:!0}),pl.default=n;var t=e(QX());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(d){if(d.type==="declaration"){var f=d.property,h=d.value;c?s(f,h,d):h&&(a=a||{},a[f]=h)}}),a}return pl}var eQ=JX();const oR=ef(eQ),tQ=oR.default||oR,nQ=Object.freeze(Object.defineProperty({__proto__:null,default:tQ},Symbol.toStringTag,{value:"Module"})),rQ=u2(nQ);var ic={},aR;function iQ(){if(aR)return ic;aR=1,Object.defineProperty(ic,"__esModule",{value:!0}),ic.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,"-")},d=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 ic.camelCase=d,ic}var sc,lR;function sQ(){if(lR)return sc;lR=1;var e=sc&&sc.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(rQ),n=iQ();function r(s,a){var l={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(l[(0,n.camelCase)(c,a)]=d)}),l}return r.default=r,sc=r,sc}var oQ=sQ();const aQ=ef(oQ),fD=dD("end"),jx=dD("start");function dD(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 lQ(e){const t=jx(e),n=fD(e);if(t&&n)return{start:t,end:n}}function _c(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?uR(e.position):"start"in e||"end"in e?uR(e):"line"in e||"column"in e?Bv(e):""}function Bv(e){return cR(e&&e.line)+":"+cR(e&&e.column)}function uR(e){return Bv(e&&e.start)+"-"+Bv(e&&e.end)}function cR(e){return e&&typeof e=="number"?e:1}class xr 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 d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.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=_c(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}}xr.prototype.file="";xr.prototype.name="";xr.prototype.reason="";xr.prototype.message="";xr.prototype.stack="";xr.prototype.column=void 0;xr.prototype.line=void 0;xr.prototype.ancestors=void 0;xr.prototype.cause=void 0;xr.prototype.fatal=void 0;xr.prototype.place=void 0;xr.prototype.ruleId=void 0;xr.prototype.source=void 0;const Lx={}.hasOwnProperty,uQ=new Map,cQ=/[A-Z]/g,fQ=new Set(["table","tbody","thead","tfoot","tr"]),dQ=new Set(["td","th"]),pD="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function pQ(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=xQ(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=kQ(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"?zx:YX,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=hD(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function hD(e,t,n){if(t.type==="element")return hQ(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return mQ(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return bQ(e,t,n);if(t.type==="mdxjsEsm")return gQ(e,t);if(t.type==="root")return yQ(e,t,n);if(t.type==="text")return vQ(e,t)}function hQ(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=zx,e.schema=s),e.ancestors.push(t);const a=gD(e,t.tagName,!1),l=SQ(e,t);let c=$x(e,t);return fQ.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!BX(d):!0})),mD(e,l,a,t),Px(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function mQ(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)}Xc(e,t.position)}function gQ(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Xc(e,t.position)}function bQ(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=zx,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:gD(e,t.name,!0),l=wQ(e,t),c=$x(e,t);return mD(e,l,a,t),Px(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function yQ(e,t,n){const r={};return Px(r,$x(e,t)),e.create(t,e.Fragment,r,n)}function vQ(e,t){return t.value}function mD(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Px(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function kQ(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 xQ(e,t){return n;function n(r,s,a,l){const c=Array.isArray(a.children),d=jx(r);return t(s,a,l,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function SQ(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Lx.call(t.properties,s)){const a=EQ(e,s,t.properties[s]);if(a){const[l,c]=a;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&dQ.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 wQ(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 Xc(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 Xc(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function $x(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:uQ;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=s.get(d)||0;l=d+"-"+f,s.set(d,f+1)}}const c=hD(e,a,l);c!==void 0&&n.push(c)}return n}function EQ(e,t,n){const r=WX(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?zX(n):XX(n)),r.property==="style"){let s=typeof n=="object"?n:TQ(e,String(n));return e.stylePropertyNameCase==="css"&&(s=_Q(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?HX[r.property]||r.property:r.attribute,n]}}function TQ(e,t){try{return aQ(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new xr("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=pD+"#cannot-parse-style-attribute",s}}function gD(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=eR(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=eR(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Lx.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Xc(e)}function Xc(e,t){const n=new xr("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=pD+"#cannot-handle-mdx-estrees-without-createevaluater",n}function _Q(e){const t={};let n;for(n in e)Lx.call(e,n)&&(t[RQ(n)]=e[n]);return t}function RQ(e){let t=e.replace(cQ,CQ);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function CQ(e){return"-"+e.toLowerCase()}const _y={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"]},NQ={};function Bx(e,t){const n=NQ,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return bD(e,r,s)}function bD(e,t,n){if(AQ(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 fR(e.children,t,n)}return Array.isArray(e)?fR(e,t,n):""}function fR(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=bD(e[s],t,n);return r.join("")}function AQ(e){return!!(e&&typeof e=="object")}const dR=document.createElement("i");function Fx(e){const t="&"+e+";";dR.innerHTML=t;const n=dR.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function oi(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 yi(e,t){return e.length>0?(oi(e,e.length,0,t),e):t}const pR={}.hasOwnProperty;function yD(e){const t={};let n=-1;for(;++n<e.length;)OQ(t,e[n]);return t}function OQ(e,t){let n;for(n in t){const s=(pR.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){pR.call(s,l)||(s[l]=[]);const c=a[l];IQ(s[l],Array.isArray(c)?c:c?[c]:[])}}}function IQ(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);oi(e,0,0,r)}function vD(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 Oi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Rr=No(/[A-Za-z]/),br=No(/[\dA-Za-z]/),MQ=No(/[#-'*+\--9=?A-Z^-~]/);function xh(e){return e!==null&&(e<32||e===127)}const Fv=No(/\d/),DQ=No(/[\dA-Fa-f]/),zQ=No(/[!-/:-@[-`{-~]/);function ht(e){return e!==null&&e<-2}function yn(e){return e!==null&&(e<0||e===32)}function qt(e){return e===-2||e===-1||e===32}const xm=No(new RegExp("\\p{P}|\\p{S}","u")),ba=No(/\s/);function No(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Jl(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&br(e.charCodeAt(n+1))&&br(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 Qt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(d){return qt(d)?(e.enter(n),c(d)):t(d)}function c(d){return qt(d)&&a++<s?(e.consume(d),c):(e.exit(n),t(d))}}const jQ={tokenize:LQ};function LQ(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"),Qt(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return ht(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),l)}}const PQ={tokenize:$Q},hR={tokenize:BQ};function $Q(e){const t=this,n=[];let r=0,s,a,l;return c;function c(_){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,d,f)(_)}return f(_)}function d(_){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&R();const C=t.events.length;let M=C,A;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){A=t.events[M][1].end;break}T(r);let N=C;for(;N<t.events.length;)t.events[N][1].end={...A},N++;return oi(t.events,M+1,0,t.events.slice(C)),t.events.length=N,f(_)}return c(_)}function f(_){if(r===n.length){if(!s)return b(_);if(s.currentConstruct&&s.currentConstruct.concrete)return x(_);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(hR,h,m)(_)}function h(_){return s&&R(),T(r),b(_)}function m(_){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,x(_)}function b(_){return t.containerState={},e.attempt(hR,y,x)(_)}function y(_){return r++,n.push([t.currentConstruct,t.containerState]),b(_)}function x(_){if(_===null){s&&R(),T(0),e.consume(_);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),S(_)}function S(_){if(_===null){E(e.exit("chunkFlow"),!0),T(0),e.consume(_);return}return ht(_)?(e.consume(_),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(_),S)}function E(_,C){const M=t.sliceStream(_);if(C&&M.push(null),_.previous=a,a&&(a.next=_),a=_,s.defineSkip(_.start),s.write(M),t.parser.lazy[_.start.line]){let A=s.events.length;for(;A--;)if(s.events[A][1].start.offset<l&&(!s.events[A][1].end||s.events[A][1].end.offset>l))return;const N=t.events.length;let P=N,z,D;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(z){D=t.events[P][1].end;break}z=!0}for(T(r),A=N;A<t.events.length;)t.events[A][1].end={...D},A++;oi(t.events,P+1,0,t.events.slice(N)),t.events.length=A}}function T(_){let C=n.length;for(;C-- >_;){const M=n[C];t.containerState=M[1],M[0].exit.call(t,e)}n.length=_}function R(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function BQ(e,t,n){return Qt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ql(e){if(e===null||yn(e)||ba(e))return 1;if(xm(e))return 2}function Sm(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 Uv={name:"attention",resolveAll:FQ,tokenize:UQ};function FQ(e,t){let n=-1,r,s,a,l,c,d,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;d=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},b={...e[n][1].start};mR(m,-d),mR(b,d),l={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},a={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:d>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=yi(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=yi(f,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",a,t]]),f=yi(f,Sm(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=yi(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=yi(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,oi(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 UQ(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=ql(r);let a;return l;function l(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const f=e.exit("attentionSequence"),h=ql(d),m=!h||h===2&&s||n.includes(d),b=!s||s===2&&h||n.includes(r);return f._open=!!(a===42?m:m&&(s||!b)),f._close=!!(a===42?b:b&&(h||!m)),t(d)}}function mR(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const qQ={name:"autolink",tokenize:HQ};function HQ(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return Rr(y)?(e.consume(y),l):y===64?n(y):f(y)}function l(y){return y===43||y===45||y===46||br(y)?(r=1,c(y)):f(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||br(y))&&r++<32?(e.consume(y),c):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||xh(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),h):MQ(y)?(e.consume(y),f):n(y)}function h(y){return br(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,h):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):b(y)}function b(y){if((y===45||br(y))&&r++<63){const x=y===45?b:m;return e.consume(y),x}return n(y)}}const xf={partial:!0,tokenize:GQ};function GQ(e,t,n){return r;function r(a){return qt(a)?Qt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||ht(a)?t(a):n(a)}}const kD={continuation:{tokenize:WQ},exit:KQ,name:"blockQuote",tokenize:VQ};function VQ(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 qt(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function WQ(e,t,n){const r=this;return s;function s(l){return qt(l)?Qt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(kD,t,n)(l)}}function KQ(e){e.exit("blockQuote")}const xD={name:"characterEscape",tokenize:ZQ};function ZQ(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 zQ(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const SD={name:"characterReference",tokenize:YQ};function YQ(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"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,l=br,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=DQ,h):(e.enter("characterReferenceValue"),a=7,l=Fv,h(m))}function h(m){if(m===59&&s){const b=e.exit("characterReferenceValue");return l===br&&!Fx(r.sliceSerialize(b))?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 gR={partial:!0,tokenize:QQ},bR={concrete:!0,name:"codeFenced",tokenize:XQ};function XQ(e,t,n){const r=this,s={partial:!0,tokenize:M};let a=0,l=0,c;return d;function d(A){return f(A)}function f(A){const N=r.events[r.events.length-1];return a=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,c=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(A)}function h(A){return A===c?(l++,e.consume(A),h):l<3?n(A):(e.exit("codeFencedFenceSequence"),qt(A)?Qt(e,m,"whitespace")(A):m(A))}function m(A){return A===null||ht(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(gR,S,C)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===null||ht(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(A)):qt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Qt(e,y,"whitespace")(A)):A===96&&A===c?n(A):(e.consume(A),b)}function y(A){return A===null||ht(A)?m(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(A))}function x(A){return A===null||ht(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(A)):A===96&&A===c?n(A):(e.consume(A),x)}function S(A){return e.attempt(s,C,E)(A)}function E(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),T}function T(A){return a>0&&qt(A)?Qt(e,R,"linePrefix",a+1)(A):R(A)}function R(A){return A===null||ht(A)?e.check(gR,S,C)(A):(e.enter("codeFlowValue"),_(A))}function _(A){return A===null||ht(A)?(e.exit("codeFlowValue"),R(A)):(e.consume(A),_)}function C(A){return e.exit("codeFenced"),t(A)}function M(A,N,P){let z=0;return D;function D(U){return A.enter("lineEnding"),A.consume(U),A.exit("lineEnding"),H}function H(U){return A.enter("codeFencedFence"),qt(U)?Qt(A,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):W(U)}function W(U){return U===c?(A.enter("codeFencedFenceSequence"),F(U)):P(U)}function F(U){return U===c?(z++,A.consume(U),F):z>=l?(A.exit("codeFencedFenceSequence"),qt(U)?Qt(A,L,"whitespace")(U):L(U)):P(U)}function L(U){return U===null||ht(U)?(A.exit("codeFencedFence"),N(U)):P(U)}}}function QQ(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 Ry={name:"codeIndented",tokenize:eJ},JQ={partial:!0,tokenize:tJ};function eJ(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),Qt(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?d(f):ht(f)?e.attempt(JQ,l,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||ht(f)?(e.exit("codeFlowValue"),l(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function tJ(e,t,n){const r=this;return s;function s(l){return r.parser.lazy[r.now().line]?n(l):ht(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):Qt(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):ht(l)?s(l):n(l)}}const nJ={name:"codeText",previous:iJ,resolve:rJ,tokenize:sJ};function rJ(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 iJ(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function sJ(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"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),s=0,h(m)):ht(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||ht(m)?(e.exit("codeTextData"),d(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 oJ{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&&oc(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),oc(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),oc(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);oc(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);oc(this.left,n.reverse())}}}function oc(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 wD(e){const t={};let n=-1,r,s,a,l,c,d,f;const h=new oJ(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"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,aJ(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 oi(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function aJ(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,d=[],f={};let h,m,b=-1,y=n,x=0,S=0;const E=[S];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(h=r.sliceStream(y),y.next||h.push(null),m&&l.defineSkip(y.start),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(h),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(S=b+1,E.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(l.events=[],y?(y._tokenizer=void 0,y.previous=void 0):E.pop(),b=E.length;b--;){const T=c.slice(E[b],E[b+1]),R=a.pop();d.push([R,R+T.length-1]),e.splice(R,2,T)}for(d.reverse(),b=-1;++b<d.length;)f[x+d[b][0]]=x+d[b][1],x+=d[b][1]-d[b][0]-1;return f}const lJ={resolve:cJ,tokenize:fJ},uJ={partial:!0,tokenize:dJ};function cJ(e){return wD(e),e}function fJ(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):ht(c)?e.check(uJ,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 dJ(e,t,n){const r=this;return s;function s(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Qt(e,a,"linePrefix")}function a(l){if(l===null||ht(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 ED(e,t,n,r,s,a,l,c,d){const f=d||Number.POSITIVE_INFINITY;let h=0;return m;function m(T){return T===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(T),e.exit(a),b):T===null||T===32||T===41||xh(T)?n(T):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(T))}function b(T){return T===62?(e.enter(a),e.consume(T),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(T))}function y(T){return T===62?(e.exit("chunkString"),e.exit(c),b(T)):T===null||T===60||ht(T)?n(T):(e.consume(T),T===92?x:y)}function x(T){return T===60||T===62||T===92?(e.consume(T),y):y(T)}function S(T){return!h&&(T===null||T===41||yn(T))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(T)):h<f&&T===40?(e.consume(T),h++,S):T===41?(e.consume(T),h--,S):T===null||T===32||T===40||xh(T)?n(T):(e.consume(T),T===92?E:S)}function E(T){return T===40||T===41||T===92?(e.consume(T),S):S(T)}}function TD(e,t,n,r,s,a){const l=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),h}function h(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(y):y===93?(e.exit(a),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):ht(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||ht(y)||c++>999?(e.exit("chunkString"),h(y)):(e.consume(y),d||(d=!qt(y)),y===92?b:m)}function b(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function _D(e,t,n,r,s,a){let l;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(s),e.consume(b),e.exit(s),l=b===40?41:b,d):n(b)}function d(b){return b===l?(e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):(e.enter(a),f(b))}function f(b){return b===l?(e.exit(a),d(l)):b===null?n(b):ht(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Qt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===l||b===null||ht(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?m:h)}function m(b){return b===l||b===92?(e.consume(b),h):h(b)}}function Rc(e,t){let n;return r;function r(s){return ht(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):qt(s)?Qt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const pJ={name:"definition",tokenize:mJ},hJ={partial:!0,tokenize:gJ};function mJ(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),l(y)}function l(y){return TD.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=Oi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return yn(y)?Rc(e,f)(y):f(y)}function f(y){return ED(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function h(y){return e.attempt(hJ,m,m)(y)}function m(y){return qt(y)?Qt(e,b,"whitespace")(y):b(y)}function b(y){return y===null||ht(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function gJ(e,t,n){return r;function r(c){return yn(c)?Rc(e,s)(c):n(c)}function s(c){return _D(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return qt(c)?Qt(e,l,"whitespace")(c):l(c)}function l(c){return c===null||ht(c)?t(c):n(c)}}const bJ={name:"hardBreakEscape",tokenize:yJ};function yJ(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return ht(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const vJ={name:"headingAtx",resolve:kJ,tokenize:xJ};function kJ(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"},oi(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function xJ(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||yn(h)?(e.exit("atxHeadingSequence"),c(h)):n(h)}function c(h){return h===35?(e.enter("atxHeadingSequence"),d(h)):h===null||ht(h)?(e.exit("atxHeading"),t(h)):qt(h)?Qt(e,c,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function d(h){return h===35?(e.consume(h),d):(e.exit("atxHeadingSequence"),c(h))}function f(h){return h===null||h===35||yn(h)?(e.exit("atxHeadingText"),c(h)):(e.consume(h),f)}}const SJ=["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"],yR=["pre","script","style","textarea"],wJ={concrete:!0,name:"htmlFlow",resolveTo:_J,tokenize:RJ},EJ={partial:!0,tokenize:NJ},TJ={partial:!0,tokenize:CJ};function _J(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 RJ(e,t,n){const r=this;let s,a,l,c,d;return f;function f(j){return h(j)}function h(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),m}function m(j){return j===33?(e.consume(j),b):j===47?(e.consume(j),a=!0,S):j===63?(e.consume(j),s=3,r.interrupt?t:O):Rr(j)?(e.consume(j),l=String.fromCharCode(j),E):n(j)}function b(j){return j===45?(e.consume(j),s=2,y):j===91?(e.consume(j),s=5,c=0,x):Rr(j)?(e.consume(j),s=4,r.interrupt?t:O):n(j)}function y(j){return j===45?(e.consume(j),r.interrupt?t:O):n(j)}function x(j){const X="CDATA[";return j===X.charCodeAt(c++)?(e.consume(j),c===X.length?r.interrupt?t:W:x):n(j)}function S(j){return Rr(j)?(e.consume(j),l=String.fromCharCode(j),E):n(j)}function E(j){if(j===null||j===47||j===62||yn(j)){const X=j===47,se=l.toLowerCase();return!X&&!a&&yR.includes(se)?(s=1,r.interrupt?t(j):W(j)):SJ.includes(l.toLowerCase())?(s=6,X?(e.consume(j),T):r.interrupt?t(j):W(j)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(j):a?R(j):_(j))}return j===45||br(j)?(e.consume(j),l+=String.fromCharCode(j),E):n(j)}function T(j){return j===62?(e.consume(j),r.interrupt?t:W):n(j)}function R(j){return qt(j)?(e.consume(j),R):D(j)}function _(j){return j===47?(e.consume(j),D):j===58||j===95||Rr(j)?(e.consume(j),C):qt(j)?(e.consume(j),_):D(j)}function C(j){return j===45||j===46||j===58||j===95||br(j)?(e.consume(j),C):M(j)}function M(j){return j===61?(e.consume(j),A):qt(j)?(e.consume(j),M):_(j)}function A(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),d=j,N):qt(j)?(e.consume(j),A):P(j)}function N(j){return j===d?(e.consume(j),d=null,z):j===null||ht(j)?n(j):(e.consume(j),N)}function P(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||yn(j)?M(j):(e.consume(j),P)}function z(j){return j===47||j===62||qt(j)?_(j):n(j)}function D(j){return j===62?(e.consume(j),H):n(j)}function H(j){return j===null||ht(j)?W(j):qt(j)?(e.consume(j),H):n(j)}function W(j){return j===45&&s===2?(e.consume(j),q):j===60&&s===1?(e.consume(j),Z):j===62&&s===4?(e.consume(j),$):j===63&&s===3?(e.consume(j),O):j===93&&s===5?(e.consume(j),K):ht(j)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(EJ,V,F)(j)):j===null||ht(j)?(e.exit("htmlFlowData"),F(j)):(e.consume(j),W)}function F(j){return e.check(TJ,L,V)(j)}function L(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),U}function U(j){return j===null||ht(j)?F(j):(e.enter("htmlFlowData"),W(j))}function q(j){return j===45?(e.consume(j),O):W(j)}function Z(j){return j===47?(e.consume(j),l="",B):W(j)}function B(j){if(j===62){const X=l.toLowerCase();return yR.includes(X)?(e.consume(j),$):W(j)}return Rr(j)&&l.length<8?(e.consume(j),l+=String.fromCharCode(j),B):W(j)}function K(j){return j===93?(e.consume(j),O):W(j)}function O(j){return j===62?(e.consume(j),$):j===45&&s===2?(e.consume(j),O):W(j)}function $(j){return j===null||ht(j)?(e.exit("htmlFlowData"),V(j)):(e.consume(j),$)}function V(j){return e.exit("htmlFlow"),t(j)}}function CJ(e,t,n){const r=this;return s;function s(l){return ht(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 NJ(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(xf,t,n)}}const AJ={name:"htmlText",tokenize:OJ};function OJ(e,t,n){const r=this;let s,a,l;return c;function c(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),d}function d(O){return O===33?(e.consume(O),f):O===47?(e.consume(O),M):O===63?(e.consume(O),_):Rr(O)?(e.consume(O),P):n(O)}function f(O){return O===45?(e.consume(O),h):O===91?(e.consume(O),a=0,x):Rr(O)?(e.consume(O),R):n(O)}function h(O){return O===45?(e.consume(O),y):n(O)}function m(O){return O===null?n(O):O===45?(e.consume(O),b):ht(O)?(l=m,Z(O)):(e.consume(O),m)}function b(O){return O===45?(e.consume(O),y):m(O)}function y(O){return O===62?q(O):O===45?b(O):m(O)}function x(O){const $="CDATA[";return O===$.charCodeAt(a++)?(e.consume(O),a===$.length?S:x):n(O)}function S(O){return O===null?n(O):O===93?(e.consume(O),E):ht(O)?(l=S,Z(O)):(e.consume(O),S)}function E(O){return O===93?(e.consume(O),T):S(O)}function T(O){return O===62?q(O):O===93?(e.consume(O),T):S(O)}function R(O){return O===null||O===62?q(O):ht(O)?(l=R,Z(O)):(e.consume(O),R)}function _(O){return O===null?n(O):O===63?(e.consume(O),C):ht(O)?(l=_,Z(O)):(e.consume(O),_)}function C(O){return O===62?q(O):_(O)}function M(O){return Rr(O)?(e.consume(O),A):n(O)}function A(O){return O===45||br(O)?(e.consume(O),A):N(O)}function N(O){return ht(O)?(l=N,Z(O)):qt(O)?(e.consume(O),N):q(O)}function P(O){return O===45||br(O)?(e.consume(O),P):O===47||O===62||yn(O)?z(O):n(O)}function z(O){return O===47?(e.consume(O),q):O===58||O===95||Rr(O)?(e.consume(O),D):ht(O)?(l=z,Z(O)):qt(O)?(e.consume(O),z):q(O)}function D(O){return O===45||O===46||O===58||O===95||br(O)?(e.consume(O),D):H(O)}function H(O){return O===61?(e.consume(O),W):ht(O)?(l=H,Z(O)):qt(O)?(e.consume(O),H):z(O)}function W(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),s=O,F):ht(O)?(l=W,Z(O)):qt(O)?(e.consume(O),W):(e.consume(O),L)}function F(O){return O===s?(e.consume(O),s=void 0,U):O===null?n(O):ht(O)?(l=F,Z(O)):(e.consume(O),F)}function L(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||yn(O)?z(O):(e.consume(O),L)}function U(O){return O===47||O===62||yn(O)?z(O):n(O)}function q(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function Z(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),B}function B(O){return qt(O)?Qt(e,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):K(O)}function K(O){return e.enter("htmlTextData"),l(O)}}const Ux={name:"labelEnd",resolveAll:zJ,resolveTo:jJ,tokenize:LJ},IJ={tokenize:PJ},MJ={tokenize:$J},DJ={tokenize:BJ};function zJ(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&&oi(e,0,e.length,n),e}function jJ(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 d={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",d,t],["enter",f,t]],c=yi(c,e.slice(a+1,a+r+3)),c=yi(c,[["enter",h,t]]),c=yi(c,Sm(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),c=yi(c,[["exit",h,t],e[l-2],e[l-1],["exit",f,t]]),c=yi(c,e.slice(l+1)),c=yi(c,[["exit",d,t]]),oi(e,a,e.length,c),e}function LJ(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(b){return a?a._inactive?m(b):(l=r.parser.defined.includes(Oi(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(IJ,h,l?h:m)(b):b===91?e.attempt(MJ,h,l?f:m)(b):l?h(b):m(b)}function f(b){return e.attempt(DJ,h,m)(b)}function h(b){return t(b)}function m(b){return a._balanced=!0,n(b)}}function PJ(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 yn(m)?Rc(e,a)(m):a(m)}function a(m){return m===41?h(m):ED(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return yn(m)?Rc(e,d)(m):h(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?_D(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):h(m)}function f(m){return yn(m)?Rc(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 $J(e,t,n){const r=this;return s;function s(c){return TD.call(r,e,a,l,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(Oi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function BJ(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 FJ={name:"labelStartImage",resolveAll:Ux.resolveAll,tokenize:UJ};function UJ(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 qJ={name:"labelStartLink",resolveAll:Ux.resolveAll,tokenize:HJ};function HJ(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 Cy={name:"lineEnding",tokenize:GJ};function GJ(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Qt(e,t,"linePrefix")}}const zp={name:"thematicBreak",tokenize:VJ};function VJ(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"),d(f)):r>=3&&(f===null||ht(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),qt(f)?Qt(e,c,"whitespace")(f):c(f))}}const Pr={continuation:{tokenize:YJ},exit:QJ,name:"list",tokenize:ZJ},WJ={partial:!0,tokenize:JJ},KJ={partial:!0,tokenize:XJ};function ZJ(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(y){const x=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Fv(y)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(zp,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return Fv(y)&&++l<10?(e.consume(y),d):(!r.interrupt||l<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(xf,r.interrupt?n:h,e.attempt(WJ,b,m))}function h(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function m(y){return qt(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),b):n(y)}function b(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function YJ(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(xf,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Qt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!qt(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(KJ,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Qt(e,e.attempt(Pr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function XJ(e,t,n){const r=this;return Qt(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 QJ(e){e.exit(this.containerState.type)}function JJ(e,t,n){const r=this;return Qt(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!qt(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const vR={name:"setextUnderline",resolveTo:eee,tokenize:tee};function eee(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 tee(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"),qt(f)?Qt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||ht(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const nee={tokenize:ree};function ree(e){const t=this,n=e.attempt(xf,r,e.attempt(this.parser.constructs.flowInitial,s,Qt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(lJ,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 iee={resolveAll:CD()},see=RD("string"),oee=RD("text");function RD(e){return{resolveAll:CD(e==="text"?aee: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),d}function d(h){return f(h)?(n.exit("data"),a(h)):(n.consume(h),d)}function f(h){if(h===null)return!0;const m=s[h];let b=-1;if(m)for(;++b<m.length;){const y=m[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function CD(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 aee(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,d;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)d=!0,c++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||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 lee={42:Pr,43:Pr,45:Pr,48:Pr,49:Pr,50:Pr,51:Pr,52:Pr,53:Pr,54:Pr,55:Pr,56:Pr,57:Pr,62:kD},uee={91:pJ},cee={[-2]:Ry,[-1]:Ry,32:Ry},fee={35:vJ,42:zp,45:[vR,zp],60:wJ,61:vR,95:zp,96:bR,126:bR},dee={38:SD,92:xD},pee={[-5]:Cy,[-4]:Cy,[-3]:Cy,33:FJ,38:SD,42:Uv,60:[qQ,AJ],91:qJ,92:[bJ,xD],93:Ux,95:Uv,96:nJ},hee={null:[Uv,iee]},mee={null:[42,95]},gee={null:[]},bee=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:mee,contentInitial:uee,disable:gee,document:lee,flow:fee,flowInitial:cee,insideSpan:hee,string:dee,text:pee},Symbol.toStringTag,{value:"Module"}));function yee(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 d={attempt:N(M),check:N(A),consume:R,enter:_,exit:C,interrupt:N(A,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,events:[],now:x,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:m};let h=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(H){return l=yi(l,H),E(),l[l.length-1]!==null?[]:(P(t,0),f.events=Sm(a,f.events,f),f.events)}function b(H,W){return kee(y(H),W)}function y(H){return vee(l,H)}function x(){const{_bufferIndex:H,_index:W,line:F,column:L,offset:U}=r;return{_bufferIndex:H,_index:W,line:F,column:L,offset:U}}function S(H){s[H.line]=H.column,D()}function E(){let H;for(;r._index<l.length;){const W=l[r._index];if(typeof W=="string")for(H=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===H&&r._bufferIndex<W.length;)T(W.charCodeAt(r._bufferIndex));else T(W)}}function T(H){h=h(H)}function R(H){ht(H)?(r.line++,r.column=1,r.offset+=H===-3?2:1,D()):H!==-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=H}function _(H,W){const F=W||{};return F.type=H,F.start=x(),f.events.push(["enter",F,f]),c.push(F),F}function C(H){const W=c.pop();return W.end=x(),f.events.push(["exit",W,f]),W}function M(H,W){P(H,W.from)}function A(H,W){W.restore()}function N(H,W){return F;function F(L,U,q){let Z,B,K,O;return Array.isArray(L)?V(L):"tokenize"in L?V([L]):$(L);function $(re){return oe;function oe(ue){const ce=ue!==null&&re[ue],ge=ue!==null&&re.null,Ce=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(ge)?ge:ge?[ge]:[]];return V(Ce)(ue)}}function V(re){return Z=re,B=0,re.length===0?q:j(re[B])}function j(re){return oe;function oe(ue){return O=z(),K=re,re.partial||(f.currentConstruct=re),re.name&&f.parser.constructs.disable.null.includes(re.name)?se():re.tokenize.call(W?Object.assign(Object.create(f),W):f,d,X,se)(ue)}}function X(re){return H(K,O),U}function se(re){return O.restore(),++B<Z.length?j(Z[B]):q}}}function P(H,W){H.resolveAll&&!a.includes(H)&&a.push(H),H.resolve&&oi(f.events,W,f.events.length-W,H.resolve(f.events.slice(W),f)),H.resolveTo&&(f.events=H.resolveTo(f.events,f))}function z(){const H=x(),W=f.previous,F=f.currentConstruct,L=f.events.length,U=Array.from(c);return{from:L,restore:q};function q(){r=H,f.previous=W,f.currentConstruct=F,f.events.length=L,c=U,D()}}function D(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function vee(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 kee(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 xee(e){const r={constructs:yD([bee,...(e||{}).extensions||[]]),content:s(jQ),defined:[],document:s(PQ),flow:s(nee),lazy:{},string:s(see),text:s(oee)};return r;function s(a){return l;function l(c){return yee(r,a,c)}}}function See(e){for(;!wD(e););return e}const kR=/[\0\t\n\r]/g;function wee(){let e=1,t="",n=!0,r;return s;function s(a,l,c){const d=[];let f,h,m,b,y;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(kR.lastIndex=m,f=kR.exec(a),b=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(b),!f){t=a.slice(m);break}if(y===10&&m===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<b&&(d.push(a.slice(m,b)),e+=b-m),y){case 0:{d.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,d.push(-2);e++<h;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=b+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const Eee=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Tee(e){return e.replace(Eee,_ee)}function _ee(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return vD(n.slice(a?2:1),a?16:10)}return Fx(n)||e}const ND={}.hasOwnProperty;function Ree(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Cee(n)(See(xee(n).document().write(wee()(e,t,!0))))}function Cee(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ie),autolinkProtocol:z,autolinkEmail:z,atxHeading:a(Ae),blockQuote:a(ge),characterEscape:z,characterReference:z,codeFenced:a(Ce),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(Ce,l),codeText:a(ae,l),codeTextData:z,data:z,codeFlowValue:z,definition:a(ye),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(we),hardBreakEscape:a(Ee),hardBreakTrailing:a(Ee),htmlFlow:a(xe,l),htmlFlowData:z,htmlText:a(xe,l),htmlTextData:z,image:a(De),label:l,link:a(Ie),listItem:a(Ue),listItemValue:b,listOrdered:a(je,m),listUnordered:a(je),paragraph:a(ke),reference:j,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(Ae),strong:a(Te),thematicBreak:a(fe)},exit:{atxHeading:d(),atxHeadingSequence:M,autolink:d(),autolinkEmail:ce,autolinkProtocol:ue,blockQuote:d(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:se,characterReferenceMarkerNumeric:se,characterReferenceValue:re,characterReference:oe,codeFenced:d(E),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:D,codeIndented:d(T),codeText:d(U),codeTextData:D,data:D,definition:d(),definitionDestinationString:C,definitionLabelString:R,definitionTitleString:_,emphasis:d(),hardBreakEscape:d(W),hardBreakTrailing:d(W),htmlFlow:d(F),htmlFlowData:D,htmlText:d(L),htmlTextData:D,image:d(Z),label:K,labelText:B,lineEnding:H,link:d(q),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:X,resourceDestinationString:O,resourceTitleString:$,resource:V,setextHeading:d(P),setextHeadingLineSequence:N,setextHeadingText:A,strong:d(),thematicBreak:d()}};AD(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let ne={type:"root",children:[]};const be={stack:[ne],tokenStack:[],config:t,enter:c,exit:f,buffer:l,resume:h,data:n},Ge=[];let Ze=-1;for(;++Ze<J.length;)if(J[Ze][1].type==="listOrdered"||J[Ze][1].type==="listUnordered")if(J[Ze][0]==="enter")Ge.push(Ze);else{const Xe=Ge.pop();Ze=s(J,Xe,Ze)}for(Ze=-1;++Ze<J.length;){const Xe=t[J[Ze][0]];ND.call(Xe,J[Ze][1].type)&&Xe[J[Ze][1].type].call(Object.assign({sliceSerialize:J[Ze][2].sliceSerialize},be),J[Ze][1])}if(be.tokenStack.length>0){const Xe=be.tokenStack[be.tokenStack.length-1];(Xe[1]||xR).call(be,void 0,Xe[0])}for(ne.position={start:uo(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:uo(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ze=-1;++Ze<t.transforms.length;)ne=t.transforms[Ze](ne)||ne;return ne}function s(J,ne,be){let Ge=ne-1,Ze=-1,Xe=!1,vt,Je,mt,Tt;for(;++Ge<=be;){const st=J[Ge];switch(st[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{st[0]==="enter"?Ze++:Ze--,Tt=void 0;break}case"lineEndingBlank":{st[0]==="enter"&&(vt&&!Tt&&!Ze&&!mt&&(mt=Ge),Tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tt=void 0}if(!Ze&&st[0]==="enter"&&st[1].type==="listItemPrefix"||Ze===-1&&st[0]==="exit"&&(st[1].type==="listUnordered"||st[1].type==="listOrdered")){if(vt){let _t=Ge;for(Je=void 0;_t--;){const Ot=J[_t];if(Ot[1].type==="lineEnding"||Ot[1].type==="lineEndingBlank"){if(Ot[0]==="exit")continue;Je&&(J[Je][1].type="lineEndingBlank",Xe=!0),Ot[1].type="lineEnding",Je=_t}else if(!(Ot[1].type==="linePrefix"||Ot[1].type==="blockQuotePrefix"||Ot[1].type==="blockQuotePrefixWhitespace"||Ot[1].type==="blockQuoteMarker"||Ot[1].type==="listItemIndent"))break}mt&&(!Je||mt<Je)&&(vt._spread=!0),vt.end=Object.assign({},Je?J[Je][1].start:st[1].end),J.splice(Je||Ge,0,["exit",vt,st[2]]),Ge++,be++}if(st[1].type==="listItemPrefix"){const _t={type:"listItem",_spread:!1,start:Object.assign({},st[1].start),end:void 0};vt=_t,J.splice(Ge,0,["enter",_t,st[2]]),Ge++,be++,mt=void 0,Tt=!0}}}return J[ne][1]._spread=Xe,be}function a(J,ne){return be;function be(Ge){c.call(this,J(Ge),Ge),ne&&ne.call(this,Ge)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(J,ne,be){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ne,be||void 0]),J.position={start:uo(ne.start),end:void 0}}function d(J){return ne;function ne(be){J&&J.call(this,be),f.call(this,be)}}function f(J,ne){const be=this.stack.pop(),Ge=this.tokenStack.pop();if(Ge)Ge[0].type!==J.type&&(ne?ne.call(this,J,Ge[0]):(Ge[1]||xR).call(this,J,Ge[0]));else throw new Error("Cannot close `"+J.type+"` ("+_c({start:J.start,end:J.end})+"): it’s not open");be.position.end=uo(J.end)}function h(){return Bx(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function b(J){if(this.data.expectingFirstListItemValue){const ne=this.stack[this.stack.length-2];ne.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function y(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.lang=J}function x(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.meta=J}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function T(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.value=J.replace(/(\r?\n|\r)$/g,"")}function R(J){const ne=this.resume(),be=this.stack[this.stack.length-1];be.label=ne,be.identifier=Oi(this.sliceSerialize(J)).toLowerCase()}function _(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.title=J}function C(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.url=J}function M(J){const ne=this.stack[this.stack.length-1];if(!ne.depth){const be=this.sliceSerialize(J).length;ne.depth=be}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function N(J){const ne=this.stack[this.stack.length-1];ne.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function z(J){const be=this.stack[this.stack.length-1].children;let Ge=be[be.length-1];(!Ge||Ge.type!=="text")&&(Ge=te(),Ge.position={start:uo(J.start),end:void 0},be.push(Ge)),this.stack.push(Ge)}function D(J){const ne=this.stack.pop();ne.value+=this.sliceSerialize(J),ne.position.end=uo(J.end)}function H(J){const ne=this.stack[this.stack.length-1];if(this.data.atHardBreak){const be=ne.children[ne.children.length-1];be.position.end=uo(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ne.type)&&(z.call(this,J),D.call(this,J))}function W(){this.data.atHardBreak=!0}function F(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.value=J}function L(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.value=J}function U(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.value=J}function q(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ne,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function Z(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ne,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function B(J){const ne=this.sliceSerialize(J),be=this.stack[this.stack.length-2];be.label=Tee(ne),be.identifier=Oi(ne).toLowerCase()}function K(){const J=this.stack[this.stack.length-1],ne=this.resume(),be=this.stack[this.stack.length-1];if(this.data.inReference=!0,be.type==="link"){const Ge=J.children;be.children=Ge}else be.alt=ne}function O(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.url=J}function $(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.title=J}function V(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function X(J){const ne=this.resume(),be=this.stack[this.stack.length-1];be.label=ne,be.identifier=Oi(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function se(J){this.data.characterReferenceType=J.type}function re(J){const ne=this.sliceSerialize(J),be=this.data.characterReferenceType;let Ge;be?(Ge=vD(ne,be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ge=Fx(ne);const Ze=this.stack[this.stack.length-1];Ze.value+=Ge}function oe(J){const ne=this.stack.pop();ne.position.end=uo(J.end)}function ue(J){D.call(this,J);const ne=this.stack[this.stack.length-1];ne.url=this.sliceSerialize(J)}function ce(J){D.call(this,J);const ne=this.stack[this.stack.length-1];ne.url="mailto:"+this.sliceSerialize(J)}function ge(){return{type:"blockquote",children:[]}}function Ce(){return{type:"code",lang:null,meta:null,value:""}}function ae(){return{type:"inlineCode",value:""}}function ye(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function we(){return{type:"emphasis",children:[]}}function Ae(){return{type:"heading",depth:0,children:[]}}function Ee(){return{type:"break"}}function xe(){return{type:"html",value:""}}function De(){return{type:"image",title:null,url:"",alt:null}}function Ie(){return{type:"link",title:null,url:"",children:[]}}function je(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function Ue(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function ke(){return{type:"paragraph",children:[]}}function Te(){return{type:"strong",children:[]}}function te(){return{type:"text",value:""}}function fe(){return{type:"thematicBreak"}}}function uo(e){return{line:e.line,column:e.column,offset:e.offset}}function AD(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?AD(e,r):Nee(e,r)}}function Nee(e,t){let n;for(n in t)if(ND.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 xR(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+_c({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+_c({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+_c({start:t.start,end:t.end})+") is still open")}function Aee(e){const t=this;t.parser=n;function n(r){return Ree(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Oee(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 Iee(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
44
|
+
`}]}function Mee(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 Dee(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zee(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jee(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Jl(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 d={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,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function Lee(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 Pee(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function OD(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 $ee(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return OD(e,t);const s={src:Jl(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 Bee(e,t){const n={src:Jl(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 Fee(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 Uee(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return OD(e,t);const s={href:Jl(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 qee(e,t){const n={href:Jl(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 Hee(e,t,n){const r=e.all(t),s=n?Gee(n):ID(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 d=r[r.length-1];d&&(s||d.type!=="element"||d.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 Gee(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=ID(n[r])}return t}function ID(e){const t=e.spread;return t??e.children.length>1}function Vee(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 Wee(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Kee(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Zee(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Yee(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=jx(t.children[1]),d=fD(t.children[t.children.length-1]);c&&d&&(l.position={start:c,end:d}),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 Xee(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 d=-1;const f=[];for(;++d<c;){const m=t.children[d],b={},y=l?l[d]:void 0;y&&(b.align=y);let x={type:"element",tagName:a,properties:b,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 Qee(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const SR=9,wR=32;function Jee(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(ER(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(ER(t.slice(s),s>0,!1)),a.join("")}function ER(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===SR||a===wR;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===SR||a===wR;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function ete(e,t){const n={type:"text",value:Jee(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function tte(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const nte={blockquote:Oee,break:Iee,code:Mee,delete:Dee,emphasis:zee,footnoteReference:jee,heading:Lee,html:Pee,imageReference:$ee,image:Bee,inlineCode:Fee,linkReference:Uee,link:qee,listItem:Hee,list:Vee,paragraph:Wee,root:Kee,strong:Zee,table:Yee,tableCell:Qee,tableRow:Xee,text:ete,thematicBreak:tte,toml:pp,yaml:pp,definition:pp,footnoteDefinition:pp};function pp(){}const MD=-1,wm=0,Cc=1,Sh=2,qx=3,Hx=4,Gx=5,Vx=6,DD=7,zD=8,TR=typeof self=="object"?self:globalThis,rte=(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 wm:case MD:return n(l,s);case Cc:{const c=n([],s);for(const d of l)c.push(r(d));return c}case Sh:{const c=n({},s);for(const[d,f]of l)c[r(d)]=r(f);return c}case qx:return n(new Date(l),s);case Hx:{const{source:c,flags:d}=l;return n(new RegExp(c,d),s)}case Gx:{const c=n(new Map,s);for(const[d,f]of l)c.set(r(d),r(f));return c}case Vx:{const c=n(new Set,s);for(const d of l)c.add(r(d));return c}case DD:{const{name:c,message:d}=l;return n(new TR[c](d),s)}case zD: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 TR[a](l),s)};return r},_R=e=>rte(new Map,e)(0),hl="",{toString:ite}={},{keys:ste}=Object,ac=e=>{const t=typeof e;if(t!=="object"||!e)return[wm,t];const n=ite.call(e).slice(8,-1);switch(n){case"Array":return[Cc,hl];case"Object":return[Sh,hl];case"Date":return[qx,hl];case"RegExp":return[Hx,hl];case"Map":return[Gx,hl];case"Set":return[Vx,hl];case"DataView":return[Cc,n]}return n.includes("Array")?[Cc,n]:n.includes("Error")?[DD,n]:[Sh,n]},hp=([e,t])=>e===wm&&(t==="function"||t==="symbol"),ote=(e,t,n,r)=>{const s=(l,c)=>{const d=r.push(l)-1;return n.set(c,d),d},a=l=>{if(n.has(l))return n.get(l);let[c,d]=ac(l);switch(c){case wm:{let h=l;switch(d){case"bigint":c=zD,h=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);h=null;break;case"undefined":return s([MD],l)}return s([c,h],l)}case Cc:{if(d){let b=l;return d==="DataView"?b=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(l)),s([d,[...b]],l)}const h=[],m=s([c,h],l);for(const b of l)h.push(a(b));return m}case Sh:{if(d)switch(d){case"BigInt":return s([d,l.toString()],l);case"Boolean":case"Number":case"String":return s([d,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const h=[],m=s([c,h],l);for(const b of ste(l))(e||!hp(ac(l[b])))&&h.push([a(b),a(l[b])]);return m}case qx:return s([c,l.toISOString()],l);case Hx:{const{source:h,flags:m}=l;return s([c,{source:h,flags:m}],l)}case Gx:{const h=[],m=s([c,h],l);for(const[b,y]of l)(e||!(hp(ac(b))||hp(ac(y))))&&h.push([a(b),a(y)]);return m}case Vx:{const h=[],m=s([c,h],l);for(const b of l)(e||!hp(ac(b)))&&h.push(a(b));return m}}const{message:f}=l;return s([c,{name:d,message:f}],l)};return a},RR=(e,{json:t,lossy:n}={})=>{const r=[];return ote(!(t||n),!!t,new Map,r)(e),r},wh=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?_R(RR(e,t)):structuredClone(e):(e,t)=>_R(RR(e,t));function ate(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 lte(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function ute(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||ate,r=e.options.footnoteBackLabel||lte,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const h=e.all(f),m=String(f.identifier).toUpperCase(),b=Jl(m.toLowerCase());let y=0;const x=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++y<=S;){x.length>0&&x.push({type:"text",value:" "});let R=typeof n=="string"?n:n(d,y);typeof R=="string"&&(R={type:"text",value:R}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const E=h[h.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const R=E.children[E.children.length-1];R&&R.type==="text"?R.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...x)}else h.push(...x);const T={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(h,!0)};e.patch(f,T),c.push(T)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...wh(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 Sf=(function(e){if(e==null)return pte;if(typeof e=="function")return Em(e);if(typeof e=="object")return Array.isArray(e)?cte(e):fte(e);if(typeof e=="string")return dte(e);throw new Error("Expected function, string, or object as test")});function cte(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Sf(e[n]);return Em(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function fte(e){const t=e;return Em(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function dte(e){return Em(t);function t(n){return n&&n.type===e}}function Em(e){return t;function t(n,r,s){return!!(hte(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function pte(){return!0}function hte(e){return e!==null&&typeof e=="object"&&"type"in e}const jD=[],mte=!0,qv=!1,gte="skip";function LD(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=Sf(s),l=r?-1:1;c(e,void 0,[])();function c(d,f,h){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=jD,x,S,E;if((!t||a(d,f,h[h.length-1]||void 0))&&(y=bte(n(d,h)),y[0]===qv))return y;if("children"in d&&d.children){const T=d;if(T.children&&y[0]!==gte)for(S=(r?T.children.length:-1)+l,E=h.concat(T);S>-1&&S<T.children.length;){const R=T.children[S];if(x=c(R,S,E)(),x[0]===qv)return x;S=typeof x[1]=="number"?x[1]:S+l}}return y}}}function bte(e){return Array.isArray(e)?e:typeof e=="number"?[mte,e]:e==null?jD:[e]}function Tm(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),LD(e,a,c,s);function c(d,f){const h=f[f.length-1],m=h?h.children.indexOf(d):void 0;return l(d,m,h)}}const Hv={}.hasOwnProperty,yte={};function vte(e,t){const n=t||yte,r=new Map,s=new Map,a=new Map,l={...nte,...n.handlers},c={all:f,applyData:xte,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:l,one:d,options:n,patch:kte,wrap:wte};return Tm(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const m=h.type==="definition"?r:s,b=String(h.identifier).toUpperCase();m.has(b)||m.set(b,h)}}),c;function d(h,m){const b=h.type,y=c.handlers[b];if(Hv.call(c.handlers,b)&&y)return y(c,h,m);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in h){const{children:S,...E}=h,T=wh(E);return T.children=c.all(h),T}return wh(h)}return(c.options.unknownHandler||Ste)(c,h,m)}function f(h){const m=[];if("children"in h){const b=h.children;let y=-1;for(;++y<b.length;){const x=c.one(b[y],h);if(x){if(y&&b[y-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=CR(x.value)),!Array.isArray(x)&&x.type==="element")){const S=x.children[0];S&&S.type==="text"&&(S.value=CR(S.value))}Array.isArray(x)?m.push(...x):m.push(x)}}}return m}}function kte(e,t){e.position&&(t.position=lQ(e))}function xte(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,wh(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function Ste(e,t){const n=t.data||{},r="value"in t&&!(Hv.call(n,"hProperties")||Hv.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 wte(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 CR(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function NR(e,t){const n=vte(e,t),r=n.one(e,void 0),s=ute(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 Ete(e,t){return e&&"run"in e?async function(n,r){const s=NR(n,{file:r,...t});await e.run(s,r)}:function(n,r){return NR(n,{file:r,...e||t})}}function AR(e){if(e)throw e}var Ny,OR;function Tte(){if(OR)return Ny;OR=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 b;for(b in f);return typeof b>"u"||e.call(f,b)},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 Ny=function d(){var f,h,m,b,y,x,S=arguments[0],E=1,T=arguments.length,R=!1;for(typeof S=="boolean"&&(R=S,S=arguments[1]||{},E=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});E<T;++E)if(f=arguments[E],f!=null)for(h in f)m=c(S,h),b=c(f,h),S!==b&&(R&&b&&(a(b)||(y=s(b)))?(y?(y=!1,x=m&&s(m)?m:[]):x=m&&a(m)?m:{},l(S,{name:h,newValue:d(R,x,b)})):typeof b<"u"&&l(S,{name:h,newValue:b}));return S},Ny}var _te=Tte();const Ay=ef(_te);function Gv(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 Rte(){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(d,...f){const h=e[++a];let m=-1;if(d){l(d);return}for(;++m<s.length;)(f[m]===null||f[m]===void 0)&&(f[m]=s[m]);s=f,h?Cte(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 Cte(e,t){let n;return r;function r(...l){const c=e.length>l.length;let d;c&&l.push(s);try{d=e.apply(this,l)}catch(f){const h=f;if(c&&n)throw h;return s(h)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(l,...c){n||(n=!0,t(l,...c))}function a(l){s(null,l)}}const Fi={basename:Nte,dirname:Ate,extname:Ote,join:Ite,sep:"/"};function Nte(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');wf(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 Ate(e){if(wf(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 Ote(e){wf(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 Ite(...e){let t=-1,n;for(;++t<e.length;)wf(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Mte(n)}function Mte(e){wf(e);const t=e.codePointAt(0)===47;let n=Dte(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Dte(e,t){let n="",r=0,s=-1,a=0,l=-1,c,d;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(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),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 wf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const zte={cwd:jte};function jte(){return"/"}function Vv(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Lte(e){if(typeof e=="string")e=new URL(e);else if(!Vv(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 Pte(e)}function Pte(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 Oy=["history","path","basename","stem","extname","dirname"];class PD{constructor(t){let n;t?Vv(t)?n={path:t}:typeof t=="string"||$te(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":zte.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Oy.length;){const a=Oy[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)Oy.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Fi.basename(this.path):void 0}set basename(t){My(t,"basename"),Iy(t,"basename"),this.path=Fi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Fi.dirname(this.path):void 0}set dirname(t){IR(this.basename,"dirname"),this.path=Fi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Fi.extname(this.path):void 0}set extname(t){if(Iy(t,"extname"),IR(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=Fi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Vv(t)&&(t=Lte(t)),My(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Fi.basename(this.path,this.extname):void 0}set stem(t){My(t,"stem"),Iy(t,"stem"),this.path=Fi.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 xr(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 Iy(e,t){if(e&&e.includes(Fi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Fi.sep+"`")}function My(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function IR(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function $te(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Bte=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),Fte={}.hasOwnProperty;class Wx extends Bte{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=Rte()}copy(){const t=new Wx;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ay(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(jy("data",this.frozen),this.namespace[t]=n,this):Fte.call(this.namespace,t)&&this.namespace[t]||void 0:t?(jy("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=mp(t),r=this.parser||this.Parser;return Dy("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Dy("process",this.parser||this.Parser),zy("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,l){const c=mp(t),d=r.parse(c);r.run(d,c,function(h,m,b){if(h||!m||!b)return f(h);const y=m,x=r.stringify(y,b);Hte(x)?b.value=x:b.result=x,f(h,b)});function f(h,m){h||!m?l(h):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),Dy("processSync",this.parser||this.Parser),zy("processSync",this.compiler||this.Compiler),this.process(t,s),DR("processSync","process",n),r;function s(a,l){n=!0,AR(a),r=l}}run(t,n,r){MR(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 d=mp(n);s.run(t,d,f);function f(h,m,b){const y=m||t;h?c(h):l?l(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),DR("runSync","run",r),s;function a(l,c){AR(l),s=c,r=!0}}stringify(t,n){this.freeze();const r=mp(n),s=this.compiler||this.Compiler;return zy("stringify",s),MR(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(jy("use",this.frozen),t!=null)if(typeof t=="function")d(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")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[h,...m]=f;d(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=Ay(!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 d(f,h){let m=-1,b=-1;for(;++m<r.length;)if(r[m][0]===f){b=m;break}if(b===-1)r.push([f,...h]);else if(h.length>0){let[y,...x]=h;const S=r[b][1];Gv(S)&&Gv(y)&&(y=Ay(!0,S,y)),r[b]=[f,y,...x]}}}}const Ute=new Wx().freeze();function Dy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function zy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function jy(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 MR(e){if(!Gv(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function DR(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function mp(e){return qte(e)?e:new PD(e)}function qte(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Hte(e){return typeof e=="string"||Gte(e)}function Gte(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Vte="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",zR=[],jR={allowDangerousHtml:!0},Wte=/^(https?|ircs?|mailto|xmpp)$/i,Kte=[{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 Zte(e){const t=Yte(e),n=Xte(e);return Qte(t.runSync(t.parse(n),n),e)}function Yte(e){const t=e.rehypePlugins||zR,n=e.remarkPlugins||zR,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...jR}:jR;return Ute().use(Aee).use(n).use(Ete,r).use(t)}function Xte(e){const t=e.children||"",n=new PD;return typeof t=="string"&&(n.value=t),n}function Qte(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||Jte;for(const h of Kte)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+Vte+h.id,void 0);return Tm(e,f),pQ(e,{Fragment:g.Fragment,components:s,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function f(h,m,b){if(h.type==="raw"&&b&&typeof m=="number")return l?b.children.splice(m,1):b.children[m]={type:"text",value:h.value},m;if(h.type==="element"){let y;for(y in _y)if(Object.hasOwn(_y,y)&&Object.hasOwn(h.properties,y)){const x=h.properties[y],S=_y[y];(S===null||S.includes(h.tagName))&&(h.properties[y]=d(String(x||""),y,h))}}if(h.type==="element"){let y=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(h,m,b)),y&&b&&typeof m=="number")return c&&h.children?b.children.splice(m,1,...h.children):b.children.splice(m,1),m}}}function Jte(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||Wte.test(e.slice(0,t))?e:""}const LR=(function(e,t,n){const r=Sf(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]}),_a=(function(e){if(e==null)return nne;if(typeof e=="string")return tne(e);if(typeof e=="object")return ene(e);if(typeof e=="function")return Kx(e);throw new Error("Expected function, string, or array as `test`")});function ene(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=_a(e[n]);return Kx(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function tne(e){return Kx(t);function t(n){return n.tagName===e}}function Kx(e){return t;function t(n,r,s){return!!(rne(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function nne(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function rne(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const PR=/\n/g,$R=/[\t ]+/g,Wv=_a("br"),BR=_a(fne),ine=_a("p"),FR=_a("tr"),sne=_a(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",cne,dne]),$D=_a(["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 one(e,t){const n=t||{},r="children"in e?e.children:[],s=$D(e),a=UD(e,{whitespace:n.whitespace||"normal"}),l=[];(e.type==="text"||e.type==="comment")&&l.push(...FD(e,{breakBefore:!0,breakAfter:!0}));let c=-1;for(;++c<r.length;)l.push(...BD(r[c],e,{whitespace:a,breakBefore:c?void 0:s,breakAfter:c<r.length-1?Wv(r[c+1]):s}));const d=[];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&&d.push(`
|
|
54
|
+
`.repeat(f)||" "),f=-1,d.push(h))}return d.join("")}function BD(e,t,n){return e.type==="element"?ane(e,t,n):e.type==="text"?n.whitespace==="normal"?FD(e,n):lne(e):[]}function ane(e,t,n){const r=UD(e,n),s=e.children||[];let a=-1,l=[];if(sne(e))return l;let c,d;for(Wv(e)||FR(e)&&LR(t,e,FR)?d=`
|
|
55
|
+
`:ine(e)?(c=2,d=2):$D(e)&&(c=1,d=1);++a<s.length;)l=l.concat(BD(s[a],e,{whitespace:r,breakBefore:a?void 0:c,breakAfter:a<s.length-1?Wv(s[a+1]):d}));return BR(e)&&LR(t,e,BR)&&l.push(" "),c&&l.unshift(c),d&&l.push(d),l}function FD(e,t){const n=String(e.value),r=[],s=[];let a=0;for(;a<=n.length;){PR.lastIndex=a;const d=PR.exec(n),f=d&&"index"in d?d.index:n.length;r.push(une(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 lne(e){return[String(e.value)]}function une(e,t,n){const r=[];let s=0,a;for(;s<e.length;){$R.lastIndex=s;const l=$R.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 UD(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 cne(e){return!!(e.properties||{}).hidden}function fne(e){return e.tagName==="td"||e.tagName==="th"}function dne(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function pne(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]},b={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=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"],S=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],E=["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"],T=["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:S,keyword:x,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:E},M={className:"function.dispatch",relevance:0,keywords:{_hint:T},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},A=[M,m,c,n,e.C_BLOCK_COMMENT_MODE,h,f],N={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:A.concat([{begin:/\(/,end:/\)/,keywords:C,contains:A.concat(["self"]),relevance:0}]),relevance:0},P={className:"function",begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:C,relevance:0},{begin:y,returnBegin:!0,contains:[b],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(N,P,M,A,[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 hne(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=pne(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 mne(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 d={match:/\\"/},f={className:"string",begin:/'/,end:/'/},h={match:/\\'/},m={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},b=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],y=e.SHEBANG({binary:`(${b.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},S=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],E=["true","false"],T={match:/(\/[a-z._-]+)+/},R=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],_=["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"],M=["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:S,literal:E,built_in:[...R,..._,"set","shopt",...C,...M]},contains:[y,e.SHEBANG(),x,m,a,l,T,c,d,f,h,n]}}function gne(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]},b={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=t.optional(s)+e.IDENT_RE+"\\s*\\(",E={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"},T=[m,c,n,e.C_BLOCK_COMMENT_MODE,h,f],R={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:E,contains:T.concat([{begin:/\(/,end:/\)/,keywords:E,contains:T.concat(["self"]),relevance:0}]),relevance:0},_={begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:E,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:E,relevance:0},{begin:y,returnBegin:!0,contains:[e.inherit(b,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:E,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,h,c,{begin:/\(/,end:/\)/,keywords:E,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:E,disableAutodetect:!0,illegal:"</",contains:[].concat(R,_,T,[m,{begin:e.IDENT_RE+"::",keywords:E},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:m,strings:f,keywords:E}}}function bne(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]},b={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=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"],S=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],E=["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"],T=["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:S,keyword:x,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:E},M={className:"function.dispatch",relevance:0,keywords:{_hint:T},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},A=[M,m,c,n,e.C_BLOCK_COMMENT_MODE,h,f],N={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:A.concat([{begin:/\(/,end:/\)/,keywords:C,contains:A.concat(["self"]),relevance:0}]),relevance:0},P={className:"function",begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:C,relevance:0},{begin:y,returnBegin:!0,contains:[b],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(N,P,M,A,[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 yne(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)*"}),d={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/}),b={className:"subst",begin:/\{/,end:/\}/,keywords:l},y=e.inherit(b,{illegal:/\n/}),x={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,y]},S={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},b]},E=e.inherit(S,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]});b.contains=[S,x,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.C_BLOCK_COMMENT_MODE],y.contains=[E,x,m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const T={variants:[f,S,x,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},R={begin:"<",end:">",contains:[{beginKeywords:"in out"},c]},_=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"}},T,d,{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:"("+_+"\\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:[T,d,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},C]}}const vne=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_-]*/}}),kne=["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"],xne=["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"],Sne=[...kne,...xne],wne=["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(),Ene=["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(),Tne=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),_ne=["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 Rne(e){const t=e.regex,n=vne(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:":("+Ene.join("|")+")"},{begin:":(:)?("+Tne.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+_ne.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:wne.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...c,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Sne.join("|")+")\\b"}]}}function Cne(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 Nne(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 Ane(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 One(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},d=/[A-Za-z0-9_-]+/,f=/"(\\"|[^"])*"/,h=/'[^']*'/,m=t.either(d,f,h),b=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:b,className:"attr",starts:{end:/$/,contains:[r,c,a,s,l,n]}}]}}var bl="[0-9](_*[0-9])*",gp=`\\.(${bl})`,bp="[0-9a-fA-F](_*[0-9a-fA-F])*",UR={className:"number",variants:[{begin:`(\\b(${bl})((${gp})|\\.)?|(${gp}))[eE][+-]?(${bl})[fFdD]?\\b`},{begin:`\\b(${bl})((${gp})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${gp})[fFdD]?\\b`},{begin:`\\b(${bl})[fFdD]\\b`},{begin:`\\b0[xX]((${bp})\\.?|(${bp})?\\.(${bp}))[pP][+-]?(${bl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${bp})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function qD(e,t,n){return n===-1?"":e.replace(t,r=>qD(e,t,n-1))}function Ine(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+qD("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),d={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:d,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:d,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:d,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[f,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,UR,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},UR,f]}}const qR="[A-Za-z$_][0-9A-Za-z$_]*",Mne=["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"],Dne=["true","false","null","undefined","NaN","Infinity"],HD=["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"],GD=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],VD=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],zne=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],jne=[].concat(VD,HD,GD);function Lne(e){const t=e.regex,n=(B,{after:K})=>{const O="</"+B[0].slice(1);return B.input.indexOf(O,K)!==-1},r=qR,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(B,K)=>{const O=B[0].length+B.index,$=B.input[O];if($==="<"||$===","){K.ignoreMatch();return}$===">"&&(n(B,{after:O})||K.ignoreMatch());let V;const j=B.input.substring(O);if(V=j.match(/^\s*=/)){K.ignoreMatch();return}if((V=j.match(/^\s+extends\s+/))&&V.index===0){K.ignoreMatch();return}}},c={$pattern:qR,keyword:Mne,literal:Dne,built_in:jne,"variable.language":zne},d="[0-9](_?[0-9])*",f=`\\.(${d})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${f})|\\.)?|(${f}))[eE][+-]?(${d})\\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},b={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},y={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"xml"}},x={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"graphql"}},E={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,b]},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]},_=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,x,S,E,{match:/\$\d+/},m];b.contains=_.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(_)});const C=[].concat(R,b.contains),M=C.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(C)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:M},N={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"}}]},P={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:{_:[...HD,...GD]}},z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},D={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},H={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function W(B){return t.concat("(?!",B.join("|"),")")}const F={match:t.concat(/\b/,W([...VD,"super","import"].map(B=>`${B}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},L={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},U={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},q="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",Z={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(q)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:M,CLASS_REFERENCE:P},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),z,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,x,S,E,R,{match:/\$\d+/},m,P,{scope:"attr",match:r+t.lookahead(":"),relevance:0},Z,{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:q,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:M}]}]},{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"]}]}]},D,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},L,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},F,H,N,U,{match:/\$[(.]/}]}}function Pne(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 yl="[0-9](_*[0-9])*",yp=`\\.(${yl})`,vp="[0-9a-fA-F](_*[0-9a-fA-F])*",$ne={className:"number",variants:[{begin:`(\\b(${yl})((${yp})|\\.)?|(${yp}))[eE][+-]?(${yl})[fFdD]?\\b`},{begin:`\\b(${yl})((${yp})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${yp})[fFdD]?\\b`},{begin:`\\b(${yl})[fFdD]\\b`},{begin:`\\b0[xX]((${vp})\\.?|(${vp})?\\.(${vp}))[pP][+-]?(${yl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${vp})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Bne(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+")?"},d={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(l,{className:"string"}),"self"]}]},f=$ne,h=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),m={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},b=m;return b.variants[1].contains=[m],m.variants[1].contains=[b],{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,d,{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,d,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,d]},l,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
56
|
+
`},f]}}const Fne=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_-]*/}}),Une=["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"],qne=["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"],Hne=[...Une,...qne],Gne=["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(),WD=["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(),KD=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Vne=["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(),Wne=WD.concat(KD).sort().reverse();function Kne(e){const t=Fne(e),n=Wne,r="and or not only",s="[\\w-]+",a="("+s+"|@\\{"+s+"\\})",l=[],c=[],d=function(_){return{className:"string",begin:"~?"+_+".*?"+_}},f=function(_,C,M){return{className:_,begin:C,relevance:M}},h={$pattern:/[a-z-]+/,keyword:r,attribute:Gne.join(" ")},m={begin:"\\(",end:"\\)",contains:c,keywords:h,relevance:0};c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d("'"),d('"'),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 b=c.concat({begin:/\{/,end:/\}/,contains:l}),y={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("+Vne.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:c}}]},S={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}},E={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:b}},T={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:a,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,y,f("keyword","all\\b"),f("variable","@\\{"+s+"\\}"),{begin:"\\b("+Hne.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:":("+WD.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+KD.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:b},{begin:"!important"},t.FUNCTION_DISPATCH]},R={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[T]};return l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,S,E,R,x,T,y,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:l}}function Zne(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 Yne(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 Xne(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+.-]*/,d={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:[]}),b=e.inherit(h,{contains:[]});f.contains.push(b),h.contains.push(m);let y=[n,d];return[f,h,m,b].forEach(T=>{T.contains=T.contains.concat(y)}),y=y.concat(f,h),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:y},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:y}]}]},n,a,f,h,{className:"quote",begin:"^>\\s+",contains:y,end:"$"},s,r,d,l,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function Qne(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"]},d={$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:"("+d.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:d,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function Jne(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*\(.*?\))?/},d={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,d],m=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],b=(S,E,T="\\1")=>{const R=T==="\\1"?T:t.concat(T,E);return t.concat(t.concat("(?:",S,")"),E,/(?:\\.|[^\\\/])*?/,R,/(?:\\.|[^\\\/])*?/,T,r)},y=(S,E,T)=>t.concat(t.concat("(?:",S,")"),E,/(?:\\.|[^\\\/])*?/,T,r),x=[d,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:b("s|tr|y",t.either(...m,{capture:!0}))},{begin:b("s|tr|y","\\(","\\)")},{begin:b("s|tr|y","\\[","\\]")},{begin:b("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:y("(?:m|qr)?",/\//,/\//)},{begin:y("m|qr",t.either(...m,{capture:!0}),/\1/)},{begin:y("m|qr",/\(/,/\)/)},{begin:y("m|qr",/\[/,/\]/)},{begin:y("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 ere(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:/\?>/}]},d={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(d)}),m={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(d),"on:begin":(L,U)=>{U.data._beginMatch=L[1]||L[2]},"on:end":(L,U)=>{U.data._beginMatch!==L[1]&&U.ignoreMatch()}},b=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),y=`[
|
|
57
|
+
]`,x={scope:"string",variants:[h,f,m,b]},S={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},E=["false","null","true"],T=["__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:T,literal:(L=>{const U=[];return L.forEach(q=>{U.push(q),q.toLowerCase()===q?U.push(q.toUpperCase()):U.push(q.toLowerCase())}),U})(E),built_in:R},M=L=>L.map(U=>U.replace(/\|\d+$/,"")),A={variants:[{match:[/new/,t.concat(y,"+"),t.concat("(?!",M(R).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},N=t.concat(r,"\\b(?!\\()"),P={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),N],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),N],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"}}]},z={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},D={relevance:0,begin:/\(/,end:/\)/,keywords:C,contains:[z,l,P,e.C_BLOCK_COMMENT_MODE,x,S,A]},H={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",M(T).join("\\b|"),"|",M(R).join("\\b|"),"\\b)"),r,t.concat(y,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[D]};D.contains.push(H);const W=[z,P,e.C_BLOCK_COMMENT_MODE,x,S,A],F={begin:t.concat(/#\[\s*\\?/,t.either(s,a)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:E,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:E,keyword:["new","array"]},contains:["self",...W]},...W,{scope:"meta",variants:[{match:s},{match:a}]}]};return{case_insensitive:!1,keywords:C,contains:[F,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,H,P,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},A,{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",F,l,P,e.C_BLOCK_COMMENT_MODE,x,S]}]},{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,S]}}function tre(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 nre(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function rre(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"]},d={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,d],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d,h,f]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d,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]},b="[0-9](_?[0-9])*",y=`(\\b(${b}))?\\.(${b})|\\b(${b})\\.`,x=`\\b|${r.join("|")}`,S={className:"number",relevance:0,variants:[{begin:`(\\b(${b})|(${y}))[eE][+-]?(${b})[jJ]?(?=${x})`},{begin:`(${y})[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(${b})[jJ](?=${x})`}]},E={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:c,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},T={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:["self",d,S,m,e.HASH_COMMENT_MODE]}]};return f.contains=[m,S,d],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:c,illegal:/(<\/|\?)|=>/,contains:[d,S,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},m,E,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[T]},{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:[S,T,m]}]}}function ire(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function sre(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 ore(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]+"},d={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]})]}]},b="[1-9](_?[0-9])*|0",y="[0-9](_?[0-9])*",x={className:"number",relevance:0,variants:[{begin:`\\b(${b})(\\.(${y}))?([eE][+-]?(${y})|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"}]},S={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:l}]},A=[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:[S]},{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(d,f),relevance:0}].concat(d,f);h.contains=A,S.contains=A;const D=[{begin:/^\s*=>/,starts:{end:"$",contains:A}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:l,contains:A}}];return f.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:l,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(D).concat(f).concat(A)}}function are(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"],d=["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:d,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 lre=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_-]*/}}),ure=["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"],cre=["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"],fre=[...ure,...cre],dre=["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(),pre=["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(),hre=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),mre=["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 gre(e){const t=lre(e),n=hre,r=pre,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("+fre.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("+mre.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:dre.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 bre(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function yre(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"],d=["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"],b=["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"],y=h,x=[...f,...d].filter(M=>!h.includes(M)),S={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},E={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},T={match:t.concat(/\b/,t.either(...y),/\s*\(/),relevance:0,keywords:{built_in:y}};function R(M){return t.concat(/\b/,t.either(...M.map(A=>A.replace(/\s+/,"\\s+"))),/\b/)}const _={scope:"keyword",match:R(b),relevance:0};function C(M,{exceptions:A,when:N}={}){const P=N;return A=A||[],M.map(z=>z.match(/\|\d+$/)||A.includes(z)?z:P(z)?`${z}|0`:z)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:C(x,{when:M=>M.length<3}),literal:a,type:c,built_in:m},contains:[{scope:"type",match:R(l)},_,T,S,r,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,E]}}function ZD(e){return e?typeof e=="string"?e:e.source:null}function lc(e){return pn("(?=",e,")")}function pn(...e){return e.map(n=>ZD(n)).join("")}function vre(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Tr(...e){return"("+(vre(e).capture?"":"?:")+e.map(r=>ZD(r)).join("|")+")"}const Zx=e=>pn(/\b/,e,/\w$/.test(e)?/\b/:/\B/),kre=["Protocol","Type"].map(Zx),HR=["init","self"].map(Zx),xre=["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"],GR=["false","nil","true"],Sre=["assignment","associativity","higherThan","left","lowerThan","none","right"],wre=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],VR=["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"],YD=Tr(/[/=\-+!*%<>&|^~?]/,/[\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]/),XD=Tr(YD,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Py=pn(YD,XD,"*"),QD=Tr(/[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]/),Eh=Tr(QD,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Bi=pn(QD,Eh,"*"),kp=pn(/[A-Z]/,Eh,"*"),Ere=["attached","autoclosure",pn(/convention\(/,Tr("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",pn(/objc\(/,Bi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Tre=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function _re(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,Tr(...kre,...HR)],className:{2:"keyword"}},a={match:pn(/\./,Tr(...Ly)),relevance:0},l=Ly.filter(Ee=>typeof Ee=="string").concat(["_|0"]),c=Ly.filter(Ee=>typeof Ee!="string").concat(xre).map(Zx),d={variants:[{className:"keyword",match:Tr(...c,...HR)}]},f={$pattern:Tr(/\b\w+/,/#\w+/),keyword:l.concat(wre),literal:GR},h=[s,a,d],m={match:pn(/\./,Tr(...VR)),relevance:0},b={className:"built_in",match:pn(/\b/,Tr(...VR),/(?=\()/)},y=[m,b],x={match:/->/,relevance:0},S={className:"operator",relevance:0,variants:[{match:Py},{match:`\\.(\\.|${XD})+`}]},E=[x,S],T="([0-9]_*)+",R="([0-9a-fA-F]_*)+",_={className:"number",relevance:0,variants:[{match:`\\b(${T})(\\.(${T}))?([eE][+-]?(${T}))?\\b`},{match:`\\b0x(${R})(\\.(${R}))?([pP][+-]?(${T}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},C=(Ee="")=>({className:"subst",variants:[{match:pn(/\\/,Ee,/[0\\tnr"']/)},{match:pn(/\\/,Ee,/u\{[0-9a-fA-F]{1,8}\}/)}]}),M=(Ee="")=>({className:"subst",match:pn(/\\/,Ee,/[\t ]*(?:[\r\n]|\r\n)/)}),A=(Ee="")=>({className:"subst",label:"interpol",begin:pn(/\\/,Ee,/\(/),end:/\)/}),N=(Ee="")=>({begin:pn(Ee,/"""/),end:pn(/"""/,Ee),contains:[C(Ee),M(Ee),A(Ee)]}),P=(Ee="")=>({begin:pn(Ee,/"/),end:pn(/"/,Ee),contains:[C(Ee),A(Ee)]}),z={className:"string",variants:[N(),N("#"),N("##"),N("###"),P(),P("#"),P("##"),P("###")]},D=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],H={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:D},W=Ee=>{const xe=pn(Ee,/\//),De=pn(/\//,Ee);return{begin:xe,end:De,contains:[...D,{scope:"comment",begin:`#(?!.*${De})`,end:/$/}]}},F={scope:"regexp",variants:[W("###"),W("##"),W("#"),H]},L={match:pn(/`/,Bi,/`/)},U={className:"variable",match:/\$\d+/},q={className:"variable",match:`\\$${Eh}+`},Z=[L,U,q],B={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Tre,contains:[...E,_,z]}]}},K={scope:"keyword",match:pn(/@/,Tr(...Ere),lc(Tr(/\(/,/\s+/)))},O={scope:"meta",match:pn(/@/,Bi)},$=[B,K,O],V={match:lc(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:pn(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Eh,"+")},{className:"type",match:kp,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:pn(/\s+&\s+/,lc(kp)),relevance:0}]},j={begin:/</,end:/>/,keywords:f,contains:[...r,...h,...$,x,V]};V.contains.push(j);const X={match:pn(Bi,/\s*:/),keywords:"_|0",relevance:0},se={begin:/\(/,end:/\)/,relevance:0,keywords:f,contains:["self",X,...r,F,...h,...y,...E,_,z,...Z,...$,V]},re={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,V]},oe={begin:Tr(lc(pn(Bi,/\s*:/)),lc(pn(Bi,/\s+/,Bi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Bi}]},ue={begin:/\(/,end:/\)/,keywords:f,contains:[oe,...r,...h,...E,_,z,...$,V,se],endsParent:!0,illegal:/["']/},ce={match:[/(func|macro)/,/\s+/,Tr(L.match,Bi,Py)],className:{1:"keyword",3:"title.function"},contains:[re,ue,t],illegal:[/\[/,/%/]},ge={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[re,ue,t],illegal:/\[|%/},Ce={match:[/operator/,/\s+/,Py],className:{1:"keyword",3:"title"}},ae={begin:[/precedencegroup/,/\s+/,kp],className:{1:"keyword",3:"title"},contains:[V],keywords:[...Sre,...GR],end:/}/},ye={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},we={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Ae={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Bi,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:f,contains:[re,...h,{begin:/:/,end:/\{/,keywords:f,contains:[{scope:"title.class.inherited",match:kp},...h],relevance:0}]};for(const Ee of z.variants){const xe=Ee.contains.find(Ie=>Ie.label==="interpol");xe.keywords=f;const De=[...h,...y,...E,_,z,...Z];xe.contains=[...De,{begin:/\(/,end:/\)/,contains:["self",...De]}]}return{name:"Swift",keywords:f,contains:[...r,ce,ge,ye,we,Ae,Ce,ae,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},F,...h,...y,...E,_,z,...Z,...$,V,se]}}const Th="[A-Za-z$_][0-9A-Za-z$_]*",JD=["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"],ez=["true","false","null","undefined","NaN","Infinity"],tz=["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"],nz=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],rz=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],iz=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],sz=[].concat(rz,tz,nz);function Rre(e){const t=e.regex,n=(B,{after:K})=>{const O="</"+B[0].slice(1);return B.input.indexOf(O,K)!==-1},r=Th,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(B,K)=>{const O=B[0].length+B.index,$=B.input[O];if($==="<"||$===","){K.ignoreMatch();return}$===">"&&(n(B,{after:O})||K.ignoreMatch());let V;const j=B.input.substring(O);if(V=j.match(/^\s*=/)){K.ignoreMatch();return}if((V=j.match(/^\s+extends\s+/))&&V.index===0){K.ignoreMatch();return}}},c={$pattern:Th,keyword:JD,literal:ez,built_in:sz,"variable.language":iz},d="[0-9](_?[0-9])*",f=`\\.(${d})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${f})|\\.)?|(${f}))[eE][+-]?(${d})\\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},b={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},y={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"xml"}},x={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"graphql"}},E={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,b]},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]},_=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,x,S,E,{match:/\$\d+/},m];b.contains=_.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(_)});const C=[].concat(R,b.contains),M=C.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(C)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:M},N={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"}}]},P={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:{_:[...tz,...nz]}},z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},D={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},H={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function W(B){return t.concat("(?!",B.join("|"),")")}const F={match:t.concat(/\b/,W([...rz,"super","import"].map(B=>`${B}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},L={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},U={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},q="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",Z={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(q)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:M,CLASS_REFERENCE:P},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),z,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,x,S,E,R,{match:/\$\d+/},m,P,{scope:"attr",match:r+t.lookahead(":"),relevance:0},Z,{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:q,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:M}]}]},{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"]}]}]},D,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},L,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},F,H,N,U,{match:/\$[(.]/}]}}function Cre(e){const t=e.regex,n=Rre(e),r=Th,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['"]/},d=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],f={$pattern:Th,keyword:JD.concat(d),literal:ez,built_in:sz.concat(s),"variable.language":iz},h={className:"meta",begin:"@"+r},m=(S,E,T)=>{const R=S.contains.findIndex(_=>_.label===E);if(R===-1)throw new Error("can not find mode to replace");S.contains.splice(R,1,T)};Object.assign(n.keywords,f),n.exports.PARAMS_CONTAINS.push(h);const b=n.contains.find(S=>S.scope==="attr"),y=Object.assign({},b,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,b,y]),n.contains=n.contains.concat([h,a,l,y]),m(n,"shebang",e.SHEBANG()),m(n,"use_strict",c);const x=n.contains.find(S=>S.label==="func.def");return x.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function Nre(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}/,d={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:/>/}]}),b=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,d,f,h,m,b,{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:[b]}]}}function Are(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/},d={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,d,f,c]}}function Ore(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"}),d=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,d,c,l,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,l,d,c]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[d]},{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 Ire(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,{}[\]]+/}]}),b={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"},y={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},x={begin:/\{/,end:/\}/,contains:[y],illegal:"\\n",relevance:0},S={begin:"\\[",end:"\\]",contains:[y],illegal:"\\n",relevance:0},E=[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}},b,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},x,S,a,l],T=[...E];return T.pop(),T.push(c),y.contains=T,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:E}}const Mre={arduino:hne,bash:mne,c:gne,cpp:bne,csharp:yne,css:Rne,diff:Cne,go:Nne,graphql:Ane,ini:One,java:Ine,javascript:Lne,json:Pne,kotlin:Bne,less:Kne,lua:Zne,makefile:Yne,markdown:Xne,objectivec:Qne,perl:Jne,php:ere,"php-template":tre,plaintext:nre,python:rre,"python-repl":ire,r:sre,ruby:ore,rust:are,scss:gre,shell:bre,sql:yre,swift:_re,typescript:Cre,vbnet:Nre,wasm:Are,xml:Ore,yaml:Ire};var $y,WR;function Dre(){if(WR)return $y;WR=1;function e(Y){return Y instanceof Map?Y.clear=Y.delete=Y.set=function(){throw new Error("map is read-only")}:Y instanceof Set&&(Y.add=Y.clear=Y.delete=function(){throw new Error("set is read-only")}),Object.freeze(Y),Object.getOwnPropertyNames(Y).forEach(he=>{const Le=Y[he],Qe=typeof Le;(Qe==="object"||Qe==="function")&&!Object.isFrozen(Le)&&e(Le)}),Y}class t{constructor(he){he.data===void 0&&(he.data={}),this.data=he.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(Y){return Y.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(Y,...he){const Le=Object.create(null);for(const Qe in Y)Le[Qe]=Y[Qe];return he.forEach(function(Qe){for(const wt in Qe)Le[wt]=Qe[wt]}),Le}const s="</span>",a=Y=>!!Y.scope,l=(Y,{prefix:he})=>{if(Y.startsWith("language:"))return Y.replace("language:","language-");if(Y.includes(".")){const Le=Y.split(".");return[`${he}${Le.shift()}`,...Le.map((Qe,wt)=>`${Qe}${"_".repeat(wt+1)}`)].join(" ")}return`${he}${Y}`};class c{constructor(he,Le){this.buffer="",this.classPrefix=Le.classPrefix,he.walk(this)}addText(he){this.buffer+=n(he)}openNode(he){if(!a(he))return;const Le=l(he.scope,{prefix:this.classPrefix});this.span(Le)}closeNode(he){a(he)&&(this.buffer+=s)}value(){return this.buffer}span(he){this.buffer+=`<span class="${he}">`}}const d=(Y={})=>{const he={children:[]};return Object.assign(he,Y),he};class f{constructor(){this.rootNode=d(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(he){this.top.children.push(he)}openNode(he){const Le=d({scope:he});this.add(Le),this.stack.push(Le)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(he){return this.constructor._walk(he,this.rootNode)}static _walk(he,Le){return typeof Le=="string"?he.addText(Le):Le.children&&(he.openNode(Le),Le.children.forEach(Qe=>this._walk(he,Qe)),he.closeNode(Le)),he}static _collapse(he){typeof he!="string"&&he.children&&(he.children.every(Le=>typeof Le=="string")?he.children=[he.children.join("")]:he.children.forEach(Le=>{f._collapse(Le)}))}}class h extends f{constructor(he){super(),this.options=he}addText(he){he!==""&&this.add(he)}startScope(he){this.openNode(he)}endScope(){this.closeNode()}__addSublanguage(he,Le){const Qe=he.root;Le&&(Qe.scope=`language:${Le}`),this.add(Qe)}toHTML(){return new c(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function m(Y){return Y?typeof Y=="string"?Y:Y.source:null}function b(Y){return S("(?=",Y,")")}function y(Y){return S("(?:",Y,")*")}function x(Y){return S("(?:",Y,")?")}function S(...Y){return Y.map(Le=>m(Le)).join("")}function E(Y){const he=Y[Y.length-1];return typeof he=="object"&&he.constructor===Object?(Y.splice(Y.length-1,1),he):{}}function T(...Y){return"("+(E(Y).capture?"":"?:")+Y.map(Qe=>m(Qe)).join("|")+")"}function R(Y){return new RegExp(Y.toString()+"|").exec("").length-1}function _(Y,he){const Le=Y&&Y.exec(he);return Le&&Le.index===0}const C=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function M(Y,{joinWith:he}){let Le=0;return Y.map(Qe=>{Le+=1;const wt=Le;let lt=m(Qe),qe="";for(;lt.length>0;){const _e=C.exec(lt);if(!_e){qe+=lt;break}qe+=lt.substring(0,_e.index),lt=lt.substring(_e.index+_e[0].length),_e[0][0]==="\\"&&_e[1]?qe+="\\"+String(Number(_e[1])+wt):(qe+=_e[0],_e[0]==="("&&Le++)}return qe}).map(Qe=>`(${Qe})`).join(he)}const A=/\b\B/,N="[a-zA-Z]\\w*",P="[a-zA-Z_]\\w*",z="\\b\\d+(\\.\\d+)?",D="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",H="\\b(0b[01]+)",W="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",F=(Y={})=>{const he=/^#![ ]*\//;return Y.binary&&(Y.begin=S(he,/.*\b/,Y.binary,/\b.*/)),r({scope:"meta",begin:he,end:/$/,relevance:0,"on:begin":(Le,Qe)=>{Le.index!==0&&Qe.ignoreMatch()}},Y)},L={begin:"\\\\[\\s\\S]",relevance:0},U={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[L]},q={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[L]},Z={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/},B=function(Y,he,Le={}){const Qe=r({scope:"comment",begin:Y,end:he,contains:[]},Le);Qe.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 wt=T("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 Qe.contains.push({begin:S(/[ ]+/,"(",wt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Qe},K=B("//","$"),O=B("/\\*","\\*/"),$=B("#","$"),V={scope:"number",begin:z,relevance:0},j={scope:"number",begin:D,relevance:0},X={scope:"number",begin:H,relevance:0},se={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[L,{begin:/\[/,end:/\]/,relevance:0,contains:[L]}]},re={scope:"title",begin:N,relevance:0},oe={scope:"title",begin:P,relevance:0},ue={begin:"\\.\\s*"+P,relevance:0};var ge=Object.freeze({__proto__:null,APOS_STRING_MODE:U,BACKSLASH_ESCAPE:L,BINARY_NUMBER_MODE:X,BINARY_NUMBER_RE:H,COMMENT:B,C_BLOCK_COMMENT_MODE:O,C_LINE_COMMENT_MODE:K,C_NUMBER_MODE:j,C_NUMBER_RE:D,END_SAME_AS_BEGIN:function(Y){return Object.assign(Y,{"on:begin":(he,Le)=>{Le.data._beginMatch=he[1]},"on:end":(he,Le)=>{Le.data._beginMatch!==he[1]&&Le.ignoreMatch()}})},HASH_COMMENT_MODE:$,IDENT_RE:N,MATCH_NOTHING_RE:A,METHOD_GUARD:ue,NUMBER_MODE:V,NUMBER_RE:z,PHRASAL_WORDS_MODE:Z,QUOTE_STRING_MODE:q,REGEXP_MODE:se,RE_STARTERS_RE:W,SHEBANG:F,TITLE_MODE:re,UNDERSCORE_IDENT_RE:P,UNDERSCORE_TITLE_MODE:oe});function Ce(Y,he){Y.input[Y.index-1]==="."&&he.ignoreMatch()}function ae(Y,he){Y.className!==void 0&&(Y.scope=Y.className,delete Y.className)}function ye(Y,he){he&&Y.beginKeywords&&(Y.begin="\\b("+Y.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",Y.__beforeBegin=Ce,Y.keywords=Y.keywords||Y.beginKeywords,delete Y.beginKeywords,Y.relevance===void 0&&(Y.relevance=0))}function we(Y,he){Array.isArray(Y.illegal)&&(Y.illegal=T(...Y.illegal))}function Ae(Y,he){if(Y.match){if(Y.begin||Y.end)throw new Error("begin & end are not supported with match");Y.begin=Y.match,delete Y.match}}function Ee(Y,he){Y.relevance===void 0&&(Y.relevance=1)}const xe=(Y,he)=>{if(!Y.beforeMatch)return;if(Y.starts)throw new Error("beforeMatch cannot be used with starts");const Le=Object.assign({},Y);Object.keys(Y).forEach(Qe=>{delete Y[Qe]}),Y.keywords=Le.keywords,Y.begin=S(Le.beforeMatch,b(Le.begin)),Y.starts={relevance:0,contains:[Object.assign(Le,{endsParent:!0})]},Y.relevance=0,delete Le.beforeMatch},De=["of","and","for","in","not","or","if","then","parent","list","value"],Ie="keyword";function je(Y,he,Le=Ie){const Qe=Object.create(null);return typeof Y=="string"?wt(Le,Y.split(" ")):Array.isArray(Y)?wt(Le,Y):Object.keys(Y).forEach(function(lt){Object.assign(Qe,je(Y[lt],he,lt))}),Qe;function wt(lt,qe){he&&(qe=qe.map(_e=>_e.toLowerCase())),qe.forEach(function(_e){const Se=_e.split("|");Qe[Se[0]]=[lt,Ue(Se[0],Se[1])]})}}function Ue(Y,he){return he?Number(he):ke(Y)?0:1}function ke(Y){return De.includes(Y.toLowerCase())}const Te={},te=Y=>{console.error(Y)},fe=(Y,...he)=>{console.log(`WARN: ${Y}`,...he)},J=(Y,he)=>{Te[`${Y}/${he}`]||(console.log(`Deprecated as of ${Y}. ${he}`),Te[`${Y}/${he}`]=!0)},ne=new Error;function be(Y,he,{key:Le}){let Qe=0;const wt=Y[Le],lt={},qe={};for(let _e=1;_e<=he.length;_e++)qe[_e+Qe]=wt[_e],lt[_e+Qe]=!0,Qe+=R(he[_e-1]);Y[Le]=qe,Y[Le]._emit=lt,Y[Le]._multi=!0}function Ge(Y){if(Array.isArray(Y.begin)){if(Y.skip||Y.excludeBegin||Y.returnBegin)throw te("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ne;if(typeof Y.beginScope!="object"||Y.beginScope===null)throw te("beginScope must be object"),ne;be(Y,Y.begin,{key:"beginScope"}),Y.begin=M(Y.begin,{joinWith:""})}}function Ze(Y){if(Array.isArray(Y.end)){if(Y.skip||Y.excludeEnd||Y.returnEnd)throw te("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ne;if(typeof Y.endScope!="object"||Y.endScope===null)throw te("endScope must be object"),ne;be(Y,Y.end,{key:"endScope"}),Y.end=M(Y.end,{joinWith:""})}}function Xe(Y){Y.scope&&typeof Y.scope=="object"&&Y.scope!==null&&(Y.beginScope=Y.scope,delete Y.scope)}function vt(Y){Xe(Y),typeof Y.beginScope=="string"&&(Y.beginScope={_wrap:Y.beginScope}),typeof Y.endScope=="string"&&(Y.endScope={_wrap:Y.endScope}),Ge(Y),Ze(Y)}function Je(Y){function he(qe,_e){return new RegExp(m(qe),"m"+(Y.case_insensitive?"i":"")+(Y.unicodeRegex?"u":"")+(_e?"g":""))}class Le{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(_e,Se){Se.position=this.position++,this.matchIndexes[this.matchAt]=Se,this.regexes.push([Se,_e]),this.matchAt+=R(_e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const _e=this.regexes.map(Se=>Se[1]);this.matcherRe=he(M(_e,{joinWith:"|"}),!0),this.lastIndex=0}exec(_e){this.matcherRe.lastIndex=this.lastIndex;const Se=this.matcherRe.exec(_e);if(!Se)return null;const Ye=Se.findIndex((Pe,$e)=>$e>0&&Pe!==void 0),Me=this.matchIndexes[Ye];return Se.splice(0,Ye),Object.assign(Se,Me)}}class Qe{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 Se=new Le;return this.rules.slice(_e).forEach(([Ye,Me])=>Se.addRule(Ye,Me)),Se.compile(),this.multiRegexes[_e]=Se,Se}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(_e,Se){this.rules.push([_e,Se]),Se.type==="begin"&&this.count++}exec(_e){const Se=this.getMatcher(this.regexIndex);Se.lastIndex=this.lastIndex;let Ye=Se.exec(_e);if(this.resumingScanAtSamePosition()&&!(Ye&&Ye.index===this.lastIndex)){const Me=this.getMatcher(0);Me.lastIndex=this.lastIndex+1,Ye=Me.exec(_e)}return Ye&&(this.regexIndex+=Ye.position+1,this.regexIndex===this.count&&this.considerAll()),Ye}}function wt(qe){const _e=new Qe;return qe.contains.forEach(Se=>_e.addRule(Se.begin,{rule:Se,type:"begin"})),qe.terminatorEnd&&_e.addRule(qe.terminatorEnd,{type:"end"}),qe.illegal&&_e.addRule(qe.illegal,{type:"illegal"}),_e}function lt(qe,_e){const Se=qe;if(qe.isCompiled)return Se;[ae,Ae,vt,xe].forEach(Me=>Me(qe,_e)),Y.compilerExtensions.forEach(Me=>Me(qe,_e)),qe.__beforeBegin=null,[ye,we,Ee].forEach(Me=>Me(qe,_e)),qe.isCompiled=!0;let Ye=null;return typeof qe.keywords=="object"&&qe.keywords.$pattern&&(qe.keywords=Object.assign({},qe.keywords),Ye=qe.keywords.$pattern,delete qe.keywords.$pattern),Ye=Ye||/\w+/,qe.keywords&&(qe.keywords=je(qe.keywords,Y.case_insensitive)),Se.keywordPatternRe=he(Ye,!0),_e&&(qe.begin||(qe.begin=/\B|\b/),Se.beginRe=he(Se.begin),!qe.end&&!qe.endsWithParent&&(qe.end=/\B|\b/),qe.end&&(Se.endRe=he(Se.end)),Se.terminatorEnd=m(Se.end)||"",qe.endsWithParent&&_e.terminatorEnd&&(Se.terminatorEnd+=(qe.end?"|":"")+_e.terminatorEnd)),qe.illegal&&(Se.illegalRe=he(qe.illegal)),qe.contains||(qe.contains=[]),qe.contains=[].concat(...qe.contains.map(function(Me){return Tt(Me==="self"?qe:Me)})),qe.contains.forEach(function(Me){lt(Me,Se)}),qe.starts&<(qe.starts,_e),Se.matcher=wt(Se),Se}if(Y.compilerExtensions||(Y.compilerExtensions=[]),Y.contains&&Y.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return Y.classNameAliases=r(Y.classNameAliases||{}),lt(Y)}function mt(Y){return Y?Y.endsWithParent||mt(Y.starts):!1}function Tt(Y){return Y.variants&&!Y.cachedVariants&&(Y.cachedVariants=Y.variants.map(function(he){return r(Y,{variants:null},he)})),Y.cachedVariants?Y.cachedVariants:mt(Y)?r(Y,{starts:Y.starts?r(Y.starts):null}):Object.isFrozen(Y)?r(Y):Y}var st="11.11.1";class _t extends Error{constructor(he,Le){super(he),this.name="HTMLInjectionError",this.html=Le}}const Ot=n,ot=r,St=Symbol("nomatch"),Pt=7,jt=function(Y){const he=Object.create(null),Le=Object.create(null),Qe=[];let wt=!0;const lt="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 Se(Be){return _e.noHighlightRe.test(Be)}function Ye(Be){let at=Be.className+" ";at+=Be.parentNode?Be.parentNode.className:"";const $t=_e.languageDetectRe.exec(at);if($t){const sn=Sr($t[1]);return sn||(fe(lt.replace("{}",$t[1])),fe("Falling back to no-highlight mode for this block.",Be)),sn?$t[1]:"no-highlight"}return at.split(/\s+/).find(sn=>Se(sn)||Sr(sn))}function Me(Be,at,$t){let sn="",Pn="";typeof at=="object"?(sn=Be,$t=at.ignoreIllegals,Pn=at.language):(J("10.7.0","highlight(lang, code, ...args) has been deprecated."),J("10.7.0",`Please use highlight(code, options) instead.
|
|
58
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Pn=Be,sn=at),$t===void 0&&($t=!0);const fr={code:sn,language:Pn};Ao("before:highlight",fr);const Kr=fr.result?fr.result:Pe(fr.language,fr.code,$t);return Kr.code=fr.code,Ao("after:highlight",Kr),Kr}function Pe(Be,at,$t,sn){const Pn=Object.create(null);function fr(Ve,rt){return Ve.keywords[rt]}function Kr(){if(!yt.keywords){Hn.addText(on);return}let Ve=0;yt.keywordPatternRe.lastIndex=0;let rt=yt.keywordPatternRe.exec(on),Nt="";for(;rt;){Nt+=on.substring(Ve,rt.index);const Gt=ir.case_insensitive?rt[0].toLowerCase():rt[0],On=fr(yt,Gt);if(On){const[ai,iu]=On;if(Hn.addText(Nt),Nt="",Pn[Gt]=(Pn[Gt]||0)+1,Pn[Gt]<=Pt&&(Ps+=iu),ai.startsWith("_"))Nt+=rt[0];else{const Af=ir.classNameAliases[ai]||ai;Zr(rt[0],Af)}}else Nt+=rt[0];Ve=yt.keywordPatternRe.lastIndex,rt=yt.keywordPatternRe.exec(on)}Nt+=on.substring(Ve),Hn.addText(Nt)}function Ar(){if(on==="")return;let Ve=null;if(typeof yt.subLanguage=="string"){if(!he[yt.subLanguage]){Hn.addText(on);return}Ve=Pe(yt.subLanguage,on,!0,Nf[yt.subLanguage]),Nf[yt.subLanguage]=Ve._top}else Ve=kt(on,yt.subLanguage.length?yt.subLanguage:null);yt.relevance>0&&(Ps+=Ve.relevance),Hn.__addSublanguage(Ve._emitter,Ve.language)}function vn(){yt.subLanguage!=null?Ar():Kr(),on=""}function Zr(Ve,rt){Ve!==""&&(Hn.startScope(rt),Hn.addText(Ve),Hn.endScope())}function Rf(Ve,rt){let Nt=1;const Gt=rt.length-1;for(;Nt<=Gt;){if(!Ve._emit[Nt]){Nt++;continue}const On=ir.classNameAliases[Ve[Nt]]||Ve[Nt],ai=rt[Nt];On?Zr(ai,On):(on=ai,Kr(),on=""),Nt++}}function Na(Ve,rt){return Ve.scope&&typeof Ve.scope=="string"&&Hn.openNode(ir.classNameAliases[Ve.scope]||Ve.scope),Ve.beginScope&&(Ve.beginScope._wrap?(Zr(on,ir.classNameAliases[Ve.beginScope._wrap]||Ve.beginScope._wrap),on=""):Ve.beginScope._multi&&(Rf(Ve.beginScope,rt),on="")),yt=Object.create(Ve,{parent:{value:yt}}),yt}function tu(Ve,rt,Nt){let Gt=_(Ve.endRe,Nt);if(Gt){if(Ve["on:end"]){const On=new t(Ve);Ve["on:end"](rt,On),On.isMatchIgnored&&(Gt=!1)}if(Gt){for(;Ve.endsParent&&Ve.parent;)Ve=Ve.parent;return Ve}}if(Ve.endsWithParent)return tu(Ve.parent,rt,Nt)}function Aa(Ve){return yt.matcher.regexIndex===0?(on+=Ve[0],1):($s=!0,0)}function Rm(Ve){const rt=Ve[0],Nt=Ve.rule,Gt=new t(Nt),On=[Nt.__beforeBegin,Nt["on:begin"]];for(const ai of On)if(ai&&(ai(Ve,Gt),Gt.isMatchIgnored))return Aa(rt);return Nt.skip?on+=rt:(Nt.excludeBegin&&(on+=rt),vn(),!Nt.returnBegin&&!Nt.excludeBegin&&(on=rt)),Na(Nt,Ve),Nt.returnBegin?0:rt.length}function Or(Ve){const rt=Ve[0],Nt=at.substring(Ve.index),Gt=tu(yt,Ve,Nt);if(!Gt)return St;const On=yt;yt.endScope&&yt.endScope._wrap?(vn(),Zr(rt,yt.endScope._wrap)):yt.endScope&&yt.endScope._multi?(vn(),Rf(yt.endScope,Ve)):On.skip?on+=rt:(On.returnEnd||On.excludeEnd||(on+=rt),vn(),On.excludeEnd&&(on=rt));do yt.scope&&Hn.closeNode(),!yt.skip&&!yt.subLanguage&&(Ps+=yt.relevance),yt=yt.parent;while(yt!==Gt.parent);return Gt.starts&&Na(Gt.starts,Ve),On.returnEnd?0:rt.length}function nu(){const Ve=[];for(let rt=yt;rt!==ir;rt=rt.parent)rt.scope&&Ve.unshift(rt.scope);Ve.forEach(rt=>Hn.openNode(rt))}let Oo={};function Oa(Ve,rt){const Nt=rt&&rt[0];if(on+=Ve,Nt==null)return vn(),0;if(Oo.type==="begin"&&rt.type==="end"&&Oo.index===rt.index&&Nt===""){if(on+=at.slice(rt.index,rt.index+1),!wt){const Gt=new Error(`0 width match regex (${Be})`);throw Gt.languageName=Be,Gt.badRule=Oo.rule,Gt}return 1}if(Oo=rt,rt.type==="begin")return Rm(rt);if(rt.type==="illegal"&&!$t){const Gt=new Error('Illegal lexeme "'+Nt+'" for mode "'+(yt.scope||"<unnamed>")+'"');throw Gt.mode=yt,Gt}else if(rt.type==="end"){const Gt=Or(rt);if(Gt!==St)return Gt}if(rt.type==="illegal"&&Nt==="")return on+=`
|
|
59
|
+
`,1;if(ru>1e5&&ru>rt.index*3)throw new Error("potential infinite loop, way more iterations than matches");return on+=Nt,Nt.length}const ir=Sr(Be);if(!ir)throw te(lt.replace("{}",Be)),new Error('Unknown language: "'+Be+'"');const Cf=Je(ir);let Ia="",yt=sn||Cf;const Nf={},Hn=new _e.__emitter(_e);nu();let on="",Ps=0,ss=0,ru=0,$s=!1;try{if(ir.__emitTokens)ir.__emitTokens(at,Hn);else{for(yt.matcher.considerAll();;){ru++,$s?$s=!1:yt.matcher.considerAll(),yt.matcher.lastIndex=ss;const Ve=yt.matcher.exec(at);if(!Ve)break;const rt=at.substring(ss,Ve.index),Nt=Oa(rt,Ve);ss=Ve.index+Nt}Oa(at.substring(ss))}return Hn.finalize(),Ia=Hn.toHTML(),{language:Be,value:Ia,relevance:Ps,illegal:!1,_emitter:Hn,_top:yt}}catch(Ve){if(Ve.message&&Ve.message.includes("Illegal"))return{language:Be,value:Ot(at),illegal:!0,relevance:0,_illegalBy:{message:Ve.message,index:ss,context:at.slice(ss-100,ss+100),mode:Ve.mode,resultSoFar:Ia},_emitter:Hn};if(wt)return{language:Be,value:Ot(at),illegal:!1,relevance:0,errorRaised:Ve,_emitter:Hn,_top:yt};throw Ve}}function $e(Be){const at={value:Ot(Be),illegal:!1,relevance:0,_top:qe,_emitter:new _e.__emitter(_e)};return at._emitter.addText(Be),at}function kt(Be,at){at=at||_e.languages||Object.keys(he);const $t=$e(Be),sn=at.filter(Sr).filter(js).map(vn=>Pe(vn,Be,!1));sn.unshift($t);const Pn=sn.sort((vn,Zr)=>{if(vn.relevance!==Zr.relevance)return Zr.relevance-vn.relevance;if(vn.language&&Zr.language){if(Sr(vn.language).supersetOf===Zr.language)return 1;if(Sr(Zr.language).supersetOf===vn.language)return-1}return 0}),[fr,Kr]=Pn,Ar=fr;return Ar.secondBest=Kr,Ar}function Ht(Be,at,$t){const sn=at&&Le[at]||$t;Be.classList.add("hljs"),Be.classList.add(`language-${sn}`)}function bt(Be){let at=null;const $t=Ye(Be);if(Se($t))return;if(Ao("before:highlightElement",{el:Be,language:$t}),Be.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Be);return}if(Be.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(Be)),_e.throwUnescapedHTML))throw new _t("One of your code blocks includes unescaped HTML.",Be.innerHTML);at=Be;const sn=at.textContent,Pn=$t?Me(sn,{language:$t,ignoreIllegals:!0}):kt(sn);Be.innerHTML=Pn.value,Be.dataset.highlighted="yes",Ht(Be,$t,Pn.language),Be.result={language:Pn.language,re:Pn.relevance,relevance:Pn.relevance},Pn.secondBest&&(Be.secondBest={language:Pn.secondBest.language,relevance:Pn.secondBest.relevance}),Ao("after:highlightElement",{el:Be,result:Pn,text:sn})}function Yt(Be){_e=ot(_e,Be)}const zn=()=>{Nr(),J("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Wr(){Nr(),J("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let An=!1;function Nr(){function Be(){Nr()}if(document.readyState==="loading"){An||window.addEventListener("DOMContentLoaded",Be,!1),An=!0;return}document.querySelectorAll(_e.cssSelector).forEach(bt)}function Ca(Be,at){let $t=null;try{$t=at(Y)}catch(sn){if(te("Language definition for '{}' could not be registered.".replace("{}",Be)),wt)te(sn);else throw sn;$t=qe}$t.name||($t.name=Be),he[Be]=$t,$t.rawDefinition=at.bind(null,Y),$t.aliases&&rs($t.aliases,{languageName:Be})}function ns(Be){delete he[Be];for(const at of Object.keys(Le))Le[at]===Be&&delete Le[at]}function eu(){return Object.keys(he)}function Sr(Be){return Be=(Be||"").toLowerCase(),he[Be]||he[Le[Be]]}function rs(Be,{languageName:at}){typeof Be=="string"&&(Be=[Be]),Be.forEach($t=>{Le[$t.toLowerCase()]=at})}function js(Be){const at=Sr(Be);return at&&!at.disableAutodetect}function Ls(Be){Be["before:highlightBlock"]&&!Be["before:highlightElement"]&&(Be["before:highlightElement"]=at=>{Be["before:highlightBlock"](Object.assign({block:at.el},at))}),Be["after:highlightBlock"]&&!Be["after:highlightElement"]&&(Be["after:highlightElement"]=at=>{Be["after:highlightBlock"](Object.assign({block:at.el},at))})}function qn(Be){Ls(Be),Qe.push(Be)}function _f(Be){const at=Qe.indexOf(Be);at!==-1&&Qe.splice(at,1)}function Ao(Be,at){const $t=Be;Qe.forEach(function(sn){sn[$t]&&sn[$t](at)})}function is(Be){return J("10.7.0","highlightBlock will be removed entirely in v12.0"),J("10.7.0","Please use highlightElement now."),bt(Be)}Object.assign(Y,{highlight:Me,highlightAuto:kt,highlightAll:Nr,highlightElement:bt,highlightBlock:is,configure:Yt,initHighlighting:zn,initHighlightingOnLoad:Wr,registerLanguage:Ca,unregisterLanguage:ns,listLanguages:eu,getLanguage:Sr,registerAliases:rs,autoDetection:js,inherit:ot,addPlugin:qn,removePlugin:_f}),Y.debugMode=function(){wt=!1},Y.safeMode=function(){wt=!0},Y.versionString=st,Y.regex={concat:S,lookahead:b,either:T,optional:x,anyNumberOfTimes:y};for(const Be in ge)typeof ge[Be]=="object"&&e(ge[Be]);return Object.assign(Y,ge),Y},Dt=jt({});return Dt.newInstance=()=>jt({}),$y=Dt,Dt.HighlightJS=Dt,Dt.default=Dt,$y}var zre=Dre();const jre=ef(zre),KR={},Lre="hljs-";function Pre(e){const t=jre.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:s,register:a,registerAlias:l,registered:c};function n(d,f,h){const m=h||KR,b=typeof m.prefix=="string"?m.prefix:Lre;if(!t.getLanguage(d))throw new Error("Unknown language: `"+d+"` is not registered");t.configure({__emitter:$re,classPrefix:b});const y=t.highlight(f,{ignoreIllegals:!0,language:d});if(y.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:y.errorRaised});const x=y._emitter.root,S=x.data;return S.language=y.language,S.relevance=y.relevance,x}function r(d,f){const m=(f||KR).subset||s();let b=-1,y=0,x;for(;++b<m.length;){const S=m[b];if(!t.getLanguage(S))continue;const E=n(S,d,f);E.data&&E.data.relevance!==void 0&&E.data.relevance>y&&(y=E.data.relevance,x=E)}return x||{type:"root",children:[],data:{language:void 0,relevance:y}}}function s(){return t.listLanguages()}function a(d,f){if(typeof d=="string")t.registerLanguage(d,f);else{let h;for(h in d)Object.hasOwn(d,h)&&t.registerLanguage(h,d[h])}}function l(d,f){if(typeof d=="string")t.registerAliases(typeof f=="string"?f:[...f],{languageName:d});else{let h;for(h in d)if(Object.hasOwn(d,h)){const m=d[h];t.registerAliases(typeof m=="string"?m:[...m],{languageName:h})}}}function c(d){return!!t.getLanguage(d)}}class $re{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 Bre={};function Fre(e){const t=e||Bre,n=t.aliases,r=t.detect||!1,s=t.languages||Mre,a=t.plainText,l=t.prefix,c=t.subset;let d="hljs";const f=Pre(s);if(n&&f.registerAlias(n),l){const h=l.indexOf("-");d=h===-1?l:l.slice(0,h)}return function(h,m){Tm(h,"element",function(b,y,x){if(b.tagName!=="code"||!x||x.type!=="element"||x.tagName!=="pre")return;const S=Ure(b);if(S===!1||!S&&!r||S&&a&&a.includes(S))return;Array.isArray(b.properties.className)||(b.properties.className=[]),b.properties.className.includes(d)||b.properties.className.unshift(d);const E=one(b,{whitespace:"pre"});let T;try{T=S?f.highlight(S,E,{prefix:l}):f.highlightAuto(E,{prefix:l,subset:c})}catch(R){const _=R;if(S&&/Unknown language/.test(_.message)){m.message("Cannot highlight as `"+S+"`, it’s not registered",{ancestors:[x,b],cause:_,place:b.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw _}!S&&T.data&&T.data.language&&b.properties.className.push("language-"+T.data.language),T.children.length>0&&(b.children=T.children)})}}function Ure(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 ZR(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 qre(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Hre(e,t,n){const s=Sf((n||{}).ignore||[]),a=Gre(t);let l=-1;for(;++l<a.length;)LD(e,"text",c);function c(f,h){let m=-1,b;for(;++m<h.length;){const y=h[m],x=b?b.children:void 0;if(s(y,x?x.indexOf(y):void 0,b))return;b=y}if(b)return d(f,h)}function d(f,h){const m=h[h.length-1],b=a[l][0],y=a[l][1];let x=0;const E=m.children.indexOf(f);let T=!1,R=[];b.lastIndex=0;let _=b.exec(f.value);for(;_;){const C=_.index,M={index:_.index,input:_.input,stack:[...h,f]};let A=y(..._,M);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?b.lastIndex=C+1:(x!==C&&R.push({type:"text",value:f.value.slice(x,C)}),Array.isArray(A)?R.push(...A):A&&R.push(A),x=C+_[0].length,T=!0),!b.global)break;_=b.exec(f.value)}return T?(x<f.value.length&&R.push({type:"text",value:f.value.slice(x)}),m.children.splice(E,1,...R)):R=[f],E+R.length}}function Gre(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([Vre(s[0]),Wre(s[1])])}return t}function Vre(e){return typeof e=="string"?new RegExp(qre(e),"g"):e}function Wre(e){return typeof e=="function"?e:function(){return e}}const By="phrasing",Fy=["autolink","link","image","label"];function Kre(){return{transforms:[tie],enter:{literalAutolink:Yre,literalAutolinkEmail:Uy,literalAutolinkHttp:Uy,literalAutolinkWww:Uy},exit:{literalAutolink:eie,literalAutolinkEmail:Jre,literalAutolinkHttp:Xre,literalAutolinkWww:Qre}}}function Zre(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:By,notInConstruct:Fy},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:By,notInConstruct:Fy},{character:":",before:"[ps]",after:"\\/",inConstruct:By,notInConstruct:Fy}]}}function Yre(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Uy(e){this.config.enter.autolinkProtocol.call(this,e)}function Xre(e){this.config.exit.autolinkProtocol.call(this,e)}function Qre(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 Jre(e){this.config.exit.autolinkEmail.call(this,e)}function eie(e){this.exit(e)}function tie(e){Hre(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,nie],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),rie]],{ignore:["link","linkReference"]})}function nie(e,t,n,r,s){let a="";if(!oz(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!iie(n)))return!1;const l=sie(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 rie(e,t,n,r){return!oz(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function iie(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 sie(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=ZR(e,"(");let a=ZR(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 oz(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ba(n)||xm(n))&&(!t||n!==47)}az.peek=hie;function oie(){this.buffer()}function aie(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function lie(){this.buffer()}function uie(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function cie(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Oi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function fie(e){this.exit(e)}function die(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Oi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function pie(e){this.exit(e)}function hie(){return"["}function az(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 mie(){return{enter:{gfmFootnoteCallString:oie,gfmFootnoteCall:aie,gfmFootnoteDefinitionLabelString:lie,gfmFootnoteDefinition:uie},exit:{gfmFootnoteCallString:cie,gfmFootnoteCall:fie,gfmFootnoteDefinitionLabelString:die,gfmFootnoteDefinition:pie}}}function gie(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:az},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,l){const c=a.createTracker(l);let d=c.move("[^");const f=a.enter("footnoteDefinition"),h=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),h(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
60
|
+
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?lz:bie))),f(),d}}function bie(e,t,n){return t===0?e:lz(e,t,n)}function lz(e,t,n){return(n?"":" ")+e}const yie=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];uz.peek=wie;function vie(){return{canContainEols:["delete"],enter:{strikethrough:xie},exit:{strikethrough:Sie}}}function kie(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:yie}],handlers:{delete:uz}}}function xie(e){this.enter({type:"delete",children:[]},e)}function Sie(e){this.exit(e)}function uz(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 wie(){return"~"}function Eie(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||_ie,s=[],a=[],l=[],c=[];let d=0,f=-1;for(;++f<e.length;){const x=[],S=[];let E=-1;for(e[f].length>d&&(d=e[f].length);++E<e[f].length;){const T=Tie(e[f][E]);if(t.alignDelimiters!==!1){const R=r(T);S[E]=R,(c[E]===void 0||R>c[E])&&(c[E]=R)}x.push(T)}a[f]=x,l[f]=S}let h=-1;if(typeof n=="object"&&"length"in n)for(;++h<d;)s[h]=YR(n[h]);else{const x=YR(n);for(;++h<d;)s[h]=x}h=-1;const m=[],b=[];for(;++h<d;){const x=s[h];let S="",E="";x===99?(S=":",E=":"):x===108?S=":":x===114&&(E=":");let T=t.alignDelimiters===!1?1:Math.max(1,c[h]-S.length-E.length);const R=S+"-".repeat(T)+E;t.alignDelimiters!==!1&&(T=S.length+T+E.length,T>c[h]&&(c[h]=T),b[h]=T),m[h]=R}a.splice(1,0,m),l.splice(1,0,b),f=-1;const y=[];for(;++f<a.length;){const x=a[f],S=l[f];h=-1;const E=[];for(;++h<d;){const T=x[h]||"";let R="",_="";if(t.alignDelimiters!==!1){const C=c[h]-(S[h]||0),M=s[h];M===114?R=" ".repeat(C):M===99?C%2?(R=" ".repeat(C/2+.5),_=" ".repeat(C/2-.5)):(R=" ".repeat(C/2),_=R):_=" ".repeat(C)}t.delimiterStart!==!1&&!h&&E.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&T==="")&&(t.delimiterStart!==!1||h)&&E.push(" "),t.alignDelimiters!==!1&&E.push(R),E.push(T),t.alignDelimiters!==!1&&E.push(_),t.padding!==!1&&E.push(" "),(t.delimiterEnd!==!1||h!==d-1)&&E.push("|")}y.push(t.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return y.join(`
|
|
61
|
+
`)}function Tie(e){return e==null?"":String(e)}function _ie(e){return e.length}function YR(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 Rie(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()),Cie);return s(),l}function Cie(e,t,n){return">"+(n?"":" ")+e}function Nie(e,t){return XR(e,t.inConstruct,!0)&&!XR(e,t.notInConstruct,!1)}function XR(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 QR(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
62
|
+
`&&Nie(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
63
|
+
`}function Aie(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 Oie(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 Iie(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 Mie(e,t,n,r){const s=Iie(n),a=e.value||"",l=s==="`"?"GraveAccent":"Tilde";if(Oie(e,n)){const m=n.enter("codeIndented"),b=n.indentLines(a,Die);return m(),b}const c=n.createTracker(r),d=s.repeat(Math.max(Aie(a,s)+1,3)),f=n.enter("codeFenced");let h=c.move(d);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(d),f(),h}function Die(e,t,n){return(n?"":" ")+e}function Yx(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 zie(e,t,n,r){const s=Yx(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),{before:f,after:"]",...d.current()})),f+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":`
|
|
67
|
+
`,...d.current()}))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,{before:f,after:s,...d.current()})),f+=d.move(s),c()),l(),f}function jie(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 Qc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function _h(e,t,n){const r=ql(e),s=ql(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}}cz.peek=Lie;function cz(e,t,n,r){const s=jie(n),a=n.enter("emphasis"),l=n.createTracker(r),c=l.move(s);let d=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const f=d.charCodeAt(0),h=_h(r.before.charCodeAt(r.before.length-1),f,s);h.inside&&(d=Qc(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=_h(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+Qc(m));const y=l.move(s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:h.outside},c+d+y}function Lie(e,t,n){return n.options.emphasis||"*"}function Pie(e,t){let n=!1;return Tm(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,qv}),!!((!e.depth||e.depth<3)&&Bx(e)&&(t.options.setext||n))}function $ie(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Pie(e,n)){const h=n.enter("headingSetext"),m=n.enter("phrasing"),b=n.containerPhrasing(e,{...a.current(),before:`
|
|
68
|
+
`,after:`
|
|
69
|
+
`});return m(),h(),b+`
|
|
70
|
+
`+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
71
|
+
`))+1))}const l="#".repeat(s),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(l+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
|
72
|
+
`,...a.current()});return/^[\t ]/.test(f)&&(f=Qc(f.charCodeAt(0))+f.slice(1)),f=f?l+" "+f:l,n.options.closeAtx&&(f+=" "+l),d(),c(),f}fz.peek=Bie;function fz(e){return e.value||""}function Bie(){return"<"}dz.peek=Fie;function dz(e,t,n,r){const s=Yx(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,{before:f,after:"]",...d.current()})),f+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":")",...d.current()}))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,{before:f,after:s,...d.current()})),f+=d.move(s),c()),f+=d.move(")"),l(),f}function Fie(){return"!"}pz.peek=Uie;function pz(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,{before:d,after:"]",...c.current()});d+=c.move(f+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!f||f!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function Uie(){return"!"}hz.peek=qie;function hz(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 d;if(l.atBreak)for(;d=c.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return s+r+s}function qie(){return"`"}function mz(e,t){const n=Bx(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))}gz.peek=Hie;function gz(e,t,n,r){const s=Yx(n),a=s==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,d;if(mz(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"),d=n.enter("label");let f=l.move("[");return f+=l.move(n.containerPhrasing(e,{before:f,after:"](",...l.current()})),f+=l.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=l.move("<"),f+=l.move(n.safe(e.url,{before:f,after:">",...l.current()})),f+=l.move(">")):(d=n.enter("destinationRaw"),f+=l.move(n.safe(e.url,{before:f,after:e.title?" ":")",...l.current()}))),d(),e.title&&(d=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),d()),f+=l.move(")"),c(),f}function Hie(e,t,n){return mz(e,n)?"<":"["}bz.peek=Gie;function bz(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,{before:d,after:"]",...c.current()});d+=c.move(f+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!f||f!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function Gie(){return"["}function Xx(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 Vie(e){const t=Xx(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 Wie(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 yz(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 Kie(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let l=e.ordered?Wie(n):Xx(n);const c=e.ordered?l==="."?")":".":Vie(n);let d=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&&(d=!0),yz(n)===l&&h){let m=-1;for(;++m<e.children.length;){const b=e.children[m];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(l=c),n.bulletCurrent=l;const f=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=a,s(),f}function Zie(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 Yie(e,t,n,r){const s=Zie(n);let a=n.bulletCurrent||Xx(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 d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),h);return d(),f;function h(m,b,y){return b?(y?"":" ".repeat(l))+m:(y?a:a+" ".repeat(l-a.length))+m}}function Xie(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),l=n.containerPhrasing(e,r);return a(),s(),l}const Qie=Sf(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Jie(e,t,n,r){return(e.children.some(function(l){return Qie(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ese(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}vz.peek=tse;function vz(e,t,n,r){const s=ese(n),a=n.enter("strong"),l=n.createTracker(r),c=l.move(s+s);let d=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const f=d.charCodeAt(0),h=_h(r.before.charCodeAt(r.before.length-1),f,s);h.inside&&(d=Qc(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=_h(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+Qc(m));const y=l.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:h.outside},c+d+y}function tse(e,t,n){return n.options.strong||"*"}function nse(e,t,n,r){return n.safe(e.value,r)}function rse(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 ise(e,t,n){const r=(yz(n)+(n.options.ruleSpaces?" ":"")).repeat(rse(n));return n.options.ruleSpaces?r.slice(0,-1):r}const kz={blockquote:Rie,break:QR,code:Mie,definition:zie,emphasis:cz,hardBreak:QR,heading:$ie,html:fz,image:dz,imageReference:pz,inlineCode:hz,link:gz,linkReference:bz,list:Kie,listItem:Yie,paragraph:Xie,root:Jie,strong:vz,text:nse,thematicBreak:ise};function sse(){return{enter:{table:ose,tableData:JR,tableHeader:JR,tableRow:lse},exit:{codeText:use,table:ase,tableData:qy,tableHeader:qy,tableRow:qy}}}function ose(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 ase(e){this.exit(e),this.data.inTable=void 0}function lse(e){this.enter({type:"tableRow",children:[]},e)}function qy(e){this.exit(e)}function JR(e){this.enter({type:"tableCell",children:[]},e)}function use(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,cse));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function cse(e,t){return t==="|"?t:e}function fse(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:b,table:l,tableCell:d,tableRow:c}};function l(y,x,S,E){return f(h(y,S,E),y.align)}function c(y,x,S,E){const T=m(y,S,E),R=f([T]);return R.slice(0,R.indexOf(`
|
|
74
|
+
`))}function d(y,x,S,E){const T=S.enter("tableCell"),R=S.enter("phrasing"),_=S.containerPhrasing(y,{...E,before:a,after:a});return R(),T(),_}function f(y,x){return Eie(y,{align:x,alignDelimiters:r,padding:n,stringLength:s})}function h(y,x,S){const E=y.children;let T=-1;const R=[],_=x.enter("table");for(;++T<E.length;)R[T]=m(E[T],x,S);return _(),R}function m(y,x,S){const E=y.children;let T=-1;const R=[],_=x.enter("tableRow");for(;++T<E.length;)R[T]=d(E[T],y,x,S);return _(),R}function b(y,x,S){let E=kz.inlineCode(y,x,S);return S.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function dse(){return{exit:{taskListCheckValueChecked:eC,taskListCheckValueUnchecked:eC,paragraph:hse}}}function pse(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:mse}}}function eC(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function hse(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 mse(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 d=kz.listItem(e,t,n,{...r,...c.current()});return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(h){return h+l}}function gse(){return[Kre(),mie(),vie(),sse(),dse()]}function bse(e){return{extensions:[Zre(),gie(e),kie(),fse(e),pse()]}}const yse={tokenize:Ese,partial:!0},xz={tokenize:Tse,partial:!0},Sz={tokenize:_se,partial:!0},wz={tokenize:Rse,partial:!0},vse={tokenize:Cse,partial:!0},Ez={name:"wwwAutolink",tokenize:Sse,previous:_z},Tz={name:"protocolAutolink",tokenize:wse,previous:Rz},zs={name:"emailAutolink",tokenize:xse,previous:Cz},ts={};function kse(){return{text:ts}}let Yo=48;for(;Yo<123;)ts[Yo]=zs,Yo++,Yo===58?Yo=65:Yo===91&&(Yo=97);ts[43]=zs;ts[45]=zs;ts[46]=zs;ts[95]=zs;ts[72]=[zs,Tz];ts[104]=[zs,Tz];ts[87]=[zs,Ez];ts[119]=[zs,Ez];function xse(e,t,n){const r=this;let s,a;return l;function l(m){return!Kv(m)||!Cz.call(r,r.previous)||Qx(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return Kv(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(vse,h,f)(m):m===45||m===95||br(m)?(a=!0,e.consume(m),d):h(m)}function f(m){return e.consume(m),s=!0,d}function h(m){return a&&s&&Rr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function Sse(e,t,n){const r=this;return s;function s(l){return l!==87&&l!==119||!_z.call(r,r.previous)||Qx(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(yse,e.attempt(xz,e.attempt(Sz,a),n),n)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function wse(e,t,n){const r=this;let s="",a=!1;return l;function l(m){return(m===72||m===104)&&Rz.call(r,r.previous)&&!Qx(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(Rr(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||xh(m)||yn(m)||ba(m)||xm(m)?n(m):e.attempt(xz,e.attempt(Sz,h),n)(m)}function h(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function Ese(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 Tse(e,t,n){let r,s,a;return l;function l(f){return f===46||f===95?e.check(wz,d,c)(f):f===null||yn(f)||ba(f)||f!==45&&xm(f)?d(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 d(f){return s||r||!a?n(f):t(f)}}function _se(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(wz,t,a)(l):l===null||yn(l)||ba(l)?t(l):(e.consume(l),s)}function a(l){return l===41&&r++,e.consume(l),s}}function Rse(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||yn(c)||ba(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||yn(c)||ba(c)?t(c):r(c)}function a(c){return Rr(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):Rr(c)?(e.consume(c),l):n(c)}}function Cse(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return br(a)?n(a):t(a)}}function _z(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||yn(e)}function Rz(e){return!Rr(e)}function Cz(e){return!(e===47||Kv(e))}function Kv(e){return e===43||e===45||e===46||e===95||br(e)}function Qx(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 Nse={tokenize:Lse,partial:!0};function Ase(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Dse,continuation:{tokenize:zse},exit:jse}},text:{91:{name:"gfmFootnoteCall",tokenize:Mse},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Ose,resolveTo:Ise}}}}function Ose(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;s--;){const d=r.events[s][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!l||!l._balanced)return n(d);const f=Oi(r.sliceSerialize({start:l.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function Ise(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 Mse(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"),d}function d(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||yn(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(Oi(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return yn(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 Dse(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,c;return d;function d(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||yn(x))return n(x);if(x===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=Oi(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return yn(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 b(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),s.includes(a)||s.push(a),Qt(e,y,"gfmFootnoteDefinitionWhitespace")):n(x)}function y(x){return t(x)}}function zse(e,t,n){return e.check(xf,t,e.attempt(Nse,t,n))}function jse(e){e.exit("gfmFootnoteDefinition")}function Lse(e,t,n){const r=this;return Qt(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 Pse(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 d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let f=d;for(;f--;)if(l[f][0]==="exit"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[f][1].end.offset-l[f][1].start.offset){l[d][1].type="strikethroughSequence",l[f][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},l[f][1].start),end:Object.assign({},l[d][1].end)},m={type:"strikethroughText",start:Object.assign({},l[f][1].end),end:Object.assign({},l[d][1].start)},b=[["enter",h,c],["enter",l[f][1],c],["exit",l[f][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&oi(b,b.length,0,Sm(y,l.slice(f+1,d),c)),oi(b,b.length,0,[["exit",m,c],["enter",l[d][1],c],["exit",l[d][1],c],["exit",h,c]]),oi(l,f-1,d-f+3,b),d=f+b.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function a(l,c,d){const f=this.previous,h=this.events;let m=0;return b;function b(x){return f===126&&h[h.length-1][1].type!=="characterEscape"?d(x):(l.enter("strikethroughSequenceTemporary"),y(x))}function y(x){const S=ql(f);if(x===126)return m>1?d(x):(l.consume(x),m++,y);if(m<2&&!n)return d(x);const E=l.exit("strikethroughSequenceTemporary"),T=ql(x);return E._open=!T||T===2&&!!S,E._close=!S||S===2&&!!T,c(x)}}}class $se{constructor(){this.map=[]}add(t,n,r){Bse(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 Bse(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 Fse(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 Use(){return{flow:{null:{name:"table",tokenize:qse,resolveAll:Hse}}}}function qse(e,t,n){const r=this;let s=0,a=0,l;return c;function c(D){let H=r.events.length-1;for(;H>-1;){const L=r.events[H][1].type;if(L==="lineEnding"||L==="linePrefix")H--;else break}const W=H>-1?r.events[H][1].type:null,F=W==="tableHead"||W==="tableRow"?A:d;return F===A&&r.parser.lazy[r.now().line]?n(D):F(D)}function d(D){return e.enter("tableHead"),e.enter("tableRow"),f(D)}function f(D){return D===124||(l=!0,a+=1),h(D)}function h(D){return D===null?n(D):ht(D)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),y):n(D):qt(D)?Qt(e,h,"whitespace")(D):(a+=1,l&&(l=!1,s+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),l=!0,h):(e.enter("data"),m(D)))}function m(D){return D===null||D===124||yn(D)?(e.exit("data"),h(D)):(e.consume(D),D===92?b:m)}function b(D){return D===92||D===124?(e.consume(D),m):m(D)}function y(D){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(D):(e.enter("tableDelimiterRow"),l=!1,qt(D)?Qt(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):x(D))}function x(D){return D===45||D===58?E(D):D===124?(l=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),S):M(D)}function S(D){return qt(D)?Qt(e,E,"whitespace")(D):E(D)}function E(D){return D===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),T):D===45?(a+=1,T(D)):D===null||ht(D)?C(D):M(D)}function T(D){return D===45?(e.enter("tableDelimiterFiller"),R(D)):M(D)}function R(D){return D===45?(e.consume(D),R):D===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),_):(e.exit("tableDelimiterFiller"),_(D))}function _(D){return qt(D)?Qt(e,C,"whitespace")(D):C(D)}function C(D){return D===124?x(D):D===null||ht(D)?!l||s!==a?M(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(D)):M(D)}function M(D){return n(D)}function A(D){return e.enter("tableRow"),N(D)}function N(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),N):D===null||ht(D)?(e.exit("tableRow"),t(D)):qt(D)?Qt(e,N,"whitespace")(D):(e.enter("data"),P(D))}function P(D){return D===null||D===124||yn(D)?(e.exit("data"),N(D)):(e.consume(D),D===92?z:P)}function z(D){return D===92||D===124?(e.consume(D),P):P(D)}}function Hse(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],l=[0,0,0,0],c=!1,d=0,f,h,m;const b=new $se;for(;++n<e.length;){const y=e[n],x=y[1];y[0]==="enter"?x.type==="tableHead"?(c=!1,d!==0&&(tC(b,t,d,f,h),h=void 0,d=0),f={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},b.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)},b.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=xp(b,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=xp(b,t,a,s,void 0,m)),a=l,l=[a[1],n,0,0])):x.type==="tableHead"?(c=!0,d=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(d=n,a[1]!==0?(l[0]=l[1],m=xp(b,t,a,s,n,m)):l[1]!==0&&(m=xp(b,t,l,s,n,m)),s=0):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&tC(b,t,d,f,h),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=Fse(t.events,n))}return e}function xp(e,t,n,r,s,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},vl(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=vl(t.events,n[1]);if(a={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=vl(t.events,n[2]),h=vl(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 b=t.events[n[2]],y=t.events[n[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,S=n[3]-n[2]-1;e.add(x,S,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},vl(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function tC(e,t,n,r,s){const a=[],l=vl(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 vl(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Gse={name:"tasklistCheck",tokenize:Wse};function Vse(){return{text:{91:Gse}}}function Wse(e,t,n){const r=this;return s;function s(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return yn(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return ht(d)?t(d):qt(d)?e.check({tokenize:Kse},t,n)(d):n(d)}}function Kse(e,t,n){return Qt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function Zse(e){return yD([kse(),Ase(),Pse(e),Use(),Vse()])}const Yse={};function Xse(e){const t=this,n=e||Yse,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(Zse(n)),a.push(gse()),l.push(bse(n))}function Qse(e){return g.jsx("div",{className:"md-table-wrap",children:g.jsx("table",{...e})})}function Nz(e){return g.jsx("span",{className:"md-cell",children:e})}function Jse({children:e,...t}){return g.jsx("th",{...t,children:Nz(e)})}function eoe({children:e,...t}){return g.jsx("td",{...t,children:Nz(e)})}function Zv(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(Zv).join(""):v.isValidElement(e)?Zv(e.props.children):""}function toe({children:e,...t}){const[n,r]=v.useState(!1),s=v.useRef(void 0),a=v.useCallback(()=>{navigator.clipboard.writeText(Zv(e)),r(!0),clearTimeout(s.current),s.current=setTimeout(()=>r(!1),2e3)},[e]);return g.jsxs("div",{className:"md-pre-wrap",children:[g.jsx("pre",{...t,children:e}),g.jsx("span",{className:"md-copy",children:g.jsx(kr,{icon:n?"check":"copy",size:"sm",variant:"ghost","aria-label":n?"Copied":"Copy code",onClick:a})})]})}const noe={table:Qse,th:Jse,td:eoe,pre:toe,a:ga},Hl=v.memo(function({text:t,className:n}){return g.jsx("div",{className:n?`md ${n}`:"md",children:g.jsx(Zte,{remarkPlugins:[Xse],rehypePlugins:[[Fre,{detect:!1}]],components:noe,children:t??""})})});function roe(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 Ef(e){const[t,n]=v.useState(()=>Date.now()),r=e.status==="running"||e.status==="awaiting";v.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 Ra({status:e}){const t=roe(e);return g.jsx(tn,{name:t.name,color:t.color,...t.modifier?{modifier:t.modifier}:{}})}function Tf({callId:e}){return g.jsxs("div",{className:"approval-bar",children:[g.jsx("span",{children:"Awaiting human approval"}),g.jsx(Cn,{variant:"secondary",tone:"success",size:"sm",onClick:()=>{nt.submitApproval(e,"approve")},children:"Approve"}),g.jsx(Cn,{variant:"secondary",tone:"danger",size:"sm",onClick:()=>{nt.submitApproval(e,"deny")},children:"Deny"})]})}function Jx(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function Ml(e,...t){if(!e)return"";for(const n of t){const r=e[n];if(typeof r=="string"&&r.trim()!=="")return r}return""}const ioe=Object.assign({}),Az=new Map;for(const[e,t]of Object.entries(ioe)){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&&Az.set(s,t.default)}function soe(e){return e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.command=="string"?e.command:typeof e=="string"?e:""}function nC(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 ooe(e){const t=nC(e.outputRaw);if(t)return t;if(e.output)try{return nC(JSON.parse(e.output))}catch{}return null}function rC(e){return e.replace(/[\s\uFEFF\u00A0]+$/,"")}const aoe=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=Ef(t),a=soe(t.args),l=ooe(t),c=rC(l?.stdout??""),d=rC(l?.stderr??""),f=l?.exitCode!=null&&l.exitCode!==0,h=t.status==="done"&&f?"error":t.status,m=[a?Ni(a,80):"shell"];return f&&m.push(`exit ${l?.exitCode}`),m.push(Ei(s)),g.jsxs("div",{className:`pg-tool pg-shell ${h}`,children:[g.jsxs(Di,{action:"shell",details:m.join(" · "),leadingIcon:g.jsx(Ra,{status:h}),open:n,onOpenChange:b=>r(b),tabularNums:!0,children:[a?g.jsx("pre",{className:"shell-cmd",children:a}):null,c?g.jsx("pre",{className:"shell-std",children:c}):null,d?g.jsx("pre",{className:"shell-std shell-err",children:d}):null,!c&&!d?g.jsx("div",{className:"shell-empty",children:l?`Exited ${l.exitCode??0} with no output.`:t.output??"running…"}):null]}),t.status==="awaiting"?g.jsx(Tf,{callId:t.callId}):null]})}),loe=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=Ef(t),a=Ml(Jx(t.args),"path"),l=uoe(t),c=[a?PZ(a,80):"read",Ei(s)];return g.jsxs("div",{className:`pg-tool pg-read ${t.status}`,children:[g.jsxs(Di,{action:"read",details:c.join(" · "),leadingIcon:g.jsx(Ra,{status:t.status}),open:n,onOpenChange:d=>r(d),tabularNums:!0,children:[a?g.jsx("pre",{className:"tool-primary",children:a}):null,l!=null?l?g.jsx("pre",{className:"tool-body",children:l}):g.jsx("div",{className:"tool-empty",children:"(empty file)"}):g.jsx("div",{className:"out",children:t.output??"running…"})]}),t.status==="awaiting"?g.jsx(Tf,{callId:t.callId}):null]})});function uoe(e){const t=iC(e.outputRaw);if(t!=null)return t;if(e.output)try{return iC(JSON.parse(e.output))}catch{}return null}function iC(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 coe=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=Ef(t),a=Jx(t.args),l=Ml(a,"glob_pattern","globPattern"),c=Ml(a,"target_directory","targetDirectory"),d=foe(t),f=[l?Ni(l,80):"glob",Ei(s)];return g.jsxs("div",{className:`pg-tool pg-glob ${t.status}`,children:[g.jsxs(Di,{action:"glob",details:f.join(" · "),leadingIcon:g.jsx(Ra,{status:t.status}),open:n,onOpenChange:h=>r(h),tabularNums:!0,children:[l?g.jsx("pre",{className:"tool-primary",children:l}):null,c?g.jsx("pre",{className:"tool-meta",children:c}):null,d!=null?d.length>0?g.jsx("pre",{className:"tool-body",children:d.join(`
|
|
75
|
+
`)}):g.jsx("div",{className:"tool-empty",children:"(no matches)"}):g.jsx("div",{className:"out",children:t.output??"running…"})]}),t.status==="awaiting"?g.jsx(Tf,{callId:t.callId}):null]})});function foe(e){const t=sC(e.outputRaw);if(t!=null)return t;if(e.output)try{return sC(JSON.parse(e.output))}catch{}return null}function sC(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 doe=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=Ef(t),a=Jx(t.args),l=Ml(a,"pattern"),c=Ml(a,"path"),d=Ml(a,"glob"),f=[l?Ni(l,80):"grep",Ei(s)],h=[c,d?`glob ${d}`:""].filter(Boolean).join(`
|
|
76
|
+
`);return g.jsxs("div",{className:`pg-tool pg-grep ${t.status}`,children:[g.jsxs(Di,{action:"grep",details:f.join(" · "),leadingIcon:g.jsx(Ra,{status:t.status}),open:n,onOpenChange:m=>r(m),tabularNums:!0,children:[l?g.jsx("pre",{className:"tool-primary",children:l}):null,h?g.jsx("pre",{className:"tool-meta",children:h}):null,g.jsx("div",{className:"out",children:t.output??"running…"})]}),t.status==="awaiting"?g.jsx(Tf,{callId:t.callId}):null]})}),poe=v.memo(function({text:t,open:n}){const[r,s]=v.useState(!1);return n?g.jsx("div",{className:"pg-subagent-reasoning",children:g.jsx(Di,{action:"Thinking",loading:!0,open:!r,onOpenChange:a=>s(!a),tone:"muted",children:g.jsx(Hl,{text:t,className:"body"})})}):g.jsx("div",{className:"pg-subagent-reasoning",children:g.jsx(Di,{action:"Thought",defaultOpen:!1,tone:"muted",children:g.jsx(Hl,{text:t,className:"body"})})})}),hoe=v.memo(function({child:t}){if(t.kind==="assistant")return g.jsx("div",{className:`pg-subagent-msg${t.streaming?" streaming":""}`,children:g.jsx(Hl,{text:t.text||"…",className:"body"})});if(t.kind==="reasoning")return g.jsx(poe,{text:t.text,open:t.open});const n=t.args==null?"":Qn(t.args,80),r=t.status==="running"?"running…":t.status==="error"?"error":t.status==="done"?"done":t.status;return g.jsxs("div",{className:`pg-subagent-tool ${t.status}`,children:[g.jsxs("div",{className:"pg-subagent-tool-head",children:[g.jsx(Ra,{status:t.status}),g.jsx("span",{className:"pg-subagent-tool-name",children:t.name}),n?g.jsx("span",{className:"pg-subagent-tool-args",children:n}):null,g.jsx("span",{className:"pg-subagent-tool-status",children:r})]}),t.output?g.jsx("pre",{className:"pg-subagent-tool-out",children:t.output}):null]})});function moe(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 goe=v.memo(function({item:t}){const n=t.children??[],r=n.length>0,[s,a]=v.useState(t.status==="running"),l=t.name.replace(/^subagent:/,"")||"subagent",c=typeof t.args=="string"?t.args:t.args==null?"":Qn(t.args,100),d=t.status==="running",f=c?Ni(c,120):l;return g.jsxs("div",{className:`pg-tool pg-subagent-card ${t.status}`,children:[g.jsxs("button",{type:"button",className:"pg-subagent-head","aria-expanded":s,onClick:()=>a(h=>!h),children:[g.jsx("span",{className:"pg-subagent-status",children:g.jsx(Ra,{status:t.status})}),g.jsxs("span",{className:"pg-subagent-titles",children:[g.jsx("span",{className:d?"pg-subagent-title shimmer":"pg-subagent-title",children:f}),g.jsxs("span",{className:"pg-subagent-subtitle",children:[moe(t,n)," · ",l]})]}),g.jsx("span",{className:s?"pg-subagent-chevron open":"pg-subagent-chevron",children:g.jsx(tn,{name:"chevron-right",size:10})})]}),g.jsx("div",{className:s?"pg-subagent-clip":"pg-subagent-clip collapsed","aria-hidden":!s,inert:s?void 0:!0,children:g.jsx("div",{className:"pg-subagent-body",children:r?n.map(h=>g.jsx(hoe,{child:h},h.id)):g.jsx("div",{className:"pg-subagent-empty",children:t.output??"running…"})})})]})}),boe=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=Ef(t),a=t.args==null?"":Qn(t.args,120),l=Ei(s);return g.jsxs("div",{className:`pg-tool ${t.status}`,children:[g.jsx(Di,{action:t.name,details:a?`${a} · ${l}`:l,leadingIcon:g.jsx(Ra,{status:t.status}),open:n,onOpenChange:c=>r(c),tabularNums:!0,children:g.jsx("div",{className:"out",children:t.output??"running…"})}),t.status==="awaiting"?g.jsx(Tf,{callId:t.callId}):null]})}),yoe={shell:e=>g.jsx(aoe,{item:e}),read:e=>g.jsx(loe,{item:e}),glob:e=>g.jsx(coe,{item:e}),grep:e=>g.jsx(doe,{item:e})};function voe(e){return e.name.startsWith("subagent:")}const koe=v.memo(function({item:t}){if(voe(t))return g.jsx(goe,{item:t});const n=Az.get(t.name);if(n)return g.jsx(n,{item:t});const r=yoe[t.name];return r?r(t):g.jsx(boe,{item:t})}),oC=120,xoe=v.memo(function({text:t}){const[n,r]=v.useState(!1),[s,a]=v.useState(!1),l=v.useRef(null);v.useLayoutEffect(()=>{const h=l.current;if(!h)return;const m=()=>{a(h.scrollHeight>oC)};m();const b=new ResizeObserver(m);return b.observe(h),()=>b.disconnect()},[t]);const c=s&&!n,d=()=>{s&&r(h=>!h)},f=h=>{s&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),d())};return g.jsx("div",{className:"msg user",children:g.jsx("div",{ref:l,className:c?"bubble furled":s?"bubble expandable":"bubble",style:c?{maxHeight:oC}:void 0,role:s?"button":void 0,tabIndex:s?0:void 0,"aria-expanded":s?n:void 0,"aria-label":s?n?"Collapse message":"Expand message":void 0,onClick:s?d:void 0,onKeyDown:s?f:void 0,children:t})})}),Soe=v.memo(function({text:t,streaming:n}){return g.jsx("div",{className:"msg assistant",children:g.jsx(Hl,{text:t,className:n?"bubble streaming":"bubble"})})}),woe=v.memo(function({text:t,open:n}){const[r,s]=v.useState(!1);return n?g.jsx("div",{className:"pg-reasoning",children:g.jsx(Di,{action:"Thinking",loading:!0,open:!r,onOpenChange:a=>s(!a),tone:"muted",children:g.jsx(Hl,{text:t,className:"body"})})}):g.jsx("div",{className:"pg-reasoning",children:g.jsx(Di,{action:"Thought",defaultOpen:!1,tone:"muted",children:g.jsx(Hl,{text:t,className:"body"})})})}),Eoe=v.memo(function({text:t,fail:n,url:r}){return g.jsxs("div",{className:n?"divider fail":"divider",children:[t,r?g.jsxs(g.Fragment,{children:[" · ",g.jsx(ga,{href:r,children:r})]}):null]})}),Toe=v.memo(function({artifactKind:t,title:n,url:r}){return g.jsxs("div",{className:"artifact-chip",children:[g.jsx(tn,{name:"bookmark",size:"sm",color:"secondary"}),g.jsx("span",{className:"artifact-chip-label",children:"Artifact"}),g.jsx(Zi,{variant:"accent",size:"sm",pill:!0,children:t}),n!==void 0?g.jsx("span",{className:"artifact-chip-title",children:n}):null,r!==void 0?g.jsx(ga,{href:r,children:"link"}):null]})});function Nc(e){switch(e.kind){case"user":return g.jsx(xoe,{text:e.text},e.id);case"assistant":return g.jsx(Soe,{text:e.text,streaming:e.streaming},e.id);case"reasoning":return g.jsx(woe,{text:e.text,open:e.open},e.id);case"tool":return g.jsx(koe,{item:e},e.id);case"divider":return g.jsx(Eoe,{text:e.text,fail:e.fail,url:e.url},e.id);case"artifact":return g.jsx(Toe,{artifactKind:e.artifactKind,title:e.title,url:e.url},e.id);case"turn-end":return null;default:return null}}function aC(e){return e.kind==="tool"&&e.name.startsWith("subagent:")}function _oe({steps:e,cards:t,final:n,marker:r,isLatest:s}){const[a,l]=v.useState(void 0),c=a??s,d=[];(r.inTokens!==void 0||r.outTokens!==void 0)&&d.push(`${vh(r.inTokens)} in · ${vh(r.outTokens)} out tokens`),r.costUsd!==void 0&&d.push(bm(r.costUsd));const f=d.length>0?d.join(" · "):void 0;return g.jsxs(g.Fragment,{children:[e.length>0?g.jsx("div",{className:"pg-turn-group",title:f,children:g.jsx(Di,{action:"Worked",details:r.ms!==null?`for ${Ax(r.ms)}`:void 0,open:c,onOpenChange:l,tabularNums:!0,tone:"tertiary",children:g.jsx("div",{className:"pg-turn-group-content",children:e.map(Nc)})})}):null,t.map(Nc),n?Nc(n):null]})}function Roe({startMs:e}){const[t,n]=v.useState(()=>Date.now());return v.useEffect(()=>{const r=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(r)},[]),g.jsx("div",{className:"pg-turn-group",children:g.jsx(Di,{action:"Working",details:`for ${Ax(Math.max(0,t-e))}`,expandable:!1,tabularNums:!0,tone:"tertiary"})})}function Coe(e,t){const n=e.findLast(l=>l.kind==="turn-end")?.id,r=[];let s=[];const a=()=>{for(const l of s)r.push(Nc(l));s=[]};for(const l of e)switch(l.kind){case"user":case"divider":a(),r.push(Nc(l));break;case"turn-end":{const c=s[s.length-1],d=c!==void 0&&c.kind==="assistant"&&!c.streaming?c:null,f=d===null?s:s.slice(0,-1),h=f.filter(b=>!aC(b)),m=f.filter(aC);r.push(g.jsx(_oe,{steps:h,cards:m,final:d,marker:l,isLatest:l.id===n},l.id)),s=[];break}default:s.push(l);break}return t!==null&&r.push(g.jsx(Roe,{startMs:t},"working")),a(),r}function Oz(){const e=We(h=>h.transcript),t=We(h=>h.current),n=We(h=>h.localTrace),r=We(h=>h.running),s=We(h=>h.turnStartedAt),a=e.length===0&&t===null&&!n,l=v.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"artifact":case"turn-end":return h.id;default:return h}}).join("|"),[e]),c=e.findLast(h=>h.kind==="user")?.id??"",d=`${t?.sessionId??"none"}:${c}:${e.length}`,{scrollRef:f}=JM({contentKey:l,latchKey:d});return g.jsx("div",{ref:f,className:a?"pg-transcript is-empty":"pg-transcript",children:a?g.jsx(As,{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."}):Coe(e,r?s:null)})}const lC=["accent","blue","magenta","orange","purple"];function Iz(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return lC[t%lC.length]}function uC(e,t,n){if(e.length===0)return 0;if(t<=0)return e.length;let r=1,s=0;for(const a of e){const l=s===0?a:s+n+a;l>t&&s>0?(r+=1,s=a):s=l}return r}function Noe(e){const{availableWidth:t,itemWidths:n,gap:r,triggerWidth:s,maxLines:a=2}=e,l=n.length;if(l===0)return 0;if(uC(n,t,r)<=a)return l;for(let c=l-1;c>=0;c-=1){const d=[...n.slice(0,c),s];if(uC(d,t,r)<=a)return c}return 0}const Aoe="Send a message below to start a new HTTP session. Use the Trace tab for a timeline with tool timings.",Ooe="This agent is stopped. Pick a session from the Runs tab to inspect its chat and trace.",cC="... More";function Ioe({cases:e,disabled:t}){const n=v.useRef(null),r=v.useRef(null),s=v.useRef(null),a=e.map(m=>m.id).join("|"),[l,c]=v.useState({key:a,visibleCount:Number.POSITIVE_INFINITY});l.key!==a&&c({key:a,visibleCount:Number.POSITIVE_INFINITY}),v.useLayoutEffect(()=>{const m=n.current;if(!m||e.length===0)return;if(s.current?.key!==a){const S=Array.from(m.querySelectorAll(":scope > [data-measure]"));if(S.length!==e.length)return;const E=getComputedStyle(m);s.current={key:a,widths:S.map(T=>T.offsetWidth),gap:parseFloat(E.gap)||0,triggerWidth:r.current?.offsetWidth??0}}const b=()=>{const S=s.current;if(!S)return;const E=Noe({availableWidth:m.clientWidth,itemWidths:S.widths,gap:S.gap,triggerWidth:S.triggerWidth});c(T=>T.visibleCount===E?T:{...T,visibleCount:E})};b();let y;const x=new ResizeObserver(()=>{y!==void 0&&cancelAnimationFrame(y),y=requestAnimationFrame(()=>{y=void 0,b()})});return x.observe(m),()=>{x.disconnect(),y!==void 0&&cancelAnimationFrame(y)}},[e.length,a]);const d=Math.min(l.visibleCount,e.length),f=e.slice(0,d),h=e.slice(d);return g.jsxs("div",{ref:n,className:"pg-panel-empty__evals",children:[f.map(m=>g.jsx("button",{type:"button",className:"pg-panel-empty__eval","data-measure":"",title:m.description||`Run ${m.id}`,disabled:t,onClick:()=>{nt.startEvalRun([m.id])},children:m.id},m.id)),g.jsx("button",{ref:r,type:"button",className:"pg-panel-empty__eval pg-panel-empty__eval-more-measure",tabIndex:-1,"aria-hidden":"true",children:cC}),h.length>0?g.jsxs(Br,{placement:"bottom",children:[g.jsx(Br.Trigger,{disabled:t,children:g.jsx("button",{type:"button",className:"pg-panel-empty__eval",disabled:t,"aria-label":`Show ${h.length} more evaluations`,children:cC})}),g.jsx(Br.Content,{"aria-label":"More evaluations",size:"sm",children:h.map(m=>g.jsx(Br.Item,{disabled:t,onSelect:()=>{nt.startEvalRun([m.id])},children:m.id},m.id))})]}):null]})}function Moe(){const e=We(d=>d.meta),t=We(d=>d.info),n=We(d=>d.evalCases),r=We(d=>d.evalRun?.status==="running"),s=e.name||t?.name||"Agent",a=e.readonly===!0,l=Iz(s),c=a?Ooe:t?.description||Aoe;return g.jsxs("div",{className:"pg-panel-empty",children:[g.jsx("div",{className:"pg-panel-empty__avatar","data-color":l,"aria-hidden":"true",children:g.jsx(tn,{name:"robot",variant:"filled",size:24,color:l})}),g.jsx("div",{className:"pg-panel-empty__name",children:s}),g.jsx("p",{className:"pg-panel-empty__description",children:c}),n.length>0&&!a?g.jsx(Ioe,{cases:n,disabled:r}):null]})}const fC={base:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kB7OPa:"ui-9f619",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",$$css:!0},wrap:{kwnvtZ:"ui-1a02dak",$$css:!0}},Doe={sm:{kOIVth:"ui-137clkk",$$css:!0},md:{kOIVth:"ui-pkkfsy",$$css:!0}},dC={base:{kysU6D:"ui-jyslct",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kmuXW:"ui-2lah0s",khDVqt:"ui-uxw1ft",kMv6JI:"ui-jb2p0i",k63SB2:"ui-1pd3egz",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-1gfq6vl",kWkggS:"ui-jbqb8w",ksu8eU:"ui-ng3xce",kaIpWk:"ui-1i4c3av",kkrTdU:"ui-1ypdohk ui-mh7c9n",kSiTet:"ui-1hc1fzr ui-1szrgyu",kFalU9:"ui-ggy1nq",kOIVth:"ui-11twubx",kMnn75:"ui-krqix3",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},default:{kWkggS:"ui-jbqb8w ui-q24i1q ui-x05fgs",$$css:!0},filter:{kaIpWk:"ui-1e1y6u3",kAzted:"ui-4jlmx6",kMwMTN:"ui-19aaqeu ui-1t93vz6 ui-t6ogrd",kWkggS:"ui-jbqb8w ui-1834tr1 ui-d9g367",k63SB2:"ui-1yl5bsf",$$css:!0}},zoe={sm:{kLKAdn:"ui-493x5y",kpe85a:"ui-17v7654",kGO01o:"ui-b6dno7",kE3dHu:"ui-1lfpczk",$$css:!0},md:{kLKAdn:"ui-1gv78wz",kpe85a:"ui-1yxiud8",kGO01o:"ui-1cea8gx",kE3dHu:"ui-yab65l",$$css:!0},lg:{kLKAdn:"ui-1to6kjf",kpe85a:"ui-16b7oty",kGO01o:"ui-5wifs",kE3dHu:"ui-o7x2bt",$$css:!0}},Mz=v.createContext(null);function Dz(e){const t=v.use(Mz);if(t===null)throw new Error(`${e} must be used within Tabs.Root`);return t}function joe({value:e,defaultValue:t,onValueChange:n,size:r="md",variant:s="default",children:a,...l}){const c=v.useMemo(()=>({size:r,variant:s}),[r,s]);return g.jsx(Mz.Provider,{value:c,children:g.jsx(KI,{...l,value:e,defaultValue:t,onValueChange:n,"data-component":"tabs-root","data-size":r,"data-variant":s,className:"ui-jp7ctv",children:a})})}function Loe({activateOnFocus:e,spacing:t,wrap:n=!1,children:r,...s}){const a=Dz("Tabs.List"),l=t??(a.variant==="filter"?"md":"sm");return g.jsx(JI,{...s,activateOnFocus:e,"data-component":"tabs-list",...Ct(fC.base,Doe[l],n&&fC.wrap),children:r})}function Poe({value:e,secondaryLabel:t,href:n,children:r,...s}){const a=Dz("Tabs.Item");return g.jsxs(XI,{...s,value:e,render:n===void 0?void 0:l=>g.jsx("a",{...l,href:n}),nativeButton:n===void 0,"data-component":"tabs-item","data-size":a.size,"data-variant":a.variant,...Ct(dC.base,a.size==="sm"?Xi.root:Ki.root,zoe[a.size],dC[a.variant],a.variant==="filter"&&uA.root),children:[r,t!=null?g.jsx("span",{className:"ui-2lah0s ui-4b2ntj",children:t}):null]})}const Hy={Root:joe,List:Loe,Item:Poe};function $oe(e,t){if(t===null)return!0;switch(e){case"abs":return(t.abs?.length??0)>0;case"artifacts":return t.artifacts!==void 0;default:return!0}}function zz(e,t,n){return e.filter(r=>r.value===n||$oe(r.value,t))}const pC=[{value:"chat",label:"Chat"},{value:"trace",label:"Trace"},{value:"raw",label:"Raw"},{value:"evals",label:"Evals"},{value:"abs",label:"A/Bs"},{value:"artifacts",label:"Artifacts"}],hC=new Set(["evals","abs"]);function e0(e){return e==="overview"?"chat":e}function Boe({size:e="lg"}){const t=We(l=>l.view),n=We(l=>l.evalNavReturn),r=We(l=>l.info),s=n||hC.has(t)?pC:pC.filter(l=>!hC.has(l.value)),a=zz(s,r,t);return g.jsx(Hy.Root,{value:e0(t),onValueChange:l=>nt.setView(l),size:e,children:g.jsx(Hy.List,{"aria-label":"Visualization mode",wrap:!0,children:a.map(l=>g.jsx(Hy.Item,{value:l.value,children:l.label},l.value))})})}function jz(){const e=We(s=>s.view),t=We(s=>s.current),n=We(s=>s.transcript.length===0),r=t===null&&n;return g.jsxs(g.Fragment,{children:[e0(e)==="chat"?g.jsxs(g.Fragment,{children:[r?g.jsx(Moe,{}):g.jsx(Oz,{}),g.jsx(VM,{})]}):null,e==="trace"?g.jsx(rD,{}):null,e==="raw"?g.jsx(eD,{}):null,e==="evals"?g.jsx(YM,{}):null,e==="abs"?g.jsx(qM,{}):null,e==="artifacts"?g.jsx(GM,{}):null]})}const mC=25*1024*1024;function Lz(e){if(!e)return;if(e.size>mC){const n=mC/1048576;nt.toast(`Trace file is too large (${(e.size/(1024*1024)).toFixed(1)} MB). Max is ${n} MB.`);return}const t=new FileReader;t.onload=()=>{nt.loadLocalTrace(String(t.result||""),e.name)},t.readAsText(e)}function Foe({className:e,labeled:t=!1}){const n=We(s=>s.authToken);return We(s=>s.aliasHosted)?null:g.jsxs("div",{className:e,children:[t?g.jsx("label",{className:"pg-auth-token-label",htmlFor:"pg-auth-token",children:"Bearer token"}):null,g.jsx(hf,{id:t?"pg-auth-token":void 0,type:"password",size:"base","aria-label":"Bearer token",placeholder:t?"Optional":"Bearer token (optional)",value:n,onChange:s=>nt.setAuthToken(s.target.value),title:"Sent as Authorization: Bearer ... on API calls"})]})}function Uoe(){const e=v.useRef(null),t=We(n=>n.aliasHosted);return g.jsxs(g.Fragment,{children:[g.jsxs(Br,{placement:"bottom-end",children:[g.jsx(Br.Trigger,{children:g.jsx(kr,{icon:"dots-3-horizontal",size:"lg","aria-label":"More actions"})}),g.jsx(Br.Content,{"aria-label":"More actions",className:"pg-detail-more",size:"sm",width:240,footer:t?void 0:g.jsx(Foe,{className:"pg-detail-more__token",labeled:!0}),children:g.jsx(Br.Item,{onSelect:()=>{queueMicrotask(()=>e.current?.click())},children:"Import Trace"})})]}),g.jsx("input",{ref:e,type:"file",accept:".ndjson,application/x-ndjson,application/json,.json",hidden:!0,onChange:n=>{Lz(n.target.files?.[0]),n.target.value=""}})]})}function Pz({variant:e}){const t=We(l=>l.barTitle),n=We(l=>l.barId),r=We(l=>l.current),s=e==="panel",a=n||t;return g.jsxs("div",{className:s?"pg-detail__head pg-detail__head--panel":"pg-detail__head",children:[g.jsxs("div",{className:"pg-detail__head-start",children:[s?null:g.jsx(kr,{icon:"arrow-left",size:"lg","aria-label":"Back to overview",onClick:()=>nt.backToOverview()}),r!==null||n?g.jsx("div",{className:"pg-detail__session",title:a,children:g.jsx("span",{className:"pg-detail__session-id",children:a})}):null]}),g.jsx(Boe,{}),g.jsxs("div",{className:"pg-detail__head-end",children:[g.jsx(Uoe,{}),s?g.jsx(kr,{icon:"x",size:"lg","aria-label":"Close chat panel",onClick:()=>nt.setChatPanelOpen(!1)}):null]})]})}function qoe(){return g.jsxs("div",{className:"pg-detail",children:[g.jsx(Pz,{variant:"page"}),g.jsx("div",{className:"pg-transcript-wrap",children:g.jsx(jz,{})})]})}const Hoe="agent-serve.playground.try.";function $z(e,t){return`${Hoe}${e}:${t}`}function gC(e,t){try{const n=localStorage.getItem($z(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 Goe(e,t,n){try{localStorage.setItem($z(e,t),JSON.stringify(n))}catch{}}function bC(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 yC({label:e,schema:t}){if(t===void 0)return g.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?g.jsxs("details",{className:"pg-try-schema",children:[g.jsxs("summary",{children:[e," schema"]}),g.jsx("pre",{children:JSON.stringify(t,null,2)})]}):g.jsxs("details",{className:"pg-try-schema",open:!0,children:[g.jsxs("summary",{children:[e," schema"]}),g.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 g.jsxs("li",{children:[g.jsx("code",{children:s}),r.has(s)?g.jsx("span",{className:"req",children:" required"}):g.jsx("span",{className:"opt",children:" optional"}),g.jsxs("span",{className:"type",children:[" · ",l]}),c?g.jsx("div",{className:"desc",children:c}):null]},s)})})]})}function Bz(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 Sp(e){return`'${e.replace(/'/g,"'\\''")}'`}function Voe(e){const t=["curl","-sS","-X",e.method],n=e.token.trim();if(n!==""&&t.push("-H",Sp(`Authorization: Bearer ${n}`)),e.hasBody){t.push("-H",Sp("Content-Type: application/json"));const r=e.bodyText.trim()===""?"{}":e.bodyText.trim();t.push("--data-binary",Sp(r))}return t.push(Sp(e.absoluteUrl)),t.join(" ")}function Woe(e,t,n){let r=nt.api.url(e);if(n){const s=Bz(t,"Query");if(!s.ok)return s;const a=new URLSearchParams;for(const[c,d]of Object.entries(s.value)){if(d==null)continue;const f=typeof d=="string"?d:String(d);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 Fz({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=We(N=>N.authToken),[c,d]=v.useState(()=>{const N=gC(r,t.url);return N?.query!==void 0&&N.query.trim()!==""?N.query:bC(t.querySchema)}),[f,h]=v.useState(()=>{const N=gC(r,t.url);return N?.body!==void 0&&N.body.trim()!==""?N.body:bC(t.bodySchema)}),[m,b]=v.useState(!1),[y,x]=v.useState(!1),[S,E]=v.useState(null),[T,R]=v.useState(null);v.useEffect(()=>{const N=P=>{P.key==="Escape"&&n()};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[n]);const _=N=>{const P={};s&&(P.body=N.body??f),a&&(P.query=N.query??c),Goe(r,t.url,P)},C=()=>{_({body:f,query:c}),n()},M=async()=>{if(E(null),x(!1),s&&f.trim()!=="")try{JSON.parse(f)}catch(z){E(`Body: ${z instanceof Error?z.message:String(z)}`);return}const N=Woe(t.url,c,a);if(!N.ok){E(N.error);return}const P=Voe({method:r,absoluteUrl:N.url,token:l,hasBody:s,bodyText:f});try{await navigator.clipboard.writeText(P),x(!0),nt.toast("Copied curl to clipboard"),window.setTimeout(()=>x(!1),1500)}catch(z){E(`Copy failed: ${z instanceof Error?z.message:String(z)}`)}},A=async()=>{E(null),R(null);let N;if(a){const z=Bz(c,"Query");if(!z.ok){E(z.error);return}N={};for(const[D,H]of Object.entries(z.value))H!=null&&(N[D]=typeof H=="string"?H:String(H))}let P;if(s){const z=f.trim();if(z==="")P={};else try{P=JSON.parse(z)}catch(D){E(`Body: ${D instanceof Error?D.message:String(D)}`);return}}_({body:f,query:c}),b(!0);try{const z=await nt.api.channelRequest(r,t.url,{body:s?P:void 0,query:N});if(z.ok&&z.body&&await nt.openSessionFromChannelResponse(e,z.body)){n();return}R({status:z.status,body:z.body})}catch(z){E(z instanceof Error?z.message:String(z))}finally{b(!1)}};return g.jsx("div",{className:"pg-try-backdrop",role:"presentation",onClick:C,children:g.jsxs("div",{className:"pg-try-modal",role:"dialog","aria-modal":"true","aria-label":`Try ${r} ${t.url}`,onClick:N=>N.stopPropagation(),children:[g.jsxs("div",{className:"pg-try-head",children:[g.jsxs("div",{children:[g.jsxs("div",{className:"pg-try-title",children:[g.jsx("span",{className:"pg-try-method",children:r})," ",g.jsx("code",{children:t.url})]}),g.jsxs("div",{className:"pg-try-sub",children:["channel ",g.jsx("code",{children:e}),t.description?` · ${t.description}`:null]})]}),g.jsx("button",{type:"button",className:"link-btn",onClick:C,children:"Close"})]}),g.jsxs("div",{className:"pg-try-body",children:[a?g.jsxs(g.Fragment,{children:[g.jsx(yC,{label:"Query",schema:t.querySchema}),g.jsxs("label",{className:"pg-try-field",children:[g.jsx("span",{children:"Query (JSON object → search params)"}),g.jsx("textarea",{value:c,onChange:N=>d(N.target.value),spellCheck:!1,rows:6})]})]}):null,s?g.jsxs(g.Fragment,{children:[g.jsx(yC,{label:"Body",schema:t.bodySchema}),g.jsxs("label",{className:"pg-try-field",children:[g.jsx("span",{children:"Body (JSON)"}),g.jsx("textarea",{value:f,onChange:N=>h(N.target.value),spellCheck:!1,rows:10})]})]}):null,S?g.jsx("div",{className:"pg-try-error",children:S}):null,T?g.jsxs("div",{className:"pg-try-result",children:[g.jsxs("div",{className:"pg-try-status",children:["Status ",g.jsx("code",{children:T.status})]}),g.jsx("pre",{children:JSON.stringify(T.body,null,2)})]}):null]}),g.jsxs("div",{className:"pg-try-foot",children:[g.jsx(Cn,{variant:"secondary",size:"sm",onClick:()=>{M()},children:y?"Copied":"Copy curl"}),g.jsx("div",{className:"pg-try-foot-spacer"}),g.jsx(Cn,{variant:"secondary",size:"sm",onClick:C,children:"Cancel"}),g.jsx(Cn,{variant:"primary",size:"sm",disabled:m,onClick:()=>{A()},children:m?"Sending…":"Send"})]})]})})}const Uz="agent-serve.playground.drawerWidth",Gy=340,Yv=280,Xv=720;function jp(e){return Math.min(Xv,Math.max(Yv,e))}function Koe(){try{const e=localStorage.getItem(Uz);if(e===null)return Gy;const t=Number.parseInt(e,10);return Number.isFinite(t)?jp(t):Gy}catch{return Gy}}function Xo({title:e,children:t}){return g.jsxs(g.Fragment,{children:[g.jsx("h4",{children:e}),t]})}function ml({name:e,detail:t}){return g.jsxs("div",{className:"item",children:[g.jsx("div",{className:"n",children:e}),t?g.jsx("div",{className:"d",children:t}):null]})}function Zoe(){const e=We(_=>_.drawerOpen),t=We(_=>_.info),[n,r]=v.useState(null),[s,a]=v.useState(Koe),[l,c]=v.useState(!1),d=v.useRef(s);d.current=s,v.useEffect(()=>{try{localStorage.setItem(Uz,String(s))}catch{}},[s]);const f=v.useCallback(_=>{_.preventDefault();const C=_.currentTarget,M=_.clientX,A=d.current;C.setPointerCapture(_.pointerId),c(!0),document.body.classList.add("pg-resizing-drawer");const N=z=>{a(jp(A+(z.clientX-M)))},P=z=>{C.releasePointerCapture(z.pointerId),C.removeEventListener("pointermove",N),C.removeEventListener("pointerup",P),C.removeEventListener("pointercancel",P),c(!1),document.body.classList.remove("pg-resizing-drawer")};C.addEventListener("pointermove",N),C.addEventListener("pointerup",P),C.addEventListener("pointercancel",P)},[]),h=t?.tools??[],m=t?.skills??[],b=t?.subagents??[],y=t?.connections??[],x=t?.channels??[],S=t?.hooks??[],E=t?.abs??[],T=v.useMemo(()=>{const _=new Map;for(const C of ym(x))_.set(`${C.method}:${C.url}`,C.name);return _},[x]),R=t!==null&&h.length===0&&m.length===0&&b.length===0&&y.length===0&&x.length===0&&S.length===0&&E.length===0;return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:e?l?"pg-drawer open resizing":"pg-drawer open":"pg-drawer",style:{width:s},children:[g.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":Yv,"aria-valuemax":Xv,tabIndex:0,onPointerDown:f,onKeyDown:_=>{_.key==="ArrowLeft"?(_.preventDefault(),a(C=>jp(C-16))):_.key==="ArrowRight"?(_.preventDefault(),a(C=>jp(C+16))):_.key==="Home"?(_.preventDefault(),a(Yv)):_.key==="End"&&(_.preventDefault(),a(Xv))}}),g.jsxs("div",{className:"head",children:[g.jsx("span",{children:"Agent surface"}),g.jsx("button",{type:"button",className:"link-btn",onClick:()=>nt.setDrawerOpen(!1),children:"Close"})]}),g.jsxs("div",{className:"body",children:[t===null?g.jsx("div",{className:"drawer-empty",children:"Loading…"}):null,R?g.jsx("div",{className:"drawer-empty",children:"No surface to show for this agent."}):null,h.length?g.jsx(Xo,{title:"Tools",children:h.map(_=>g.jsx(ml,{name:_.name,detail:_.description},_.name))}):null,m.length?g.jsx(Xo,{title:"Skills",children:m.map(_=>g.jsx(ml,{name:_.name,detail:_.description},_.name))}):null,b.length?g.jsx(Xo,{title:"Subagents",children:b.map(_=>g.jsx(ml,{name:_.name,detail:_.description},_.name))}):null,y.length?g.jsx(Xo,{title:"MCP Connections",children:y.map(_=>g.jsx(ml,{name:_.name,detail:_.transport},_.name))}):null,x.length?g.jsx(Xo,{title:"Channels",children:x.map(_=>g.jsxs("div",{className:"item",children:[g.jsx("div",{className:"n",children:_.id}),(_.routes??[]).length===0?g.jsx("div",{className:"d",children:"(events only)"}):g.jsx("div",{className:"channel-routes",children:(_.routes??[]).map(C=>{const M=_.id!=="http",A=`${C.method} ${C.url}`,N=T.get(`${C.method.toUpperCase()}:${C.url}`);return M?g.jsxs("div",{className:"channel-route",children:[g.jsx("code",{children:A}),N?g.jsx("code",{className:"channel-slash",title:"Composer slash command",children:N}):null,g.jsx("button",{type:"button",className:"link-btn",onClick:()=>r({channelId:_.id,route:C}),children:"Try"})]},A):g.jsx("div",{className:"channel-route",children:g.jsx("code",{children:A})},A)})})]},_.id))}):null,S.length?g.jsx(Xo,{title:"Hooks",children:S.map(_=>g.jsx(ml,{name:_},_))}):null,E.length?g.jsx(Xo,{title:"A/Bs",children:E.map(_=>g.jsx(ml,{name:_},_))}):null]})]}),n?g.jsx(Fz,{channelId:n.channelId,route:n.route,onClose:()=>r(null)}):null]})}function Yoe(){const e=We(f=>f.meta.readonly===!0),[t,n]=v.useState([]),[r,s]=v.useState(null),a=v.useRef(-1),l=v.useRef(null),c=t.length,d=XM({count:c,getScrollElement:()=>l.current,estimateSize:()=>18,overscan:24});return v.useEffect(()=>{let f=!1;const h=async()=>{const b=await nt.api.logs(a.current);if(f)return;if(!b.ok||b.body===null){s(`logs failed (${b.status})`);return}s(null);const y=b.body.entries??[];y.length>0&&(a.current=b.body.nextAfter,n(x=>{const S=x.concat(y);return S.length>2e3?S.slice(S.length-2e3):S}))};if(h(),e)return()=>{f=!0};const m=window.setInterval(()=>{h()},1e3);return()=>{f=!0,window.clearInterval(m)}},[e]),v.useEffect(()=>{c>0&&d.scrollToIndex(c-1,{align:"end"})},[c,d]),r!==null&&c===0?g.jsx("div",{className:"pg-raw",children:g.jsx(As,{className:"pg-empty",message:r})}):c===0?g.jsx("div",{className:"pg-raw",children:g.jsx(As,{className:"pg-empty",message:e?"No stored logs for this stopped agent.":"Waiting for agent logs… webhook captures and session activity appear here."})}):g.jsxs("div",{className:"pg-raw",children:[g.jsx("div",{className:"head",children:"Agent logs"}),g.jsx("div",{className:"raw-lines",ref:l,children:g.jsx("div",{style:{height:d.getTotalSize(),position:"relative",width:"100%"},children:d.getVirtualItems().map(f=>{const h=t[f.index];if(h===void 0)return null;const m=h.at.slice(11,19);return g.jsxs("div",{"data-index":f.index,ref:d.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${f.start}px)`},children:[g.jsxs("span",{className:"elog-time",children:[m," "]}),g.jsx("span",{children:h.line})]},f.key)})})})]})}const t0={root:{k1xSpc:"ui-78zum5",kzqmXN:"ui-h8yej3",kGNEyG:"ui-6s0dn4",kjj79g:"ui-1qughib",kOIVth:"ui-ehausa",kMwMTN:"ui-4b2ntj",kGuDYH:"ui-1wm8ruf",kLWn49:"ui-spwq11",kcqcaj:"ui-ss6m8b",$$css:!0},controls:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kOIVth:"ui-ehausa",$$css:!0},status:{kMwMTN:"ui-4b2ntj",kcqcaj:"ui-ss6m8b",$$css:!0}};function Xoe(){return t0.root}function Qoe(){return t0.controls}function Joe(){return t0.status}function eae({currentPage:e,totalPages:t,totalItems:n,pageSize:r,onPageChange:s,isLoading:a=!1,leading:l,rootStyle:c,className:d}){const f=Math.min(Math.max(1,e),t),h=n===0?0:Math.min(n,(f-1)*r+1),m=Math.min(n,f*r),b=E=>{E<1||E>t||E===f||a||s(E)},y=Lt({rootClass:"ui-pagination-footer",stylexStyles:[Xoe(),c],className:["pagination-footer",d].filter(Boolean).join(" ")}),x=Lt({rootClass:"ui-pagination-footer__controls",stylexStyles:Qoe(),className:"pagination-footer__controls"}),S=Lt({rootClass:"ui-pagination-footer__status",stylexStyles:Joe(),className:"pagination-footer__status"});return g.jsxs("div",{className:y.className,style:y.style,children:[g.jsxs("div",{className:"pagination-footer__summary",children:[l,g.jsxs("span",{className:S.className,style:S.style,children:[h.toLocaleString(),"–",m.toLocaleString()," of ",n.toLocaleString()]})]}),g.jsxs("div",{className:x.className,style:x.style,children:[g.jsx(kr,{"aria-label":"Previous page",disabled:f<=1||a,icon:"chevron-left",onClick:()=>b(f-1),size:"sm",variant:"ghost"}),g.jsxs("span",{className:S.className,style:S.style,children:[f.toLocaleString()," / ",t.toLocaleString()]}),g.jsx(kr,{"aria-label":"Next page",disabled:f>=t||a,icon:"chevron-right",onClick:()=>b(f+1),size:"sm",variant:"ghost"})]})]})}const tae={base:{k1xSpc:"ui-78zum5",kzqmXN:"ui-h8yej3",kXwgrk:"ui-dt5ytf",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kLKAdn:"ui-f6zju3",kpe85a:"ui-17v7654",kGO01o:"ui-1rgtt3y",kE3dHu:"ui-1lfpczk",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-1w002xl",kWqL5O:"ui-s1s249",kSWEuD:"ui-32b0ac",k26BEO:"ui-1ppb01f",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-1g95lbd",kZ1KPB:"ui-e0pwq",k4WBpm:"ui-19ypqd9",kaZRDh:"ui-fektcw",kaIpWk:"ui-1m7fhj7",kWkggS:"ui-f1vpex",$$css:!0}},qz={base:{k1xSpc:"ui-78zum5",k7Eaqz:"ui-euugli",kGNEyG:"ui-6s0dn4",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kLKAdn:"ui-1t8xvyj",kpe85a:"ui-14ndyrl",kGO01o:"ui-usxwy5",kE3dHu:"ui-1e7ydrk",kMwMTN:"ui-19aaqeu",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",kmkexE:"ui-po99wt",$$css:!0}},nae={base:{kjj79g:"ui-13a6bvl",k9WMMc:"ui-1hr2gdg",$$css:!0}},rae={base:{kMwMTN:"ui-1wd3ewq",$$css:!0}},iae={base:{k1xSpc:"ui-78zum5",k7Eaqz:"ui-euugli",kGNEyG:"ui-6s0dn4",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kLKAdn:"ui-1t8xvyj",kpe85a:"ui-14ndyrl",kGO01o:"ui-usxwy5",kE3dHu:"ui-1e7ydrk",kMwMTN:"ui-19aaqeu",kGuDYH:"ui-fifm61",k63SB2:"ui-20ajya",kLWn49:"ui-1d3mw78",k9WMMc:"ui-dpxx8g",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",$$css:!0}},sae={base:{kjj79g:"ui-13a6bvl",k9WMMc:"ui-1hr2gdg",$$css:!0}},oae={base:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1qjc9v5",kOIVth:"ui-1oot3zn",kLKAdn:"ui-exx8yu",kpe85a:"ui-1yxiud8",kGO01o:"ui-18d9i69",kE3dHu:"ui-yab65l",$$css:!0}},aae={base:{kVAEAm:"ui-1n2onr6",k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1qjc9v5",kOIVth:"ui-1oot3zn",kLKAdn:"ui-exx8yu",kpe85a:"ui-1yxiud8",kGO01o:"ui-18d9i69",kE3dHu:"ui-yab65l",k4Z53h:"ui-gfevyv",kGzVvX:"ui-qjnua1",kSWMeD:"ui-h5l0ry",kNVotH:"ui-1487vgl",k2syFR:"ui-o4r6jd",kyZIQH:"ui-fp6kh7",$$css:!0}},lae={base:{kkrTdU:"ui-1ypdohk",$$css:!0}},uae={base:{kVAEAm:"ui-10l6tqk",k87sOh:"ui-13vifvy",kCIrl2:"ui-1qo02jc",kbCHJM:"ui-134kyd4",kZKoxP:"ui-jyxbwm",kWkggS:"ui-iw1gut",kfzvcC:"ui-47corl",k1xSpc:"ui-1vga6i0",$$css:!0}},vC={base:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kGuDYH:"ui-4z9k3i",kLWn49:"ui-1fc57z9",$$css:!0}},cae={base:{kjj79g:"ui-l56j7k",k9WMMc:"ui-2b8uid",$$css:!0}},fae={base:{kMwMTN:"ui-1e4uaio",$$css:!0}},dae={base:{kMwMTN:"ui-19aaqeu",$$css:!0}},pae={base:{kMwMTN:"ui-4b2ntj",$$css:!0}},hae={base:{k1xSpc:"ui-78zum5",kAzted:"ui-i3av73",kXwgrk:"ui-dt5ytf",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kOIVth:"ui-11twubx",kLKAdn:"ui-t9g0qb",kpe85a:"ui-1yxiud8",kGO01o:"ui-20eq2h",kE3dHu:"ui-yab65l",k9WMMc:"ui-2b8uid",kMwMTN:"ui-4b2ntj",kGuDYH:"ui-4z9k3i",kLWn49:"ui-1fc57z9",$$css:!0}},mae={base:{kMwMTN:"ui-4b2ntj",kGuDYH:"ui-4z9k3i",kLWn49:"ui-d4r4e8",$$css:!0}},gae={base:{kMwMTN:"ui-19aaqeu",kGuDYH:"ui-4z9k3i",k63SB2:"ui-20ajya",kLWn49:"ui-d4r4e8",$$css:!0}},bae={base:{kjj79g:"ui-l56j7k",k9WMMc:"ui-2b8uid",$$css:!0}},kC={base:{k1xSpc:"ui-jp7ctv",kMwMTN:"ui-1heor9g",kybGjl:"ui-1hl2dhg",kysU6D:"ui-jyslct",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",kVVagm:"ui-ln7xf2",k9WMMc:"ui-16tdsg8",kkrTdU:"ui-1ypdohk",kDPRdz:"ui-144v4sp",k67Jb4:"ui-1lku1pv",kfbEmr:"ui-17kgsl5",kxHR8W:"ui-1dmdw0h",$$css:!0}},yae={base:{k1xSpc:"ui-1lliihq",kZKoxP:"ui-1qx5ct2",kaIpWk:"ui-1e1y6u3",kWkggS:"ui-flfp0o",kKVMdj:"ui-16iawpz",k44tkh:"ui-1c74tu6",kyAemX:"ui-w1l40g",ko0y90:"ui-a4qsjk",$$css:!0}},vae={base:{kzqmXN:"ui-3hqpx7",$$css:!0}},kae={base:{kzqmXN:"ui-1iy3nof",$$css:!0}},xae={base:{kzqmXN:"ui-g0jo4d",$$css:!0}},Sae={base:{k1xSpc:"ui-78zum5",kzqmXN:"ui-h8yej3",k7Eaqz:"ui-euugli",kXwgrk:"ui-dt5ytf",$$css:!0}},wae={base:{keoZOQ:"ui-1e66mq1",kLKAdn:"ui-f6zju3",kpe85a:"ui-1yxiud8",kGO01o:"ui-cnij5n",kE3dHu:"ui-yab65l",$$css:!0}},xC=[{identityClass:"automations-run-history-table__skeleton--wide",style:xae.base},{identityClass:"automations-run-history-table__skeleton--medium",style:vae.base},{identityClass:"automations-run-history-table__skeleton--short",style:kae.base}];function Eae(e){return typeof e=="number"?`${e}px`:e}function Tae(e){if(e.fixedWidth!==void 0)return{flexValue:`0 0 ${Eae(e.fixedWidth)}`,minWidth:e.fixedWidth,maxWidth:e.fixedWidth};const t=e.flexWidth;return t!==void 0?{flexValue:`${t.grow??1} 1 0`,minWidth:t.minWidth,maxWidth:t.maxWidth}:{flexValue:"1 1 0",minWidth:void 0,maxWidth:void 0}}function n0(e){const t=Tae(e),n={flex:t.flexValue};return t.minWidth!==void 0&&(n.minWidth=t.minWidth),t.maxWidth!==void 0&&(n.maxWidth=t.maxWidth),n}const r0={identityClass:"",style:null};function Hz(e){switch(e){case"right":return{identityClass:"automations-run-history-table__cell--align-right",style:nae.base};case"center":return{identityClass:"automations-run-history-table__cell--align-center",style:cae.base};default:return r0}}function _ae(e){switch(e){case"right":return{identityClass:"automations-run-history-table__header--align-right",style:sae.base};case"center":return{identityClass:"automations-run-history-table__header--align-center",style:bae.base};default:return r0}}function Rae(e){switch(e){case"primary":return{identityClass:"automations-run-history-table__cell--tint-primary",style:rae.base};case"secondary":return{identityClass:"automations-run-history-table__cell--tint-secondary",style:dae.base};case"tertiary":return{identityClass:"automations-run-history-table__cell--tint-tertiary",style:pae.base};case"quaternary":return{identityClass:"automations-run-history-table__cell--tint-quaternary",style:fae.base};default:return r0}}function Cae(e){return!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.currentTarget.target!=="_blank"}function Jc(...e){return e.filter(Boolean).join(" ")}function Gz(e){return bn(Lt({rootClass:"ui-automations-run-history-table__row",stylexStyles:[aae.base,e&&lae.base],className:Jc("automations-run-history-table__row",e&&"automations-run-history-table__row--linked")}).className,"ui--default-marker")}function Vz(){return g.jsx("div",{className:Lt({rootClass:"ui-automations-run-history-table__row-divider",stylexStyles:uae.base,className:"automations-run-history-table__row-divider"}).className,"data-run-history-row-divider":""})}function Nae({columns:e}){return g.jsx("div",{className:Lt({rootClass:"ui-automations-run-history-table__header-row",stylexStyles:oae.base,className:"automations-run-history-table__header-row"}).className,children:e.map(t=>{const n=_ae(t.align);return g.jsx("div",{className:Lt({rootClass:"ui-automations-run-history-table__header",stylexStyles:[iae.base,n.style],className:Jc("automations-run-history-table__header",n.identityClass)}).className,style:n0(t),children:t.header},`header-${t.key}`)})})}function SC({row:e,column:t}){const n=Hz(t.align),r=Rae(t.tintColor);return g.jsx("div",{className:Lt({rootClass:"ui-automations-run-history-table__cell",stylexStyles:[qz.base,n.style,r.style],className:Jc("automations-run-history-table__cell",n.identityClass,r.identityClass)}).className,style:n0(t),children:t.render(e)})}function Aae({columns:e,rowIndex:t}){const n=xC[t%xC.length];return g.jsxs("div",{className:Gz(!1),"data-run-history-row":"",children:[g.jsx(Vz,{}),e.map(r=>{const s=Hz(r.align);return g.jsx("div",{className:Lt({rootClass:"ui-automations-run-history-table__cell",stylexStyles:[qz.base,s.style],className:Jc("automations-run-history-table__cell",s.identityClass)}).className,style:n0(r),children:r.header!==""&&r.header!=null&&g.jsx("span",{className:Lt({rootClass:"ui-automations-run-history-table__skeleton",stylexStyles:[yae.base,n.style],className:Jc("automations-run-history-table__skeleton",n.identityClass)}).className})},`skeleton-${r.key}`)})]})}function Wz({data:e,columns:t,isLoading:n=!1,skeletonRowCount:r=3,emptyState:s,onRowClick:a,getRowHref:l,pagination:c,ariaLabel:d="Run history"}){const{linkColumns:f,excludedColumns:h,hasExcludedColumns:m}=v.useMemo(()=>{const S=[],E=[];for(const T of t)T.excludeFromRowLink===!0?E.push(T):S.push(T);return{linkColumns:S,excludedColumns:E,hasExcludedColumns:E.length>0}},[t]),b=n&&e.length===0,y=!n&&e.length===0,x=c!==void 0&&c.totalPages>1&&!n;return g.jsxs("div",{className:Lt({rootClass:"ui-automations-run-history-table__wrapper",stylexStyles:Sae.base,className:"automations-run-history-table__wrapper"}).className,"data-vr":"all-runs",children:[g.jsxs("section",{"aria-busy":n,"aria-label":d,className:Lt({rootClass:"ui-automations-run-history-table",stylexStyles:tae.base,className:"automations-run-history-table"}).className,children:[g.jsx(Nae,{columns:t}),b?g.jsx("div",{className:Lt({rootClass:"ui-automations-run-history-table__rows",stylexStyles:vC.base,className:"automations-run-history-table__rows"}).className,children:Array.from({length:r},(S,E)=>g.jsx(Aae,{columns:t,rowIndex:E},`skeleton-row-${E.toString()}`))}):y?g.jsx("div",{"aria-live":"polite",className:Lt({rootClass:"ui-automations-run-history-table__empty",stylexStyles:hae.base,className:"automations-run-history-table__empty"}).className,role:"status",children:s??g.jsxs(g.Fragment,{children:[g.jsx("span",{className:Lt({rootClass:"ui-automations-run-history-table__empty-title",stylexStyles:gae.base,className:"automations-run-history-table__empty-title"}).className,children:"No Results"}),g.jsx("span",{className:Lt({rootClass:"ui-automations-run-history-table__empty-description",stylexStyles:mae.base,className:"automations-run-history-table__empty-description"}).className,children:"Try different filters"})]})}):g.jsx("div",{className:Lt({rootClass:"ui-automations-run-history-table__rows",stylexStyles:vC.base,className:"automations-run-history-table__rows"}).className,children:e.map(S=>{const E=l?.(S),T=E!==void 0&&E!==""&&f.length>0,R=T||a!==void 0&&f.length>0,_=()=>f.map(C=>g.jsx(SC,{column:C,row:S},`cell-${S.id}-${C.key}`));return g.jsx(v.Fragment,{children:g.jsxs("div",{className:Gz(R),"data-run-history-row":"",children:[g.jsx(Vz,{}),T?g.jsx("a",{className:Lt({rootClass:"ui-automations-run-history-table__row-link",stylexStyles:kC.base,className:"automations-run-history-table__row-link"}).className,"data-run-history-row-link":"",href:E,onClick:C=>{a!==void 0&&Cae(C)&&(C.preventDefault(),a(S))},children:_()}):a!==void 0&&f.length>0?g.jsx("button",{className:Lt({rootClass:"ui-automations-run-history-table__row-link",stylexStyles:kC.base,className:"automations-run-history-table__row-link"}).className,"data-run-history-row-link":"",onClick:()=>a(S),type:"button",children:_()}):_(),m&&h.map(C=>g.jsx(SC,{column:C,row:S},`cell-${S.id}-${C.key}`))]})},S.id)})})]}),x&&c!==void 0&&g.jsx(eae,{currentPage:c.currentPage,onPageChange:c.onPageChange,pageSize:c.pageSize,rootStyle:wae.base,totalItems:c.totalItems,totalPages:c.totalPages})]})}function _m(e,...t){const n=e.trim().toLowerCase();return n===""?!0:t.filter(r=>r!=null&&r!=="").join(" ").toLowerCase().includes(n)}function Kz({title:e,count:t,singularLabel:n,pluralLabel:r,search:s,searchPlaceholder:a,onSearchChange:l,actions:c,children:d}){const f=t===1?n:r;return g.jsxs("section",{className:"pg-list-section",children:[e!==void 0?g.jsxs("header",{className:"pg-list-section__header",children:[g.jsx("h1",{className:"pg-list-section__title",children:e}),c?g.jsx("div",{className:"pg-list-section__actions",children:c}):null]}):null,g.jsxs("div",{className:"pg-list-section__toolbar",children:[g.jsxs("p",{className:"pg-list-section__count",children:[t," ",f]}),g.jsxs("div",{className:"pg-list-section__toolbar-end",children:[g.jsx("div",{className:"pg-list-section__search",children:g.jsx(hf,{type:"search",size:"lg",startIcon:"search",value:s,onChange:h=>l(h.target.value),placeholder:a,"aria-label":a,autoComplete:"off"})}),e===void 0&&c?g.jsx("div",{className:"pg-list-section__actions",children:c}):null]})]}),d]})}function Oae(e){return e==="running"?"Running":e==="cancelled"?"Cancelled":e==="failed"?"Failed":"Completed"}function Iae(e){return e==="running"?"accent":e==="failed"?"danger":"neutral"}function Mae(e,t){return _m(t,e.id,e.description,e.verdict,e.error,e.sessionId)}function Dae(e,t){return _m(t,e.runId,"eval",e.status,e.error,`${e.summary.passed} passed`,`${e.summary.failed} failed`,`${e.summary.done}/${e.summary.total}`)?!0:e.cases.some(n=>Mae(n,t))}function zae(e,t){return _m(t,e.title,e.sessionId,e.channelId,e.mode)}function wC({running:e,active:t=!1,children:n}){const r=["pg-agent-run__primary",t?"pg-agent-run__primary--active":null].filter(Boolean).join(" ");return g.jsxs("span",{className:r,children:[e===!0?g.jsx("span",{className:"spin","aria-label":"Running"}):null,g.jsx("span",{className:"pg-agent-run__primary-text",children:n})]})}function jae({sessions:e,runs:t,currentSessionId:n,currentEvalRunId:r,readOnly:s=!1,onSelectSession:a,onOpenEvalRun:l}){const[c,d]=v.useState(""),f=v.useMemo(()=>[...e.map(S=>({kind:"session",at:S.updatedAt??S.createdAt??"",session:S})),...t.map(S=>({kind:"evalRun",at:S.finishedAt??S.startedAt,run:S}))].sort((S,E)=>E.at.localeCompare(S.at)),[e,t]),h=v.useMemo(()=>f.filter(x=>x.kind==="session"?zae(x.session,c):Dae(x.run,c)),[f,c]),m=v.useMemo(()=>h.map(x=>x.kind==="session"?{id:`session:${x.session.sessionId}`,kind:"session",session:x.session,active:x.session.sessionId===n}:{id:`eval:${x.run.runId}`,kind:"evalRun",run:x.run,active:x.run.runId===r}),[h,n,r]),b=v.useMemo(()=>[{key:"run",header:"Run",flexWidth:{minWidth:160,grow:2},tintColor:"primary",render:x=>x.kind==="session"?g.jsx(wC,{running:x.session.running,active:x.active,children:x.session.title||x.session.sessionId}):g.jsx(wC,{running:x.run.status==="running",active:x.active,children:x.run.runId})},{key:"type",header:"Type",flexWidth:{minWidth:140,grow:1},render:x=>{if(x.kind==="session")return x.session.channelId||"—";const{status:S,summary:E}=x.run;return g.jsxs("span",{className:"pg-agent-run__type",children:[g.jsx(Zi,{variant:Iae(S),size:"sm",children:"Eval"}),g.jsxs("span",{className:"pg-eval-run__meta",children:[Oae(S),S==="running"?` · ${E.done}/${E.total} done`:""]})]})}},{key:"details",header:"Details",flexWidth:{minWidth:160,grow:1.5},render:x=>{if(x.kind==="session"){const E=x.session.turnCount;return`${E} ${E===1?"turn":"turns"}`}const{summary:S}=x.run;return g.jsxs("span",{className:"pg-eval-run__cases-summary",children:[g.jsxs("span",{className:"pg-eval-run__stat pg-verdict--success",children:[g.jsx(tn,{name:"check-circle",size:12,variant:"filled","aria-hidden":!0}),S.passed," passed"]}),g.jsxs("span",{className:"pg-eval-run__stat pg-verdict--danger",children:[g.jsx(tn,{name:"x-circle",size:12,variant:"filled","aria-hidden":!0}),S.failed," failed"]})]})}},{key:"activity",header:"Last activity",fixedWidth:96,align:"right",render:x=>x.kind==="session"?x.session.updatedAt?yh(x.session.updatedAt)??"—":"—":yh(x.run.finishedAt??x.run.startedAt)??"—"}],[]),y=f.length===0?g.jsx("span",{children:s?"No stored runs for this stopped agent.":"No runs yet — start a chat."}):g.jsx("span",{children:"No runs match your search."});return g.jsx(Kz,{count:h.length,singularLabel:"run",pluralLabel:"runs",search:c,searchPlaceholder:"Search runs",onSearchChange:d,children:g.jsx(Wz,{data:m,columns:b,ariaLabel:"Agent runs",emptyState:y,onRowClick:x=>{if(x.kind==="session"){a(x.session);return}l(x.run.runId)}})})}function Lae(e,t){const n=e?.cases.find(s=>s.id===t);if(n===void 0)return{label:"—",className:"",icon:void 0};if(n.status==="running")return{label:"Running…",className:"pg-verdict--warn",icon:void 0};const r=n.verdict??(n.ok===!0?"passed":"failed");return r==="passed"?{label:"Passed",className:"pg-verdict--success",icon:"check-circle"}:r==="failed"?{label:"Failed",className:"pg-verdict--danger",icon:"x-circle"}:{label:r,className:"pg-verdict--muted",icon:void 0}}function Pae({cases:e,latestRun:t,running:n,onRun:r,onRunAll:s,readOnly:a=!1}){const[l,c]=v.useState(""),d=v.useMemo(()=>e.filter(b=>_m(l,b.id,b.description,b.fileId,b.tags?.join(" "))),[e,l]),f=v.useMemo(()=>d.map(b=>{const y=Lae(t,b.id);return{id:b.id,evalCase:b,verdictLabel:y.label,verdictClassName:y.className,verdictIcon:y.icon,isSummary:b.id.endsWith("/overall")||(b.tags?.includes("summary")??!1)}}),[d,t]),h=v.useMemo(()=>{const b=[{key:"case",header:"Case",flexWidth:{minWidth:160,grow:1.4},tintColor:"primary",render:y=>g.jsx("span",{className:"pg-agent-run__primary-text",children:y.evalCase.id})},{key:"description",header:"Description",flexWidth:{minWidth:180,grow:2.4},render:y=>g.jsx("span",{className:"pg-agent-run__primary-text",children:y.evalCase.description||"—"})},{key:"tags",header:"Tags",flexWidth:{minWidth:100,grow:1},render:y=>y.evalCase.tags?.join(", ")||"—"},{key:"latest",header:"Latest",flexWidth:{minWidth:80,grow:1},render:y=>g.jsxs("span",{className:y.verdictClassName?`pg-eval-run__stat ${y.verdictClassName}`:"pg-eval-run__stat",children:[y.verdictIcon!==void 0?g.jsx(tn,{name:y.verdictIcon,variant:"filled",size:12,"aria-hidden":!0}):null,y.verdictLabel]})}];return a||b.push({key:"actions",header:"",fixedWidth:40,align:"right",excludeFromRowLink:!0,render:y=>g.jsx(kr,{icon:"play",size:"sm","aria-label":"Run",disabled:n,title:y.isSummary?`Runs full ${y.evalCase.fileId} suite (summary needs siblings)`:void 0,onClick:()=>r(y.evalCase.id)})}),b},[r,n,a]),m=e.length===0?g.jsx("span",{children:"No evals/ cases found for this agent."}):g.jsx("span",{children:"No evaluations match your search."});return g.jsx(Kz,{count:d.length,singularLabel:"evaluation",pluralLabel:"evaluations",search:l,searchPlaceholder:"Search evaluations",onSearchChange:c,actions:!a&&e.length>0?g.jsx(Cn,{variant:"primary",tone:"monochrome",size:"lg",disabled:n,title:n?"Eval run in progress":void 0,onClick:s,children:"Run all"}):null,children:g.jsx(Wz,{data:f,columns:h,ariaLabel:"Evaluations",emptyState:m})})}function uc({label:e,children:t}){return g.jsxs("div",{className:"pg-meta-table__cell",children:[g.jsx("div",{className:"pg-meta-table__label",children:e}),g.jsx("div",{className:"pg-meta-table__value",children:t})]})}function Vy(){return g.jsx("span",{className:"pg-meta-table__empty",children:"—"})}function $ae(e,t){return t?"History":e?"Development":"Production"}function Bae(e,t){return t?"neutral":e?"warn":"neutral"}function Fae(e,t){return t&&e!=="bad"?"Stopped":e==="ok"?"Healthy":e==="bad"?"Unhealthy":"Unknown"}function Uae(e,t){return t&&e!=="bad"?"neutral":e==="ok"?"success":e==="bad"?"danger":"neutral"}function qae(e,t){return t&&t.trim()!==""?t:e&&e.trim()!==""?e.charAt(0).toUpperCase()+e.slice(1):null}function Hae({dev:e=!1,health:t="unknown",model:n,runtime:r,sourcePath:s,version:a,readOnly:l=!1}){const c=qae(r,s),d=n&&n.trim()!==""?n:null,f=a&&a.trim()!==""?a.trim():null,h=l&&t!=="bad",m=!h&&t==="ok";return g.jsxs("section",{className:"pg-meta-table","aria-labelledby":"pg-overview-title",children:[g.jsx("h2",{id:"pg-overview-title",className:"pg-section-title",children:"Overview"}),g.jsxs("div",{className:"pg-meta-table__card",children:[g.jsx(uc,{label:"Mode",children:g.jsxs(Zi,{variant:Bae(e,l),size:"sm",pill:!0,children:[e&&!l?g.jsx("span",{className:"pg-meta-table__dot pg-meta-table__dot--dev","aria-hidden":!0}):null,$ae(e,l)]})}),g.jsx(uc,{label:"Status",children:g.jsxs(Zi,{variant:Uae(t,l),size:"sm",pill:!0,children:[g.jsx(tn,{name:h?"pause-circle":m?"check-circle":"x-circle",variant:"filled",size:12,color:m?"green":t==="bad"?"red":"secondary","aria-hidden":!0}),Fae(t,l)]})}),g.jsx(uc,{label:"Model",children:d?g.jsx("span",{className:"pg-meta-table__text",children:d}):g.jsx(Vy,{})}),g.jsx(uc,{label:"Source",children:c?g.jsx("span",{className:"pg-meta-table__text",title:c,children:c}):g.jsx(Vy,{})}),g.jsx(uc,{label:"Agent SDK",children:f?g.jsx("span",{className:"pg-meta-table__text",children:f}):g.jsx(Vy,{})})]})]})}function Gae({schedules:e,dev:t,onDispatch:n}){return e.length===0?null:g.jsxs("section",{className:"pg-schedules","aria-labelledby":"pg-schedules-title",children:[g.jsx("h2",{id:"pg-schedules-title",className:"pg-section-title",children:"Schedules"}),g.jsx("div",{className:"pg-schedules__card",children:e.map(r=>g.jsxs("div",{className:"pg-schedules__row",children:[g.jsxs("div",{className:"pg-schedules__copy",children:[g.jsx("div",{className:"pg-schedules__name",children:r.name}),g.jsx("div",{className:"pg-schedules__cron",children:r.cron})]}),g.jsx(Cn,{variant:"outline",size:"lg",className:"pg-outline-button",disabled:!t,title:t?`Dispatch ${r.name} once`:"Start the server with --dev to dispatch schedules by hand",onClick:()=>{n(r.name)},children:"Dispatch"})]},r.name))})]})}function wp(e){return g.jsx("span",{className:"pg-surface-field__text",children:e.map((t,n)=>g.jsxs("span",{children:[n>0?", ":"",t.name]},t.name))})}function Ep(e){return e.map(t=>g.jsxs("div",{className:"pg-surface-detail",children:[g.jsx("div",{className:"pg-surface-detail__name",children:t.name}),t.detail?g.jsx("div",{className:"pg-surface-detail__desc",children:t.detail}):null]},t.name))}function Vae({field:e,expanded:t,onToggle:n}){const s=!e.empty&&e.details!==void 0?g.jsxs("button",{type:"button",className:"pg-surface-field__head","aria-expanded":t,"aria-label":`${t?"Collapse":"Expand"} ${e.label}`,onClick:n,children:[g.jsx("span",{className:"pg-surface-field__label",children:e.label}),g.jsx(tn,{name:"chevron-down",size:12,"aria-hidden":!0,className:t?"pg-surface-field__chevron open":"pg-surface-field__chevron"})]}):g.jsx("div",{className:"pg-surface-field__label",children:e.label});return g.jsxs("div",{className:"pg-surface-field",children:[s,g.jsx("div",{className:"pg-surface-field__value",children:e.empty?g.jsx("span",{className:"pg-surface-field__empty",children:"Empty"}):t&&e.details!==void 0?g.jsx("div",{className:"pg-surface-field__details",children:e.details}):e.summary})]})}function Wae({info:e,onTryRoute:t,readOnly:n=!1}){const[r,s]=v.useState(null),[a,l]=v.useState(new Set),c=e?.tools??[],d=e?.skills??[],f=e?.subagents??[],h=e?.connections??[],m=e?.channels??[],b=e?.hooks??[],y=e?.abs??[],x=v.useMemo(()=>{const R=new Map;for(const _ of ym(m))R.set(`${_.method}:${_.url}`,_.name);return R},[m]),S=(R,_)=>{if(t){t(R,_);return}s({channelId:R,route:_})},E=m.map(R=>g.jsxs("div",{className:"pg-surface-detail",children:[g.jsx("div",{className:"pg-surface-detail__name",children:R.id}),(R.routes??[]).length===0?g.jsx("div",{className:"pg-surface-detail__desc",children:"(events only)"}):g.jsx("div",{className:"pg-surface-channel__routes",children:(R.routes??[]).map(_=>{const C=!n&&R.id!=="http",M=`${_.method} ${_.url}`,A=x.get(`${_.method.toUpperCase()}:${_.url}`);return g.jsxs("div",{className:"pg-surface-channel__route",children:[g.jsx("code",{children:M}),A?g.jsx("code",{className:"pg-surface-channel__slash",title:"Composer slash command",children:A}):null,C?g.jsx("button",{type:"button",className:"link-btn",onClick:()=>S(R.id,_),children:"Try"}):null]},M)})})]},R.id)),T=[{id:"tools",label:"Tools",empty:c.length===0,summary:wp(c),details:Ep(c.map(R=>({name:R.name,detail:R.description})))},{id:"skills",label:"Skills",empty:d.length===0,summary:wp(d),details:Ep(d.map(R=>({name:R.name,detail:R.description})))},{id:"subagents",label:"Subagents",empty:f.length===0,summary:wp(f),details:Ep(f.map(R=>({name:R.name,detail:R.description})))},{id:"connections",label:"MCP Connections",empty:h.length===0,summary:wp(h),details:Ep(h.map(R=>({name:R.name,detail:R.transport})))},{id:"channels",label:"Channels",empty:m.length===0,summary:g.jsx("span",{className:"pg-surface-field__text",children:m.map(R=>R.id).join(", ")}),details:E},{id:"hooks",label:"Hooks",empty:b.length===0,summary:g.jsx("span",{className:"pg-surface-field__text",children:b.join(", ")})},{id:"abs",label:"A/Bs",empty:y.length===0,summary:g.jsx("span",{className:"pg-surface-field__text",children:y.join(", ")})}];return g.jsxs("section",{className:"pg-surface",id:"pg-agent-surface","aria-labelledby":"pg-agent-trace-title",children:[g.jsx("h2",{id:"pg-agent-trace-title",className:"pg-section-title",children:"Agent Trace"}),e===null?g.jsx("div",{className:"pg-surface-empty",children:"Loading…"}):g.jsx("div",{className:"pg-surface-card",children:T.map(R=>g.jsx(Vae,{field:R,expanded:a.has(R.id),onToggle:()=>{l(_=>{const C=new Set(_);return C.has(R.id)?C.delete(R.id):C.add(R.id),C})}},R.id))}),r?g.jsx(Fz,{channelId:r.channelId,route:r.route,onClose:()=>s(null)}):null]})}function EC(){const e=We(z=>z.meta),t=We(z=>z.info),n=We(z=>z.health),r=We(z=>z.sessions),s=We(z=>z.current),a=We(z=>z.view),l=We(z=>z.evalCases),c=We(z=>z.evalRuns),d=We(z=>z.evalRun),f=We(z=>z.evalNavReturn),h=We(z=>z.overviewSection),m=We(z=>z.surfaceFocusNonce),b=v.useRef(null);v.useEffect(()=>{m!==0&&b.current?.scrollIntoView({behavior:"smooth",block:"start"})},[m]);const y=e.name||t?.name||"Agent",x=Iz(y),S=d??c?.[0]??null,E=d?.status==="running",T=nt.modelLabel(),R=v.useMemo(()=>{const z=d===null?c:[d,...c],D=new Set(z.flatMap(H=>H.cases.flatMap(W=>W.sessionId===void 0?[]:[W.sessionId])));return r.filter(H=>!D.has(H.sessionId))},[r,c,d]),_=dY(R),C=e0(a),M=f||C==="evals"||C==="abs",A=M?null:s?.sessionId??null,N=M?d?.runId??null:null,P=[{id:"home",label:"Agent"},{id:"runs",label:_>0?`Runs (${_})`:"Runs"},{id:"evals",label:"Evaluations"},{id:"logs",label:"Logs"}];return g.jsxs("div",{className:"pg-overview",children:[g.jsxs("div",{className:"pg-overview-identity",children:[g.jsx("div",{className:"pg-overview-identity__avatar","data-color":x,"aria-hidden":"true",children:g.jsx(tn,{name:"robot",variant:"filled",size:24,color:x})}),g.jsxs("div",{className:"pg-overview-identity__text",children:[g.jsx("h1",{className:"pg-overview-identity__name",children:y}),t?.description?g.jsx("p",{className:"pg-overview-identity__description",children:t.description}):null]})]}),g.jsx("div",{className:"pg-tabs",role:"tablist","aria-label":"Overview sections",children:P.map(z=>g.jsx("button",{type:"button",role:"tab","aria-selected":h===z.id,className:h===z.id?"pg-tab pg-tab--active":"pg-tab",onClick:()=>nt.setOverviewSection(z.id),children:z.label},z.id))}),h==="home"?g.jsxs(g.Fragment,{children:[g.jsx(Hae,{dev:e.dev,health:n,model:T||void 0,runtime:t?.runtime,sourcePath:t?.local?.cwd,version:e.version,readOnly:e.readonly===!0}),g.jsx(Gae,{schedules:t?.schedules??[],dev:e.dev&&e.readonly!==!0,onDispatch:z=>nt.dispatchSchedule(z)}),g.jsx("div",{ref:b,children:g.jsx(Wae,{info:t,readOnly:e.readonly===!0})})]}):null,h==="runs"?g.jsx(jae,{sessions:R,runs:c,currentSessionId:A,currentEvalRunId:N,readOnly:e.readonly===!0,onSelectSession:z=>nt.selectSession(z),onOpenEvalRun:z=>{nt.selectEvalRun(z)}}):null,h==="evals"?g.jsx(Pae,{cases:l,latestRun:S,running:E,readOnly:e.readonly===!0,onRun:z=>{nt.startEvalRun([z])},onRunAll:()=>{nt.startEvalRun()}}):null,h==="logs"?g.jsx("div",{className:"pg-overview-logs",children:g.jsx(Yoe,{})}):null]})}const Zz="agent-serve.playground.chatPanelWidth.v2",Rh=320,Kae=.5,Zae=.8;function cc(e){const t=e?.parentElement;return t&&t.clientWidth>0?t.clientWidth:typeof window<"u"?window.innerWidth:1200}function Qv(e){return Math.max(Rh,Math.floor(e*Zae))}function wl(e,t){return Math.min(Qv(t),Math.max(Rh,Math.round(e)))}function Wy(e){return wl(e*Kae,e)}function TC(e){try{const t=localStorage.getItem(Zz);if(t===null)return Wy(e);const n=Number.parseInt(t,10);return Number.isFinite(n)?wl(n,e):Wy(e)}catch{return Wy(e)}}function Yae(){const e=We(h=>h.chatPanelOpen),t=v.useRef(null),[n,r]=v.useState(()=>TC(typeof window<"u"?window.innerWidth:1200)),[s,a]=v.useState(!1),l=v.useRef(n);l.current=n,v.useLayoutEffect(()=>{const h=t.current?.parentElement;if(!h)return;r(TC(cc(t.current)));const m=()=>{const y=cc(t.current);r(x=>wl(x,y))},b=new ResizeObserver(m);return b.observe(h),()=>b.disconnect()},[]),v.useEffect(()=>{try{localStorage.setItem(Zz,String(n))}catch{}},[n]);const c=v.useCallback(h=>{h.preventDefault();const m=h.currentTarget,b=h.clientX,y=l.current;m.setPointerCapture(h.pointerId),a(!0),document.body.classList.add("pg-resizing-chat-panel");const x=E=>{const T=cc(t.current);r(wl(y-(E.clientX-b),T))},S=E=>{m.releasePointerCapture(E.pointerId),m.removeEventListener("pointermove",x),m.removeEventListener("pointerup",S),m.removeEventListener("pointercancel",S),a(!1),document.body.classList.remove("pg-resizing-chat-panel")};m.addEventListener("pointermove",x),m.addEventListener("pointerup",S),m.addEventListener("pointercancel",S)},[]);if(!e)return null;const d=cc(t.current),f=Qv(d);return g.jsxs("aside",{ref:t,className:s?"pg-chat-panel pg-chat-panel--resizing":"pg-chat-panel",style:{width:n},children:[g.jsx("div",{className:s?"pg-chat-panel__resizer dragging":"pg-chat-panel__resizer",role:"separator","aria-orientation":"vertical","aria-label":"Resize chat panel","aria-valuenow":n,"aria-valuemin":Rh,"aria-valuemax":f,tabIndex:0,onPointerDown:c,onKeyDown:h=>{const m=cc(t.current);h.key==="ArrowLeft"?(h.preventDefault(),r(b=>wl(b+16,m))):h.key==="ArrowRight"?(h.preventDefault(),r(b=>wl(b-16,m))):h.key==="Home"?(h.preventDefault(),r(Rh)):h.key==="End"&&(h.preventDefault(),r(Qv(m)))}}),g.jsx(Pz,{variant:"panel"}),g.jsx("div",{className:"pg-transcript-wrap",children:g.jsx(jz,{})})]})}function Xae({size:e="lg"}){const t=v.useRef(null);return g.jsxs(g.Fragment,{children:[g.jsx(Cn,{variant:"outline",size:e,className:"pg-outline-button",title:"Open a saved events.ndjson trace",onClick:()=>t.current?.click(),children:"Import Trace"}),g.jsx("input",{ref:t,type:"file",accept:".ndjson,application/x-ndjson,application/json,.json",hidden:!0,onChange:n=>{Lz(n.target.files?.[0]),n.target.value=""}})]})}function Qae(e){const t=e.replace("#","").trim();if(t.length===8)return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:parseInt(t.slice(6,8),16)/255};if(t.length===6)return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:1};if(t.length===3)return{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:1};throw new Error(`Invalid hex: ${e}`)}function Yz(e){const t=e.r.toString(16).padStart(2,"0"),n=e.g.toString(16).padStart(2,"0"),r=e.b.toString(16).padStart(2,"0");return`#${t}${n}${r}`.toUpperCase()}function Jae(e){const t=Math.round(Math.min(1,Math.max(0,e.a))*255).toString(16).padStart(2,"0");return`${Yz(e)}${t}`.toUpperCase()}const ele=/^oklch\(\s*([^\s/]+)\s+([^\s/]+)\s+([^\s/)]+?)(?:\s*\/\s*([^)]+?))?\s*\)$/i,tle=/^rgba?\(\s*([0-9.]+)\s*,\s*([0-9.]+)\s*,\s*([0-9.]+)(?:\s*,\s*([0-9.]+))?\s*\)$/i,Xz=.5/255;function Tp(e,t,n){return Math.min(n,Math.max(t,e))}function Ky(e){const t=Math.abs(e);return t<=.04045?e/12.92:(e<0?-1:1)*((t+.055)/1.055)**2.4}function Zy(e){const t=Math.abs(e);return t<=.0031308?e*12.92:(e<0?-1:1)*(1.055*t**(1/2.4)-.055)}function nle(e){const t=Ky(e.r/255),n=Ky(e.g/255),r=Ky(e.b/255),s=.4122214708*t+.5363325363*n+.0514459929*r,a=.2119034982*t+.6806995451*n+.1073969566*r,l=.0883024619*t+.2817188376*n+.6299787005*r,c=Math.cbrt(s),d=Math.cbrt(a),f=Math.cbrt(l),h=.2104542553*c+.793617785*d-.0040720468*f,m=1.9779984951*c-2.428592205*d+.4505937099*f,b=.0259040371*c+.7827717662*d-.808675766*f,y=Math.sqrt(m*m+b*b);let x=Math.atan2(b,m)*180/Math.PI;return x<0&&(x+=360),{l:h,c:y,h:y<5e-4?0:x,a:e.a}}function rle(e){const t=e.h*Math.PI/180,n=e.c*Math.cos(t),r=e.c*Math.sin(t),s=e.l+.3963377774*n+.2158037573*r,a=e.l-.1055613458*n-.0638541728*r,l=e.l-.0894841775*n-1.291485548*r,c=s*s*s,d=a*a*a,f=l*l*l,h=4.0767416621*c-3.3077115913*d+.2309699292*f,m=-1.2684380046*c+2.6097574011*d-.3413193965*f,b=-.0041960863*c-.7034186147*d+1.707614701*f;return{r:Math.round(Tp(Zy(h),0,1)*255),g:Math.round(Tp(Zy(m),0,1)*255),b:Math.round(Tp(Zy(b),0,1)*255),a:Tp(e.a,0,1)}}function _p(e,t){const n=5e-4*10**(1-t);return!Number.isFinite(e)||Object.is(e,-0)||Math.abs(e)<n?"0":e.toFixed(t).replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,"")}function Qz(e){const t=_p(e.l,3),n=_p(e.c,3),r=n==="0"?"0":_p(e.h,3);return e.a<1-Xz?`oklch(${t} ${n} ${r} / ${_p(e.a,3)})`:`oklch(${t} ${n} ${r})`}function Rp(e,t){const n=e.trim();if(n.endsWith("%"))return Number.parseFloat(n.slice(0,-1))/100*t;const r=n.replace(/deg$/i,"");return Number.parseFloat(r)}function Jz(e){const t=ele.exec(e.trim());if(t===null)throw new Error(`Invalid oklch: ${e}`);const n=Rp(t[1],1),r=Rp(t[2],.4),s=Rp(t[3],1),a=t[4]===void 0?1:Rp(t[4],1);if(![n,r,s,a].every(Number.isFinite))throw new Error(`Invalid oklch: ${e}`);return{l:n,c:r,h:s,a}}function ile(e){const t=tle.exec(e.trim());if(t===null)throw new Error(`Invalid rgb: ${e}`);return{r:Number.parseFloat(t[1]),g:Number.parseFloat(t[2]),b:Number.parseFloat(t[3]),a:t[4]===void 0?1:Number.parseFloat(t[4])}}function ej(e){const t=e.trim();if(t.startsWith("#"))return Qae(t);if(t.toLowerCase().startsWith("oklch("))return rle(Jz(t));if(/^rgba?\(/i.test(t))return ile(t);throw new Error(`Unsupported CSS color: ${e}`)}function sle(e){return Qz(nle(e))}function ole(e){const t=e.trim();return t.toLowerCase().startsWith("oklch(")?Qz(Jz(t)):sle(ej(t))}function ale(e){const t=ej(e);return t.a<1-Xz?Jae(t):Yz(t)}function lle(e,t){const n=Object.keys(e).sort((l,c)=>l.localeCompare(c)),r=n.map(l=>`${t}--cursor-${l}: ${ale(e[l])};`),s=`${t} `,a=n.map(l=>`${s}--cursor-${l}: ${ole(e[l])};`);return[...r,`${t}@supports (color: oklch(0 0 0)) {`,...a,`${t}}`]}const ule={name:"dark",appearance:"dark",highContrast:!1,sidebar:"oklch(0.209 0 0)",chrome:"oklch(0.191 0 0)",editor:"oklch(0.209 0 0)",base:"oklch(0.955 0 0)",accent:"oklch(0.681 0.131 252.629)",actionLabel:"oklch(0.226 0.013 264.284)",brand:"oklch(0.652 0.214 37.99)",focus:"oklch(0.955 0 0)",success:"oklch(0.638 0.129 153.739)",warn:"oklch(0.811 0.118 71.255)",danger:"oklch(0.628 0.194 8.387)",added:"oklch(0.713 0.094 155.438)",modified:"oklch(0.811 0.118 71.255)",removed:"oklch(0.712 0.177 12.651)",untracked:"oklch(0.775 0.062 217.469)",terminalAnsiBlack:"oklch(0.26 0 0)",terminalAnsiRed:"oklch(0.712 0.177 12.651)",terminalAnsiYellow:"oklch(0.712 0.125 71.923)",terminalAnsiGreen:"oklch(0.638 0.129 153.739)",terminalAnsiCyan:"oklch(0.775 0.062 217.469)",terminalAnsiBlue:"oklch(0.697 0.059 248.687)",terminalAnsiMagenta:"oklch(0.692 0.062 332.665)",terminalAnsiWhite:"oklch(0.955 0 0)",terminalAnsiBrightBlack:"oklch(0.955 0 0 / 0.6)",terminalAnsiBrightRed:"oklch(0.712 0.177 12.651)",terminalAnsiBrightYellow:"oklch(0.811 0.118 71.255)",terminalAnsiBrightGreen:"oklch(0.713 0.094 155.438)",terminalAnsiBrightCyan:"oklch(0.775 0.062 217.469)",terminalAnsiBrightBlue:"oklch(0.713 0.056 247.764)",terminalAnsiBrightMagenta:"oklch(0.692 0.062 332.665)",terminalAnsiBrightWhite:"oklch(0.955 0 0)",red:"oklch(0.712 0.177 12.651)",orange:"oklch(0.693 0.096 38.241)",yellow:"oklch(0.811 0.118 71.255)",green:"oklch(0.638 0.129 153.739)",cyan:"oklch(0.697 0.059 248.687)",blue:"oklch(0.74 0.101 251.884)",magenta:"oklch(0.692 0.062 332.665)",purple:"oklch(0.679 0.156 286.998)",diffAddedLineBackground:"oklch(0.638 0.129 153.739 / 0.2)",diffAddedTextBackground:"oklch(0.638 0.129 153.739 / 0.133)",diffRemovedLineBackground:"oklch(0.5 0.2 9.842 / 0.2)",diffRemovedTextBackground:"oklch(0.5 0.2 9.842 / 0.133)"},cle={name:"light",appearance:"light",highContrast:!1,sidebar:"oklch(0.964 0 0)",chrome:"oklch(0.979 0 0)",editor:"oklch(0.991 0 0)",base:"oklch(0.191 0 0)",accent:"oklch(0.561 0.137 249.943)",actionLabel:"oklch(0.991 0 0)",brand:"oklch(0.652 0.214 37.99)",focus:"oklch(0.561 0.137 249.943)",success:"oklch(0.479 0.116 156.327)",warn:"oklch(0.567 0.123 69.543)",danger:"oklch(0.518 0.196 14.313)",added:"oklch(0.479 0.116 156.327)",modified:"oklch(0.567 0.123 69.543)",removed:"oklch(0.518 0.196 14.313)",untracked:"oklch(0.487 0.077 204.607)",terminalAnsiBlack:"oklch(0.191 0 0)",terminalAnsiRed:"oklch(0.518 0.196 14.313)",terminalAnsiYellow:"oklch(0.503 0.109 69.936)",terminalAnsiGreen:"oklch(0.479 0.116 156.327)",terminalAnsiCyan:"oklch(0.487 0.077 204.607)",terminalAnsiBlue:"oklch(0.497 0.143 250.703)",terminalAnsiMagenta:"oklch(0.449 0.176 345.345)",terminalAnsiWhite:"oklch(0.991 0 0)",terminalAnsiBrightBlack:"oklch(0.191 0 0 / 0.741)",terminalAnsiBrightRed:"oklch(0.582 0.178 13.604)",terminalAnsiBrightYellow:"oklch(0.567 0.123 69.543)",terminalAnsiBrightGreen:"oklch(0.542 0.133 155.45)",terminalAnsiBrightCyan:"oklch(0.552 0.068 203.209)",terminalAnsiBrightBlue:"oklch(0.561 0.137 249.943)",terminalAnsiBrightMagenta:"oklch(0.577 0.154 343.697)",terminalAnsiBrightWhite:"oklch(1 0 0)",red:"oklch(0.518 0.196 14.313)",orange:"oklch(0.576 0.183 39.534)",yellow:"oklch(0.567 0.123 69.543)",green:"oklch(0.479 0.116 156.327)",cyan:"oklch(0.487 0.077 204.607)",blue:"oklch(0.561 0.137 249.943)",magenta:"oklch(0.449 0.176 345.345)",purple:"oklch(0.572 0.154 287.656)",diffAddedLineBackground:"oklch(0.663 0.162 155.537 / 0.141)",diffAddedTextBackground:"oklch(0.666 0.162 155.968 / 0.22)",diffRemovedLineBackground:"oklch(0.703 0.192 13.697 / 0.22)",diffRemovedTextBackground:"oklch(0.703 0.192 13.697 / 0.341)"},fle=ax({name:pI(),appearance:hI(["light","dark"]),highContrast:Q8()}),i0=["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"],dle=Object.fromEntries(i0.map(e=>[e,pI()]));fle.extend(dle);function ple(e){const t={};for(const n of i0){const r=e[n],s=of(n);t[s]=r}return t}function hle(e){return e.highContrast?e.appearance==="light"?"lightHighContrast":"darkHighContrast":e.appearance}new Set(i0);const mle={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"},textMedia:{op:"mixWhite",whitePercent:100},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},bgMedia:{op:"mixBlack",blackPercent:72},bgMediaHover:{op:"mixBlack",blackPercent:54},bgElevated:{op:"ref",ref:"editor"},bgChrome:{op:"ref",ref:"chrome"},bgCard:{op:"ref",ref:"bgQuaternary"},bgInput:{op:"ref",ref:"editor"},bgInputField:{op:"mixTransparentOverlay",ref:"base",percent:3},bgInputSurface:{op:"ref",ref:"bgQuaternary"},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},strokeControlDivider:{op:"mixBlack",blackPercent:16},strokeControlDividerMonochrome:{op:"mixTransparent",ref:"editor",percent:16},strokePrimary:{op:"mixTransparent",ref:"base",percent:20},strokeSecondary:{op:"mixTransparent",ref:"base",percent:12},strokeMedia:{op:"mixWhite",whitePercent: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"}]},boxShadowPopup:{op:"shadow",candidates:[{x:0,y:3,blur:8,spread:0,shadowToken:"shadowSecondary"},{x:0,y:2,blur:5,spread:0,shadowToken:"shadowSecondary"},{x:0,y:1,blur:1,spread:0,shadowToken:"shadowSecondary"}]},boxShadowLg:{op:"shadow",candidates:[{inset:!0,x:0,y:0,blur:4,spread:0,literalColor:"oklch(1 0 0 / 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:"oklch(1 0 0 / 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"}},_C={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},bgInputField:{op:"ref",ref:"bgInput"},bgInputSurface:{op:"ref",ref:"bgInput"},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}},gle={light:{shadowPrimary:{op:"mixBlack",blackPercent:6},boxShadowPopup:{op:"shadow",candidates:[{x:0,y:6,blur:18,spread:0,literalColor:"lch(0% 0 0 / 0.02)"},{x:0,y:3,blur:9,spread:0,literalColor:"lch(0% 0 0 / 0.04)"},{x:0,y:1,blur:1,spread:0,literalColor:"lch(0% 0 0 / 0.04)"}]}},dark:{},lightHighContrast:{..._C},darkHighContrast:{..._C}};function _s(e){return`var(--cursor-${of(e)})`}function ble(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} ${_s(e.shadowToken)}`:`${t}${n} color-mix(in srgb, ${_s("shadowPrimary")} ${e.primaryMixPercent}%, transparent)`}function yle(e){return e.map(t=>ble(t)).join(", ")}function vle(e){switch(e.op){case"mixTransparent":case"mixTransparentOverlay":return`color-mix(in srgb, ${_s(e.ref)} ${e.percent}%, transparent)`;case"mixTwo":return`color-mix(in srgb, ${_s(e.k1)} ${e.p1}%, ${_s(e.k2)})`;case"mixBlackChrome":return`color-mix(in srgb, oklch(0 0 0) ${e.blackPercent}%, ${_s("chrome")})`;case"mixBlack":return`color-mix(in srgb, oklch(0 0 0) ${e.blackPercent}%, transparent)`;case"mixWhite":return`color-mix(in srgb, oklch(1 0 0) ${e.whitePercent}%, transparent)`;case"ref":return e.fadePercent!==void 0?`color-mix(in srgb, ${_s(e.ref)} ${e.fadePercent}%, transparent)`:_s(e.ref);case"shadow":return yle(e.candidates);case"mixTransparentAlpha":return`color-mix(in srgb, ${_s(e.key)} ${e.percent}%, transparent)`;default:return e}}function kle(e){const t=gle[e];return Object.entries(mle).map(([n,r])=>({name:of(n),expr:t[n]??r}))}function xle(e){const t=kle(e),n=[];for(const{name:r,expr:s}of t)n.push(` --cursor-${r}: ${vle(s)};`);return n}function Sle(e){const t=ple(e),n=lle(t," "),r=hle(e),s=xle(r).join(`
|
|
77
|
+
`);return`:root {
|
|
78
|
+
${n.join(`
|
|
79
|
+
`)}
|
|
80
|
+
}
|
|
81
|
+
:root {
|
|
82
|
+
${s}
|
|
83
|
+
}`}const Jv={fontFamily:my.fontFamily,scrollbar:my.scrollbar,syntax:my.syntax},wle=[{key:"fontFamily",cssMid:"font-family"},{key:"scrollbar",cssMid:"scrollbar"},{key:"syntax",cssMid:"syntax"}];function Ele(e,t){const n=of(t.replace(/\./g,"-"));return`--cursor-${e}-${n}`}function ws(e,t,n,r=""){for(const[s,a]of Object.entries(t)){const l=typeof a=="number"?`${a}${r}`:a;n.push(` ${Ele(e,s)}: ${l};`)}}function Tle(e={}){const t=e.selector??":root",n=e.theme??Jv,r=[`${t} {`];for(const{key:s,cssMid:a}of wle)for(const[l,c]of Object.entries(n[s]))r.push(` --cursor-${a}-${of(l)}: ${c};`);return ws("duration",mv,r,"ms"),ws("easing",PO,r),ws("spacing",KF,r,"px"),ws("radius",ZF,r,"px"),ws("height",YF,r,"px"),ws("font-size",XF,r,"px"),ws("line-height",QF,r,"px"),ws("letter-spacing",JF,r,"px"),ws("elevation",WF,r),r.push("}"),r.join(`
|
|
84
|
+
`)}function _le(e){const t=Sle(e.core),n=Tle(e.nonColor);return`${t}
|
|
85
|
+
${n}`}function Rle(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 Cle(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 Nle(e,t){const n=`${e} ${t}`.toLowerCase();return n.includes("mac")?"mac":n.includes("win")?"windows":"linux"}function Ale(e){return Cle(e.platform,Rle(e.locale))}function Ole(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 RC="agent-serve-cursor-theme",tj="agent-serve.playground.theme";function nj(){try{return localStorage.getItem(tj)}catch{return null}}function Ile(){return typeof window>"u"||typeof window.matchMedia!="function"?!0:window.matchMedia("(prefers-color-scheme: dark)").matches}function Mle(e=typeof window<"u"?window.location.search:"",t={}){const n=new URLSearchParams(e).get("theme");if(n==="light"||n==="dark")return n;const r=t.stored!==void 0?t.stored:nj();return r==="light"||r==="dark"?r:(t.prefersDark!==void 0?t.prefersDark:Ile())?"dark":"light"}function ek(e){const t=document.documentElement;t.dataset.theme=e==="light"?"cursor-light":"cursor-dark",t.style.colorScheme=e;const n=Nle(navigator.userAgent,navigator.platform),r=_le({core:e==="light"?cle:ule,nonColor:{theme:{...Jv,fontFamily:{...Jv.fontFamily,sans:Ale({platform:n,locale:navigator.language}),mono:Ole(n)}}}});let s=document.getElementById(RC);s==null&&(s=document.createElement("style"),s.id=RC,document.head.appendChild(s)),s.textContent=r}function Dle(){return document.documentElement.dataset.theme==="cursor-light"?"light":"dark"}function zle(e){try{localStorage.setItem(tj,e)}catch{}try{const t=new URL(window.location.href);t.searchParams.set("theme",e),history.replaceState(null,"",t.toString())}catch{}ek(e)}function jle(e=window.location.search){if(ek(Mle(e)),typeof window.matchMedia!="function")return()=>{};const t=window.matchMedia("(prefers-color-scheme: dark)"),n=()=>{const r=new URLSearchParams(window.location.search).get("theme");if(r==="light"||r==="dark")return;const s=nj();s==="light"||s==="dark"||ek(t.matches?"dark":"light")};return t.addEventListener("change",n),()=>t.removeEventListener("change",n)}function Lle(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>t.disconnect()}function Ple(){return v.useSyncExternalStore(Lle,Dle,()=>"dark")}function CC({title:e="Playground",onNewChat:t}){const n=Ple(),r=We(s=>s.chatPanelOpen);return g.jsxs("header",{className:"pg-overview-header",children:[g.jsxs("div",{className:"pg-overview-header__start",children:[g.jsx("div",{className:"pg-overview-header__title",children:e}),g.jsx(kr,{icon:n==="dark"?"sun":"moon",size:"lg","aria-label":n==="dark"?"Switch to light theme":"Switch to dark theme",onClick:()=>zle(n==="dark"?"light":"dark")})]}),g.jsxs("div",{className:"pg-overview-header__actions",children:[t?g.jsxs("div",{className:"pg-overview-header__new-chat",children:[g.jsx(Cn,{variant:"primary",tone:"monochrome",size:"lg",title:"New chat",onClick:t,children:"New Chat"}),g.jsx(Xae,{})]}):null,g.jsx("span",{className:"pg-overview-header__panel-toggle",children:g.jsx(DW,{icon:"layout-sidebar-right",size:"lg","aria-label":r?"Close chat panel":"Open chat panel",pressed:r,onPressedChange:s=>nt.setChatPanelOpen(s)})})]})]})}function $le(){const e=We(t=>t.toast);return e?g.jsx("div",{className:"pg-toast",role:"status","aria-live":"polite",children:e}):null}const Ble=/\b([\w.-]+)\/([\w.-]+)#(\d+)\b/,Fle=/https?:\/\/(?:www\.)?github\.com\/([\w.-]+)\/([\w.-]+)\/pull\/(\d+)/i;function Ule(e){const t=Hle(e.externalUrl),n=NC(e.prUrl)??NC(e.externalUrl)??qle(e.title);return{slack:t,github:n!==void 0&&n!==t?n:void 0}}function qle(e){const n=e.match(Fle)??e.match(Ble);if(n!==null)return`https://github.com/${n[1]}/${n[2]}/pull/${n[3]}`}function Hle(e){if(!(e===null||e===""||!Vle(e)||Ox(e)))return Gle(e)?e:void 0}function NC(e){if(!(e==null||e===""))return Ox(e)?e:void 0}function Gle(e){try{const t=new URL(e).hostname.toLowerCase();return t==="slack.com"||t.endsWith(".slack.com")}catch{return!1}}function Vle(e){return e.startsWith("https://")||e.startsWith("http://")}const Wle=[{value:"overview",label:"Overview"},{value:"chat",label:"Chat"},{value:"trace",label:"Trace"},{value:"raw",label:"Raw"},{value:"evals",label:"Evals"},{value:"abs",label:"A/Bs"},{value:"artifacts",label:"Artifacts"}],rj="(max-width: 640px)";function Kle(e){const t=window.matchMedia(rj);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function Zle(){return v.useSyncExternalStore(Kle,()=>window.matchMedia(rj).matches)}function Yle(){const e=We(C=>C.barTitle),t=We(C=>C.barId),n=We(C=>C.externalUrl),r=We(C=>C.current),s=We(C=>C.view),a=We(C=>C.authToken),l=We(C=>C.aliasHosted),c=We(C=>C.embedded),d=We(C=>C.evalNavReturn),f=We(C=>C.evalRun),h=We(C=>C.info),m=Zle(),b=zz(Wle,h,s),y=r?.sessionId??null,x=d&&s!=="evals"&&f!==null,S=Ule({title:e,externalUrl:n,prUrl:r?.prUrl}),E=S.slack,T=S.github,R=async()=>{if(y)try{const C=await nt.api.eventsText(y);if(!C.ok){nt.toast(`Download failed (${C.status})`);return}const M=await C.blob(),A=URL.createObjectURL(M),N=document.createElement("a");N.href=A,N.download=`${y}.events.ndjson`,N.target="_self",document.body.appendChild(N),N.click(),N.remove(),URL.revokeObjectURL(A)}catch(C){nt.toast(`Download failed: ${C instanceof Error?C.message:String(C)}`)}},_=m?g.jsx(CW,{size:"base","aria-label":"Visualization mode",value:s,onValueChange:C=>nt.setView(C??"overview"),options:b}):g.jsx(Tc,{size:"sm",variant:"compact",value:s,onValueChange:C=>nt.setView(C),"aria-label":"Visualization mode",children:b.map(C=>g.jsx(Tc.Item,{value:C.value,children:C.label},C.value))});return g.jsxs("div",{className:"pg-topbar",children:[g.jsx(kr,{icon:"arrow-left",size:"sm","aria-label":"Back to overview",onClick:()=>nt.backToOverview()}),x?g.jsx(Cn,{variant:"secondary",size:"sm",onClick:()=>nt.backToEvals(),title:"Return to eval results",children:"← Back to Evals"}):null,g.jsx("span",{className:"session-title",children:e}),t?g.jsx("span",{className:"session-id",children:t}):null,c?null:g.jsxs(g.Fragment,{children:[E!==void 0?g.jsx(ga,{className:"tlink",href:E,title:"Open the Slack thread",children:"Open in Slack"}):null,T!==void 0?g.jsx(ga,{className:"tlink",href:T,title:"Open the GitHub pull request",children:"Open in GitHub"}):null,y?g.jsx(Cn,{variant:"ghost",size:"sm",onClick:()=>{R()},title:"Download this session's event log",children:"Download"}):null]}),g.jsx("span",{className:"grow"}),_,c&&(y!==null||E!==void 0||T!==void 0)?g.jsxs(Br,{children:[g.jsx(Br.Trigger,{children:g.jsx(kr,{icon:"dots-3-horizontal",size:"sm","aria-label":"More actions"})}),g.jsxs(Br.Content,{"aria-label":"Session actions",size:"sm",children:[E!==void 0?g.jsx(Br.Item,{onSelect:()=>window.open(E,"_blank","noopener,noreferrer"),children:"Open in Slack"}):null,T!==void 0?g.jsx(Br.Item,{onSelect:()=>window.open(T,"_blank","noopener,noreferrer"),children:"Open in GitHub"}):null,y!==null?g.jsx(Br.Item,{onSelect:()=>{R()},children:"Download event log"}):null]})]}):null,l?null:g.jsx("div",{className:"pg-token",children:g.jsx(hf,{type:"password",size:"base","aria-label":"Bearer token",placeholder:"Bearer token (optional)",value:a,onChange:C=>nt.setAuthToken(C.target.value),title:"Sent as Authorization: Bearer ... on API calls"})})]})}const ij="(min-width: 1201px)";function Xle(e){const t=window.matchMedia(ij);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function Qle(){return window.matchMedia(ij).matches}function Jle(){return!0}function eue(){return v.useSyncExternalStore(Xle,Qle,Jle)}function tue(){const e=We(d=>d.view),t=We(d=>d.drawerOpen),n=We(d=>d.aliasHosted),r=We(d=>d.aliasToken),s=We(d=>d.embedded),a=We(d=>d.meta.readonly===!0),l=eue();if(v.useEffect(()=>{nt.boot()},[]),n&&r.trim()==="")return s?g.jsx(FY,{}):g.jsx(BY,{});const c=l||s;return g.jsxs("div",{className:"pg-app",children:[g.jsx("div",{className:"pg-main",children:c?g.jsxs("div",{className:"pg-overview-layout",children:[g.jsxs("div",{className:"pg-overview-main",children:[g.jsx(CC,{onNewChat:a?void 0:()=>nt.newChat()}),g.jsx("div",{className:"pg-overview-scroll",children:g.jsx(EC,{})})]}),g.jsx(Yae,{})]}):e==="overview"?g.jsxs("div",{className:"pg-overview-main",children:[g.jsx(CC,{onNewChat:a?void 0:()=>nt.newChat()}),g.jsx("div",{className:"pg-overview-scroll",children:g.jsx(EC,{})})]}):s?g.jsxs(g.Fragment,{children:[g.jsx(Yle,{}),g.jsxs("div",{className:"pg-columns",children:[e==="chat"?g.jsxs("div",{className:"pg-transcript-wrap",children:[g.jsx(Oz,{}),g.jsx(VM,{})]}):null,e==="trace"?g.jsx(rD,{}):null,e==="raw"?g.jsx(eD,{}):null,e==="evals"?g.jsx(YM,{}):null,e==="abs"?g.jsx(qM,{}):null,e==="artifacts"?g.jsx(GM,{}):null]})]}):g.jsx(qoe,{})}),t?g.jsx("button",{type:"button","aria-label":"Close agent surface",className:"pg-drawer-backdrop",onClick:()=>nt.setDrawerOpen(!1)}):null,g.jsx(Zoe,{}),g.jsx($le,{})]})}jle();HY();const sj=document.getElementById("root");if(sj===null)throw new Error("Playground bootstrap failed: #root element is missing.");y2.createRoot(sj).render(g.jsx(v.StrictMode,{children:g.jsx(Ms,{menuSize:"md",children:g.jsx(tue,{})})}));
|