@minimalcorp/tsunagi 0.1.31 → 0.1.33
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/.next/standalone/apps/web/.next/BUILD_ID +1 -1
- package/.next/standalone/apps/web/.next/build-manifest.json +3 -3
- package/.next/standalone/apps/web/.next/prerender-manifest.json +3 -3
- package/.next/standalone/apps/web/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/apps/web/.next/server/app/_not-found.rsc +13 -13
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_full.segment.rsc +13 -13
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_index.segment.rsc +8 -8
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/apps/web/.next/server/app/index.html +1 -1
- package/.next/standalone/apps/web/.next/server/app/index.rsc +15 -16
- package/.next/standalone/apps/web/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -5
- package/.next/standalone/apps/web/.next/server/app/index.segments/_full.segment.rsc +15 -16
- package/.next/standalone/apps/web/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/standalone/apps/web/.next/server/app/index.segments/_index.segment.rsc +8 -8
- package/.next/standalone/apps/web/.next/server/app/index.segments/_tree.segment.rsc +2 -3
- package/.next/standalone/apps/web/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/settings.html +1 -1
- package/.next/standalone/apps/web/.next/server/app/settings.rsc +15 -15
- package/.next/standalone/apps/web/.next/server/app/settings.segments/_full.segment.rsc +15 -15
- package/.next/standalone/apps/web/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/standalone/apps/web/.next/server/app/settings.segments/_index.segment.rsc +8 -8
- package/.next/standalone/apps/web/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/apps/web/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
- package/.next/standalone/apps/web/.next/server/app/settings.segments/settings.segment.rsc +3 -3
- package/.next/standalone/apps/web/.next/server/app/tasks/[id]/page.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__08c7fz~._.js +3 -0
- package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0h4wzcb._.js +1 -1
- package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0nhzci6._.js +14 -0
- package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0ome304._.js +1 -1
- package/.next/standalone/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__0tq9wv6._.js → [root-of-the-server]__0r5k1o3._.js} +2 -2
- package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0vi01rl._.js +14 -0
- package/.next/standalone/apps/web/.next/server/chunks/ssr/{_0836rl_._.js → _02dcd~k._.js} +2 -2
- package/.next/standalone/apps/web/.next/server/chunks/ssr/{_03hz06e._.js → _0dar4c0._.js} +2 -2
- package/.next/standalone/apps/web/.next/server/chunks/ssr/_0g.cd6a._.js +17 -17
- package/.next/standalone/apps/web/.next/server/chunks/ssr/_0lpms0u._.js +3 -0
- package/.next/standalone/apps/web/.next/server/chunks/ssr/_0owas.l._.js +3 -0
- package/.next/standalone/apps/web/.next/server/chunks/ssr/{_0amxree._.js → _0sxye4q._.js} +2 -2
- package/.next/standalone/apps/web/.next/server/chunks/ssr/_109pmo2._.js +3 -0
- package/.next/standalone/apps/web/.next/server/chunks/ssr/apps_web_src_app_settings_page_tsx_0i6itlb._.js +1 -1
- package/.next/standalone/apps/web/.next/server/chunks/ssr/apps_web_src_app_tasks_[id]_page_tsx_0jshsm2._.js +23 -2
- package/.next/standalone/apps/web/.next/server/chunks/ssr/{node_modules_065xsw3._.js → node_modules_00bsm~0._.js} +1 -1
- package/.next/standalone/apps/web/.next/server/chunks/ssr/{node_modules_0dmu62y._.js → node_modules_03dusl-._.js} +1 -1
- package/.next/standalone/apps/web/.next/server/chunks/ssr/{node_modules_0z0orm9._.js → node_modules_09g056t._.js} +1 -1
- package/.next/standalone/apps/web/.next/server/chunks/ssr/{node_modules_0jcrj-2._.js → node_modules_09o-nzb._.js} +1 -1
- package/.next/standalone/apps/web/.next/server/chunks/ssr/{node_modules_0v86kpj._.js → node_modules_0_wjeog._.js} +1 -1
- package/.next/standalone/apps/web/.next/server/chunks/ssr/{node_modules_0vm.f2d._.js → node_modules_0az0yoa._.js} +1 -1
- package/.next/standalone/apps/web/.next/server/chunks/ssr/{node_modules_046ca89._.js → node_modules_0ec.p48._.js} +1 -1
- package/.next/standalone/apps/web/.next/server/chunks/ssr/{node_modules_0c_-8tt._.js → node_modules_131360a._.js} +1 -1
- package/.next/standalone/apps/web/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0zerlct._.js +3 -0
- package/.next/standalone/apps/web/.next/server/chunks/ssr/node_modules_next_dist_0xdsm99._.js +1 -1
- package/.next/standalone/apps/web/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/apps/web/.next/server/pages/404.html +1 -1
- package/.next/standalone/apps/web/.next/server/pages/500.html +1 -1
- package/.next/standalone/apps/web/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/apps/web/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/apps/web/.next/static/chunks/02k8hsfyr1oif.css +4 -0
- package/.next/standalone/apps/web/.next/static/chunks/076mcjezjnahd.js +1 -0
- package/.next/standalone/apps/web/.next/static/chunks/08u0u06ip_aj0.js +5 -0
- package/.next/standalone/apps/web/.next/static/chunks/0dqv~laaou7x3.js +64 -0
- package/.next/standalone/apps/web/.next/static/chunks/0e8u7rqrqfiiy.js +1 -0
- package/.next/standalone/apps/web/.next/static/chunks/0gfpx.h8alews.js +11 -0
- package/.next/standalone/apps/web/.next/static/chunks/0k9kik1oc11wc.js +1 -0
- package/.next/standalone/apps/web/.next/static/chunks/0szj.38-.-4p4.js +1 -0
- package/.next/standalone/apps/web/.next/static/chunks/0w-rozhi-~746.js +11 -0
- package/.next/standalone/apps/web/.next/static/chunks/0z8cfvtbwii50.js +24 -0
- package/.next/standalone/apps/web/.next/static/chunks/0zdnw6m70_-dp.js +1 -0
- package/dist/cli.js +16 -1
- package/dist/server/generated/prisma/browser.d.ts +0 -5
- package/dist/server/generated/prisma/client.d.ts +0 -5
- package/dist/server/generated/prisma/commonInputTypes.d.ts +52 -52
- package/dist/server/generated/prisma/internal/class.d.ts +0 -11
- package/dist/server/generated/prisma/internal/class.js +4 -4
- package/dist/server/generated/prisma/internal/prismaNamespace.d.ts +6 -91
- package/dist/server/generated/prisma/internal/prismaNamespace.js +1 -10
- package/dist/server/generated/prisma/internal/prismaNamespaceBrowser.d.ts +1 -11
- package/dist/server/generated/prisma/internal/prismaNamespaceBrowser.js +1 -10
- package/dist/server/generated/prisma/models/Repository.d.ts +82 -1
- package/dist/server/generated/prisma/models/Task.d.ts +0 -7
- package/dist/server/generated/prisma/models.d.ts +0 -1
- package/dist/server/index.js +4 -3
- package/dist/server/lib/repositories/repository.d.ts +7 -1
- package/dist/server/lib/repositories/repository.js +27 -29
- package/dist/server/lib/worktree-manager.js +14 -2
- package/dist/server/pty-manager.js +33 -1
- package/dist/server/routes/repos.js +93 -19
- package/dist/server/routes/terminal.js +3 -3
- package/npm-shrinkwrap.json +235 -194
- package/package.json +1 -1
- package/prisma/migrations/20260915000000_drop_planner_tabs/migration.sql +3 -0
- package/prisma/migrations/20260916000000_add_repository_order/migration.sql +12 -0
- package/prisma/schema.prisma +1 -13
- package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__053-iaj._.js +0 -3
- package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__07kf5h-._.js +0 -35
- package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0_gamc9._.js +0 -35
- package/.next/standalone/apps/web/.next/server/chunks/ssr/apps_web_src_0w0y9fd._.js +0 -3
- package/.next/standalone/apps/web/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0_.o928._.js +0 -3
- package/.next/standalone/apps/web/.next/static/chunks/0.1pdl3yo~xet.js +0 -5
- package/.next/standalone/apps/web/.next/static/chunks/001oo2jah4cv9.js +0 -1
- package/.next/standalone/apps/web/.next/static/chunks/05b63w8.ny19p.js +0 -1
- package/.next/standalone/apps/web/.next/static/chunks/08dtfekvxgpfu.js +0 -1
- package/.next/standalone/apps/web/.next/static/chunks/0dpeys_k2-mrk.js +0 -32
- package/.next/standalone/apps/web/.next/static/chunks/0hvtxos.brr01.js +0 -1
- package/.next/standalone/apps/web/.next/static/chunks/0nh1-0lee-1pk.js +0 -32
- package/.next/standalone/apps/web/.next/static/chunks/0nhpg19g1rl_7.js +0 -1
- package/.next/standalone/apps/web/.next/static/chunks/0tggf01u1vugi.js +0 -3
- package/.next/standalone/apps/web/.next/static/chunks/0wxrfu5la_s94.js +0 -64
- package/.next/standalone/apps/web/.next/static/chunks/0zu48yvkl8pyj.css +0 -4
- package/.next/standalone/apps/web/.next/static/chunks/13twvr.qg3khh.js +0 -1
- package/.next/standalone/apps/web/.next/static/chunks/164p.6qr5~-7x.js +0 -1
- package/dist/server/generated/prisma/models/PlannerTab.d.ts +0 -1089
- package/dist/server/generated/prisma/models/PlannerTab.js +0 -1
- package/dist/server/routes/planner.d.ts +0 -2
- package/dist/server/routes/planner.js +0 -86
- /package/.next/standalone/apps/web/.next/static/{66COjNvXaXarcvgB4nt9B → fUycQdovbCSAwFW2xvyuD}/_buildManifest.js +0 -0
- /package/.next/standalone/apps/web/.next/static/{66COjNvXaXarcvgB4nt9B → fUycQdovbCSAwFW2xvyuD}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/apps/web/.next/static/{66COjNvXaXarcvgB4nt9B → fUycQdovbCSAwFW2xvyuD}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,26568,(e,t,n)=>{"use strict";var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,o=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g;function d(e){return e?e.replace(c,""):""}t.exports=function(e,t){if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,c=1;function f(e){var t=e.match(i);t&&(n+=t.length);var r=e.lastIndexOf("\n");c=~r?e.length-r:c+e.length}function p(){var e={line:n,column:c};return function(t){return t.position=new h(e),g(o),t}}function h(e){this.start=e,this.end={line:n,column:c},this.source=t.source}function m(r){var i=Error(t.source+":"+n+":"+c+": "+r);if(i.reason=r,i.filename=t.source,i.line=n,i.column=c,i.source=e,t.silent);else throw i}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function y(e){var t;for(e=e||[];t=v();)!1!==t&&e.push(t);return e}function v(){var t=p();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;""!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return m("End of comment missing");var r=e.slice(2,n-2);return c+=2,f(r),e=e.slice(n),c+=2,t({type:"comment",comment:r})}}h.prototype.content=e,g(o);var b,x=[];for(y(x);b=function(){var e=p(),t=g(a);if(t){if(v(),!g(l))return m("property missing ':'");var n=g(s),i=e({type:"declaration",property:d(t[0].replace(r,"")),value:n?d(n[0].replace(r,"")):""});return g(u),i}}();)!1!==b&&(x.push(b),y(x));return x}},70454,(e,t,n)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;let r=(0,i.default)(e),o="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;let{property:r,value:i}=e;o?t(r,i,e):i&&((n=n||{})[r]=i)}),n};let i=r(e.r(26568))},65185,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.camelCase=void 0;var r=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,o=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},u=function(e,t){return"".concat(t,"-")};n.camelCase=function(e,t){var n;return(void 0===t&&(t={}),!(n=e)||o.test(n)||r.test(n))?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,u):e.replace(a,u)).replace(i,s))}},15511,(e,t,n)=>{"use strict";var r=(e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(e.r(70454)),i=e.r(65185);function o(e,t){var n={};return e&&"string"==typeof e&&(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}o.default=o,t.exports=o},4100,(e,t,n)=>{"use strict";var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},s=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||r.call(e,t)},u=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;else if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,o,a,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(t=arguments[f],null!=t)for(n in t)r=c(d,n),d!==(i=c(t,n))&&(h&&i&&(s(i)||(o=l(i)))?(o?(o=!1,a=r&&l(r)?r:[]):a=r&&s(r)?r:{},u(d,{name:n,newValue:e(h,a,i)})):void 0!==i&&u(d,{name:n,newValue:i}));return d}},10483,74886,76165,37287,97254,79144,67569,56590,18847,61896,60752,12666,54943,78784,e=>{"use strict";let t,n,r;var i,o,a,l,s,u,c,d,f,p,h=e.i(18050),m=e.i(71645),g=e.i(88784);function y(){}function v(){}let b=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,x=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,k={};function w(e,t){return((t||k).jsx?x:b).test(e)}let E=/[ \t\n\f\r]/g;function S(e){return""===e.replace(E,"")}class C{constructor(e,t){this.attribute=t,this.property=e}}C.prototype.attribute="",C.prototype.booleanish=!1,C.prototype.boolean=!1,C.prototype.commaOrSpaceSeparated=!1,C.prototype.commaSeparated=!1,C.prototype.defined=!1,C.prototype.mustUseProperty=!1,C.prototype.number=!1,C.prototype.overloadedBoolean=!1,C.prototype.property="",C.prototype.spaceSeparated=!1,C.prototype.space=void 0;let _=0,A=N(),T=N(),R=N(),O=N(),L=N(),P=N(),D=N();function N(){return 2**++_}e.s(["boolean",0,A,"booleanish",0,T,"commaOrSpaceSeparated",0,D,"commaSeparated",0,P,"number",0,O,"overloadedBoolean",0,R,"spaceSeparated",0,L],744);var I=e.i(744);let M=Object.keys(I);class j extends C{constructor(e,t,n,r){let i=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",r),"number"==typeof n)for(;++i<M.length;){const e=M[i];!function(e,t,n){n&&(e[t]=n)}(this,M[i],(n&I[e])===I[e])}}}function F(e){return e.toLowerCase()}j.prototype.defined=!0;let B=/[A-Z]/g,z=/-[a-z]/g,H=/^data[-\w.:]+$/i;function U(e){return"-"+e.toLowerCase()}function V(e){return e.charAt(1).toUpperCase()}let q={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"};class ${constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function W(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new $(n,r,t)}function K(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let o=new j(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[F(r)]=r,n[F(o.attribute)]=r}return new $(t,n,e.space)}$.prototype.normal={},$.prototype.property={},$.prototype.space=void 0;let Y=K({properties:{ariaActiveDescendant:null,ariaAtomic:T,ariaAutoComplete:null,ariaBusy:T,ariaChecked:T,ariaColCount:O,ariaColIndex:O,ariaColSpan:O,ariaControls:L,ariaCurrent:null,ariaDescribedBy:L,ariaDetails:null,ariaDisabled:T,ariaDropEffect:L,ariaErrorMessage:null,ariaExpanded:T,ariaFlowTo:L,ariaGrabbed:T,ariaHasPopup:null,ariaHidden:T,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:L,ariaLevel:O,ariaLive:null,ariaModal:T,ariaMultiLine:T,ariaMultiSelectable:T,ariaOrientation:null,ariaOwns:L,ariaPlaceholder:null,ariaPosInSet:O,ariaPressed:T,ariaReadOnly:T,ariaRelevant:null,ariaRequired:T,ariaRoleDescription:L,ariaRowCount:O,ariaRowIndex:O,ariaRowSpan:O,ariaSelected:T,ariaSetSize:O,ariaSort:null,ariaValueMax:O,ariaValueMin:O,ariaValueNow:O,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function X(e,t){return t in e?e[t]:t}function J(e,t){return X(e,t.toLowerCase())}let Q=K({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:P,acceptCharset:L,accessKey:L,action:null,allow:null,allowFullScreen:A,allowPaymentRequest:A,allowUserMedia:A,alt:null,as:null,async:A,autoCapitalize:null,autoComplete:L,autoFocus:A,autoPlay:A,blocking:L,capture:null,charSet:null,checked:A,cite:null,className:L,cols:O,colSpan:null,content:null,contentEditable:T,controls:A,controlsList:L,coords:O|P,crossOrigin:null,data:null,dateTime:null,decoding:null,default:A,defer:A,dir:null,dirName:null,disabled:A,download:R,draggable:T,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:A,formTarget:null,headers:L,height:O,hidden:R,high:O,href:null,hrefLang:null,htmlFor:L,httpEquiv:L,id:null,imageSizes:null,imageSrcSet:null,inert:A,inputMode:null,integrity:null,is:null,isMap:A,itemId:null,itemProp:L,itemRef:L,itemScope:A,itemType:L,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:A,low:O,manifest:null,max:null,maxLength:O,media:null,method:null,min:null,minLength:O,multiple:A,muted:A,name:null,nonce:null,noModule:A,noValidate:A,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:A,optimum:O,pattern:null,ping:L,placeholder:null,playsInline:A,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:A,referrerPolicy:null,rel:L,required:A,reversed:A,rows:O,rowSpan:O,sandbox:L,scope:null,scoped:A,seamless:A,selected:A,shadowRootClonable:A,shadowRootDelegatesFocus:A,shadowRootMode:null,shape:null,size:O,sizes:null,slot:null,span:O,spellCheck:T,src:null,srcDoc:null,srcLang:null,srcSet:null,start:O,step:null,style:null,tabIndex:O,target:null,title:null,translate:null,type:null,typeMustMatch:A,useMap:null,value:T,width:O,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:L,axis:null,background:null,bgColor:null,border:O,borderColor:null,bottomMargin:O,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:A,declare:A,event:null,face:null,frame:null,frameBorder:null,hSpace:O,leftMargin:O,link:null,longDesc:null,lowSrc:null,marginHeight:O,marginWidth:O,noResize:A,noHref:A,noShade:A,noWrap:A,object:null,profile:null,prompt:null,rev:null,rightMargin:O,rules:null,scheme:null,scrolling:T,standby:null,summary:null,text:null,topMargin:O,valueType:null,version:null,vAlign:null,vLink:null,vSpace:O,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:A,disableRemotePlayback:A,prefix:null,property:null,results:O,security:null,unselectable:null},space:"html",transform:J}),G=K({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:D,accentHeight:O,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:O,amplitude:O,arabicForm:null,ascent:O,attributeName:null,attributeType:null,azimuth:O,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:O,by:null,calcMode:null,capHeight:O,className:L,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:O,diffuseConstant:O,direction:null,display:null,dur:null,divisor:O,dominantBaseline:null,download:A,dx:null,dy:null,edgeMode:null,editable:null,elevation:O,enableBackground:null,end:null,event:null,exponent:O,externalResourcesRequired:null,fill:null,fillOpacity:O,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:P,g2:P,glyphName:P,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:O,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:O,horizOriginX:O,horizOriginY:O,id:null,ideographic:O,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:O,k:O,k1:O,k2:O,k3:O,k4:O,kernelMatrix:D,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:O,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:O,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:O,overlineThickness:O,paintOrder:null,panose1:null,path:null,pathLength:O,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:L,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:O,pointsAtY:O,pointsAtZ:O,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:D,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:D,rev:D,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:D,requiredFeatures:D,requiredFonts:D,requiredFormats:D,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:O,specularExponent:O,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:O,strikethroughThickness:O,string:null,stroke:null,strokeDashArray:D,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:O,strokeOpacity:O,strokeWidth:null,style:null,surfaceScale:O,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:D,tabIndex:O,tableValues:null,target:null,targetX:O,targetY:O,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:D,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:O,underlineThickness:O,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:O,values:null,vAlphabetic:O,vMathematical:O,vectorEffect:null,vHanging:O,vIdeographic:O,version:null,vertAdvY:O,vertOriginX:O,vertOriginY:O,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:O,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:X}),Z=K({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),ee=K({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:J}),et=K({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),en=W([Y,Q,Z,ee,et],"html"),er=W([Y,G,Z,ee,et],"svg");var ei=e.i(15511);let eo=el("end"),ea=el("start");function el(e){return function(t){let n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function es(e){return e&&"object"==typeof e?"position"in e||"type"in e?ec(e.position):"start"in e||"end"in e?ec(e):"line"in e||"column"in e?eu(e):"":""}function eu(e){return ed(e&&e.line)+":"+ed(e&&e.column)}function ec(e){return eu(e&&e.start)+"-"+eu(e&&e.end)}function ed(e){return e&&"number"==typeof e?e:1}class ef extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},o=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(o=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=a?a.line:void 0,this.name=es(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ef.prototype.file="",ef.prototype.name="",ef.prototype.reason="",ef.prototype.message="",ef.prototype.stack="",ef.prototype.column=void 0,ef.prototype.line=void 0,ef.prototype.ancestors=void 0,ef.prototype.cause=void 0,ef.prototype.fatal=void 0,ef.prototype.place=void 0,ef.prototype.ruleId=void 0,ef.prototype.source=void 0;let ep={}.hasOwnProperty,eh=new Map,em=/[A-Z]/g,eg=new Set(["table","tbody","thead","tfoot","tr"]),ey=new Set(["td","th"]),ev="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function eb(e,t,n){var r,i,o,a,l,s,u,c,d;let f,p,h,m,g,v,b,x,k,w,E;return"element"===t.type?(r=e,i=t,o=n,p=f=r.schema,"svg"===i.tagName.toLowerCase()&&"html"===f.space&&(r.schema=er),r.ancestors.push(i),h=eE(r,i.tagName,!1),m=function(e,t){let n,r,i={};for(r in t.properties)if("children"!==r&&ep.call(t.properties,r)){let o=function(e,t,n){let r=function(e,t){let n=F(t),r=t,i=C;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&H.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(z,V);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!z.test(e)){let n=e.replace(B,U);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=j}return new i(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){var i;let t;if(Array.isArray(n)&&(n=r.commaSeparated?(t={},(""===(i=n)[i.length-1]?[...i,""]:i).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return(0,ei.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let t=new ef("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=ev+"#cannot-parse-style-attribute",t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){let t,n={};for(t in e)ep.call(e,t)&&(n[function(e){let t=e.replace(em,eC);return"ms-"===t.slice(0,3)&&(t="-"+t),t}(t)]=e[t]);return n}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?q[r.property]||r.property:r.attribute,n]}}(e,r,t.properties[r]);if(o){let[r,a]=o;e.tableCellAlignToStyle&&"align"===r&&"string"==typeof a&&ey.has(t.tagName)?n=a:i[r]=a}}return n&&((i.style||(i.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=n),i}(r,i),g=ew(r,i),eg.has(i.tagName)&&(g=g.filter(function(e){return"string"!=typeof e||!("object"==typeof e?"text"===e.type&&S(e.value):S(e))})),ex(r,m,h,i),ek(m,g),r.ancestors.pop(),r.schema=f,r.create(i,h,m,o)):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return y("ExpressionStatement"===n.type),e.evaluater.evaluateExpression(n.expression)}eS(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?(a=e,l=t,s=n,b=v=a.schema,"svg"===l.name&&"html"===v.space&&(a.schema=er),a.ancestors.push(l),x=null===l.name?a.Fragment:eE(a,l.name,!0),k=function(e,t){let n={};for(let r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];y("ExpressionStatement"===t.type);let i=t.expression;y("ObjectExpression"===i.type);let o=i.properties[0];y("SpreadElement"===o.type),Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else eS(e,t.position);else{let i,o=r.name;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];y("ExpressionStatement"===t.type),i=e.evaluater.evaluateExpression(t.expression)}else eS(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(a,l),w=ew(a,l),ex(a,k,x,l),ek(k,w),a.ancestors.pop(),a.schema=v,a.create(l,x,k,s)):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);eS(e,t.position)}(e,t):"root"===t.type?(u=e,c=t,d=n,ek(E={},ew(u,c)),u.create(c,u.Fragment,E,d)):"text"===t.type?t.value:void 0}function ex(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ek(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function ew(e,t){let n=[],r=-1,i=e.passKeys?new Map:eh;for(;++r<t.children.length;){let o,a=t.children[r];if(e.passKeys){let e="element"===a.type?a.tagName:"mdxJsxFlowElement"===a.type||"mdxJsxTextElement"===a.type?a.name:void 0;if(e){let t=i.get(e)||0;o=e+"-"+t,i.set(e,t+1)}}let l=eb(e,a,o);void 0!==l&&n.push(l)}return n}function eE(e,t,n){let r;if(n)if(t.includes(".")){let e,n=t.split("."),i=-1;for(;++i<n.length;){let t=w(n[i])?{type:"Identifier",name:n[i]}:{type:"Literal",value:n[i]};e=e?{type:"MemberExpression",object:e,property:t,computed:!!(i&&"Literal"===t.type),optional:!1}:t}y(e,"always a result"),r=e}else r=w(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){let t=r.value;return ep.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);eS(e)}function eS(e,t){let n=new ef("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=ev+"#cannot-handle-mdx-estrees-without-createevaluater",n}function eC(e){return"-"+e.toLowerCase()}let e_={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"]},eA={};function eT(e,t){let n=t||eA;return eR(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function eR(e,t,n){var r;if((r=e)&&"object"==typeof r){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return eO(e.children,t,n)}return Array.isArray(e)?eO(e,t,n):""}function eO(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=eR(e[i],t,n);return r.join("")}function eL(e,t,n,r){let i,o=e.length,a=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)(i=Array.from(r)).unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);a<r.length;)(i=r.slice(a,a+1e4)).unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function eP(e,t){return e.length>0?(eL(e,e.length,0,t),e):t}let eD={}.hasOwnProperty;function eN(e){let t={},n=-1;for(;++n<e.length;)!function(e,t){let n;for(n in t){let r,i=(eD.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];if(o)for(r in o){eD.call(i,r)||(i[r]=[]);let e=o[r];!function(e,t){let n=-1,r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);eL(e,0,0,r)}(i[r],Array.isArray(e)?e:e?[e]:[])}}}(t,e[n]);return t}let eI=eK(/[A-Za-z]/),eM=eK(/[\dA-Za-z]/),ej=eK(/[#-'*+\--9=?A-Z^-~]/);function eF(e){return null!==e&&(e<32||127===e)}let eB=eK(/\d/),ez=eK(/[\dA-Fa-f]/),eH=eK(/[!-/:-@[-`{-~]/);function eU(e){return null!==e&&e<-2}function eV(e){return null!==e&&(e<0||32===e)}function eq(e){return -2===e||-1===e||32===e}let e$=eK(/\p{P}|\p{S}/u),eW=eK(/\s/);function eK(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function eY(e,t,n,r){let i=r?r-1:1/0,o=0;return function(r){return eq(r)?(e.enter(n),function r(a){return eq(a)&&o++<i?(e.consume(a),r):(e.exit(n),t(a))}(r)):t(r)}}let eX={tokenize:function(e){let t,n=e.attempt(this.parser.constructs.contentInitial,function(t){return null===t?void e.consume(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eY(e,n,"linePrefix"))},function(n){return e.enter("paragraph"),function n(r){let i=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=i),t=i,function t(r){if(null===r){e.exit("chunkText"),e.exit("paragraph"),e.consume(r);return}return eU(r)?(e.consume(r),e.exit("chunkText"),n):(e.consume(r),t)}(r)}(n)});return n}},eJ={tokenize:function(e){let t,n,r,i=this,o=[],a=0;return l;function l(t){if(a<o.length){let n=o[a];return i.containerState=n[1],e.attempt(n[0].continuation,s,u)(t)}return u(t)}function s(e){if(a++,i.containerState._closeFlow){let n;i.containerState._closeFlow=void 0,t&&y();let r=i.events.length,o=r;for(;o--;)if("exit"===i.events[o][0]&&"chunkFlow"===i.events[o][1].type){n=i.events[o][1].end;break}g(a);let l=r;for(;l<i.events.length;)i.events[l][1].end={...n},l++;return eL(i.events,o+1,0,i.events.slice(r)),i.events.length=l,u(e)}return l(e)}function u(n){if(a===o.length){if(!t)return f(n);if(t.currentConstruct&&t.currentConstruct.concrete)return h(n);i.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return i.containerState={},e.check(eQ,c,d)(n)}function c(e){return t&&y(),g(a),f(e)}function d(e){return i.parser.lazy[i.now().line]=a!==o.length,r=i.now().offset,h(e)}function f(t){return i.containerState={},e.attempt(eQ,p,h)(t)}function p(e){return a++,o.push([i.currentConstruct,i.containerState]),f(e)}function h(r){if(null===r){t&&y(),g(0),e.consume(r);return}return t=t||i.parser.flow(i.now()),e.enter("chunkFlow",{_tokenizer:t,contentType:"flow",previous:n}),function t(n){if(null===n){m(e.exit("chunkFlow"),!0),g(0),e.consume(n);return}return eU(n)?(e.consume(n),m(e.exit("chunkFlow")),a=0,i.interrupt=void 0,l):(e.consume(n),t)}(r)}function m(e,o){let l=i.sliceStream(e);if(o&&l.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(l),i.parser.lazy[e.start.line]){let e,n,o=t.events.length;for(;o--;)if(t.events[o][1].start.offset<r&&(!t.events[o][1].end||t.events[o][1].end.offset>r))return;let l=i.events.length,s=l;for(;s--;)if("exit"===i.events[s][0]&&"chunkFlow"===i.events[s][1].type){if(e){n=i.events[s][1].end;break}e=!0}for(g(a),o=l;o<i.events.length;)i.events[o][1].end={...n},o++;eL(i.events,s+1,0,i.events.slice(l)),i.events.length=o}}function g(t){let n=o.length;for(;n-- >t;){let t=o[n];i.containerState=t[1],t[0].exit.call(i,e)}o.length=t}function y(){t.write([null]),n=void 0,t=void 0,i.containerState._closeFlow=void 0}}},eQ={tokenize:function(e,t,n){return eY(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},eG={partial:!0,tokenize:function(e,t,n){return function(t){return eq(t)?eY(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||eU(e)?t(e):n(e)}}};class eZ{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=null==t?1/0:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){this.setCursor(Math.trunc(e));let r=this.right.splice(this.right.length-(t||0),1/0);return n&&e0(this.left,n),r.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),e0(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),e0(this.right,e.reverse())}setCursor(e){if(e!==this.left.length&&(!(e>this.left.length)||0!==this.right.length)&&(!(e<0)||0!==this.left.length))if(e<this.left.length){let t=this.left.splice(e,1/0);e0(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);e0(this.left,t.reverse())}}}function e0(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 e1(e){let t,n,r,i,o,a,l,s={},u=-1,c=new eZ(e);for(;++u<c.length;){for(;u in s;)u=s[u];if(t=c.get(u),u&&"chunkFlow"===t[1].type&&"listItemPrefix"===c.get(u-1)[1].type&&((r=0)<(a=t[1]._tokenizer.events).length&&"lineEndingBlank"===a[r][1].type&&(r+=2),r<a.length&&"content"===a[r][1].type))for(;++r<a.length&&"content"!==a[r][1].type;)"chunkText"===a[r][1].type&&(a[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(s,function(e,t){let n,r,i=e.get(t)[1],o=e.get(t)[2],a=t-1,l=[],s=i._tokenizer;!s&&(s=o.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let u=s.events,c=[],d={},f=-1,p=i,h=0,m=0,g=[0];for(;p;){for(;e.get(++a)[1]!==p;);l.push(a),!p._tokenizer&&(n=o.sliceStream(p),p.next||n.push(null),r&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(n),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),r=p,p=p.next}for(p=i;++f<u.length;)"exit"===u[f][0]&&"enter"===u[f-1][0]&&u[f][1].type===u[f-1][1].type&&u[f][1].start.line!==u[f][1].end.line&&(m=f+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=u.slice(g[f],g[f+1]),n=l.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)d[h+c[f][0]]=h+c[f][1],h+=c[f][1]-c[f][0]-1;return d}(c,u)),u=s[u],l=!0);else if(t[1]._container){for(r=u,n=void 0;r--;)if("lineEnding"===(i=c.get(r))[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(n&&(c.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=r);else if("linePrefix"===i[1].type||"listItemIndent"===i[1].type);else break;n&&(t[1].end={...c.get(n)[1].start},(o=c.slice(n,u)).unshift(t),c.splice(n,u-n+1,o))}}return eL(e,0,1/0,c.slice(0)),!l}let e2={resolve:function(e){return e1(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):eU(t)?e.check(e4,o,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},e4={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eY(e,i,"linePrefix")};function i(i){if(null===i||eU(i))return n(i);let o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}},e6={tokenize:function(e){let t=this,n=e.attempt(eG,function(r){return null===r?void e.consume(r):(e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n)},e.attempt(this.parser.constructs.flowInitial,r,eY(e,e.attempt(this.parser.constructs.flow,r,e.attempt(e2,r)),"linePrefix")));return n;function r(r){return null===r?void e.consume(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n)}}},e5={resolveAll:e7()},e3=e8("string"),e9=e8("text");function e8(e){return{resolveAll:e7("text"===e?te:void 0),tokenize:function(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,o,a);return o;function o(e){return s(e)?i(e):a(e)}function a(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),l)}function l(e){return s(e)?(t.exit("data"),i(e)):(t.consume(e),l)}function s(e){if(null===e)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function e7(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function te(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){let r,i=e[n-1][1],o=t.sliceStream(i),a=o.length,l=-1,s=0;for(;a--;){let e=o[a];if("string"==typeof e){for(l=e.length;32===e.charCodeAt(l-1);)s++,l--;if(l)break;l=-1}else if(-2===e)r=!0,s++;else if(-1===e);else{a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let o={type:n===e.length||r||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:i.start._bufferIndex+l,_index:i.start._index+a,line:i.end.line,column:i.end.column-s,offset:i.end.offset-s},end:{...i.end}};i.end={...o.start},i.start.offset===i.end.offset?Object.assign(i,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}function tt(e){return null===e||eV(e)||eW(e)?1:e$(e)?2:void 0}function tn(e,t,n){let r=[],i=-1;for(;++i<e.length;){let o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}let tr={name:"attention",resolveAll:function(e,t){let n,r,i,o,a,l,s,u,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close){for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;let d={...e[n][1].end},f={...e[c][1].start};ti(d,-l),ti(f,l),o={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:f},i={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:l>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[n][1].end={...o.start},e[c][1].start={...a.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=eP(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=eP(s,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",i,t]]),s=eP(s,tn(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),s=eP(s,[["exit",i,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(u=2,s=eP(s,[["enter",e[c][1],t],["exit",e[c][1],t]])):u=0,eL(e,n-1,c-n+3,s),c=n+s.length-u-2;break}}for(c=-1;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){let n,r=this.parser.constructs.attentionMarkers.null,i=this.previous,o=tt(i);return function(a){return n=a,e.enter("attentionSequence"),function a(l){if(l===n)return e.consume(l),a;let s=e.exit("attentionSequence"),u=tt(l),c=!u||2===u&&o||r.includes(l),d=!o||2===o&&u||r.includes(i);return s._open=!!(42===n?c:c&&(o||!d)),s._close=!!(42===n?d:d&&(u||!c)),t(l)}(a)}}};function ti(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let to={continuation:{tokenize:function(e,t,n){let r=this;return function(t){return eq(t)?eY(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(to,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){let r=this;return function(t){if(62===t){let n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return eq(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}},ta={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return eH(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},tl=document.createElement("i");function ts(e){let t="&"+e+";";tl.innerHTML=t;let n=tl.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}let tu={name:"characterReference",tokenize:function(e,t,n){let r,i,o=this,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),l};function l(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),r=31,i=eM,u(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,i=ez,u):(e.enter("characterReferenceValue"),r=7,i=eB,u(t))}function u(l){if(59===l&&a){let r=e.exit("characterReferenceValue");return i!==eM||ts(o.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(l)}return i(l)&&a++<r?(e.consume(l),u):n(l)}}},tc={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},td={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){let r,i=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(t){return e.enter("codeFencedFence"),eq(t)?eY(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):s(t)}function s(t){return t===r?(e.enter("codeFencedFenceSequence"),function t(i){return i===r?(o++,e.consume(i),t):o>=l?(e.exit("codeFencedFenceSequence"),eq(i)?eY(e,u,"whitespace")(i):u(i)):n(i)}(t)):n(t)}function u(r){return null===r||eU(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}},a=0,l=0;return function(t){var o;let u;return o=t,a=(u=i.events[i.events.length-1])&&"linePrefix"===u[1].type?u[2].sliceSerialize(u[1],!0).length:0,r=o,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(i){return i===r?(l++,e.consume(i),t):l<3?n(i):(e.exit("codeFencedFenceSequence"),eq(i)?eY(e,s,"whitespace")(i):s(i))}(o)};function s(o){return null===o||eU(o)?(e.exit("codeFencedFence"),i.interrupt?t(o):e.check(tc,c,h)(o)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||eU(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s(i)):eq(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),eY(e,u,"whitespace")(i)):96===i&&i===r?n(i):(e.consume(i),t)}(o))}function u(t){return null===t||eU(t)?s(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||eU(i)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(i)):96===i&&i===r?n(i):(e.consume(i),t)}(t))}function c(t){return e.attempt(o,h,d)(t)}function d(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f}function f(t){return a>0&&eq(t)?eY(e,p,"linePrefix",a+1)(t):p(t)}function p(t){return null===t||eU(t)?e.check(tc,c,h)(t):(e.enter("codeFlowValue"),function t(n){return null===n||eU(n)?(e.exit("codeFlowValue"),p(n)):(e.consume(n),t)}(t))}function h(n){return e.exit("codeFenced"),t(n)}}},tf={name:"codeIndented",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("codeIndented"),eY(e,i,"linePrefix",5)(t)};function i(t){let i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?function t(n){return null===n?o(n):eU(n)?e.attempt(tp,t,o)(n):(e.enter("codeFlowValue"),function n(r){return null===r||eU(r)?(e.exit("codeFlowValue"),t(r)):(e.consume(r),n)}(n))}(t):n(t)}function o(n){return e.exit("codeIndented"),t(n)}}},tp={partial:!0,tokenize:function(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):eU(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):eY(e,o,"linePrefix",5)(t)}function o(e){let o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):eU(e)?i(e):n(e)}}};function th(e,t,n,r,i,o,a,l,s){let u=s||1/0,c=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(o),e.consume(t),e.exit(o),d):null===t||32===t||41===t||eF(t)?n(t):(e.enter(r),e.enter(a),e.enter(l),e.enter("chunkString",{contentType:"string"}),h(t))};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),f(n))}function f(t){return 62===t?(e.exit("chunkString"),e.exit(l),d(t)):null===t||60===t||eU(t)?n(t):(e.consume(t),92===t?p:f)}function p(t){return 60===t||62===t||92===t?(e.consume(t),f):f(t)}function h(i){return!c&&(null===i||41===i||eV(i))?(e.exit("chunkString"),e.exit(l),e.exit(a),e.exit(r),t(i)):c<u&&40===i?(e.consume(i),c++,h):41===i?(e.consume(i),c--,h):null===i||32===i||40===i||eF(i)?n(i):(e.consume(i),92===i?m:h)}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function tm(e,t,n,r,i,o){let a,l=this,s=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(o),u};function u(d){return s>999||null===d||91===d||93===d&&!a||94===d&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?n(d):93===d?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):eU(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(t){return null===t||91===t||93===t||eU(t)||s++>999?(e.exit("chunkString"),u(t)):(e.consume(t),a||(a=!eq(t)),92===t?d:c)}function d(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function tg(e,t,n,r,i,o){let a;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),a=40===t?41:t,l):n(t)};function l(n){return n===a?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(o),s(n))}function s(t){return t===a?(e.exit(o),l(a)):null===t?n(t):eU(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eY(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===a||null===t||eU(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?c:u)}function c(t){return t===a||92===t?(e.consume(t),u):u(t)}}function ty(e,t){let n;return function r(i){return eU(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):eq(i)?eY(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function tv(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}let tb={partial:!0,tokenize:function(e,t,n){return function(t){return eV(t)?ty(e,r)(t):n(t)};function r(t){return tg(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return eq(t)?eY(e,o,"whitespace")(t):o(t)}function o(e){return null===e||eU(e)?t(e):n(e)}}},tx=["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"],tk=["pre","script","style","textarea"],tw={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(eG,t,n)}}},tE={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return eU(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},tS={name:"labelEnd",resolveAll:function(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){let e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&eL(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,i,o,a=e.length,l=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){l=2;break}}else"labelEnd"===n.type&&(i=a);let s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[r][1].start},end:{...e[i][1].end}},c={type:"labelText",start:{...e[r+l+2][1].end},end:{...e[i-2][1].start}};return o=eP(o=[["enter",s,t],["enter",u,t]],e.slice(r+1,r+l+3)),o=eP(o,[["enter",c,t]]),o=eP(o,tn(t.parser.constructs.insideSpan.null,e.slice(r+l+4,i-3),t)),o=eP(o,[["exit",c,t],e[i-2],e[i-1],["exit",u,t]]),o=eP(o,e.slice(i+1)),o=eP(o,[["exit",s,t]]),eL(e,r,e.length,o),e},tokenize:function(e,t,n){let r,i,o=this,a=o.events.length;for(;a--;)if(("labelImage"===o.events[a][1].type||"labelLink"===o.events[a][1].type)&&!o.events[a][1]._balanced){r=o.events[a][1];break}return function(t){return r?r._inactive?c(t):(i=o.parser.defined.includes(tv(o.sliceSerialize({start:r.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l):n(t)};function l(t){return 40===t?e.attempt(tC,u,i?u:c)(t):91===t?e.attempt(t_,u,i?s:c)(t):i?u(t):c(t)}function s(t){return e.attempt(tA,u,c)(t)}function u(e){return t(e)}function c(e){return r._balanced=!0,n(e)}}},tC={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return eV(t)?ty(e,i)(t):i(t)}function i(t){return 41===t?u(t):th(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return eV(t)?ty(e,l)(t):u(t)}function a(e){return n(e)}function l(t){return 34===t||39===t||40===t?tg(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):u(t)}function s(t){return eV(t)?ty(e,u)(t):u(t)}function u(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},t_={tokenize:function(e,t,n){let r=this;return function(t){return tm.call(r,e,i,o,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(tv(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},tA={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},tT={name:"labelStartImage",resolveAll:tS.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},tR={name:"labelStartLink",resolveAll:tS.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},tO={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),eY(e,t,"linePrefix")}}},tL={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(o){var a;return e.enter("thematicBreak"),r=a=o,function o(a){return a===r?(e.enter("thematicBreakSequence"),function t(n){return n===r?(e.consume(n),i++,t):(e.exit("thematicBreakSequence"),eq(n)?eY(e,o,"whitespace")(n):o(n))}(a)):i>=3&&(null===a||eU(a))?(e.exit("thematicBreak"),t(a)):n(a)}(a)}}},tP={continuation:{tokenize:function(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(eG,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,eY(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!eq(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(tN,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,eY(e,e.attempt(tP,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){let r=this,i=r.events[r.events.length-1],o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,a=0;return function(t){let i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:eB(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(tL,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(i){return eB(i)&&++a<10?(e.consume(i),t):(!r.interrupt||a<2)&&(r.containerState.marker?i===r.containerState.marker:41===i||46===i)?(e.exit("listItemValue"),l(i)):n(i)}(t)}return n(t)};function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(eG,r.interrupt?n:s,e.attempt(tD,c,u))}function s(e){return r.containerState.initialBlankLine=!0,o++,c(e)}function u(t){return eq(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),c):n(t)}function c(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},tD={partial:!0,tokenize:function(e,t,n){let r=this;return eY(e,function(e){let i=r.events[r.events.length-1];return!eq(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},tN={partial:!0,tokenize:function(e,t,n){let r=this;return eY(e,function(e){let i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}},tI={name:"setextUnderline",resolveTo:function(e,t){let n,r,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),i||"definition"!==e[o][1].type||(i=o);let a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",a,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=a,e.push(["exit",a,t]),e},tokenize:function(e,t,n){let r,i=this;return function(t){var a;let l,s=i.events.length;for(;s--;)if("lineEnding"!==i.events[s][1].type&&"linePrefix"!==i.events[s][1].type&&"content"!==i.events[s][1].type){l="paragraph"===i.events[s][1].type;break}return!i.parser.lazy[i.now().line]&&(i.interrupt||l)?(e.enter("setextHeadingLine"),r=t,a=t,e.enter("setextHeadingLineSequence"),function t(n){return n===r?(e.consume(n),t):(e.exit("setextHeadingLineSequence"),eq(n)?eY(e,o,"lineSuffix")(n):o(n))}(a)):n(t)};function o(r){return null===r||eU(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};e.s(["attentionMarkers",0,{null:[42,95]},"contentInitial",0,{91:{name:"definition",tokenize:function(e,t,n){let r,i=this;return function(t){var r;return e.enter("definition"),r=t,tm.call(i,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(r)};function o(t){return(r=tv(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return eV(t)?ty(e,l)(t):l(t)}function l(t){return th(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(tb,u,u)(t)}function u(t){return eq(t)?eY(e,c,"whitespace")(t):c(t)}function c(o){return null===o||eU(o)?(e.exit("definition"),i.parser.defined.push(r),t(o)):n(o)}}}},"disable",0,{null:[]},"document",0,{42:tP,43:tP,45:tP,48:tP,49:tP,50:tP,51:tP,52:tP,53:tP,54:tP,55:tP,56:tP,57:tP,62:to},"flow",0,{35:{name:"headingAtx",resolve:function(e,t){let n,r,i=e.length-2,o=3;return"whitespace"===e[3][1].type&&(o+=2),i-2>o&&"whitespace"===e[i][1].type&&(i-=2),"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4),i>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},r={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},eL(e,o,i-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(i){var o;return e.enter("atxHeading"),o=i,e.enter("atxHeadingSequence"),function i(o){return 35===o&&r++<6?(e.consume(o),i):null===o||eV(o)?(e.exit("atxHeadingSequence"),function n(r){return 35===r?(e.enter("atxHeadingSequence"),function t(r){return 35===r?(e.consume(r),t):(e.exit("atxHeadingSequence"),n(r))}(r)):null===r||eU(r)?(e.exit("atxHeading"),t(r)):eq(r)?eY(e,n,"whitespace")(r):(e.enter("atxHeadingText"),function t(r){return null===r||35===r||eV(r)?(e.exit("atxHeadingText"),n(r)):(e.consume(r),t)}(r))}(o)):n(o)}(o)}}},42:tL,45:[tI,tL],60:{concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(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},tokenize:function(e,t,n){let r,i,o,a,l,s=this;return function(t){var n;return n=t,e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),u};function u(a){return 33===a?(e.consume(a),c):47===a?(e.consume(a),i=!0,p):63===a?(e.consume(a),r=3,s.interrupt?t:P):eI(a)?(e.consume(a),o=String.fromCharCode(a),h):n(a)}function c(i){return 45===i?(e.consume(i),r=2,d):91===i?(e.consume(i),r=5,a=0,f):eI(i)?(e.consume(i),r=4,s.interrupt?t:P):n(i)}function d(r){return 45===r?(e.consume(r),s.interrupt?t:P):n(r)}function f(r){let i="CDATA[";return r===i.charCodeAt(a++)?(e.consume(r),a===i.length)?s.interrupt?t:S:f:n(r)}function p(t){return eI(t)?(e.consume(t),o=String.fromCharCode(t),h):n(t)}function h(a){if(null===a||47===a||62===a||eV(a)){let l=47===a,u=o.toLowerCase();return!l&&!i&&tk.includes(u)?(r=1,s.interrupt?t(a):S(a)):tx.includes(o.toLowerCase())?(r=6,l)?(e.consume(a),m):s.interrupt?t(a):S(a):(r=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(a):i?function t(n){return eq(n)?(e.consume(n),t):w(n)}(a):g(a))}return 45===a||eM(a)?(e.consume(a),o+=String.fromCharCode(a),h):n(a)}function m(r){return 62===r?(e.consume(r),s.interrupt?t:S):n(r)}function g(t){return 47===t?(e.consume(t),w):58===t||95===t||eI(t)?(e.consume(t),y):eq(t)?(e.consume(t),g):w(t)}function y(t){return 45===t||46===t||58===t||95===t||eM(t)?(e.consume(t),y):v(t)}function v(t){return 61===t?(e.consume(t),b):eq(t)?(e.consume(t),v):g(t)}function b(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):eq(t)?(e.consume(t),b):function t(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||eV(n)?v(n):(e.consume(n),t)}(t)}function x(t){return t===l?(e.consume(t),l=null,k):null===t||eU(t)?n(t):(e.consume(t),x)}function k(e){return 47===e||62===e||eq(e)?g(e):n(e)}function w(t){return 62===t?(e.consume(t),E):n(t)}function E(t){return null===t||eU(t)?S(t):eq(t)?(e.consume(t),E):n(t)}function S(t){return 45===t&&2===r?(e.consume(t),T):60===t&&1===r?(e.consume(t),R):62===t&&4===r?(e.consume(t),D):63===t&&3===r?(e.consume(t),P):93===t&&5===r?(e.consume(t),L):eU(t)&&(6===r||7===r)?(e.exit("htmlFlowData"),e.check(tw,N,C)(t)):null===t||eU(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),S)}function C(t){return e.check(tE,_,N)(t)}function _(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A}function A(t){return null===t||eU(t)?C(t):(e.enter("htmlFlowData"),S(t))}function T(t){return 45===t?(e.consume(t),P):S(t)}function R(t){return 47===t?(e.consume(t),o="",O):S(t)}function O(t){if(62===t){let n=o.toLowerCase();return tk.includes(n)?(e.consume(t),D):S(t)}return eI(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),O):S(t)}function L(t){return 93===t?(e.consume(t),P):S(t)}function P(t){return 62===t?(e.consume(t),D):45===t&&2===r?(e.consume(t),P):S(t)}function D(t){return null===t||eU(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),D)}function N(n){return e.exit("htmlFlow"),t(n)}}},61:tI,95:tL,96:td,126:td},"flowInitial",0,{[-2]:tf,[-1]:tf,32:tf},"insideSpan",0,{null:[tr,e5]},"string",0,{38:tu,92:ta},"text",0,{[-5]:tO,[-4]:tO,[-3]:tO,33:tT,38:tu,42:tr,60:[{name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return eI(t)?(e.consume(t),o):64===t?n(t):l(t)}function o(t){return 43===t||45===t||46===t||eM(t)?(r=1,function t(n){return 58===n?(e.consume(n),r=0,a):(43===n||45===n||46===n||eM(n))&&r++<32?(e.consume(n),t):(r=0,l(n))}(t)):l(t)}function a(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||eF(r)?n(r):(e.consume(r),a)}function l(t){return 64===t?(e.consume(t),s):ej(t)?(e.consume(t),l):n(t)}function s(i){return eM(i)?function i(o){return 46===o?(e.consume(o),r=0,s):62===o?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(o),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(o){if((45===o||eM(o))&&r++<63){let n=45===o?t:i;return e.consume(o),n}return n(o)}(o)}(i):n(i)}}},{name:"htmlText",tokenize:function(e,t,n){let r,i,o,a=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),l};function l(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),x):63===t?(e.consume(t),v):eI(t)?(e.consume(t),w):n(t)}function s(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),i=0,p):eI(t)?(e.consume(t),y):n(t)}function u(t){return 45===t?(e.consume(t),f):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),d):eU(t)?(o=c,O(t)):(e.consume(t),c)}function d(t){return 45===t?(e.consume(t),f):c(t)}function f(e){return 62===e?R(e):45===e?d(e):c(e)}function p(t){let r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),i===r.length?h:p):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):eU(t)?(o=h,O(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?R(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?R(t):eU(t)?(o=y,O(t)):(e.consume(t),y)}function v(t){return null===t?n(t):63===t?(e.consume(t),b):eU(t)?(o=v,O(t)):(e.consume(t),v)}function b(e){return 62===e?R(e):v(e)}function x(t){return eI(t)?(e.consume(t),k):n(t)}function k(t){return 45===t||eM(t)?(e.consume(t),k):function t(n){return eU(n)?(o=t,O(n)):eq(n)?(e.consume(n),t):R(n)}(t)}function w(t){return 45===t||eM(t)?(e.consume(t),w):47===t||62===t||eV(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),R):58===t||95===t||eI(t)?(e.consume(t),S):eU(t)?(o=E,O(t)):eq(t)?(e.consume(t),E):R(t)}function S(t){return 45===t||46===t||58===t||95===t||eM(t)?(e.consume(t),S):function t(n){return 61===n?(e.consume(n),C):eU(n)?(o=t,O(n)):eq(n)?(e.consume(n),t):E(n)}(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,_):eU(t)?(o=C,O(t)):eq(t)?(e.consume(t),C):(e.consume(t),A)}function _(t){return t===r?(e.consume(t),r=void 0,T):null===t?n(t):eU(t)?(o=_,O(t)):(e.consume(t),_)}function A(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||eV(t)?E(t):(e.consume(t),A)}function T(e){return 47===e||62===e||eV(e)?E(e):n(e)}function R(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function O(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),L}function L(t){return eq(t)?eY(e,P,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):P(t)}function P(t){return e.enter("htmlTextData"),o(t)}}}],91:tR,92:[{name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return eU(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},ta],93:tS,95:tr,96:{name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,i=3;if(("lineEnding"===e[3][1].type||"space"===e[i][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type)){for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,i,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(n){return 96===n?(e.consume(n),o++,t):(e.exit("codeTextSequence"),a(n))}(t)};function a(s){return null===s?n(s):32===s?(e.enter("space"),e.consume(s),e.exit("space"),a):96===s?(i=e.enter("codeTextSequence"),r=0,function n(a){return 96===a?(e.consume(a),r++,n):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(a)):(i.type="codeTextData",l(a))}(s)):eU(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):(e.enter("codeTextData"),l(s))}function l(t){return null===t||32===t||96===t||eU(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),l)}}}}],4127);var tM=e.i(4127);let tj=/[\0\t\n\r]/g;function tF(e,t){let n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(65535&n)==65535||(65535&n)==65534||n>1114111?"�":String.fromCodePoint(n)}let tB=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function tz(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){let e=n.charCodeAt(1),t=120===e||88===e;return tF(n.slice(t?2:1),t?16:10)}return ts(n)||e}let tH={}.hasOwnProperty;function tU(e){return{line:e.line,column:e.column,offset:e.offset}}function tV(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+es({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+es({start:t.start,end:t.end})+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+es({start:t.start,end:t.end})+") is still open")}function tq(e){let t=this;t.parser=function(n){var r,i;let o,a,l,s;return"object"==typeof(r={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(i=r,r=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(y),autolinkProtocol:u,autolinkEmail:u,atxHeading:r(h),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:u,characterReference:u,codeFenced:r(p),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:r(p,i),codeText:r(function(){return{type:"inlineCode",value:""}},i),codeTextData:u,data:u,codeFlowValue:u,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(m),hardBreakTrailing:r(m),htmlFlow:r(g,i),htmlFlowData:u,htmlText:r(g,i),htmlTextData:u,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:i,link:r(y),listItem:r(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:r(v,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(v),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:r(h),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:a(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:a(),autolinkEmail:function(e){c.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){c.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:a(),characterEscapeValue:c,characterReferenceMarkerHexadecimal:f,characterReferenceMarkerNumeric:f,characterReferenceValue:function(e){let t,n=this.sliceSerialize(e),r=this.data.characterReferenceType;r?(t=tF(n,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0):t=ts(n);let i=this.stack[this.stack.length-1];i.value+=t},characterReference:function(e){this.stack.pop().position.end=tU(e.end)},codeFenced:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:c,codeIndented:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:c,data:c,definition:a(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=tv(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:a(),hardBreakEscape:a(d),hardBreakTrailing:a(d),htmlFlow:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:c,htmlText:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:c,image:a(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=t.replace(tB,tz),n.identifier=tv(t).toLowerCase()},lineEnding:function(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){n.children[n.children.length-1].position.end=tU(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(u.call(this,e),c.call(this,e))},link:a(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=tv(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:a(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:a(),thematicBreak:a()}};!function e(t,n){let r=-1;for(;++r<n.length;){let i=n[r];Array.isArray(i)?e(t,i):function(e,t){let n;for(n in t)if(tH.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r)}}}(t,i)}}(t,(e||{}).mdastExtensions||[]);let n={};return function(e){let r={type:"root",children:[]},a={stack:[r],tokenStack:[],config:t,enter:o,exit:l,buffer:i,resume:s,data:n},u=[],c=-1;for(;++c<e.length;)("listOrdered"===e[c][1].type||"listUnordered"===e[c][1].type)&&("enter"===e[c][0]?u.push(c):c=function(e,t,n){let r,i,o,a,l=t-1,s=-1,u=!1;for(;++l<=n;){let t=e[l];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||s||o||(o=l),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=l;for(i=void 0;a--;){let t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",u=!0),t[1].type="lineEnding",i=a}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}o&&(!i||o<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||l,0,["exit",r,t[2]]),l++,n++}if("listItemPrefix"===t[1].type){let i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=i,e.splice(l,0,["enter",i,t[2]]),l++,n++,o=void 0,a=!0}}}return e[t][1]._spread=u,n}(e,u.pop(),c));for(c=-1;++c<e.length;){let n=t[e[c][0]];tH.call(n,e[c][1].type)&&n[e[c][1].type].call(Object.assign({sliceSerialize:e[c][2].sliceSerialize},a),e[c][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||tV).call(a,void 0,e[0])}for(r.position={start:tU(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:tU(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},c=-1;++c<t.transforms.length;)r=t.transforms[c](r)||r;return r};function r(e,t){return function(n){o.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function o(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:tU(t.start),end:void 0}}function a(e){return function(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||tV).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+es({start:e.start,end:e.end})+"): it’s not open");n.position.end=tU(e.end)}function s(){return eT(this.stack.pop())}function u(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:tU(e.start),end:void 0},t.push(n)),this.stack.push(n)}function c(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=tU(e.end)}function d(){this.data.atHardBreak=!0}function f(e){this.data.characterReferenceType=e.type}function p(){return{type:"code",lang:null,meta:null,value:""}}function h(){return{type:"heading",depth:0,children:[]}}function m(){return{type:"break"}}function g(){return{type:"html",value:""}}function y(){return{type:"link",title:null,url:"",children:[]}}function v(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(i)(function(e){for(;!e1(e););return e}((function(e){let t={constructs:eN([tM,...(e||{}).extensions||[]]),content:n(eX),defined:[],document:n(eJ),flow:n(e6),lazy:{},string:n(e3),text:n(e9)};return t;function n(e){return function(n){return function(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},o=[],a=[],l=[],s={attempt:h(function(e,t){m(e,t.from)}),check:h(p),consume:function(e){eU(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,g()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=e},enter:function(e,t){let n=t||{};return n.type=e,n.start=f(),u.events.push(["enter",n,u]),l.push(n),n},exit:function(e){let t=l.pop();return t.end=f(),u.events.push(["exit",t,u]),t},interrupt:h(p,{interrupt:!0})},u={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,g()},events:[],now:f,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,i=[];for(;++r<e.length;){let o,a=e[r];if("string"==typeof a)o=a;else switch(a){case -5:o="\r";break;case -4:o="\n";break;case -3:o="\r\n";break;case -2:o=t?" ":" ";break;case -1:if(!t&&n)continue;o=" ";break;default:o=String.fromCharCode(a)}n=-2===a,i.push(o)}return i.join("")}(d(e),t)},sliceStream:d,write:function(e){return(a=eP(a,e),function(){let e;for(;r._index<a.length;){let n=a[r._index];if("string"==typeof n)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<n.length;){var t;t=n.charCodeAt(r._bufferIndex),c=c(t)}else c=c(n)}}(),null!==a[a.length-1])?[]:(m(t,0),u.events=tn(o,u.events,u),u.events)}},c=t.tokenize.call(u,s);return t.resolveAll&&o.push(t),u;function d(e){return function(e,t){let n,r=t.start._index,i=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;if(r===o)n=[e[r].slice(i,a)];else{if(n=e.slice(r,o),i>-1){let e=n[0];"string"==typeof e?n[0]=e.slice(i):n.shift()}a>0&&n.push(e[o].slice(0,a))}return n}(a,e)}function f(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:o}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:o}}function p(e,t){t.restore()}function h(e,t){return function(n,i,o){var a;let c,d,p,h;return Array.isArray(n)?m(n):"tokenize"in n?m([n]):(a=n,function(e){let t=null!==e&&a[e],n=null!==e&&a.null;return m([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});function m(e){return(c=e,d=0,0===e.length)?o:y(e[d])}function y(e){return function(n){let i,o,a,c,d;return(i=f(),o=u.previous,a=u.currentConstruct,c=u.events.length,d=Array.from(l),h={from:c,restore:function(){r=i,u.previous=o,u.currentConstruct=a,u.events.length=c,l=d,g()}},p=e,e.partial||(u.currentConstruct=e),e.name&&u.parser.constructs.disable.null.includes(e.name))?b(n):e.tokenize.call(t?Object.assign(Object.create(u),t):u,s,v,b)(n)}}function v(t){return e(p,h),i}function b(e){return(h.restore(),++d<c.length)?y(c[d]):o}}}function m(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&eL(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function g(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}(t,e,n)}}})(i).document().write((a=1,l="",s=!0,function(e,t,n){let r,i,u,c,d,f=[];for(e=l+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),u=0,l="",s&&(65279===e.charCodeAt(0)&&u++,s=void 0);u<e.length;){if(tj.lastIndex=u,c=(r=tj.exec(e))&&void 0!==r.index?r.index:e.length,d=e.charCodeAt(c),!r){l=e.slice(u);break}if(10===d&&u===c&&o)f.push(-3),o=void 0;else switch(o&&(f.push(-5),o=void 0),u<c&&(f.push(e.slice(u,c)),a+=c-u),d){case 0:f.push(65533),a++;break;case 9:for(i=4*Math.ceil(a/4),f.push(-2);a++<i;)f.push(-1);break;case 10:f.push(-4),a=1;break;default:o=!0,a=1}u=c+1}return n&&(o&&f.push(-5),l&&f.push(l),f.push(null)),f})(n,r,!0))))}}let t$="object"==typeof self?self:globalThis,tW=e=>{var t;let n,r;return(t=new Map,n=(e,n)=>(t.set(n,e),e),r=i=>{if(t.has(i))return t.get(i);let[o,a]=e[i];switch(o){case 0:case -1:return n(a,i);case 1:{let e=n([],i);for(let t of a)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),i);case 4:{let{source:e,flags:t}=a;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of a)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of a)e.add(r(t));return e}case 7:{let{name:e,message:t}=a;return n(new t$[e](t),i)}case 8:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{let{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}}return n(new t$[o](a),i)})(0)},{toString:tK}={},{keys:tY}=Object,tX=e=>{let t=typeof e;if("object"!==t||!e)return[0,t];let n=tK.call(e).slice(8,-1);switch(n){case"Array":return[1,""];case"Object":return[2,""];case"Date":return[3,""];case"RegExp":return[4,""];case"Map":return[5,""];case"Set":return[6,""];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},tJ=([e,t])=>0===e&&("function"===t||"symbol"===t),tQ=(e,{json:t,lossy:n}={})=>{var r,i,o;let a,l,s=[];return(r=!(t||n),i=!!t,o=new Map,a=(e,t)=>{let n=s.push(e)-1;return o.set(t,n),n},l=e=>{if(o.has(e))return o.get(e);let[t,n]=tX(e);switch(t){case 0:{let i=e;switch(n){case"bigint":t=8,i=e.toString();break;case"function":case"symbol":if(r)throw TypeError("unable to serialize "+n);i=null;break;case"undefined":return a([-1],e)}return a([t,i],e)}case 1:{if(n){let t=e;return"DataView"===n?t=new Uint8Array(e.buffer):"ArrayBuffer"===n&&(t=new Uint8Array(e)),a([n,[...t]],e)}let r=[],i=a([t,r],e);for(let t of e)r.push(l(t));return i}case 2:{if(n)switch(n){case"BigInt":return a([n,e.toString()],e);case"Boolean":case"Number":case"String":return a([n,e.valueOf()],e)}if(i&&"toJSON"in e)return l(e.toJSON());let o=[],s=a([t,o],e);for(let t of tY(e))(r||!tJ(tX(e[t])))&&o.push([l(t),l(e[t])]);return s}case 3:return a([t,e.toISOString()],e);case 4:{let{source:n,flags:r}=e;return a([t,{source:n,flags:r}],e)}case 5:{let n=[],i=a([t,n],e);for(let[t,i]of e)(r||!(tJ(tX(t))||tJ(tX(i))))&&n.push([l(t),l(i)]);return i}case 6:{let n=[],i=a([t,n],e);for(let t of e)(r||!tJ(tX(t)))&&n.push(l(t));return i}}let{message:s}=e;return a([t,{name:n,message:s}],e)})(e),s},tG="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?tW(tQ(e,t)):structuredClone(e):(e,t)=>tW(tQ(e,t));function tZ(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let o=e.charCodeAt(n),a="";if(37===o&&eM(e.charCodeAt(n+1))&&eM(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){let t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(a=String.fromCharCode(o,t),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function t0(e,t){let n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function t1(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}let t2=function(e){var t,n;if(null==e)return t6;if("function"==typeof e)return t4(e);if("object"==typeof e){return Array.isArray(e)?function(e){let t=[],n=-1;for(;++n<e.length;)t[n]=t2(e[n]);return t4(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):(t=e,t4(function(e){let n;for(n in t)if(e[n]!==t[n])return!1;return!0}))}if("string"==typeof e){return n=e,t4(function(e){return e&&e.type===n})}throw Error("Expected function, string, or object as test")};function t4(e){return function(t,n,r){return!!(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function t6(){return!0}let t5=[];function t3(e,t,n,r){let i;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):i=t;let o=t2(i),a=r?-1:1;(function e(i,l,s){let u=i&&"object"==typeof i?i:{};if("string"==typeof u.type){let e="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0;Object.defineProperty(c,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return c;function c(){var u;let c,d,f,p=t5;if((!t||o(i,l,s[s.length-1]||void 0))&&!1===(p=Array.isArray(u=n(i,s))?u:"number"==typeof u?[!0,u]:null==u?t5:[u])[0])return p;if("children"in i&&i.children&&i.children&&"skip"!==p[0])for(d=(r?i.children.length:-1)+a,f=s.concat(i);d>-1&&d<i.children.length;){if(!1===(c=e(i.children[d],d,f)())[0])return c;d="number"==typeof c[1]?c[1]:d+a}return p}})(e,void 0,[])()}function t9(e,t,n,r){let i,o,a;"function"==typeof t&&"function"!=typeof n?(o=void 0,a=t,i=n):(o=t,a=n,i=r),t3(e,o,function(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)},i)}function t8(e,t){let n=t.referenceType,r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];let i=e.all(t),o=i[0];o&&"text"===o.type?o.value="["+o.value:i.unshift({type:"text",value:"["});let a=i[i.length-1];return a&&"text"===a.type?a.value+=r:i.push({type:"text",value:r}),i}function t7(e){let t=e.spread;return null==t?e.children.length>1:t}function ne(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}let nt={blockquote:function(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){let n=t.value?t.value+"\n":"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o={type:"element",tagName:"pre",properties:{},children:[o=e.applyData(t,o)]},e.patch(t,o),o},delete:function(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){let n,r="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),o=tZ(i.toLowerCase()),a=e.footnoteOrder.indexOf(i),l=e.footnoteCounts.get(i);void 0===l?(l=0,e.footnoteOrder.push(i),n=e.footnoteOrder.length):n=a+1,l+=1,e.footnoteCounts.set(i,l);let s={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+o,id:r+"fnref-"+o+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,s);let u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,u),e.applyData(t,u)},heading:function(e,t){let n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return t8(e,t);let i={src:tZ(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);let o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){let n={src:tZ(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return t8(e,t);let i={href:tZ(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);let o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){let n={href:tZ(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){let r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=t7(n[r])}return t}(n):t7(t),o={},a=[];if("boolean"==typeof t.checked){let e,n=r[0];n&&"element"===n.type&&"p"===n.tagName?e=n:(e={type:"element",tagName:"p",properties:{},children:[]},r.unshift(e)),e.children.length>0&&e.children.unshift({type:"text",value:" "}),e.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let l=-1;for(;++l<r.length;){let e=r[l];(i||0!==l||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?a.push(e):a.push(...e.children)}let s=r[r.length-1];s&&(i||"element"!==s.type||"p"!==s.tagName)&&a.push({type:"text",value:"\n"});let u={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,u),e.applyData(t,u)},list:function(e,t){let n={},r=e.all(t),i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){let e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}let o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=ea(t.children[1]),a=eo(t.children[t.children.length-1]);o&&a&&(r.position={start:o,end:a}),i.push(r)}let o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){let r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,a=o?o.length:t.children.length,l=-1,s=[];for(;++l<a;){let n=t.children[l],r={},a=o?o[l]:void 0;a&&(r.align=a);let u={type:"element",tagName:i,properties:r,children:[]};n&&(u.children=e.all(n),e.patch(n,u),u=e.applyData(n,u)),s.push(u)}let u={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,u),e.applyData(t,u)},text:function(e,t){let n={type:"text",value:function(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,o=[];for(;r;)o.push(ne(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(ne(t.slice(i),i>0,!1)),o.join("")}(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:nn,yaml:nn,definition:nn,footnoteDefinition:nn};function nn(){}let nr={}.hasOwnProperty,ni={};function no(e,t){e.position&&(t.position=function(e){let t=ea(e),n=eo(e);if(t&&n)return{start:t,end:n}}(e))}function na(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&i&&Object.assign(n.properties,tG(i)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function nl(e,t){let n=[],r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function ns(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function nu(e,t){let n,r,i,o,a=(n=t||ni,r=new Map,i=new Map,o={all:function(e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r<n.length;){let i=o.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=ns(i.value)),!Array.isArray(i)&&"element"===i.type)){let e=i.children[0];e&&"text"===e.type&&(e.value=ns(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:na,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...nt,...n.handlers},one:function(e,t){let n=e.type,r=o.handlers[n];if(nr.call(o.handlers,n)&&r)return r(o,e,t);if(o.options.passThrough&&o.options.passThrough.includes(n)){if("children"in e){let{children:t,...n}=e,r=tG(n);return r.children=o.all(e),r}return tG(e)}return(o.options.unknownHandler||function(e,t){let n=t.data||{},r="value"in t&&!(nr.call(n,"hProperties")||nr.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)})(o,e,t)},options:n,patch:no,wrap:nl},t9(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){let t="definition"===e.type?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o),l=a.one(e,void 0),s=function(e){let t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||t0,r=e.options.footnoteBackLabel||t1,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[],s=-1;for(;++s<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[s]);if(!i)continue;let o=e.all(i),a=String(i.identifier).toUpperCase(),u=tZ(a.toLowerCase()),c=0,d=[],f=e.footnoteCounts.get(a);for(;void 0!==f&&++c<=f;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,c);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+u+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}let p=o[o.length-1];if(p&&"element"===p.type&&"p"===p.tagName){let e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...d)}else o.push(...d);let h={type:"element",tagName:"li",properties:{id:t+"fn-"+u},children:e.wrap(o,!0)};e.patch(i,h),l.push(h)}if(0!==l.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...tG(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:"\n"}]}}(a),u=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return s&&(y("children"in u),u.children.push({type:"text",value:"\n"},s)),u}function nc(e,t){return e&&"run"in e?async function(n,r){let i=nu(n,{file:r,...t});await e.run(i,r)}:function(n,r){return nu(n,{file:r,...e||t})}}function nd(e){if(e)throw e}var nf=e.i(4100);function np(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}let nh=function(e,t){let n;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');nv(e);let r=0,i=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let a=-1,l=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1),l>-1&&(e.codePointAt(o)===t.codePointAt(l--)?l<0&&(i=o):(l=-1,i=a));return r===i?i=a:i<0&&(i=e.length),e.slice(r,i)},nm=function(e){let t;if(nv(e),0===e.length)return".";let n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},ng=function(e){let t;nv(e);let n=e.length,r=-1,i=0,o=-1,a=0;for(;n--;){let l=e.codePointAt(n);if(47===l){if(t){i=n+1;break}continue}r<0&&(t=!0,r=n+1),46===l?o<0?o=n:1!==a&&(a=1):o>-1&&(a=-1)}return o<0||r<0||0===a||1===a&&o===r-1&&o===i+1?"":e.slice(o,r)},ny=function(...e){var t;let n,r,i,o=-1;for(;++o<e.length;)nv(e[o]),e[o]&&(i=void 0===i?e[o]:i+"/"+e[o]);return void 0===i?".":(nv(t=i),n=47===t.codePointAt(0),0!==(r=function(e,t){let n,r,i="",o=0,a=-1,l=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.codePointAt(s);else if(47===n)break;else n=47;if(47===n){if(a===s-1||1===l);else if(a!==s-1&&2===l){if(i.length<2||2!==o||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2)){if(i.length>2){if((r=i.lastIndexOf("/"))!==i.length-1){r<0?(i="",o=0):o=(i=i.slice(0,r)).length-1-i.lastIndexOf("/"),a=s,l=0;continue}}else if(i.length>0){i="",o=0,a=s,l=0;continue}}t&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+e.slice(a+1,s):i=e.slice(a+1,s),o=s-a-1;a=s,l=0}else 46===n&&l>-1?l++:l=-1}return i}(t,!n)).length||n||(r="."),r.length>0&&47===t.codePointAt(t.length-1)&&(r+="/"),n?"/"+r:r)};function nv(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function nb(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}let nx=["history","path","basename","stem","extname","dirname"];class nk{constructor(e){let t,n;t=e?nb(e)?{path:e}:"string"==typeof e||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":"/",this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<nx.length;){const e=nx[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)nx.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?nh(this.path):void 0}set basename(e){nE(e,"basename"),nw(e,"basename"),this.path=ny(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?nm(this.path):void 0}set dirname(e){nS(this.basename,"dirname"),this.path=ny(e||"",this.basename)}get extname(){return"string"==typeof this.path?ng(this.path):void 0}set extname(e){if(nw(e,"extname"),nS(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw Error("`extname` must start with `.`");if(e.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=ny(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){nb(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!nb(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){let e=TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){let e=TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}let t=e.pathname,n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){let e=t.codePointAt(n+2);if(70===e||102===e){let e=TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),nE(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?nh(this.path,this.extname):void 0}set stem(e){nE(e,"stem"),nw(e,"stem"),this.path=ny(this.dirname||"",e+(this.extname||""))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new ef(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function nw(e,t){if(e&&e.includes("/"))throw Error("`"+t+"` cannot be a path: did not expect `/`")}function nE(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function nS(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}let nC=function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},n_={}.hasOwnProperty;class nA extends nC{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=function(){let e=[],t={run:function(...t){let n=-1,r=t.pop();if("function"!=typeof r)throw TypeError("Expected function as last argument, not "+r);!function i(o,...a){let l=e[++n],s=-1;if(o)return void r(o);for(;++s<t.length;)(null===a[s]||void 0===a[s])&&(a[s]=t[s]);t=a,l?(function(e,t){let n;return function(...t){let o,a=e.length>t.length;a&&t.push(r);try{o=e.apply(this,t)}catch(e){if(a&&n)throw e;return r(e)}a||(o&&o.then&&"function"==typeof o.then?o.then(i,r):o instanceof Error?r(o):i(o))};function r(e,...i){n||(n=!0,t(e,...i))}function i(e){r(null,e)}})(l,i)(...a):r(null,...a)}(null,...t)},use:function(n){if("function"!=typeof n)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){let e=new nA,t=-1;for(;++t<this.attachers.length;){let n=this.attachers[t];e.use(...n)}return e.data((0,nf.default)(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2==arguments.length?(nL("data",this.frozen),this.namespace[e]=t,this):n_.call(this.namespace,e)&&this.namespace[e]||void 0:e?(nL("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;for(;++this.freezeIndex<this.attachers.length;){let[e,...t]=this.attachers[this.freezeIndex];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let n=e.call(this,...t);"function"==typeof n&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=nN(e),n=this.parser||this.Parser;return nR("parse",n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),nR("process",this.parser||this.Parser),nO("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let o=nN(e),a=n.parse(o);function l(e,n){e||!n?i(e):r?r(n):(y(t,"`done` is defined if `resolve` is not"),t(void 0,n))}n.run(a,o,function(e,t,r){var i,o;if(e||!t||!r)return l(e);let a=n.stringify(t,r);"string"==typeof(i=a)||(o=i)&&"object"==typeof o&&"byteLength"in o&&"byteOffset"in o?r.value=a:r.result=a,l(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),nR("processSync",this.parser||this.Parser),nO("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,nd(e),t=r}),nD("processSync","process",n),y(t,"we either bailed on an error or have a tree"),t}run(e,t,n){nP(e),this.freeze();let r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,o){y("function"!=typeof t,"`file` can’t be a `done` anymore, we checked");let a=nN(t);r.run(e,a,function(t,r,a){let l=r||e;t?o(t):i?i(l):(y(n,"`done` is defined if `resolve` is not"),n(void 0,l,a))})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){nd(e),n=t,r=!0}),nD("runSync","run",r),y(n,"we either bailed on an error or have a tree"),n}stringify(e,t){this.freeze();let n=nN(t),r=this.compiler||this.Compiler;return nO("stringify",r),nP(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(nL("use",this.frozen),null==e);else if("function"==typeof e)a(e,t);else if("object"==typeof e)Array.isArray(e)?o(e):i(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(!("plugins"in e)&&!("settings"in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,nf.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(null==e);else if(Array.isArray(e))for(;++t<e.length;)!function(e){if("function"==typeof e)a(e,[]);else if("object"==typeof e)if(Array.isArray(e)){let[t,...n]=e;a(t,n)}else i(e);else throw TypeError("Expected usable value, not `"+e+"`")}(e[t]);else throw TypeError("Expected a list of plugins, not `"+e+"`")}function a(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(-1===i)n.push([e,...t]);else if(t.length>0){let[r,...o]=t,a=n[i][1];np(a)&&np(r)&&(r=(0,nf.default)(!0,a,r)),n[i]=[e,r,...o]}}}}let nT=new nA().freeze();function nR(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `parser`")}function nO(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `compiler`")}function nL(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nP(e){if(!np(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}function nD(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function nN(e){var t;return(t=e)&&"object"==typeof t&&"message"in t&&"messages"in t?e:new nk(e)}let nI=[],nM={allowDangerousHtml:!0},nj=/^(https?|ircs?|mailto|xmpp)$/i,nF=[{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 nB(e){var t;let n,r,i,o,a,l=(n=(t=e).rehypePlugins||nI,r=t.remarkPlugins||nI,i=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...nM}:nM,nT().use(tq).use(r).use(nc,i).use(n)),s=(o=e.children||"",a=new nk,"string"==typeof o?a.value=o:v("Unexpected value `"+o+"` for `children` prop, expected `string`"),a);return function(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,a=t.skipHtml,l=t.unwrapDisallowed,s=t.urlTransform||nz;for(let e of nF)Object.hasOwn(t,e.from)&&v("Unexpected `"+e.from+"` prop, "+(e.to?"use `"+e.to+"` instead":"remove it")+" (see <https://github.com/remarkjs/react-markdown/blob/main/changelog.md#"+e.id+"> for more info)");return n&&o&&v("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other"),t9(e,function(e,t,i){if("raw"===e.type&&i&&"number"==typeof t)return a?i.children.splice(t,1):i.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in e_)if(Object.hasOwn(e_,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=e_[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=s(String(n||""),t,e))}}if("element"===e.type){let a=n?!n.includes(e.tagName):!!o&&o.includes(e.tagName);if(!a&&r&&"number"==typeof t&&(a=!r(e,t,i)),a&&i&&"number"==typeof t)return l&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}),function(e,t){var n,r,i,o;let a;if(!t||void 0===t.Fragment)throw TypeError("Expected `Fragment` in options");let l=t.filePath||void 0;if(t.development){if("function"!=typeof t.jsxDEV)throw TypeError("Expected `jsxDEV` in options when `development: true`");n=l,r=t.jsxDEV,a=function(e,t,i,o){let a=Array.isArray(i.children),l=ea(e);return r(t,i,o,a,{columnNumber:l?l.column-1:void 0,fileName:n,lineNumber:l?l.line:void 0},void 0)}}else{if("function"!=typeof t.jsx)throw TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw TypeError("Expected `jsxs` in production options");i=t.jsx,o=t.jsxs,a=function(e,t,n,r){let a=Array.isArray(n.children)?o:i;return r?a(t,n,r):a(t,n)}}let s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:l,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?er:en,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},u=eb(s,e,void 0);return u&&"string"!=typeof u?u:s.create(e,s.Fragment,{children:u||void 0},void 0)}(e,{Fragment:h.Fragment,components:i,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0})}(l.runSync(l.parse(s),s),e)}function nz(e){let t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return -1===t||-1!==i&&t>i||-1!==n&&t>n||-1!==r&&t>r||nj.test(e.slice(0,t))?e:""}function nH(e,t){let n=String(e);if("string"!=typeof t)throw TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}let nU="phrasing",nV=["autolink","link","image","label"];function nq(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function n$(e){this.config.enter.autolinkProtocol.call(this,e)}function nW(e){this.config.exit.autolinkProtocol.call(this,e)}function nK(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];y("link"===t.type),t.url="http://"+this.sliceSerialize(e)}function nY(e){this.config.exit.autolinkEmail.call(this,e)}function nX(e){this.exit(e)}function nJ(e){!function(e,t,n){let r=t2((n||{}).ignore||[]),i=function(e){let t=[];if(!Array.isArray(e))throw TypeError("Expected find and replace tuple or list of tuples");let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){var i;let e=n[r];t.push(["string"==typeof(i=e[0])?RegExp(function(e){if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(i),"g"):i,function(e){return"function"==typeof e?e:function(){return e}}(e[1])])}return t}(t),o=-1;for(;++o<i.length;)t3(e,"text",a);function a(e,t){let n,a=-1;for(;++a<t.length;){let e=t[a],i=n?n.children:void 0;if(r(e,i?i.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){let n=t[t.length-1],r=i[o][0],a=i[o][1],l=0,s=n.children.indexOf(e),u=!1,c=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},o=a(...d,i);if("string"==typeof o&&(o=o.length>0?{type:"text",value:o}:void 0),!1===o?r.lastIndex=n+1:(l!==n&&c.push({type:"text",value:e.value.slice(l,n)}),Array.isArray(o)?c.push(...o):o&&c.push(o),l=n+d[0].length,u=!0),!r.global)break;d=r.exec(e.value)}return u?(l<e.value.length&&c.push({type:"text",value:e.value.slice(l)}),n.children.splice(s,1,...c)):c=[e],s+c.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,nQ],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,nG]],{ignore:["link","linkReference"]})}function nQ(e,t,n,r,i){let o,a="";if(!nZ(i))return!1;if(/^w/i.test(t)&&(n=t+n,t="",a="http://"),(o=n.split(".")).length<2||o[o.length-1]&&(/_/.test(o[o.length-1])||!/[a-zA-Z\d]/.test(o[o.length-1]))||o[o.length-2]&&(/_/.test(o[o.length-2])||!/[a-zA-Z\d]/.test(o[o.length-2])))return!1;let l=function(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")"),i=nH(e,"("),o=nH(e,")");for(;-1!==r&&i>o;)e+=n.slice(0,r+1),r=(n=n.slice(r+1)).indexOf(")"),o++;return[e,n]}(n+r);if(!l[0])return!1;let s={type:"link",title:null,url:a+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[s,{type:"text",value:l[1]}]:s}function nG(e,t,n,r){return!(!nZ(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function nZ(e,t){let n=e.input.charCodeAt(e.index-1);return(0===e.index||eW(n)||e$(n))&&(!t||47!==n)}function n0(){this.buffer()}function n1(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function n2(){this.buffer()}function n4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function n6(e){let t=this.resume(),n=this.stack[this.stack.length-1];y("footnoteReference"===n.type),n.identifier=tv(this.sliceSerialize(e)).toLowerCase(),n.label=t}function n5(e){this.exit(e)}function n3(e){let t=this.resume(),n=this.stack[this.stack.length-1];y("footnoteDefinition"===n.type),n.identifier=tv(this.sliceSerialize(e)).toLowerCase(),n.label=t}function n9(e){this.exit(e)}function n8(e,t,n,r){let i=n.createTracker(r),o=i.move("[^"),a=n.enter("footnoteReference"),l=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),l(),a(),o+=i.move("]")}function n7(e,t,n){return 0===t?e:re(e,t,n)}function re(e,t,n){return(n?"":" ")+e}n8.peek=function(){return"["};let rt=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function rn(e){this.enter({type:"delete",children:[]},e)}function rr(e){this.exit(e)}function ri(e,t,n,r){let i=n.createTracker(r),o=n.enter("strikethrough"),a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function ro(e){return e.length}function ra(e){let t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:114*(82===t||114===t)}ri.peek=function(){return"~"};function rl(e,t,n){let r=e.value||"",i="`",o=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){let e,t=n.unsafe[o],i=n.compilePattern(t);if(t.atBreak)for(;e=i.exec(r);){let t=e.index;10===r.charCodeAt(t)&&13===r.charCodeAt(t-1)&&t--,r=r.slice(0,t)+" "+r.slice(e.index+1)}}return i+r+i}rl.peek=function(){return"`"};t2(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);let rs=function(e,t,n,r){let i=function(e){let t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n),o=n.bulletCurrent||function(e){let t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}(n);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let a=o.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));let l=n.createTracker(r);l.move(o+" ".repeat(a-o.length)),l.shift(a);let s=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),function(e,t,n){return t?(n?"":" ".repeat(a))+e:(n?o:o+" ".repeat(a-o.length))+e});return s(),u};function ru(e){let t=e._align;y(t,"expected `_align` on table"),this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function rc(e){this.exit(e),this.data.inTable=void 0}function rd(e){this.enter({type:"tableRow",children:[]},e)}function rf(e){this.exit(e)}function rp(e){this.enter({type:"tableCell",children:[]},e)}function rh(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,rm));let n=this.stack[this.stack.length-1];y("inlineCode"===n.type),n.value=t,this.exit(e)}function rm(e,t){return"|"===t?t:e}function rg(e){let t=this.stack[this.stack.length-2];y("listItem"===t.type),t.checked="taskListCheckValueChecked"===e.type}function ry(e){let t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){let e=this.stack[this.stack.length-1];y("paragraph"===e.type);let n=e.children[0];if(n&&"text"===n.type){let r,i=t.children,o=-1;for(;++o<i.length;){let e=i[o];if("paragraph"===e.type){r=e;break}}r===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function rv(e,t,n,r){let i=e.children[0],o="boolean"==typeof e.checked&&i&&"paragraph"===i.type,a="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);o&&l.move(a);let s=rs(e,t,n,{...r,...l.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+a})),s}let rb={tokenize:function(e,t,n){let r=0;return function t(o){return(87===o||119===o)&&r<3?(r++,e.consume(o),t):46===o&&3===r?(e.consume(o),i):n(o)};function i(e){return null===e?n(e):t(e)}},partial:!0},rx={tokenize:function(e,t,n){let r,i,o;return a;function a(t){return 46===t||95===t?e.check(rw,s,l)(t):null===t||eV(t)||eW(t)||45!==t&&e$(t)?s(t):(o=!0,e.consume(t),a)}function l(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),a}function s(e){return i||r||!o?n(e):t(e)}},partial:!0},rk={tokenize:function(e,t){let n=0,r=0;return i;function i(a){return 40===a?(n++,e.consume(a),i):41===a&&r<n?o(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(rw,t,o)(a):null===a||eV(a)||eW(a)?t(a):(e.consume(a),i)}function o(t){return 41===t&&r++,e.consume(t),i}},partial:!0},rw={tokenize:function(e,t,n){return r;function r(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),r):38===a?(e.consume(a),o):93===a?(e.consume(a),i):60===a||null===a||eV(a)||eW(a)?t(a):n(a)}function i(e){return null===e||40===e||91===e||eV(e)||eW(e)?t(e):r(e)}function o(t){return eI(t)?function t(i){return 59===i?(e.consume(i),r):eI(i)?(e.consume(i),t):n(i)}(t):n(t)}},partial:!0},rE={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return eM(e)?n(e):t(e)}},partial:!0},rS={name:"wwwAutolink",tokenize:function(e,t,n){let r=this;return function(t){return 87!==t&&119!==t||!rR.call(r,r.previous)||rD(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(rb,e.attempt(rx,e.attempt(rk,i),n),n)(t))};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:rR},rC={name:"protocolAutolink",tokenize:function(e,t,n){let r=this,i="",o=!1;return function(t){return(72===t||104===t)&&rO.call(r,r.previous)&&!rD(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),a):n(t)};function a(t){if(eI(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),a;if(58===t){let n=i.toLowerCase();if("http"===n||"https"===n)return e.consume(t),l}return n(t)}function l(t){return 47===t?(e.consume(t),o)?s:(o=!0,l):n(t)}function s(t){return null===t||eF(t)||eV(t)||eW(t)||e$(t)?n(t):e.attempt(rx,e.attempt(rk,u),n)(t)}function u(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:rO},r_={name:"emailAutolink",tokenize:function(e,t,n){let r,i,o=this;return function(t){return!rP(t)||!rL.call(o,o.previous)||rD(o.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),function t(r){return rP(r)?(e.consume(r),t):64===r?(e.consume(r),a):n(r)}(t))};function a(t){return 46===t?e.check(rE,s,l)(t):45===t||95===t||eM(t)?(i=!0,e.consume(t),a):s(t)}function l(t){return e.consume(t),r=!0,a}function s(a){return i&&r&&eI(o.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:rL},rA={},rT=48;for(;rT<123;)rA[rT]=r_,58==++rT?rT=65:91===rT&&(rT=97);function rR(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||eV(e)}function rO(e){return!eI(e)}function rL(e){return!(47===e||rP(e))}function rP(e){return 43===e||45===e||46===e||95===e||eM(e)}function rD(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}rA[43]=r_,rA[45]=r_,rA[46]=r_,rA[95]=r_,rA[72]=[r_,rC],rA[104]=[r_,rC],rA[87]=[r_,rS],rA[119]=[r_,rS];let rN={tokenize:function(e,t,n){let r=this;return eY(e,function(e){let i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function rI(e,t,n){let r,i=this,o=i.events.length,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);for(;o--;){let e=i.events[o][1];if("labelImage"===e.type){r=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!r||!r._balanced)return n(o);let l=tv(i.sliceSerialize({start:r.end,end:i.now()}));return 94===l.codePointAt(0)&&a.includes(l.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)):n(o)}}function rM(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";let r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function rj(e,t,n){let r,i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),l};function l(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(l){if(a>999||93===l&&!r||null===l||91===l||eV(l))return n(l);if(93===l){e.exit("chunkString");let r=e.exit("gfmFootnoteCallString");return o.includes(tv(i.sliceSerialize(r)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(l)}return eV(l)||(r=!0),a++,e.consume(l),92===l?u:s}function u(t){return 91===t||92===t||93===t?(e.consume(t),a++,s):s(t)}}function rF(e,t,n){let r,i,o=this,a=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]),l=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),s};function s(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(t)}function u(t){if(l>999||93===t&&!i||null===t||91===t||eV(t))return n(t);if(93===t){e.exit("chunkString");let n=e.exit("gfmFootnoteDefinitionLabelString");return r=tv(o.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return eV(t)||(i=!0),l++,e.consume(t),92===t?c:u}function c(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a.includes(r)||a.push(r),eY(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return t(e)}}function rB(e,t,n){return e.check(eG,t,e.attempt(rN,t,n))}function rz(e){e.exit("gfmFootnoteDefinition")}class rH{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let i=0;if(0!==n||0!==r.length){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length,n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}}function rU(e,t,n){let r,i=this,o=0,a=0;return function(e){let t=i.events.length-1;for(;t>-1;){let e=i.events[t][1].type;if("lineEnding"===e||"linePrefix"===e)t--;else break}let r=t>-1?i.events[t][1].type:null,o="tableHead"===r||"tableRow"===r?v:l;return o===v&&i.parser.lazy[i.now().line]?n(e):o(e)};function l(t){var n;return e.enter("tableHead"),e.enter("tableRow"),124===(n=t)||(r=!0,a+=1),s(n)}function s(t){return null===t?n(t):eU(t)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):eq(t)?eY(e,s,"whitespace")(t):(a+=1,r&&(r=!1,o+=1),124===t)?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),r=!0,s):(e.enter("data"),u(t))}function u(t){return null===t||124===t||eV(t)?(e.exit("data"),s(t)):(e.consume(t),92===t?c:u)}function c(t){return 92===t||124===t?(e.consume(t),u):u(t)}function d(t){return(i.interrupt=!1,i.parser.lazy[i.now().line])?n(t):(e.enter("tableDelimiterRow"),r=!1,eq(t))?eY(e,f,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):f(t)}function f(t){return 45===t||58===t?h(t):124===t?(r=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):n(t)}function p(t){return eq(t)?eY(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(a+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(a+=1,m(t)):null===t||eU(t)?y(t):n(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),function t(n){return 45===n?(e.consume(n),t):58===n?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(n),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(n))}(t)):n(t)}function g(t){return eq(t)?eY(e,y,"whitespace")(t):y(t)}function y(i){if(124===i)return f(i);if(null===i||eU(i))return r&&o===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(i)):n(i);return n(i)}function v(t){return e.enter("tableRow"),b(t)}function b(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),b):null===n||eU(n)?(e.exit("tableRow"),t(n)):eq(n)?eY(e,b,"whitespace")(n):(e.enter("data"),x(n))}function x(t){return null===t||124===t||eV(t)?(e.exit("data"),b(t)):(e.consume(t),92===t?k:x)}function k(t){return 92===t||124===t?(e.consume(t),x):x(t)}}function rV(e,t){let n,r,i,o=-1,a=!0,l=0,s=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f=new rH;for(;++o<e.length;){let p=e[o],h=p[1];"enter"===p[0]?"tableHead"===h.type?(c=!1,0!==d&&(r$(f,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(o,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(a=!0,i=void 0,s=[0,0,0,0],u=[0,o+1,0,0],c&&(c=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(o,0,[["enter",r,t]])),l="tableDelimiterRow"===h.type?2:r?3:1):l&&("data"===h.type||"tableDelimiterMarker"===h.type||"tableDelimiterFiller"===h.type)?(a=!1,0===u[2]&&(0!==s[1]&&(u[0]=u[1],i=rq(f,t,s,l,void 0,i),s=[0,0,0,0]),u[2]=o)):"tableCellDivider"===h.type&&(a?a=!1:(0!==s[1]&&(u[0]=u[1],i=rq(f,t,s,l,void 0,i)),u=[(s=u)[1],o,0,0])):"tableHead"===h.type?(c=!0,d=o):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=o,0!==s[1]?(u[0]=u[1],i=rq(f,t,s,l,o,i)):0!==u[1]&&(i=rq(f,t,u,l,o,i)),l=0):l&&("data"===h.type||"tableDelimiterMarker"===h.type||"tableDelimiterFiller"===h.type)&&(u[3]=o)}for(0!==d&&r$(f,t,d,n,r),f.consume(t.events),o=-1;++o<t.events.length;){let e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=function(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if("enter"===i[0])"tableContent"===i[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){let e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(n=!0);t+=1}return r}(t.events,o))}return e}function rq(e,t,n,r,i,o){0!==n[0]&&(o.end=Object.assign({},rW(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));let a=rW(t.events,n[1]);if(o={type:1===r?"tableHeader":2===r?"tableDelimiter":"tableData",start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){let i=rW(t.events,n[2]),o=rW(t.events,n[3]),a={type:"tableContent",start:Object.assign({},i),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",a,t]]),2!==r){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",a,t]])}return void 0!==i&&(o.end=Object.assign({},rW(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function r$(e,t,n,r,i){let o=[],a=rW(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function rW(e,t){let n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}let rK={name:"tasklistCheck",tokenize:function(e,t,n){let r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i):n(t)};function i(t){return eV(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(t)}function a(r){return eU(r)?t(r):eq(r)?e.check({tokenize:rY},t,n)(r):n(r)}}};function rY(e,t,n){return eY(e,function(e){return null===e?n(e):t(e)},"whitespace")}let rX={};function rJ(e){let t,n,r,i=e||rX,o=this.data(),a=o.micromarkExtensions||(o.micromarkExtensions=[]),l=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),s=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);a.push(eN([{text:rA},{document:{91:{name:"gfmFootnoteDefinition",tokenize:rF,continuation:{tokenize:rB},exit:rz}},text:{91:{name:"gfmFootnoteCall",tokenize:rj},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:rI,resolveTo:rM}}},(t=(i||{}).singleTilde,n={name:"strikethrough",tokenize:function(e,n,r){let i=this.previous,o=this.events,a=0;return function(l){return 126===i&&"characterEscape"!==o[o.length-1][1].type?r(l):(e.enter("strikethroughSequenceTemporary"),function o(l){let s=tt(i);if(126===l)return a>1?r(l):(e.consume(l),a++,o);if(a<2&&!t)return r(l);let u=e.exit("strikethroughSequenceTemporary"),c=tt(l);return u._open=!c||2===c&&!!s,u._close=!s||2===s&&!!c,n(l)}(l))}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";let i={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},o={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",o,t]],l=t.parser.constructs.insideSpan.null;l&&eL(a,a.length,0,tn(l,e.slice(r+1,n),t)),eL(a,a.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),eL(e,r-1,n-r+3,a),n=r+a.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}},null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}),{flow:{null:{name:"table",tokenize:rU,resolveAll:rV}}},{text:{91:rK}}])),l.push([{transforms:[nJ],enter:{literalAutolink:nq,literalAutolinkEmail:n$,literalAutolinkHttp:n$,literalAutolinkWww:n$},exit:{literalAutolink:nX,literalAutolinkEmail:nY,literalAutolinkHttp:nW,literalAutolinkWww:nK}},{enter:{gfmFootnoteCallString:n0,gfmFootnoteCall:n1,gfmFootnoteDefinitionLabelString:n2,gfmFootnoteDefinition:n4},exit:{gfmFootnoteCallString:n6,gfmFootnoteCall:n5,gfmFootnoteDefinitionLabelString:n3,gfmFootnoteDefinition:n9}},{canContainEols:["delete"],enter:{strikethrough:rn},exit:{strikethrough:rr}},{enter:{table:ru,tableData:rp,tableHeader:rp,tableRow:rd},exit:{codeText:rh,table:rc,tableData:rf,tableHeader:rf,tableRow:rf}},{exit:{taskListCheckValueChecked:rg,taskListCheckValueUnchecked:rg,paragraph:ry}}]),s.push({extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:nU,notInConstruct:nV},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:nU,notInConstruct:nV},{character:":",before:"[ps]",after:"\\/",inConstruct:nU,notInConstruct:nV}]},(r=!1,i&&i.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:function(e,t,n,i){let o=n.createTracker(i),a=o.move("[^"),l=n.enter("footnoteDefinition"),s=n.enter("label");return a+=o.move(n.safe(n.associationId(e),{before:a,after:"]"})),s(),a+=o.move("]:"),e.children&&e.children.length>0&&(o.shift(4),a+=o.move((r?"\n":" ")+n.indentLines(n.containerFlow(e,o.current()),r?re:n7))),l(),a},footnoteReference:n8},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:rt}],handlers:{delete:ri}},function(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=rl(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return l(function(e,t,n){let r=e.children,i=-1,o=[],a=t.enter("table");for(;++i<r.length;)o[i]=s(r[i],t,n);return a(),o}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){let i=l([s(e,n,r)]);return i.slice(0,i.indexOf("\n"))}}};function a(e,t,n,r){let i=n.enter("tableCell"),a=n.enter("phrasing"),l=n.containerPhrasing(e,{...r,before:o,after:o});return a(),i(),l}function l(e,t){return function(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||ro,o=[],a=[],l=[],s=[],u=0,c=-1;for(;++c<e.length;){let t=[],r=[],o=-1;for(e[c].length>u&&(u=e[c].length);++o<e[c].length;){var d;let a=null==(d=e[c][o])?"":String(d);if(!1!==n.alignDelimiters){let e=i(a);r[o]=e,(void 0===s[o]||e>s[o])&&(s[o]=e)}t.push(a)}a[c]=t,l[c]=r}let f=-1;if("object"==typeof r&&"length"in r)for(;++f<u;)o[f]=ra(r[f]);else{let e=ra(r);for(;++f<u;)o[f]=e}f=-1;let p=[],h=[];for(;++f<u;){let e=o[f],t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let i=!1===n.alignDelimiters?1:Math.max(1,s[f]-t.length-r.length),a=t+"-".repeat(i)+r;!1!==n.alignDelimiters&&((i=t.length+i+r.length)>s[f]&&(s[f]=i),h[f]=i),p[f]=a}a.splice(1,0,p),l.splice(1,0,h),c=-1;let m=[];for(;++c<a.length;){let e=a[c],t=l[c];f=-1;let r=[];for(;++f<u;){let i=e[f]||"",a="",l="";if(!1!==n.alignDelimiters){let e=s[f]-(t[f]||0),n=o[f];114===n?a=" ".repeat(e):99===n?e%2?(a=" ".repeat(e/2+.5),l=" ".repeat(e/2-.5)):l=a=" ".repeat(e/2):l=" ".repeat(e)}!1===n.delimiterStart||f||r.push("|"),!1!==n.padding&&(!1!==n.alignDelimiters||""!==i)&&(!1!==n.delimiterStart||f)&&r.push(" "),!1!==n.alignDelimiters&&r.push(a),r.push(i),!1!==n.alignDelimiters&&r.push(l),!1!==n.padding&&r.push(" "),(!1!==n.delimiterEnd||f!==u-1)&&r.push("|")}m.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function s(e,t,n){let r=e.children,i=-1,o=[],l=t.enter("tableRow");for(;++i<r.length;)o[i]=a(r[i],e,t,n);return l(),o}}(i),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rv}}]})}var rQ=e.i(75254);let rG=(0,rQ.default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),rZ=(0,rQ.default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,rZ],74886);var r0=e.i(43531),r1=e.i(85902);function r2({language:e,code:t,children:n}){let[r,i]=(0,m.useState)(!1),o=async()=>{try{await navigator.clipboard.writeText(t),i(!0),setTimeout(()=>i(!1),2e3)}catch(e){console.error("Failed to copy code:",e)}};return(0,h.jsxs)("div",{className:"relative group",children:[(0,h.jsx)(r1.Button,{variant:"ghost",size:"icon-sm",onClick:o,className:"absolute top-2 right-2 opacity-80 hover:opacity-100",title:r?"Copied!":"Copy code","aria-label":r?"Copied to clipboard":"Copy code to clipboard",children:r?(0,h.jsx)(r0.Check,{className:"w-4 h-4 text-success"}):(0,h.jsx)(rZ,{className:"w-4 h-4 text-foreground"})}),(0,h.jsx)("pre",{children:(0,h.jsx)("code",{className:e?`language-${e}`:"",children:n})})]})}var r4=e.i(44917),r6=e.i(60948),r5=e.i(3262);e.i(31360),e.i(9003),e.i(60884),e.i(88147),e.i(11338);var r3=e.i(9796),r9=e.i(29432),r8=e.i(96977),r7=e.i(71206),ie=e.i(40524);e.i(47716);var it=e.i(23685),ir="comm",ii="rule",io="decl",ia=Math.abs,il=String.fromCharCode;function is(e,t,n){return e.replace(t,n)}function iu(e,t){return 0|e.charCodeAt(t)}function ic(e,t,n){return e.slice(t,n)}function id(e){return e.length}function ip(e,t){return t.push(e),e}var ih=1,im=1,ig=0,iy=0,iv=0,ib="";function ix(e,t,n,r,i,o,a,l){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:ih,column:im,length:a,return:"",siblings:l}}function ik(){return iv=iy<ig?iu(ib,iy++):0,im++,10===iv&&(im=1,ih++),iv}function iw(){return iu(ib,iy)}function iE(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function iS(e){var t,n;return(t=iy-1,n=function e(t){for(;ik();)switch(iv){case t:return iy;case 34:case 39:34!==t&&39!==t&&e(iv);break;case 40:41===t&&e(t);break;case 92:ik()}return iy}(91===e?e+2:40===e?e+1:e),ic(ib,t,n)).trim()}function iC(e,t,n,r,i,o,a,l,s,u,c,d){for(var f=i-1,p=0===i?o:[""],h=p.length,m=0,g=0,y=0;m<r;++m)for(var v=0,b=ic(e,f+1,f=ia(g=a[m])),x=e;v<h;++v)(x=(g>0?p[v]+" "+b:is(b,/&\f/g,p[v])).trim())&&(s[y++]=x);return ix(e,t,n,0===i?ii:l,s,u,c,d)}function i_(e,t,n,r,i){return ix(e,t,n,io,ic(e,0,r),ic(e,r+1,-1),r,i)}function iA(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function iT(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case io:return e.return=e.return||e.value;case ir:return"";case"@keyframes":return e.return=e.value+"{"+iA(e.children,r)+"}";case ii:if(!id(e.value=e.props.join(",")))return""}return id(n=iA(e.children,r))?e.return=e.value+"{"+n+"}":""}var iR=e.i(24154),iO=e.i(41241),iL={id:"c4",detector:(0,r7.__name)(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),loader:(0,r7.__name)(async()=>{let{diagram:t}=await e.A(78997);return{id:"c4",diagram:t}},"loader")},iP="flowchart",iD=(0,r7.__name)((e,t)=>t?.flowchart?.defaultRenderer!=="dagre-wrapper"&&t?.flowchart?.defaultRenderer!=="elk"&&/^\s*graph/.test(e),"detector"),iN=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(28146);return{id:iP,diagram:t}},"loader"),iI={id:iP,detector:iD,loader:iN},iM="flowchart-v2",ij=(0,r7.__name)((e,t)=>t?.flowchart?.defaultRenderer!=="dagre-d3"&&(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),!!/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"||/^\s*flowchart/.test(e)),"detector"),iF=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(28146);return{id:iM,diagram:t}},"loader"),iB={id:iM,detector:ij,loader:iF},iz={id:"er",detector:(0,r7.__name)(e=>/^\s*erDiagram/.test(e),"detector"),loader:(0,r7.__name)(async()=>{let{diagram:t}=await e.A(80472);return{id:"er",diagram:t}},"loader")},iH="gitGraph",iU=(0,r7.__name)(e=>/^\s*gitGraph/.test(e),"detector"),iV=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(83305);return{id:iH,diagram:t}},"loader"),iq={id:iH,detector:iU,loader:iV},i$="gantt",iW=(0,r7.__name)(e=>/^\s*gantt/.test(e),"detector"),iK=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(34606);return{id:i$,diagram:t}},"loader"),iY={id:i$,detector:iW,loader:iK},iX="info",iJ=(0,r7.__name)(e=>/^\s*info/.test(e),"detector"),iQ=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(23526);return{id:iX,diagram:t}},"loader"),iG={id:iX,detector:iJ,loader:iQ},iZ={id:"pie",detector:(0,r7.__name)(e=>/^\s*pie/.test(e),"detector"),loader:(0,r7.__name)(async()=>{let{diagram:t}=await e.A(3931);return{id:"pie",diagram:t}},"loader")},i0="quadrantChart",i1=(0,r7.__name)(e=>/^\s*quadrantChart/.test(e),"detector"),i2=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(67051);return{id:i0,diagram:t}},"loader"),i4={id:i0,detector:i1,loader:i2},i6="xychart",i5=(0,r7.__name)(e=>/^\s*xychart(-beta)?/.test(e),"detector"),i3=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(36080);return{id:i6,diagram:t}},"loader"),i9={id:i6,detector:i5,loader:i3},i8="requirement",i7=(0,r7.__name)(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),oe=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(3156);return{id:i8,diagram:t}},"loader"),ot={id:i8,detector:i7,loader:oe},on="sequence",or=(0,r7.__name)(e=>/^\s*sequenceDiagram/.test(e),"detector"),oi=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(71209);return{id:on,diagram:t}},"loader"),oo={id:on,detector:or,loader:oi},oa="class",ol=(0,r7.__name)((e,t)=>t?.class?.defaultRenderer!=="dagre-wrapper"&&/^\s*classDiagram/.test(e),"detector"),os=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(78922);return{id:oa,diagram:t}},"loader"),ou={id:oa,detector:ol,loader:os},oc="classDiagram",od=(0,r7.__name)((e,t)=>!!/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"||/^\s*classDiagram-v2/.test(e),"detector"),of=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(10404);return{id:oc,diagram:t}},"loader"),op={id:oc,detector:od,loader:of},oh="state",om=(0,r7.__name)((e,t)=>t?.state?.defaultRenderer!=="dagre-wrapper"&&/^\s*stateDiagram/.test(e),"detector"),og=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(81283);return{id:oh,diagram:t}},"loader"),oy={id:oh,detector:om,loader:og},ov="stateDiagram",ob=(0,r7.__name)((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),ox=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(41605);return{id:ov,diagram:t}},"loader"),ok={id:ov,detector:ob,loader:ox},ow="journey",oE=(0,r7.__name)(e=>/^\s*journey/.test(e),"detector"),oS=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(78877);return{id:ow,diagram:t}},"loader"),oC={id:ow,detector:oE,loader:oS},o_={draw:(0,r7.__name)((e,t,n)=>{r7.log.debug("rendering svg for syntax error\n");let r=(0,r4.selectSvgElement)(t),i=r.append("g");r.attr("viewBox","0 0 2412 512"),(0,r8.configureSvgSize)(r,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${n}`)},"draw")},oA={db:{},renderer:o_,parser:{parse:(0,r7.__name)(()=>{},"parse")}},oT="flowchart-elk",oR=(0,r7.__name)((e,t={})=>!!(/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk")&&(t.layout="elk",!0),"detector"),oO=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(28146);return{id:oT,diagram:t}},"loader"),oL={id:oT,detector:oR,loader:oO},oP="timeline",oD=(0,r7.__name)(e=>/^\s*timeline/.test(e),"detector"),oN=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(27415);return{id:oP,diagram:t}},"loader"),oI={id:oP,detector:oD,loader:oN},oM="mindmap",oj=(0,r7.__name)(e=>/^\s*mindmap/.test(e),"detector"),oF=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(44319);return{id:oM,diagram:t}},"loader"),oB={id:oM,detector:oj,loader:oF},oz="kanban",oH=(0,r7.__name)(e=>/^\s*kanban/.test(e),"detector"),oU=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(31376);return{id:oz,diagram:t}},"loader"),oV={id:oz,detector:oH,loader:oU},oq="sankey",o$=(0,r7.__name)(e=>/^\s*sankey(-beta)?/.test(e),"detector"),oW=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(34215);return{id:oq,diagram:t}},"loader"),oK={id:oq,detector:o$,loader:oW},oY="packet",oX=(0,r7.__name)(e=>/^\s*packet(-beta)?/.test(e),"detector"),oJ=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(11980);return{id:oY,diagram:t}},"loader"),oQ={id:oY,detector:oX,loader:oJ},oG="radar",oZ=(0,r7.__name)(e=>/^\s*radar-beta/.test(e),"detector"),o0=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(70234);return{id:oG,diagram:t}},"loader"),o1={id:oG,detector:oZ,loader:o0},o2="block",o4=(0,r7.__name)(e=>/^\s*block(-beta)?/.test(e),"detector"),o6=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(44243);return{id:o2,diagram:t}},"loader"),o5={id:o2,detector:o4,loader:o6},o3="treeView",o9=(0,r7.__name)(e=>/^\s*treeView-beta/.test(e),"detector"),o8=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(51365);return{id:o3,diagram:t}},"loader"),o7={id:o3,detector:o9,loader:o8},ae="architecture",at=(0,r7.__name)(e=>/^\s*architecture/.test(e),"detector"),an=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(46201);return{id:ae,diagram:t}},"loader"),ar={id:ae,detector:at,loader:an},ai="ishikawa",ao=(0,r7.__name)(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),aa=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(48926);return{id:ai,diagram:t}},"loader"),al={id:ai,detector:ao,loader:aa},as="venn",au=(0,r7.__name)(e=>/^\s*venn-beta/.test(e),"detector"),ac=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(81291);return{id:as,diagram:t}},"loader"),ad={id:as,detector:au,loader:ac},af="treemap",ap=(0,r7.__name)(e=>/^\s*treemap/.test(e),"detector"),ah=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(31656);return{id:af,diagram:t}},"loader"),am={id:af,detector:ap,loader:ah},ag="wardley-beta",ay=(0,r7.__name)(e=>/^\s*wardley-beta/i.test(e),"detector"),av=(0,r7.__name)(async()=>{let{diagram:t}=await e.A(22654);return{id:ag,diagram:t}},"loader"),ab={id:ag,detector:ay,loader:av},ax=!1,ak=(0,r7.__name)(()=>{ax||(ax=!0,(0,r8.registerDiagram)("error",oA,e=>"error"===e.toLowerCase().trim()),(0,r8.registerDiagram)("---",{db:{clear:(0,r7.__name)(()=>{},"clear")},styles:{},renderer:{draw:(0,r7.__name)(()=>{},"draw")},parser:{parse:(0,r7.__name)(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:(0,r7.__name)(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),(0,r8.registerLazyLoadedDiagrams)(oL,oB,ar),(0,r8.registerLazyLoadedDiagrams)(iL,oV,op,ou,iz,iY,iG,iZ,ot,oo,iB,iI,oI,iq,ok,oy,oC,i4,oK,oQ,i9,o5,o7,o1,al,am,ad,ab))},"addDiagrams"),aw=(0,r7.__name)(async()=>{r7.log.debug("Loading registered diagrams");let e=(await Promise.allSettled(Object.entries(r8.detectors).map(async([e,{detector:t,loader:n}])=>{if(n)try{(0,r8.getDiagram)(e)}catch{try{let{diagram:e,id:r}=await n();(0,r8.registerDiagram)(r,e,t)}catch(t){throw r7.log.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete r8.detectors[e],t}}}))).filter(e=>"rejected"===e.status);if(e.length>0){for(let t of(r7.log.error(`Failed to load ${e.length} external diagrams`),e))r7.log.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams");function aE(e,t){e.attr("role","graphics-document document"),""!==t&&e.attr("aria-roledescription",t)}function aS(e,t,n,r){if(void 0!==e.insert){if(n){let t=`chart-desc-${r}`;e.attr("aria-describedby",t),e.insert("desc",":first-child").attr("id",t).text(n)}if(t){let n=`chart-title-${r}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}(0,r7.__name)(aE,"setA11yDiagramInfo"),(0,r7.__name)(aS,"addSVGa11yTitleDescription");var aC=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static{(0,r7.__name)(this,"Diagram")}static async fromText(t,n={}){let r=(0,r8.getConfig)(),i=(0,r8.detectType)(t,r);t=(0,r9.encodeEntities)(t)+"\n";try{(0,r8.getDiagram)(i)}catch{let e=(0,r8.getDiagramLoader)(i);if(!e)throw new r8.UnknownDiagramError(`Diagram ${i} not found.`);let{id:t,diagram:n}=await e();(0,r8.registerDiagram)(t,n)}let{db:o,parser:a,renderer:l,init:s}=(0,r8.getDiagram)(i);return a.parser&&(a.parser.yy=o),o.clear?.(),s?.(r),n.title&&o.setDiagramTitle?.(n.title),await a.parse(t),new e(i,t,o,a,l)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},a_=[],aA=(0,r7.__name)(()=>{a_.forEach(e=>{e()}),a_=[]},"attachFunctions"),aT=(0,r7.__name)(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function aR(e){let t=e.match(r8.frontMatterRegex);if(!t)return{text:e,metadata:{}};let n=(0,r6.load)(t[1],{schema:r6.JSON_SCHEMA})??{};n="object"!=typeof n||Array.isArray(n)?{}:n;let r={};return n.displayMode&&(r.displayMode=n.displayMode.toString()),n.title&&(r.title=n.title.toString()),n.config&&(r.config=n.config),{text:e.slice(t[0].length),metadata:r}}(0,r7.__name)(aR,"extractFrontMatter");var aO=(0,r7.__name)(e=>e.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(e,t,n)=>"<"+t+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),aL=(0,r7.__name)(e=>{let{text:t,metadata:n}=aR(e),{displayMode:r,title:i,config:o={}}=n;return r&&(o.gantt||(o.gantt={}),o.gantt.displayMode=r),{title:i,config:o,text:t}},"processFrontmatter"),aP=(0,r7.__name)(e=>{let t=r9.utils_default.detectInit(e)??{},n=r9.utils_default.detectDirective(e,"wrap");return Array.isArray(n)?t.wrap=n.some(({type:e})=>"wrap"===e):n?.type==="wrap"&&(t.wrap=!0),{text:(0,r9.removeDirectives)(e),directive:t}},"processDirectives");function aD(e){let t=aL(aO(e)),n=aP(t.text),r=(0,r9.cleanAndMerge)(t.config,n.directive);return{code:e=aT(n.text),title:t.title,config:r}}function aN(e){return btoa(Array.from(new TextEncoder().encode(e),e=>String.fromCodePoint(e)).join(""))}(0,r7.__name)(aD,"preprocessDiagram"),(0,r7.__name)(aN,"toBase64");var aI=["foreignobject"],aM=["dominant-baseline"];function aj(e){let t=aD(e);return(0,r8.reset)(),(0,r8.addDirective)(t.config??{}),t}async function aF(e,t){ak();try{let{code:t,config:n}=aj(e);return{diagramType:(await aX(t)).type,config:n}}catch(e){if(t?.suppressErrors)return!1;throw e}}(0,r7.__name)(aj,"processAndSetConfigs"),(0,r7.__name)(aF,"parse");var aB=(0,r7.__name)((e,t,n=[])=>`
|
|
2
|
+
.${e} ${t} { ${n.join(" !important; ")} !important; }`,"cssImportantStyles"),az=(0,r7.__name)((e,t=new Map)=>{let n="";if(void 0!==e.themeCSS&&(n+=`
|
|
3
|
+
${e.themeCSS}`),void 0!==e.fontFamily&&(n+=`
|
|
4
|
+
:root { --mermaid-font-family: ${e.fontFamily}}`),void 0!==e.altFontFamily&&(n+=`
|
|
5
|
+
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){let r=(0,r8.getEffectiveHtmlLabels)(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(e=>{(0,iO.default)(e.styles)||r.forEach(t=>{n+=aB(e.id,t,e.styles)}),(0,iO.default)(e.textStyles)||(n+=aB(e.id,"tspan",(e?.textStyles||[]).map(e=>e.replace("color","fill"))))})}return n},"createCssStyles"),aH=(0,r7.__name)((e,t,n,r)=>{var i,o,a;let l=az(e,n),s=(0,r8.styles_default)(t,l,{...e.themeVariables,theme:e.theme,look:e.look},r);return iA((a=function e(t,n,r,i,o,a,l,s,u){for(var c,d,f,p,h,m,g=0,y=0,v=l,b=0,x=0,k=0,w=1,E=1,S=1,C=0,_="",A=o,T=a,R=i,O=_;E;)switch(k=C,C=ik()){case 40:if(108!=k&&58==iu(O,v-1)){-1!=(h=O+=is(iS(C),"&","&\f"),m=ia(g?s[g-1]:0),h.indexOf("&\f",m))&&(S=-1);break}case 34:case 39:case 91:O+=iS(C);break;case 9:case 10:case 13:case 32:O+=function(e){for(;iv=iw();)if(iv<33)ik();else break;return iE(e)>2||iE(iv)>3?"":" "}(k);break;case 92:O+=function(e,t){for(var n;--t&&ik()&&!(iv<48)&&!(iv>102)&&(!(iv>57)||!(iv<65))&&(!(iv>70)||!(iv<97)););return n=iy+(t<6&&32==iw()&&32==ik()),ic(ib,e,n)}(iy-1,7);continue;case 47:switch(iw()){case 42:case 47:ip((c=function(e,t){for(;ik();)if(e+iv===57)break;else if(e+iv===84&&47===iw())break;return"/*"+ic(ib,t,iy-1)+"*"+il(47===e?e:ik())}(ik(),iy),d=n,f=r,p=u,ix(c,d,f,ir,il(iv),ic(c,2,-2),0,p)),u),(5==iE(k||1)||5==iE(iw()||1))&&id(O)&&" "!==ic(O,-1,void 0)&&(O+=" ");break;default:O+="/"}break;case 123*w:s[g++]=id(O)*S;case 125*w:case 59:case 0:switch(C){case 0:case 125:E=0;case 59+y:-1==S&&(O=is(O,/\f/g,"")),x>0&&(id(O)-v||0===w&&47===k)&&ip(x>32?i_(O+";",i,r,v-1,u):i_(is(O," ","")+";",i,r,v-2,u),u);break;case 59:O+=";";default:if(ip(R=iC(O,n,r,g,y,o,s,_,A=[],T=[],v,a),a),123===C)if(0===y)e(O,n,R,R,A,a,v,s,T);else{switch(b){case 99:if(110===iu(O,3))break;case 108:if(97===iu(O,2))break;default:y=0;case 100:case 109:case 115:}y?e(t,R,R,i&&ip(iC(t,R,R,0,0,o,s,_,o,A=[],v,T),T),o,T,v,s,i?A:T):e(O,R,R,R,[""],T,0,s,T)}}g=y=x=0,w=S=1,_=O="",v=l;break;case 58:v=1+id(O),x=k;default:if(w<1){if(123==C)--w;else if(125==C&&0==w++&&125==(iv=iy>0?iu(ib,--iy):0,im--,10===iv&&(im=1,ih--),iv))continue}switch(O+=il(C),C*w){case 38:S=y>0?1:(O+="\f",-1);break;case 44:s[g++]=(id(O)-1)*S,S=1;break;case 64:45===iw()&&(O+=iS(ik())),b=iw(),y=v=id(_=O+=function(e){for(;!iE(iw());)ik();return ic(ib,e,iy)}(iy)),C++;break;case 45:45===k&&2==id(O)&&(w=0)}}return a}("",null,null,null,[""],(o=i=`${r}{${s}}`,ih=im=1,ig=id(ib=o),iy=0,i=[]),0,[0],i),ib="",a),iT)},"createUserStyles"),aU=(0,r7.__name)((e="",t,n)=>{let r=e;return n||t||(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),r=(r=(0,r9.decodeEntities)(r)).replace(/<br>/g,"<br/>")},"cleanUpSvgCode"),aV=(0,r7.__name)((e="",t)=>{let n=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":"100%",r=aN(`<body style="margin:0">${e}</body>`);return`<iframe style="width:100%;height:${n};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${r}" sandbox="allow-top-navigation-by-user-activation allow-popups">
|
|
6
|
+
The "iframe" tag is not supported by your browser.
|
|
7
|
+
</iframe>`},"putIntoIFrame"),aq=(0,r7.__name)((e,t,n,r,i)=>{let o=e.append("div");o.attr("id",n),r&&o.attr("style",r);let a=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return i&&a.attr("xmlns:xlink",i),a.append("g"),e},"appendDivSvgG");function a$(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,r7.__name)(a$,"sandboxedIframe");var aW=(0,r7.__name)((e,t,n,r)=>{e.getElementById(t)?.remove(),e.getElementById(n)?.remove(),e.getElementById(r)?.remove()},"removeExistingElements"),aK=(0,r7.__name)(async function(e,t,n){let r,i;ak();let o=aj(t);t=o.code;let a=(0,r8.getConfig)();r7.log.debug(a),t.length>(a?.maxTextSize??5e4)&&(t="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let l="#"+e,s="i"+e,u="#"+s,c="d"+e,d="#"+c,f=(0,r7.__name)(()=>{let e=h?u:d,t=(0,it.select)(e).node();t&&"remove"in t&&t.remove()},"removeTempElements"),p=(0,it.select)("body"),h="sandbox"===a.securityLevel,m="loose"===a.securityLevel,g=a.fontFamily;if(void 0!==n){if(n&&(n.innerHTML=""),h){let e=a$((0,it.select)(n),s);(p=(0,it.select)(e.nodes()[0].contentDocument.body)).node().style.margin=0}else p=(0,it.select)(n);aq(p,e,c,`font-family: ${g}`,"http://www.w3.org/1999/xlink")}else{if(aW(document,e,c,s),h){let e=a$((0,it.select)("body"),s);(p=(0,it.select)(e.nodes()[0].contentDocument.body)).node().style.margin=0}else p=(0,it.select)("body");aq(p,e,c)}try{r=await aC.fromText(t,{title:o.title})}catch(e){if(a.suppressErrorRendering)throw f(),e;r=await aC.fromText("error"),i=e}let y=p.select(d).node(),v=r.type,b=y.firstChild,x=b.firstChild,k=aH(a,v,r.renderer.getClasses?.(t,r),l),w=document.createElement("style");w.innerHTML=k,b.insertBefore(w,x);try{await r.renderer.draw(t,e,"11.14.0",r)}catch(n){throw a.suppressErrorRendering?f():o_.draw(t,e,"11.14.0"),n}aJ(v,p.select(`${d} svg`),r.db.getAccTitle?.(),r.db.getAccDescription?.()),p.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let E=p.select(d).node().innerHTML;if(r7.log.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),E=aU(E,h,(0,r8.evaluate)(a.arrowMarkerAbsolute)),h?E=aV(E,p.select(d+" svg").node()):m||(E=iR.default.sanitize(E,{ADD_TAGS:aI,ADD_ATTR:aM,HTML_INTEGRATION_POINTS:{foreignobject:!0}})),aA(),i)throw i;return f(),{diagramType:v,svg:E,bindFunctions:r.db.bindFunctions}},"render");function aY(e={}){let t=(0,r8.assignWithDepth_default)({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),(0,r8.saveConfigFromInitialize)(t),t?.theme&&t.theme in r8.themes_default?t.themeVariables=r8.themes_default[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=r8.themes_default.default.getThemeVariables(t.themeVariables));let n="object"==typeof t?(0,r8.setSiteConfig)(t):(0,r8.getSiteConfig)();(0,r7.setLogLevel)(n.logLevel),ak()}(0,r7.__name)(aY,"initialize");var aX=(0,r7.__name)((e,t={})=>{let{code:n}=aD(e);return aC.fromText(n,t)},"getDiagramFromText");function aJ(e,t,n,r){aE(t,e),aS(t,n,r,t.attr("id"))}(0,r7.__name)(aJ,"addA11yInfo");var aQ=Object.freeze({render:aK,parse:aF,getDiagramFromText:aX,initialize:aY,getConfig:r8.getConfig,setConfig:r8.setConfig,getSiteConfig:r8.getSiteConfig,updateSiteConfig:r8.updateSiteConfig,reset:(0,r7.__name)(()=>{(0,r8.reset)()},"reset"),globalReset:(0,r7.__name)(()=>{(0,r8.reset)(r8.defaultConfig)},"globalReset"),defaultConfig:r8.defaultConfig});(0,r7.setLogLevel)((0,r8.getConfig)().logLevel),(0,r8.reset)((0,r8.getConfig)());var aG=(0,r7.__name)((e,t,n)=>{r7.log.warn(e),(0,r9.isDetailedError)(e)?(n&&n(e.str,e.hash),t.push({...e,message:e.str,error:e})):(n&&n(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),aZ=(0,r7.__name)(async function(e={querySelector:".mermaid"}){try{await a0(e)}catch(t){if((0,r9.isDetailedError)(t)&&r7.log.error(t.str),ln.parseError&&ln.parseError(t),!e.suppressErrors)throw r7.log.error("Use the suppressErrors option to suppress these errors"),t}},"run"),a0=(0,r7.__name)(async function({postRenderCallback:e,querySelector:t,nodes:n}={querySelector:".mermaid"}){let r,i,o=aQ.getConfig();if(r7.log.debug(`${!e?"No ":""}Callback function found`),n)r=n;else if(t)r=document.querySelectorAll(t);else throw Error("Nodes and querySelector are both undefined");r7.log.debug(`Found ${r.length} diagrams`),o?.startOnLoad!==void 0&&(r7.log.debug("Start On Load: "+o?.startOnLoad),aQ.updateSiteConfig({startOnLoad:o?.startOnLoad}));let a=new r9.utils_default.InitIDGenerator(o.deterministicIds,o.deterministicIDSeed),l=[];for(let t of Array.from(r)){if(r7.log.info("Rendering diagram: "+t.id),t.getAttribute("data-processed"))continue;t.setAttribute("data-processed","true");let n=`mermaid-${a.next()}`;i=t.innerHTML,i=(0,ie.dedent)(r9.utils_default.entityDecode(i)).trim().replace(/<br\s*\/?>/gi,"<br/>");let r=r9.utils_default.detectInit(i);r&&r7.log.debug("Detected early reinit: ",r);try{let{svg:r,bindFunctions:o}=await le(n,i,t);t.innerHTML=r,e&&await e(n),o&&o(t)}catch(e){aG(e,l,ln.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),a1=(0,r7.__name)(function(e){aQ.initialize(e)},"initialize"),a2=(0,r7.__name)(async function(e,t,n){r7.log.warn("mermaid.init is deprecated. Please use run instead."),e&&a1(e);let r={postRenderCallback:n,querySelector:".mermaid"};"string"==typeof t?r.querySelector=t:t&&(t instanceof HTMLElement?r.nodes=[t]:r.nodes=t),await aZ(r)},"init"),a4=(0,r7.__name)(async(e,{lazyLoad:t=!0}={})=>{ak(),(0,r8.registerLazyLoadedDiagrams)(...e),!1===t&&await aw()},"registerExternalDiagrams"),a6=(0,r7.__name)(function(){if(ln.startOnLoad){let{startOnLoad:e}=aQ.getConfig();e&&ln.run().catch(e=>r7.log.error("Mermaid failed to initialize",e))}},"contentLoaded");"u">typeof document&&window.addEventListener("load",a6,!1);var a5=(0,r7.__name)(function(e){ln.parseError=e},"setParseErrorHandler"),a3=[],a9=!1,a8=(0,r7.__name)(async()=>{if(!a9){for(a9=!0;a3.length>0;){let e=a3.shift();if(e)try{await e()}catch(e){r7.log.error("Error executing queue",e)}}a9=!1}},"executeQueue"),a7=(0,r7.__name)(async(e,t)=>new Promise((n,r)=>{let i=(0,r7.__name)(()=>new Promise((i,o)=>{aQ.parse(e,t).then(e=>{i(e),n(e)},e=>{r7.log.error("Error parsing",e),ln.parseError?.(e),o(e),r(e)})}),"performCall");a3.push(i),a8().catch(r)}),"parse"),le=(0,r7.__name)((e,t,n)=>new Promise((r,i)=>{let o=(0,r7.__name)(()=>new Promise((o,a)=>{aQ.render(e,t,n).then(e=>{o(e),r(e)},e=>{r7.log.error("Error parsing",e),ln.parseError?.(e),a(e),i(e)})}),"performCall");a3.push(o),a8().catch(i)}),"render"),lt=(0,r7.__name)(()=>Object.keys(r8.detectors).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),ln={startOnLoad:!0,mermaidAPI:aQ,parse:a7,render:le,init:a2,run:aZ,registerExternalDiagrams:a4,registerLayoutLoaders:r5.registerLayoutLoaders,initialize:a1,parseError:void 0,contentLoaded:a6,setParseErrorHandler:a5,detectType:r8.detectType,registerIconPacks:r3.registerIconPacks,getRegisteredDiagramsMetadata:lt};function lr({code:e}){let t=(0,m.useRef)(null),[n,r]=(0,m.useState)(null),i=(0,m.useId)().replace(/:/g,"-");return((0,m.useEffect)(()=>{let n=!1;return async function(){if(t.current)try{let{svg:o}=await ln.render(`mermaid-${i}`,e);!n&&t.current&&(t.current.innerHTML=o,r(null))}catch(e){n||r(e instanceof Error?e.message:"Mermaid rendering failed")}}(),()=>{n=!0}},[e,i]),n)?(0,h.jsxs)("div",{className:"p-3 border border-destructive/50 rounded-md bg-destructive/10 text-destructive text-xs",children:[(0,h.jsx)("p",{className:"font-medium mb-1",children:"Mermaid Error"}),(0,h.jsx)("pre",{className:"whitespace-pre-wrap",children:n})]}):(0,h.jsx)("div",{ref:t,className:"my-2 overflow-x-auto"})}ln.initialize({startOnLoad:!1,theme:"default",securityLevel:"loose"});let li={code:e=>{let{className:t,children:n}=e,r=/language-(\w+)/.exec(t||""),i=r?r[1]:"",o=String(n).replace(/\n$/,""),a=t&&t.startsWith("language-");return"mermaid"===i&&o?(0,h.jsx)(lr,{code:o}):a&&o?(0,h.jsx)(r2,{language:i,code:o,children:n}):(0,h.jsx)("code",{...e,children:n})},a:({href:e,children:t})=>(0,h.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-0.5 text-primary hover:underline break-all",children:[t,(0,h.jsx)(rG,{className:"inline-block flex-shrink-0",style:{width:"1em",height:"1em"}})]}),table:({children:e})=>(0,h.jsx)("div",{className:"overflow-x-auto my-2 w-fit max-w-full",children:(0,h.jsx)("table",{className:"border-collapse border border-border rounded-lg overflow-hidden text-xs",children:e})}),thead:({children:e})=>(0,h.jsx)("thead",{className:"bg-accent",children:e}),tbody:({children:e})=>(0,h.jsx)("tbody",{children:e}),tr:({children:e})=>(0,h.jsx)("tr",{children:e}),th:({children:e})=>(0,h.jsx)("th",{className:"border border-border px-3 py-2 text-left font-semibold",children:e}),td:({children:e})=>(0,h.jsx)("td",{className:"border border-border px-3 py-2",children:e})};var lo=e.i(627),la=e.i(37870),ll=e.i(85699);let ls=()=>({loading:(e,t)=>{let n=crypto.randomUUID();return ll.toast.loading(e,{id:n,description:t,duration:1/0}),n},success:(e,t,n)=>{if(e)return ll.toast.success(t,{id:e,description:n,duration:5e3}),e;{let e=crypto.randomUUID();return ll.toast.success(t,{id:e,description:n,duration:5e3}),e}},error:(e,t,n)=>{if(e)return ll.toast.error(t,{id:e,description:n,duration:1/0}),e;{let e=crypto.randomUUID();return ll.toast.error(t,{id:e,description:n,duration:1/0}),e}},info:(e,t)=>{let n=crypto.randomUUID();return ll.toast.info(e,{id:n,description:t,duration:5e3}),n},dismiss:e=>{ll.toast.dismiss(e)}});e.s(["useToast",0,ls],76165);var lu=e.i(68995);let lc=(0,rQ.default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);var ld=e.i(37727);e.s([],93742),e.i(93742);var lf=e.i(66196),lp=e.i(58509),lh=e.i(33605),lm=e.i(89633),lg=e.i(26665),ly=e.i(51665),lv=e.i(6157);e.i(47167);var lb=e.i(67805);let lx=m.createContext(void 0);function lk(e){let t=m.useContext(lx);if(void 0===t&&!e)throw Error((0,lb.default)(47));return t}var lw=e.i(74080),lE=e.i(98263),lS=e.i(83921),lC=e.i(66745),l_=e.i(30628),lA=e.i(94365),lT=e.i(3404),lR=e.i(628),lO=e.i(69375),lL=e.i(7335);let lP={...lR.popupStoreSelectors,disabled:(0,lS.createSelector)(e=>e.disabled),instantType:(0,lS.createSelector)(e=>e.instantType),openMethod:(0,lS.createSelector)(e=>e.openMethod),openChangeReason:(0,lS.createSelector)(e=>e.openChangeReason),modal:(0,lS.createSelector)(e=>e.modal),stickIfOpen:(0,lS.createSelector)(e=>e.stickIfOpen),titleElementId:(0,lS.createSelector)(e=>e.titleElementId),descriptionElementId:(0,lS.createSelector)(e=>e.descriptionElementId),openOnHover:(0,lS.createSelector)(e=>e.openOnHover),closeDelay:(0,lS.createSelector)(e=>e.closeDelay),hasViewport:(0,lS.createSelector)(e=>e.hasViewport)};class lD extends lE.ReactStore{constructor(e){const t={...(0,lR.createInitialPopupStoreState)(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1,...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:m.createRef(),backdropRef:m.createRef(),internalBackdropRef:m.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:m.createRef(),beforeContentFocusGuardRef:m.createRef(),stickIfOpenTimeout:new lC.Timeout,triggerElements:new lO.PopupTriggerMap},lP)}setOpen=(e,t)=>{let n=t.reason===lT.REASONS.triggerHover,r=t.reason===lT.REASONS.triggerPress&&0===t.event.detail,i=!e&&(t.reason===lT.REASONS.escapeKey||null==t.reason);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let o={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger},a=this.state.floatingRootContext.context.events;a?.emit("openchange",o);let l=()=>{let n={open:e,openChangeReason:t.reason},r=t.trigger?.id??null;(r||e)&&(n.activeTriggerId=r,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(lL.PATIENT_CLICK_THRESHOLD,()=>{this.set("stickIfOpen",!1)}),lw.flushSync(l)):l(),r||i?this.set("instantType",r?"click":"dismiss"):t.reason===lT.REASONS.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){let n=(0,l_.useRefWithInit)(()=>new lD(t)).current,r=e??n;return(0,lA.useOnMount)(n.disposeEffect),r}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}var lN=e.i(5963),lI=e.i(58642),lM=e.i(50091);function lj({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:o,modal:a=!1,handle:l,triggerId:s,defaultTriggerId:u=null}=e,c=lD.useStore(l?.store,{modal:a,open:r,openProp:n,activeTriggerId:u,triggerIdProp:s});(0,lp.useOnFirstRender)(()=>{void 0===n&&!1===c.state.open&&!0===r&&c.update({open:!0,activeTriggerId:u})}),c.useControlledProp("openProp",n),c.useControlledProp("triggerIdProp",s);let d=c.useState("open"),f=c.useState("positionerElement"),p=c.useState("payload"),g=c.useState("openChangeReason");c.useContextCallback("onOpenChange",i),c.useContextCallback("onOpenChangeComplete",o);let{openMethod:y,triggerProps:v}=(0,lM.useOpenInteractionType)(d);(0,lI.useImplicitActiveTrigger)(c);let{forceUnmount:b}=(0,lI.useOpenStateTransitions)(d,c,()=>{c.update({stickIfOpen:!0,openChangeReason:null})});(0,lf.useScrollLock)(d&&!0===a&&g!==lT.REASONS.triggerHover&&"touch"!==y,f),m.useEffect(()=>{d||c.context.stickIfOpenTimeout.clear()},[c,d]);let x=m.useCallback(e=>{let t=(0,lN.createChangeEventDetails)(e);return t.preventUnmountOnClose=()=>{c.set("preventUnmountingOnClose",!0)},t},[c]),k=m.useCallback(()=>{c.setOpen(!1,x(lT.REASONS.imperativeAction))},[c,x]);m.useImperativeHandle(e.actionsRef,()=>({unmount:b,close:k}),[b,k]);let w=(0,lv.useSyncedFloatingRootContext)({popupStore:c,onOpenChange:c.setOpen}),E=(0,lh.useDismiss)(w,{outsidePressEvent:{mouse:"trap-focus"===a?"sloppy":"intentional",touch:"sloppy"}}),S=(0,lg.useRole)(w),{getReferenceProps:C,getFloatingProps:_,getTriggerProps:A}=(0,lm.useInteractions)([E,S]),T=m.useMemo(()=>C(v),[C,v]),R=m.useMemo(()=>A(v),[A,v]),O=m.useMemo(()=>_(),[_]);c.useSyncedValues({modal:a,openMethod:y,activeTriggerProps:T,inactiveTriggerProps:R,popupProps:O,floatingRootContext:w,nested:null!=(0,ly.useFloatingParentNodeId)()});let L=m.useMemo(()=>({store:c}),[c]);return(0,h.jsx)(lx.Provider,{value:L,children:"function"==typeof t?t({payload:p}):t})}var lF=e.i(76477),lB=e.i(91730),lz=e.i(83590),lH=e.i(27601),lU=e.i(29315),lV=e.i(47857),lq=e.i(87612);let l$=.1*.1;function lW(e,t,n,r,i,o){return r>=t!=o>=t&&e<=(i-n)*(t-r)/(o-r)+n}function lK(e,t,n,r,i,o,a,l,s,u){let c=!1;return lW(e,t,n,r,i,o)&&(c=!c),lW(e,t,i,o,a,l)&&(c=!c),lW(e,t,a,l,s,u)&&(c=!c),lW(e,t,s,u,n,r)&&(c=!c),c}function lY(e,t,n,r,i,o){let a=Math.min(n,i),l=Math.max(n,i),s=Math.min(r,o),u=Math.max(r,o);return e>=a&&e<=l&&t>=s&&t<=u}function lX(e={}){let{blockPointerEvents:t=!1}=e,n=new lC.Timeout,r=({x:e,y:t,placement:r,elements:i,onClose:o,nodeId:a,tree:l})=>{let s=r?.split("-")[0],u=!1,c=null,d=null,f="u">typeof performance?performance.now():0;return function(r){n.clear();let p=i.domReference,h=i.floating;if(!p||!h||null==s||null==e||null==t)return;let{clientX:m,clientY:g}=r,y=(0,lV.getTarget)(r),v="mouseleave"===r.type,b=(0,lV.contains)(h,y),x=(0,lV.contains)(p,y);if(b&&(u=!0,!v))return;if(x&&(u=!1,!v)){u=!0;return}if(v&&(0,lU.isElement)(r.relatedTarget)&&(0,lV.contains)(h,r.relatedTarget))return;function k(){return!!(l&&(0,lq.getNodeChildren)(l.nodesRef.current,a).length>0)}function w(){k()||(n.clear(),o())}if(k())return;let E=p.getBoundingClientRect(),S=h.getBoundingClientRect(),C=e>S.right-S.width/2,_=t>S.bottom-S.height/2,A=S.width>E.width,T=S.height>E.height,R=(A?E:S).left,O=(A?E:S).right,L=(T?E:S).top,P=(T?E:S).bottom;if("top"===s&&t>=E.bottom-1||"bottom"===s&&t<=E.top+1||"left"===s&&e>=E.right-1||"right"===s&&e<=E.left+1)return void w();let D=!1;switch(s){case"top":D=lY(m,g,R,E.top+1,O,S.bottom-1);break;case"bottom":D=lY(m,g,R,S.top+1,O,E.bottom-1);break;case"left":D=lY(m,g,S.right-1,P,E.left+1,L);break;case"right":D=lY(m,g,E.right-1,P,S.left+1,L)}if(D)return;if(u&&(!(m>=E.x)||!(m<=E.x+E.width)||!(g>=E.y)||!(g<=E.y+E.height))||!v&&function(e,t){let n=performance.now(),r=n-f;if(null===c||null===d||0===r)return c=e,d=t,f=n,!1;let i=e-c,o=t-d;return c=e,d=t,f=n,i*i+o*o<r*r*l$}(m,g))return void w();let N=!1;switch(s){case"top":{let n=A?.25:2,r=t+.5+1,i=C||A?S.bottom-.5:S.top,o=C?A?S.bottom-.5:S.top:S.bottom-.5;N=lK(m,g,A||C?e+n:e-n,r,A?e-n:C?e+n:e-n,r,S.left,i,S.right,o);break}case"bottom":{let n=A?.25:2,r=t-.5,i=C||A?S.top+.5:S.bottom,o=C?A?S.top+.5:S.bottom:S.top+.5;N=lK(m,g,A||C?e+n:e-n,r,A?e-n:C?e+n:e-n,r,S.left,i,S.right,o);break}case"left":{let n=T?.25:2,r=e+.5+1,i=_||T?S.right-.5:S.left,o=_?T?S.right-.5:S.left:S.right-.5;N=lK(m,g,i,S.top,o,S.bottom,r,T||_?t+n:t-n,r,T?t-n:_?t+n:t-n);break}case"right":{let n=T?.25:2,r=e-.5,i=_||T?S.left+.5:S.right,o=_?T?S.left+.5:S.right:S.left+.5;N=lK(m,g,r,T||_?t+n:t-n,r,T?t-n:_?t+n:t-n,i,S.top,o,S.bottom)}}N?u||n.start(40,w):w()}};return r.__options={blockPointerEvents:t},r}e.s(["safePolygon",0,lX],37287);var lJ=e.i(4012),lQ=e.i(231),lG=e.i(90219),lZ=e.i(82033),l0=e.i(494);let l1=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${l0.TYPEABLE_SELECTOR}`;class l2{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 lC.Timeout,this.restTimeout=new lC.Timeout,this.handleCloseOptions=void 0}static create(){return new l2}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}function l4(e){e.performedPointerEventsMutation&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null)}function l6(e){let t=(0,l_.useRefWithInit)(l2.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),(0,lA.useOnMount)(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function l5(e,t,n){let r=null==n||(0,lZ.isMouseLikePointerType)(n)?"function"==typeof e?e():e:0;return"number"==typeof r?r:r?.[t]}function l3(e){return"function"==typeof e?e():e}function l9(e,t){return t||"click"===e||"mousedown"===e}let l8={current:null};function l7(e,t={}){let n="rootStore"in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:o=!0,delay:a=0,handleClose:l=null,mouseOnly:s=!1,restMs:u=0,move:c=!0,triggerElementRef:d=l8,externalTree:f,isActiveTrigger:p=!0,getHandleCloseContext:h}=t,g=(0,ly.useFloatingTree)(f),y=l6(n),v=(0,lQ.useValueAsRef)(l),b=(0,lQ.useValueAsRef)(a),x=(0,lQ.useValueAsRef)(u),k=(0,lQ.useValueAsRef)(o);p&&(y.handleCloseOptions=v.current?.__options);let w=(0,lF.useStableCallback)(()=>l9(r.current.openEvent?.type,y.interactedInside)),E=(0,lF.useStableCallback)(e=>(0,lV.isTargetInsideEnabledTrigger)(e,n.context.triggerElements)),S=(0,lF.useStableCallback)((e,t,r)=>{let i=n.context.triggerElements;return i.hasElement(t)?!e||!(0,lV.contains)(e,t):!!(0,lU.isElement)(r)&&i.hasMatchingElement(e=>(0,lV.contains)(e,r))&&(!e||!(0,lV.contains)(e,r))}),C=m.useCallback((e,t=!0)=>{let r=l5(b.current,"close",y.pointerType);r?y.openChangeTimeout.start(r,()=>{n.setOpen(!1,(0,lN.createChangeEventDetails)(lT.REASONS.triggerHover,e)),g?.events.emit("floating.closed",e)}):t&&(y.openChangeTimeout.clear(),n.setOpen(!1,(0,lN.createChangeEventDetails)(lT.REASONS.triggerHover,e)),g?.events.emit("floating.closed",e))},[b,n,y,g]),_=(0,lF.useStableCallback)(()=>{y.handler&&((0,lG.ownerDocument)(n.select("domReferenceElement")).removeEventListener("mousemove",y.handler),y.handler=void 0)});m.useEffect(()=>_,[_]);let A=(0,lF.useStableCallback)(()=>{l4(y)});return m.useEffect(()=>{if(o)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){e.open||(_(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}},[o,i,y,_]),m.useEffect(()=>{if(!o)return;let e=d.current??(p?n.select("domReferenceElement"):null);if((0,lU.isElement)(e))return c&&e.addEventListener("mousemove",t,{once:!0}),e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",i),()=>{c&&e.removeEventListener("mousemove",t),e.removeEventListener("mouseenter",t),e.removeEventListener("mouseleave",i)};function t(e){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,s&&!(0,lZ.isMouseLikePointerType)(y.pointerType)||l3(x.current)>0&&!l5(b.current,"open"))return;let t=l5(b.current,"open",y.pointerType),r=e.currentTarget??null,i=n.select("domReferenceElement"),o=null!=r&&S(i,r,e.target),a=n.select("open"),l=!a||o;o&&a?n.setOpen(!0,(0,lN.createChangeEventDetails)(lT.REASONS.triggerHover,e,r)):t?y.openChangeTimeout.start(t,()=>{l&&n.setOpen(!0,(0,lN.createChangeEventDetails)(lT.REASONS.triggerHover,e,r))}):l&&n.setOpen(!0,(0,lN.createChangeEventDetails)(lT.REASONS.triggerHover,e,r))}function i(e){if(w())return void A();_();let t=n.select("domReferenceElement"),i=(0,lG.ownerDocument)(t);y.restTimeout.clear(),y.restTimeoutPending=!1;let o=r.current.floatingContext??h?.();if(!E(e.relatedTarget)){if(v.current&&o){n.select("open")||y.openChangeTimeout.clear();let t=d.current;y.handler=v.current({...o,tree:g,x:e.clientX,y:e.clientY,onClose(){A(),_(),k.current&&!w()&&t===n.select("domReferenceElement")&&C(e,!0)}}),i.addEventListener("mousemove",y.handler),y.handler(e);return}"touch"===y.pointerType&&(0,lV.contains)(n.select("floatingElement"),e.relatedTarget)||C(e)}}},[_,A,r,b,C,n,o,v,y,p,S,w,E,s,c,x,d,g,k,h]),m.useMemo(()=>{if(o)return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,r=e.currentTarget,i=n.select("domReferenceElement"),o=n.select("open"),a=S(i,r,e.target);if(s&&!(0,lZ.isMouseLikePointerType)(y.pointerType))return;let l=l3(x.current);function u(){if(y.restTimeoutPending=!1,w())return;let e=n.select("open");y.blockMouseMove||e&&!a||n.setOpen(!0,(0,lN.createChangeEventDetails)(lT.REASONS.triggerHover,t,r))}(!o||a)&&0!==l&&(!a&&y.restTimeoutPending&&e.movementX**2+e.movementY**2<2||(y.restTimeout.clear(),"touch"===y.pointerType?lw.flushSync(()=>{u()}):a&&o?u():(y.restTimeoutPending=!0,y.restTimeout.start(l,u))))}};function e(e){y.pointerType=e.pointerType}},[o,y,w,S,s,n,x])}e.s(["useHoverReferenceInteraction",0,l7],97254);var se=e.i(89879),st=e.i(72408),sn=e.i(59266);let sr=m.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:o=!0,handle:a,payload:l,openOnHover:s=!1,delay:u=300,closeDelay:c=0,id:d,...f}=e,p=lk(!0),g=a?.store??p?.store;if(!g)throw Error((0,lb.default)(74));let y=(0,se.useBaseUiId)(d),v=g.useState("isTriggerActive",y),b=g.useState("floatingRootContext"),x=g.useState("isOpenedByTrigger",y),k=m.useRef(null),{registerTrigger:w,isMountedByThisTrigger:E}=(0,lI.useTriggerDataForwarding)(y,k,g,{payload:l,disabled:i,openOnHover:s,closeDelay:c}),S=g.useState("openChangeReason"),C=g.useState("stickIfOpen"),_=g.useState("openMethod"),A=l7(b,{enabled:null!=b&&s&&("touch"!==_||S!==lT.REASONS.triggerPress),mouseOnly:!0,move:!1,handleClose:lX(),restMs:u,delay:{close:c},triggerElementRef:k,isActiveTrigger:v}),T=(0,lJ.useClick)(b,{enabled:null!=b,stickIfOpen:C}),R=(0,lm.useInteractions)([T]),O=g.useState("triggerProps",E),{getButtonProps:L,buttonRef:P}=(0,lB.useButton)({disabled:i,native:o}),D=m.useMemo(()=>({open:e=>e&&S===lT.REASONS.triggerPress?lz.pressableTriggerOpenStateMapping.open(e):lz.triggerOpenStateMapping.open(e)}),[S]),N=(0,lH.useRenderElement)("button",e,{state:{disabled:i,open:x},ref:[P,t,w,k],props:[R.getReferenceProps(),A,O,{[lL.CLICK_TRIGGER_IDENTIFIER]:"",id:y},f,L],stateAttributesMapping:D}),I=m.useRef(null),M=(0,lF.useStableCallback)(e=>{lw.flushSync(()=>{g.setOpen(!1,(0,lN.createChangeEventDetails)(lT.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let t=(0,sn.getTabbableBeforeElement)(I.current);t?.focus()}),j=(0,lF.useStableCallback)(e=>{let t=g.select("positionerElement");if(t&&(0,sn.isOutsideEvent)(e,t))g.context.beforeContentFocusGuardRef.current?.focus();else{lw.flushSync(()=>{g.setOpen(!1,(0,lN.createChangeEventDetails)(lT.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let n=(0,sn.getTabbableAfterElement)(g.context.triggerFocusTargetRef.current||k.current);for(;null!==n&&(0,lV.contains)(t,n);){let e=n;if((n=(0,sn.getNextTabbable)(n))===e)break}n?.focus()}});return v?(0,h.jsxs)(m.Fragment,{children:[(0,h.jsx)(st.FocusGuard,{ref:I,onFocus:M}),(0,h.jsx)(m.Fragment,{children:N},y),(0,h.jsx)(st.FocusGuard,{ref:g.context.triggerFocusTargetRef,onFocus:j})]}):(0,h.jsx)(m.Fragment,{children:N},y)});var si=e.i(37692);let so=m.createContext(void 0),sa=m.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=lk();return i.useState("mounted")||n?(0,h.jsx)(so.Provider,{value:n,children:(0,h.jsx)(si.FloatingPortal,{ref:t,...r})}):null});var sl=e.i(58130),ss=e.i(977);let su=m.createContext(void 0);function sc(){let e=m.useContext(su);if(!e)throw Error((0,lb.default)(46));return e}var sd=e.i(43084);function sf(e,t,n){let r,{reference:i,floating:o}=e,a=(0,sd.getSideAxis)(t),l=(0,sd.getAlignmentAxis)(t),s=(0,sd.getAxisLength)(l),u=(0,sd.getSide)(t),c="y"===a,d=i.x+i.width/2-o.width/2,f=i.y+i.height/2-o.height/2,p=i[s]/2-o[s]/2;switch(u){case"top":r={x:d,y:i.y-o.height};break;case"bottom":r={x:d,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:f};break;case"left":r={x:i.x-o.width,y:f};break;default:r={x:i.x,y:i.y}}switch((0,sd.getAlignment)(t)){case"start":r[l]-=p*(n&&c?-1:1);break;case"end":r[l]+=p*(n&&c?-1:1)}return r}async function sp(e,t){var n;void 0===t&&(t={});let{x:r,y:i,platform:o,rects:a,elements:l,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=(0,sd.evaluate)(t,e),h=(0,sd.getPaddingObject)(p),m=l[f?"floating"===d?"reference":"floating":d],g=(0,sd.rectToClientRect)(await o.getClippingRect({element:null==(n=await (null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(l.floating)),boundary:u,rootBoundary:c,strategy:s})),y="floating"===d?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,v=await (null==o.getOffsetParent?void 0:o.getOffsetParent(l.floating)),b=await (null==o.isElement?void 0:o.isElement(v))&&await (null==o.getScale?void 0:o.getScale(v))||{x:1,y:1},x=(0,sd.rectToClientRect)(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:s}):y);return{top:(g.top-x.top+h.top)/b.y,bottom:(x.bottom-g.bottom+h.bottom)/b.y,left:(g.left-x.left+h.left)/b.x,right:(x.right-g.right+h.right)/b.x}}let sh=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:sp},s=await (null==a.isRTL?void 0:a.isRTL(t)),u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=sf(u,r,s),f=r,p=0,h={};for(let n=0;n<o.length;n++){let m=o[n];if(!m)continue;let{name:g,fn:y}=m,{x:v,y:b,data:x,reset:k}=await y({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:u,platform:l,elements:{reference:e,floating:t}});c=null!=v?v:c,d=null!=b?b:d,h[g]={...h[g],...x},k&&p<50&&(p++,"object"==typeof k&&(k.placement&&(f=k.placement),k.rects&&(u=!0===k.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:c,y:d}=sf(u,f,s)),n=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};function sm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function sg(e){return sd.sides.some(t=>e[t]>=0)}let sy=new Set(["left","top"]);async function sv(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),a=(0,sd.getSide)(n),l=(0,sd.getAlignment)(n),s="y"===(0,sd.getSideAxis)(n),u=sy.has(a)?-1:1,c=o&&s?-1:1,d=(0,sd.evaluate)(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),s?{x:p*c,y:f*u}:{x:f*u,y:p*c}}function sb(e){let t=(0,lU.getComputedStyle)(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=(0,lU.isHTMLElement)(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,l=(0,sd.round)(n)!==o||(0,sd.round)(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function sx(e){return(0,lU.isElement)(e)?e:e.contextElement}function sk(e){let t=sx(e);if(!(0,lU.isHTMLElement)(t))return(0,sd.createCoords)(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:o}=sb(t),a=(o?(0,sd.round)(n.width):n.width)/r,l=(o?(0,sd.round)(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}let sw=(0,sd.createCoords)(0);function sE(e){let t=(0,lU.getWindow)(e);return(0,lU.isWebKit)()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:sw}function sS(e,t,n,r){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let o=e.getBoundingClientRect(),a=sx(e),l=(0,sd.createCoords)(1);t&&(r?(0,lU.isElement)(r)&&(l=sk(r)):l=sk(e));let s=(void 0===(i=n)&&(i=!1),r&&(!i||r===(0,lU.getWindow)(a))&&i)?sE(a):(0,sd.createCoords)(0),u=(o.left+s.x)/l.x,c=(o.top+s.y)/l.y,d=o.width/l.x,f=o.height/l.y;if(a){let e=(0,lU.getWindow)(a),t=r&&(0,lU.isElement)(r)?(0,lU.getWindow)(r):r,n=e,i=(0,lU.getFrameElement)(n);for(;i&&r&&t!==n;){let e=sk(i),t=i.getBoundingClientRect(),r=(0,lU.getComputedStyle)(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,c*=e.y,d*=e.x,f*=e.y,u+=o,c+=a,n=(0,lU.getWindow)(i),i=(0,lU.getFrameElement)(n)}}return(0,sd.rectToClientRect)({width:d,height:f,x:u,y:c})}function sC(e,t){let n=(0,lU.getNodeScroll)(e).scrollLeft;return t?t.left+n:sS((0,lU.getDocumentElement)(e)).left+n}function s_(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-sC(e,n),y:n.top+t.scrollTop}}function sA(e,t,n){var r;let i;if("viewport"===t)i=function(e,t){let n=(0,lU.getWindow)(e),r=(0,lU.getDocumentElement)(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,l=0,s=0;if(i){o=i.width,a=i.height;let e=(0,lU.isWebKit)();(!e||e&&"fixed"===t)&&(l=i.offsetLeft,s=i.offsetTop)}let u=sC(r);if(u<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-i);a<=25&&(o-=a)}else u<=25&&(o+=u);return{width:o,height:a,x:l,y:s}}(e,n);else if("document"===t){let t,n,o,a,l,s,u;r=(0,lU.getDocumentElement)(e),t=(0,lU.getDocumentElement)(r),n=(0,lU.getNodeScroll)(r),o=r.ownerDocument.body,a=(0,sd.max)(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=(0,sd.max)(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),s=-n.scrollLeft+sC(r),u=-n.scrollTop,"rtl"===(0,lU.getComputedStyle)(o).direction&&(s+=(0,sd.max)(t.clientWidth,o.clientWidth)-a),i={width:a,height:l,x:s,y:u}}else if((0,lU.isElement)(t)){let e,r,o,a,l,s;r=(e=sS(t,!0,"fixed"===n)).top+t.clientTop,o=e.left+t.clientLeft,a=(0,lU.isHTMLElement)(t)?sk(t):(0,sd.createCoords)(1),l=t.clientWidth*a.x,s=t.clientHeight*a.y,i={width:l,height:s,x:o*a.x,y:r*a.y}}else{let n=sE(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return(0,sd.rectToClientRect)(i)}function sT(e){return"static"===(0,lU.getComputedStyle)(e).position}function sR(e,t){if(!(0,lU.isHTMLElement)(e)||"fixed"===(0,lU.getComputedStyle)(e).position)return null;if(t)return t(e);let n=e.offsetParent;return(0,lU.getDocumentElement)(e)===n&&(n=n.ownerDocument.body),n}function sO(e,t){let n=(0,lU.getWindow)(e);if((0,lU.isTopLayer)(e))return n;if(!(0,lU.isHTMLElement)(e)){let t=(0,lU.getParentNode)(e);for(;t&&!(0,lU.isLastTraversableNode)(t);){if((0,lU.isElement)(t)&&!sT(t))return t;t=(0,lU.getParentNode)(t)}return n}let r=sR(e,t);for(;r&&(0,lU.isTableElement)(r)&&sT(r);)r=sR(r,t);return r&&(0,lU.isLastTraversableNode)(r)&&sT(r)&&!(0,lU.isContainingBlock)(r)?n:r||(0,lU.getContainingBlock)(e)||n}let sL=async function(e){let t=this.getOffsetParent||sO,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=(0,lU.isHTMLElement)(t),i=(0,lU.getDocumentElement)(t),o="fixed"===n,a=sS(e,!0,o,t),l={scrollLeft:0,scrollTop:0},s=(0,sd.createCoords)(0);if(r||!r&&!o)if(("body"!==(0,lU.getNodeName)(t)||(0,lU.isOverflowElement)(i))&&(l=(0,lU.getNodeScroll)(t)),r){let e=sS(t,!0,o,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=sC(i));o&&!r&&i&&(s.x=sC(i));let u=!i||r||o?(0,sd.createCoords)(0):s_(i,l);return{x:a.left+l.scrollLeft-s.x-u.x,y:a.top+l.scrollTop-s.y-u.y,width:a.width,height:a.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},sP={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,o="fixed"===i,a=(0,lU.getDocumentElement)(r),l=!!t&&(0,lU.isTopLayer)(t.floating);if(r===a||l&&o)return n;let s={scrollLeft:0,scrollTop:0},u=(0,sd.createCoords)(1),c=(0,sd.createCoords)(0),d=(0,lU.isHTMLElement)(r);if((d||!d&&!o)&&(("body"!==(0,lU.getNodeName)(r)||(0,lU.isOverflowElement)(a))&&(s=(0,lU.getNodeScroll)(r)),d)){let e=sS(r);u=sk(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}let f=!a||d||o?(0,sd.createCoords)(0):s_(a,s);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-s.scrollTop*u.y+c.y+f.y}},getDocumentElement:lU.getDocumentElement,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,o=[..."clippingAncestors"===n?(0,lU.isTopLayer)(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=(0,lU.getOverflowAncestors)(e,[],!1).filter(e=>(0,lU.isElement)(e)&&"body"!==(0,lU.getNodeName)(e)),i=null,o="fixed"===(0,lU.getComputedStyle)(e).position,a=o?(0,lU.getParentNode)(e):e;for(;(0,lU.isElement)(a)&&!(0,lU.isLastTraversableNode)(a);){let t=(0,lU.getComputedStyle)(a),n=(0,lU.isContainingBlock)(a);n||"fixed"!==t.position||(i=null),(o?n||i:!(!n&&"static"===t.position&&i&&("absolute"===i.position||"fixed"===i.position)||(0,lU.isOverflowElement)(a)&&!n&&function e(t,n){let r=(0,lU.getParentNode)(t);return!(r===n||!(0,lU.isElement)(r)||(0,lU.isLastTraversableNode)(r))&&("fixed"===(0,lU.getComputedStyle)(r).position||e(r,n))}(e,a)))?i=t:r=r.filter(e=>e!==a),a=(0,lU.getParentNode)(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=sA(t,o[0],i),l=a.top,s=a.right,u=a.bottom,c=a.left;for(let e=1;e<o.length;e++){let n=sA(t,o[e],i);l=(0,sd.max)(n.top,l),s=(0,sd.min)(n.right,s),u=(0,sd.min)(n.bottom,u),c=(0,sd.max)(n.left,c)}return{width:s-c,height:u-l,x:c,y:l}},getOffsetParent:sO,getElementRects:sL,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=sb(e);return{width:t,height:n}},getScale:sk,isElement:lU.isElement,isRTL:function(e){return"rtl"===(0,lU.getComputedStyle)(e).direction}};function sD(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function sN(e,t,n,r){let i;void 0===r&&(r={});let{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:u=!1}=r,c=sx(e),d=o||a?[...c?(0,lU.getOverflowAncestors)(c):[],...t?(0,lU.getOverflowAncestors)(t):[]]:[];d.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)});let f=c&&s?function(e,t){let n,r=null,i=(0,lU.getDocumentElement)(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),o();let u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:p}=u;if(l||t(),!f||!p)return;let h={rootMargin:-(0,sd.floor)(d)+"px "+-(0,sd.floor)(i.clientWidth-(c+f))+"px "+-(0,sd.floor)(i.clientHeight-(d+p))+"px "+-(0,sd.floor)(c)+"px",threshold:(0,sd.max)(0,(0,sd.min)(1,s))||1},m=!0;function g(t){let r=t[0].intersectionRatio;if(r!==s){if(!m)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||sD(u,e.getBoundingClientRect())||a(),m=!1}try{r=new IntersectionObserver(g,{...h,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),o}(c,n):null,p=-1,h=null;l&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),c&&!u&&h.observe(c),t&&h.observe(t));let m=u?sS(e):null;return u&&function t(){let r=sS(e);m&&!sD(m,r)&&n(),m=r,i=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=h)||e.disconnect(),h=null,u&&cancelAnimationFrame(i)}}var sI="u">typeof document?m.useLayoutEffect:function(){};function sM(e,t){let n,r,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!sM(e[r],t[r]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){let n=i[r];if(("_owner"!==n||!e.$$typeof)&&!sM(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function sj(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function sF(e,t){let n=sj(e);return Math.round(t*n)/n}function sB(e){let t=m.useRef(e);return sI(()=>{t.current=e}),t}var sz=e.i(83799),sH=e.i(24019);let sU=m.createContext(void 0);function sV(){let e=m.useContext(sU);return e?.direction??"ltr"}e.s(["useDirection",0,sV],79144);let sq={name:"hide",async fn(e){var t,n,r;let i,{width:o,height:a,x:l,y:s}=e.rects.reference,u=await (void 0===(r=t)&&(r={}),{name:(i={name:"hide",options:r,async fn(e){let{rects:t,platform:n}=e,{strategy:i="referenceHidden",...o}=(0,sd.evaluate)(r,e);switch(i){case"referenceHidden":{let r=sm(await n.detectOverflow(e,{...o,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:sg(r)}}}case"escaped":{let r=sm(await n.detectOverflow(e,{...o,altBoundary:!0}),t.floating);return{data:{escapedOffsets:r,escaped:sg(r)}}}default:return{}}}}).name,fn:i.fn,options:[t,n]}).fn(e);return{data:{referenceHidden:u.data?.referenceHidden||0===o&&0===a&&0===l&&0===s}}}};var s$=e.i(33848);let sW={sideX:"left",sideY:"top"},sK={name:"adaptiveOrigin",async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:o,strategy:a,placement:l}=e,s=(0,s$.ownerWindow)(i),u=s.getComputedStyle(i);if("0s"===u.transitionDuration||""===u.transitionDuration)return{x:t,y:n,data:sW};let c=await o.getOffsetParent?.(i),d={width:0,height:0};if("fixed"===a&&s?.visualViewport)d={width:s.visualViewport.width,height:s.visualViewport.height};else if(c===s){let e=(0,lG.ownerDocument)(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await o.isElement?.(c)&&(d=await o.getDimensions(c));let f=(0,sd.getSide)(l),p=t,h=n;return"left"===f&&(p=d.width-(t+r.width)),"top"===f&&(h=d.height-(n+r.height)),{x:p,y:h,data:{sideX:"left"===f?"right":sW.sideX,sideY:"top"===f?"bottom":sW.sideY}}}};function sY(e,t,n){let r="inline-start"===e||"inline-end"===e;return({top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"})[t]}function sX(e,t,n){let{rects:r,placement:i}=e;return{side:sY(t,(0,sd.getSide)(i),n),align:(0,sd.getAlignment)(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function sJ(e){var t,n,r,i,o,a,l,s,u,c,d,f,p,h;let g,y,v,b,{anchor:x,positionMethod:k="absolute",side:w="bottom",sideOffset:E=0,align:S="center",alignOffset:C=0,collisionBoundary:_,collisionPadding:A=5,sticky:T=!1,arrowPadding:R=5,disableAnchorTracking:O=!1,keepMounted:L=!1,floatingRootContext:P,mounted:D,collisionAvoidance:N,shiftCrossAxis:I=!1,nodeId:M,adaptiveOrigin:j,lazyFlip:F=!1,externalTree:B}=e,[z,H]=m.useState(null);D||null===z||H(null);let U=N.side||"flip",V=N.align||"flip",q=N.fallbackAxisSide||"end",$="function"==typeof x?x:void 0,W=(0,lF.useStableCallback)($),K=$?W:x,Y=(0,lQ.useValueAsRef)(x),X="rtl"===sV(),J=z||({top:"top",right:"right",bottom:"bottom",left:"left","inline-end":X?"left":"right","inline-start":X?"right":"left"})[w],Q="center"===S?J:`${J}-${S}`,G=A,Z=+("bottom"===w),ee=+("top"===w),et=+("right"===w),en=+("left"===w);"number"==typeof G?G={top:G+Z,right:G+en,bottom:G+ee,left:G+et}:G&&(G={top:(G.top||0)+Z,right:(G.right||0)+en,bottom:(G.bottom||0)+ee,left:(G.left||0)+et});let er={boundary:"clipping-ancestors"===_?"clippingAncestors":_,padding:G},ei=m.useRef(null),eo=(0,lQ.useValueAsRef)(E),ea=(0,lQ.useValueAsRef)(C),el=[(t=e=>{let t=sX(e,w,X),n="function"==typeof eo.current?eo.current(t):eo.current,r="function"==typeof ea.current?ea.current(t):ea.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},n=["function"!=typeof E?E:0,"function"!=typeof C?C:0,X,w],void 0===(r=t)&&(r=0),{name:(g={name:"offset",options:r,async fn(e){var t,n;let{x:i,y:o,placement:a,middlewareData:l}=e,s=await sv(e,r);return a===(null==(t=l.offset)?void 0:t.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:i+s.x,y:o+s.y,data:{...s,placement:a}}}}).name,fn:g.fn,options:[t,n]})],es="none"===V&&"shift"!==U,eu=!es&&(T||I||"shift"===U),ec="none"===U?null:{name:(y={name:"flip",options:a=i={...er,padding:{top:G.top+1,right:G.right+1,bottom:G.bottom+1,left:G.left+1},mainAxis:!I&&"flip"===U,crossAxis:"flip"===V&&"alignment",fallbackAxisSideDirection:q},async fn(e){var t,n,r,i,o;let{placement:l,middlewareData:s,rects:u,initialPlacement:c,platform:d,elements:f}=e,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...b}=(0,sd.evaluate)(a,e);if(null!=(t=s.arrow)&&t.alignmentOffset)return{};let x=(0,sd.getSide)(l),k=(0,sd.getSideAxis)(c),w=(0,sd.getSide)(c)===c,E=await (null==d.isRTL?void 0:d.isRTL(f.floating)),S=m||(w||!v?[(0,sd.getOppositePlacement)(c)]:(0,sd.getExpandedPlacements)(c)),C="none"!==y;!m&&C&&S.push(...(0,sd.getOppositeAxisPlacements)(c,v,y,E));let _=[c,...S],A=await d.detectOverflow(e,b),T=[],R=(null==(n=s.flip)?void 0:n.overflows)||[];if(p&&T.push(A[x]),h){let e=(0,sd.getAlignmentSides)(l,u,E);T.push(A[e[0]],A[e[1]])}if(R=[...R,{placement:l,overflows:T}],!T.every(e=>e<=0)){let e=((null==(r=s.flip)?void 0:r.index)||0)+1,t=_[e];if(t&&("alignment"!==h||k===(0,sd.getSideAxis)(t)||R.every(e=>(0,sd.getSideAxis)(e.placement)!==k||e.overflows[0]>0)))return{data:{index:e,overflows:R},reset:{placement:t}};let n=null==(i=R.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(g){case"bestFit":{let e=null==(o=R.filter(e=>{if(C){let t=(0,sd.getSideAxis)(e.placement);return t===k||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0];e&&(n=e);break}case"initialPlacement":n=c}if(l!==n)return{reset:{placement:n}}}return{}}}).name,fn:y.fn,options:[i,o]},ed=es?null:(l=e=>{var t,n,r;let i=(0,lG.ownerDocument)(e.elements.floating).documentElement;return{...er,rootBoundary:I?{x:0,y:0,width:i.clientWidth,height:i.clientHeight}:void 0,mainAxis:"none"!==V,crossAxis:eu,limiter:T||I?void 0:{fn:(void 0===(r=t=e=>{if(!ei.current)return{};let{width:t,height:n}=ei.current.getBoundingClientRect(),r=(0,sd.getSideAxis)((0,sd.getSide)(e.placement)),i="y"===r?G.left+G.right:G.top+G.bottom;return{offset:("y"===r?t:n)/2+i/2}})&&(r={}),{options:r,fn(e){let{x:t,y:n,placement:i,rects:o,middlewareData:a}=e,{offset:l=0,mainAxis:s=!0,crossAxis:u=!0}=(0,sd.evaluate)(r,e),c={x:t,y:n},d=(0,sd.getSideAxis)(i),f=(0,sd.getOppositeAxis)(d),p=c[f],h=c[d],m=(0,sd.evaluate)(l,e),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){let e="y"===f?"height":"width",t=o.reference[f]-o.floating[e]+g.mainAxis,n=o.reference[f]+o.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(u){var y,v;let e="y"===f?"width":"height",t=sy.has((0,sd.getSide)(i)),n=o.reference[d]-o.floating[e]+(t&&(null==(y=a.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=o.reference[d]+o.reference[e]+(t?0:(null==(v=a.offset)?void 0:v[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}).fn,options:[t,n]}}},s=[er,T,I,G,V],void 0===(u=l)&&(u={}),{name:(v={name:"shift",options:u,async fn(e){let{x:t,y:n,placement:r,platform:i}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=(0,sd.evaluate)(u,e),c={x:t,y:n},d=await i.detectOverflow(e,s),f=(0,sd.getSideAxis)((0,sd.getSide)(r)),p=(0,sd.getOppositeAxis)(f),h=c[p],m=c[f];if(o){let e="y"===p?"top":"left",t="y"===p?"bottom":"right",n=h+d[e],r=h-d[t];h=(0,sd.clamp)(n,h,r)}if(a){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",n=m+d[e],r=m-d[t];m=(0,sd.clamp)(n,m,r)}let g=l.fn({...e,[p]:h,[f]:m});return{...g,data:{x:g.x-t,y:g.y-n,enabled:{[p]:o,[f]:a}}}}}).name,fn:v.fn,options:[l,s]});"shift"===U||"shift"===V||"center"===S?el.push(ed,ec):el.push(ec,ed),el.push({name:(b={name:"size",options:f=c={...er,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){let i=e.style;i.setProperty("--available-width",`${t}px`),i.setProperty("--available-height",`${n}px`);let o=window.devicePixelRatio||1,{x:a,y:l,width:s,height:u}=r.reference,c=(Math.round((a+s)*o)-Math.round(a*o))/o,d=(Math.round((l+u)*o)-Math.round(l*o))/o;i.setProperty("--anchor-width",`${c}px`),i.setProperty("--anchor-height",`${d}px`)}},async fn(e){var t,n;let r,i,{placement:o,rects:a,platform:l,elements:s}=e,{apply:u=()=>{},...c}=(0,sd.evaluate)(f,e),d=await l.detectOverflow(e,c),p=(0,sd.getSide)(o),h=(0,sd.getAlignment)(o),m="y"===(0,sd.getSideAxis)(o),{width:g,height:y}=a.floating;"top"===p||"bottom"===p?(r=p,i=h===(await (null==l.isRTL?void 0:l.isRTL(s.floating))?"start":"end")?"left":"right"):(i=p,r="end"===h?"top":"bottom");let v=y-d.top-d.bottom,b=g-d.left-d.right,x=(0,sd.min)(y-d[r],v),k=(0,sd.min)(g-d[i],b),w=!e.middlewareData.shift,E=x,S=k;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(S=b),null!=(n=e.middlewareData.shift)&&n.enabled.y&&(E=v),w&&!h){let e=(0,sd.max)(d.left,0),t=(0,sd.max)(d.right,0),n=(0,sd.max)(d.top,0),r=(0,sd.max)(d.bottom,0);m?S=g-2*(0!==e||0!==t?e+t:(0,sd.max)(d.left,d.right)):E=y-2*(0!==n||0!==r?n+r:(0,sd.max)(d.top,d.bottom))}await u({...e,availableWidth:S,availableHeight:E});let C=await l.getDimensions(s.floating);return g!==C.width||y!==C.height?{reset:{rects:!0}}:{}}}).name,fn:b.fn,options:[c,d]},(p=()=>({element:ei.current||document.createElement("div"),padding:R,offsetParent:"floating"}),h=[R],{name:"arrow",options:p,async fn(e){let{x:t,y:n,placement:r,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:s,padding:u=0,offsetParent:c="real"}=(0,sd.evaluate)(p,e)||{};if(null==s)return{};let d=(0,sd.getPaddingObject)(u),f={x:t,y:n},h=(0,sd.getAlignmentAxis)(r),m=(0,sd.getAxisLength)(h),g=await o.getDimensions(s),y="y"===h,v=y?"clientHeight":"clientWidth",b=i.reference[m]+i.reference[h]-f[h]-i.floating[m],x=f[h]-i.reference[h],k="real"===c?await o.getOffsetParent?.(s):a.floating,w=a.floating[v]||i.floating[m];w&&await o.isElement?.(k)||(w=a.floating[v]||i.floating[m]);let E=w/2-g[m]/2-1,S=Math.min(d[y?"top":"left"],E),C=Math.min(d[y?"bottom":"right"],E),_=w-g[m]-C,A=w/2-g[m]/2+(b/2-x/2),T=(0,sd.clamp)(S,A,_),R=!l.arrow&&null!=(0,sd.getAlignment)(r)&&A!==T&&i.reference[m]/2-(A<S?S:C)-g[m]/2<0,O=R?A<S?A-S:A-_:0;return{[h]:f[h]+O,data:{[h]:T,centerOffset:A-T-O,...R&&{alignmentOffset:O}},reset:R}},options:[p,h]}),{name:"transformOrigin",fn(e){let{elements:t,middlewareData:n,placement:r,rects:i,y:o}=e,a=(0,sd.getSide)(r),l=(0,sd.getSideAxis)(a),s=ei.current,u=n.arrow?.x||0,c=n.arrow?.y||0,d=s?.clientWidth||0,f=s?.clientHeight||0,p=u+d/2,h=c+f/2,m=Math.abs(n.shift?.y||0),g=i.reference.height/2,y="function"==typeof E?E(sX(e,w,X)):E,v=m>y,b={top:`${p}px calc(100% + ${y}px)`,bottom:`${p}px ${-y}px`,left:`calc(100% + ${y}px) ${h}px`,right:`${-y}px ${h}px`}[a],x=`${p}px ${i.reference.y+g-o}px`;return t.floating.style.setProperty("--transform-origin",eu&&"y"===l&&v?x:b),{}}},sq,j),(0,ss.useIsoLayoutEffect)(()=>{!D&&P&&P.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[D,P]);let ef=m.useMemo(()=>({elementResize:!O&&"u">typeof ResizeObserver,layoutShift:!O&&"u">typeof IntersectionObserver}),[O]),{refs:ep,elements:eh,x:em,y:eg,middlewareData:ey,update:ev,placement:eb,context:ex,isPositioned:ek,floatingStyles:ew}=function(e={}){let{nodeId:t,externalTree:n}=e,r=function(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=(0,sz.useId)(),o=null!=(0,ly.useFloatingParentNodeId)(),a=(0,l_.useRefWithInit)(()=>new sH.FloatingRootStore({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new lO.PopupTriggerMap,floatingId:i,nested:o,noEmit:!1})).current;return(0,ss.useIsoLayoutEffect)(()=>{let e={open:t,floatingId:i};void 0!==r.reference&&(e.referenceElement=r.reference,e.domReferenceElement=(0,lU.isElement)(r.reference)?r.reference:null),void 0!==r.floating&&(e.floatingElement=r.floating),a.update(e)},[t,i,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=o,a.context.noEmit=!1,a}(e),i=e.rootContext||r,o={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[a,l]=m.useState(null),s=m.useRef(null),u=(0,ly.useFloatingTree)(n);(0,ss.useIsoLayoutEffect)(()=>{o.domReference&&(s.current=o.domReference)},[o.domReference]);let c=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:l=!0,whileElementsMounted:s,open:u}=e,[c,d]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=m.useState(r);sM(f,r)||p(r);let[h,g]=m.useState(null),[y,v]=m.useState(null),b=m.useCallback(e=>{e!==E.current&&(E.current=e,g(e))},[]),x=m.useCallback(e=>{e!==S.current&&(S.current=e,v(e))},[]),k=o||h,w=a||y,E=m.useRef(null),S=m.useRef(null),C=m.useRef(c),_=null!=s,A=sB(s),T=sB(i),R=sB(u),O=m.useCallback(()=>{var e,r;let i,o,a;if(!E.current||!S.current)return;let l={placement:t,strategy:n,middleware:f};T.current&&(l.platform=T.current),(e=E.current,r=S.current,i=new Map,a={...(o={platform:sP,...l}).platform,_c:i},sh(e,r,{...o,platform:a})).then(e=>{let t={...e,isPositioned:!1!==R.current};L.current&&!sM(C.current,t)&&(C.current=t,lw.flushSync(()=>{d(t)}))})},[f,t,n,T,R]);sI(()=>{!1===u&&C.current.isPositioned&&(C.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[u]);let L=m.useRef(!1);sI(()=>(L.current=!0,()=>{L.current=!1}),[]),sI(()=>{if(k&&(E.current=k),w&&(S.current=w),k&&w){if(A.current)return A.current(k,w,O);O()}},[k,w,O,A,_]);let P=m.useMemo(()=>({reference:E,floating:S,setReference:b,setFloating:x}),[b,x]),D=m.useMemo(()=>({reference:k,floating:w}),[k,w]),N=m.useMemo(()=>{let e={position:n,left:0,top:0};if(!D.floating)return e;let t=sF(D.floating,c.x),r=sF(D.floating,c.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...sj(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,D.floating,c.x,c.y]);return m.useMemo(()=>({...c,update:O,refs:P,elements:D,floatingStyles:N}),[c,O,P,D,N])}({...e,elements:{...o,...a&&{reference:a}}}),d=m.useCallback(e=>{let t=(0,lU.isElement)(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;l(t),c.refs.setReference(t)},[c.refs]),[f,p]=m.useState(null),[h,g]=m.useState(null);i.useSyncedValue("referenceElement",f),i.useSyncedValue("domReferenceElement",(0,lU.isElement)(f)?f:null),i.useSyncedValue("floatingElement",h);let y=m.useCallback(e=>{((0,lU.isElement)(e)||null===e)&&(s.current=e,p(e)),((0,lU.isElement)(c.refs.reference.current)||null===c.refs.reference.current||null!==e&&!(0,lU.isElement)(e))&&c.refs.setReference(e)},[c.refs,p]),v=m.useCallback(e=>{g(e),c.refs.setFloating(e)},[c.refs]),b=m.useMemo(()=>({...c.refs,setReference:y,setFloating:v,setPositionReference:d,domReference:s}),[c.refs,y,v,d]),x=m.useMemo(()=>({...c.elements,domReference:o.domReference}),[c.elements,o.domReference]),k=i.useState("open"),w=i.useState("floatingId"),E=m.useMemo(()=>({...c,dataRef:i.context.dataRef,open:k,onOpenChange:i.setOpen,events:i.context.events,floatingId:w,refs:b,elements:x,nodeId:t,rootStore:i}),[c,b,x,t,i,k,w]);return(0,ss.useIsoLayoutEffect)(()=>{i.context.dataRef.current.floatingContext=E;let e=u?.nodesRef.current.find(e=>e.id===t);e&&(e.context=E)}),m.useMemo(()=>({...c,context:E,refs:b,elements:x,rootStore:i}),[c,b,x,E,i])}({rootContext:P,placement:Q,middleware:el,strategy:k,whileElementsMounted:L?void 0:(...e)=>sN(...e,ef),nodeId:M,externalTree:B}),{sideX:eE,sideY:eS}=ey.adaptiveOrigin||sW,eC=ek?k:"fixed",e_=m.useMemo(()=>{let e=j?{position:eC,[eE]:em,[eS]:eg}:{position:eC,...ew};return ek||(e.opacity=0),e},[j,eC,eE,em,eS,eg,ew,ek]),eA=m.useRef(null);(0,ss.useIsoLayoutEffect)(()=>{if(!D)return;let e=Y.current,t="function"==typeof e?e():e,n=(sQ(t)?t.current:t)||null;n!==eA.current&&(ep.setPositionReference(n),eA.current=n)},[D,ep,K,Y]),m.useEffect(()=>{if(!D)return;let e=Y.current;"function"!=typeof e&&sQ(e)&&e.current!==eA.current&&(ep.setPositionReference(e.current),eA.current=e.current)},[D,ep,K,Y]),m.useEffect(()=>{if(L&&D&&eh.domReference&&eh.floating)return sN(eh.domReference,eh.floating,ev,ef)},[L,D,eh,ev,ef]);let eT=(0,sd.getSide)(eb),eR=sY(w,eT,X),eO=(0,sd.getAlignment)(eb)||"center",eL=!!ey.hide?.referenceHidden;(0,ss.useIsoLayoutEffect)(()=>{F&&D&&ek&&H(eT)},[F,D,ek,eT]);let eP=m.useMemo(()=>({position:"absolute",top:ey.arrow?.y,left:ey.arrow?.x}),[ey.arrow]),eD=ey.arrow?.centerOffset!==0;return m.useMemo(()=>({positionerStyles:e_,arrowStyles:eP,arrowRef:ei,arrowUncentered:eD,side:eR,align:eO,physicalSide:eT,anchorHidden:eL,refs:ep,context:ex,isPositioned:ek,update:ev}),[e_,eP,ei,eD,eR,eO,eT,eL,ep,ex,ek,ev])}function sQ(e){return null!=e&&"current"in e}e.s(["DEFAULT_SIDES",0,sW,"adaptiveOrigin",0,sK],67569),e.s(["useAnchorPositioning",0,sJ],56590);var sG=e.i(36893),sZ=e.i(77817),s0=e.i(17514);function s1(e){return"starting"===e?lL.DISABLED_TRANSITIONS_STYLE:s0.EMPTY_OBJECT}e.s(["getDisabledMountTransitionStyles",0,s1],18847);let s2=m.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:o="absolute",side:a="bottom",align:l="center",sideOffset:s=0,alignOffset:u=0,collisionBoundary:c="clipping-ancestors",collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:g=!1,collisionAvoidance:y=lL.POPUP_COLLISION_AVOIDANCE,...v}=e,{store:b}=lk(),x=function(){let e=m.useContext(so);if(void 0===e)throw Error((0,lb.default)(45));return e}(),k=(0,ly.useFloatingNodeId)(),w=b.useState("floatingRootContext"),E=b.useState("mounted"),S=b.useState("open"),C=b.useState("openChangeReason"),_=b.useState("activeTriggerElement"),A=b.useState("modal"),T=b.useState("positionerElement"),R=b.useState("instantType"),O=b.useState("transitionStatus"),L=b.useState("hasViewport"),P=m.useRef(null),D=(0,sZ.useAnimationsFinished)(T,!1,!1),N=sJ({anchor:i,floatingRootContext:w,positionMethod:o,mounted:E,side:a,sideOffset:s,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:c,collisionPadding:d,sticky:p,disableAnchorTracking:g,keepMounted:x,nodeId:k,collisionAvoidance:y,adaptiveOrigin:L?sK:void 0}),I=m.useMemo(()=>{let e={};return S||(e.pointerEvents="none"),{role:"presentation",hidden:!E,style:{...N.positionerStyles,...e}}},[S,E,N.positionerStyles]),M=m.useMemo(()=>({props:I,...N}),[I,N]),j=w.useState("domReferenceElement");(0,ss.useIsoLayoutEffect)(()=>{let e=P.current;if(j&&(P.current=j),e&&j&&j!==e){b.set("instantType",void 0);let e=new AbortController;return D(()=>{b.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[j,D,b]);let F={open:S,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:R},B=m.useCallback(e=>{b.set("positionerElement",e)},[b]),z=(0,lH.useRenderElement)("div",e,{state:F,props:[M.props,s1(O),v],ref:[t,B],stateAttributesMapping:lz.popupStateMapping});return(0,h.jsxs)(su.Provider,{value:M,children:[E&&!0===A&&C!==lT.REASONS.triggerHover&&(0,h.jsx)(sG.InternalBackdrop,{ref:b.context.internalBackdropRef,inert:(0,sl.inertValue)(!S),cutout:_}),(0,h.jsx)(ly.FloatingNode,{id:k,children:z})]})});var s4=e.i(88306);function s6(e,t={}){let n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("domReferenceElement"),{dataRef:a}=n.context,{enabled:l=!0,closeDelay:s=0}=t,u=l6(n),c=(0,ly.useFloatingTree)(),d=(0,ly.useFloatingParentNodeId)(),f=(0,lF.useStableCallback)(()=>l9(a.current.openEvent?.type,u.interactedInside)),p=(0,lF.useStableCallback)(()=>{let e=a.current.openEvent?.type;return e?.includes("mouse")&&"mousedown"!==e}),h=(0,lF.useStableCallback)(e=>(0,lV.isTargetInsideEnabledTrigger)(e,n.context.triggerElements)),g=m.useCallback(e=>{let t=l5(s,"close",u.pointerType),r=()=>{n.setOpen(!1,(0,lN.createChangeEventDetails)(lT.REASONS.triggerHover,e)),c?.events.emit("floating.closed",e)};t?u.openChangeTimeout.start(t,r):(u.openChangeTimeout.clear(),r())},[s,n,u,c]),y=(0,lF.useStableCallback)(()=>{l4(u)}),v=(0,lF.useStableCallback)(e=>{let t=(0,lV.getTarget)(e);if(!(t&&t.closest(l1))){u.interactedInside=!1;return}u.interactedInside=t?.closest("[aria-haspopup]")!=null});(0,ss.useIsoLayoutEffect)(()=>{r||(u.pointerType=void 0,u.restTimeoutPending=!1,u.interactedInside=!1,y())},[r,u,y]),m.useEffect(()=>y,[y]),(0,ss.useIsoLayoutEffect)(()=>{if(l&&r&&u.handleCloseOptions?.blockPointerEvents&&p()&&(0,lU.isElement)(o)&&i){let e=(0,lG.ownerDocument)(i),t=c?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;t&&(t.style.pointerEvents="");let n=u.handleCloseOptions?.getScope?.()??u.pointerEventsScopeElement??t??o.closest("[data-rootownerid]")??e.body;return!function(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t;l4(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,n.style.pointerEvents="none",r.style.pointerEvents="auto",i.style.pointerEvents="auto"}(u,{scopeElement:n,referenceElement:o,floatingElement:i}),()=>{y()}}},[l,r,o,i,u,p,c,d,y]);let b=(0,lC.useTimeout)();m.useEffect(()=>{if(l)return i&&(i.addEventListener("mouseenter",e),i.addEventListener("mouseleave",t),i.addEventListener("pointerdown",v,!0)),()=>{i&&(i.removeEventListener("mouseenter",e),i.removeEventListener("mouseleave",t),i.removeEventListener("pointerdown",v,!0)),c?.events.off("floating.closed",r)};function e(){u.openChangeTimeout.clear(),b.clear(),c?.events.off("floating.closed",r),y()}function t(e){if(c&&d&&(0,lq.getNodeChildren)(c.nodesRef.current,d).length>0)return void c.events.on("floating.closed",r);if(!h(e.relatedTarget)){if(u.handler)return void u.handler(e);y(),f()||g(e)}}function r(e){c&&d&&!((0,lq.getNodeChildren)(c.nodesRef.current,d).length>0)&&b.start(0,()=>{c.events.off("floating.closed",r),n.setOpen(!1,(0,lN.createChangeEventDetails)(lT.REASONS.triggerHover,e)),c.events.emit("floating.closed",e)})}},[l,i,n,a,f,h,g,y,v,u,c,d,b])}e.s(["useHoverFloatingInteraction",0,s6],61896);var s5=e.i(84759),s3=e.i(89269),s9=e.i(92238);let s8=m.createContext(void 0);function s7(e){let t=m.useContext(s8);if(void 0===t&&!e)throw Error((0,lb.default)(69));return t}e.s(["useToolbarRootContext",0,s7],60752);let ue=m.createContext(void 0);function ut(e){let{value:t,children:n}=e;return(0,h.jsx)(ue.Provider,{value:t,children:n})}let un={...lz.popupStateMapping,...s5.transitionStatusMapping},ur=m.forwardRef(function(e,t){let{className:n,render:r,initialFocus:i,finalFocus:o,...a}=e,{store:l}=lk(),s=sc(),u=null!=s7(!0),{context:c,hasClosePart:d}=function(){let[e,t]=m.useState(0),n=(0,lF.useStableCallback)(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:m.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}(),f=l.useState("open"),p=l.useState("openMethod"),g=l.useState("instantType"),y=l.useState("transitionStatus"),v=l.useState("popupProps"),b=l.useState("titleElementId"),x=l.useState("descriptionElementId"),k=l.useState("modal"),w=l.useState("mounted"),E=l.useState("openChangeReason"),S=l.useState("activeTriggerElement"),C=l.useState("floatingRootContext");(0,s3.useOpenChangeComplete)({open:f,ref:l.context.popupRef,onComplete(){f&&l.context.onOpenChangeComplete?.(!0)}});let _=l.useState("disabled");s6(C,{enabled:l.useState("openOnHover")&&!_,closeDelay:l.useState("closeDelay")});let A=void 0===i?function(e){return"touch"!==e||l.context.popupRef.current}:i,T={open:f,side:s.side,align:s.align,instant:g,transitionStatus:y},R=m.useCallback(e=>{l.set("popupElement",e)},[l]),O=(0,lH.useRenderElement)("div",e,{state:T,ref:[t,l.context.popupRef,R],props:[v,{"aria-labelledby":b,"aria-describedby":x,onKeyDown(e){u&&s9.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},s1(y),a],stateAttributesMapping:un});return(0,h.jsx)(s4.FloatingFocusManager,{context:C,openInteractionType:p,modal:!1!==k&&d,disabled:!w||E===lT.REASONS.triggerHover,initialFocus:A,returnFocus:o,restoreFocus:"popup",previousFocusableElement:(0,lU.isHTMLElement)(S)?S:void 0,nextFocusableElement:l.context.triggerFocusTargetRef,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:(0,h.jsx)(ut,{value:c,children:O})})}),ui=m.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:o}=lk(),a=o.useState("open"),{arrowRef:l,side:s,align:u,arrowUncentered:c,arrowStyles:d}=sc();return(0,lH.useRenderElement)("div",e,{state:{open:a,side:s,align:u,uncentered:c},ref:[t,l],props:[{style:d,"aria-hidden":!0},i],stateAttributesMapping:lz.popupStateMapping})}),uo={...lz.popupStateMapping,...s5.transitionStatusMapping},ua=m.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:o}=lk(),a=o.useState("open"),l=o.useState("mounted"),s=o.useState("transitionStatus"),u=o.useState("openChangeReason");return(0,lH.useRenderElement)("div",e,{state:{open:a,transitionStatus:s},ref:[o.context.backdropRef,t],props:[{role:"presentation",hidden:!l,style:{pointerEvents:u===lT.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},i],stateAttributesMapping:uo})}),ul=m.forwardRef(function(e,t){let{render:n,className:r,...i}=e,{store:o}=lk(),a=(0,se.useBaseUiId)(i.id);return(0,ss.useIsoLayoutEffect)(()=>(o.set("titleElementId",a),()=>{o.set("titleElementId",void 0)}),[o,a]),(0,lH.useRenderElement)("h2",e,{ref:t,props:[{id:a},i]})}),us=m.forwardRef(function(e,t){let{render:n,className:r,...i}=e,{store:o}=lk(),a=(0,se.useBaseUiId)(i.id);return(0,ss.useIsoLayoutEffect)(()=>(o.set("descriptionElementId",a),()=>{o.set("descriptionElementId",void 0)}),[o,a]),(0,lH.useRenderElement)("p",e,{ref:t,props:[{id:a},i]})}),uu=m.forwardRef(function(e,t){let n,{render:r,className:i,disabled:o=!1,nativeButton:a=!0,...l}=e,{buttonRef:s,getButtonProps:u}=(0,lB.useButton)({disabled:o,focusableWhenDisabled:!1,native:a}),{store:c}=lk();return n=m.useContext(ue),(0,ss.useIsoLayoutEffect)(()=>n?.register(),[n]),(0,lH.useRenderElement)("button",e,{ref:[t,s],props:[{onClick(e){c.setOpen(!1,(0,lN.createChangeEventDetails)(lT.REASONS.closePress,e.nativeEvent,e.currentTarget))}},l,u]})}),uc=((i={}).popupWidth="--popup-width",i.popupHeight="--popup-height",i);var ud=e.i(47135);function uf(e){let t=(0,lU.getComputedStyle)(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=(0,lU.isHTMLElement)(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r;return((0,sd.round)(n)!==o||(0,sd.round)(r)!==a)&&(n=o,r=a),{width:n,height:r}}let up=()=>!0;function uh(e,t,n){let r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r)}}function um(e,t){let n=[];for(let[r,i]of Object.entries(t))n.push(uh(e,r,i));return n.length?()=>{n.forEach(e=>e())}:s0.NOOP}function ug(e,t){let n="auto"===t?"auto":`${t.width}px`,r="auto"===t?"auto":`${t.height}px`;e.style.setProperty("--popup-width",n),e.style.setProperty("--popup-height",r)}function uy(e,t){let n="max-content"===t?"max-content":`${t.width}px`,r="max-content"===t?"max-content":`${t.height}px`;e.style.setProperty("--positioner-width",n),e.style.setProperty("--positioner-height",r)}function uv(e){let t,{store:n,side:r,cssVars:i,children:o}=e,a=sV(),l=n.useState("activeTriggerElement"),s=n.useState("activeTriggerId"),u=n.useState("open"),c=n.useState("payload"),d=n.useState("mounted"),f=n.useState("popupElement"),p=n.useState("positionerElement"),g=function(e){let[t,n]=m.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}(u?l:null),y=function(e,t){let[n,r]=m.useState(0),i=m.useRef(e),o=m.useRef(t),a=m.useRef(!1);return(0,ss.useIsoLayoutEffect)(()=>{let n=i.current,l=t!==o.current;e!==n?(r(e=>e+1),a.current=!l):a.current&&l&&(r(e=>e+1),a.current=!1),i.current=e,o.current=t},[e,t]),`${e??"current"}-${n}`}(s,c),v=m.useRef(null),[b,x]=m.useState(null),[k,w]=m.useState(null),E=m.useRef(null),S=m.useRef(null),C=(0,sZ.useAnimationsFinished)(E,!0,!1),_=(0,ud.useAnimationFrame)(),[A,T]=m.useState(null),[R,O]=m.useState(!1);(0,ss.useIsoLayoutEffect)(()=>(n.set("hasViewport",!0),()=>{n.set("hasViewport",!1)}),[n]);let L=(0,lF.useStableCallback)(()=>{E.current?.style.setProperty("animation","none"),E.current?.style.setProperty("transition","none"),S.current?.style.setProperty("display","none")}),P=(0,lF.useStableCallback)(e=>{E.current?.style.removeProperty("animation"),E.current?.style.removeProperty("transition"),S.current?.style.removeProperty("display"),e&&T(e)}),D=m.useRef(null);(0,ss.useIsoLayoutEffect)(()=>{var e,t;let n,r,i,o;l&&g&&l!==g&&D.current!==l&&v.current&&(x(v.current),O(!0),w((e=g,t=l,n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i={x:n.left+n.width/2,y:n.top+n.height/2},{horizontal:(o={x:r.left+r.width/2,y:r.top+r.height/2}).x-i.x,vertical:o.y-i.y})),_.request(()=>{lw.flushSync(()=>{O(!1)}),C(()=>{x(null),T(null),v.current=null})}),D.current=l)},[l,g,b,C,_]),(0,ss.useIsoLayoutEffect)(()=>{let e=E.current;if(!e)return;let t=document.createElement("div");for(let n of Array.from(e.childNodes))t.appendChild(n.cloneNode(!0));v.current=t});let N=null!=b;return t=N?(0,h.jsxs)(m.Fragment,{children:[(0,h.jsx)("div",{"data-previous":!0,inert:(0,sl.inertValue)(!0),ref:S,style:{...A?{[i.popupWidth]:`${A.width}px`,[i.popupHeight]:`${A.height}px`}:null,position:"absolute"},"data-ending-style":R?void 0:""},"previous"),(0,h.jsx)("div",{"data-current":!0,ref:E,"data-starting-style":R?"":void 0,children:o},y)]}):(0,h.jsx)("div",{"data-current":!0,ref:E,children:o},y),(0,ss.useIsoLayoutEffect)(()=>{let e=S.current;e&&b&&e.replaceChildren(...Array.from(b.childNodes))},[b]),!function(e){let{popupElement:t,positionerElement:n,content:r,mounted:i,enabled:o=up,onMeasureLayout:a,onMeasureLayoutComplete:l,side:s,direction:u}=e,c=(0,sZ.useAnimationsFinished)(t,!0,!1),d=(0,ud.useAnimationFrame)(),f=m.useRef(null),p=m.useRef(null),h=m.useRef(!0),g=m.useRef(s0.NOOP),y=(0,lF.useStableCallback)(a),v=(0,lF.useStableCallback)(l),b=m.useMemo(()=>{let e="top"===s,t="left"===s;return"rtl"===u?(e=e||"inline-end"===s,t=t||"inline-end"===s):(e=e||"inline-start"===s,t=t||"inline-start"===s),e?{position:"absolute",["top"===s?"bottom":"top"]:"0",[t?"right":"left"]:"0"}:s0.EMPTY_OBJECT},[s,u]);(0,ss.useIsoLayoutEffect)(()=>{if(!i||!o()||"function"!=typeof ResizeObserver){g.current=s0.NOOP,h.current=!0,f.current=null,p.current=null;return}if(!t||!n)return;g.current=um(t,b);let e=new ResizeObserver(e=>{let t=e[0];t&&(p.current={width:Math.ceil(t.borderBoxSize[0].inlineSize),height:Math.ceil(t.borderBoxSize[0].blockSize)})});e.observe(t),ug(t,"auto");let r=uh(t,"position","static"),a=uh(t,"transform","none"),l=uh(t,"scale","1"),s=um(n,{"--available-width":"max-content","--available-height":"max-content"});function u(){r(),a(),s(),l()}if(y?.(),h.current||null===f.current){uy(n,"max-content");let r=uf(t);return f.current=r,uy(n,r),u(),v?.(null,r),h.current=!1,()=>{e.disconnect(),g.current(),g.current=s0.NOOP}}ug(t,"auto"),uy(n,"max-content");let m=f.current??p.current,x=uf(t);if(f.current=x,!m)return uy(n,x),u(),v?.(null,x),()=>{e.disconnect(),d.cancel(),g.current(),g.current=s0.NOOP};ug(t,m),u(),v?.(m,x),uy(n,x);let k=new AbortController;return d.request(()=>{ug(t,x),c(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},k.signal)}),()=>{e.disconnect(),k.abort(),d.cancel(),g.current(),g.current=s0.NOOP}},[r,t,n,c,d,o,i,y,v,b])}({popupElement:f,positionerElement:p,mounted:d,content:c,onMeasureLayout:L,onMeasureLayoutComplete:P,side:r,direction:a}),{children:t,state:{activationDirection:function(e){if(e)return`${function(e,t,n,r){return e>t?n:e<-t?r:""}(e.horizontal,5,"right","left")} ${function(e,t,n,r){return e>t?n:e<-t?r:""}(e.vertical,5,"down","up")}`}(k),transitioning:N}}}e.s(["usePopupViewport",0,uv],12666);let ub={activationDirection:e=>e?{"data-activation-direction":e}:null},ux=m.forwardRef(function(e,t){let{render:n,className:r,children:i,...o}=e,{store:a}=lk(),{side:l}=sc(),s=a.useState("instantType"),{children:u,state:c}=uv({store:a,side:l,cssVars:uc,children:i}),d={activationDirection:c.activationDirection,transitioning:c.transitioning,instant:s};return(0,lH.useRenderElement)("div",e,{state:d,ref:t,props:[o,{children:u}],stateAttributesMapping:ub})});class uk{constructor(){this.store=new lD}open(e){let t=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!t)throw Error((0,lb.default)(80,e));this.store.setOpen(!0,(0,lN.createChangeEventDetails)(lT.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,lN.createChangeEventDetails)(lT.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,ui,"Backdrop",0,ua,"Close",0,uu,"Description",0,us,"Handle",0,uk,"Popup",0,ur,"Portal",0,sa,"Positioner",0,s2,"Root",0,function(e){return lk(!0)?(0,h.jsx)(lj,{props:e}):(0,h.jsx)(ly.FloatingTree,{children:(0,h.jsx)(lj,{props:e})})},"Title",0,ul,"Trigger",0,sr,"Viewport",0,ux,"createHandle",0,function(){return new uk}],7311);var uw=e.i(7311),uw=uw,uE=e.i(52088);function uS({...e}){return(0,h.jsx)(uw.Root,{"data-slot":"popover",...e})}function uC({...e}){return(0,h.jsx)(uw.Trigger,{"data-slot":"popover-trigger",...e})}function u_({className:e,align:t="center",alignOffset:n=0,side:r="bottom",sideOffset:i=4,...o}){return(0,h.jsx)(uw.Portal,{children:(0,h.jsx)(uw.Positioner,{align:t,alignOffset:n,side:r,sideOffset:i,className:"isolate z-50",children:(0,h.jsx)(uw.Popup,{"data-slot":"popover-content",className:(0,uE.cn)("z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-lg bg-popover p-2.5 text-xs text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...o})})})}var uA=/[\\\/_+.#"@\[\(\{&]/,uT=/[\\\/_+.#"@\[\(\{&]/g,uR=/[\s-]/,uO=/[\s-]/g;function uL(e){return e.toLowerCase().replace(uO," ")}function uP(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function uD(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function uN(...e){return t=>{let n=!1,r=e.map(e=>{let r=uD(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():uD(e[t],null)}}}}function uI(...e){return m.useCallback(uN(...e),e)}"u">typeof window&&window.document&&window.document.createElement;var uM=globalThis?.document?m.useLayoutEffect:()=>{},uj=m[" useId ".trim().toString()]||(()=>void 0),uF=0;function uB(e){let[t,n]=m.useState(uj());return uM(()=>{e||n(e=>e??String(uF++))},[e]),e||(t?`radix-${t}`:"")}m[" useEffectEvent ".trim().toString()],m[" useInsertionEffect ".trim().toString()];var uz=m[" useInsertionEffect ".trim().toString()]||uM;function uH(e){var t;let n,r=(t=e,(n=m.forwardRef((e,t)=>{let{children:n,...r}=e;if(m.isValidElement(n)){var i;let e,o,a=(i=n,(o=(e=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.ref:(o=(e=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.props.ref:i.props.ref||i.ref),l=function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...e)=>{let t=o(...e);return i(...e),t}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==m.Fragment&&(l.ref=t?uN(t,a):a),m.cloneElement(n,l)}return m.Children.count(n)>1?m.Children.only(null):null})).displayName=`${t}.SlotClone`,n),i=m.forwardRef((e,t)=>{let{children:n,...i}=e,o=m.Children.toArray(n),a=o.find(uV);if(a){let e=a.props.children,n=o.map(t=>t!==a?t:m.Children.count(e)>1?m.Children.only(null):m.isValidElement(e)?e.props.children:null);return(0,h.jsx)(r,{...i,ref:t,children:m.isValidElement(e)?m.cloneElement(e,void 0,n):null})}return(0,h.jsx)(r,{...i,ref:t,children:n})});return i.displayName=`${e}.Slot`,i}Symbol("RADIX:SYNC_STATE");var uU=Symbol("radix.slottable");function uV(e){return m.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===uU}var uq=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=uH(`Primitive.${t}`),r=m.forwardRef((e,r)=>{let{asChild:i,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,h.jsx)(i?n:t,{...o,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function u$(e){let t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...e)=>t.current?.(...e),[])}var uW="dismissableLayer.update",uK=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),uY=m.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...s}=e,u=m.useContext(uK),[c,d]=m.useState(null),p=c?.ownerDocument??globalThis?.document,[,g]=m.useState({}),y=uI(t,e=>d(e)),v=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=v.indexOf(b),k=c?v.indexOf(c):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,E=k>=x,S=function(e,t=globalThis?.document){let n=u$(e),r=m.useRef(!1),i=m.useRef(()=>{});return m.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){uJ("dismissableLayer.pointerDownOutside",n,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=r,t.addEventListener("click",i.current,{once:!0})):r()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{let t=e.target,n=[...u.branches].some(e=>e.contains(t));E&&!n&&(i?.(e),a?.(e),e.defaultPrevented||l?.())},p),C=function(e,t=globalThis?.document){let n=u$(e),r=m.useRef(!1);return m.useEffect(()=>{let e=e=>{e.target&&!r.current&&uJ("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{let t=e.target;![...u.branches].some(e=>e.contains(t))&&(o?.(e),a?.(e),e.defaultPrevented||l?.())},p);return!function(e,t=globalThis?.document){let n=u$(e);m.useEffect(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{k===u.layers.size-1&&(r?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},p),m.useEffect(()=>{if(c)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(f=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),uX(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=f)}},[c,p,n,u]),m.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),uX())},[c,u]),m.useEffect(()=>{let e=()=>g({});return document.addEventListener(uW,e),()=>document.removeEventListener(uW,e)},[]),(0,h.jsx)(uq.div,{...s,ref:y,style:{pointerEvents:w?E?"auto":"none":void 0,...e.style},onFocusCapture:uP(e.onFocusCapture,C.onFocusCapture),onBlurCapture:uP(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:uP(e.onPointerDownCapture,S.onPointerDownCapture)})});function uX(){let e=new CustomEvent(uW);document.dispatchEvent(e)}function uJ(e,t,n,{discrete:r}){let i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});if(t&&i.addEventListener(e,t,{once:!0}),r)i&&lw.flushSync(()=>i.dispatchEvent(o));else i.dispatchEvent(o)}uY.displayName="DismissableLayer",m.forwardRef((e,t)=>{let n=m.useContext(uK),r=m.useRef(null),i=uI(t,r);return m.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,h.jsx)(uq.div,{...e,ref:i})}).displayName="DismissableLayerBranch";var uQ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=uH(`Primitive.${t}`),r=m.forwardRef((e,r)=>{let{asChild:i,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,h.jsx)(i?n:t,{...o,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),uG="focusScope.autoFocusOnMount",uZ="focusScope.autoFocusOnUnmount",u0={bubbles:!1,cancelable:!0},u1=m.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[l,s]=m.useState(null),u=u$(i),c=u$(o),d=m.useRef(null),f=uI(t,e=>s(e)),p=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let e=function(e){if(p.paused||!l)return;let t=e.target;l.contains(t)?d.current=t:u6(d.current,{select:!0})},t=function(e){if(p.paused||!l)return;let t=e.relatedTarget;null!==t&&(l.contains(t)||u6(d.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&u6(l)});return l&&n.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,l,p.paused]),m.useEffect(()=>{if(l){u5.add(p);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(uG,u0);l.addEventListener(uG,u),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(u6(r,{select:t}),document.activeElement!==n)return}(u2(l).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&u6(l))}return()=>{l.removeEventListener(uG,u),setTimeout(()=>{let t=new CustomEvent(uZ,u0);l.addEventListener(uZ,c),l.dispatchEvent(t),t.defaultPrevented||u6(e??document.body,{select:!0}),l.removeEventListener(uZ,c),u5.remove(p)},0)}}},[l,u,c,p]);let g=m.useCallback(e=>{if(!n&&!r||p.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){var o;let t,r=e.currentTarget,[a,l]=[u4(t=u2(o=r),o),u4(t.reverse(),o)];a&&l?e.shiftKey||i!==l?e.shiftKey&&i===a&&(e.preventDefault(),n&&u6(l,{select:!0})):(e.preventDefault(),n&&u6(a,{select:!0})):i===r&&e.preventDefault()}},[n,r,p.paused]);return(0,h.jsx)(uQ.div,{tabIndex:-1,...a,ref:f,onKeyDown:g})});function u2(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function u4(e,t){for(let n of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function u6(e,{select:t=!1}={}){if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}u1.displayName="FocusScope";var u5=(r=[],{add(e){let t=r[0];e!==t&&t?.pause(),(r=u3(r,e)).unshift(e)},remove(e){r=u3(r,e),r[0]?.resume()}});function u3(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}var u9=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=uH(`Primitive.${t}`),r=m.forwardRef((e,r)=>{let{asChild:i,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,h.jsx)(i?n:t,{...o,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),u8=m.forwardRef((e,t)=>{let{container:n,...r}=e,[i,o]=m.useState(!1);uM(()=>o(!0),[]);let a=n||i&&globalThis?.document?.body;return a?lw.default.createPortal((0,h.jsx)(u9.div,{...r,ref:t}),a):null});u8.displayName="Portal";var u7=e=>{var t;let n,r,{present:i,children:o}=e,a=function(e){var t,n;let[r,i]=m.useState(),o=m.useRef(null),a=m.useRef(e),l=m.useRef("none"),[s,u]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},m.useReducer((e,t)=>n[e][t]??e,t));return m.useEffect(()=>{let e=ce(o.current);l.current="mounted"===s?e:"none"},[s]),uM(()=>{let t=o.current,n=a.current;if(n!==e){let r=l.current,i=ce(t);e?u("MOUNT"):"none"===i||t?.display==="none"?u("UNMOUNT"):n&&r!==i?u("ANIMATION_OUT"):u("UNMOUNT"),a.current=e}},[e,u]),uM(()=>{if(r){let e,t=r.ownerDocument.defaultView??window,n=n=>{let i=ce(o.current).includes(CSS.escape(n.animationName));if(n.target===r&&i&&(u("ANIMATION_END"),!a.current)){let n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)})}},i=e=>{e.target===r&&(l.current=ce(o.current))};return r.addEventListener("animationstart",i),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",i),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}u("ANIMATION_END")},[r,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:m.useCallback(e=>{o.current=e?getComputedStyle(e):null,i(e)},[])}}(i),l="function"==typeof o?o({present:a.isPresent}):m.Children.only(o),s=uI(a.ref,(t=l,(r=(n=Object.getOwnPropertyDescriptor(t.props,"ref")?.get)&&"isReactWarning"in n&&n.isReactWarning)?t.ref:(r=(n=Object.getOwnPropertyDescriptor(t,"ref")?.get)&&"isReactWarning"in n&&n.isReactWarning)?t.props.ref:t.props.ref||t.ref));return"function"==typeof o||a.isPresent?m.cloneElement(l,{ref:s}):null};function ce(e){return e?.animationName||"none"}u7.displayName="Presence";var ct=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=uH(`Primitive.${t}`),r=m.forwardRef((e,r)=>{let{asChild:i,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,h.jsx)(i?n:t,{...o,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),cn=0;function cr(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ci=function(){return(ci=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function co(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var ca=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),cl="width-before-scroll-bar";function cs(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var cu="u">typeof window?m.useLayoutEffect:m.useEffect,cc=new WeakMap,cd=(void 0===o&&(o={}),(void 0===a&&(a=function(e){return e}),l=[],s=!1,u={read:function(){if(s)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return l.length?l[l.length-1]:null},useMedium:function(e){var t=a(e,s);return l.push(t),function(){l=l.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(s=!0;l.length;){var t=l;l=[],t.forEach(e)}l={push:function(t){return e(t)},filter:function(){return l}}},assignMedium:function(e){s=!0;var t=[];if(l.length){var n=l;l=[],n.forEach(e),t=l}var r=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(r)};i(),l={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),l}}}}).options=ci({async:!0,ssr:!1},o),u),cf=function(){},cp=m.forwardRef(function(e,t){var n,r,i,o,a=m.useRef(null),l=m.useState({onScrollCapture:cf,onWheelCapture:cf,onTouchMoveCapture:cf}),s=l[0],u=l[1],c=e.forwardProps,d=e.children,f=e.className,p=e.removeScrollBar,h=e.enabled,g=e.shards,y=e.sideCar,v=e.noRelative,b=e.noIsolation,x=e.inert,k=e.allowPinchZoom,w=e.as,E=e.gapMode,S=co(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=(n=[a,t],r=function(e){return n.forEach(function(t){return cs(t,e)})},(i=(0,m.useState)(function(){return{value:null,callback:r,facade:{get current(){return i.value},set current(value){var e=i.value;e!==value&&(i.value=value,i.callback(value,e))}}}})[0]).callback=r,o=i.facade,cu(function(){var e=cc.get(o);if(e){var t=new Set(e),r=new Set(n),i=o.current;t.forEach(function(e){r.has(e)||cs(e,null)}),r.forEach(function(e){t.has(e)||cs(e,i)})}cc.set(o,n)},[n]),o),_=ci(ci({},S),s);return m.createElement(m.Fragment,null,h&&m.createElement(y,{sideCar:cd,removeScrollBar:p,shards:g,noRelative:v,noIsolation:b,inert:x,setCallbacks:u,allowPinchZoom:!!k,lockRef:a,gapMode:E}),c?m.cloneElement(m.Children.only(d),ci(ci({},_),{ref:C})):m.createElement(void 0===w?"div":w,ci({},_,{className:f,ref:C}),d))});cp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},cp.classNames={fullWidth:cl,zeroRight:ca};var ch=function(e){var t=e.sideCar,n=co(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return m.createElement(r,ci({},n))};ch.isSideCarExport=!0;var cm=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=p||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var r,i;(r=t).styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),i=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},cg=function(){var e=cm();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},cy=function(){var e=cg();return function(t){return e(t.styles,t.dynamic),null}},cv={left:0,top:0,right:0,gap:0},cb=function(e){return parseInt(e||"",10)||0},cx=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[cb(n),cb(r),cb(i)]},ck=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return cv;var t=cx(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},cw=cy(),cE="data-scroll-locked",cS=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,l=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(l,"px ").concat(r,";\n }\n body[").concat(cE,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(i,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(ca," {\n right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(cl," {\n margin-right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(ca," .").concat(ca," {\n right: 0 ").concat(r,";\n }\n \n .").concat(cl," .").concat(cl," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(cE,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},cC=function(){var e=parseInt(document.body.getAttribute(cE)||"0",10);return isFinite(e)?e:0},c_=function(){m.useEffect(function(){return document.body.setAttribute(cE,(cC()+1).toString()),function(){var e=cC()-1;e<=0?document.body.removeAttribute(cE):document.body.setAttribute(cE,e.toString())}},[])},cA=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=void 0===r?"margin":r;c_();var o=m.useMemo(function(){return ck(i)},[i]);return m.createElement(cw,{styles:cS(o,!t,i,n?"":"!important")})},cT=!1;if("u">typeof window)try{var cR=Object.defineProperty({},"passive",{get:function(){return cT=!0,!0}});window.addEventListener("test",cR,cR),window.removeEventListener("test",cR,cR)}catch(e){cT=!1}var cO=!!cT&&{passive:!1},cL=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&(n.overflowY!==n.overflowX||"TEXTAREA"===e.tagName||"visible"!==n[t])},cP=function(e,t){var n=t.ownerDocument,r=t;do{if("u">typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),cD(e,r)){var i=cN(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body)return!1},cD=function(e,t){return"v"===e?cL(t,"overflowY"):cL(t,"overflowX")},cN=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},cI=function(e,t,n,r,i){var o,a=(o=window.getComputedStyle(t).direction,"h"===e&&"rtl"===o?-1:1),l=a*r,s=n.target,u=t.contains(s),c=!1,d=l>0,f=0,p=0;do{if(!s)break;var h=cN(e,s),m=h[0],g=h[1]-h[2]-a*m;(m||g)&&cD(e,s)&&(f+=g,p+=m);var y=s.parentNode;s=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!u&&s!==document.body||u&&(t.contains(s)||t===s))return d&&(i&&1>Math.abs(f)||!i&&l>f)?c=!0:!d&&(i&&1>Math.abs(p)||!i&&-l>p)&&(c=!0),c},cM=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},cj=function(e){return[e.deltaX,e.deltaY]},cF=function(e){return e&&"current"in e?e.current:e},cB=0,cz=[];let cH=(c=function(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),i=m.useState(cB++)[0],o=m.useState(cy)[0],a=m.useRef(e);m.useEffect(function(){a.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=(function(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(cF),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=m.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!a.current.allowPinchZoom;var i,o=cM(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-o[0],u="deltaY"in e?e.deltaY:l[1]-o[1],c=e.target,d=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===c||p.contains(c)))return!1;var h=cP(d,c);if(!h)return!0;if(h?i=d:(i="v"===d?"h":"v",h=cP(d,c)),!h)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=i),!i)return!0;var m=r.current||i;return cI(m,t,e,"h"===m?s:u,!0)},[]),s=m.useCallback(function(e){if(cz.length&&cz[cz.length-1]===o){var n="deltaY"in e?cj(e):cM(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta,r[0]===n[0]&&r[1]===n[1])})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var i=(a.current.shards||[]).map(cF).filter(Boolean).filter(function(t){return t.contains(e.target)});(i.length>0?l(e,i[0]):!a.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),u=m.useCallback(function(e,n,r,i){var o={name:e,delta:n,target:r,should:i,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),c=m.useCallback(function(e){n.current=cM(e),r.current=void 0},[]),d=m.useCallback(function(t){u(t.type,cj(t),t.target,l(t,e.lockRef.current))},[]),f=m.useCallback(function(t){u(t.type,cM(t),t.target,l(t,e.lockRef.current))},[]);m.useEffect(function(){return cz.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",s,cO),document.addEventListener("touchmove",s,cO),document.addEventListener("touchstart",c,cO),function(){cz=cz.filter(function(e){return e!==o}),document.removeEventListener("wheel",s,cO),document.removeEventListener("touchmove",s,cO),document.removeEventListener("touchstart",c,cO)}},[]);var p=e.removeScrollBar,h=e.inert;return m.createElement(m.Fragment,null,h?m.createElement(o,{styles:"\n .block-interactivity-".concat(i," {pointer-events: none;}\n .allow-interactivity-").concat(i," {pointer-events: all;}\n")}):null,p?m.createElement(cA,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},cd.useMedium(c),ch);var cU=m.forwardRef(function(e,t){return m.createElement(cp,ci({},e,{ref:t,sideCar:cH}))});cU.classNames=cp.classNames;var cV=new WeakMap,cq=new WeakMap,c$={},cW=0,cK=function(e){return e&&(e.host||cK(e.parentNode))},cY=function(e,t,n,r){var i=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=cK(e);return n&&t.contains(n)?n:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});c$[n]||(c$[n]=new WeakMap);var o=c$[n],a=[],l=new Set,s=new Set(i),u=function(e){!e||l.has(e)||(l.add(e),u(e.parentNode))};i.forEach(u);var c=function(e){!e||s.has(e)||Array.prototype.forEach.call(e.children,function(e){if(l.has(e))c(e);else try{var t=e.getAttribute(r),i=null!==t&&"false"!==t,s=(cV.get(e)||0)+1,u=(o.get(e)||0)+1;cV.set(e,s),o.set(e,u),a.push(e),1===s&&i&&cq.set(e,!0),1===u&&e.setAttribute(n,"true"),i||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return c(t),l.clear(),cW++,function(){a.forEach(function(e){var t=cV.get(e)-1,i=o.get(e)-1;cV.set(e,t),o.set(e,i),t||(cq.has(e)||e.removeAttribute(r),cq.delete(e)),i||e.removeAttribute(n)}),--cW||(cV=new WeakMap,cV=new WeakMap,cq=new WeakMap,c$={})}},cX=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||("u"<typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),cY(r,i,n,"aria-hidden")):function(){return null}},cJ="Dialog",[cQ,cG]=function(e,t=[]){let n=[],r=()=>{let t=n.map(e=>m.createContext(e));return function(n){let r=n?.[e]||t;return m.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){let i=m.createContext(r),o=n.length;n=[...n,r];let a=t=>{let{scope:n,children:r,...a}=t,l=n?.[e]?.[o]||i,s=m.useMemo(()=>a,Object.values(a));return(0,h.jsx)(l.Provider,{value:s,children:r})};return a.displayName=t+"Provider",[a,function(n,a){let l=a?.[e]?.[o]||i,s=m.useContext(l);if(s)return s;if(void 0!==r)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}(r,...t)]}(cJ),[cZ,c0]=cQ(cJ),c1=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,l=m.useRef(null),s=m.useRef(null),[u,c]=function({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,o,a]=function({defaultProp:e,onChange:t}){let[n,r]=m.useState(e),i=m.useRef(n),o=m.useRef(t);return uz(()=>{o.current=t},[t]),m.useEffect(()=>{i.current!==n&&(o.current?.(n),i.current=n)},[n,i]),[n,r,o]}({defaultProp:t,onChange:n}),l=void 0!==e,s=l?e:i;{let t=m.useRef(void 0!==e);m.useEffect(()=>{let e=t.current;if(e!==l){let t=l?"controlled":"uncontrolled";console.warn(`${r} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=l},[l,r])}return[s,m.useCallback(t=>{if(l){let n="function"==typeof t?t(e):t;n!==e&&a.current?.(n)}else o(t)},[l,e,o,a])]}({prop:r,defaultProp:i??!1,onChange:o,caller:cJ});return(0,h.jsx)(cZ,{scope:t,triggerRef:l,contentRef:s,contentId:uB(),titleId:uB(),descriptionId:uB(),open:u,onOpenChange:c,onOpenToggle:m.useCallback(()=>c(e=>!e),[c]),modal:a,children:n})};c1.displayName=cJ;var c2="DialogTrigger";m.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=c0(c2,n),o=uI(t,i.triggerRef);return(0,h.jsx)(ct.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":dc(i.open),...r,ref:o,onClick:uP(e.onClick,i.onOpenToggle)})}).displayName=c2;var c4="DialogPortal",[c6,c5]=cQ(c4,{forceMount:void 0}),c3=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=c0(c4,t);return(0,h.jsx)(c6,{scope:t,forceMount:n,children:m.Children.map(r,e=>(0,h.jsx)(u7,{present:n||o.open,children:(0,h.jsx)(u8,{asChild:!0,container:i,children:e})}))})};c3.displayName=c4;var c9="DialogOverlay",c8=m.forwardRef((e,t)=>{let n=c5(c9,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=c0(c9,e.__scopeDialog);return o.modal?(0,h.jsx)(u7,{present:r||o.open,children:(0,h.jsx)(de,{...i,ref:t})}):null});c8.displayName=c9;var c7=uH("DialogOverlay.RemoveScroll"),de=m.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=c0(c9,n);return(0,h.jsx)(cU,{as:c7,allowPinchZoom:!0,shards:[i.contentRef],children:(0,h.jsx)(ct.div,{"data-state":dc(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),dt="DialogContent",dn=m.forwardRef((e,t)=>{let n=c5(dt,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=c0(dt,e.__scopeDialog);return(0,h.jsx)(u7,{present:r||o.open,children:o.modal?(0,h.jsx)(dr,{...i,ref:t}):(0,h.jsx)(di,{...i,ref:t})})});dn.displayName=dt;var dr=m.forwardRef((e,t)=>{let n=c0(dt,e.__scopeDialog),r=m.useRef(null),i=uI(t,n.contentRef,r);return m.useEffect(()=>{let e=r.current;if(e)return cX(e)},[]),(0,h.jsx)(da,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:uP(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:uP(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:uP(e.onFocusOutside,e=>e.preventDefault())})}),di=m.forwardRef((e,t)=>{let n=c0(dt,e.__scopeDialog),r=m.useRef(!1),i=m.useRef(!1);return(0,h.jsx)(da,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));let o=t.target;n.triggerRef.current?.contains(o)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})}),da=m.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,l=c0(dt,n),s=m.useRef(null),u=uI(t,s);return m.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??cr()),document.body.insertAdjacentElement("beforeend",e[1]??cr()),cn++,()=>{1===cn&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),cn--}},[]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(u1,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:(0,h.jsx)(uY,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":dc(l.open),...a,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(dh,{titleId:l.titleId}),(0,h.jsx)(dm,{contentRef:s,descriptionId:l.descriptionId})]})]})}),dl="DialogTitle";m.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=c0(dl,n);return(0,h.jsx)(ct.h2,{id:i.titleId,...r,ref:t})}).displayName=dl;var ds="DialogDescription";m.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=c0(ds,n);return(0,h.jsx)(ct.p,{id:i.descriptionId,...r,ref:t})}).displayName=ds;var du="DialogClose";function dc(e){return e?"open":"closed"}m.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=c0(du,n);return(0,h.jsx)(ct.button,{type:"button",...r,ref:t,onClick:uP(e.onClick,()=>i.onOpenChange(!1))})}).displayName=du;var dd="DialogTitleWarning",[df,dp]=(d={contentName:dt,titleName:dl,docsSlug:"dialog"},t=m.createContext(d),(n=e=>{let{children:n,...r}=e,i=m.useMemo(()=>r,Object.values(r));return(0,h.jsx)(t.Provider,{value:i,children:n})}).displayName=dd+"Provider",[n,function(e){let n=m.useContext(t);if(n)return n;if(void 0!==d)return d;throw Error(`\`${e}\` must be used within \`${dd}\``)}]),dh=({titleId:e})=>{let t=dp(dd),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
8
|
+
|
|
9
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
10
|
+
|
|
11
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return m.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},dm=({contentRef:e,descriptionId:t})=>{let n=dp("DialogDescriptionWarning"),r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${n.contentName}}.`;return m.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},dg=Symbol.for("react.lazy"),dy=m[" use ".trim().toString()];function dv(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===dg&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var db=Symbol("radix.slottable");function dx(e){return m.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===db}var dk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{var n,r;let i,o,a,l=(r=n=`Primitive.${t}`,(i=m.forwardRef((e,t)=>{let{children:n,...r}=e;if(dv(n)&&"function"==typeof dy&&(n=dy(n._payload)),m.isValidElement(n)){var i;let e,o,a=(i=n,(o=(e=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.ref:(o=(e=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.props.ref:i.props.ref||i.ref),l=function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...e)=>{let t=o(...e);return i(...e),t}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==m.Fragment&&(l.ref=t?uN(t,a):a),m.cloneElement(n,l)}return m.Children.count(n)>1?m.Children.only(null):null})).displayName=`${r}.SlotClone`,o=i,(a=m.forwardRef((e,t)=>{let{children:n,...r}=e;dv(n)&&"function"==typeof dy&&(n=dy(n._payload));let i=m.Children.toArray(n),a=i.find(dx);if(a){let e=a.props.children,n=i.map(t=>t!==a?t:m.Children.count(e)>1?m.Children.only(null):m.isValidElement(e)?e.props.children:null);return(0,h.jsx)(o,{...r,ref:t,children:m.isValidElement(e)?m.cloneElement(e,void 0,n):null})}return(0,h.jsx)(o,{...r,ref:t,children:n})})).displayName=`${n}.Slot`,a),s=m.forwardRef((e,n)=>{let{asChild:r,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,h.jsx)(r?l:t,{...i,ref:n})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{}),dw='[cmdk-group=""]',dE='[cmdk-group-items=""]',dS='[cmdk-item=""]',dC=`${dS}:not([aria-disabled="true"])`,d_="cmdk-item-select",dA="data-value",dT=(e,t,n)=>{var r;return r=e,function e(t,n,r,i,o,a,l){if(a===n.length)return o===t.length?1:.99;var s=`${o},${a}`;if(void 0!==l[s])return l[s];for(var u,c,d,f,p=i.charAt(a),h=r.indexOf(p,o),m=0;h>=0;)(u=e(t,n,r,i,h+1,a+1,l))>m&&(h===o?u*=1:uA.test(t.charAt(h-1))?(u*=.8,(d=t.slice(o,h-1).match(uT))&&o>0&&(u*=Math.pow(.999,d.length))):uR.test(t.charAt(h-1))?(u*=.9,(f=t.slice(o,h-1).match(uO))&&o>0&&(u*=Math.pow(.999,f.length))):(u*=.17,o>0&&(u*=Math.pow(.999,h-o))),t.charAt(h)!==n.charAt(a)&&(u*=.9999)),(u<.1&&r.charAt(h-1)===i.charAt(a+1)||i.charAt(a+1)===i.charAt(a)&&r.charAt(h-1)!==i.charAt(a))&&.1*(c=e(t,n,r,i,h+1,a+2,l))>u&&(u=.1*c),u>m&&(m=u),h=r.indexOf(p,h+1);return l[s]=m,m}(r=n&&n.length>0?`${r+" "+n.join(" ")}`:r,t,uL(r),uL(t),0,0,{})},dR=m.createContext(void 0),dO=m.createContext(void 0),dL=m.createContext(void 0),dP=m.forwardRef((e,t)=>{let n=dU(()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=dU(()=>new Set),i=dU(()=>new Map),o=dU(()=>new Map),a=dU(()=>new Set),l=dz(e),{label:s,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:h,disablePointerSelection:g=!1,vimBindings:y=!0,...v}=e,b=uB(),x=uB(),k=uB(),w=m.useRef(null),E=d$();dH(()=>{if(void 0!==c){let e=c.trim();n.current.value=e,S.emit()}},[c]),dH(()=>{E(6,O)},[]);let S=m.useMemo(()=>({subscribe:e=>(a.current.add(e),()=>a.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,o,a,s;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)R(),A(),E(1,T);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(k);e?e.focus():null==(i=document.getElementById(b))||i.focus()}if(E(7,()=>{var e;n.current.selectedItemId=null==(e=L())?void 0:e.id,S.emit()}),r||E(5,O),(null==(o=l.current)?void 0:o.value)!==void 0){null==(s=(a=l.current).onValueChange)||s.call(a,null!=t?t:"");return}}S.emit()}},emit:()=>{a.current.forEach(e=>e())}}),[]),C=m.useMemo(()=>({value:(e,t,r)=>{var i;t!==(null==(i=o.current.get(e))?void 0:i.value)&&(o.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,_(t,r)),E(2,()=>{A(),S.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),E(3,()=>{R(),A(),n.current.value||T(),S.emit()}),()=>{o.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=L();E(4,()=>{R(),(null==t?void 0:t.getAttribute("id"))===e&&T(),S.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{o.current.delete(e),i.current.delete(e)}),filter:()=>l.current.shouldFilter,label:s||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:b,inputId:k,labelId:x,listInnerRef:w}),[]);function _(e,t){var r,i;let o=null!=(i=null==(r=l.current)?void 0:r.filter)?i:dT;return e?o(e,n.current.search,t):0}function A(){if(!n.current.search||!1===l.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),o=0;r.forEach(t=>{o=Math.max(e.get(t),o)}),t.push([n,o])});let r=w.current;P().sort((t,n)=>{var r,i;let o=t.getAttribute("id"),a=n.getAttribute("id");return(null!=(r=e.get(a))?r:0)-(null!=(i=e.get(o))?i:0)}).forEach(e=>{let t=e.closest(dE);t?t.appendChild(e.parentElement===t?e:e.closest(`${dE} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${dE} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let n=null==(t=w.current)?void 0:t.querySelector(`${dw}[${dA}="${encodeURIComponent(e[0])}"]`);null==n||n.parentElement.appendChild(n)})}function T(){let e=P().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(dA);S.setState("value",t||void 0)}function R(){var e,t,a,s;if(!n.current.search||!1===l.current.shouldFilter){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let u=0;for(let i of r.current){let r=_(null!=(t=null==(e=o.current.get(i))?void 0:e.value)?t:"",null!=(s=null==(a=o.current.get(i))?void 0:a.keywords)?s:[]);n.current.filtered.items.set(i,r),r>0&&u++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=u}function O(){var e,t,n;let r=L();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(dw))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function L(){var e;return null==(e=w.current)?void 0:e.querySelector(`${dS}[aria-selected="true"]`)}function P(){var e;return Array.from((null==(e=w.current)?void 0:e.querySelectorAll(dC))||[])}function D(e){let t=P()[e];t&&S.setState("value",t.getAttribute(dA))}function N(e){var t;let n=L(),r=P(),i=r.findIndex(e=>e===n),o=r[i+e];null!=(t=l.current)&&t.loop&&(o=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),o&&S.setState("value",o.getAttribute(dA))}function I(e){let t=L(),n=null==t?void 0:t.closest(dw),r;for(;n&&!r;)r=null==(n=e>0?function(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}(n,dw):function(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}(n,dw))?void 0:n.querySelector(dC);r?S.setState("value",r.getAttribute(dA)):N(e)}let M=()=>D(P().length-1),j=e=>{e.preventDefault(),e.metaKey?M():e.altKey?I(1):N(1)},F=e=>{e.preventDefault(),e.metaKey?D(0):e.altKey?I(-1):N(-1)};return m.createElement(dk.div,{ref:t,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=v.onKeyDown)||t.call(v,e);let n=e.nativeEvent.isComposing||229===e.keyCode;if(!(e.defaultPrevented||n))switch(e.key){case"n":case"j":y&&e.ctrlKey&&j(e);break;case"ArrowDown":j(e);break;case"p":case"k":y&&e.ctrlKey&&F(e);break;case"ArrowUp":F(e);break;case"Home":e.preventDefault(),D(0);break;case"End":e.preventDefault(),M();break;case"Enter":{e.preventDefault();let t=L();if(t){let e=new Event(d_);t.dispatchEvent(e)}}}}},m.createElement("label",{"cmdk-label":"",htmlFor:C.inputId,id:C.labelId,style:dK},s),dW(e,e=>m.createElement(dO.Provider,{value:S},m.createElement(dR.Provider,{value:C},e))))}),dD=m.forwardRef((e,t)=>{var n,r;let i=uB(),o=m.useRef(null),a=m.useContext(dL),l=m.useContext(dR),s=dz(e),u=null!=(r=null==(n=s.current)?void 0:n.forceMount)?r:null==a?void 0:a.forceMount;dH(()=>{if(!u)return l.item(i,null==a?void 0:a.id)},[u]);let c=dq(i,o,[e.value,e.children,o],e.keywords),d=m.useContext(dO),f=dV(e=>e.value&&e.value===c.current),p=dV(e=>!!u||!1===l.filter()||!e.search||e.filtered.items.get(i)>0);function h(){var e,t;g(),null==(t=(e=s.current).onSelect)||t.call(e,c.current)}function g(){d.setState("value",c.current,!0)}if(m.useEffect(()=>{let t=o.current;if(!(!t||e.disabled))return t.addEventListener(d_,h),()=>t.removeEventListener(d_,h)},[p,e.onSelect,e.disabled]),!p)return null;let{disabled:y,value:v,onSelect:b,forceMount:x,keywords:k,...w}=e;return m.createElement(dk.div,{ref:uN(o,t),...w,id:i,"cmdk-item":"",role:"option","aria-disabled":!!y,"aria-selected":!!f,"data-disabled":!!y,"data-selected":!!f,onPointerMove:y||l.getDisablePointerSelection()?void 0:g,onClick:y?void 0:h},e.children)}),dN=m.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,a=uB(),l=m.useRef(null),s=m.useRef(null),u=uB(),c=m.useContext(dR),d=dV(e=>!!i||!1===c.filter()||!e.search||e.filtered.groups.has(a));dH(()=>c.group(a),[]),dq(a,l,[e.value,e.heading,s]);let f=m.useMemo(()=>({id:a,forceMount:i}),[i]);return m.createElement(dk.div,{ref:uN(l,t),...o,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&m.createElement("div",{ref:s,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),dW(e,e=>m.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},m.createElement(dL.Provider,{value:f},e))))}),dI=m.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=m.useRef(null),o=dV(e=>!e.search);return n||o?m.createElement(dk.div,{ref:uN(i,t),...r,"cmdk-separator":"",role:"separator"}):null}),dM=m.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=null!=e.value,o=m.useContext(dO),a=dV(e=>e.search),l=dV(e=>e.selectedItemId),s=m.useContext(dR);return m.useEffect(()=>{null!=e.value&&o.setState("search",e.value)},[e.value]),m.createElement(dk.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":s.listId,"aria-labelledby":s.labelId,"aria-activedescendant":l,id:s.inputId,type:"text",value:i?e.value:a,onChange:e=>{i||o.setState("search",e.target.value),null==n||n(e.target.value)}})}),dj=m.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,o=m.useRef(null),a=m.useRef(null),l=dV(e=>e.selectedItemId),s=m.useContext(dR);return m.useEffect(()=>{if(a.current&&o.current){let e=a.current,t=o.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty("--cmdk-list-height",n.toFixed(1)+"px")})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),m.createElement(dk.div,{ref:uN(o,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:s.listId},dW(e,e=>m.createElement("div",{ref:uN(a,s.listInnerRef),"cmdk-list-sizer":""},e)))}),dF=m.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:a,...l}=e;return m.createElement(c1,{open:n,onOpenChange:r},m.createElement(c3,{container:a},m.createElement(c8,{"cmdk-overlay":"",className:i}),m.createElement(dn,{"aria-label":e.label,"cmdk-dialog":"",className:o},m.createElement(dP,{ref:t,...l}))))}),dB=Object.assign(dP,{List:dj,Item:dD,Input:dM,Group:dN,Separator:dI,Dialog:dF,Empty:m.forwardRef((e,t)=>dV(e=>0===e.filtered.count)?m.createElement(dk.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Loading:m.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...o}=e;return m.createElement(dk.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},dW(e,e=>m.createElement("div",{"aria-hidden":!0},e)))})});function dz(e){let t=m.useRef(e);return dH(()=>{t.current=e}),t}var dH="u"<typeof window?m.useEffect:m.useLayoutEffect;function dU(e){let t=m.useRef();return void 0===t.current&&(t.current=e()),t}function dV(e){let t=m.useContext(dO),n=()=>e(t.snapshot());return m.useSyncExternalStore(t.subscribe,n,n)}function dq(e,t,n,r=[]){let i=m.useRef(),o=m.useContext(dR);return dH(()=>{var a;let l=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():i.current}})(),s=r.map(e=>e.trim());o.value(e,l,s),null==(a=t.current)||a.setAttribute(dA,l),i.current=l}),i}var d$=()=>{let[e,t]=m.useState(),n=dU(()=>new Map);return dH(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function dW({asChild:e,children:t},n){let r;return e&&m.isValidElement(t)?m.cloneElement("function"==typeof(r=t.type)?r(t.props):"render"in r?r.render(t.props):t,{ref:t.ref},n(t.props.children)):n(t)}var dK={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};e.i(69068);var dY=e.i(25913),dX=e.i(10012),dJ=e.i(41247);function dQ({className:e,...t}){return(0,h.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,uE.cn)("group/input-group relative flex h-7 w-full min-w-0 items-center rounded-md border border-input bg-input/20 transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-data-[align=block-end]:rounded-md has-data-[align=block-start]:rounded-md has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-2 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[textarea]:rounded-md has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...t})}let dG=(0,dY.cva)("flex h-auto cursor-text items-center justify-center gap-1 py-2 text-xs/relaxed font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-[calc(var(--radius-sm)-2px)] **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1 **:data-[slot=kbd]:text-[0.625rem] [&>svg:not([class*='size-'])]:size-3.5",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.275rem] has-[>kbd]:ml-[-0.275rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.275rem] has-[>kbd]:mr-[-0.275rem]","block-start":"order-first w-full justify-start px-2 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function dZ({className:e,align:t="inline-start",...n}){return(0,h.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:(0,uE.cn)(dG({align:t}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}(0,dY.cva)("flex items-center gap-2 rounded-md text-xs/relaxed shadow-none",{variants:{size:{xs:"h-5 gap-1 rounded-[calc(var(--radius-sm)-2px)] px-1 [&>svg:not([class*='size-'])]:size-3",sm:"gap-1","icon-xs":"size-6 p-0 has-[>svg]:p-0","icon-sm":"size-7 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});let d0=(0,rQ.default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["default",0,d0],54943);var d1=e.i(78745);e.s(["CheckIcon",()=>d1.default],78784);var d1=d1;function d2({className:e,...t}){return(0,h.jsx)(dB,{"data-slot":"command",className:(0,uE.cn)("flex size-full flex-col overflow-hidden rounded-xl bg-popover p-1 text-popover-foreground",e),...t})}function d4({className:e,...t}){return(0,h.jsx)("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:(0,h.jsxs)(dQ,{className:"h-8! bg-input/20 dark:bg-input/30",children:[(0,h.jsx)(dB.Input,{"data-slot":"command-input",className:(0,uE.cn)("w-full text-xs/relaxed outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t}),(0,h.jsx)(dZ,{children:(0,h.jsx)(d0,{className:"size-3.5 shrink-0 opacity-50"})})]})})}function d6({className:e,...t}){return(0,h.jsx)(dB.List,{"data-slot":"command-list",className:(0,uE.cn)("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",e),...t})}function d5({className:e,...t}){return(0,h.jsx)(dB.Empty,{"data-slot":"command-empty",className:(0,uE.cn)("py-6 text-center text-xs/relaxed",e),...t})}function d3({className:e,...t}){return(0,h.jsx)(dB.Group,{"data-slot":"command-group",className:(0,uE.cn)("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2.5 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",e),...t})}function d9({className:e,children:t,...n}){return(0,h.jsxs)(dB.Item,{"data-slot":"command-item",className:(0,uE.cn)("group/command-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2.5 py-1.5 text-xs/relaxed outline-hidden select-none in-data-[slot=dialog-content]:rounded-md data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-selected:*:[svg]:text-foreground",e),...n,children:[t,(0,h.jsx)(d1.default,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}function d8({options:e,value:t,onChange:n,placeholder:r="Select option",disabled:i=!1,className:o="",allowCustomValue:a=!1,multiple:l=!1,onClear:s,showClearButton:u=!1}){let[c,d]=(0,m.useState)(!1),[f,p]=(0,m.useState)(""),g=(0,m.useRef)(null),y=(0,m.useMemo)(()=>Array.isArray(t)?t:[t],[t]),v=(0,m.useMemo)(()=>{if(l){if(1===y.length&&"all"===y[0]){let t=e.find(e=>"all"===e.value);return t?.label||""}return y.filter(e=>"all"!==e).map(t=>e.find(e=>e.value===t)?.label).filter(Boolean).join(", ")}return y.map(t=>e.find(e=>e.value===t)?.label).filter(Boolean).join(", ")},[y,e,l]),b=(0,m.useMemo)(()=>{let t={};for(let n of e){let e=n.group||"Other";t[e]||(t[e]=[]),t[e].push(n)}return t},[e]),x=(0,m.useMemo)(()=>Object.keys(b).length>1||!b.Other,[b]),k=e=>{if(l){let t=[...y],r=t.indexOf(e);r>=0?t.splice(r,1):t.push(e),n(t.length>0?t:[])}else n(e),d(!1)},w=()=>{a&&f&&!l&&(n(f),d(!1))};return(0,h.jsxs)(uS,{open:c,onOpenChange:e=>{d(e),e||p("")},children:[(0,h.jsxs)("div",{className:`relative ${o}`,children:[(0,h.jsx)(uC,{ref:g,disabled:i,className:`flex h-9 w-full items-center justify-between pl-3 ${u?"pr-16":"pr-10"} border border-input rounded-md text-sm bg-input/20 dark:bg-input/30 text-foreground transition-colors outline-none hover:border-ring focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 data-[state=open]:border-ring data-[state=open]:ring-2 data-[state=open]:ring-ring/30 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none cursor-pointer overflow-hidden text-ellipsis whitespace-nowrap text-left shadow-xs`,children:(0,h.jsx)("span",{className:"truncate",children:v||(0,h.jsx)("span",{className:"text-muted-foreground",children:r})})}),u&&s&&(0,h.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s()},className:"absolute right-8 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors cursor-pointer z-10","aria-label":"Clear selection",children:(0,h.jsx)(ld.X,{className:"w-4 h-4"})}),(0,h.jsx)(lc,{className:"absolute right-2 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground pointer-events-none"})]}),(0,h.jsx)(u_,{className:"w-[var(--anchor-width)] p-0",align:"start",sideOffset:4,children:(0,h.jsxs)(d2,{filter:(t,n)=>{let r=e.find(e=>e.value===t);return r?+!!`${r.label} ${r.group||""}`.toLowerCase().includes(n.toLowerCase()):0},children:[(0,h.jsx)(d4,{placeholder:"Search...",value:f,onValueChange:p,onKeyDown:e=>{"Enter"===e.key&&a&&w()}}),(0,h.jsxs)(d6,{children:[(0,h.jsx)(d5,{children:a&&f?(0,h.jsxs)("button",{type:"button",className:"w-full px-2 py-1.5 text-left text-xs cursor-pointer hover:bg-accent rounded",onClick:w,children:['Use "',f,'"']}):"No options found"}),x?Object.entries(b).map(([e,t])=>(0,h.jsx)(d3,{heading:e,children:t.map(e=>(0,h.jsx)(d9,{value:e.value,"data-checked":y.includes(e.value),onSelect:()=>k(e.value),children:(0,h.jsx)("span",{className:"truncate",children:e.label})},e.value))},e)):(0,h.jsx)(d3,{children:e.map(e=>(0,h.jsx)(d9,{value:e.value,"data-checked":y.includes(e.value),onSelect:()=>k(e.value),children:(0,h.jsx)("span",{className:"truncate",children:e.label})},e.value))})]})]})})]})}let d7=(0,rQ.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);var fe=e.i(86536),ft=e.i(70935);function fn({value:e,onChange:t,editorRef:n,theme:r,activeTab:i,onTabChange:o,disabled:a,onFocusChange:l}){let s=(0,m.useCallback)(e=>{t(e??"")},[t]),u=(0,h.jsx)("div",{className:"border border-border rounded overflow-hidden h-full",children:(0,h.jsx)(g.Editor,{height:"100%",defaultLanguage:"markdown",value:e,onChange:s,onMount:e=>{n.current=e,e.layout(),e.onDidFocusEditorText(()=>l?.(!0)),e.onDidBlurEditorText(()=>l?.(!1))},options:{minimap:{enabled:!1},lineNumbers:"on",wordWrap:"on",fontSize:13,scrollBeyondLastLine:!1,readOnly:a},theme:"dark"===r?"vs-dark":"vs-light"})}),c=(0,h.jsx)("div",{className:"border border-border rounded overflow-y-auto h-full p-4 prose prose-sm prose-slate dark:prose-invert max-w-none",children:e?(0,h.jsx)(nB,{remarkPlugins:[rJ],components:li,children:e}):(0,h.jsx)("p",{className:"text-muted-foreground italic",children:"No content"})});return(0,h.jsxs)("div",{className:"flex flex-col flex-1 min-h-0",children:[(0,h.jsxs)("div",{className:"flex gap-1 mb-2 md:hidden flex-shrink-0",children:[(0,h.jsxs)(r1.Button,{type:"button",variant:"editor"===i?"default":"outline",size:"sm",onClick:()=>o("editor"),children:[(0,h.jsx)(d7,{className:"w-4 h-4 mr-1"}),"Editor"]}),(0,h.jsxs)(r1.Button,{type:"button",variant:"preview"===i?"default":"outline",size:"sm",onClick:()=>o("preview"),children:[(0,h.jsx)(fe.Eye,{className:"w-4 h-4 mr-1"}),"Preview"]})]}),(0,h.jsxs)("div",{className:"hidden md:grid md:grid-cols-2 md:gap-4 flex-1 min-h-0",children:[u,c]}),(0,h.jsx)("div",{className:"md:hidden flex-1 min-h-0",children:"editor"===i?u:c})]})}e.s(["TaskDialog",0,function({mode:e,isOpen:t,onClose:n,repositories:r=[],defaultRepo:i,task:o,onUpdate:a}){let l=ls(),[s,u]=(0,m.useState)(""),[c,d]=(0,m.useState)([]),[f,p]=(0,m.useState)(""),[g,y]=(0,m.useState)(!1),[v,b]=(0,m.useState)(""),[x,k]=(0,m.useState)({title:"",description:"",owner:"",repo:"",branch:"",baseBranch:"",status:"backlog",effort:void 0,order:void 0}),[w,E]=(0,m.useState)(!1),[S,C]=(0,m.useState)({}),[_,A]=(0,m.useState)("editor"),[T,R]=(0,m.useState)(!1),O=(0,m.useRef)(null),{effectiveTheme:L}=(0,lo.useTheme)();(0,m.useEffect)(()=>{"edit"===e&&o&&k({title:o.title,description:o.description,owner:o.owner,repo:o.repo,branch:o.branch,baseBranch:"",status:o.status,effort:o.effort,order:o.order})},[e,o,t]);let P=i?.owner,D=i?.repo;(0,m.useEffect)(()=>{"create"===e&&t&&(u(P&&D?`${P}/${D}`:""),k(e=>({...e,owner:P??"",repo:D??"",baseBranch:""})))},[e,t,P,D]);let N=(0,m.useMemo)(()=>r.map(e=>({value:`${e.owner}/${e.repo}`,label:`${e.owner}/${e.repo}`})),[r]),I=(0,m.useMemo)(()=>c.map(e=>({value:e,label:e===f?`${e} (default)`:e})),[c,f]);(0,m.useEffect)(()=>{if("create"===e){if(!s){d([]),p(""),k(e=>({...e,baseBranch:""}));return}(async()=>{y(!0),b("");try{let[e,t]=s.split("/"),n=await fetch((0,ft.apiUrl)(`/api/repos/${e}/${t}/branches`));if(!n.ok)throw Error("Failed to fetch branches");let r=await n.json();d(r.data.branches),p(r.data.defaultBranch),k(e=>({...e,baseBranch:r.data.defaultBranch}))}catch(e){console.error("Failed to fetch branches:",e),b("Failed to load branches. Repository may not be initialized."),d([]),p("")}finally{y(!1)}})()}},[s,e]);let M=async t=>{if(t.preventDefault(),C({}),"create"===e){E(!0);try{let e=await fetch((0,ft.apiUrl)("/api/tasks/validate"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:x.title,owner:x.owner,repo:x.repo,branch:x.branch})}),t=await e.json();if(!t.valid){let e={};t.errors.forEach(t=>{e[t.field]=t.message}),C(e),E(!1);return}let r={title:x.title,description:x.description,owner:x.owner,repo:x.repo,branch:x.branch,baseBranch:x.baseBranch};n(),u(""),k({title:"",description:"",owner:"",repo:"",branch:"",baseBranch:"",status:"backlog",effort:void 0,order:void 0}),E(!1);let i=l.loading("Creating task...",r.title);try{if(!(await fetch((0,ft.apiUrl)("/api/tasks"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})).ok)throw Error("Failed to create task");l.dismiss(i)}catch(t){let e=t instanceof Error?t.message:"Unknown error";l.error(i,"Failed to create task",e)}}catch(t){E(!1);let e=t instanceof Error?t.message:"Validation failed";l.error(void 0,"Validation failed",e)}}else if("edit"===e&&a&&o){E(!0);try{let e=await a(o.id,{title:x.title,description:x.description,status:x.status,effort:x.effort,order:x.order});if(e.success)n();else if(e.errors){let t={};e.errors.forEach(e=>{t[e.field]=e.message}),C(t)}}catch(e){console.error("Failed to update task:",e),C({global:e instanceof Error?e.message:"Failed to update task. Please try again."})}finally{E(!1)}}},j="create"===e,F=j?"Add New Task":"Edit Task",B=j?"Create":"Save";return(0,h.jsxs)(lu.Dialog,{open:t,onOpenChange:e=>{e.open||w||n()},title:F,maxWidth:j?"2xl":"6xl",fullScreen:!j,showCloseButton:!w,dismissOnEsc:!T,children:[w&&(0,h.jsx)("div",{className:"absolute inset-0 bg-card bg-opacity-90 rounded-lg flex items-center justify-center z-10",children:(0,h.jsx)(la.LoadingSpinner,{size:"lg",message:j?"Creating task...":"Saving task..."})}),S.global&&(0,h.jsx)("div",{className:"mb-4 p-3 bg-destructive/10 border border-destructive/50 rounded text-destructive text-sm",children:S.global}),(0,h.jsxs)("form",{onSubmit:M,className:j?"space-y-4":"flex flex-col gap-4 flex-1 min-h-0 overflow-hidden",children:[j&&(0,h.jsxs)("div",{children:[(0,h.jsx)("label",{className:"block text-sm font-medium mb-1 text-foreground",children:"Repository *"}),i?(0,h.jsxs)("p",{className:"rounded-md bg-muted/50 px-3 py-2 text-sm text-muted-foreground",children:[i.owner,"/",i.repo]}):(0,h.jsx)(d8,{options:N,value:s,onChange:e=>{let t=Array.isArray(e)?e[0]||"":e;if(u(t),t){let[e,n]=t.split("/");k(t=>({...t,owner:e,repo:n,baseBranch:""}))}else k(e=>({...e,owner:"",repo:"",baseBranch:""}))},placeholder:"Select repository",disabled:w})]}),(0,h.jsxs)("div",{children:[(0,h.jsx)("label",{className:"block text-sm font-medium mb-1 text-foreground",children:"Title *"}),(0,h.jsx)(dX.Input,{type:"text",required:!0,maxLength:200,value:x.title,onChange:e=>k({...x,title:e.target.value}),className:"w-full",disabled:w})]}),!j&&o&&(0,h.jsxs)("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 p-3 bg-muted/50 rounded-md text-sm",children:[(0,h.jsxs)("div",{children:[(0,h.jsx)("span",{className:"font-medium text-foreground",children:"Repository"}),(0,h.jsxs)("p",{className:"text-muted-foreground",children:[o.owner,"/",o.repo]})]}),(0,h.jsxs)("div",{children:[(0,h.jsx)("span",{className:"font-medium text-foreground",children:"Branch"}),(0,h.jsx)("p",{className:"text-muted-foreground",children:o.branch})]}),(0,h.jsxs)("div",{children:[(0,h.jsx)("span",{className:"font-medium text-foreground",children:"Base Branch"}),(0,h.jsx)("p",{className:"text-muted-foreground",children:o.baseBranch||"N/A"})]}),(0,h.jsxs)("div",{children:[(0,h.jsx)("span",{className:"font-medium text-foreground",children:"Worktree"}),(0,h.jsx)("p",{className:"text-muted-foreground capitalize",children:o.worktreeStatus})]})]}),(0,h.jsxs)("div",{className:j?"":"flex flex-col flex-1 min-h-0",children:[(0,h.jsx)("label",{className:"block text-sm font-medium mb-1 text-foreground flex-shrink-0",children:"Description"}),j?(0,h.jsx)(dJ.Textarea,{maxLength:5e3,value:x.description,onChange:e=>k({...x,description:e.target.value}),className:"min-h-24 w-full",disabled:w}):(0,h.jsx)(fn,{value:x.description,onChange:e=>k(t=>({...t,description:e})),editorRef:O,theme:L,activeTab:_,onTabChange:A,disabled:w,onFocusChange:R})]}),!j&&(0,h.jsxs)("div",{className:"grid grid-cols-3 gap-4 flex-shrink-0",children:[(0,h.jsxs)("div",{children:[(0,h.jsx)("label",{className:"block text-sm font-medium mb-1 text-foreground",children:"Status"}),(0,h.jsxs)("select",{value:x.status,onChange:e=>k({...x,status:e.target.value}),className:"w-full h-9 pl-3 pr-10 py-1 rounded-md border border-input bg-transparent text-sm shadow-xs text-foreground",disabled:w,children:[(0,h.jsx)("option",{value:"backlog",children:"Backlog"}),(0,h.jsx)("option",{value:"planning",children:"Planning"}),(0,h.jsx)("option",{value:"tasking",children:"Tasking"}),(0,h.jsx)("option",{value:"coding",children:"Coding"}),(0,h.jsx)("option",{value:"reviewing",children:"Reviewing"}),(0,h.jsx)("option",{value:"done",children:"Done"})]})]}),(0,h.jsxs)("div",{children:[(0,h.jsx)("label",{className:"block text-sm font-medium mb-1 text-foreground",children:"Effort (h)"}),(0,h.jsx)(dX.Input,{type:"number",step:"0.5",min:"0.5",max:"40",value:x.effort??"",onChange:e=>k({...x,effort:parseFloat(e.target.value)||void 0}),className:"w-full",placeholder:"2.5",disabled:w})]}),(0,h.jsxs)("div",{children:[(0,h.jsx)("label",{className:"block text-sm font-medium mb-1 text-foreground",children:"Order"}),(0,h.jsx)(dX.Input,{type:"number",min:"0",value:x.order??"",onChange:e=>k({...x,order:parseInt(e.target.value)||void 0}),className:"w-full",placeholder:"0",disabled:w})]})]}),j&&(0,h.jsxs)("div",{children:[(0,h.jsx)("label",{className:"block text-sm font-medium mb-1 text-foreground",children:"Base Branch *"}),g?(0,h.jsxs)("div",{className:"w-full h-9 px-3 rounded-md border border-input bg-transparent text-muted-foreground flex items-center gap-2",children:[(0,h.jsx)(la.LoadingSpinner,{size:"sm"}),(0,h.jsx)("span",{className:"text-xs",children:"Loading branches..."})]}):c.length>0?(0,h.jsx)(d8,{options:I,value:x.baseBranch,onChange:e=>{let t=Array.isArray(e)?e[0]||"":e;k({...x,baseBranch:t})},placeholder:"Select base branch",disabled:w}):(0,h.jsx)("div",{className:"w-full h-9 px-3 rounded-md border border-input bg-transparent text-sm text-muted-foreground flex items-center",children:v||"Select repository first"}),(0,h.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Your new branch will be created from this branch"})]}),j&&(0,h.jsxs)("div",{children:[(0,h.jsx)("label",{className:"block text-sm font-medium mb-1 text-foreground",children:"New Branch Name *"}),(0,h.jsx)(dX.Input,{type:"text",required:!0,maxLength:255,value:x.branch,onChange:e=>k({...x,branch:e.target.value}),className:`w-full ${S.branch?"border-destructive":""}`,placeholder:"feature/new-feature",disabled:w,"aria-invalid":!!S.branch}),S.branch&&(0,h.jsx)("p",{className:"text-xs text-destructive mt-1",children:S.branch}),!S.branch&&(0,h.jsxs)("p",{className:"text-xs text-muted-foreground mt-1",children:["Will be created from ",x.baseBranch||"base branch"]})]}),(0,h.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,h.jsx)(r1.Button,{type:"button",variant:"outline",size:"lg",onClick:n,className:"active:scale-95",disabled:w,children:"Cancel"}),(0,h.jsx)(r1.Button,{type:"submit",size:"lg",className:"active:scale-95",disabled:w||j&&g,children:B})]})]})]})}],10483)},86311,e=>{"use strict";let t=(0,e.i(75254).default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);e.s(["MessageSquare",0,t],86311)},73884,e=>{"use strict";let t=(0,e.i(75254).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,t],73884)},2576,96085,e=>{"use strict";let t,n,r;var i,o,a=e.i(71645);let l=Object.create(null);l.open="0",l.close="1",l.ping="2",l.pong="3",l.message="4",l.upgrade="5",l.noop="6";let s=Object.create(null);Object.keys(l).forEach(e=>{s[l[e]]=e});let u={type:"error",data:"parser error"},c="function"==typeof Blob||"u">typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),d="function"==typeof ArrayBuffer,f=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,p=({type:e,data:t},n,r)=>{if(c&&t instanceof Blob)if(n)return r(t);else return h(t,r);if(d&&(t instanceof ArrayBuffer||f(t)))if(n)return r(t);else return h(new Blob([t]),r);return r(l[e]+(t||""))},h=(e,t)=>{let n=new FileReader;return n.onload=function(){t("b"+(n.result.split(",")[1]||""))},n.readAsDataURL(e)};function m(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y="u"<typeof Uint8Array?[]:new Uint8Array(256);for(let e=0;e<g.length;e++)y[g.charCodeAt(e)]=e;let v="function"==typeof ArrayBuffer,b=(e,t)=>{if("string"!=typeof e)return{type:"message",data:k(e,t)};let n=e.charAt(0);return"b"===n?{type:"message",data:x(e.substring(1),t)}:s[n]?e.length>1?{type:s[n],data:e.substring(1)}:{type:s[n]}:u},x=(e,t)=>v?k((e=>{let t=.75*e.length,n=e.length,r,i=0,o,a,l,s;"="===e[e.length-1]&&(t--,"="===e[e.length-2]&&t--);let u=new ArrayBuffer(t),c=new Uint8Array(u);for(r=0;r<n;r+=4)o=y[e.charCodeAt(r)],a=y[e.charCodeAt(r+1)],l=y[e.charCodeAt(r+2)],s=y[e.charCodeAt(r+3)],c[i++]=o<<2|a>>4,c[i++]=(15&a)<<4|l>>2,c[i++]=(3&l)<<6|63&s;return u})(e),t):{base64:!0,data:e},k=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer;function w(e){return e.reduce((e,t)=>e+t.length,0)}function E(e,t){if(e[0].length===t)return e.shift();let n=new Uint8Array(t),r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function S(e){if(e){var t=e;for(var n in S.prototype)t[n]=S.prototype[n];return t}}S.prototype.on=S.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},S.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},S.prototype.off=S.prototype.removeListener=S.prototype.removeAllListeners=S.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},S.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},S.prototype.emitReserved=S.prototype.emit,S.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},S.prototype.hasListeners=function(e){return!!this.listeners(e).length};let C="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),_="u">typeof self?self:"u">typeof window?window:Function("return this")();function A(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}let T=_.setTimeout,R=_.clearTimeout;function O(e,t){t.useNativeTimers?(e.setTimeoutFn=T.bind(_),e.clearTimeoutFn=R.bind(_)):(e.setTimeoutFn=_.setTimeout.bind(_),e.clearTimeoutFn=_.clearTimeout.bind(_))}function L(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class P extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class D extends S{constructor(e){super(),this.writable=!1,O(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved("error",new P(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return("opening"===this.readyState||"open"===this.readyState)&&(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let t=b(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return -1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){let t=function(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}(e);return t.length?"?"+t:""}}class N extends D{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once("pollComplete",function(){--e||t()})),this.writable||(e++,this.once("drain",function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let t=e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)};((e,t)=>{let n=e.split("\x1e"),r=[];for(let e=0;e<n.length;e++){let i=b(n[e],t);if(r.push(i),"error"===i.type)break}return r})(e,this.socket.binaryType).forEach(t),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){var t;let n,r,i;this.writable=!1,t=e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})},r=Array(n=e.length),i=0,e.forEach((e,o)=>{p(e,!1,e=>{r[o]=e,++i===n&&t(r.join("\x1e"))})})}uri(){let e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=L()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}}let I=!1;try{I="u">typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){}let M=I;function j(){}class F extends N{constructor(e){if(super(e),"u">typeof location){const t="https:"===location.protocol;let n=location.port;n||(n=t?"443":"80"),this.xd="u">typeof location&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){let n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",(e,t)=>{this.onError("xhr post error",e,t)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(e,t)=>{this.onError("xhr poll error",e,t)}),this.pollXhr=e}}class B extends S{constructor(e,t,n){super(),this.createRequest=e,O(this,n),this._opts=n,this._method=n.method||"GET",this._uri=t,this._data=void 0!==n.data?n.data:null,this._create()}_create(){var e;let t=A(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;let n=this._xhr=this.createRequest(t);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders)for(let e in n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0),this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&n.setRequestHeader(e,this._opts.extraHeaders[e])}catch(e){}if("POST"===this._method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{n.setRequestHeader("Accept","*/*")}catch(e){}null==(e=this._opts.cookieJar)||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var e;3===n.readyState&&(null==(e=this._opts.cookieJar)||e.parseCookies(n.getResponseHeader("set-cookie"))),4===n.readyState&&(200===n.status||1223===n.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof n.status?n.status:0)},0))},n.send(this._data)}catch(e){this.setTimeoutFn(()=>{this._onError(e)},0);return}"u">typeof document&&(this._index=B.requestsCount++,B.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=j,e)try{this._xhr.abort()}catch(e){}"u">typeof document&&delete B.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}function z(){for(let e in B.requests)B.requests.hasOwnProperty(e)&&B.requests[e].abort()}B.requestsCount=0,B.requests={},"u">typeof document&&("function"==typeof attachEvent?attachEvent("onunload",z):"function"==typeof addEventListener&&addEventListener("onpagehide"in _?"pagehide":"unload",z,!1));let H=(r=U({xdomain:!1}))&&null!==r.responseType;function U(e){let t=e.xdomain;try{if("u">typeof XMLHttpRequest&&(!t||M))return new XMLHttpRequest}catch(e){}if(!t)try{return new _[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(e){}}let V="u">typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class q extends D{get name(){return"websocket"}doOpen(){let e=this.uri(),t=this.opts.protocols,n=V?{}:A(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;p(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch(e){}r&&C(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=L()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}let $=_.WebSocket||_.MozWebSocket,W={websocket:class extends q{createSocket(e,t,n){return V?new $(e,t,n):t?new $(e,t):new $(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends D{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{var r,i;let o,a,l,s,h=(r=Number.MAX_SAFE_INTEGER,i=this.socket.binaryType,n||(n=new TextDecoder),o=[],a=0,l=-1,s=!1,new TransformStream({transform(e,t){for(o.push(e);;){if(0===a){if(1>w(o))break;let e=E(o,1);s=(128&e[0])==128,a=(l=127&e[0])<126?3:126===l?1:2}else if(1===a){if(2>w(o))break;let e=E(o,2);l=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),a=3}else if(2===a){if(8>w(o))break;let e=E(o,8),n=new DataView(e.buffer,e.byteOffset,e.length),r=n.getUint32(0);if(r>2097151){t.enqueue(u);break}l=0x100000000*r+n.getUint32(4),a=3}else{if(w(o)<l)break;let e=E(o,l);t.enqueue(b(s?e:n.decode(e),i)),a=0}if(0===l||l>r){t.enqueue(u);break}}}})),g=e.readable.pipeThrough(h).getReader(),y=new TransformStream({transform(e,n){var r;r=t=>{let r,i=t.length;if(i<126)new DataView((r=new Uint8Array(1)).buffer).setUint8(0,i);else if(i<65536){let e=new DataView((r=new Uint8Array(3)).buffer);e.setUint8(0,126),e.setUint16(1,i)}else{let e=new DataView((r=new Uint8Array(9)).buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(i))}e.data&&"string"!=typeof e.data&&(r[0]|=128),n.enqueue(r),n.enqueue(t)},c&&e.data instanceof Blob?e.data.arrayBuffer().then(m).then(r):d&&(e.data instanceof ArrayBuffer||f(e.data))?r(m(e.data)):p(e,!1,e=>{t||(t=new TextEncoder),r(t.encode(e))})}});y.readable.pipeTo(e.writable),this._writer=y.writable.getWriter();let v=()=>{g.read().then(({done:e,value:t})=>{e||(this.onPacket(t),v())}).catch(e=>{})};v();let x={type:"open"};this.query.sid&&(x.data=`{"sid":"${this.query.sid}"}`),this._writer.write(x).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&C(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null==(e=this._transport)||e.close()}},polling:class extends F{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=H&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new B(U,this.uri(),e)}}},K=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Y=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function X(e){var t,n;let r,i;if(e.length>8e3)throw"URI too long";let o=e,a=e.indexOf("["),l=e.indexOf("]");-1!=a&&-1!=l&&(e=e.substring(0,a)+e.substring(a,l).replace(/:/g,";")+e.substring(l,e.length));let s=K.exec(e||""),u={},c=14;for(;c--;)u[Y[c]]=s[c]||"";return -1!=a&&-1!=l&&(u.source=o,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),r=(t=u.path).replace(/\/{2,9}/g,"/").split("/"),("/"==t.slice(0,1)||0===t.length)&&r.splice(0,1),"/"==t.slice(-1)&&r.splice(r.length-1,1),u.pathNames=r,n=u.query,i={},n.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,n){t&&(i[t]=n)}),u.queryKey=i,u}let J="function"==typeof addEventListener&&"function"==typeof removeEventListener,Q=[];J&&addEventListener("offline",()=>{Q.forEach(e=>e())},!1);class G extends S{constructor(e,t){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&"object"==typeof e&&(t=e,e=null),e){const n=X(e);t.hostname=n.host,t.secure="https"===n.protocol||"wss"===n.protocol,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=X(t.host).host);O(this,t),this.secure=null!=t.secure?t.secure:"u">typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("u">typeof location?location.hostname:"localhost"),this.port=t.port||("u">typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{let t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},n=e.split("&");for(let e=0,r=n.length;e<r;e++){let r=n[e].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}(this.opts.query)),J&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Q.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);let n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);let e=this.opts.rememberUpgrade&&G.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";let t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",G.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let t=Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){let n=this.writeBuffer[t].data;if(n&&(e+="string"==typeof n?function(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)(t=e.charCodeAt(r))<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(n):Math.ceil(1.33*(n.byteLength||n.size))),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,C(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket("message",e,t,n),this}send(e,t,n){return this._sendPacket("message",e,t,n),this}_sendPacket(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;let i={type:e,data:t,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return("opening"===this.readyState||"open"===this.readyState)&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(G.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),J&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let e=Q.indexOf(this._offlineEventListener);-1!==e&&Q.splice(e,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}G.protocol=4;class Z extends G{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;G.priorWebsocketSuccess=!1;let r=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",e=>{if(!n)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;G.priorWebsocketSuccess="websocket"===t.name,this.transport.pause(()=>{n||"closed"!==this.readyState&&(u(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{let e=Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}}))};function i(){n||(n=!0,u(),t.close(),t=null)}let o=e=>{let n=Error("probe error: "+e);n.transport=t.name,i(),this.emitReserved("upgradeError",n)};function a(){o("transport closed")}function l(){o("socket closed")}function s(e){t&&e.name!==t.name&&i()}let u=()=>{t.removeListener("open",r),t.removeListener("error",o),t.removeListener("close",a),this.off("close",l),this.off("upgrading",s)};t.once("open",r),t.once("error",o),t.once("close",a),this.once("close",l),this.once("upgrading",s),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}class ee extends Z{constructor(e,t={}){const n="object"==typeof e?e:t;(!n.transports||n.transports&&"string"==typeof n.transports[0])&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(e=>W[e]).filter(e=>!!e)),super(e,n)}}ee.protocol;let et="function"==typeof ArrayBuffer,en=Object.prototype.toString,er="function"==typeof Blob||"u">typeof Blob&&"[object BlobConstructor]"===en.call(Blob),ei="function"==typeof File||"u">typeof File&&"[object FileConstructor]"===en.call(File);function eo(e){return et&&(e instanceof ArrayBuffer||("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer))||er&&e instanceof Blob||ei&&e instanceof File}let ea=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];(i=o||(o={}))[i.CONNECT=0]="CONNECT",i[i.DISCONNECT=1]="DISCONNECT",i[i.EVENT=2]="EVENT",i[i.ACK=3]="ACK",i[i.CONNECT_ERROR=4]="CONNECT_ERROR",i[i.BINARY_EVENT=5]="BINARY_EVENT",i[i.BINARY_ACK=6]="BINARY_ACK";class el extends S{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},"function"==typeof e?{reviver:e}:e)}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw Error("got plaintext data when reconstructing a packet");let n=(t=this.decodeString(e)).type===o.BINARY_EVENT;n||t.type===o.BINARY_ACK?(t.type=n?o.EVENT:o.ACK,this.reconstructor=new es(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(eo(e)||e.base64)if(this.reconstructor)(t=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw Error("got binary data when not reconstructing a packet");else throw Error("Unknown type: "+e)}decodeString(e){let t=0,n={type:Number(e.charAt(0))};if(void 0===o[n.type])throw Error("unknown packet type "+n.type);if(n.type===o.BINARY_EVENT||n.type===o.BINARY_ACK){let r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);let i=e.substring(r,t);if(i!=Number(i)||"-"!==e.charAt(t))throw Error("Illegal attachments");let o=Number(i);if(!eu(o)||o<0)throw Error("Illegal attachments");if(o>this.opts.maxAttachments)throw Error("too many attachments");n.attachments=o}if("/"===e.charAt(t+1)){let r=t+1;for(;++t&&","!==e.charAt(t)&&t!==e.length;);n.nsp=e.substring(r,t)}else n.nsp="/";let r=e.charAt(t+1);if(""!==r&&Number(r)==r){let r=t+1;for(;++t;){let n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){let r=this.tryParse(e.substr(t));if(el.isPayloadValid(n.type,r))n.data=r;else throw Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case o.CONNECT:return ec(t);case o.DISCONNECT:return void 0===t;case o.CONNECT_ERROR:return"string"==typeof t||ec(t);case o.EVENT:case o.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===ea.indexOf(t[0]));case o.ACK:case o.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class es{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t,n;let e=(t=this.reconPack,n=this.buffers,t.data=function e(t,n){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<n.length)return n[t.num];throw Error("illegal attachments")}if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=e(t[r],n);else if("object"==typeof t)for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=e(t[r],n));return t}(t.data,n),delete t.attachments,t);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}let eu=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function ec(e){return"[object Object]"===Object.prototype.toString.call(e)}function ed(e,t,n){return e.on(t,n),function(){e.off(t,n)}}e.s(["Decoder",0,el,"Encoder",0,class{constructor(e){this.replacer=e}encode(e){return(e.type===o.EVENT||e.type===o.ACK)&&function e(t,n){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(e(t[n]))return!0;return!1}if(eo(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1==arguments.length)return e(t.toJSON(),!0);for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return!0;return!1}(e)?this.encodeAsBinary({type:e.type===o.EVENT?o.BINARY_EVENT:o.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===o.BINARY_EVENT||e.type===o.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t,n,r=(t=[],n=e.data,e.data=function e(t,n){if(!t)return t;if(eo(t)){let e={_placeholder:!0,num:n.length};return n.push(t),e}if(Array.isArray(t)){let r=Array(t.length);for(let i=0;i<t.length;i++)r[i]=e(t[i],n);return r}if("object"==typeof t&&!(t instanceof Date)){let r={};for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=e(t[i],n));return r}return t}(n,t),e.attachments=t.length,{packet:e,buffers:t}),i=this.encodeAsString(r.packet),o=r.buffers;return o.unshift(i),o}},"PacketType",0,o,"isPacketValid",0,function(e){var t;return"string"==typeof e.nsp&&(void 0===(t=e.id)||eu(t))&&function(e,t){switch(e){case o.CONNECT:return void 0===t||ec(t);case o.DISCONNECT:return void 0===t;case o.EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===ea.indexOf(t[0]));case o.ACK:return Array.isArray(t);case o.CONNECT_ERROR:return"string"==typeof t||ec(t);default:return!1}}(e.type,e.data)},"protocol",0,5],51890);let ef=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ep extends S{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[ed(e,"open",this.onopen.bind(this)),ed(e,"packet",this.onpacket.bind(this)),ed(e,"error",this.onerror.bind(this)),ed(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var n,r,i;if(ef.hasOwnProperty(e))throw Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let a={type:o.EVENT,data:t};if(a.options={},a.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){let e=this.ids++,n=t.pop();this._registerAckCallback(e,n),a.id=e}let l=null==(r=null==(n=this.io.engine)?void 0:n.transport)?void 0:r.writable,s=this.connected&&!(null==(i=this.io.engine)?void 0:i._hasPingExpired());return this.flags.volatile&&!l||(s?(this.notifyOutgoingListeners(a),this.packet(a)):this.sendBuffer.push(a)),this.flags={},this}_registerAckCallback(e,t){var n;let r=null!=(n=this.flags.timeout)?n:this._opts.ackTimeout;if(void 0===r){this.acks[e]=t;return}let i=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,Error("operation has timed out"))},r),o=(...e)=>{this.io.clearTimeoutFn(i),t.apply(this,e)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...t){return new Promise((n,r)=>{let i=(e,t)=>e?r(e):n(t);i.withError=!0,t.push(i),this.emit(e,...t)})}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>(this._queue[0],null!==e?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...r)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;let t=this._queue[0];(!t.pending||e)&&(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:o.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){let t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case o.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case o.EVENT:case o.BINARY_EVENT:this.onevent(e);break;case o.ACK:case o.BINARY_ACK:this.onack(e);break;case o.DISCONNECT:this.ondisconnect();break;case o.CONNECT_ERROR:this.destroy();let t=Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){let t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length)for(let t of this._anyListeners.slice())t.apply(this,e);super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,n=!1;return function(...r){n||(n=!0,t.packet({type:o.ACK,id:e,data:r}))}}onack(e){let t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:o.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n]){t.splice(n,1);break}}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n]){t.splice(n,1);break}}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length)for(let t of this._anyOutgoingListeners.slice())t.apply(this,e.data)}}var eh=e.i(51890);function em(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}em.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(1&Math.floor(10*t))==0?e-n:e+n}return 0|Math.min(e,this.max)},em.prototype.reset=function(){this.attempts=0},em.prototype.setMin=function(e){this.ms=e},em.prototype.setMax=function(e){this.max=e},em.prototype.setJitter=function(e){this.jitter=e};class eg extends S{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,O(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!=(n=t.randomizationFactor)?n:.5),this.backoff=new em({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||eh;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null==(t=this.backoff)||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null==(t=this.backoff)||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null==(t=this.backoff)||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new ee(this.uri,this.opts);let t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;let r=ed(t,"open",function(){n.onopen(),e&&e()}),i=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},o=ed(t,"error",i);if(!1!==this._timeout){let e=this._timeout,n=this.setTimeoutFn(()=>{r(),i(Error("timeout")),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(ed(e,"ping",this.onping.bind(this)),ed(e,"data",this.ondata.bind(this)),ed(e,"error",this.onerror.bind(this)),ed(e,"close",this.onclose.bind(this)),ed(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){C(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new ep(this,e,t),this.nsps[e]=n),n}_destroy(e){for(let e of Object.keys(this.nsps))if(this.nsps[e].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),null==(n=this.engine)||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}let ey={};function ev(e,t){let n;"object"==typeof e&&(t=e,e=void 0);let r=function(e,t="",n){let r=e;n=n||"u">typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==n?n.protocol+"//"+e:"https://"+e),r=X(e)),!r.port&&(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";let i=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),i=r.source,o=r.id,a=r.path,l=ey[o]&&a in ey[o].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||l?n=new eg(i,t):(ey[o]||(ey[o]=new eg(i,t)),n=ey[o]),r.query&&!t.query&&(t.query=r.queryKey),n.socket(r.path,t)}Object.assign(ev,{Manager:eg,Socket:ep,io:ev,connect:ev}),e.s(["io",0,ev],96085);var eb=e.i(70935);e.s(["useTaskEvents",0,function(e){let t=(0,a.useRef)(null),n=(0,a.useRef)(e);(0,a.useLayoutEffect)(()=>{n.current=e}),(0,a.useEffect)(()=>{let e=ev((0,eb.getServerUrl)(),{transports:["polling","websocket"]});return t.current=e,e.on("task:created",({task:e})=>{n.current.onTaskCreated(e)}),e.on("task:updated",({task:e})=>{n.current.onTaskUpdated(e)}),e.on("task:deleted",({taskId:e})=>{n.current.onTaskDeleted(e)}),()=>{e.disconnect(),t.current=null}},[])}],2576)}]);
|